query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
65b14399851ec1208c1f9b5b1746503b
Populate the extensions and types maps.
[ { "docid": "2ece50069dd536e9aff10378eccf8c33", "score": "0.7070758", "text": "function populateMaps(extensions, types) {\n\t // source preference (least -> most)\n\t var preference = ['nginx', 'apache', undefined, 'iana']\n\n\t Object.keys(db).forEach(function forEachMimeType(type) {\n\t var mime = db[type]\n\t var exts = mime.extensions\n\n\t if (!exts || !exts.length) {\n\t return\n\t }\n\n\t // mime -> extensions\n\t extensions[type] = exts\n\n\t // extension -> mime\n\t for (var i = 0; i < exts.length; i++) {\n\t var extension = exts[i]\n\n\t if (types[extension]) {\n\t var from = preference.indexOf(db[types[extension]].source)\n\t var to = preference.indexOf(mime.source)\n\n\t if (types[extension] !== 'application/octet-stream'\n\t && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {\n\t // skip the remapping\n\t continue\n\t }\n\t }\n\n\t // set the extension -> mime\n\t types[extension] = type\n\t }\n\t })\n\t}", "title": "" } ]
[ { "docid": "7af74cefbc160295f4af23ff2f0bf39d", "score": "0.7661521", "text": "function populateMaps(extensions, types) {\n const preference = [\"nginx\", \"apache\", undefined, \"iana\"];\n for (const type of Object.keys(deps_ts_1.db)) {\n const mime = deps_ts_1.db[type];\n const exts = mime.extensions;\n if (!exts || !exts.length) {\n continue;\n }\n extensions.set(type, exts);\n for (const ext of exts) {\n if (types.has(ext)) {\n const current = types.get(ext);\n const from = preference.indexOf(deps_ts_1.db[current].source);\n const to = preference.indexOf(mime.source);\n if (current !== \"application/octet-stream\" &&\n (from > to ||\n (from === to && current.substr(0, 12) === \"application/\"))) {\n continue;\n }\n }\n types.set(ext, type);\n }\n }\n }", "title": "" }, { "docid": "5b9d6705ff4d8dde40330df38cfde4a2", "score": "0.72474426", "text": "function populateMaps(extensions,types){ // source preference (least -> most)\nvar preference=['nginx','apache',undefined,'iana'];Object.keys(db).forEach(function forEachMimeType(type){var mime=db[type];var exts=mime.extensions;if(!exts || !exts.length){return;} // mime -> extensions\nextensions[type] = exts; // extension -> mime\nfor(var i=0;i < exts.length;i++) {var extension=exts[i];if(types[extension]){var from=preference.indexOf(db[types[extension]].source);var to=preference.indexOf(mime.source);if(types[extension] !== 'application/octet-stream' && from > to || from === to && types[extension].substr(0,12) === 'application/'){ // skip the remapping\ncontinue;}} // set the extension -> mime\ntypes[extension] = type;}});}", "title": "" }, { "docid": "4bbcca3858e21447040a961ebd285fcb", "score": "0.71654636", "text": "function populateMaps(extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana'];\n Object.keys(db).forEach(function forEachMimeType(type) {\n var mime = db[type];\n var exts = mime.extensions;\n\n if (!exts || !exts.length) {\n return;\n } // mime -> extensions\n\n\n extensions[type] = exts; // extension -> mime\n\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i];\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source);\n var to = preference.indexOf(mime.source);\n\n if (types[extension] !== 'application/octet-stream' && (from > to || from === to && types[extension].substr(0, 12) === 'application/')) {\n // skip the remapping\n continue;\n }\n } // set the extension -> mime\n\n\n types[extension] = type;\n }\n });\n}", "title": "" }, { "docid": "3837f709e27e703fe44c53b9c038f8b0", "score": "0.7108822", "text": "function populateMaps (extensions, types) {\n\t // source preference (least -> most)\n\t var preference = ['nginx', 'apache', undefined, 'iana']\n\t\n\t Object.keys(db).forEach(function forEachMimeType (type) {\n\t var mime = db[type]\n\t var exts = mime.extensions\n\t\n\t if (!exts || !exts.length) {\n\t return\n\t }\n\t\n\t // mime -> extensions\n\t extensions[type] = exts\n\t\n\t // extension -> mime\n\t for (var i = 0; i < exts.length; i++) {\n\t var extension = exts[i]\n\t\n\t if (types[extension]) {\n\t var from = preference.indexOf(db[types[extension]].source)\n\t var to = preference.indexOf(mime.source)\n\t\n\t if (types[extension] !== 'application/octet-stream' &&\n\t (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n\t // skip the remapping\n\t continue\n\t }\n\t }\n\t\n\t // set the extension -> mime\n\t types[extension] = type\n\t }\n\t })\n\t}", "title": "" }, { "docid": "3837f709e27e703fe44c53b9c038f8b0", "score": "0.7108822", "text": "function populateMaps (extensions, types) {\n\t // source preference (least -> most)\n\t var preference = ['nginx', 'apache', undefined, 'iana']\n\t\n\t Object.keys(db).forEach(function forEachMimeType (type) {\n\t var mime = db[type]\n\t var exts = mime.extensions\n\t\n\t if (!exts || !exts.length) {\n\t return\n\t }\n\t\n\t // mime -> extensions\n\t extensions[type] = exts\n\t\n\t // extension -> mime\n\t for (var i = 0; i < exts.length; i++) {\n\t var extension = exts[i]\n\t\n\t if (types[extension]) {\n\t var from = preference.indexOf(db[types[extension]].source)\n\t var to = preference.indexOf(mime.source)\n\t\n\t if (types[extension] !== 'application/octet-stream' &&\n\t (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n\t // skip the remapping\n\t continue\n\t }\n\t }\n\t\n\t // set the extension -> mime\n\t types[extension] = type\n\t }\n\t })\n\t}", "title": "" }, { "docid": "fb8f624c1b93f5ec8ad0c27076de8666", "score": "0.7087464", "text": "function populateMaps (extensions, types) {\r\n // source preference (least -> most)\r\n const preference = ['nginx', 'apache', undefined, 'iana']\r\n\r\n Object.keys(db).forEach(function forEachMimeType (type) {\r\n const mime = db[type]\r\n const exts = mime.extensions\r\n\r\n if (!exts || !exts.length) {\r\n return\r\n }\r\n\r\n // mime -> extensions\r\n extensions[type] = exts\r\n\r\n // extension -> mime\r\n for (let i = 0; i < exts.length; i++) {\r\n const extension = exts[i]\r\n\r\n if (types[extension]) {\r\n const from = preference.indexOf(db[types[extension]].source)\r\n const to = preference.indexOf(mime.source)\r\n\r\n if (types[extension] !== 'application/octet-stream' &&\r\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\r\n // skip the remapping\r\n continue\r\n }\r\n }\r\n\r\n // set the extension -> mime\r\n types[extension] = type\r\n }\r\n })\r\n}", "title": "" }, { "docid": "1d5690f4300d81fa00f6543d9cde36b8", "score": "0.70736134", "text": "function populateMaps (extensions, types) {\n\t // source preference (least -> most)\n\t var preference = ['nginx', 'apache', undefined, 'iana']\n\n\t Object.keys(db).forEach(function forEachMimeType (type) {\n\t var mime = db[type]\n\t var exts = mime.extensions\n\n\t if (!exts || !exts.length) {\n\t return\n\t }\n\n\t // mime -> extensions\n\t extensions[type] = exts\n\n\t // extension -> mime\n\t for (var i = 0; i < exts.length; i++) {\n\t var extension = exts[i]\n\n\t if (types[extension]) {\n\t var from = preference.indexOf(db[types[extension]].source)\n\t var to = preference.indexOf(mime.source)\n\n\t if (types[extension] !== 'application/octet-stream' &&\n\t from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {\n\t // skip the remapping\n\t continue\n\t }\n\t }\n\n\t // set the extension -> mime\n\t types[extension] = type\n\t }\n\t })\n\t}", "title": "" }, { "docid": "5203a9228ed28d946a606d2828f24d53", "score": "0.7071802", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "5203a9228ed28d946a606d2828f24d53", "score": "0.7071802", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "e14bae000cccb00746a2e84e8402d372", "score": "0.70696044", "text": "function populateMaps(extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType(type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream'\n && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "e14bae000cccb00746a2e84e8402d372", "score": "0.70696044", "text": "function populateMaps(extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType(type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream'\n && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "9032e1064a9e2d267c69ab567cdfde15", "score": "0.70530087", "text": "function populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}", "title": "" }, { "docid": "7812de58840f83e5996b0f3416cd0837", "score": "0.6857001", "text": "_map() {\n for (var key in this._extensions) {\n if (this._extensions.hasOwnProperty(key)) {\n let target = this._extensions[key];\n if (!this[key] && !!target)\n this[key] = target;\n }\n }\n }", "title": "" }, { "docid": "64595234978af079a921122c3c6b348b", "score": "0.5938864", "text": "initialize() {\n this.addType();\n this.addSubType();\n }", "title": "" }, { "docid": "d22a538cd82d4c3f6ef6c53d05c2c4a7", "score": "0.5922274", "text": "async loadExtensions(extensions) {\n let extensionData = {};\n\n let promises = [];\n for (let prefix of Object.keys(extensions)) {\n extensions[prefix].prefix = prefix;\n if (extensions[prefix].spec) {\n continue;\n }\n\n let promise = this.getExtension(extensions[prefix].url).then(\n extension => {\n if (!extension) throw \"Error loading extension: \" + prefix;\n\n console.log(\"loaded \", prefix);\n\n extensions[prefix].spec = extension;\n }\n );\n\n promises.push(promise);\n }\n await Promise.all(promises);\n\n // Load in the Schema Org model if required\n if (this.generateSchemaOrgModel) {\n extensions.schema = {\n prefix: \"schema\",\n heading: \"Schema.org\",\n description: \"Schema.org\",\n spec: getSchemaOrgVocab(),\n preferOA: false,\n }\n }\n\n // Add all extensions and namespaces first, in case they reference each other\n for (let prefix of Object.keys(extensions)) {\n let extension = extensions[prefix].spec;\n\n if (!extension) {\n continue;\n }\n\n this.storeNamespaces(extension[\"@context\"]);\n }\n\n await Promise.all(\n Object.keys(extensions).map(async prefix => {\n let extension = extensions[prefix].spec;\n\n if (!extension || !extension[\"@graph\"]) {\n return;\n }\n\n if (prefix == \"beta\") {\n Object.assign(extension[\"@context\"][1], {\n isArray: \"https://openactive.com/ns-noncompliant#isArray\"\n });\n }\n\n let expanded = await jsonld.compact(extension, extension[\"@context\"]);\n let compacted = await jsonld.compact(expanded, this.namespaces);\n\n extensions[prefix].graph = compacted[\"@graph\"];\n })\n );\n\n for (let prefix of Object.keys(extensions)) {\n let extension = extensions[prefix];\n if (extension.graph) {\n await this.augmentWithExtension(extension);\n this.augmentEnumsWithExtension(extension.graph, extension.url, prefix);\n }\n }\n\n await this.fillAugmentedSubclasses();\n }", "title": "" }, { "docid": "7e04df114e96d400006f4b725251c059", "score": "0.5862912", "text": "loadExtensions () {}", "title": "" }, { "docid": "781d03bb727568f78e29bc0004740da9", "score": "0.57526016", "text": "ready() {\n for (const type of this.types.keys()) {\n const fieldsCopy = this.types.get(type).slice(0);\n this.typesIterator.set(type, fieldsCopy);\n }\n }", "title": "" }, { "docid": "1338c166cb22d2ac0baabdf4e12d64f7", "score": "0.57416695", "text": "createExtensionManager() {\n const coreExtensions = Object.entries(extensions).map(([, extension]) => extension);\n const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => {\n return ['extension', 'node', 'mark'].includes(extension === null || extension === void 0 ? void 0 : extension.type);\n });\n this.extensionManager = new ExtensionManager(allExtensions, this);\n }", "title": "" }, { "docid": "11c9985b2be9837a3237bcb822b177ff", "score": "0.5544789", "text": "function initEntityTypes() {\n // Create a map of entity types that will not change\n main.entityTypes = {\n person: new EntityType('person', 'Person', '#be3f4f'),\n location: new EntityType('location', 'Location', '#5f9f6c'),\n organization: new EntityType('organization', 'Organization', '#4660ac'),\n date: new EntityType('date', 'Date', '#ffdd17'),\n money: new EntityType('money', 'Money', '#006d2c'),\n percent: new EntityType('percent', 'Percent', '#753a7d'),\n time: new EntityType('time', 'Time', '#e6550d')\n };\n }", "title": "" }, { "docid": "3727864c7ff9c5d4dcab8e7f52321c29", "score": "0.5510896", "text": "createExtensionManager() {\n const coreExtensions = this.options.enableCoreExtensions\n ? Object.values(extensions)\n : [];\n const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => {\n return ['extension', 'node', 'mark'].includes(extension === null || extension === void 0 ? void 0 : extension.type);\n });\n this.extensionManager = new ExtensionManager(allExtensions, this);\n }", "title": "" }, { "docid": "43f8bb3f4528eec3e730f0f6cafc6578", "score": "0.5443686", "text": "_buildTypeAll () {\n AllNameSpaces.forEach((namespace) => {\n const classes = NameSpaceStore.getClasses(namespace)\n Object.keys(classes).forEach((className) => {\n this._buildType(classes[className])\n })\n })\n\n this.classes.forEach((classInfo) => {\n this._buildType(classInfo)\n })\n }", "title": "" }, { "docid": "200c25fc60e5e55d2041e522b7823164", "score": "0.5351272", "text": "static _initPersistentListeners(extension) {\n if (extension.persistentListeners) {\n return;\n }\n\n let listeners = new DefaultMap(() => new DefaultMap(() => new Map()));\n extension.persistentListeners = listeners;\n\n let {persistentListeners} = extension.startupData;\n if (!persistentListeners) {\n return;\n }\n\n for (let [module, entry] of Object.entries(persistentListeners)) {\n for (let [event, paramlists] of Object.entries(entry)) {\n for (let paramlist of paramlists) {\n let key = uneval(paramlist);\n listeners.get(module).get(event).set(key, {params: paramlist});\n }\n }\n }\n }", "title": "" }, { "docid": "193a3110090fa70f3b94990b91942e19", "score": "0.5289714", "text": "setup () {\n for (let [field, type] of this._content) {\n let defaultFieldValue = null\n let immutableField = false\n if (typeof type === 'object' && Object(type) === type) {\n let { defaultValue, typeCheck, immutable } = type\n immutableField = immutable === true\n defaultFieldValue = defaultValue\n type = typeCheck\n }\n if (field.charAt(0) === `$`) {\n immutableField = true\n field = field.substring(1)\n }\n this._beanjar.addProperty(field, defaultFieldValue, immutableField)\n this._beanjar.addPropertyGuard(field, this.parseTypeCheck(type, field))\n }\n return this\n }", "title": "" }, { "docid": "8e55b674f095bcc0dfd40fc5f5e5330e", "score": "0.5237828", "text": "extend(key, value) {\n this.extensions[key] = value\n }", "title": "" }, { "docid": "4b4afe58a8db968d2d944d56d7c0977c", "score": "0.52349454", "text": "initModelMap() {\n this._models = Object.keys(this._introspection).reduce((map, key) => {\n const defn = this._introspection[key];\n map = {\n ...map,\n [defn.model]: {\n ...map[defn.model],\n ...{ [key]: defn }\n }\n };\n return map;\n }, {});\n }", "title": "" }, { "docid": "8bd1eda69eae1bd2797c3aeb819c5019", "score": "0.5230627", "text": "untyped() {\n return (extensions, onload) => {\n // exclude typed extensions when types not requested\n extensions = extensions.filter(m => !('dataType' in m));\n onload(extensions);\n };\n }", "title": "" }, { "docid": "e38aa602bba4457d004244ac0f1fc67a", "score": "0.52169067", "text": "_initialize() {\r\n const localizationFiles = Util.readDirectory(this._folderPath);\r\n\r\n for (let locale of localizationFiles) {\r\n const localeObject = require(locale);\r\n\r\n for (let localeProp in localeObject) {\r\n if (!this._localizations.hasOwnProperty(localeProp)) {\r\n Object.assign(this._localizations, { [localeProp]: localeObject[localeProp] });\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f7458a438abc3589f23c228c2596a8a6", "score": "0.51886004", "text": "constructor() {\n let /** Array<{String: Number}>*/ types = update_metadata_pb.InstallOperation.Type\n this.mapType = new DefaultMap()\n for (let key of Object.keys(types)) {\n this.mapType.set(types[key], key)\n }\n }", "title": "" }, { "docid": "a7d4b4c6010d1af088424633ace86904", "score": "0.51657104", "text": "function initMaps(paramname,param_type,enum_values){\n name_type_map.set(paramname,param_type)\n name_param_id_map.set(paramname,paramname)\n enum_value_map.set(paramname, enum_values.split(\";\"));\n\n}", "title": "" }, { "docid": "7317770c7fab60eff6848a9b57482eb8", "score": "0.5160075", "text": "function PossibleTypeExtensions(context) {\n var schema = context.getSchema();\n var definedTypes = Object.create(null);\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = context.getDocument().definitions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var def = _step.value;\n\n if (Object(_language_predicates__WEBPACK_IMPORTED_MODULE_4__[\"isTypeDefinitionNode\"])(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension\n };\n\n function checkExtension(node) {\n var typeName = node.name.value;\n var defNode = definedTypes[typeName];\n var existingType = schema && schema.getType(typeName);\n\n if (defNode) {\n var expectedKind = defKindToExtKind[defNode.kind];\n\n if (expectedKind !== node.kind) {\n context.reportError(new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_2__[\"GraphQLError\"](extendingDifferentTypeKindMessage(typeName, extensionKindToTypeName(expectedKind)), [defNode, node]));\n }\n } else if (existingType) {\n var _expectedKind = typeToExtKind(existingType);\n\n if (_expectedKind !== node.kind) {\n context.reportError(new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_2__[\"GraphQLError\"](extendingDifferentTypeKindMessage(typeName, extensionKindToTypeName(_expectedKind)), node));\n }\n } else {\n var allTypeNames = Object.keys(definedTypes);\n\n if (schema) {\n allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap()));\n }\n\n var suggestedTypes = Object(_jsutils_suggestionList__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(typeName, allTypeNames);\n context.reportError(new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_2__[\"GraphQLError\"](extendingUnknownTypeMessage(typeName, suggestedTypes), node.name));\n }\n }\n}", "title": "" }, { "docid": "64898208ec5e5bee7c366f0fe4117bd2", "score": "0.5153129", "text": "function setupTypeInfo() {\n for (var i in document.ANALYSIS_DATA) {\n var data = document.ANALYSIS_DATA[i];\n\n var el = document.getElementById(\"implements-\" + i);\n if (el != null) {\n // el != null => data is TypeInfoJSON.\n if (data.ImplGroups != null) {\n el.innerHTML = implementsHTML(data);\n el.parentNode.parentNode.style.display = \"block\";\n }\n }\n\n var el = document.getElementById(\"methodset-\" + i);\n if (el != null) {\n // el != null => data is TypeInfoJSON.\n if (data.Methods != null) {\n el.innerHTML = methodsetHTML(data);\n el.parentNode.parentNode.style.display = \"block\";\n }\n }\n }\n}", "title": "" }, { "docid": "83a5b71981e98c4e304d3595724b606b", "score": "0.50960594", "text": "function _setupTypeHandlers(constructorFn) {\r\n var typeHandlers = FrameworkFactory.typeHandlers.getTypeHandlers(),\r\n typeHandler,\r\n i, iLen;\r\n\r\n for (i=0, iLen=typeHandlers.length; i < iLen; i += 1) {\r\n typeHandler = FrameworkFactory.typeHandlers.get(typeHandlers[i]);\r\n if (typeHandler.setup) {\r\n typeHandler.setup(constructorFn);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "6b308dc83f257a8a6e25293a9d29dcc7", "score": "0.5061721", "text": "typedefs() { return new Map(); }", "title": "" }, { "docid": "ed886f4a4e6785d3c73d37d2585f1523", "score": "0.50452244", "text": "function init() {\n\t\tfindMaps();\n\t\tinitalizeMaps();\n\t}", "title": "" }, { "docid": "80705f49f568344ac6f94f5aa737b9b9", "score": "0.5042234", "text": "function makeBuiltinsMap() {\n var map = env.makeMap/*<Object, Path>*/();\n\n function registerBuiltin(ID, value) {\n if (typeof ID !== 'string') {\n throw new Error('Invalid ID: ' + ID);\n }\n var isNonPrimitive = typeof value === 'function' || (typeof value === 'object' && value !== null);\n if (!isNonPrimitive || map.has(value)) {\n return;\n }\n map.set(value, ID);\n }\n\n\n var bannedIDs = [\n 'Function.prototype.arguments',\n 'Function.prototype.callee'\n ];\n\n function isBanned(ID, obj, prop) {\n var isGetter = Object.getOwnPropertyDescriptor(obj, prop).get !== undefined;\n return bannedIDs.indexOf(ID) !== -1 || isGetter;\n }\n\n var global = Function('return this')();\n registerBuiltin('<the global object>', global);\n // add selected globals\n var commonGlobalNames = [\n 'Array',\n 'ArrayBuffer',\n 'Boolean',\n 'DataView',\n 'Date',\n 'Error',\n 'Float32Array',\n 'Float64Array',\n 'Function',\n 'Int16Array',\n 'Int32Array',\n 'Int8Array',\n 'JSON',\n 'Map',\n 'Math',\n 'Number',\n 'Object',\n 'Promise',\n 'RangeError',\n 'ReferenceError',\n 'RegExp',\n 'Set',\n 'String',\n 'Symbol',\n 'SyntaxError',\n 'TypeError',\n 'URIError',\n 'Uint16Array',\n 'Uint32Array',\n 'Uint8Array',\n 'Uint8ClampedArray',\n 'WeakMap',\n 'WeakSet',\n 'console',\n 'decodeURI',\n 'decodeURIComponent',\n 'encodeURI',\n 'encodeURIComponent',\n 'escape',\n 'isFinite',\n 'parseFloat',\n 'parseInt',\n 'unescape'];\n commonGlobalNames.forEach(function (ID) {\n var globalProperty = global[ID];\n if (globalProperty) {\n registerBuiltin(ID, globalProperty);\n }\n });\n // add non-primitives from objects with constructor-like names, and their prototypes\n map.forEach(function (ID, value) {\n if (typeof ID !== 'string') {\n throw new Error('Invalid ID: ' + ID);\n }\n var isConstructorLike = typeof value === 'function' && ID[0] === ID[0].toUpperCase();\n if (!isConstructorLike) {\n return;\n }\n Object.getOwnPropertyNames(value).forEach(function (valuePropertyName) {\n var propertyValueID = ID + \".\" + valuePropertyName;\n if (isBanned(propertyValueID, value, valuePropertyName)) {\n return;\n }\n var propertyValue = value[valuePropertyName];\n registerBuiltin(propertyValueID, propertyValue);\n });\n var prototype = value.prototype;\n if (prototype) {\n Object.getOwnPropertyNames(prototype).forEach(function (prototypePropertyName) {\n var prototypePropertyValueID = ID + \".prototype.\" + prototypePropertyName;\n if (isBanned(prototypePropertyValueID, prototype, prototypePropertyName)) {\n return;\n }\n var prototypePropertyValue = prototype[prototypePropertyName];\n registerBuiltin(prototypePropertyValueID, prototypePropertyValue);\n });\n }\n });\n return map;\n }", "title": "" }, { "docid": "e80dc046b022f1ebaf39e312ac18177c", "score": "0.50176185", "text": "getAllTypes() {\n let typemap = this.get('typemap');\n let enums = this.get('enums');\n let fbtypes = this.get('fbtypes');\n let ret = A();\n let retStrings = A();\n\n for (let type of typemap) {\n let obj = {};\n obj.type = type.name;\n if (type.name.indexOf('null') !== -1 || type.name.indexOf('Null') !== -1) {\n obj.nullable = true;\n } else {\n obj.nullable = false;\n }\n\n obj.userString = this.getTranslationString(obj.type);\n retStrings.push(obj.userString);\n ret.push(obj);\n }\n\n for (let sEnum of enums.content) {\n let obj = {};\n obj.type = sEnum._data.nameStr;\n if (obj.type.indexOf('null') !== -1 || obj.type.indexOf('Null') !== -1) {\n obj.nullable = true;\n } else {\n obj.nullable = false;\n }\n\n obj.userString = this.getTranslationString(obj.type);\n retStrings.push(obj.userString);\n ret.push(obj);\n }\n\n for (let type of fbtypes.content) {\n let obj = {};\n obj.type = type._data.caption;\n if (obj.type.indexOf('null') !== -1 || obj.type.indexOf('Null') !== -1) {\n obj.nullable = true;\n } else {\n obj.nullable = false;\n }\n\n obj.userString = this.getTranslationString(obj.type);\n retStrings.push(obj.userString);\n ret.push(obj);\n }\n\n if (ret.length !== 0) {\n this.set('types', ret);\n this.set('typesAsStrings', retStrings);\n } else {\n this.set('types', [\n {\n nullable: false,\n type: 'bool',\n userString: 'components.fd-visual-control.typeName.boolControlType'\n },\n {\n nullable: false,\n type: 'int',\n userString: 'components.fd-visual-control.typeName.boolintControlType'\n },\n {\n nullable: false,\n type: 'string',\n userString: 'components.fd-visual-control.typeName.dateControlType'\n }\n ]);\n this.set('typesAsStrings', [\n 'components.fd-visual-control.typeName.stringControlType',\n 'components.fd-visual-control.typeName.boolControlType',\n 'components.fd-visual-control.typeName.intControlType',\n 'components.fd-visual-control.typeName.dateControlType'\n ]);\n }\n\n }", "title": "" }, { "docid": "9e39c0c79dc15e297438199396e564cc", "score": "0.50172263", "text": "function parseTypeExtensionDefinition(lexer) {\n\t var start = lexer.token;\n\t expectKeyword(lexer, 'extend');\n\t var definition = parseObjectTypeDefinition(lexer);\n\t return {\n\t kind: _kinds.TYPE_EXTENSION_DEFINITION,\n\t definition: definition,\n\t loc: loc(lexer, start)\n\t };\n\t}", "title": "" }, { "docid": "9343311d22245300771c26a5beacdd78", "score": "0.50080305", "text": "async _loadDicts() {\n // Remove if replace is unset\n if (!game.user || !game.user.isGM || this.data.name.replace !== \"replace\") {\n // Useful to free up memory? its \"just\" up to 17MB...\n // delete this.dict;\n return;\n }\n if (!this.dict) this.dict = {};\n const options = this.data.name.options;\n let languages = this.languages;\n for (let lang of languages) {\n if (this.dict[lang]) continue;\n this.dict[lang] = (await import(`./dict/${lang}.js`)).lang;\n }\n }", "title": "" }, { "docid": "031b78ee6c8313e8cc3f730e1e6af4a6", "score": "0.49881774", "text": "function PossibleTypeExtensions(context) {\n var schema = context.getSchema();\n var definedTypes = Object.create(null);\n\n for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {\n var def = _context$getDocument$2[_i2];\n\n if (Object(_language_predicates__WEBPACK_IMPORTED_MODULE_4__[\"isTypeDefinitionNode\"])(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension\n };\n\n function checkExtension(node) {\n var typeName = node.name.value;\n var defNode = definedTypes[typeName];\n var existingType = schema && schema.getType(typeName);\n\n if (defNode) {\n var expectedKind = defKindToExtKind[defNode.kind];\n\n if (expectedKind !== node.kind) {\n context.reportError(new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_2__[\"GraphQLError\"](extendingDifferentTypeKindMessage(typeName, extensionKindToTypeName(expectedKind)), [defNode, node]));\n }\n } else if (existingType) {\n var _expectedKind = typeToExtKind(existingType);\n\n if (_expectedKind !== node.kind) {\n context.reportError(new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_2__[\"GraphQLError\"](extendingDifferentTypeKindMessage(typeName, extensionKindToTypeName(_expectedKind)), node));\n }\n } else {\n var allTypeNames = Object.keys(definedTypes);\n\n if (schema) {\n allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap()));\n }\n\n var suggestedTypes = Object(_jsutils_suggestionList__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(typeName, allTypeNames);\n context.reportError(new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_2__[\"GraphQLError\"](extendingUnknownTypeMessage(typeName, suggestedTypes), node.name));\n }\n }\n}", "title": "" }, { "docid": "edfe6df9f4fc6539d4fb46d6d10f1585", "score": "0.49641955", "text": "constructor(types) {\n this.#types = JSON.stringify(types);\n this.#fullTypes = new Map();\n this.#encoderCache = new Map();\n // Link struct types to their direct child structs\n const links = new Map();\n // Link structs to structs which contain them as a child\n const parents = new Map();\n // Link all subtypes within a given struct\n const subtypes = new Map();\n Object.keys(types).forEach((type) => {\n links.set(type, new Set());\n parents.set(type, []);\n subtypes.set(type, new Set());\n });\n for (const name in types) {\n const uniqueNames = new Set();\n for (const field of types[name]) {\n // Check each field has a unique name\n (0, index_js_4.assertArgument)(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", types);\n uniqueNames.add(field.name);\n // Get the base type (drop any array specifiers)\n const baseType = (field.type.match(/^([^\\x5b]*)(\\x5b|$)/))[1] || null;\n (0, index_js_4.assertArgument)(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", types);\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) {\n continue;\n }\n (0, index_js_4.assertArgument)(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", types);\n // Add linkage\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n // Deduce the primary type\n const primaryTypes = Array.from(parents.keys()).filter((n) => (parents.get(n).length === 0));\n (0, index_js_4.assertArgument)(primaryTypes.length !== 0, \"missing primary type\", \"types\", types);\n (0, index_js_4.assertArgument)(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(\", \")}`, \"types\", types);\n (0, index_js_4.defineProperties)(this, { primaryType: primaryTypes[0] });\n // Check for circular type references\n function checkCircular(type, found) {\n (0, index_js_4.assertArgument)(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n // Recursively check children\n checkCircular(child, found);\n // Mark all ancestors as having this decendant\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, new Set());\n // Compute each fully describe type\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\"));\n }\n }", "title": "" }, { "docid": "1e15116df3ae1c55984aa2d4ba2a789a", "score": "0.4941243", "text": "setup(){\n this.pluginNames = []\n\n require('./index').plugins.forEach(modifier => {\n this.pluginNames.push(modifier.plugin_name || modifier.pluginName)\n modifier(this)\n })\n \n loadModelDefinitions(this)\n\n createAssetRepository(this) \n\n createDataRepository(this) \n\n loadHelpers(this)\n }", "title": "" }, { "docid": "8e4bdb2a15754fd68e266ed0d1eb4401", "score": "0.4934924", "text": "extend(...props) {\n let newTypes = []\n for (let type of this.types) {\n let newProps = null\n for (let source of props) {\n let add = source(type)\n if (add) {\n if (!newProps) newProps = Object.assign({}, type.props)\n newProps[add[0].id] = add[1]\n }\n }\n newTypes.push(\n newProps\n ? new dist_NodeType(type.name, newProps, type.id, type.flags)\n : type\n )\n }\n return new NodeSet(newTypes)\n }", "title": "" }, { "docid": "fed1df2b0e745dbd8b7b9ebfaf3206c7", "score": "0.49289128", "text": "function parseTypeExtensionDefinition(lexer) {\n var start = lexer.token;\n expectKeyword(lexer, 'extend');\n var definition = parseObjectTypeDefinition(lexer);\n return {\n kind: _kinds.TYPE_EXTENSION_DEFINITION,\n definition: definition,\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "fed1df2b0e745dbd8b7b9ebfaf3206c7", "score": "0.49289128", "text": "function parseTypeExtensionDefinition(lexer) {\n var start = lexer.token;\n expectKeyword(lexer, 'extend');\n var definition = parseObjectTypeDefinition(lexer);\n return {\n kind: _kinds.TYPE_EXTENSION_DEFINITION,\n definition: definition,\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "fed1df2b0e745dbd8b7b9ebfaf3206c7", "score": "0.49289128", "text": "function parseTypeExtensionDefinition(lexer) {\n var start = lexer.token;\n expectKeyword(lexer, 'extend');\n var definition = parseObjectTypeDefinition(lexer);\n return {\n kind: _kinds.TYPE_EXTENSION_DEFINITION,\n definition: definition,\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "ef7929e978233d715c9531ad78e5b037", "score": "0.49103993", "text": "function addParsesForAllIfcTypes($) {\n Object.values(typesParserMap).forEach((e) => {\n $.RULE(e[n.ifcClass], () => {\n newParser($, e);\n });\n });\n}", "title": "" }, { "docid": "2a0bc7e5dd848388658f3d9dbb2f623b", "score": "0.49047282", "text": "constructor() {\n let /** Array<{String: Number}>*/ types =\n update_metadata_pb.CowMergeOperation.Type\n this.mapType = new DefaultMap()\n for (let key of Object.keys(types)) {\n this.mapType.set(types[key], key)\n }\n }", "title": "" }, { "docid": "31eb892210e74682738947edf885d71d", "score": "0.48884654", "text": "function ExtManager() {\n _classCallCheck(this, ExtManager);\n\n this.exts = new _tuiCodeSnippet2.default.Map();\n }", "title": "" }, { "docid": "440f7964a1e3fd48ab74cabbb23f6d22", "score": "0.48828357", "text": "function PossibleTypeExtensionsRule(context) {\n const schema = context.getSchema();\n const definedTypes = Object.create(null);\n\n for (const def of context.getDocument().definitions) {\n if ((0, _predicates.isTypeDefinitionNode)(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension,\n };\n\n function checkExtension(node) {\n const typeName = node.name.value;\n const defNode = definedTypes[typeName];\n const existingType =\n schema === null || schema === void 0 ? void 0 : schema.getType(typeName);\n let expectedKind;\n\n if (defNode) {\n expectedKind = defKindToExtKind[defNode.kind];\n } else if (existingType) {\n expectedKind = typeToExtKind(existingType);\n }\n\n if (expectedKind) {\n if (expectedKind !== node.kind) {\n const kindStr = extensionKindToTypeName(node.kind);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Cannot extend non-${kindStr} type \"${typeName}\".`,\n {\n nodes: defNode ? [defNode, node] : node,\n },\n ),\n );\n }\n } else {\n const allTypeNames = Object.keys({\n ...definedTypes,\n ...(schema === null || schema === void 0\n ? void 0\n : schema.getTypeMap()),\n });\n const suggestedTypes = (0, _suggestionList.suggestionList)(\n typeName,\n allTypeNames,\n );\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Cannot extend type \"${typeName}\" because it is not defined.` +\n (0, _didYouMean.didYouMean)(suggestedTypes),\n {\n nodes: node.name,\n },\n ),\n );\n }\n }\n}", "title": "" }, { "docid": "4879eaeae722534d1ec09680480209ee", "score": "0.48811695", "text": "visitXMLXSDExtensionType(xmlxsdExt){\n this.buildAttrs(xmlxsdExt);\n }", "title": "" }, { "docid": "788e0e414f927e52ce222048a9ff1119", "score": "0.48777193", "text": "function loadFileTypes(isReload = false) {\n if (isReload) {\n fileTypes = undefined;\n }\n else {\n fileTypes = context.globalState.get(FILE_TYPES_STATE);\n }\n\n let defaultFileTypes = JSON.parse(fs.readFileSync(fileTypesDB));\n\n if (fileTypes) {\n // In case of upgrade, keep previous types and add new types added to the new version\n defaultFileTypes.forEach(fileType => {\n if (fileType.ext) {\n let found = fileTypes.find((item) => {\n return fileType.ext === item.ext;\n });\n\n if (!found) {\n // Add the item before all popup's custom commands\n fileTypes.splice(fileTypes.length - 4, 0, fileType);\n }\n }\n });\n }\n else {\n fileTypes = defaultFileTypes;\n }\n\n saveFileTypes();\n }", "title": "" }, { "docid": "5add02b985d1d7a414c18c979b02cd76", "score": "0.48490936", "text": "_registerGlobals() {\n if ( this._globalsRegistered ) {\n return;\n }\n\n Object.getOwnPropertyNames( this._factories )\n .forEach( this._registerFactory.bind( this ) );\n\n this._propertyNames\n .forEach( this._registerProperty.bind( this ) );\n\n this._methodNames.forEach(\n this._registerMethod.bind( this ) );\n\n this._globalsRegistered = true;\n }", "title": "" }, { "docid": "32e32e6eff296f476f01317bd05f7093", "score": "0.48465604", "text": "function injectExtensions(req) {\n // ensure that req.locals.extensions exists\n merge(req, { locals: { extensions: {} } });\n\n return (result) => {\n const requested = get(req, 'body.extensions', {});\n // merge in all local extensions that were requested\n const extensions = pickBy(\n req.locals.extensions,\n (value, key) => key in requested,\n );\n return Object.keys(extensions).length ? merge(result, { extensions }) : result;\n };\n}", "title": "" }, { "docid": "364aa6f25aecdcef01577cae5bff0da5", "score": "0.48432758", "text": "function PossibleTypeExtensionsRule(context) {\n var schema = context.getSchema();\n var definedTypes = Object.create(null);\n\n for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {\n var def = _context$getDocument$2[_i2];\n\n if ((0, _predicates.isTypeDefinitionNode)(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension\n };\n\n function checkExtension(node) {\n var typeName = node.name.value;\n var defNode = definedTypes[typeName];\n var existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);\n var expectedKind;\n\n if (defNode) {\n expectedKind = defKindToExtKind[defNode.kind];\n } else if (existingType) {\n expectedKind = typeToExtKind(existingType);\n }\n\n if (expectedKind) {\n if (expectedKind !== node.kind) {\n var kindStr = extensionKindToTypeName(node.kind);\n context.reportError(new _GraphQLError.GraphQLError(\"Cannot extend non-\".concat(kindStr, \" type \\\"\").concat(typeName, \"\\\".\"), defNode ? [defNode, node] : node));\n }\n } else {\n var allTypeNames = Object.keys(definedTypes);\n\n if (schema) {\n allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap()));\n }\n\n var suggestedTypes = (0, _suggestionList.default)(typeName, allTypeNames);\n context.reportError(new _GraphQLError.GraphQLError(\"Cannot extend type \\\"\".concat(typeName, \"\\\" because it is not defined.\") + (0, _didYouMean.default)(suggestedTypes), node.name));\n }\n }\n}", "title": "" }, { "docid": "2d685c1dd347788d41d77400df197d0e", "score": "0.4837219", "text": "function extend( extension, obj ){\n for ( var key in extension ){\n obj[key] = extension[key];\n }\n }", "title": "" }, { "docid": "129e642427b22125e6a2406d4d7fd929", "score": "0.48361006", "text": "function parseTypeExtensionDefinition(parser) {\n var start = parser.token.start;\n expectKeyword(parser, 'extend');\n var definition = parseObjectTypeDefinition(parser);\n return {\n kind: _kinds.TYPE_EXTENSION_DEFINITION,\n definition: definition,\n loc: loc(parser, start)\n };\n}", "title": "" } ]
abd72fc0487b5285f0fb9faab85ed11b
Visiting from the program level to ensure we execute before other fullfile transforms, such as typescript, are executed.
[ { "docid": "16b6d9a90fb36cd7cbf9f5f5857f071e", "score": "0.49220842", "text": "Program(programPath) {\n\t\t\t\tprogramPath.traverse({\n\t\t\t\t\tClassDeclaration: visitClassDeclaration,\n\t\t\t\t})\n\t\t\t}", "title": "" } ]
[ { "docid": "0f277ed9e0f9f087272697a15c02715a", "score": "0.58459616", "text": "Program(node) {\n const scope = context.getScope(),\n features = context.parserOptions.ecmaFeatures || {};\n stack.push({\n init: true,\n node,\n valid: !(scope.isStrict || node.sourceType === \"module\" || features.globalReturn && scope.childScopes[0].isStrict)\n });\n }", "title": "" }, { "docid": "cb4b2693074b84809cd5561cd6885fcd", "score": "0.549073", "text": "function preEvaluator() {\n return true;\n }", "title": "" }, { "docid": "cb4b2693074b84809cd5561cd6885fcd", "score": "0.549073", "text": "function preEvaluator() {\n return true;\n }", "title": "" }, { "docid": "2c6283ad491d46dbeb4803f22aedb669", "score": "0.54074126", "text": "function topLevelCode() {\n\n return {\n interpret: function () {\n switch (tokens[0]) {\n case \"HAI\":\n version = tokens[++t];\n console.log(\"Program started! version: \" + version + '\\n');\n return false;\n\n case \"KTHXBYE\":\n process.exit();\n break;\n\n case \"VISIBLE\":\n\n while (tokens[t + 1] != '!') {\n //if(t <= (tokens.length )) break;\n\n var msg = evalExpr();\n\n process.stdout.write(msg.toYarn().val);\n if (t >= (tokens.length - 1)) break;\n\n }\n\n if (tokens[t + 1] != '!') process.stdout.write('\\n');\n t++;\n return false;\n case \"GIMMEH\":\n t++;\n var idf = identify(tokens.slice(1));\n\n\n vars.setSlot(idf, new Yarn(prompt()))\n t = global.idfIdx;\n return false;\n case \"CAN HAS\":\n t = 1;\n var name = tokens[1];\n try {\n vars.val[name] = require(\"../ext/\" + name)\n }\n catch (e) {console.log(e);throw new Maus(\"NO HAS \" + name, 501)}\n t=2;\n return false;\n case \"HOW IZ\":\n t++;\n var func = new FunctionDeclaraition()\n\n if (tokens[1] == \"I\" && !defContext.length) {\n func.global = true;\n t++;\n }\n else {\n func.idf = identify(tokens.slice(1));\n t = global.idfIdx + 1;\n\n }\n var name = tokens[t];\n\n validate(name, true);\n func.name = name;\n\n t++;\n\n while (t < tokens.length - 1) {\n if (func.args.length) expect(\"AN\");\n expect(\"YR\");\n var arg = tokens[t];\n validate(arg);\n if (func.args.includes(arg)) throw new Maus(\"GOT ALREADY \" + arg, 209);\n func.args.push(arg);\n t++;\n }\n func.length = func.args.length;\n layers.unshift(func);\n\n return false;\n case \"FOUND YR\":\n if (stack.length) {\n returnVal = evalExpr();\n return false;\n }\n throw new Maus(\"FOUND YR, WTF?\", 202);\n\n case \"GTFO\":\n if (this.isLoop) {\n loopBreak = true;\n return false;\n }\n\n if (stack.length) {\n returnVal = new Noob();\n return false;\n }\n throw new Maus(\"GTFO, WTF?\", 202);\n\n case \"O RLY?\":\n\n layers.unshift(new IfLayer(vars.val.IT.toTroof().val));\n return false;\n\n case \"WTF?\":\n layers.unshift(new SwitchLayer(vars.val.IT));\n return false;\n\n case \"IM IN YR\":\n var label = tokens[1];\n if (!label) throw new Maus(\"IM IN YR WHAT\", 213);\n t = 1;\n layers.unshift(new LoopLayer(label));\n\n if (tokens.length < 3) return false;\n\n t = 3;\n layers[0].count = true;\n if (tokens[2] === \"UPPIN\") layers[0].by = 1;\n else if (tokens[2] === \"NERFIN\") layers[0].b = -1;\n else throw new Maus(\"SHALL I UPPIN OR NERFIN?\", 214);\n expect(\"YR\");\n t = 4;\n var counter = tokens[4];\n validate(counter);\n layers[0].counter = counter;\n\n if (tokens.length < 6) return false;\n\n t = 5\n layers[0].conditional = true;\n if (tokens[5] === \"TIL\") layers[0].condition = true;\n else if (tokens[5] === \"WILE\") layers[0].condition = false;\n else throw new Maus(\"TIL OR WILE?\", 215);\n layers[0].expression = tokens.slice(6);\n t = tokens.length;\n\n if (global.extErr) {\n layers[0].metahead.textline = global.textline;\n layers[0].metahead.tokensPos = global.tokensPos.slice(6);\n }\n return false;\n\n case \"O HAI IM\":\n\n t = 1;\n var name = tokens[1];\n validate(name);\n global.defContext.unshift(name)\n vars.val[name] = new Bukkit();\n layers.unshift(new BukkitLayer());\n return false;\n\n\n\n }\n\n var idf = identify(tokens);\n\n if (global.idfIdx < tokens.length) {\n //t=global.idfIdx;\n switch (tokens[global.idfIdx]) {\n\n case \"HAS A\":\n\n t = global.idfIdx;\n var name = identify(tokens.slice(++t))[0];\n\n t = global.idfIdx + 1;\n validate(name);\n\n\n\n if (tokens[t + 1] == \"ITZ\") {\n t++;\n var val = evalExpr();\n }\n else if (tokens[t + 1] == \"ITZ A\") {\n t += 2;\n var val = cast(new Noob(), tokens[t]);\n t++;\n\n }\n else if (tokens[t + 1] == \"ITZ LIEK A\") {\n t++;\n var v = evalExpr();\n if (!(v instanceof Bukkit)) throw new Maus(\"IZ LIEK BUKKIT\", 216)\n var val = v;\n }\n else { var val = new Noob(); }\n\n\n idf.push(name);\n global.vars.setSlot(idf, val, true);\n return false;\n\n case \"R\":\n t = global.idfIdx;\n //var name = identify(tokens.slice(++t));\n\n global.vars.setSlot(idf, evalExpr());\n return false;\n\n case \"IS NOW A\":\n t = global.idfIdx;\n\n var to = cast(global.vars.getSlot(idf), tokens[++t]);\n //var name = identify(tokens.slice(++t));\n\n t = 2;\n global.vars.setSlot(idf, to);\n return false;\n\n }\n\n }\n\n\n t = -1;\n global.vars.val.IT = evalExpr();\n\n\n },\n isFunction: false\n }\n}", "title": "" }, { "docid": "3f078ac4023979f892f117633c5df93e", "score": "0.5352166", "text": "function test_ts_compiler (file, type) {\n console.log(\" \");\n console.log(\"1- Test_ts_compiler \");\n console.log(\" \");\n exec(\"gulp Test-ts-compiler\", function (error, stdout, stderr) {\n console.log(stdout);\n if (error !== null) {\n console.log('exec error: ' + error);\n }\n\n fs.readFile(file, function (error) {\n if (error !== null) {\n console.log(\"Error: File doesn't exist.\");\n } else {\n console.log(\"SUCESS: File has been successfully read: \" + file);\n if (type === \"normal\") //Issued on the first call\n test_less_css(\"normal\");\n else if (type === \"new file\") //Issued from the test_ts_watcher on new file, means it should inject the new js into index.html\n test_js_injector(\"newfile.js\");\n else if (type === \"change file\") { } //Issued from the test_ts_watcher on file change, so it shouldn't continue to the next function\n }\n });\n });\n }", "title": "" }, { "docid": "ee272c603503e5a44762b7ee387189c7", "score": "0.5261606", "text": "prewalkStatements(statements) {\n\t\tfor (let index = 0, len = statements.length; index < len; index++) {\n\t\t\tconst statement = statements[index];\n\t\t\tthis.prewalkStatement(statement);\n\t\t}\n\t}", "title": "" }, { "docid": "cbb477f7b2e601211b0d7f2bd7d39771", "score": "0.52346045", "text": "blockPrewalkStatements(statements) {\n\t\tfor (let index = 0, len = statements.length; index < len; index++) {\n\t\t\tconst statement = statements[index];\n\t\t\tthis.blockPrewalkStatement(statement);\n\t\t}\n\t}", "title": "" }, { "docid": "3bed709de5a5b678152765abf1d0546c", "score": "0.5207349", "text": "prewalkStatements(statements) {\n\t\tfor(let index = 0, len = statements.length; index < len; index++) {\n\t\t\tconst statement = statements[index];\n\t\t\tthis.prewalkStatement(statement);\n\t\t}\n\t}", "title": "" }, { "docid": "2c98854d2d691b4a9961fef39a7fd29e", "score": "0.51466435", "text": "async before () {}", "title": "" }, { "docid": "4a579b9ed448b986f65c779f54668bf7", "score": "0.51408505", "text": "function main(parse, transform, build, esprima) {\n var pagesConfig = parse.findConfig(fs.readFileSync(PAGES_PROFILE, 'utf8')).config;\n\n // Pre-process the config with correct directory paths, so that this script can be run from anywhere.\n pagesConfig.baseUrl = SPLUNK_JS;\n pagesConfig.dir = TMP_DIR;\n pagesConfig.mainConfigFile = path.join(SPLUNK_JS, 'profiles', pagesConfig.mainConfigFile);\n pagesConfig.waitSeconds = 0; // Disable load timeout\n\n // For the common module, the run-time configuration needs to include a deep list of dependencies,\n // in order to avoid prevent require from trying to fetch one of those files individually.\n var commonModule = build.findBuildModule(COMMON_MODULE_NAME, pagesConfig.modules);\n expandModuleDependencies(commonModule, pagesConfig, parse, esprima, function() {\n try {\n var requireModule = build.findBuildModule(REQUIRE_MODULE_NAME, pagesConfig.modules);\n // Now that the common module dependencies are expanded, convert all modules that need to be available at runtime\n // into a `bundle` configuration that is appended to the require bootstrapping module.\n addBundlesToRequireModule(requireModule, pagesConfig.modules, transform);\n // Add all of the page-specific modules to the current configuration.\n appendPageModules(pagesConfig.modules);\n }\n catch(e) {\n console.log(e);\n process.exit(1);\n }\n // Now that all of the dynamic configuration is complete, hand things off to the r.js optimizer.\n console.log('Running the r.js optimizer, this may take a few minutes...');\n console.log('Temporary build files will be written to: ' + TMP_DIR);\n console.log('\\r\\n');\n\n var cleanup = function() {\n console.log('Removing the temporary build directory...');\n rmdirRecursiveSync(TMP_DIR);\n };\n\n requirejs.optimize(\n pagesConfig,\n function(output) {\n console.log(output);\n try {\n console.log('Copying build files back to the source tree...');\n pagesConfig.modules.forEach(function(module) {\n var modulePath = module.name.replace(/\\//g, path.sep);\n var destPath = path.join(JS_BUILD, modulePath + '.js');\n console.log(' ' + destPath);\n fs.writeFileSync(destPath, fs.readFileSync(path.join(TMP_DIR, modulePath + '.js'), 'utf8'), 'utf8');\n });\n cleanup();\n console.log('Done.');\n }\n catch(e) {\n console.log(e);\n cleanup();\n process.exit(1);\n }\n },\n function(err) {\n console.log(err);\n cleanup();\n process.exit(1);\n }\n );\n });\n}", "title": "" }, { "docid": "ce2fa33b56f5186241b55946ab94033f", "score": "0.51336384", "text": "preVisit(node, params) {\n // default empty\n }", "title": "" }, { "docid": "4f9f4a1bbf90e5ea5ad50e21562cdecc", "score": "0.5081406", "text": "function runPass(pass) {\n pass(ast, options);\n }", "title": "" }, { "docid": "81a0723e58f199b78da2b685b541f583", "score": "0.5064882", "text": "function program() {\n var r;\n\n if (debug)\n console.log(\"-- parser: program --\");\n\n r = block();\n check_next_keyword(\".\");\n\n return r;\n }", "title": "" }, { "docid": "490ab4176b50089b07f66d41ecd1f372", "score": "0.5054553", "text": "beforeProcessNodes() {}", "title": "" }, { "docid": "6ea15f0cd84ac3d7919e378ae28368d9", "score": "0.5042525", "text": "visitProgram(node) { \n return {\n type: 'program',\n nodes: this.visitNodes(node.body)\n } \n }", "title": "" }, { "docid": "e5ca832ff4f233e7f64ae14e10e2ee2b", "score": "0.5036932", "text": "function runPass(pass) {\n pass(ast, options);\n }", "title": "" }, { "docid": "228fe2895428b82b5a4a353da91b005a", "score": "0.5032271", "text": "function beforeHoisting(){\n if (true){\n // do something here\n }\n var x = 1;\n console.log(x);\n}", "title": "" }, { "docid": "ba60c374a2509f83f0f075a5b78daea0", "score": "0.49972218", "text": "function assertNonErrorsBecomeEarly(code) {\n assertThrows(\"'use strong'; \" + prologue_dead + code + epilogue_dead,\n ReferenceError);\n assertDoesNotThrow(\"'use strict'; \" + prologue_dead + code + epilogue_dead);\n\n assertThrows(\"'use strong'; \" + prologue_live + code + epilogue_live,\n ReferenceError);\n assertDoesNotThrow(\"'use strict'; \" + prologue_live + code + epilogue_live,\n ReferenceError);\n}", "title": "" }, { "docid": "e3c6115869c0a5119fa949724923b037", "score": "0.49865335", "text": "function Main() {\n\n}", "title": "" }, { "docid": "f8a4214b2896595f88aba0020cb53d90", "score": "0.49823877", "text": "function step() {\n\t\tvar f = script.shift();\n\t\tif(f) {\n\t\t\tf(stack, step);\n\t\t}\n\t\telse {\n\t\t\tconsole.log('evaluation ended: ', stack);\n\t\t}\n\t}", "title": "" }, { "docid": "211f47f33971371959b33c12b41363a8", "score": "0.49618915", "text": "process() {\n\n\t}", "title": "" }, { "docid": "5c198d282c384b5602b125319eb93f01", "score": "0.4933873", "text": "function main() {\n // Do nothing\n}", "title": "" }, { "docid": "4bf584338b8e42a4f4d815d92dd31eb0", "score": "0.4914292", "text": "function RunCode() {}", "title": "" }, { "docid": "1328c93dc29f854a0b108c35c8fb2121", "score": "0.48934394", "text": "function run(transformFn, script) {\n\t var scriptEl = document.createElement('script');\n\t scriptEl.text = transformCode(transformFn, script);\n\t headEl.appendChild(scriptEl);\n\t}", "title": "" }, { "docid": "49169947bc6cae110efb7b75e694d2a2", "score": "0.48933902", "text": "function c(e,t){if(\"function\"!=typeof t)throw new Error(\"Cannot `\"+e+\"` without `Compiler`\")}", "title": "" }, { "docid": "3833a26a360ee648ebf7889dec25bf75", "score": "0.48869392", "text": "Program() {\n this.featureFlagIfStatements = [];\n this.featureFlags = this.opts.featureFlags || defaultFeatureFlags;\n this.importDeclarationScope = [];\n }", "title": "" }, { "docid": "260ca2d549de8823f9f96874f95ce1fa", "score": "0.48482126", "text": "function main() {\n void iWasNeverDeclared;\n}", "title": "" }, { "docid": "c8eb13277c443e55ecfbdc4d32776610", "score": "0.48462373", "text": "function Main()\n {\n \n }", "title": "" }, { "docid": "682675a9c73f3e7dc4dcd6bb21b2b3a8", "score": "0.4811278", "text": "function doRun() {\n // run may have just been called through dependencies being fulfilled just in this very frame,\n // or while the async setStatus time below was happening\n if (calledRun) return;\n calledRun = true;\n Module['calledRun'] = true;\n\n if (ABORT) return;\n\n initRuntime();\n\n preMain();\n\n readyPromiseResolve(Module);\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "650f6716197d23d9939826306fa5d84d", "score": "0.47994605", "text": "enterCompileUnit(ctx) {\n // initialize the stack\n this.stack = [];\n }", "title": "" }, { "docid": "48870e2d17d482b9a62abecb14e2d044", "score": "0.47951084", "text": "function main() {\n\n var existingFcts = saveStateOfGlobals();\n var include = existingFcts.include;\n var exportModule = existingFcts.exportModule;\n\n // If neither 'include' nor 'exportModule' exist, get module-loader to define them.\n if (!include && !exportModule) {\n\n var mlExports = moduleLoader();\n\n include = mlExports.include;\n exportModule = mlExports.exportModule;\n\n } else if (!include) {\n console.error('\\'exportModule\\' is defined, but not \\'include\\'. You might have a problem with Module Loader.');\n } else if (!exportModule) {\n console.error('\\'include\\' is defined, but not \\'exportModule\\'. You might have a problem with Module Loader.');\n }\n\n\n // Executes the code resulting from the execution of MRCompile. This is what exports\n // all the Lynx goodies.\n compiledContent(include, exportModule);\n\n // From the content, define what is exported publicly.\n defineExports(include, exportModule);\n\n // Return the window/global object in the state it was before we executed module-loader.\n restoreStateOfGlobals();\n }", "title": "" }, { "docid": "67a99d623376196614293a4c086b25b6", "score": "0.47950765", "text": "_checkPipes(ast,sourceSpan){if(ast&&this.pipesByName){const collector=new PipeCollector();ast.visit(collector);collector.pipes.forEach((ast,pipeName)=>{const pipeMeta=this.pipesByName.get(pipeName);if(!pipeMeta){this._reportError(`The pipe '${pipeName}' could not be found`,new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start),sourceSpan.start.moveBy(ast.span.end)));}else{this._usedPipes.set(pipeName,pipeMeta);}});}}", "title": "" }, { "docid": "3c236641a3a12983a8b95324cdf2c9f4", "score": "0.47911948", "text": "function doRun() {\n // run may have just been called through dependencies being fulfilled just in this very frame,\n // or while the async setStatus time below was happening\n if (calledRun) return;\n calledRun = true;\n\n if (ABORT) return;\n\n initRuntime();\n\n preMain();\n\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "3c236641a3a12983a8b95324cdf2c9f4", "score": "0.47911948", "text": "function doRun() {\n // run may have just been called through dependencies being fulfilled just in this very frame,\n // or while the async setStatus time below was happening\n if (calledRun) return;\n calledRun = true;\n\n if (ABORT) return;\n\n initRuntime();\n\n preMain();\n\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "681cfebdfde6d0a576face3b41f23f81", "score": "0.47815704", "text": "function doRun() {\n // run may have just been called through dependencies being fulfilled just in this very frame,\n // or while the async setStatus time below was happening\n if (calledRun) return;\n calledRun = true;\n Module['calledRun'] = true;\n\n if (ABORT) return;\n\n initRuntime();\n\n preMain();\n\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "d5543328784712b8c5a32c8a5c157df7", "score": "0.47757784", "text": "runPreinstallTopLevelLifecycles (cb) { cb() }", "title": "" }, { "docid": "d5543328784712b8c5a32c8a5c157df7", "score": "0.47757784", "text": "runPreinstallTopLevelLifecycles (cb) { cb() }", "title": "" }, { "docid": "56e0c3e737f873c129658b1f23132bca", "score": "0.47744766", "text": "function scriptLoadHandler() {\n main();\n }", "title": "" }, { "docid": "91fbddd33ac52b2e11dd4fd43cbc3962", "score": "0.4768569", "text": "function main() {\n // ... YOUR CODE HERE\n}", "title": "" }, { "docid": "179ba0429f28e0d8544f877213274781", "score": "0.47643423", "text": "function doRun() {\r\n // run may have just been called through dependencies being fulfilled just in this very frame,\r\n // or while the async setStatus time below was happening\r\n if (calledRun) return;\r\n calledRun = true;\r\n Module['calledRun'] = true;\r\n\r\n if (ABORT) return;\r\n\r\n initRuntime();\r\n\r\n preMain();\r\n\r\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\r\n\r\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\r\n\r\n postRun();\r\n }", "title": "" }, { "docid": "b0571c1de32467a28bdf1ebada85bcf4", "score": "0.47593835", "text": "_prependPass(fn, ...args) {\n if (typeof fn !== 'function') {\n throw new Error('not available type');\n }\n\n this.prependStack.push(fn);\n this.prependStackArgs.push(args);\n this.prependStackWaitType.push(false);\n return this.sandbox;\n }", "title": "" }, { "docid": "de9aa57bcc9cc4b08781b17b54494637", "score": "0.4758377", "text": "function traverse_code(old_source: string) {\n let ast = parse(old_source, {ranges: true, locations: true});\n let replace_table: ReplaceItem[] = [{range: [0, 0], str: preload}];\n let trace_table: TraceItem[] = [];\n\n // CallExpression\n function handle_call(node: any, state: Object, c: Function) {\n let reserved_fun = ['null', '__rfjs_res', '__rfjs_null', 'undefined'];\n let fun_name =\n old_source.substring(node.callee.range[0], node.callee.range[1]);\n if (fun_name == 'requires') {\n let r1 = {range: node.callee.range, str: 'if(!'};\n let r2 = {range: [node.end, node.end], str: ') return __rfjs_null()'};\n replace_table.push(r1, r2);\n } else if (fun_name == 'ensures') {\n trace_table.push({line: node.loc.start.line, type: TraceType.ENSURES});\n let r1 = {range: node.callee.range, str: 'if(!('};\n let r2 = {\n range: [node.end, node.end],\n str: ')(r)) try {null();}catch(ex){};'\n };\n replace_table.push(r1, r2);\n } else if (fun_name == 'assert') {\n trace_table.push({line: node.loc.start.line, type: TraceType.ASSERTION});\n let r1 = {range: node.callee.range, str: '(function(){if(!('};\n let r2 = {\n range: [node.end, node.end],\n str: ')) {try {null();}catch(ex){};}})()'\n };\n replace_table.push(r1, r2);\n } else if (reserved_fun.filter(e => e == fun_name).length == 0) {\n trace_table.push({line: node.loc.start.line, type: TraceType.CALL});\n let args = node.arguments.length;\n let sensitivity = [];\n if (fun_name && args > 0) {\n for (let i = 1; i <= args; i++) {\n sensitivity.push(\n 'TAJS_makeContextSensitive(' + fun_name + ',' + i + ')');\n }\n }\n let r1 = {\n range: [node.range[0], node.range[0]],\n str: '__rfjs_wrap(' + sensitivity.join(',') + ')('\n };\n let r2 = {range: [node.end, node.end], str: ')()'};\n replace_table.push(r1, r2);\n }\n\n // recursive\n if (node.callee) c(node.callee, state);\n if (node.arguments) {\n node.arguments.forEach((e: Node) => {\n c(e, state);\n });\n }\n }\n\n // FunctionExpression FunctionDeclaration ArrowFunctionExpression\n function handle_fun(node: any, state: Object, c: Function) {\n // judge if an expression is a specification\n function is_spec(spec: string) {\n return function(expr: any) {\n if (expr && expr.type == 'ExpressionStatement') {\n let call_expr = expr.expression;\n if (call_expr && call_expr.type == 'CallExpression') {\n let first_fun = call_expr.callee.name;\n if (first_fun == spec) {\n return true;\n }\n }\n }\n return false;\n };\n }\n let is_requires = is_spec('requires');\n let is_ensures = is_spec('ensures');\n\n // judge if it is a function with specifications\n let exprs = node.body.body;\n let len = exprs.length;\n\n let requires_i = 0, ensures_i = len - 1;\n while (requires_i < len && is_requires(exprs[requires_i])) requires_i++;\n while (ensures_i >= 0 && is_ensures(exprs[ensures_i])) ensures_i--;\n\n if (requires_i != 0 || ensures_i != len - 1) {\n let main_start =\n requires_i == len ? exprs[len - 1].end : exprs[requires_i].start;\n let main_end = ensures_i == -1 ? exprs[0].start : exprs[ensures_i].end;\n\n if (main_start == main_end) {\n let r1 = {\n range: [node.end - 1, node.end - 1],\n str: 'return __rfjs_res(undefined);'\n };\n replace_table.push(r1);\n } else {\n let r1 = {\n range: [node.end - 1, node.end - 1],\n str: 'return __rfjs_res(r);'\n };\n let r2 = {range: [main_start, main_start], str: 'var r = (function(){'};\n let r3 = {range: [main_end, main_end], str: '})();'};\n replace_table.push(r1, r2, r3);\n }\n }\n\n // let args = node.params.length;\n // let fun_name = node.id ? node.id.name : undefined;\n // let sensitivity = '';\n // if (fun_name && args > 0) {\n // for (let i = 1; i <= args; i++) {\n // sensitivity += 'TAJS_makeContextSensitive(' + fun_name + ',' + i +\n // ');';\n // }\n // replace_table.push({range: [node.end, node.end], str: sensitivity});\n // }\n\n // recursive\n if (node.id) c(node.id, state);\n if (node.body) c(node.body, state);\n if (node.params) {\n node.params.forEach((e: Node) => c(e, state));\n }\n }\n\n walk.recursive(ast, {}, {\n CallExpression: handle_call,\n FunctionDeclaration: handle_fun,\n FunctionExpression: handle_fun,\n ArrowFunctionExpression: handle_fun\n });\n\n return {\n replace_table: replace_table.sort((a, b) => a.range[0] - b.range[0]),\n trace_table: trace_table\n };\n}", "title": "" }, { "docid": "5e71a110fdc58fc706ce862508ddfc74", "score": "0.4757657", "text": "function someRunner(anyFunction){ console.log(2+2); anyFunction(); }", "title": "" }, { "docid": "e48bb12563dc39564e64d7904a7392d7", "score": "0.47564834", "text": "function Main() {}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "937d8913bc8988fa5d1597516bfb8aac", "score": "0.47508734", "text": "function addPreRun(func) {\n if (!Module['preRun']) Module['preRun'] = [];\n else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n Module['preRun'].push(func);\n}", "title": "" }, { "docid": "abecf6fdc08c2e29f535738472c70fd5", "score": "0.47502103", "text": "function preOrder(rootNode) {\n\tif (rootNode == null) {\n\t\treturn\n\t}\n\tif (getChildPrograms(baseProgram).includes(rootNode)) {\n\t\tsubtreeTotalWeight = 0\n\t}\n\tif (getChildPrograms(rootNode)) {\n\t\tvar childNodes = getChildPrograms(rootNode)\n\t\tchildNodes.forEach(function(element, index){\n\t\t\tpreOrder(element)\n\t\t})\n\t}\n}", "title": "" }, { "docid": "09fbc0d2adc5d1c214078abd3177a0d4", "score": "0.47443625", "text": "function main() {\n let args = loadArgs()\n if(args.help) showHelp()\n else begin(args)\n}", "title": "" }, { "docid": "ac3e3213acd821fe4fc17810dc378f35", "score": "0.47390455", "text": "function main(){\n\t\n}", "title": "" }, { "docid": "602a4284d6ccc00e9f638728ad56273c", "score": "0.4737301", "text": "function BeforeStart(){return}", "title": "" }, { "docid": "602a4284d6ccc00e9f638728ad56273c", "score": "0.4737301", "text": "function BeforeStart(){return}", "title": "" }, { "docid": "602a4284d6ccc00e9f638728ad56273c", "score": "0.4737301", "text": "function BeforeStart(){return}", "title": "" }, { "docid": "602a4284d6ccc00e9f638728ad56273c", "score": "0.4737301", "text": "function BeforeStart(){return}", "title": "" }, { "docid": "b9dc162a7e6321b52913155f33e53a27", "score": "0.47272322", "text": "CallExpression(node, parent) {\n this.baseVisit(node);\n\n if (_core.types.isIdentifier(node.callee) && node.callee.name === 'require') {\n // It looks like a module import …\n const scopeId = this.scope.whereIsDeclared(node.callee);\n\n if (scopeId && scopeId !== 'global') {\n // … but it is just a user defined function\n return;\n }\n\n const [firstArg] = node.arguments;\n\n if (!_core.types.isStringLiteral(firstArg)) {\n // dynamic import? Maybe someday we can do something about it\n return;\n }\n\n const {\n value: source\n } = firstArg;\n const declared = this.meta.get('declared');\n\n if (!declared) {\n // This is a standalone `require`\n return;\n } // Define all declared variables as external dependencies.\n\n\n declared.forEach(([local, _imported]) => // FIXME: var slugify = require('../slugify').default;\n {\n if (!this.graph.imports.has(source)) {\n this.graph.imports.set(source, []);\n }\n\n if (parent && _core.types.isMemberExpression(parent) && _core.types.isIdentifier(parent.property)) {\n // An imported function is specified right here.\n // eg. require('../slugify').default\n this.graph.imports.get(source).push(parent.property);\n } else {\n if (_core.types.isCallExpression(parent) && _core.types.isIdentifier(parent.callee) && typeof parent.callee.name === 'string') {\n if (parent.callee.name.startsWith('_interopRequireDefault')) {\n this.graph.importTypes.set(source, 'default');\n } else if (parent.callee.name.startsWith('_interopRequireWildcard')) {\n this.graph.importTypes.set(source, 'wildcard');\n } else {// What I've missed?\n }\n } // The whole namespace was imported. We will know later, what exactly we need.\n // eg. const slugify = require('../slugify');\n\n\n this.graph.importAliases.set(local, source);\n }\n });\n return;\n }\n\n sideEffects.forEach(([conditions, callback]) => {\n if (conditions.callee && !conditions.callee(node.callee) || conditions.arguments && !conditions.arguments(node.arguments)) {\n return;\n }\n\n return callback(node, this);\n });\n getAffectedNodes(node, this).forEach(affectedNode => {\n this.graph.addEdge(affectedNode, node);\n\n if (_core.types.isIdentifier(affectedNode)) {\n this.graph.addEdge(this.scope.getDeclaration(affectedNode), affectedNode);\n }\n });\n }", "title": "" }, { "docid": "1b90e743e091602eb44561011b2d5053", "score": "0.4723306", "text": "execute(pc) {\t\n\t// Assume we'll proceed to the next line\n\tlet nextLine = pc + 1;\n\t// Tokenize, skipping leading/trailing space\n\tlet tokens = this.program[pc].split(/\\s+/).filter( (str) => str != \"\");\n\tif(tokens.length == 0) {\n\t return nextLine;\n\t}\n\tlet truthyExpression = []\n\t// First token defines what is to be done\n\tswitch(tokens[0]) {\n\tcase \"RUF?\":\n\t // \"if\" expression, we'll be lenient on a missing \"then\" (VUH)\n\t if(tokens[tokens.length-1] === \"VUH\") {\n\t\ttruthyExpression = tokens.slice(1, tokens.length-1);\n\t } else {\n\t\ttruthyExpression = tokens.slice(1, tokens.length);\n\t }\n\t if(!this.evaluate(truthyExpression)) {\n\t\t// If false, skip up to and including the next \"ROWH\" or \"ARRUF\"\n\t\t// (doesn't support nesting :( )\n\t\tnextLine = this.skipAhead(pc, [\"ROWH\",\"ARRUF\"]);\n\t }\n\t break\n\tcase \"ROWH\":\n\t // If we execute into an else, we are surely in the \"true\" branch,\n\t // so we'll just skip until the ARRUF\n\t nextLine = this.skipAhead(pc, [\"ARRUF\"]);\n\t break;\n\tcase \"ARRUF\":\n\t // endif, basically a no-op. If we're running we are either in the true branch \n\t // of an else-less if, or in the false branch. Either way, keep clam and carry on.\n\t break;\n\n\tcase \"GRRR\":\n\t // A while-loop?\n\t // Go ahead if condition is true, else skip past loop end\t \n\t truthyExpression = tokens.slice(1, tokens.length-1);\n\t if(!this.evaluate(truthyExpression)) {\n\t\tnextLine = this.skipAhead(pc, [\"BORF\"]);\n\t }\n\t break;\n\tcase \"BORF\":\n\t // End of while loop, go back to top. \n\t nextLine = this.jumpBack(pc, [\"GRRR\"]);\n\t break;\n\n\tdefault:\n\t // Not recognized as a reserved word, i.e. we have an identifier or a literal,\n\t // in which case we bounce off to the expression evaluator\n\t this.state.returnValue = this.evaluate(tokens);\n\t break;\n\t}\n\treturn nextLine;\n }", "title": "" }, { "docid": "0f775b76eb1828bc68d4557d985bdda5", "score": "0.47204074", "text": "function Main() {\n\n }", "title": "" }, { "docid": "e0260d9d38ed82c74a9b28eabcd2d80e", "score": "0.47174108", "text": "beforeEnter(to, from, next) {\n permissionRequired(3, next);\n }", "title": "" }, { "docid": "d2055c39eb49b97ba4aef85f9ce3d195", "score": "0.47148338", "text": "needsTemporary(ast){const visit=(visitor,ast)=>{return ast&&(this._nodeMap.get(ast)||ast).visit(visitor);};const visitSome=(visitor,ast)=>{return ast.some(ast=>visit(visitor,ast));};return ast.visit({visitBinary(ast){return visit(this,ast.left)||visit(this,ast.right);},visitChain(ast){return false;},visitConditional(ast){return visit(this,ast.condition)||visit(this,ast.trueExp)||visit(this,ast.falseExp);},visitFunctionCall(ast){return true;},visitImplicitReceiver(ast){return false;},visitInterpolation(ast){return visitSome(this,ast.expressions);},visitKeyedRead(ast){return false;},visitKeyedWrite(ast){return false;},visitLiteralArray(ast){return true;},visitLiteralMap(ast){return true;},visitLiteralPrimitive(ast){return false;},visitMethodCall(ast){return true;},visitPipe(ast){return true;},visitPrefixNot(ast){return visit(this,ast.expression);},visitNonNullAssert(ast){return visit(this,ast.expression);},visitPropertyRead(ast){return false;},visitPropertyWrite(ast){return false;},visitQuote(ast){return false;},visitSafeMethodCall(ast){return true;},visitSafePropertyRead(ast){return false;}});}", "title": "" }, { "docid": "e320ac487bef7530833bd7974a3fa268", "score": "0.47131157", "text": "perform(parsing_process, sc_event) {\n return this.doPreaction(parsing_process, sc_event);\n }", "title": "" }, { "docid": "4b39fde0c243941d43a12a0de061a1e8", "score": "0.47038835", "text": "run() {\n const data = this.editor.getValue();\n let arr;\n let cont = false;\n if (data !== this.raw) {\n cont = confirm(`Current script has not been compiled. Compile first?`);\n if (cont) {\n this.compile();\n }\n }\n arr = this.prepare();\n mse.console.print(`Started running compiled sequence...`);\n gui.overlay(true);\n gui.spinner(true, `Running mscript sequence...`, true, true);\n return seq.exec(arr, 1);\n }", "title": "" }, { "docid": "3347bca01d2e8948c2e1da95a1bae2cf", "score": "0.47021845", "text": "function doRun() {\n if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening\n Module['calledRun'] = true;\n\n if (ABORT) return;\n\n ensureInitRuntime();\n\n preMain();\n\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "3347bca01d2e8948c2e1da95a1bae2cf", "score": "0.47021845", "text": "function doRun() {\n if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening\n Module['calledRun'] = true;\n\n if (ABORT) return;\n\n ensureInitRuntime();\n\n preMain();\n\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "e52aebdd44647e32785b08175a260fb5", "score": "0.46984345", "text": "function doRun() {\n if (Module[\"calledRun\"]) return; // run may have just been called while the async setStatus time below was happening\n Module[\"calledRun\"] = true;\n\n if (ABORT) return;\n\n ensureInitRuntime();\n\n preMain();\n\n if (Module[\"onRuntimeInitialized\"]) Module[\"onRuntimeInitialized\"]();\n\n assert(\n !Module[\"_main\"],\n 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]'\n );\n\n postRun();\n }", "title": "" }, { "docid": "fffcb60a0a4e1fdfb4733d2e1c066890", "score": "0.46972185", "text": "function doRun() {\n if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening\n Module['calledRun'] = true;\n\n if (ABORT) return;\n\n ensureInitRuntime();\n\n preMain();\n\n if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {\n Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms');\n }\n\n if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n postRun();\n }", "title": "" }, { "docid": "be7e2e42c2deae0ef9271f7d20c71a70", "score": "0.46861726", "text": "function main(){\n // Check the input is not empty\n if(checkInput.inputExists() == false){\n return\n }\n\n // Initialize the problem values\n setUp.setUp();\n\n // Check that the problem values are correct (e.g. there's no errors in the input)\n if(checkInput.checkInput() == false){\n return\n }\n\n // Perform the core functionality of the problem\n robotMovement.robotMovement();\n\n //Print on the console window the input and the output\n printFormat.printInput();\n printFormat.printOutput();\n\n // Calculate extra information about the problem\n calcAnalytics.calcSurface();\n\n // Store the expedition data into the database for persistance\n storeExpedition.storeExpedition();\n\n // Calculate insights from all the expeditions up until the current one\n calcAnalytics.calcInsights();\n \n}", "title": "" }, { "docid": "ea16ff8e85a698fc91761c9f609f1f04", "score": "0.46833897", "text": "function bam() {\n\t\tassert.step(\"yep\");\n\n\t\tuseEffect(function nope(){\n\t\t\tassert.step(\"nope 2\");\n\t\t});\n\n\t\treturn \"nope 1\";\n\t}", "title": "" }, { "docid": "26812d00390e40c9e7e40c98b82b3a59", "score": "0.4678886", "text": "function main() {\n // Set up an event listener to catch scripting messages which are sent prior\n // to the PDFViewer being created.\n window.addEventListener('message', handleScriptingMessage, false);\n HTMLImports.whenReady(() => {\n let chain = createBrowserApi();\n\n // Content settings may not be present in test environments.\n if (chrome.contentSettings) {\n chain = chain.then(configureJavaScriptContentSetting);\n }\n\n chain = chain.then(initViewer);\n });\n}", "title": "" }, { "docid": "a7140188c7c8a858da428d9c9331e3c4", "score": "0.467707", "text": "function prewStep(step){\n console.log(\"prewStep\")\n }", "title": "" }, { "docid": "9ac658ab6bda982d3cd191ba50b1b1df", "score": "0.46701163", "text": "function FirstRun() {\n}", "title": "" }, { "docid": "a862031ec493668744339cbd9b875507", "score": "0.4664183", "text": "function checkPreConditions() {\n // to work with an map there must be an map\n checkMapExists();\n }", "title": "" }, { "docid": "f2820d628a9aa92d1c11fe93e04bf5fe", "score": "0.46636525", "text": "test (targets, argv) {\n targets.forEach(processing.validate);\n }", "title": "" }, { "docid": "969a98afb5de0a823629a65115133d83", "score": "0.46494922", "text": "function main(){\n}", "title": "" }, { "docid": "0dc66c47cb20f8383af8e6bccb5a43fa", "score": "0.46487492", "text": "function processEarly(vtx) {\n console.log(\"processed vertex \", vtx);\n }", "title": "" }, { "docid": "d6f6e0cd8d61307091651e7ca7fafbb6", "score": "0.46466362", "text": "forceContextualFirstOutput() {\n for (const role in Output.ROLE_INFO_) {\n Output.ROLE_INFO_[role]['outputContextFirst'] = true;\n }\n }", "title": "" }, { "docid": "ef506181f8820454da5001d0cb3b7977", "score": "0.4643909", "text": "function main()\n{\n\tvar args = process.argv.slice(2);\n\n\tif( args.length == 0 )\n\t{\n\t\targs = [\"site.js\"];\n\t}\n\tvar filePath = args[0];\n\t\n\tcomplexity(filePath);\n\tcomplexityBuilder.report();\n\t\n\t//dynamic(filePath);\n\n}", "title": "" }, { "docid": "781153b9d8ae610e4cf07813b4a2a9f2", "score": "0.46406212", "text": "'CallExpression[callee.property.name=\"before\"]'(node) {\n if (\n isInModule &&\n hooksName &&\n types.isIdentifier(node.callee.object) &&\n node.callee.object.name === hooksName\n ) {\n isInBeforeHook = true;\n }\n }", "title": "" }, { "docid": "4bc664286f42db2b8345bef13f338b5a", "score": "0.46403763", "text": "function runScripts(transformFn) {\n\t headEl = document.getElementsByTagName('head')[0];\n\t var scripts = document.getElementsByTagName('script');\n\n\t // Array.prototype.slice cannot be used on NodeList on IE8\n\t var jsxScripts = [];\n\t for (var i = 0; i < scripts.length; i++) {\n\t var script = scripts.item(i);\n\t // Support the old type=\"text/jsx;harmony=true\"\n\t var type = script.type.split(';')[0];\n\t if (scriptTypes.indexOf(type) !== -1) {\n\t jsxScripts.push(script);\n\t }\n\t }\n\n\t if (jsxScripts.length === 0) {\n\t return;\n\t }\n\n\t console.warn('You are using the in-browser Babel transformer. Be sure to precompile ' + 'your scripts for production - https://babeljs.io/docs/setup/');\n\n\t loadScripts(transformFn, jsxScripts);\n\t}", "title": "" }, { "docid": "c2a7d244f4d992f39de67db83251f6a8", "score": "0.46305627", "text": "function Main(){}", "title": "" }, { "docid": "f2d0d2a5e93d779e311ad56a1e9bba7e", "score": "0.46289873", "text": "function typography(){ this.exec(this); } // run all registered hooks and apply typographical changes to required classes", "title": "" }, { "docid": "aee26636157ab6b604ead7eb1350c7e6", "score": "0.46197", "text": "function main() {\n\n\t// Locate parents on HTML page\n\tvar parents = Page.locateParents();\n\n\t// Get Canned Analyses of corresponding datasets\n\tvar cannedAnalysisInterfaces = API.main(Object.keys(parents));\n\tconsole.log(cannedAnalysisInterfaces);\n\n\t// Add Canned Analyses to the webpage\n\tPage.addInterfaces(parents, cannedAnalysisInterfaces);\n\n\t// Add event listeners for interactivity\n\teventListener.main(cannedAnalysisInterfaces);\n\n}", "title": "" }, { "docid": "aa314fc7c33b7b3df1cd9e21ff4490f3", "score": "0.46133396", "text": "async function onload({ alien }) { // Called before any test run starts\n if (verbose) console.log('onload');\n\n // Check for -v (verbose) option\n if (alien.args[0] == '-v') {\n verbose = true;\n alien.args.shift();\n }\n}", "title": "" }, { "docid": "4346fb50b6710a54c387b6a0533826c4", "score": "0.4606245", "text": "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 }", "title": "" }, { "docid": "51516f7c0c249417d7500ce4577afc47", "score": "0.4603894", "text": "function compiler() {\n const util = require('util')\n const semver = require('semver')\n\n // standard combinators\n const combinators = {\n empty: { since: '0.4.0' },\n seq: { components: true, since: '0.4.0' },\n sequence: { components: true, since: '0.4.0' },\n if: { args: [{ _: 'test' }, { _: 'consequent' }, { _: 'alternate', optional: true }], since: '0.4.0' },\n if_nosave: { args: [{ _: 'test' }, { _: 'consequent' }, { _: 'alternate', optional: true }], since: '0.4.0' },\n while: { args: [{ _: 'test' }, { _: 'body' }], since: '0.4.0' },\n while_nosave: { args: [{ _: 'test' }, { _: 'body' }], since: '0.4.0' },\n dowhile: { args: [{ _: 'body' }, { _: 'test' }], since: '0.4.0' },\n dowhile_nosave: { args: [{ _: 'body' }, { _: 'test' }], since: '0.4.0' },\n try: { args: [{ _: 'body' }, { _: 'handler' }], since: '0.4.0' },\n finally: { args: [{ _: 'body' }, { _: 'finalizer' }], since: '0.4.0' },\n retain: { components: true, since: '0.4.0' },\n retain_catch: { components: true, since: '0.4.0' },\n let: { args: [{ _: 'declarations', type: 'object' }], components: true, since: '0.4.0' },\n mask: { components: true, since: '0.4.0' },\n action: { args: [{ _: 'name', type: 'string' }, { _: 'action', type: 'object', optional: true }], since: '0.4.0' },\n managed_action: { args: [{ _: 'name', type: 'string' }, { _: 'action', type: 'object', optional: true }], since: '0.4.0' },\n composition: { args: [{ _: 'name', type: 'string' }, { _: 'composition' }], since: '0.4.0' },\n repeat: { args: [{ _: 'count', type: 'number' }], components: true, since: '0.4.0' },\n retry: { args: [{ _: 'count', type: 'number' }], components: true, since: '0.4.0' },\n value: { args: [{ _: 'value', type: 'value' }], since: '0.4.0' },\n literal: { args: [{ _: 'value', type: 'value' }], since: '0.4.0' },\n function: { args: [{ _: 'function', type: 'object' }], since: '0.4.0' }\n }\n\n // composer error class\n class ComposerError extends Error {\n constructor(message, argument) {\n super(message + (argument !== undefined ? '\\nArgument: ' + util.inspect(argument) : ''))\n }\n }\n\n // composition class\n class Composition {\n // weaker instanceof to tolerate multiple instances of this class\n static [Symbol.hasInstance](instance) {\n return instance.constructor && instance.constructor.name === Composition.name\n }\n\n // construct a composition object with the specified fields\n constructor(composition) {\n return Object.assign(this, composition)\n }\n\n // apply f to all fields of type composition\n visit(f) {\n const combinator = combinators[this.type]\n if (combinator.components) {\n this.components = this.components.map(f)\n }\n for (let arg of combinator.args || []) {\n if (arg.type === undefined) {\n this[arg._] = f(this[arg._], arg._)\n }\n }\n }\n }\n\n // compiler class\n class Compiler {\n // detect task type and create corresponding composition object\n task(task) {\n if (arguments.length > 1) throw new ComposerError('Too many arguments')\n if (task === null) return this.empty()\n if (task instanceof Composition) return task\n if (typeof task === 'function') return this.function(task)\n if (typeof task === 'string') return this.action(task)\n throw new ComposerError('Invalid argument', task)\n }\n\n // function combinator: stringify function code\n function(fun) {\n if (arguments.length > 1) throw new ComposerError('Too many arguments')\n if (typeof fun === 'function') {\n fun = `${fun}`\n if (fun.indexOf('[native code]') !== -1) throw new ComposerError('Cannot capture native function', fun)\n }\n if (typeof fun === 'string') {\n fun = { kind: 'nodejs:default', code: fun }\n }\n if (typeof fun !== 'object' || fun === null) throw new ComposerError('Invalid argument', fun)\n return new Composition({ type: 'function', function: { exec: fun } })\n }\n\n // lowering\n\n _empty() {\n return this.sequence()\n }\n\n _seq(composition) {\n return this.sequence(...composition.components)\n }\n\n _value(composition) {\n return this._literal(composition)\n }\n\n _literal(composition) {\n return this.let({ value: composition.value }, () => value)\n }\n\n _retain(composition) {\n return this.let(\n { params: null },\n args => { params = args },\n this.mask(...composition.components),\n result => ({ params, result }))\n }\n\n _retain_catch(composition) {\n return this.seq(\n this.retain(\n this.finally(\n this.seq(...composition.components),\n result => ({ result }))),\n ({ params, result }) => ({ params, result: result.result }))\n }\n\n _if(composition) {\n return this.let(\n { params: null },\n args => { params = args },\n this.if_nosave(\n this.mask(composition.test),\n this.seq(() => params, this.mask(composition.consequent)),\n this.seq(() => params, this.mask(composition.alternate))))\n }\n\n _while(composition) {\n return this.let(\n { params: null },\n args => { params = args },\n this.while_nosave(\n this.mask(composition.test),\n this.seq(() => params, this.mask(composition.body), args => { params = args })),\n () => params)\n }\n\n _dowhile(composition) {\n return this.let(\n { params: null },\n args => { params = args },\n this.dowhile_nosave(\n this.seq(() => params, this.mask(composition.body), args => { params = args }),\n this.mask(composition.test)),\n () => params)\n }\n\n _repeat(composition) {\n return this.let(\n { count: composition.count },\n this.while(\n () => count-- > 0,\n this.mask(this.seq(...composition.components))))\n }\n\n _retry(composition) {\n return this.let(\n { count: composition.count },\n params => ({ params }),\n this.dowhile(\n this.finally(({ params }) => params, this.mask(this.retain_catch(...composition.components))),\n ({ result }) => result.error !== undefined && count-- > 0),\n ({ result }) => result)\n }\n\n // define combinator methods for the standard combinators\n static init() {\n for (let type in combinators) {\n const combinator = combinators[type]\n // do not overwrite hand-written combinators\n Compiler.prototype[type] = Compiler.prototype[type] || function () {\n const composition = new Composition({ type })\n const skip = combinator.args && combinator.args.length || 0\n if (!combinator.components && (arguments.length > skip)) {\n throw new ComposerError('Too many arguments')\n }\n for (let i = 0; i < skip; ++i) {\n const arg = combinator.args[i]\n const argument = arg.optional ? arguments[i] || null : arguments[i]\n switch (arg.type) {\n case undefined:\n composition[arg._] = this.task(argument)\n continue\n case 'value':\n if (typeof argument === 'function') throw new ComposerError('Invalid argument', argument)\n composition[arg._] = argument === undefined ? {} : argument\n continue\n case 'object':\n if (argument === null || Array.isArray(argument)) throw new ComposerError('Invalid argument', argument)\n default:\n if (typeof argument !== arg.type) throw new ComposerError('Invalid argument', argument)\n composition[arg._] = argument\n }\n }\n if (combinator.components) {\n composition.components = Array.prototype.slice.call(arguments, skip).map(obj => this.task(obj))\n }\n return composition\n }\n }\n }\n\n // return combinator list\n get combinators() {\n return combinators\n }\n\n // recursively deserialize composition\n deserialize(composition) {\n if (arguments.length > 1) throw new ComposerError('Too many arguments')\n composition = new Composition(composition) // copy\n composition.visit(composition => this.deserialize(composition))\n return composition\n }\n\n // label combinators with the json path\n label(composition) {\n if (arguments.length > 1) throw new ComposerError('Too many arguments')\n if (!(composition instanceof Composition)) throw new ComposerError('Invalid argument', composition)\n\n const label = path => (composition, name, array) => {\n composition = new Composition(composition) // copy\n composition.path = path + (name !== undefined ? (array === undefined ? `.${name}` : `[${name}]`) : '')\n // label nested combinators\n composition.visit(label(composition.path))\n return composition\n }\n\n return label('')(composition)\n }\n\n // recursively label and lower combinators to the desired set of combinators (including primitive combinators)\n lower(composition, combinators = []) {\n if (arguments.length > 2) throw new ComposerError('Too many arguments')\n if (!(composition instanceof Composition)) throw new ComposerError('Invalid argument', composition)\n if (!Array.isArray(combinators) && typeof combinators !== 'boolean' && typeof combinators !== 'string') throw new ComposerError('Invalid argument', combinators)\n\n if (combinators === false) return composition // no lowering\n if (combinators === true || combinators === '') combinators = [] // maximal lowering\n if (typeof combinators === 'string') { // lower to combinators of specific composer version \n combinators = Object.keys(this.combinators).filter(key => semver.gte(combinators, this.combinators[key].since))\n }\n\n const lower = composition => {\n composition = new Composition(composition) // copy\n // repeatedly lower root combinator\n while (combinators.indexOf(composition.type) < 0 && this[`_${composition.type}`]) {\n const path = composition.path\n composition = this[`_${composition.type}`](composition)\n if (path !== undefined) composition.path = path\n }\n // lower nested combinators\n composition.visit(lower)\n return composition\n }\n\n return lower(composition)\n }\n }\n\n Compiler.init()\n\n return { ComposerError, Composition, Compiler }\n}", "title": "" }, { "docid": "bd102e993a6b5ad271bd40dbed454428", "score": "0.46034852", "text": "function L(...args) { if (Clef.DEBUG) _vex__WEBPACK_IMPORTED_MODULE_0__[\"Vex\"].L('Vex.Flow.Clef', args); }", "title": "" }, { "docid": "52e9fdfa08df2d432b26942813dc1fb5", "score": "0.46033615", "text": "function UserPreProcess(eventName, activityName, ilboName, tabName)\n{\n\teventName \t= eventName.toLowerCase();\n\tactivityName \t= activityName.toLowerCase();\n\tilboName \t= ilboName.toLowerCase();\n\ttabName \t= tabName.toLowerCase();\n\tvar bReturn \t= true;\n\ttry\n\t{\n\t\tif(ilboName != \"sparescons_rpt\")\n\t\t\treturn true;\n\t}\n\tcatch(e){}\n\treturn bReturn;\n}", "title": "" }, { "docid": "197c182c606a84d913a481b6bcbd1df3", "score": "0.45988736", "text": "function guard() { }", "title": "" }, { "docid": "2b6109fedd4c4e7d5f25443bd0092b13", "score": "0.45987162", "text": "bug6() {\n function run(options) {\n options={}\n if (options.script == undefined) {\n options.script = 'main.js';\n }\n\n console.log(`run: script=${options.script}`);\n }\n\n run();\n }", "title": "" }, { "docid": "d28f3a636ec30197012a96da1116d03f", "score": "0.4594636", "text": "function ensureEvaluated(entry) {\n for (let i = 0, l = entry.deps.length; i < l; i++) {\n let depName = entry.deps[i];\n let depEntry = registry[depName];\n ensureEvaluated(depEntry);\n }\n if (entry.evaluated)\n return;\n entry.evaluated = true;\n entry.module.execute(); \n }", "title": "" }, { "docid": "a666cb698da9cedca69622290af063c5", "score": "0.45934725", "text": "Program() {\n // Implement here...\n }", "title": "" }, { "docid": "02ea6d09271140e2419ae81ebd659aa2", "score": "0.4590824", "text": "function C(n,r){function o(t,o){function a(e){e?o(e):t?t(i):r(null,i)}var i=g(n);_.run(e,{file:i},a)}if(t(),u(\"process\",e.Parser),c(\"process\",e.Compiler),!r)return new Promise(o);o(null,r)}", "title": "" }, { "docid": "20501525e300edffc80fe9bf43df3392", "score": "0.4576506", "text": "run() {\n let name\n let tree\n let payload\n let cb\n let staticTree\n const args = [].slice.call(arguments)\n args.forEach((arg) => {\n if (typeof arg === 'string') {\n name = arg\n } else if (Array.isArray(arg) || arg instanceof Primitive) {\n tree = arg\n } else if (!tree && typeof arg === 'function') {\n tree = arg\n } else if (typeof arg === 'function') {\n cb = arg\n } else {\n payload = arg\n }\n })\n\n if (!tree) {\n throw new Error('function-tree - You did not pass in a function tree')\n }\n\n const withResolveAndReject = (resolve, reject) => {\n const treeIdx = this.cachedTrees.indexOf(tree)\n if (treeIdx === -1) {\n staticTree = createStaticTree(name, tree)\n this.cachedTrees.push(tree)\n this.cachedStaticTrees.push(staticTree)\n } else {\n staticTree = this.cachedStaticTrees[treeIdx]\n }\n const execution = new FunctionTreeExecution(\n name,\n staticTree,\n this,\n (error, execution, funcDetails, finalPayload) => {\n this.emit('error', error, execution, funcDetails, finalPayload)\n reject(error)\n }\n )\n\n this.emit('start', execution, payload)\n executeTree(\n execution,\n payload,\n this.executeBranchWrapper,\n (funcDetails, path, currentPayload) => {\n this.emit('pathStart', path, execution, funcDetails, currentPayload)\n },\n (currentPayload) => {\n this.emit('pathEnd', execution, currentPayload)\n },\n (currentPayload, functionsToResolve) => {\n this.emit(\n 'parallelStart',\n execution,\n currentPayload,\n functionsToResolve\n )\n },\n (currentPayload, functionsResolved) => {\n this.emit(\n 'parallelProgress',\n execution,\n currentPayload,\n functionsResolved\n )\n },\n (currentPayload, functionsResolved) => {\n this.emit('parallelEnd', execution, currentPayload, functionsResolved)\n },\n (finalPayload) => {\n this.emit('end', execution, finalPayload)\n resolve === reject\n ? resolve(null, finalPayload)\n : resolve(finalPayload)\n }\n )\n }\n\n if (cb) {\n withResolveAndReject(cb, cb)\n } else {\n return new Promise(withResolveAndReject)\n }\n }", "title": "" }, { "docid": "d738b847d44b5083ff7437f511901ca8", "score": "0.4570924", "text": "function parseTopLevel(program) {\n lastStart = lastEnd = tokPos;\n if (options.locations) lastEndLoc = new Position();\n inFunction = strict = null;\n labels = [];\n readToken();\n\n var node = program || startNode(), first = true;\n if (!program) node.body = [];\n while (tokType !== _eof) {\n var stmt = parseStatement();\n if (stmt) {\n node.body.push(stmt);\n if (first && isUseStrict(stmt)) setStrict(true);\n first = false;\n }\n }\n // If we are EOF at this point and something is left on the if stack, it was unterminated.\n if (options.preprocess && tokType === _eof && preIfStack.length > 0)\n raise(preIfStack[0].pos, \"Unterminated #\" + preIfStack[0].type.keyword + \" at EOF\");\n return finishNode(node, \"Program\");\n }", "title": "" }, { "docid": "f79f2b09a06a2a3f2490093ae13f18a9", "score": "0.45679083", "text": "run(handler) {\n this._compiler.run(handler)\n }", "title": "" }, { "docid": "000d254bc5abc3d9156e300ee3fa0fd1", "score": "0.45618853", "text": "function preRequires() {\r\n try {\r\n buildHelperCommons.loadDashArgs();\r\n // includeCwdOnModulePath(module, buildHelperCommons.argsMap['verbose']);\r\n } catch (err) {\r\n console.error(err);\r\n process.exit(1);\r\n }\r\n}", "title": "" }, { "docid": "4278d93e457a1e3720cb7c5688a4b062", "score": "0.4561463", "text": "onCodePathStart(codePath) {\n scopeInfo = {\n upper: scopeInfo,\n uselessReturns: [],\n codePath\n };\n }", "title": "" } ]
3ac7cfddeeaa450ff49f18c88e835244
USER Endpoints Read all Users
[ { "docid": "7b6cb38ffe228417de082923298212e6", "score": "0.0", "text": "async readData() {\n const collection = await this.collection();\n let dataArr = await collection.find({}).toArray();\n return dataArr;\n }", "title": "" } ]
[ { "docid": "6fb32f8147bf9c2638d66357c95bdbdf", "score": "0.7832186", "text": "getAllUsers() {\n return Api().get('/users')\n }", "title": "" }, { "docid": "1433df8050816ceceffbe13527c4b0ae", "score": "0.7718914", "text": "getAllUsers(){\n this.server.get('/api/get-all-users', (req, res) => {\n try {\n this.App.Api.ApiRank.isAdmin(req.user, isAdmin => {\n if (isAdmin) this.App.UserOrm.getAll((err, rows) => {\n if (err) this.App.throwErr(err, this.prefix, res);\n else res.send(rows)\n });\n else res.status(401).send('Forbbiden: you need more rank to see this page!')\n })\n }\n catch (err){\n this.App.throwErr(err, this.prefix, res)\n }\n })\n }", "title": "" }, { "docid": "25a43a5a8a94bdd555dc9b8945346562", "score": "0.769098", "text": "listAllUsers(){}", "title": "" }, { "docid": "2ba1f766da18fd80054566297bd7b2d0", "score": "0.7571592", "text": "function getAllUsers(request, reply){\n Users.getAllUsers(function(err, users){\n if (!err)\n reply({data: users});\n })\n}", "title": "" }, { "docid": "562c77623bcd4c65b201656ce881e4f9", "score": "0.7557937", "text": "async getAllUser() {\n const result = await client.query(`SELECT * from userView`);\n\n return result.rows;\n }", "title": "" }, { "docid": "dee38a6671391c142f0887f26959522a", "score": "0.75458455", "text": "function getUsers() {\r\n\tgetDoc(\"https://hr.oat.taocloud.org/v1/users\", showUsers);\r\n}", "title": "" }, { "docid": "ad0a7f47685f6325bf1d686b84b42b0a", "score": "0.75152963", "text": "static async get(req, res) {\n const userDomain = new UserDomain();\n userDomain.getAllUsers(req, res);\n }", "title": "" }, { "docid": "f33934c3bdbf3d1f7d5cceb2c9daa085", "score": "0.73847693", "text": "function getAllUsers() {\n\t\t$scope.allUsers = model.user.query();\n\t\tconsole.log('got all users');\n\t}", "title": "" }, { "docid": "f33934c3bdbf3d1f7d5cceb2c9daa085", "score": "0.73847693", "text": "function getAllUsers() {\n\t\t$scope.allUsers = model.user.query();\n\t\tconsole.log('got all users');\n\t}", "title": "" }, { "docid": "7270a75851927dad2c6cd94830f2eb29", "score": "0.73603", "text": "function _getUsers() {\n genericService.get(\"/api/users/\")\n .then(_getSuccess)\n .catch(_getFailure);\n\n function _getSuccess(res) {\n vm.users = res.data.items;\n console.log(res.data.items);\n }\n\n function _getFailure(err) {\n console.log(err);\n }\n }", "title": "" }, { "docid": "a395019490cdb7def1434157b5337a68", "score": "0.7354186", "text": "function users_allUsers(request, response) {\n db_connector.collection('users', function(err, collection) {\n collection.find().toArray(function(err, items) {\n response.send(items);\n });\n });\n}", "title": "" }, { "docid": "10635efe50f39eee8d9b3c2f166ee8c6", "score": "0.733255", "text": "function getAllUsers(req, res, next) {\n let options = new Options('/users/_all_docs');\n requestResource(options, null, function(err, data) {\n if (err) {\n return next(err);\n }\n\n let rows = data.rows;\n if (rows) {\n rows = rows.map((elem) => {\n return elem.id;\n });\n rows = rows.filter((elem) => {\n return elem !== req.user._id;\n });\n res.json(rows);\n } else {\n res.json({});\n }\n\n });\n}", "title": "" }, { "docid": "e302e3edac3b030a52c77d065a13c4c2", "score": "0.73269314", "text": "function getUserList() {\n return api.get(path)\n .query({ page: 1 })\n .set('Accept', 'application/json')\n .set('Content-Type', 'application/json');\n}", "title": "" }, { "docid": "2b478fcfded9f74356e9151db3a29894", "score": "0.73200023", "text": "getAll(req, res) {\n User.find()\n .then((users) => res.json(users))\n .catch((err) => res.json(err));\n }", "title": "" }, { "docid": "7507d53505dc9f2fd2f079bde2baf11a", "score": "0.73025", "text": "async listUsers(ctx) {\n return this.adapter.find({});\n }", "title": "" }, { "docid": "c75f18e35d9aee693647182caa9c17e7", "score": "0.7297455", "text": "function getUsers() {\n props.getUser()\n }", "title": "" }, { "docid": "f2c527dd079ffbc341dbc6ff8036ebf4", "score": "0.7287428", "text": "listUsers() {\n return __awaiter$7(this, void 0, void 0, function* () {\n try {\n const data = yield get$1(this.fetch, `${this.url}/admin/users`, {\n headers: this.headers,\n });\n return { data: data.users, error: null };\n }\n catch (e) {\n return { data: null, error: e };\n }\n });\n }", "title": "" }, { "docid": "91e676cf03ac8355ff17a2cccc63ae73", "score": "0.72719294", "text": "static async listUsers() {\n let [status, data] = await apiRequest(\"GET\", \"/users\");\n if (status !== 200) throw new Error(\"Couldn't get list of users\");\n return data.users;\n }", "title": "" }, { "docid": "6951b21091a14402e1baf43ca3dc76d9", "score": "0.72294354", "text": "getAllUsers(req, res) {\n\n User.find().then((users) => {\n res.send( users ) // put in object in case we want to add other properties\n }, (error) => {\n res.status(400).send(error)\n })\n\n }", "title": "" }, { "docid": "2740d8e2985f65bbb6c3ad2f11f5d6ff", "score": "0.7207065", "text": "function getAllUsers() {\n return $http.get(\"/api/allUsers\");\n }", "title": "" }, { "docid": "c291dd2696cb6b6d5c6850a3ba6848e2", "score": "0.7201154", "text": "function getAllUsers () {\n return users;\n}", "title": "" }, { "docid": "ed0479e25a5e716bc4564c8390283ff9", "score": "0.7199404", "text": "function getAll(req, res, next) {\n userService.getAll(req)\n .then(users => res.json(users))\n .catch(err => next(err));\n}", "title": "" }, { "docid": "27df872d58a57161a6b1ec312779269e", "score": "0.7177218", "text": "async getUsers() {\n return await this.contract.getUsers();\n }", "title": "" }, { "docid": "c9f0092ebfa19466a3518a7783298513", "score": "0.71675646", "text": "getAllInfoUser(){}", "title": "" }, { "docid": "205645b5343cd23e03b2d4c9d05f3d58", "score": "0.7160787", "text": "async getUsers(req, res) {\n try {\n const user = await Users.query();\n return res.status(200).send(user);\n } catch (err) {\n res.send({\n sucess: 0,\n message: err\n });\n }\n }", "title": "" }, { "docid": "105146f24c409a065c8e1ee15e48b3e0", "score": "0.7157952", "text": "function readAllUsers(req,res){\n\t//recuperamosa todos,pero no enviamos la pass\n\tUser.find({},{password:0},(err,users)=>{\n\t\tif(err) return res.status(500).send({message: 'Error en la peticion'});\n\t\tif(!users) return res.status(500).send({message: 'No hay usuarios disponibles'});\n\t\t//llama a funcion asincronica\n\t\treturn res.status(200).send({users});\t\n\t});\n}", "title": "" }, { "docid": "7ab08e27b2ebb8efc5de8d6e4fc0e9b0", "score": "0.715624", "text": "function getAllUsers (req, res) {\n\n // get all the users\n UserModel.find({}, function (err, users) {\n if (err) {\n res.status(500).send(err);\n return;\n }\n\n res.status(200).json(users);\n });\n }", "title": "" }, { "docid": "356b8bc4113176f6dd33bdd8c85f7218", "score": "0.7155072", "text": "async getUsers() {\n await this.users.getUsers();\n }", "title": "" }, { "docid": "5fc99c7fd7b37489c966152aedfc5399", "score": "0.71437365", "text": "function findAllUsers(){\n userService.findAllUsers()\n .then(users=>renderUsers(users));\n }", "title": "" }, { "docid": "f0dbd37294b07005baaeda67a0eb7b99", "score": "0.7130892", "text": "function getAllUsers(req, res)\n\t{\n\t\tuserdbConnection.query(\"SELECT * FROM USER\", function(err, rows, fields)\n\t\t{\n\t\t\tif (err)\n\t\t\t\tthrow err;\n\t\t\tif (rows.length > 0)\n\t\t\t{\n\t\t\t\tvar data = JSON.stringify(rows[0]);\n\t\t\t\tres.send(data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tres.send('NO_DATA_FOUND');\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "c2f70143d94b3fcf14ed64a45ce19c32", "score": "0.7126599", "text": "function findAllUsers(req, res) {\n Users.find(function (err, users) {\n if (err) return res.status(500).send({\n 'code': 500,\n 'error': err.message\n });\n res.status(200).jsonp({\n 'code': 200,\n 'users': users\n });\n });\n}", "title": "" }, { "docid": "19cef25e89f595b0e48a3838bee37710", "score": "0.71166307", "text": "function getUsers() {\n fetch(`http://localhost:3010/api/v1/users`)\n .then(res => res.json())\n .then(data => showUsers(data))\n}", "title": "" }, { "docid": "dda87903c8f964ed58010d950078016c", "score": "0.71091616", "text": "function GetAllUser() {\n\n if (isUserAuthenticated) {\n\n var UserUUID = 'null';\n\n const UserUUIDObj = { UserUUID };\n\n axios.post('/api/getallusers', UserUUIDObj).then(response => {\n\n setAllUsersList(response.data);\n\n setLoading(false);\n });\n }\n }", "title": "" }, { "docid": "f7bd52299cc28524f5370d19e8f10327", "score": "0.7108251", "text": "function getAllUsers() {\n // This here is the Pterodactyl API Curl command\n return axios.get(URL + '/api/application/users', {\n responseEncoding: 'utf8',\n maxRedirects: 5,\n headers: {\n 'Authorization': 'Bearer ' + Key,\n 'Content-Type': 'application/json',\n 'Accept': 'Application/vnd.pterodactyl.v1+json',\n }\n }).then(function (response) {\n return response.data;\n }).catch(error => {\n throwErrors(error);\n });\n}", "title": "" }, { "docid": "a0c777cf04904735fa50472fb2d07047", "score": "0.709441", "text": "function findAllUsers(){\n return $http.get(\"/api/project/user\");\n }", "title": "" }, { "docid": "2c5b4cc151aa8622026a3f5ba89c1b27", "score": "0.7093527", "text": "function findAllUsers(req, res) {\n userModel.findAllUsers()\n .then(function (users) {\n res.json(users);\n }, function (err) {\n console.log(err);\n res.sendStatus(500);\n })\n }", "title": "" }, { "docid": "3488f80322b769353b4b9e240a204c52", "score": "0.7090253", "text": "index(req, res) {\n db.users.findAll()\n .then((allUsers) => {\n res.json(allUsers);\n });\n }", "title": "" }, { "docid": "b6106cc8e01090693bd2f0c1720b76e0", "score": "0.70897925", "text": "function showAllUsers(req, res, next){\n db.any(`\n SELECT *\n FROM users;\n `)\n .then((users) => {\n res.users = users;\n console.log(users);\n next();\n })\n .catch(error => next(error));\n}", "title": "" }, { "docid": "ed2e8250c88fdac63ca641ecd7ecfaeb", "score": "0.70866245", "text": "async getAllUsers() {\n const userCollection = await users();\n return await userCollection.find({}).toArray();\n }", "title": "" }, { "docid": "5afd1368be0aaabfdbdad682f338b8e9", "score": "0.7076319", "text": "function getAllUsers(req, res){\n db.many('select * from '+ dbConfig.schema + '.users')\n .then(function(data){\n res.status(200).send({\n data:data\n });\n })\n .catch(function(errr){\n if(err.recived == 0){\n res.status(404).send({message: 'No se han encontrado usuarios'});\n console.log(err);\n }else{\n res.status(500).send({message:'Error en el Servidor'})\n }\n });\n}", "title": "" }, { "docid": "efb7a68b837eedfe0ad1e56b51e1c60a", "score": "0.70686686", "text": "function usersGet() {\n return jsonRequester.get(serverURLforUser)\n .then(function (res) {\n return res.result;\n });\n }", "title": "" }, { "docid": "963385c7f61485eaa1e4e2661bdd892b", "score": "0.7066097", "text": "function getUser(){\n $http\n .get('/user')\n .then(function(res){\n self.all = res.data.users;\n });\n }", "title": "" }, { "docid": "ce970d3fbfebb5d7d2cff7d9a1aece0c", "score": "0.70436966", "text": "async function retrieveUsers(req,res) {\n Users.findAll()\n .then((users) => {\n res.status(200).json(users);\n })\n .catch((err) => {\n console.log(err);\n res.status(500).json({ message: err.message })\n })\n}", "title": "" }, { "docid": "57ccb00592b93a4f322d1e85cb033f00", "score": "0.7042823", "text": "function getAllUsers() {\n console.log(\"getAllUsers\");\n return UserModel.find({}, \"id name\");\n}", "title": "" }, { "docid": "157586c815494cb6a11b588ca41a1a89", "score": "0.7039253", "text": "function getAll(req, res) {\n User.find({}, (err, users) => {\n if (err) {\n return res.json(err);\n }\n return res.status(200).json({ users });\n });\n}", "title": "" }, { "docid": "065c65e710e7a2f7d02457152a048bb2", "score": "0.70333916", "text": "function getUsers(req, res) {\n //Query the DB and if no errors, send all the users\n let query = User.find({});\n query.exec((err, users) => {\n if(err) res.send(err);\n //If no errors, send them back to the client\n res.json(users);\n });\n}", "title": "" }, { "docid": "6050535710cff1b61f4e1ad0b5367928", "score": "0.7032449", "text": "function getUsers() {\n intakeTaskAgeDatalayer.getUsersInFirm()\n .then(function (response) {\n self.allUser = response.data;\n }, function (error) {\n notificationService.error('Users not loaded');\n });\n }", "title": "" }, { "docid": "2ddd86e61dadf26d06a406427e4ad73c", "score": "0.70299244", "text": "async function getAllUsers(req, res){\n const usersList = await User.find({});\n res.json(usersList);\n}", "title": "" }, { "docid": "4015743395642e81d64ec365011f5a33", "score": "0.7029713", "text": "function getAllUsers(req, res, next) {\n db\n .any(\"SELECT id, username, email FROM users\")\n .then(data => {\n console.log(\"data:\", data);\n res.status(200).json({\n status: \"success\",\n data: data,\n message: \"Retrieved all users\"\n });\n })\n .catch(err => {\n return next(err);\n });\n}", "title": "" }, { "docid": "e7191bd1f07a5a5a5b1eca79ce428492", "score": "0.70287097", "text": "async getAllUsers(req,res) {\n return res.status(200).send(await service.getAllUsers());\n }", "title": "" }, { "docid": "b8d21a16ed77013878f1b88ba351853c", "score": "0.70280856", "text": "function getUsers() {\n // Create a collection instance to keep the \n // users in.\n var users = new Apigee.Collection({\n \"client\": apigeeClient,\n \"type\": \"users\"\n });\n // Fetch the users from the database.\n users.fetch(\n // Called if the fetch succeeded.\n function () {\n // Clear the list of old stuff.\n $('#users_list').empty();\n if (users.hasNextEntity()){\n // Loop through the returned users,\n // adding a new list item for each.\n while (users.hasNextEntity()) {\n var user = users.getNextEntity();\n $('#users_list').append(\n '<li data-theme=\"c\">' +\n '<h3>' + user.get(\"username\") + '</h3>' +\n '</li>');\n } \n // If there aren't any users, add a message.\n } else {\n $('#users_list').append(\n '<li data-theme=\"c\">' +\n '<h3>No users to display.</h3>' +\n '</li>');\n }\n // Refresh the list so that it's styled correctly.\n $('#users_list').listview('refresh');\n },\n // Called if the attempt to get users failed.\n function () {\n client.logError({tag:\"getUsers\", \n logMessage:\"Unable to retrieve users.\"})\n });\n}", "title": "" }, { "docid": "418e07e1b3b93e085064bec69b96c98e", "score": "0.70188296", "text": "function userClient02() {\n\tservice.client({ host, port })\n\t\t.act({ role: \"users\", cmd: \"get\", id: 5 }, (err, resp) => {\n\t\t\tif (err) return console.log(err.msg);\n\t\t\tconsole.log(\"response @ name: \", resp.user[0].name);\n\t\t});\n}", "title": "" }, { "docid": "f8a81869d7069c76fdbf79b1df70a8cc", "score": "0.69965637", "text": "async getAll() {\n return await User.find()\n }", "title": "" }, { "docid": "4ead2e9def99ccf6300a1cd4010344fc", "score": "0.69918543", "text": "function getAll(req, res) {\n users.find({}, function (err, users) {\n res.json(users);\n });\n}", "title": "" }, { "docid": "4d0c683057891f93d79e9dd6b0e53529", "score": "0.6984637", "text": "async getAll() {\n\tlet fabric_ca_client = this.client.getCertificateAuthority();\n let caIdentityService = fabric_ca_client.newIdentityService();\n\n\tlet usersList;\n\tusersList = await caIdentityService.getAll(connection.user);\n return usersList;\n }", "title": "" }, { "docid": "6049bf1ea48848fe2a50da69886f9e2b", "score": "0.69805694", "text": "getUsers(){\n return axios.get(AXIOS_USER_URL);\n }", "title": "" }, { "docid": "a5e54787082d6c2073c996ca00da2125", "score": "0.6979605", "text": "function getAllUsers(req, res, next) {\n var Token = req.swagger.params['Token'].value;\n\n var results = {\n success: 1,\n data: [],\n description: \"Find all users successful.\"\n };\n AuthModel.checkToken(Token, function (isAuth) {\n if (isAuth) {\n\n UserModel.findAll(function (rows) {\n if (rows != -1) {\n rows.forEach(row => {\n var user = {\n userID: row.user_id,\n userName: row.user_name\n };\n results.data.push(user);\n });\n res.json(results);\n } else {\n results.success = 0;\n results.description = \"Error\";\n res.json(results);\n }\n });\n } else {\n results.success = 0;\n results.description = \"Token wrong !!!\";\n res.json(results);\n }\n });\n}", "title": "" }, { "docid": "7eae1d7c0e4496285bd474c8da7286cc", "score": "0.6977402", "text": "async function getViewUsers() {\r\n const viewUserRes = await axios.get(\"http://localhost:5000/user/viewAllUser\");\r\n \r\n \r\n setData(viewUserRes.data);\r\n }", "title": "" }, { "docid": "8453ec19482741eccccccf50f0e80e38", "score": "0.6976935", "text": "function getUsers(){\n\n\t\tUser.getUsers().then(function(data){\n\t\t\tif(data.data.success){\n\t\t\t\tif(data.data.permission === \"Admin\" || data.data.permission === \"Mod\"){\n\t\t\t\t\t//console.log(\"permissions granted\");\n\t\t\t\t\tapp.users = data.data.users;\n\t\t\t\t\tapp.accessDenied = false;\n\t\t\t\t} else{\n\t\t\t\t\t//console.log(\"no permissions granted\");\n\t\t\t\t\tapp.errorMsg = \"Insufficient permission.\"\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\tapp.errorMsg = data.data.message;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "67256cbcbb31c0395bde818ac5a7c1e1", "score": "0.69711965", "text": "function showAllUsers(req, res, next) {\n pg.connect(connectionString, function(err, client, done) {\n if(err) {\n done();\n console.log(err);\n return res.status(500).json({ success: false, data: err});\n }\n\n var query = client.query(\"SELECT * FROM users;\", function(err, result) {\n done()\n if(err) {\n return console.error('error, running query', err);\n }\n res.rows = result.rows\n next()\n });\n });\n}", "title": "" }, { "docid": "2ef51a95b8475662235aa6ae0713f807", "score": "0.69687265", "text": "async function allUserData(user) {\n\n //Find the stored info of the user\n let Users = await UserInfo.UserModel.find({ });\n\n //if no users in the DB yet return empty array\n if (!Users.length) {\n console.log(\"Server Side All User Pull Found Nothing\")\n res.send([]);\n }\n\n //Send the data out\n res.status(200).send(Users);\n }", "title": "" }, { "docid": "085ff053d3d2c71ae67f1e8738bae498", "score": "0.6950308", "text": "getAll (callback: mixed) {\n\t\tsuper.query(\n\t\t\t\"select user_id, name, address, zipcode, tel, email, subscription FROM User\",\n\t\t\t[],\n\t\t\tcallback);\n\t}", "title": "" }, { "docid": "a0ce4721ceb17b6f43396d40a857396e", "score": "0.69488573", "text": "getUsers(){\n //en el modelo User se ejecuta el find sin ninguna condicion...\n User.find({}, (err, users)=>{\n //en caso de haberse presentado un error se ejecuta el error\n if(err) throw err;\n //de lo contrario se retorna un objeto con todos los resultados\n res.send( { allUsers : users } );\n })\n }", "title": "" }, { "docid": "a7430c3a9a658dc400143659a0ef7d7d", "score": "0.69433117", "text": "function getUsers(req, res) {\n Users.find({}, { _id: 0, createdAt: 0, updatedAt: 0 }) // hiding unnecessary fields\n .sort({ createdAt: -1 }) // latest to oldest users\n .exec((err, users) => {\n if (err) {\n return res.status(500).json({\n message: \"Something went wrong. Please try again later\",\n err // TODO: remove for prod\n });\n }\n\n return res.status(200).json({\n message: \"Users listed successfully!\",\n users\n });\n });\n}", "title": "" }, { "docid": "7dc9981dea920dd1dbd754604db8d666", "score": "0.69371426", "text": "function findAllUsers(callback) {\n let url = this.url + '/users';\n let promise = fetch(url, {\n method: 'GET',\n headers: {\n 'content-type': 'application/json'\n }\n }).then(response => response.json()).then(callback)\n }", "title": "" }, { "docid": "82b64e526ff8a4d71a034c030eaae3e6", "score": "0.6932908", "text": "static async getAllUsers() {\n try {\n const res = await axios.get(url+'/users');\n console.log(res.data);\n return res.data;\n } catch (err) {\n console.log(err);\n }\n }", "title": "" }, { "docid": "bc7c34571f5cbbb6894050453e29aca3", "score": "0.693234", "text": "async function getAllUsers(req, res) {\n const result = await pool.query(\"select id,name,email,password from users\");\n let users = result[0];\n res.status(200).json(users);\n}", "title": "" }, { "docid": "bd6d23a5d4a04d92dfb4f645e6619545", "score": "0.6928641", "text": "async showAllUsers({}){\n const users = await User.find({})\n return users;\n }", "title": "" }, { "docid": "a16f61d9207cdd5eb0c7f3d2d97dd8b9", "score": "0.6927286", "text": "async bringUsers(req, res) {\n try {\n const users = await User.find();\n res\n .status(200)\n .json(users);\n } catch (error) {\n res\n .status(400)\n .json({\n message: err\n });\n }\n\n }", "title": "" }, { "docid": "89177205f679b6989c6344a70ceae814", "score": "0.69260913", "text": "function getAllUsers() {\n\treturn new Promise(function (resolve,reject) {\n\t\tusers.findAll(function(err,data) {\n\t\t\tif(err) return reject(\"E512\");\n\t\t\treturn resolve(data);\t\n\t\t});\n\t});\n}", "title": "" }, { "docid": "67d49cff887d15d8f66f418a744dd2d5", "score": "0.69233626", "text": "list(req, res){\n\t\treturn User\n\t\t.all()\n\t\t.then(users => res.status(200).send(users))\n\t\t.catch(error => res.status(400).send(error))\n\t}", "title": "" }, { "docid": "dab6f1c542462197deb9d960857b81c6", "score": "0.6921854", "text": "function fetchAllUsers() {\n\n var deferred = $q.defer();\n $http.get(REST_API_URI + 'admin/get').then(function (response) {\n deferred.resolve(response.data);\n },\n function (errorResponse) {\n console.log('Error Fetching User From The Database');\n deferred.reject(errorResponse);\n }\n );\n return deferred.promise;\n }", "title": "" }, { "docid": "79abf7e8d2ad82deda58e76d42290b4f", "score": "0.6921208", "text": "function findAllUsers() {\n return fetch( self.url )\n .then( function( response ) {\n console.log( response );\n return response.json();\n })\n }", "title": "" }, { "docid": "10a49037a618d385b88dd361cedd2655", "score": "0.69184256", "text": "function getAll() {\n const requestOptions = {\n method: 'GET',\n headers: authHeader()\n };\n\n return fetch(`${config.apiUrl}/api/users/usersGetAll`, requestOptions)\n .then(response => response.json())\n .then(handleResponse)\n .catch(function (error) {\n alert('GET ' + error.message)\n })\n}", "title": "" }, { "docid": "ff41f947394155a74ff55ecdf3849176", "score": "0.6917134", "text": "function getUser() {\n //Funcion que trae los usuarios\n return axios.get(url + \"/users\", {\n params: {\n _limit: 5\n }\n });\n }", "title": "" }, { "docid": "65cecf2444e5b3df618002c80596f9d1", "score": "0.6893811", "text": "async index(req, res) {\n const users = await User.findAll()\n return res.status(200).json(users)\n }", "title": "" }, { "docid": "369e82017022b1a7deda8ddd1c5b80d3", "score": "0.6890837", "text": "static getUsers (_req, res) {\n pool.getConnection((err, connection) => {\n if (err) throw err\n connection.query('SELECT * FROM user', (error, results) => {\n if (error) {\n console.log(error)\n } else {\n res.status(200).send(results)\n }\n connection.release()\n if (error) throw error\n })\n })\n }", "title": "" }, { "docid": "f7cfb7681a82f52ef4664909565fdc46", "score": "0.6888252", "text": "function getUsers(request, response, next) {\n var userId = request.query['userId'];\n var firstName = request.query['firstName'];\n var middleName = request.query['middleName'];\n var lastName = request.query['lastName'];\n var username = request.query['username'];\n\n User.query(userId, firstName, middleName, lastName, username)\n\n .then(function (users) { //Get users\n response.json(users);\n })\n\n .catch(function (error) { //Handle error\n next(error);\n });\n}", "title": "" }, { "docid": "f392afee54bca6aaefce39c63455afcf", "score": "0.6883602", "text": "async function getUsers(req, res) {\n try {\n await serviceUser.getUsers(req, res)\n } catch (error) {\n errorMsg(res, 500, 'Ha ocurrido un error', error)\n }\n}", "title": "" }, { "docid": "8fbb27b31e42bc7d0182c1c511306ab0", "score": "0.6883047", "text": "function getUsers() {\n\t\t\tuserService.getUsers().then(function(users) {\n\t\t\t\tapplyRemoteData(users);\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "ec611ea88bd1aa596800392e8362e913", "score": "0.68793494", "text": "function getUsers(req, res){\n // we receive over URL a number of pages\n var identity_user_id = req.user.sub;\n var page = 1;\n if(req.params.page){\n page = req.params.page;\n }\n var itemsPerPage = 5;\n\n User.find().sort('_id').paginate(page, itemsPerPage, (err, users, total)=>{\n if(err) return res.status(500).send({message: 'Error en la petición'});\n if(!users) return res.status(404).send({message: 'No hay usuarios en la plataforma'});\n\n return res.status(200).send({\n users,\n total,\n pages: Math.ceil(total/itemsPerPage) // we round our total of users / users per Page and send it over json\n });\n });\n}", "title": "" }, { "docid": "4d13e5b0900d973ac2aae75bce7300e6", "score": "0.68726826", "text": "static async getAll() { \n let userRes = await db.query(\n `SELECT username, first_name, last_name, email\n FROM users\n `)\n return userRes.rows;\n }", "title": "" }, { "docid": "609afb48f1025f21dd0961f24a00a842", "score": "0.68668294", "text": "getAllUsers(req, res) {\n promiseResponseHelper(req, res, UserService.getAllUsers());\n }", "title": "" }, { "docid": "6243439d51867cdb05df3b328e42e509", "score": "0.6856927", "text": "function _getAllUsers(callback)\n{\n var allUsers = [];\n\n var log = function (inst)\n {\n\n allUsers.push(inst.get());\n }\n\n console.log(\"getAllUsers is running.\");\n User.findAll().then(function (data, err)\n {\n if (data !== null)\n {\n console.log(\"her er Users: \" + data)\n data.forEach(log);\n callback(allUsers);\n\n } else\n {\n console.log(err);\n console.log(\"could not find any Users\");\n callback(false);\n\n }\n\n\n })\n\n\n}", "title": "" }, { "docid": "8936bc8d6866977490e145aac13a8ca1", "score": "0.68541515", "text": "async function getAll(req, res, next) {\n try {\n const list = await User.findAll();\n res.send(list);\n } catch (error) {\n res.send(error.message);\n }\n}", "title": "" }, { "docid": "2672a292d988a3002af1a1dbaa055f4c", "score": "0.6853361", "text": "function getUsers(req, res) {\n\tvar identity_user_id = req.user.sub; //recoger el id del usuario que este logeado en el momento , consiguiendolo (se vindeo con el middleware se obtiene un objeto completodel usuario quenos mandael token ) del token 'codificado '\n\t\t\t\t\t//propiedad sub ... por que ahi esta el usuario ... asi se obtiene le id del usuario logeado\n\n\t// llegue url la pagina\n\tvar page = 1;\n\tif(req.params.page){\n\t\tpage = req.params.page;\n\t}\n \n //cantidad de usuarios que se mostraron por pagina\n\tvar itemsPerPage = 5; // cinco usuarios por pagina \n\n\tUser.find().sort('_id').paginate(page, itemsPerPage, (err, users, total) => {\n\t\tif(err) return res.status(500).send({message: 'Error en la petición'});\n\n\t\tif(!users) return res.status(404).send({message: 'No hay usuarios disponibles'});\n\t\n\t\treturn res.status(200).send({\n\t\t\tusers, // node interpreta que users: users que users esta dentro de luna propieda users .. para modificar el nombre si se pone con los dos puntos\n\t\t\ttotal,\n\t\t\tpages: Math.ceil(total/itemsPerPage) //numeros de paginas .. redondeo con el num de pages ..para sacar el num se divide total(num total de publicaciones ) entre / la cantidad de items por pag es decir usuarios por pages \n\t\t\t});\n\t\t}); //es una promesa y tiene el metodo then\n\t\t\n}", "title": "" }, { "docid": "5484fa6dc126441887b6e95e7d52e582", "score": "0.68529004", "text": "function getUsers() {\n $.get(\"/api/users\", function(data) {\n renderUserList(data);\n });\n }", "title": "" }, { "docid": "87601734ab06f0cacc60771f7078dd86", "score": "0.68520314", "text": "async function getAll(req, res) {\n if (req.user.role === \"Admin\") {\n const users = await findUsers();\n res.status(200).send(users); \n } else {\n res.sendStatus(401)\n }\n}", "title": "" }, { "docid": "23c439f38361f7ef08092a617487b700", "score": "0.6850806", "text": "static getAllUsers(req, res, next) {\n\t\tif (req.user.meta.role !== userRoles.ADMIN) {\n\t\t\treturn res.status(403).json({\n\t\t\t\ttitle: 'Not authorizied to see this',\n\t\t\t\tstatus: 403\n\t\t\t});\t\t\t\n\t\t}\n\n\t\tlet limit = parseInt(req.query.limit, 10);\n\t\tlet page = parseInt(req.query.page, 10);\n\n \tUsers.find()\n \t.sort({ createdAt: -1 })\n \t.skip(page * limit)\n \t.limit(limit)\n \t.exec((err, result) => {\n \t\tif (err || _.isNil(result) || !_.isArray(result)) {\n\t\t\t\treturn res.status(404).json({\n\t\t\t\t\ttitle: 'Could not find any',\n\t\t\t\t\tstatus: 404\n\t\t\t\t});\n \t\t}\n\t\t\tUsers.count({}, (err, count) => {\n\t\t\t\tif (err) {\n\t\t\t\t\treturn res.status(404).json({\n\t\t\t\t\t\ttitle: 'Could not find any',\n\t\t\t\t\t\tstatus: 404\n\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tres.status(200).json({\n\t\t\t\t\tdata: result,\n\t\t\t\t\tno: count,\n\t\t\t\t\tlinks: {\n\t\t\t\t\t\t_self: '/Users'\n\t\t\t\t\t},\n\t\t\t\t\tmeta: {}\n\t\t\t\t});\n\t\t\t});\n \t});\n\t}", "title": "" }, { "docid": "df700bc4b86bc81bf71397844d66916c", "score": "0.6847327", "text": "* getAll() {\n this.body = yield models.user.find();\n }", "title": "" }, { "docid": "2631744eacc02e25474b383d0ba52ed4", "score": "0.6843586", "text": "readUsers(query, success, fail) {\n api.shared().get('/users?query=' + query, {\n\n })\n .then(function (response) {\n success(response.data);\n })\n .catch(function (error) {\n console.log(error.response)\n if (error.response != undefined) {\n fail(error.response.data);\n }\n });\n }", "title": "" }, { "docid": "d2eb165e0841d196af5d0853cefd885f", "score": "0.6837935", "text": "async getAllUsers() {\n const userCollection = await users();\n const userArr = await userCollection.find({}).toArray();\n\n return userArr;\n }", "title": "" }, { "docid": "297135456066ccb0cd91a46b46078d72", "score": "0.68372464", "text": "function getAllUsers(_, res, next) {\n Users.getAll()\n .then(users => users && users.length ? res.status(200).json({ users }) : next(errors.not_found()))\n .catch(next)\n}", "title": "" }, { "docid": "ea8ec2ae6193a22b86b66634d3f6e32f", "score": "0.68330145", "text": "function getUsers(req, res) {\n User.find({}, 'nombre apellido email img role').exec(\n (err, result) => {\n if (err) return res.status(500).send({\n 'mensaje': 'No se pudieron recuperar los usuarios',\n 'error': err\n });\n res.status(200).send({\n ok: true,\n mensaje: 'Peticion Realizada Correctamente, ruta Usuario',\n Usuarios: result\n });\n });\n}", "title": "" }, { "docid": "2b6cba250703a1c92cf2d6315fe0152b", "score": "0.6832089", "text": "function fetchAllUsers() {\n fetch('http://localhost:3001/users', {method: \"GET\"})\n .then(response => response.json())\n .then(data => setUserList(data));\n }", "title": "" }, { "docid": "5cfb411267fa9aa512cdd7a39ccfd9a0", "score": "0.682784", "text": "function getUsers(){\n console.log('getUsers called');\n grout.Users.get().then(function(app){\n console.log('apps list loaded:', app);\n document.getElementById(\"output\").innerHTML = JSON.stringify(app);\n }, function(err){\n console.error('Error getting users:', err);\n });\n }", "title": "" }, { "docid": "f041060e77547ffe3a8a8cfb5ba72391", "score": "0.6813718", "text": "function getUsers(req, res){\n\n\t// var identity_user_id = req.user.sub;\n\n\t// var page = 1;\n\t// if(req.params.page){\n\t// \tpage = req.params.page;\n\t// }\n\n\t// var itemsPerPage = 5;\n\n\t// User.find().sort('_id').paginate(page, itemsPerPage, (err, users, total) => {\n\t// \tif(err) return res.status(500).send({message: 'Error en la petición'});\n\n\t// \tif(!users) return res.status(404).send({message: 'No hay usuarios disponibles'});\n\n\t// \treturn res.status(200).send({users: users, total: total, page: Math.ceil(total/itemsPerPage)});\n\t// });\n\n\tvar identity_user_id = req.user.sub;\n\n\tvar page = 1;\n\tif(req.params.page){\n\t\tpage = req.params.page;\n\t}\n\n\tvar itemsPerPage = 5;\n\n\tUser.find().sort('_id').paginate(page, itemsPerPage, (err, users, total) => {\n\t\tif(err) return res.status(500).send({message: 'Error en la petición'});\n\n\t\tif(!users) return res.status(404).send({message: 'No hay usuarios disponibles'});\n\n\t\tfollowUserIds(identity_user_id).then((value) => {\n\t\t\treturn res.status(200).send({\n\t\t\t\tusers,\n\t\t\t\tusers_following: value.following,\n\t\t\t\tusers_follow_me: value.followed,\n\t\t\t\ttotal,\n\t\t\t\tpage: Math.ceil(total/itemsPerPage\n\t\t\t)});\n\n\t\t});\n\t\t\n\t});\n\n}", "title": "" }, { "docid": "ca5498e22c1304b2320cfb4243236c1a", "score": "0.6805139", "text": "function index(req, res) {\n console.log('index-users path');\n User.findAll()\n .then(function (users) {\n console.log(users);\n res.status(200).json(users);\n })\n .catch(function (error) {\n console.log(error);\n res.status(500).json(error);\n });\n}", "title": "" }, { "docid": "14b2f6f2d3d82af7f119d8734768534f", "score": "0.6803447", "text": "function getUser(req,res){\n res.json(users);\n}", "title": "" }, { "docid": "a204aeb736845c9c6b83fb73ba59baab", "score": "0.6801774", "text": "getUser() {\n this.app.get('/user/:userId*', (req, res) => {\n const userId = Number(req.params['userId']);\n const user = this.userProvider.getModel(userId);\n if(user) {\n res.status(200);\n res.send(JSON.stringify(user));\n } else {\n res.status(404);\n res.send('No user found with id: ' + userId);\n }\n });\n }", "title": "" }, { "docid": "93b368e4ace88afb36e4fc94cd0e2d04", "score": "0.67951095", "text": "function getUsers(callback) {\n\tconst query = {\n\t\tname: 'get-users',\n\t\ttext: 'SELECT email, username, created_at, updated_at FROM users',\n\t\tvalues: []\n\t};\n\texecuteQueryWithParameters(query, callback);\n}", "title": "" } ]
abefca94aac5bdbdc21059a29a9eabae
Normalized scrollTo & scrollTop
[ { "docid": "12f6e911b3c6d9f2a2bb59dd9b77f01f", "score": "0.0", "text": "function getScrollTop(el) {\n if (isDocumentElement(el)) {\n return window.pageYOffset;\n }\n return el.scrollTop;\n}", "title": "" } ]
[ { "docid": "5880f19c784b144896fcad4e8e941562", "score": "0.7248852", "text": "scrollBehavior(to, from, savedPosition) {\n if(savedPosition) {\n return savedPosition;\n }\n if(to.hash) {\n return {selector: to.hash};\n }\n return {x: 0, y: 700};\n }", "title": "" }, { "docid": "6bc332e0d751315892a580f35351e3a2", "score": "0.7227085", "text": "scrollTop(pos){}", "title": "" }, { "docid": "69697ddba08880e440de1196ebab4dc7", "score": "0.7161555", "text": "scrollBehavior(to, from, savedPosition) {\n if (to.meta.hash === \"target\") {\n return {\n y: 200,\n };\n }\n }", "title": "" }, { "docid": "9800fbf3ed4b7c9e236af3c6a32dd5bc", "score": "0.7003208", "text": "scrollBehavior(to, from, savedPosition) {\n return { top: 0 }\n }", "title": "" }, { "docid": "d809c62fb38802a4e733441abcad2a6e", "score": "0.695466", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n let position = {}\n // 目标页面子组件少于两个\n if (to.matched.length < 2) {\n // 滚动至页面顶部\n position = {\n x: 0,\n y: 0\n }\n } else if (to.matched.some((r) => r.components.default.options.scrollToTop)) {\n // 如果目标页面子组件中存在配置了scrollToTop为true\n position = {\n x: 0,\n y: 0\n }\n }\n // 如果目标页面的url有锚点, 则滚动至锚点所在的位置\n if (to.hash) {\n position = {\n selector: to.hash\n }\n }\n return position\n }\n }", "title": "" }, { "docid": "f35ed797dede84f74a592570e2f02a9e", "score": "0.69145244", "text": "scrollBehavior (to, from, savedPosition) {\n return { x: 0, y: 0 }\n }", "title": "" }, { "docid": "d78dce325ca63194032ebc2736de27fd", "score": "0.68811667", "text": "function scrollTo(c,e,d){d||(d=easeOutCuaic);var a=document.documentElement;if(0===a.scrollTop){var b=a.scrollTop;++a.scrollTop;a=b+1===a.scrollTop--?a:document.body}b=a.scrollTop;0>=e||(\"object\"===typeof b&&(b=b.offsetTop),\"object\"===typeof c&&(c=c.offsetTop),function(a,b,c,f,d,e,h){function g(){0>f||1<f||0>=d?a.scrollTop=c:(a.scrollTop=b-(b-c)*h(f),f+=d*e,setTimeout(g,e))}g()}(a,b,c,0,1/e,20,d))}", "title": "" }, { "docid": "18188b712576b19c965d2519eb1165c4", "score": "0.68476194", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "dfd863ee6db3fbd2778baa48252aad26", "score": "0.68405694", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition;\n } else {\n return { x: 0, y: 0 };\n }\n }", "title": "" }, { "docid": "dfd863ee6db3fbd2778baa48252aad26", "score": "0.68405694", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition;\n } else {\n return { x: 0, y: 0 };\n }\n }", "title": "" }, { "docid": "9e1d83de0b2a2b3c003ae86067ebc82b", "score": "0.6837846", "text": "scrollBehavior (to, from, savedPosition) {\n // native-like behavior when navigating with back/forward buttons\n if (savedPosition) {\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "d91ae5e271107a6d773987788e2b02e9", "score": "0.6835998", "text": "function resolveScrollToPos(cm){var range$$1=cm.curOp.scrollToPos;if(range$$1){cm.curOp.scrollToPos=null;var from=estimateCoords(cm,range$$1.from),to=estimateCoords(cm,range$$1.to);scrollToCoordsRange(cm,from,to,range$$1.margin);}}", "title": "" }, { "docid": "d91ae5e271107a6d773987788e2b02e9", "score": "0.6835998", "text": "function resolveScrollToPos(cm){var range$$1=cm.curOp.scrollToPos;if(range$$1){cm.curOp.scrollToPos=null;var from=estimateCoords(cm,range$$1.from),to=estimateCoords(cm,range$$1.to);scrollToCoordsRange(cm,from,to,range$$1.margin);}}", "title": "" }, { "docid": "fbb4d152ca5eb0ddda3d5ce2f54da880", "score": "0.6826624", "text": "function scrollTo(c,e,d){d||(d=easeOutCuaic);var a=document.documentElement;if(0===a.scrollTop){var b=a.scrollTop;++a.scrollTop;a=b+1===a.scrollTop--?a:document.body;}b=a.scrollTop;0>=e||(\"object\"===typeof b&&(b=b.offsetTop),\"object\"===typeof c&&(c=c.offsetTop),function(a,b,c,f,d,e,h){function g(){0>f||1<f||0>=d?a.scrollTop=c:(a.scrollTop=b-(b-c)*h(f),f+=d*e,setTimeout(g,e));}g();}(a,b,c,0,1/e,20,d));}", "title": "" }, { "docid": "e5114093ea28ec93919e21e1ba91dc44", "score": "0.6799584", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return {\n x: 0,\n y: 0\n }\n }\n }", "title": "" }, { "docid": "1c73ba83211d1417a660befd0d1bfa9b", "score": "0.6793056", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "1c73ba83211d1417a660befd0d1bfa9b", "score": "0.6793056", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "31399fd6e9076443f9ee2b3466d77011", "score": "0.6780038", "text": "scrollBehavior (to, from, savedPosition) {\n\t\treturn { x: 0, y: 0 }\n\t }", "title": "" }, { "docid": "d646f74e296c4bd0ad83383e8cfc9b09", "score": "0.6767132", "text": "function scrollToElement() {\n arguments[0].scrollTop = arguments[1].offsetTop;\n }", "title": "" }, { "docid": "30a549ef77748346c401355e8ec305c2", "score": "0.6707574", "text": "function scrollTo(e,d){if(d>=0){var h=document.documentElement;if(h.scrollTop===0){var t=h.scrollTop;++h.scrollTop;h=t+1===h.scrollTop--?h:document.body}typeof e===\"object\"&&(e=e.offsetTop);scrollToX(h,h.scrollTop,e,0,1/d,20)}}", "title": "" }, { "docid": "b9c61720cdccd1f3506b657621b50c63", "score": "0.6675743", "text": "scrollBehavior(to, from, savedPosition){\n\t\tif(savedPosition){\n\t\t\treturn savedPosition\n\t\t}else{\n\t\t\treturn { x: 0, y: 0 }\n\t\t}\n\t}", "title": "" }, { "docid": "b2afb935414b67c286504240f7645574", "score": "0.66278404", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition;\n }\n if (from.meta.keepAlive) {\n /* eslint-disable */\n from.meta.savedPosition = document.body.scrollTop;\n }\n return { x: 0, y: to.meta.savedPosition || 0 };\n }", "title": "" }, { "docid": "3f9f758f5e5b6f94184d6ea0deb56a9f", "score": "0.6568356", "text": "function smoothScroll() {\n var startY = currentYPosition();\n var stopY = elmYPosition(this.id);\n var distance = stopY > startY ? stopY - startY : startY - stopY;\n // if (distance < 100) {\n // scrollTo(0, stopY);\n // return;\n // }\n\n var speed = Math.round(distance / 20);\n if (speed >= 20) speed = 20;\n var step = Math.round(distance / 25);\n var leapY = stopY > startY ? startY + step : startY - step;\n var timer = 0;\n if (stopY > startY) {\n for (var i = startY; i < stopY; i += step) {\n setTimeout(\"window.scrollTo(0, \" + leapY + \")\", timer * speed);\n leapY += step;\n if (leapY > stopY) leapY = stopY;\n timer++;\n }\n return;\n }\n for (var i = startY; i > stopY; i -= step) {\n setTimeout(\"window.scrollTo(0, \" + leapY + \")\", timer * speed);\n leapY -= step;\n if (leapY < stopY) leapY = stopY;\n timer++;\n }\n}", "title": "" }, { "docid": "b54fe6bb90e6844e76d20c6fc8fd6f4f", "score": "0.6511857", "text": "function ViewportScrollPosition() { }", "title": "" }, { "docid": "a38a6660a569ed3f4564c23ecbba3d76", "score": "0.6504893", "text": "function scrollTop() {\n\treturn document.all ? document.scrollTop : window.pageYOffset;\n}", "title": "" }, { "docid": "b437a80bd1ccf4efb23b7d5fb55a3e21", "score": "0.64996016", "text": "function scrollToOffset(el){\n var offset=50;\n var elTop=$(el).offset().top-selectors.get(\".mCSB_container\").offset().top;\n return elTop-offset;\n }", "title": "" }, { "docid": "dcec50841605988a476fe26f63c3ce3d", "score": "0.6483155", "text": "function scrollToTop(){verticalOffset=\"undefined\"!=typeof verticalOffset?verticalOffset:0,element=$(\"body\"),offset=element.offset(),offsetTop=offset.top,$(\"html, body\").animate({scrollTop:offsetTop},600,\"linear\")}", "title": "" }, { "docid": "5bc7505ebb2d23b171d888135c2b0644", "score": "0.6454332", "text": "scrollBehavior(_, _2, savedPosition) {\n // savedPosition . backbutton\n\n // harus return object wheres the browser scroll to\n if (savedPosition) {\n return savedPosition;\n }\n return { left: 0, top: 0 };\n }", "title": "" }, { "docid": "36e8a130bf9c49fc7fc6290a79ad026b", "score": "0.6452273", "text": "scrollTop () {\n\t\tlet self = venus.dialog;\n\n\t\tif (!self.dialog.iframe) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet iframe = self.dialog.iframe[0];\n\t\tlet top = iframe.contentDocument.documentElement.scrollTop || iframe.contentDocument.body.scrollTop;\n\n\t\tif (top <= 0) {\n\t\t\tif (self.scroll_interval_handle) {\n\t\t\t\tclearInterval(self.scroll_interval_handle);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\ttop = top - self.scroll_by;\n\t\tif (top < 0) {\n\t\t\ttop = 0;\n\t\t}\n\n\t\tiframe.contentWindow.scrollTo(0, top);\n\t}", "title": "" }, { "docid": "bf120d25d425a74ca08bb3b386b500fa", "score": "0.64174265", "text": "smoothScrollTo( scrollToElement ) {\n\n if( scrollToElement.length < 1 ) {\n return;\n }\n\n const new_position = scrollToElement.offset();\n\n $('html, body').stop().animate({ scrollTop: new_position.top }, 500);\n\n }", "title": "" }, { "docid": "14789ad7513cd6ffc711af8f947049e9", "score": "0.64006937", "text": "scrollBehavior(to, from, savedPosition) {\n\t\tif (to.fullPath.indexOf('app') < 0) {\n\t\t\treturn { x: 0, y: 0 }\n\t\t}\n\t}", "title": "" }, { "docid": "91241ddebedd5d3e721104c58834cc8d", "score": "0.63817596", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) { // 当且仅当 popstate 导航 (通过浏览器的 前进/后退 按钮触发) 时才可用。\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "96eb3f416bddce186f21fc05a40050f7", "score": "0.6368941", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "cde086b004d55cc7793c112c2849b667", "score": "0.63566744", "text": "function patchElementScrollTo() {\n Element.prototype.scrollTo = function (optionsOrX, y) {\n handleScrollMethod(this, \"scrollTo\", optionsOrX, y);\n };\n }", "title": "" }, { "docid": "4688d975e5132b78edd0fe83b33485eb", "score": "0.6352665", "text": "function scrollTo(obj) \n{\n var to = convertObj(obj);\n\n $([document.documentElement, document.body]).animate({\n scrollTop: to.offset().top\n }, 500);\n}", "title": "" }, { "docid": "97b3275fb78a2b0f4b6fe263feb9f1af", "score": "0.6341215", "text": "function _scrollTop ()\n {\n var\tnBtnToTopWrap = document.getElementById('btn-to-top-wrap'),\n jBtnToTopWrap = $(nBtnToTopWrap);\n\n if ( jBtnToTopWrap.length > 0 )\n {\n var nBtnToTop = document.getElementById('btn-to-top'),\n jBtnToTop = $(nBtnToTop),\n iOffset = jBtnToTop.data('visible-offset');\n\n jBtnToTop.on('click', function (e) {\n e.preventDefault();\n\n $('body,html').stop().animate({ scrollTop: 0 } , 1500);\n\n return false;\n });\n\n jWindow.on('scroll', throttle(function(e) {\n\n if ( jWindow.scrollTop() > iOffset )\n {\n if ( jBtnToTopWrap.is(\":hidden\") )\n {\n jBtnToTopWrap.fadeIn();\n };\n\n }\n else\n {\n if ( jBtnToTopWrap.is(\":visible\") )\n {\n jBtnToTopWrap.fadeOut();\n };\n };\n\n }, 400)).scroll();\n };\n }", "title": "" }, { "docid": "f0ce051edcf711b4ebe9a22a86a80d63", "score": "0.6334594", "text": "function scrollTop() {\n var html = document.getElementsByTagName('html')[0];\n if (html.scrollTop && document.body.scrollTop) {\n return html.scrollTop;\n } else if (html.scrollTop || document.body.scrollTop)\n return html.scrollTop + document.body.scrollTop;\n return 0;\n}", "title": "" }, { "docid": "4d422788783f26dc4b504c74ac5b64d8", "score": "0.6301429", "text": "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n\t }", "title": "" }, { "docid": "4d422788783f26dc4b504c74ac5b64d8", "score": "0.6301429", "text": "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n\t }", "title": "" }, { "docid": "7b6c62e308631fa41cb54826fb43745a", "score": "0.6297684", "text": "function smoothScrollTo() {\r\n window.scrollTo({ top: 0, behavior: \"smooth\" });\r\n}", "title": "" }, { "docid": "69f10e46993230d5f09a4efbeb510f57", "score": "0.62914824", "text": "get scrollToCoordinate() {\n return this.$$.ctx[31];\n }", "title": "" }, { "docid": "c6afca2e6a90a22311888c9d40c8db93", "score": "0.6291101", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve(savedPosition)\n }, 500)\n })\n }\n }", "title": "" }, { "docid": "0868fcbc4010f6b2b8430643654eba8c", "score": "0.62895584", "text": "function myscrollTo() {\n\tconsole.log(event);\n\t$(window).scrollTo(\n\t\t$($(this).data('goto')),\n\t\t{duration: 800,\n\t\toffset: -70 }\n\t\t);\n}", "title": "" }, { "docid": "b288b7581ec30bbfc0bfaf587ecd0125", "score": "0.6278986", "text": "function smoothScroll(eID) {\n var startY = currentYPosition();\n var stopY = elmYPosition(eID);\n var distance = stopY > startY ? stopY - startY : startY - stopY;\n if (distance < 100) {\n scrollTo(0, stopY);\n return;\n }\n var speed = Math.round(distance / 100);\n if (speed >= 20) speed = 20;\n var step = Math.round(distance / 25);\n var leapY = stopY > startY ? startY + step : startY - step;\n var timer = 0;\n if (stopY > startY) {\n for (var i = startY; i < stopY; i += step) {\n setTimeout(\"window.scrollTo(0, \" + leapY + \")\", timer * speed);\n leapY += step;\n if (leapY > stopY) leapY = stopY;\n timer++;\n }\n return;\n }\n for (var i = startY; i > stopY; i -= step) {\n setTimeout(\"window.scrollTo(0, \" + leapY + \")\", timer * speed);\n leapY -= step;\n if (leapY < stopY) leapY = stopY;\n timer++;\n }\n return false;\n}", "title": "" }, { "docid": "68822737e271c4d5a8d92809760d0eed", "score": "0.62660384", "text": "[scroll]() {\n if (!this.scrollableElement || !this.currentMousePosition) {\n return;\n }\n\n cancelAnimationFrame(this.scrollAnimationFrame);\n\n const { speed, sensitivity } = this.options;\n\n const rect = this.scrollableElement.getBoundingClientRect();\n const bottomCutOff = rect.bottom > window.innerHeight;\n const topCutOff = rect.top < 0;\n const cutOff = topCutOff || bottomCutOff;\n\n const documentScrollingElement = getDocumentScrollingElement();\n const scrollableElement = this.scrollableElement;\n const clientX = this.currentMousePosition.clientX;\n const clientY = this.currentMousePosition.clientY;\n\n if (scrollableElement !== document.body && scrollableElement !== document.documentElement && !cutOff) {\n const { offsetHeight, offsetWidth } = scrollableElement;\n\n if (rect.top + offsetHeight - clientY < sensitivity) {\n scrollableElement.scrollTop += speed;\n } else if (clientY - rect.top < sensitivity) {\n scrollableElement.scrollTop -= speed;\n }\n\n if (rect.left + offsetWidth - clientX < sensitivity) {\n scrollableElement.scrollLeft += speed;\n } else if (clientX - rect.left < sensitivity) {\n scrollableElement.scrollLeft -= speed;\n }\n } else {\n const { innerHeight, innerWidth } = window;\n\n if (clientY < sensitivity) {\n documentScrollingElement.scrollTop -= speed;\n } else if (innerHeight - clientY < sensitivity) {\n documentScrollingElement.scrollTop += speed;\n }\n\n if (clientX < sensitivity) {\n documentScrollingElement.scrollLeft -= speed;\n } else if (innerWidth - clientX < sensitivity) {\n documentScrollingElement.scrollLeft += speed;\n }\n }\n\n this.scrollAnimationFrame = requestAnimationFrame(this[scroll]);\n }", "title": "" }, { "docid": "1fbdde0499932bc2102c6989abfdf80a", "score": "0.6262158", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "7ed339edc3fc6e283baf41f4ea5eda5c", "score": "0.6255813", "text": "onScroll(e) {\n let scrollTop = e.target.scrollTop;\n if (this._silent || this.smoothScroll.running || Math.abs(scrollTop - this.smoothScroll.target) <= 0.5 || !this.props.onScroll) return;\n this.props.onScroll(scrollTop);\n }", "title": "" }, { "docid": "343a63a540d5736b02f686d38c0acf37", "score": "0.6244081", "text": "function handleScroll() {\n // scrollTotal is de totale waarde van hoe ver iemand kan scrollen op de pagina. De Rootelement.scrollheigt is de height van de hele pagina en de rootElement.clientheight \n //is de grote van het scherm voor de gebruiker\n var scrollTotal = rootElement.scrollHeight - rootElement.clientHeight;\nconsole.log(rootElement.scrollTop / scrollTotal);\n // scrollTop is waar de gebruiker op de pagina is. \n if ((rootElement.scrollTop / scrollTotal) > 0.60) {\n // Toon button\n scrollToTopBtn.classList.add(\"showBtn\");\n } else {\n // zo niet verberg button\n scrollToTopBtn.classList.remove(\"showBtn\");\n }\n}", "title": "" }, { "docid": "f4b2775f265d823773e69e06498318b0", "score": "0.6243648", "text": "_scrollToItem(idx){const item=this.items[idx];if(!item){return}const props=this._vertical?[\"top\",\"bottom\"]:[\"left\",\"right\"],scrollerRect=this._scrollerElement.getBoundingClientRect(),nextItemRect=(this.items[idx+1]||item).getBoundingClientRect(),prevItemRect=(this.items[idx-1]||item).getBoundingClientRect();let scrollDistance=0;if(nextItemRect[props[1]]>=scrollerRect[props[1]]){scrollDistance=nextItemRect[props[1]]-scrollerRect[props[1]]}else if(prevItemRect[props[0]]<=scrollerRect[props[0]]){scrollDistance=prevItemRect[props[0]]-scrollerRect[props[0]]}this._scroll(scrollDistance)}", "title": "" }, { "docid": "f4b2775f265d823773e69e06498318b0", "score": "0.6243648", "text": "_scrollToItem(idx){const item=this.items[idx];if(!item){return}const props=this._vertical?[\"top\",\"bottom\"]:[\"left\",\"right\"],scrollerRect=this._scrollerElement.getBoundingClientRect(),nextItemRect=(this.items[idx+1]||item).getBoundingClientRect(),prevItemRect=(this.items[idx-1]||item).getBoundingClientRect();let scrollDistance=0;if(nextItemRect[props[1]]>=scrollerRect[props[1]]){scrollDistance=nextItemRect[props[1]]-scrollerRect[props[1]]}else if(prevItemRect[props[0]]<=scrollerRect[props[0]]){scrollDistance=prevItemRect[props[0]]-scrollerRect[props[0]]}this._scroll(scrollDistance)}", "title": "" }, { "docid": "eb9db6ba41b2ef8d561fca845d7fa684", "score": "0.62352926", "text": "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "0b9f3671bf2e5206724cd8f3918cc5e4", "score": "0.6225094", "text": "scrollToOffset(params) {\n var animated = params.animated,\n offset = params.offset;\n if (this._scrollRef == null) {\n return;\n }\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n this._scrollRef.scrollTo(horizontalOrDefault(this.props.horizontal) ? {\n x: offset,\n animated\n } : {\n y: offset,\n animated\n });\n }", "title": "" }, { "docid": "5b016de68a932f99f44d0fb894596817", "score": "0.6220631", "text": "function _scrollTo( top ) {\n $( 'html, body' ).animate({ scrollTop: top }, 'slow', 'easeInOutSine' );\n }", "title": "" }, { "docid": "22bad76a29d30c8563ea6ce0ab5b49d8", "score": "0.62183994", "text": "function scrollTop() {\n var top = $('body').scrollTop();\n if (top == 0) { return $('html').scrollTop(); }\n else { return top; }\n }", "title": "" }, { "docid": "b3494b72311f035528d5442e4be2101c", "score": "0.62144196", "text": "function scrollTop() {\n setTimeout(() => {\n window.scrollTo(0, 0);\n }, 100);\n}", "title": "" }, { "docid": "9d248b0da6ab876b078dafd49c016a74", "score": "0.6206318", "text": "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from),\n to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "13fce69c0d485dbcb69dc86f7734588f", "score": "0.6204663", "text": "function patchWindowScrollTo() {\n window.scrollTo = function (optionsOrX, y) {\n handleScrollMethod(this, \"scrollTo\", optionsOrX, y);\n };\n }", "title": "" }, { "docid": "f675680e23d654e38846e76aaaf9b5d7", "score": "0.6197625", "text": "static coreScrollTo() {\n jQuery('[data-toggle=\"scroll-to\"]:not(.js-scroll-to-enabled)').on('click.pixelcave.helpers.core', (e) => {\n e.stopPropagation();\n\n // Set variables\n let lHeader = jQuery('#page-header');\n let el = jQuery(e.currentTarget);\n let elTarget = el.data('target') || el.attr('href');\n let elSpeed = el.data('speed') || 500;\n let elOffset = el.data('offset') || 0;\n\n // Add .js-scroll-to-enabled class to tag it as activated\n el.addClass('js-scroll-to-enabled');\n\n // Scroll to element\n jQuery('html, body').animate({\n scrollTop: jQuery(elTarget).offset().top - elOffset\n }, elSpeed);\n });\n }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "title": "" }, { "docid": "9cb847c663026778308291ed893b8692", "score": "0.6191431", "text": "function windowsScrolling() {\n window.scrollTo({\n top: scrollingTo,\n behavior: 'smooth',\n });\n scrollingTo = refs.galleryContainer.lastElementChild.offsetTop + 256; \n }", "title": "" }, { "docid": "5a5f7ad8c758c9c4662fe615c678f803", "score": "0.61901355", "text": "function _scrollTo() {\n $('a[href^=\"#\"]').on('click', function(e) {\n var target = $( $(this).attr('href') );\n e.preventDefault();\n if (target.length) {\n $html.add($body).animate({\n scrollTop: target.offset().top\n }, __scrollToSpeed, __scrollToEase);\n }\n });\n $(window).on('beforeunload', function() {\n $(window).scrollTop(0); \n });\n }", "title": "" }, { "docid": "7e94f6963111ddec84b877294172be71", "score": "0.6187647", "text": "function _calcScrollToOffset(size, scrollOffset) {\n\t var scrollToRenderNode = this._scroll.scrollToRenderNode || this._scroll.ensureVisibleRenderNode;\n\t if (!scrollToRenderNode) {\n\t return;\n\t }\n\t\n\t // 1. When boundary is reached, stop scrolling in that direction\n\t if ((this._scroll.boundsReached === Bounds.BOTH) ||\n\t (!this._scroll.scrollToDirection && (this._scroll.boundsReached === Bounds.PREV)) ||\n\t (this._scroll.scrollToDirection && (this._scroll.boundsReached === Bounds.NEXT))) {\n\t return;\n\t }\n\t\n\t // 2. Find the node to scroll to\n\t var foundNode;\n\t var scrollToOffset = 0;\n\t var node = this._nodes.getStartEnumNode(true);\n\t var count = 0;\n\t while (node) {\n\t count++;\n\t if (!node._invalidated || (node.scrollLength === undefined)) {\n\t break;\n\t }\n\t if (this.options.alignment) {\n\t scrollToOffset -= node.scrollLength;\n\t }\n\t if (node.renderNode === scrollToRenderNode) {\n\t foundNode = node;\n\t break;\n\t }\n\t if (!this.options.alignment) {\n\t scrollToOffset -= node.scrollLength;\n\t }\n\t node = node._next;\n\t }\n\t if (!foundNode) {\n\t scrollToOffset = 0;\n\t node = this._nodes.getStartEnumNode(false);\n\t while (node) {\n\t if (!node._invalidated || (node.scrollLength === undefined)) {\n\t break;\n\t }\n\t if (!this.options.alignment) {\n\t scrollToOffset += node.scrollLength;\n\t }\n\t if (node.renderNode === scrollToRenderNode) {\n\t foundNode = node;\n\t break;\n\t }\n\t if (this.options.alignment) {\n\t scrollToOffset += node.scrollLength;\n\t }\n\t node = node._prev;\n\t }\n\t }\n\t\n\t // 3. Update springs\n\t if (foundNode) {\n\t if (this._scroll.ensureVisibleRenderNode) {\n\t if (this.options.alignment) {\n\t if ((scrollToOffset - foundNode.scrollLength) < 0) {\n\t this._scroll.springPosition = scrollToOffset;\n\t this._scroll.springSource = SpringSource.ENSUREVISIBLE;\n\t }\n\t else if (scrollToOffset > size[this._direction]) {\n\t this._scroll.springPosition = size[this._direction] - scrollToOffset;\n\t this._scroll.springSource = SpringSource.ENSUREVISIBLE;\n\t }\n\t else {\n\t if (!foundNode.trueSizeRequested) {\n\t this._scroll.ensureVisibleRenderNode = undefined;\n\t }\n\t }\n\t }\n\t else {\n\t scrollToOffset = -scrollToOffset;\n\t if (scrollToOffset < 0) {\n\t this._scroll.springPosition = scrollToOffset;\n\t this._scroll.springSource = SpringSource.ENSUREVISIBLE;\n\t }\n\t else if ((scrollToOffset + foundNode.scrollLength) > size[this._direction]) {\n\t this._scroll.springPosition = size[this._direction] - (scrollToOffset + foundNode.scrollLength);\n\t this._scroll.springSource = SpringSource.ENSUREVISIBLE;\n\t }\n\t else {\n\t if (!foundNode.trueSizeRequested) {\n\t this._scroll.ensureVisibleRenderNode = undefined;\n\t }\n\t }\n\t }\n\t }\n\t else { // scrollToSequence\n\t this._scroll.springPosition = scrollToOffset;\n\t this._scroll.springSource = SpringSource.GOTOSEQUENCE;\n\t }\n\t return;\n\t }\n\t\n\t // 4. When node not found, keep searching\n\t if (this._scroll.scrollToDirection) {\n\t this._scroll.springPosition = scrollOffset - size[this._direction];\n\t this._scroll.springSource = SpringSource.GOTONEXTDIRECTION;\n\t\n\t }\n\t else {\n\t this._scroll.springPosition = scrollOffset + size[this._direction];\n\t this._scroll.springSource = SpringSource.GOTOPREVDIRECTION;\n\t }\n\t\n\t // 5. In case of a VirtualViewSequnce, make sure all the view-sequence nodes are touched, so\n\t // that they are not cleaned up.\n\t if (this._viewSequence.cleanup) {\n\t var viewSequence = this._viewSequence;\n\t while (viewSequence.get() !== scrollToRenderNode) {\n\t viewSequence = this._scroll.scrollToDirection ? viewSequence.getNext(true) : viewSequence.getPrevious(true);\n\t if (!viewSequence) {\n\t break;\n\t }\n\t }\n\t }\n\t }", "title": "" }, { "docid": "b69226b1e87168405a77114e142d1cb7", "score": "0.61834854", "text": "function toScroll() {\r\n\tlet coef = $('html')[0].scrollTop / $('html')[0].scrollHeight;\r\n\r\n\tif(Tools.range(coef, .05, .9))\r\n\t\t$('#upper').fadeIn()\r\n\r\n\telse\r\n\t\t$('#upper').fadeOut();\r\n}", "title": "" }, { "docid": "8b69ccb7783f9e1838b1fda885e12cf7", "score": "0.6174327", "text": "function resolveScrollToPos(cm) {\n\t var range = cm.curOp.scrollToPos;\n\t if (range) {\n\t cm.curOp.scrollToPos = null;\n\t var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n\t Math.min(from.top, to.top) - range.margin,\n\t Math.max(from.right, to.right),\n\t Math.max(from.bottom, to.bottom) + range.margin);\n\t cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n\t }\n\t }", "title": "" }, { "docid": "8b69ccb7783f9e1838b1fda885e12cf7", "score": "0.6174327", "text": "function resolveScrollToPos(cm) {\n\t var range = cm.curOp.scrollToPos;\n\t if (range) {\n\t cm.curOp.scrollToPos = null;\n\t var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n\t Math.min(from.top, to.top) - range.margin,\n\t Math.max(from.right, to.right),\n\t Math.max(from.bottom, to.bottom) + range.margin);\n\t cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n\t }\n\t }", "title": "" }, { "docid": "efcf74c099d5354c6aae3186633eeef6", "score": "0.6173049", "text": "function consultio_scroll_to_top() {\n if (scroll_top < window_height) {\n $('.scroll-top').addClass('off').removeClass('on');\n }\n if (scroll_top > window_height) {\n $('.scroll-top').addClass('on').removeClass('off');\n }\n }", "title": "" }, { "docid": "ad09e1254eb7ba1161f84b55df142a24", "score": "0.6167204", "text": "get _clampedScrollTop(){return Math.max(0,this._scrollTop);}", "title": "" }, { "docid": "77116d3568ddb7c870c2b7cccdba404a", "score": "0.6160291", "text": "static scrollToTop(){$('html,body').animate({scrollTop:0},0)}", "title": "" }, { "docid": "92313c893ba1fb3752358f2d5521f739", "score": "0.6157771", "text": "_scrollToActive() {\n // Wait for the animation to complete\n setTimeout(() => {\n const top = this._current.getBoundingClientRect().top;\n\n if (top <= 60) {\n scrollTo.top(doc(), offsetTop(this._current) - 74, { ease: inOutSine });\n }\n }, 500);\n }", "title": "" }, { "docid": "7124fba8f8eda7354cc0555f90313b9d", "score": "0.61503863", "text": "smoothScroll(target) {\n\t\tvar scrollContainer = target;\n\t\tdo { //find scroll container\n\t\t\t// console.log('scroll 1');\n\t\t\t\tscrollContainer = scrollContainer.parentNode;\n\t\t\t\tif (!scrollContainer) return;\n\t\t\t\tscrollContainer.scrollTop += 1;\n\t\t} while (scrollContainer.scrollTop == 0);\n\t\t// console.log('scroll 2');\n\t\tvar targetY = 0;\n\t\tdo { //find the top of target relatively to the container\n\t\t\t// console.log('scroll 3');\n\t\t\t\tif (target == scrollContainer) break;\n\t\t\t\ttargetY += target.offsetTop;\n\t\t} while (target = target.offsetParent);\n\t\t\n\t\t// start scrolling\n\t\tthis.scroll(scrollContainer, scrollContainer.scrollTop, targetY, 0);\n\t}", "title": "" }, { "docid": "71fafab9eb6b42d0a420f711a61135ff", "score": "0.614257", "text": "function scrollTop() {\n window.scrollTo(0, 0);\n}", "title": "" }, { "docid": "4d1f826ae0c6f0ca0fa0f690dc287b72", "score": "0.61389995", "text": "function smoothScrollingToElement(scrollFrom, scrollTo) {\n $(scrollFrom).on(\"click\", function(e) {\n\t\t e.preventDefault();\n scrollTo = $(scrollTo);\n $('html, body').animate({\n scrollTop: scrollTo.offset().top\n }, 600);\n });\n }", "title": "" }, { "docid": "d880316892ca6a63543b851d5f2aa076", "score": "0.6133983", "text": "function scrollToTop() {\n var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n scrollToY(0, duration, document.documentElement);\n }", "title": "" }, { "docid": "f25684938afd2729f5d635d4d235e881", "score": "0.6133101", "text": "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "title": "" }, { "docid": "a2ad295c74b154b7b30c440e2ab8e447", "score": "0.61288154", "text": "function scroll_to($step) {\n\t\t$('html, body').animate({scrollTop: $step.offset().top - 60}, 750);\n\t}", "title": "" }, { "docid": "04eb4ec51c220ae5d67eb4d527b1eb11", "score": "0.6127793", "text": "function WindowScrollTopAnimation(target, speed){\n $('body').animate({scrollTop:$(target).position().top+10}, speed);\n}", "title": "" }, { "docid": "a20926b7ed575dc3096596f4c20620f5", "score": "0.61273193", "text": "handleScroll(event) {\n const target = event.target;\n const cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n // Used when figuring out whether an element is inside the scroll parent. If the scrolled\n // parent is the `document`, we use the `documentElement`, because IE doesn't support\n // `contains` on the `document`.\n const scrolledParentNode = target === this._document ? target.documentElement : target;\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop;\n let newLeft;\n if (target === this._document) {\n const viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n }\n else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n const topDifference = scrollPosition.top - newTop;\n const leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach((position, node) => {\n if (position.clientRect && target !== node && scrolledParentNode.contains(node)) {\n adjustClientRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return { top: topDifference, left: leftDifference };\n }", "title": "" }, { "docid": "851ed2819029b56370fe93b5813a2278", "score": "0.611779", "text": "function n(e,t,n,a,r){var c=function(){var c=e.scroll().position.y,o=t.host.clientHeight,i=n.clientHeight;c?c+o==a&&e.scroll({y:i-o},r.duration,r.easing):e.scroll({y:i-a}),a=i};return c}", "title": "" }, { "docid": "d73063ee1df18cfe39ecba84041a5e3b", "score": "0.61144507", "text": "function smoothScrollTop() {\n\tconsole.log(\"Called!\");\n\tlet currentScroll = document.documentElement.scrollTop || document.body.scrollTop;\n\tif (currentScroll > 0) {\n\t\twindow.requestAnimationFrame(smoothScrollTop);\n\t\twindow.scrollTo(0, currentScroll - (currentScroll/5));\n\t}\n}", "title": "" }, { "docid": "d8b14c7fa3b2e4f59bea511621b289ed", "score": "0.6113579", "text": "function goToByScroll(dataslide) {\n\t\t\t\t\thtmlbody.animate({\n\t\t\t\t\t\t\tscrollTop: $('.slide[data-slide=\"' + dataslide + '\"]').offset().top\n\t\t\t\t\t}, 2000, 'easeInOutQuint');\n\t\t\t}", "title": "" }, { "docid": "6499ba9c9f43e2aaab7f968c51de3810", "score": "0.6106822", "text": "static _getYOffsetViewport(elem) {\n return elem.getBoundingClientRect().top; //+ _WINDOW_SCROLL_POSITION_;\n }", "title": "" }, { "docid": "1868698b041a1462f765cecec3f690e8", "score": "0.6102684", "text": "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2)\n\t if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop) }\n\t if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft) }\n\t}", "title": "" }, { "docid": "1868698b041a1462f765cecec3f690e8", "score": "0.6102684", "text": "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2)\n\t if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop) }\n\t if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft) }\n\t}", "title": "" }, { "docid": "3ec70077cb0841a12078c81b5d2fca1c", "score": "0.61001575", "text": "_scrollToFocused({target}) {\n setTimeout(() => target.parentNode[scrollMethod](true), 0);\n }", "title": "" }, { "docid": "4975abd87fae2a7c420041af0364e4d4", "score": "0.609869", "text": "function scrollToFromTo(element, from, to, duration) {\n if (duration <= 0) {\n return;\n }\n if (typeof from === 'object') {\n from = from.offsetTop;\n }\n if (typeof to === 'object') {\n to = to.offsetTop;\n }\n createScrollWithAnimation(element, from, to, 0, 1 / duration, 20, easeOutCuaic);\n }", "title": "" }, { "docid": "8a4dfd90011997b3eed3f3c4cfb4998f", "score": "0.6094382", "text": "scrollBehavior(to) {\n const { meta = {} } = to;\n const { scrollToTop = true } = meta;\n if (scrollToTop == false) {\n return;\n }\n return new Promise(resolve => {\n window.requestAnimationFrame(() => {\n const main = window.document.querySelector(\"div[data-fd-main-content]\");\n if (main != null) {\n main.scrollIntoView(/* alignToTop */ true);\n }\n resolve();\n });\n });\n }", "title": "" }, { "docid": "ffa84f884f9efdcd711210a75d4a965c", "score": "0.6089741", "text": "function scrollIntoView(cm, x1, y1, x2, y2) {\r\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\r\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\r\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\r\n }", "title": "" }, { "docid": "2b2ed6fa454f6fc8481d454d6abd4225", "score": "0.6087056", "text": "function scrollTo(element,to,duration,callback){var start=getScrolledPosition(element);var change=to-start;var currentTime=0;var increment=20;activeAnimation=true;var animateScroll=function animateScroll(){if(activeAnimation){//in order to stope it from other function whenever we want\nvar val=to;currentTime+=increment;if(duration){val=window.fp_easings[options.easing](currentTime,start,change,duration);}setScrolling(element,val);if(currentTime<duration){setTimeout(animateScroll,increment);}else if(typeof callback!=='undefined'){callback();}}else if(currentTime<duration){callback();}};animateScroll();}", "title": "" }, { "docid": "5926b23f1a573818d7b94dafea3b6852", "score": "0.6081302", "text": "function _calcTargetPos() {\n\n // document height/widths\n var contentHeight = _settings.wrapper ? _settings.wrapper.children('.smoothScrollContainer').outerHeight() : $( document ).outerHeight();\n var wrapperHeight = _settings.wrapper ? _settings.wrapper.outerHeight() : $( window ).outerHeight();\n var targetPos = _settings.wrapper ? _settings.target.position().top : _settings.target.offset().top;\n\n if ( targetPos > (contentHeight - wrapperHeight) ) {\n targetPos = contentHeight - wrapperHeight;\n }\n\n // set scroll length\n targetPos = targetPos < 0 ? 0 : Math.ceil( targetPos );\n\n // offset\n targetPos = typeof _settings.offset === 'number' ? targetPos + _settings.offset : targetPos;\n console.log(_settings.offset);\n // return scroll a\n return targetPos;\n }", "title": "" }, { "docid": "0c7980acdec2c87a98900314c9b2401e", "score": "0.60795754", "text": "function _calcCurrentPos(){\t\t\t\n\t\t\treturn _settings.wrapper ? Math.ceil(_settings.wrapper.scrollTop()) : Math.ceil($(window).scrollTop());\n\t\t}", "title": "" } ]
e7984773933f20df2d1d97d1a1d29b9f
Disabling the simulation control buttons and the tape input.
[ { "docid": "fe20aa96e8d48a6d131bfc32e280c71c", "score": "0.74462014", "text": "function disable_buttons()\n {\n \n $('#step').prop('disabled', true);\n $('#run').prop('disabled', true);\n $('#finish').prop('disabled', true);\n $('#tape_input').prop('disabled', true);\n }", "title": "" } ]
[ { "docid": "27b4437bcaadf4c041b441aeff07d2e8", "score": "0.7215474", "text": "function turnOff() {\n Simon.resetStep();\n if (Simon.strictMode) {\n toggleStrict();\n }\n Simon.pattern = [];\n updateScore('&nbsp;');\n $buttons.prop('disabled', true);\n }", "title": "" }, { "docid": "da0694908199542e5e67e16db338b4ff", "score": "0.69708925", "text": "function disableStepBtns() {\n disableIncStepBtn();\n disableDecStepBtn();\n}", "title": "" }, { "docid": "3d186b171295c1f61c5ea22217f4e057", "score": "0.69454557", "text": "function disable() {\n\thideIcon(false);\n\thideLabel(false);\n\thideArrow(false);\n}", "title": "" }, { "docid": "d9f6477f54f12b9d6df257375736d6ba", "score": "0.69387066", "text": "function disableActions() {\r\n hit.disabled = true;\r\n holdHand.disabled = true;\r\n newgame.disabled = false;\r\n }", "title": "" }, { "docid": "1f51f3308a52df2b06a465dff27d95da", "score": "0.6926651", "text": "disable() { }", "title": "" }, { "docid": "14313b789f9d7e907f08ef5e9e0561a0", "score": "0.6879826", "text": "disable() {\n\t\tthis.toggle(false);\n\t}", "title": "" }, { "docid": "92de0d0fab3f2094fe18e4ecdbfe4603", "score": "0.6878667", "text": "function disable() {\n enabled = false;\n }", "title": "" }, { "docid": "722c90aa60cbe2372d06543415f409f2", "score": "0.6845456", "text": "function disable() {\n instance.state.isEnabled = false;\n }", "title": "" }, { "docid": "9ab96f58c6df01a4a11f87f88c6c8f2a", "score": "0.68167675", "text": "function disable() {\n instance.state.isEnabled = false;\n }", "title": "" }, { "docid": "7356f22dfddc1dff24fedd19fccec315", "score": "0.68056965", "text": "disable() {\n this._disabled = true;\n this._animation.stop();\n this.emit('clear');\n }", "title": "" }, { "docid": "3a6f96363315abaceccabdc7f8e04a22", "score": "0.679586", "text": "function Disable() {\n\tmainMenuElements.SetActive(false);\n\tsingleplayerElements.SetActive(false);\n\tmultiplayerElements.SetActive(false);\n\toptionsElements.SetActive(false);\n}", "title": "" }, { "docid": "6b0458e95c09a39490a8c62c23ee2017", "score": "0.6787028", "text": "disable () {\n this.enabled= false;\n }", "title": "" }, { "docid": "3c0560a83cdf7f778eb14a0138e589f7", "score": "0.6761751", "text": "hamButtonsOff() { this.enableAllHamButtons(); }", "title": "" }, { "docid": "2c5eff1df4f12f7dd58671d5b86f21a2", "score": "0.67150396", "text": "function generateOff() {\n handleClearButton.disabled = false;\n handleReadTextButton.disabled = false;\n handleSubmitButton.disabled = true;\n}", "title": "" }, { "docid": "c3fa453de3568824d037b2ce392a6248", "score": "0.67079026", "text": "disable() {\n if (!this.isEnabled) return\n this.isEnabled = false\n }", "title": "" }, { "docid": "cd21e0982c7a251a8b3e121763a4b797", "score": "0.66860116", "text": "disable() {\n this.stopTouching_();\n this.events_.removeAll();\n }", "title": "" }, { "docid": "2754ba7a6d7279f02b059c1f2b312f4f", "score": "0.66659576", "text": "disable() {\n this.eButtonStartStop_.disabled = true;\n }", "title": "" }, { "docid": "9809df98133a1704df14eed1555323e6", "score": "0.66569275", "text": "function preventPlayMode(){\n\n $(\".btn\").each(function(index, element){\n $(element).attr(\"disabled\", true);\n });\n\n $(\".btn-stop\").attr(\"disabled\", false);\n\n }", "title": "" }, { "docid": "666791f6449662ca10c8582239bafe9b", "score": "0.66348404", "text": "disable() {\n\t // leave empty in Widget.js\n\t }", "title": "" }, { "docid": "4cf5d33137c61ee5f51244a238dd46bc", "score": "0.6629821", "text": "function disableHitHold() {\n hitButton.disabled = true;\n holdButton.disabled = true;\n}", "title": "" }, { "docid": "2988ef45b4ba0086348bf6d4005c03c1", "score": "0.6601978", "text": "function arm() {\r\n document.getElementById(\"launchButton\").disabled = true;\r\n document.getElementById(\"abortButton\").disabled = false;\r\n}", "title": "" }, { "docid": "88b95ba822514ff93071235649f97830", "score": "0.6600811", "text": "pause() {\n this.disable = true;\n }", "title": "" }, { "docid": "7fe90d0de33e56c84f099d7f589b312a", "score": "0.6590466", "text": "function disable() {\n\t/* \n\tWe call the destroy function inside the object button\n\ttherefore the button is remove from the panel\n\t*/\n\tbutton.destroy();\t\n}", "title": "" }, { "docid": "6f1a9014f876b5e33be8ae2129df9119", "score": "0.6578669", "text": "function disableConway() {\n\tconwayOn = false;\n\tconwayB.textContent = \"run\";\n\tbirthForm.disabled = false;\n\tsurvivalForm.disabled = false;\n\turlB.disabled = false;\n\tGB.disabled = false;\n\tDB.disabled = false;\n }", "title": "" }, { "docid": "a78523aafc6576573f1bdde6fc26842f", "score": "0.65648013", "text": "disable() {\n var self = this;\n self.input.disabled = true;\n self.control_input.disabled = true;\n self.control_input.tabIndex = -1;\n self.isDisabled = true;\n self.lock();\n }", "title": "" }, { "docid": "9ca33229676306658493940e58974989", "score": "0.6539689", "text": "disableDrag() {\n this.dragControlVertical.enabled = false;\n this.dragControlHorizontal.enabled = false;\n }", "title": "" }, { "docid": "b516e25d3274ab33d76696bc9316ea5b", "score": "0.65364045", "text": "function disableButtons() {\n\tdocument.getElementById('btn-roll').disabled = true;\n\tdocument.getElementById('btn-stop').disabled = true;\n\tdocument.getElementById('btn-reset').disabled = true;\n\tdocument.getElementById('points-to-stop').disabled = true;\n}", "title": "" }, { "docid": "269909b8c2ed124861afc582bdb5c420", "score": "0.6512473", "text": "enable() {\n this.eButtonStartStop_.disabled = false;\n }", "title": "" }, { "docid": "9c2515fff464815c8108d5abb70edf13", "score": "0.65029454", "text": "disable () {\n this.hook.disable()\n }", "title": "" }, { "docid": "b93be21d56c57ecddd2fadde0265627d", "score": "0.64794356", "text": "disable() {\n this.disabled = true;\n }", "title": "" }, { "docid": "cd50b9924af07e3eb239cec90a324810", "score": "0.6467314", "text": "disable() {\n super.disable();\n }", "title": "" }, { "docid": "32d50b73456ec23790ec81966e7e54d3", "score": "0.6461936", "text": "function disableButtons (p1Attack,p1Heal,p1Yield,p2Attack,p2Heal,p2Yield){\n\n p1Attack.disabled = true;\n p1Heal.disabled = true;\n p1Yield.disabled = true;\n\n p2Attack.disabled = false;\n p2Heal.disabled = false;\n p2Yield.disabled =false;\n \n\n}", "title": "" }, { "docid": "ce211995e5dcd62f5827c034716df4d1", "score": "0.6460979", "text": "function toggleControls() {\n $(\"#selectAlgorithmDrop\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n $(\"#selectHeuristicsDrop\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n $(\"#selectObstaclesDrop\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n $(\"#controlButton\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n\n $(\"#clearCanvas\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n $(\"#pencil\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n $(\"#eraser\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n $(\"#diagonals\").prop(\"disabled\", function (i, v) {\n return !v;\n });\n}", "title": "" }, { "docid": "c633f8f253aa1022d5fa005a86c2a188", "score": "0.6460244", "text": "enable() {\n this.disabled = false;\n }", "title": "" }, { "docid": "c633f8f253aa1022d5fa005a86c2a188", "score": "0.6460244", "text": "enable() {\n this.disabled = false;\n }", "title": "" }, { "docid": "c633f8f253aa1022d5fa005a86c2a188", "score": "0.6460244", "text": "enable() {\n this.disabled = false;\n }", "title": "" }, { "docid": "b01ac02b9cb196bebca7b4e99a98f3b7", "score": "0.64577997", "text": "function enableButtons() {\n $('#play').attr('disabled', false);\n $('#step').attr('disabled', false);\n}", "title": "" }, { "docid": "e999831113de309bbb9bfefd4fc9306a", "score": "0.6453916", "text": "disable() {\n this.mapContControls.current.style.pointerEvents = 'none';\n this.state.disabled = true;\n }", "title": "" }, { "docid": "89b102ef22248c77eef544bb5b91036e", "score": "0.6433411", "text": "disableInputs() {\n if(!this.app.isRunning){\n if(this.app.disabledInputs){\n for(let input of this.inputs) input.setAttribute(\"disabled\", true);\n }else{\n for(let input of this.inputs) input.removeAttribute(\"disabled\");\n } \n }\n }", "title": "" }, { "docid": "6680f2d3fa251a13817ce28587f49688", "score": "0.6421779", "text": "disable() {\n this.disabled = true;\n }", "title": "" }, { "docid": "6680f2d3fa251a13817ce28587f49688", "score": "0.6421779", "text": "disable() {\n this.disabled = true;\n }", "title": "" }, { "docid": "6680f2d3fa251a13817ce28587f49688", "score": "0.6421779", "text": "disable() {\n this.disabled = true;\n }", "title": "" }, { "docid": "cff8553e1fb1dafa8f5c72714f53625e", "score": "0.6420706", "text": "function disable_enable_controls(state) {\n if (!options.controls) return;\n options.controls.prop('disabled', state);\n }", "title": "" }, { "docid": "a826f8cf6e68ba81feb26232d608c597", "score": "0.64082444", "text": "reset (){\n const el = this.controls.querySelector('[data-timer-action=toggle]');\n\n el.removeAttribute('disabled');\n }", "title": "" }, { "docid": "0f3a9d5c04676c9accc2250486e25ae7", "score": "0.6406679", "text": "function disableTA_WD()\n{\n SetActive(i_p_correctId,false);\n SetActive(i_p_TryAgainId,false);\n}", "title": "" }, { "docid": "8872ec77fc3ed7fc898b05dc1c244401", "score": "0.6402467", "text": "disableControl(){\n if(this._control){\n if(this._control.enabled){\n //console.log(\"mouse left \" + this._viewName);\n this._control.enabled = false;\n }\n }\n }", "title": "" }, { "docid": "65496aae69a269ec023f47a2bea0bf94", "score": "0.6378569", "text": "function button_disable_and_reenable(){\n $('#prev, #next').off();\n setTimeout(function(){\n $('#prev').click(get_prev_screen);\n $('#next').click(get_next_screen);\n }, 1000);\n}", "title": "" }, { "docid": "3b2e3bc3edcac1477ae21dba88672c87", "score": "0.6354838", "text": "function disableMouse() {\n\tnoMouse = true;\n}", "title": "" }, { "docid": "d7d5b7dc8ad2c7782191496741606513", "score": "0.63544667", "text": "disable() {\n this.active = false;\n }", "title": "" }, { "docid": "dd49f711fe68642deeba180b94f9aec7", "score": "0.63381857", "text": "function disable(){\r\n\treturn;\r\n}", "title": "" }, { "docid": "d0eec7c3aaef3bb55345f2e2dd86edd8", "score": "0.63372713", "text": "function forceDisable( evt ) {\n\tevt.return = false;\n\tevt.stop();\n}", "title": "" }, { "docid": "26c8e6872befd6c72a9b299d050fb4b2", "score": "0.63316655", "text": "enable() {\n var self = this;\n self.input.disabled = false;\n self.control_input.disabled = false;\n self.control_input.tabIndex = self.tabIndex;\n self.isDisabled = false;\n self.unlock();\n }", "title": "" }, { "docid": "df3a9e10c1d45a381456ca8b0a6ddcaa", "score": "0.6327103", "text": "function disableButtons() {\r\n onsubmit = this.elements['save'].disbled = true;\r\n onsend = this.elements['submit'].disabled = true;\r\n}", "title": "" }, { "docid": "a60b71c1b79a1e42f5b4cae515d53363", "score": "0.6321852", "text": "function disable() {\r\n form.submit.classList.toggle(\"waiting\");\r\n document.querySelector(\"html\").classList.toggle(\"disable-mouse\");\r\n }", "title": "" }, { "docid": "f3c2ad57a1825b29b9113e881bd2d125", "score": "0.6321258", "text": "disable () {\n this.disabled = true\n }", "title": "" }, { "docid": "bcb5b46a5db5211c0d97350b78b4aa86", "score": "0.62704396", "text": "function disable() {\n\tif(document.getElementById(\"stop\").disabled) {\n\t\tdocument.getElementById(\"start\").disabled = true;\n\t\tdocument.getElementById(\"stop\").disabled = false;\n\t\tdocument.getElementById(\"animation\").disabled = true;\n\t} else {\n\t\tdocument.getElementById(\"stop\").disabled = true;\n\t\tdocument.getElementById(\"start\").disabled = false;\n\t\tdocument.getElementById(\"animation\").disabled = false;\n\t}\n}", "title": "" }, { "docid": "1bbd30103a78db4346f20791fbb15d8e", "score": "0.6268781", "text": "stop() { \r\n enabled = false;\r\n // TODO: hide PK block list\r\n }", "title": "" }, { "docid": "afd8d21789cf0f8f066b97fbce2dbbc3", "score": "0.62626886", "text": "function resetVariblesWhenDisable (condition) {\n if (condition) {\n controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false;\n }\n }", "title": "" }, { "docid": "8a9810274c953794fd410ba3384434e9", "score": "0.62580466", "text": "function stop() {\r\n document.getElementById(\"stop button\").disabled = true;\r\n document.getElementById(\"start button\").disabled = false;\r\n}", "title": "" }, { "docid": "5dfbd853d8516f6a4ad51d67e1e987e0", "score": "0.62451905", "text": "function flipDisableOption() {\n\t\t$(\"start_button\").disabled = !$(\"start_button\").disabled;\n\t\t$(\"stop_button\").disabled = !$(\"stop_button\").disabled;\n\t\t$(\"animation-dropbox\").disabled = !$(\"animation-dropbox\").disabled;\n\t}", "title": "" }, { "docid": "880bc210bd878724d9155762ce2bd53e", "score": "0.6226881", "text": "onSkipTap_() {\n if (this.buttonsDisabled) {\n return;\n }\n this.buttonsDisabled = true;\n this.browserProxy_.flowFinished();\n }", "title": "" }, { "docid": "5330564d98d7c4700b1bd221c4944e9b", "score": "0.62251735", "text": "disable() {\n this.world.disableEntity(this);\n }", "title": "" }, { "docid": "278ef83617f922e61aebbd96cf1dec04", "score": "0.6198621", "text": "function disableButtons() {\r\n voyageDetailsBtn.disabled = true;\r\n newRecordBtn.disabled = true;\r\n shipDetailsBtn.disabled = true;\r\n}", "title": "" }, { "docid": "37a6a9c9c6ff489df4d9ca9b5644b9c7", "score": "0.61868364", "text": "end (){\n const el = this.controls.querySelector('[data-timer-action=toggle]');\n\n el.setAttribute('disabled', true);\n }", "title": "" }, { "docid": "2e5d89cd38eb65c23f01fd76eeb324e0", "score": "0.61843926", "text": "onDisable() {}", "title": "" }, { "docid": "54724c78c07c7c1584581e676a88bc6e", "score": "0.61775374", "text": "function enableButtons() {\n\tdocument.getElementById('btn-roll').disabled = false;\n\tdocument.getElementById('btn-stop').disabled = false;\n\tdocument.getElementById('btn-reset').disabled = false;\n\tdocument.getElementById('points-to-stop').disabled = false;\n}", "title": "" }, { "docid": "23f1b07cd65e62669c1d33f6a9c4da9b", "score": "0.61626285", "text": "function enableAllControls() {\n enableKeyPress();\n enableMouseMove();\n enableMouseClick();\n enableKeyRelease();\n enableMouseRelease();\n }", "title": "" }, { "docid": "794217e412bbb909c260d6a9d42c3911", "score": "0.61610377", "text": "function disableInteraction() {\n moving = true;\n setTimeout(function () {\n moving = false;\n }, 500);\n }", "title": "" }, { "docid": "8c1e23c6a9b7381e827bc0ee8579c747", "score": "0.6160012", "text": "function toggleControls(enabled) {\n document.getElementById(\"options\").disabled = (!enabled);\n document.getElementById(\"output\").disabled = (!enabled);\n }", "title": "" }, { "docid": "65f6e728b5ee79e6604a63ee78cb7265", "score": "0.61522704", "text": "__init7() {this._isEnabled = false;}", "title": "" }, { "docid": "b68c4aff58ebb743258802ece76f3e91", "score": "0.61517036", "text": "disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }", "title": "" }, { "docid": "b68c4aff58ebb743258802ece76f3e91", "score": "0.61517036", "text": "disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }", "title": "" }, { "docid": "c8080cc6ae21a06748a63fe43f01e74e", "score": "0.6144778", "text": "function nightstop() {\n // the death button\n $(\".ntstop\").prop(\"disabled\", false);\n $(\".ntstop\").css(\"display\", \"block\");\n}", "title": "" }, { "docid": "85a6b9f42d4f83b4ad588512206ffaec", "score": "0.6142842", "text": "function disableControls( map ) {\n //Remove options from the map\n map.dragging.disable();\n map.touchZoom.disable();\n map.doubleClickZoom.disable();\n map.scrollWheelZoom.disable();\n map.keyboard.disable();\n $( '.leaflet-control-zoom' ).css( 'visibility', 'hidden' );\n }", "title": "" }, { "docid": "1144323e6e16e567a5e241755c1b637c", "score": "0.6142258", "text": "function disableStepBtn() {\n document.getElementById('btnStep').disabled = true;\n}", "title": "" }, { "docid": "072e098699ec2157b7088fe7dfcdb23f", "score": "0.61407477", "text": "function __setDisabled() {\n setDisabled.apply(this, arguments);\n }", "title": "" }, { "docid": "5a83f1a7e6dc23c9fc7587631bd9ebe2", "score": "0.6140373", "text": "function enable_discard(){\n\tif(dbg){\n\t\tdebug(\"enable discard\");\n\t}\n\tvar x = document.getElementsByClassName(\"discard\");\n\tfor (i=0; i < x.length; i++){\n\t\tx[i].disabled = false;\n\t}\n}", "title": "" }, { "docid": "524416a91fdd5668c1696bbeb1053868", "score": "0.613649", "text": "function h_disableActionButtons()\n{\n\tdocument.getElementById(\"choose_buyd\").disabled = true;\t\t// disable buy button\n\tdocument.getElementById(\"choose_selld\").disabled = true;\t// disable sell shark\n\tdocument.getElementById(\"choose_city\").disabled = true;\t\t// disable travel button\n\tdocument.getElementById(\"choose_loan\").disabled = true;\t\t// disable loan shark\n}", "title": "" }, { "docid": "20a0f91de0ea682503e59a57fc073736", "score": "0.61319745", "text": "stop() {\n // TODO: set a 'stop' mode, that waits for a button press\n // TODO: check if this instruction's overloaded to also change the CPU clock\n // speed on GBC\n return 0;\n }", "title": "" }, { "docid": "99fcee7d2a013186c9751b5207033a2a", "score": "0.6128411", "text": "enable() {\n this.outerElement.classList.remove('disabled');\n this.onClick.unsuspend();\n }", "title": "" }, { "docid": "ab7093f8d905c9ff58e1f184df902899", "score": "0.61265534", "text": "function disableGame() {\n\t\tgameOngoing = false;\n\t}", "title": "" }, { "docid": "142a79aaddbef479939335ac61c75794", "score": "0.61198664", "text": "enable() {\n\t\tthis.toggle(true);\n\t}", "title": "" }, { "docid": "b3b8c53c904c89175a5a82f2d0d9e83e", "score": "0.6119421", "text": "function disableCards() {\n app.lockBoard = true;\n setTimeout(() => {\n app.firstCard.style.pointerEvents = \"none\";\n app.secondCard.style.pointerEvents = \"none\";\n resetBoard();\n }, 500);\n}", "title": "" }, { "docid": "ab42e02d8dfdeb6736fea5ca08783e96", "score": "0.6112635", "text": "function disableControls()\n {\n if( m_controlBar )\n if( This.widget.getDisplayNode().contains( m_controlBar ) )\n This.widget.getDisplayNode().removeChild( m_controlBar );\n }", "title": "" }, { "docid": "0aaa74e0b2984939ab8f5121ad5713cc", "score": "0.61124825", "text": "function Disable() {\n\tpauseMenu.SetActive(false);\n\toptionsMenu.SetActive(false);\n}", "title": "" }, { "docid": "62e957465143598e3a5c660142b9f517", "score": "0.61095285", "text": "function doStopControl() {\r\n if (animating) {\r\n animating = false;\r\n controls.enabled = false;\r\n }\r\n}", "title": "" }, { "docid": "aa4da921c07b3ecf09cc0bc2fe8e90f5", "score": "0.6105965", "text": "function hideButtons () {\n\t\t_this.disable(true);\n\t\tfade(buttons, false);\n\t\tfade(yesnos, false);\n\n\t\tif (_this.agent.visible) { _this.agent.eyesFollowPointer(true); }\n\t}", "title": "" }, { "docid": "8b4f896a375e0c944b6dc3f66b4f8c4c", "score": "0.61018515", "text": "function disableControls(tab) {\r\n\ttab.getComponent(tab.title + 'inputField').disable();\r\n var btns = tab.getComponent(tab.title +'btns');\r\n btns.buttons[1].disable();\r\n btns.buttons[0].disable();\r\n tab.focus();\r\n}", "title": "" }, { "docid": "86b5f75335dc5dc596b6eba7d68ea19d", "score": "0.61012876", "text": "disableHideWithEscapeKey() {\r\n this.instance._config.keyboard = false;\r\n }", "title": "" }, { "docid": "391cbccb298266980e33045cd751c7ec", "score": "0.609279", "text": "stop(){\n // Reset playing button\n this._isRunning = false;\n this._toggleRunBtn.classList.remove(\"running\");\n // Reset pausing button\n this._isPaused = false;\n this._togglePauseBtn.classList.remove(\"paused\");\n this._togglePauseBtn.disabled = true;\n // Unlock form inputs\n const formElements = this.shadowRoot.getElementById(\"settings-form\").elements;\n for(let i=0; i<formElements.length; i++){\n formElements[i].disabled = false;\n }\n const lock = this.shadowRoot.querySelector(\".lock\");\n lock.classList.remove(\"active\");\n this.onStop();\n }", "title": "" }, { "docid": "c4c039bb0d33b8f2773b60cab29fce12", "score": "0.6091167", "text": "function disableGestures() {\n lastPanningEnabled = cy.panningEnabled();\n lastZoomingEnabled = cy.zoomingEnabled();\n lastBoxSelectionEnabled = cy.boxSelectionEnabled();\n\n cy.zoomingEnabled(false)\n .panningEnabled(false)\n .boxSelectionEnabled(false);\n }", "title": "" }, { "docid": "138bd74e1e35c67dd9ba1680043ecb1c", "score": "0.60798293", "text": "enable () {\n this.$disabled = false;\n }", "title": "" }, { "docid": "9add44c0c06b9a057eb85a180f2f2ecf", "score": "0.6078891", "text": "function enableControls() {\n $('#right-sidebar *').attr('disabled', false);\n $(\"#minimumEdgeWeightSlider\").slider(\"option\", \"disabled\", false);\n $('#updateGraphButton').attr('disabled', true);\n}", "title": "" }, { "docid": "f297e898d98e4e3dbb89dd0d18b10bc4", "score": "0.6077275", "text": "function disableInputs(){\n controlsToToggle.forEach(function(control){control.setAttribute(\"disabled\", \"disabled\");}); \n}", "title": "" }, { "docid": "ad9826cb081e0af94bed4bb3d5eb5e11", "score": "0.60725784", "text": "function OnDisable()\n\t{\n\t\t//Stop the animation coroutine, and disable the animation\n\t\tStopCoroutine(\"Animate\");\n\t\tcanAnimate = false;\n\t}", "title": "" }, { "docid": "d0c06b7409103e550315a3103b140f26", "score": "0.60672235", "text": "function powerOff(){\n\n\t\t\t//Generate empty terminal\n\t\t\t$('#terminal').html(framework['empty']);\n\n\t\t\t//Change background image\n\t\t\t$('#terminal-container').css(\"background-image\", \"url('images/monitorborder.png')\");\n\n\t\t\t//Change button to powerOn\n\t\t\tbuttonOn();\n\t\t}", "title": "" }, { "docid": "2531481ffae3614350fff7a92971138d", "score": "0.60554767", "text": "function toggleButtons(){\n buttonGen.disabled = !buttonGen.disabled;\n buttonClear.disabled = !buttonClear.disabled;\n buttonRead.disabled = !buttonRead.disabled;\n}", "title": "" }, { "docid": "30cd4701a7e979528ebec167ac458540", "score": "0.60384357", "text": "function disableInteraction()\n{\n //Disable the buttons, slider, and car composite moving/scaling\n $(\"#saveImage\").prop(\"disabled\", true);\n $(\"#goToSelection\").prop(\"disabled\", true);\n\n var dragElement = document.getElementById('imageDraggable'),\n scaleElement = document.getElementById('compositeImage');\n\n interact(dragElement)\n .draggable(false);\n\n interact(scaleElement)\n .gesturable(false); \n}", "title": "" }, { "docid": "e699b59098fbd8d99b68fe75c2876375", "score": "0.60384226", "text": "function buttonOff(){\n\t\t\t$('#power-button').prop('disabled',false);\n\t\t\t$('#power-button').unbind('click');\n\t\t\t$('#power-button').click(\n\t\t\t\tfunction(){\n\t\t\t\t\tif (!$(this).prop('disabled')){\n\t\t\t\t\t\t$(this).prop('disabled', true);\n\t\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\t$('#terminal').append(power_info['shutdown']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t, 100\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// do a little flash\n\t\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\t$('#power-button-info').remove();\n\t\t\t\t\t\t\t\t$('#power-button').prop('disabled',false);\n\t\t\t\t\t\t\t\tpowerOff();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t, 2000\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "de57292ff82781875c73cade0252ca4d", "score": "0.60219806", "text": "disableSlider() {\n $(this.element).slick('slickSetOption', 'accessibility', false);\n $(this.element).slick('slickSetOption', 'swipe', false);\n }", "title": "" } ]
5789b780bcdfd1ed95d5cfa59581021f
Move Test Case This will cover move gestures
[ { "docid": "667a739371382bd59567f3bf23dd3a81", "score": "0.69551873", "text": "function MoveTestCase() {\n MoveTestCase.superclass.constructor.call(this, \"move\");\n }", "title": "" } ]
[ { "docid": "2194620474563d992191b3cb70f92d5f", "score": "0.76865584", "text": "function gestureMove(ev){if(!pointer||!typesMatch(ev,pointer))return;updatePointerState(ev,pointer);runHandlers('move',ev);}", "title": "" }, { "docid": "2194620474563d992191b3cb70f92d5f", "score": "0.76865584", "text": "function gestureMove(ev){if(!pointer||!typesMatch(ev,pointer))return;updatePointerState(ev,pointer);runHandlers('move',ev);}", "title": "" }, { "docid": "213d1891eb42d8b30f72aad98312ffc0", "score": "0.7273874", "text": "function gestureMove(ev) {\n if (!pointer || !typesMatch(ev, pointer)) return;\n\n updatePointerState(ev, pointer);\n runHandlers('move', ev);\n }", "title": "" }, { "docid": "2e24260a7822b548663f2e6b48b730a7", "score": "0.7193834", "text": "function gestureMove(ev) {\n if (!pointer || !typesMatch(ev, pointer)) return;\n\n updatePointerState(ev, pointer);\n runHandlers('move', ev);\n }", "title": "" }, { "docid": "2e24260a7822b548663f2e6b48b730a7", "score": "0.7193834", "text": "function gestureMove(ev) {\n if (!pointer || !typesMatch(ev, pointer)) return;\n\n updatePointerState(ev, pointer);\n runHandlers('move', ev);\n }", "title": "" }, { "docid": "d0d35bef6b7084f61b871c1f5b44ba7d", "score": "0.6925635", "text": "handleMove(event) {\r\n\t\tif (this.startx === null || this.starty === null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst touch = event.touches[0];\r\n\t\tlet movedx = touch.clientX;\r\n\t\tlet movedy = touch.clientY;\r\n\t\tlet dx = this.startx - movedx;\r\n\t\tlet dy = this.starty - movedy;\r\n\t\tlet distancex = Math.abs(dx);\r\n\t\tlet distancey = Math.abs(dy);\r\n\r\n\t\t// make sure we covered the given distance\r\n\t\tif (distancex < this.minLength && distancey < this.minLength) {\r\n\t\t\t//console.log('too close');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// check which direction dominates\r\n\t\tif (distancex > distancey) {\r\n\t\t\tif (dx > 0) {\r\n\t\t\t\tthis.swipe('left');\r\n\t\t\t} else {\r\n\t\t\t\tthis.swipe('right');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (dy > 0) {\r\n\t\t\t\tthis.swipe('up');\r\n\t\t\t} else {\r\n\t\t\t\tthis.swipe('down');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// reset\r\n\t\tif (this.allowMultiple) {\r\n\t\t\tthis.reset(touch);\r\n\t\t} else {\r\n\t\t\tthis.reset();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e305dc2c698a50bf7793f7c9bee65810", "score": "0.6835296", "text": "move() {\n\n\t}", "title": "" }, { "docid": "35fce188259aa133754d32dc9d81531b", "score": "0.6762508", "text": "_move(e) {\n e.preventDefault()\n e.stopPropagation()\n\n if (!this.move) return\n\n const currentY = e.pageY || e.touches[0].clientY\n const deltaY = currentY - this.touches.startY\n this.touches.deltaY = deltaY\n this._setTranslate(this.touches.startTranslateY + deltaY)\n }", "title": "" }, { "docid": "d5d252536ee6a0a49058f99e89e3e41b", "score": "0.67457056", "text": "handleInput(move) {\n // Space between each step\n const horizontal = 100;\n const vertical = 83;\n\n if (move == \"left\" && this.x - horizontal >= 0) {\n this.x -= horizontal;\n } else if (move == \"right\" && this.x + horizontal < ctx.canvas.width -10) {\n this.x += horizontal;\n } else if (move == \"up\" && this.y + this.height - vertical >= 0) {\n this.y -= vertical;\n } else if (move == \"down\" && this.y + vertical < ctx.canvas.height - 180) {\n this.y += vertical;\n }\n }", "title": "" }, { "docid": "144c065047f4322bb6b57187eeaceebd", "score": "0.66669154", "text": "function onTouchMove( event ) {\n\n\t\t// Each touch should only trigger one action\n\t\tif( !touch.captured ) {\n\t\t\tonUserInput( event );\n\n\t\t\tvar currentX = event.touches[0].clientX;\n\t\t\tvar currentY = event.touches[0].clientY;\n\n\t\t\t// If the touch started with two points and still has\n\t\t\t// two active touches; test for the pinch gesture\n\t\t\tif( event.touches.length === 2 && touch.startCount === 2 && config.overview ) {\n\n\t\t\t\t// The current distance in pixels between the two touch points\n\t\t\t\tvar currentSpan = distanceBetween( {\n\t\t\t\t\tx: event.touches[1].clientX,\n\t\t\t\t\ty: event.touches[1].clientY\n\t\t\t\t}, {\n\t\t\t\t\tx: touch.startX,\n\t\t\t\t\ty: touch.startY\n\t\t\t\t} );\n\n\t\t\t\t// If the span is larger than the desire amount we've got\n\t\t\t\t// ourselves a pinch\n\t\t\t\tif( Math.abs( touch.startSpan - currentSpan ) > touch.threshold ) {\n\t\t\t\t\ttouch.captured = true;\n\n\t\t\t\t\tif( currentSpan < touch.startSpan ) {\n\t\t\t\t\t\tactivateOverview();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdeactivateOverview();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t}\n\t\t\t// There was only one touch point, look for a swipe\n\t\t\telse if( event.touches.length === 1 && touch.startCount !== 2 ) {\n\n\t\t\t\tvar deltaX = currentX - touch.startX,\n\t\t\t\t\tdeltaY = currentY - touch.startY;\n\n\t\t\t\tif( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateLeft();\n\t\t\t\t}\n\t\t\t\telse if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateRight();\n\t\t\t\t}\n\t\t\t\telse if( deltaY > touch.threshold ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateUp();\n\t\t\t\t}\n\t\t\t\telse if( deltaY < -touch.threshold ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateDown();\n\t\t\t\t}\n\n\t\t\t\t// If we're embedded, only block touch events if they have\n\t\t\t\t// triggered an action\n\t\t\t\tif( config.embedded ) {\n\t\t\t\t\tif( touch.captured || isVerticalSlide( currentSlide ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not embedded? Block them all to avoid needless tossing\n\t\t\t\t// around of the viewport in iOS\n\t\t\t\telse {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t// There's a bug with swiping on some Android devices unless\n\t\t// the default action is always prevented\n\t\telse if( navigator.userAgent.match( /android/gi ) ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t}", "title": "" }, { "docid": "144c065047f4322bb6b57187eeaceebd", "score": "0.66669154", "text": "function onTouchMove( event ) {\n\n\t\t// Each touch should only trigger one action\n\t\tif( !touch.captured ) {\n\t\t\tonUserInput( event );\n\n\t\t\tvar currentX = event.touches[0].clientX;\n\t\t\tvar currentY = event.touches[0].clientY;\n\n\t\t\t// If the touch started with two points and still has\n\t\t\t// two active touches; test for the pinch gesture\n\t\t\tif( event.touches.length === 2 && touch.startCount === 2 && config.overview ) {\n\n\t\t\t\t// The current distance in pixels between the two touch points\n\t\t\t\tvar currentSpan = distanceBetween( {\n\t\t\t\t\tx: event.touches[1].clientX,\n\t\t\t\t\ty: event.touches[1].clientY\n\t\t\t\t}, {\n\t\t\t\t\tx: touch.startX,\n\t\t\t\t\ty: touch.startY\n\t\t\t\t} );\n\n\t\t\t\t// If the span is larger than the desire amount we've got\n\t\t\t\t// ourselves a pinch\n\t\t\t\tif( Math.abs( touch.startSpan - currentSpan ) > touch.threshold ) {\n\t\t\t\t\ttouch.captured = true;\n\n\t\t\t\t\tif( currentSpan < touch.startSpan ) {\n\t\t\t\t\t\tactivateOverview();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdeactivateOverview();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t}\n\t\t\t// There was only one touch point, look for a swipe\n\t\t\telse if( event.touches.length === 1 && touch.startCount !== 2 ) {\n\n\t\t\t\tvar deltaX = currentX - touch.startX,\n\t\t\t\t\tdeltaY = currentY - touch.startY;\n\n\t\t\t\tif( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateLeft();\n\t\t\t\t}\n\t\t\t\telse if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateRight();\n\t\t\t\t}\n\t\t\t\telse if( deltaY > touch.threshold ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateUp();\n\t\t\t\t}\n\t\t\t\telse if( deltaY < -touch.threshold ) {\n\t\t\t\t\ttouch.captured = true;\n\t\t\t\t\tnavigateDown();\n\t\t\t\t}\n\n\t\t\t\t// If we're embedded, only block touch events if they have\n\t\t\t\t// triggered an action\n\t\t\t\tif( config.embedded ) {\n\t\t\t\t\tif( touch.captured || isVerticalSlide( currentSlide ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not embedded? Block them all to avoid needless tossing\n\t\t\t\t// around of the viewport in iOS\n\t\t\t\telse {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t// There's a bug with swiping on some Android devices unless\n\t\t// the default action is always prevented\n\t\telse if( navigator.userAgent.match( /android/gi ) ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t}", "title": "" }, { "docid": "a49400a415e55174bde1135654133722", "score": "0.66648954", "text": "movePanResponder(event, gesture) {\n const { SWIPE_LEFT, SWIPE_RIGHT, SWIPE_UP, SWIPE_DOWN } = swipeDirections;\n\n const swipeDirection = this.swipeDirectionController(gesture);\n console.log('the swipe direction is!!!', swipeDirection);\n\n const { dx, dy } = gesture;\n\n //this.position.setValue({ x: gesture.dx, y: gesture.dy });\n\n //animation based on direction\n switch (swipeDirection) {\n case SWIPE_LEFT:\n this.position.setValue({ x: dx });\n break;\n case SWIPE_RIGHT:\n this.position.setValue({ x: dx });\n break;\n case SWIPE_UP:\n this.position.setValue({ y: dy });\n break;\n case SWIPE_DOWN:\n this.position.setValue({ y: dy });\n break;\n }\n }", "title": "" }, { "docid": "e0c580022eeb9d07d29c28c1ff919c4a", "score": "0.6662492", "text": "function touchMove(e) {\n $this = $(e.target);\n $this.data('callee2', arguments.callee);\n finalCoord.x = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageX : e.pageX;\n finalCoord.y = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageY : e.pageY;\n\n var swipedir;\n\n // We need to check if the element to which the event was bound contains a data-xthreshold | data-vthreshold:\n var ele_x_threshold = $this.data('xthreshold'),\n ele_y_threshold = $this.data('ythreshold'),\n h_threshold = (typeof ele_x_threshold !== 'undefined' && ele_x_threshold !== false && parseInt(ele_x_threshold)) ? parseInt(ele_x_threshold) : settings.swipe_h_threshold,\n v_threshold = (typeof ele_y_threshold !== 'undefined' && ele_y_threshold !== false && parseInt(ele_y_threshold)) ? parseInt(ele_y_threshold) : settings.swipe_v_threshold;\n\n if (originalCoord.y > finalCoord.y && (originalCoord.y - finalCoord.y > v_threshold)) {\n swipedir = 'swipeup';\n }\n if (originalCoord.x < finalCoord.x && (finalCoord.x - originalCoord.x > h_threshold)) {\n swipedir = 'swiperight';\n }\n if (originalCoord.y < finalCoord.y && (finalCoord.y - originalCoord.y > v_threshold)) {\n swipedir = 'swipedown';\n }\n if (originalCoord.x > finalCoord.x && (originalCoord.x - finalCoord.x > h_threshold)) {\n swipedir = 'swipeleft';\n }\n if (swipedir != undefined && started) {\n originalCoord.x = 0;\n originalCoord.y = 0;\n finalCoord.x = 0;\n finalCoord.y = 0;\n started = false;\n\n // Read event data into our endEvnt:\n var origEvent = e.originalEvent;\n endEvnt = {\n 'position': {\n 'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX,\n 'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY\n },\n 'offset': {\n 'x': (settings.touch_capable) ? origEvent.touches[0].pageX - origEvent.touches[0].target.offsetLeft : e.offsetX,\n 'y': (settings.touch_capable) ? origEvent.touches[0].pageY - origEvent.touches[0].target.offsetTop : e.offsetY\n },\n 'time': Date.now(),\n 'target': e.target\n };\n\n // Calculate the swipe amount (normalized):\n var xAmount = Math.abs(startEvnt.position.x - endEvnt.position.x),\n yAmount = Math.abs(startEvnt.position.y - endEvnt.position.y);\n\n var touchData = {\n 'startEvnt': startEvnt,\n 'endEvnt': endEvnt,\n 'direction': swipedir.replace('swipe', ''),\n 'xAmount': xAmount,\n 'yAmount': yAmount,\n 'duration': endEvnt.time - startEvnt.time\n }\n hasSwiped = true;\n $this.trigger('swipe', touchData).trigger(swipedir, touchData);\n }\n }", "title": "" }, { "docid": "48eb36666dc98d44692e3da2f2abaa0b", "score": "0.66533583", "text": "move() {\r\n let xDiff = this.xTarget - this.x;\r\n let yDiff = this.yTarget - this.y;\r\n if (Math.abs(xDiff) < 0.5 && Math.abs(yDiff) < 0.5)\r\n this.setRandomTargetPosition();\r\n else {\r\n this.x += xDiff * this.speed;\r\n this.y += yDiff * this.speed;\r\n }\r\n }", "title": "" }, { "docid": "32ab040ed2ac52fc2d14f1e52c3dcf9e", "score": "0.66067576", "text": "move ( event ) { virtualⵢ ( event ); }", "title": "" }, { "docid": "d7fae2a34ba8aaa984c5a687f0ed3851", "score": "0.6602621", "text": "move() { \n }", "title": "" }, { "docid": "64095541e7c90e6ec0b9a29badc8ac8a", "score": "0.65914255", "text": "function onTouchMove(e) {\r\n if (config.preventDefaultEvents) {\r\n e.preventDefault();\r\n }\r\n if (isMoving) {\r\n var x = e.touches[0].pageX;\r\n var y = e.touches[0].pageY;\r\n var dx = startX - x;\r\n var dy = startY - y;\r\n if (!$(_this).hasClass('vertical')) {\r\n if (Math.abs(dx) >= config.min_move_x) {\r\n cancelTouch();\r\n if (dx > 0) {\r\n $(_this).find($(nextItem)).trigger('click');\r\n } else {\r\n $(_this).find($(prevItem)).trigger('click');\r\n }\r\n }\r\n } else {\r\n if (Math.abs(dy) >= config.min_move_y) {\r\n cancelTouch();\r\n if (dy > 0) {\r\n $(_this).find($(nextItem)).trigger('click');\r\n } else {\r\n $(_this).find($(prevItem)).trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "968747d539066dc6c966d7530cdebaa4", "score": "0.65905243", "text": "move(e) {\n const x = e.pageX;\n const y = e.pageY;\n this.setState((state) => ({\n pos: {\n left: x - state.rel.left,\n top: y - state.rel.top\n }\n }));\n e.stopPropagation();\n e.preventDefault();\n }", "title": "" }, { "docid": "f9e3a3f11610694be6ee502c12ddebed", "score": "0.65477765", "text": "function move(direction) {}", "title": "" }, { "docid": "97380149f42b46b195ac49e8593774cc", "score": "0.6530478", "text": "function moving(truc) {\r\n\t\tif(test_keys(37,38,39,40) || test_keys(37,38,39) || test_keys(37,39,40) || test_keys(37,38,40) || test_keys(38,39,40)) {}\r\n\t\telse if(test_keys(37,38)) { \r\n\t\t\tgoUpLeft(truc);\r\n\t\t}\r\n\t\telse if(test_keys(37,39)) { \r\n\t\t}\r\n\t\telse if(test_keys(37,40)) { \r\n\t\t\tgoDownLeft(truc);\r\n\t\t}\r\n\t\telse if(test_keys(38,39)) { \r\n\t\t\tgoUpRight(truc);\r\n\t\t}\r\n\t\telse if(test_keys(38,40)) { \r\n\t\t}\r\n\t\telse if(test_keys(39,40)) { \r\n\t\t\tgoDownRight(truc);\r\n\t\t}\r\n\t\telse if(test_keys(37)) { \r\n\t\t\tgoLeft(truc);\r\n\t\t}\r\n\t\telse if(test_keys(38)) { \r\n\t\t\tgoUp(truc);\r\n\t\t}\r\n\t\telse if(test_keys(39)) { \r\n\t\t\tgoRight(truc);\r\n\t\t}\r\n\t\telse if(test_keys(40)) { \r\n\t\t\tgoDown(truc);\r\n\t\t}\r\n\t\telse{}\r\n\t}", "title": "" }, { "docid": "0c21c586a98bcffb98def99768085bc6", "score": "0.6517403", "text": "function handleMove( e ) {\n let moveOnX =\n Math.abs( currentX - lastX ) > Math.abs( currentY - lastY );\n\n if ( moveOnX && currentX < lastX ) {\n if ( options.moveLeft ) {\n options.moveLeft.call( e.target, e, $currentTargetElement, 'moveLeft' );\n }\n }\n else if ( moveOnX && currentX > lastX ) {\n if ( options.moveRight ) {\n options.moveRight.call( e.target, e, $currentTargetElement, 'moveRight' );\n }\n }\n\n if ( !moveOnX && currentY < lastY ) {\n if ( options.moveUp ) {\n options.moveUp.call( e.target, e, $currentTargetElement, 'moveUp' );\n }\n }\n else if (!moveOnX && currentY > lastY) {\n if ( options.moveDown ) {\n options.moveDown.call( e.target, e, $currentTargetElement, 'moveDown' );\n }\n }\n }", "title": "" }, { "docid": "c5ba423c470b94df2390dd47b3281fe0", "score": "0.6509332", "text": "move() {}", "title": "" }, { "docid": "e7b6e0253da322066877922616ba851c", "score": "0.64972275", "text": "mMove(e){\n this.xMouse = e.offsetX;\n this.yMouse = e.offsetY;\n this.inBounds = this.inBoundsCheck(this.xMouse, this.yMouse, this.x, this.y, this.w, this.h);\n }", "title": "" }, { "docid": "5bffcb5a96d0768c073b4434edb291d2", "score": "0.6495163", "text": "movePaddles() {\n if (this.direction[this.up]) {\n this.moveUp();\n } else if (this.direction[this.down]) {\n this.moveDown();\n }\n }", "title": "" }, { "docid": "2ca5b7c25751e16d2232c0aface517ec", "score": "0.64893484", "text": "function addMovement(main) {\r\n let downX; \r\n let upX;\r\n let downY;\r\n let upY;\r\n let threshold = 25;\r\n\r\n // Keyboard controls\r\n main.input.keyboard.on('keydown_LEFT', function (event) {\r\n moveLeft();\r\n });\r\n main.input.keyboard.on('keydown_A', function (event) {\r\n moveLeft();\r\n });\r\n main.input.keyboard.on('keydown_RIGHT', function (event) {\r\n moveRight();\r\n });\r\n main.input.keyboard.on('keydown_D', function (event) {\r\n moveRight();\r\n });\r\n\r\n // Swipe controls\r\n main.input.on('pointerdown', function (pointer) {\r\n downX = pointer.x;\r\n downY = pointer.y;\r\n });\r\n main.input.on('pointerup', function (pointer) {\r\n upX = pointer.x;\r\n upY = pointer.y;\r\n if (upX < downX - threshold) {\r\n moveLeft();\r\n } else if (upX > downX + threshold) {\r\n moveRight();\r\n }\r\n\r\n if (upY < downY - threshold) {\r\n moveUp();\r\n } else if (upY > downY + threshold) {\r\n moveDown();\r\n }\r\n\r\n\r\n });\r\n\r\n // Easter egg\r\n main.input.keyboard.on('keydown_UP', function (event) {\r\n moveUp();\r\n });\r\n main.input.keyboard.on('keydown_W', function (event) {\r\n moveUp();\r\n });\r\n main.input.keyboard.on('keydown_DOWN', function (event) {\r\n moveDown();\r\n });\r\n main.input.keyboard.on('keydown_S', function (event) {\r\n moveDown();\r\n });\r\n}", "title": "" }, { "docid": "d4fe9212d5dcd53720d80992dad08c54", "score": "0.64786696", "text": "checkMove() {\n return false\n }", "title": "" }, { "docid": "45df883d9b812dfc3551961d5cae82c0", "score": "0.64513606", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "530ddfca3a7397706f50076983f0c213", "score": "0.64499974", "text": "onInteractiveMove(e) {\n const uv = e.intersectionData.uv;\n\n if (this.touch) {\n this.touch.addTouch(uv);\n }\n }", "title": "" }, { "docid": "523d69573513b075ce368ef4dec1c96b", "score": "0.6437357", "text": "function touchMove(event) {\n\t\t\tif (defaults.preventDefaultEvents){\n\t\t\t\tevent.preventDefault();\n\t\t\t};\n\t\t\tfinalCoord.x = event.targetTouches[0].pageX; // Updated X,Y coordinates\n\t\t\tfinalCoord.y = event.targetTouches[0].pageY;\n\t\t}", "title": "" }, { "docid": "c42477a4e04a09bc14cc0c52fcba87dd", "score": "0.6415817", "text": "function move( e ){\n\t\t\t\tif( !cancel ){\n\t\t\t\t\tvar coords = getCoords( e );\n\t\t\t\t\tif( coords && ( Math.abs( startY - coords[ 1 ] ) > scrollTolerance || Math.abs( startX - coords[ 0 ] ) > scrollTolerance ) ){\n\t\t\t\t\t\tcancel = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "e5d9808b5196f62caae0dfd367048aae", "score": "0.6414561", "text": "function eventMove ( event, data ) {\n\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if ( navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "318f0a11b6f228d5327d22a1a7a68c0c", "score": "0.6414394", "text": "function eventMove ( event, data ) {\n\n\t\t// Fix #498\n\t\t// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n\t\t// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n\t\t// IE9 has .buttons and .which zero on mousemove.\n\t\t// Firefox breaks the spec MDN defines.\n\t\tif ( navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {\n\t\t\treturn eventEnd(event, data);\n\t\t}\n\n\t\t// Check if we are moving up or down\n\t\tvar movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n\t\t// Convert the movement into a percentage of the slider width/height\n\t\tvar proposal = (movement * 100) / data.baseSize;\n\n\t\tmoveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n\t}", "title": "" }, { "docid": "318f0a11b6f228d5327d22a1a7a68c0c", "score": "0.6414394", "text": "function eventMove ( event, data ) {\n\n\t\t// Fix #498\n\t\t// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n\t\t// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n\t\t// IE9 has .buttons and .which zero on mousemove.\n\t\t// Firefox breaks the spec MDN defines.\n\t\tif ( navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {\n\t\t\treturn eventEnd(event, data);\n\t\t}\n\n\t\t// Check if we are moving up or down\n\t\tvar movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n\t\t// Convert the movement into a percentage of the slider width/height\n\t\tvar proposal = (movement * 100) / data.baseSize;\n\n\t\tmoveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n\t}", "title": "" }, { "docid": "318f0a11b6f228d5327d22a1a7a68c0c", "score": "0.6414394", "text": "function eventMove ( event, data ) {\n\n\t\t// Fix #498\n\t\t// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n\t\t// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n\t\t// IE9 has .buttons and .which zero on mousemove.\n\t\t// Firefox breaks the spec MDN defines.\n\t\tif ( navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {\n\t\t\treturn eventEnd(event, data);\n\t\t}\n\n\t\t// Check if we are moving up or down\n\t\tvar movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n\t\t// Convert the movement into a percentage of the slider width/height\n\t\tvar proposal = (movement * 100) / data.baseSize;\n\n\t\tmoveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n\t}", "title": "" }, { "docid": "7a6946fca88047d8699e49510144c3a4", "score": "0.64075315", "text": "_handleInput() {\n if (this.keys.left.isDown) {\n this.hero.move(-1);\n } else if (this.keys.right.isDown) {\n this.hero.move(1);\n } else {\n this.hero.move(0);\n }\n }", "title": "" }, { "docid": "a66159b9b8637a867534299b5f223c01", "score": "0.64021593", "text": "function eventMove ( event, data ) {\r\n\r\n\t\t// Fix #498\r\n\t\t// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\r\n\t\t// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\r\n\t\t// IE9 has .buttons and .which zero on mousemove.\r\n\t\t// Firefox breaks the spec MDN defines.\r\n\t\tif ( navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {\r\n\t\t\treturn eventEnd(event, data);\r\n\t\t}\r\n\r\n\t\t// Check if we are moving up or down\r\n\t\tvar movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\r\n\r\n\t\t// Convert the movement into a percentage of the slider width/height\r\n\t\tvar proposal = (movement * 100) / data.baseSize;\r\n\r\n\t\tmoveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\r\n\t}", "title": "" }, { "docid": "bea38e995ead0641a15f6526d4af9ded", "score": "0.63997823", "text": "function eventMove(event, data) {\n\n\t\t\t// Fix #498\n\t\t\t// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n\t\t\t// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n\t\t\t// IE9 has .buttons and .which zero on mousemove.\n\t\t\t// Firefox breaks the spec MDN defines.\n\t\t\tif (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n\t\t\t\treturn eventEnd(event, data);\n\t\t\t}\n\n\t\t\t// Check if we are moving up or down\n\t\t\tvar movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n\t\t\t// Convert the movement into a percentage of the slider width/height\n\t\t\tvar proposal = movement * 100 / data.baseSize;\n\n\t\t\tmoveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n\t\t}", "title": "" }, { "docid": "f22d2256c275de1146a3334ca9119a79", "score": "0.6381212", "text": "function onMove(e) {\r\n if (!isDown && !isPan) {\r\n //do nothing\r\n return\r\n }\r\n\r\n if (isDown && !isPan) {\r\n //run the addTile routine\r\n addTile(e)\r\n }\r\n\r\n if (!isDown && isPan) {\r\n var { startx, starty } = props.startingPoint\r\n //run PAN routine\r\n e.stopPropagation()\r\n // get the current mouse position\r\n mouseXX = parseInt(e.clientX)\r\n mouseYY = parseInt(e.clientY)\r\n\r\n // dx & dy are the distance the mouse has moved since\r\n // the last mousemove event\r\n var deltax = mouseXX - dragx\r\n var deltay = mouseYY - dragy\r\n // reset the vars for next mousemove\r\n dragx = mouseXX\r\n dragy = mouseYY\r\n startx = startx + deltax //netPanningX\r\n starty = starty + deltay //netPanningY\r\n\r\n if (startx && starty) {\r\n props.updateStartingPoint({ startx, starty })\r\n }\r\n\r\n draw()\r\n }\r\n }", "title": "" }, { "docid": "276b2cb75afeb7c199dbe7bafde7f315", "score": "0.63781047", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "825d9d03ba621b662ca6fa1d276fe9c8", "score": "0.63767296", "text": "function movecamtr(event){\n \n if(event.keyCode==87){//if w pressed\n moveq[0]=true;\n }\n if(event.keyCode==83){//if s pressed\n moveq[1]=true;\n }\n if(event.keyCode==65){//if a pressed\n moveq[2]=true;\n }\n if(event.keyCode==68){//if d pressed\n moveq[3]=true;\n } \n \n if(event.keyCode==81){//if q pressed\n dirq[0]=true;\n }\n if(event.keyCode==69){//if e pressed\n dirq[1]=true;\n }\n if(event.keyCode==82){//if r pressed\n dirq[2]=true;\n }\n if(event.keyCode==70){//if f pressed\n dirq[3]=true;\n }\n }", "title": "" }, { "docid": "1f33d637e2162605f47b48dad38c0a82", "score": "0.6370705", "text": "function gestureMove(component, clientX, clientY) {\n component[deltaXSymbol] = clientX - component[previousXSymbol];\n component[deltaYSymbol] = clientY - component[previousYSymbol];\n component[previousXSymbol] = clientX;\n component[previousYSymbol] = clientY;\n if (Math.abs(component[deltaXSymbol]) > Math.abs(component[deltaYSymbol])) {\n // Move was mostly horizontal.\n const swipeFraction = getSwipeFraction(component, clientX);\n component.updateSwipeFraction(swipeFraction);\n // Indicate that the event was handled. It'd be nicer if we didn't have\n // to do this so that, e.g., a user could be swiping left and right\n // while simultaneously scrolling up and down. (Native touch apps can do\n // that.) However, Mobile Safari wants to handle swipe events near the\n // page and interpret them as navigations. To avoid having a horiziontal\n // swipe misintepreted as a navigation, we indicate that we've handled\n // the event, and prevent default behavior.\n return true;\n } else {\n // Move was mostly vertical.\n return false; // Not handled\n }\n}", "title": "" }, { "docid": "7d074c0a70a981c311e8d8361b179653", "score": "0.6368102", "text": "move(dir) {\n this.clear();\n // Redraw enemy saucer\n if (dir == \"right\") {\n this.x += HOR_MOVEMENT;\n } else if (dir == \"left\") {\n this.x -= HOR_MOVEMENT;\n } else if (dir == \"down\") {\n this.y += VER_MOVEMENT;\n }\n this.show();\n }", "title": "" }, { "docid": "2106c0b13a6a78037d30047bae02e996", "score": "0.63639545", "text": "function moveClicked() {\r\n\t\tif (this.classList.contains(\"movable\")) {\r\n \tmove(this);\r\n\t\t}\r\n\t\tupdateMovable();\r\n }", "title": "" }, { "docid": "d470a37dc71d3d3f3a7e7f6b1a2933f6", "score": "0.63559467", "text": "_move(event) {\r\n const previousPointers = this.currentPointers.slice();\r\n const changedPointers = ('changedTouches' in event) ? // Shortcut for 'is touch event'.\r\n Array.from(event.changedTouches).map(t => new Pointer(t)) :\r\n [new Pointer(event)];\r\n const trackedChangedPointers = [];\r\n for (const pointer of changedPointers) {\r\n const index = this.currentPointers.findIndex(p => p.id === pointer.id);\r\n if (index === -1)\r\n continue; // Not a pointer we're tracking\r\n trackedChangedPointers.push(pointer);\r\n this.currentPointers[index] = pointer;\r\n }\r\n if (trackedChangedPointers.length === 0)\r\n return;\r\n this._moveCallback(previousPointers, trackedChangedPointers, event);\r\n }", "title": "" }, { "docid": "a697349524ccef73f22457bc8a3b0f4d", "score": "0.63514245", "text": "function eventMove(event, data) {\r\n // Fix #498\r\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\r\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\r\n // IE9 has .buttons and .which zero on mousemove.\r\n // Firefox breaks the spec MDN defines.\r\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\r\n return eventEnd(event, data);\r\n }\r\n\r\n // Check if we are moving up or down\r\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\r\n\r\n // Convert the movement into a percentage of the slider width/height\r\n var proposal = (movement * 100) / data.baseSize;\r\n\r\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\r\n }", "title": "" }, { "docid": "8de8f498d441997f1f72101531a4b740", "score": "0.6347237", "text": "_onDragMove(event) {\n let stage;\n const stageOrExit = this.carouselService.defineNewCoordsDrag(event, this._drag);\n if (stageOrExit === false) {\n return;\n }\n stage = stageOrExit;\n event.preventDefault();\n this._drag.stage.current = stage;\n this._animate(stage.x - this._drag.stage.start.x);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "9d627a4d25337d5619d3052f66e61934", "score": "0.6339989", "text": "function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "be7a05147091201eeb83a74aecb032f6", "score": "0.63368416", "text": "move() {\n this.x += this.vx;\n this.y += this.vy;\n // Change event counter once pass the width of canvas\n if (this.x - this.size / 2 >= width) {\n eventCounterS2 = 5;\n }\n }", "title": "" }, { "docid": "cc5a48badf218e4558ac4f9cbc82521a", "score": "0.6333705", "text": "move() {\n if (this.direction === \"E\") {\n this.x += this.speed;\n }\n else if (this.direction === \"N\") {\n this.y -= this.speed;\n }\n else if (this.direction === \"S\") {\n this.y += this.speed;\n }\n else if (this.direction === \"W\") {\n this.x -= this.speed;\n }\n }", "title": "" }, { "docid": "6cc82621db63bf4bfa40c06b00646657", "score": "0.63287324", "text": "function eventMove(event, data) {\n\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n }", "title": "" }, { "docid": "d775f85e1dacd5b52d7dfce896a061ce", "score": "0.63235956", "text": "logMove() {\n\t\t// Stop or Hold\n\t\tif(this.tapLength <= 125) { // A tap is only recognized as shorter than 125ms\n\t\t\tthis.moveArr.push(1);\n\t\t}else {\n\t\t\tthis.moveArr.push(3);\n\t\t}\n\t}", "title": "" }, { "docid": "efd26ad67e2b702ce7ad0d7c68b5cdb2", "score": "0.6320658", "text": "move() {\n return;\n }", "title": "" }, { "docid": "7f4eff018dead6c5726cd6b3c18a4706", "score": "0.6319628", "text": "move(movement, initiator = this) {\n //stop if deleted in the mean time\n if (this.deleted) {\n return\n }\n\n //get target tile for movement\n const targetTile = this.getTargetTile(movement)\n\n //if target tile is invalid\n if (!targetTile) {\n //if handler specified\n if (this.outOfFieldMove) {\n this.outOfFieldMove(movement, initiator)\n }\n\n //return to stop, nowhere to go\n return\n }\n\n //check if move is possible\n if (this.attemptMove(targetTile, movement, initiator)) {\n //perform possible move\n this.performMove(targetTile, movement, initiator)\n }\n }", "title": "" }, { "docid": "6986c5f5ab7c4af530a88ead0f67dd88", "score": "0.6318934", "text": "onModifyMove() {}", "title": "" }, { "docid": "be34692044a769b443a2ac8ee9e37de9", "score": "0.631715", "text": "move() {\n this.position = this.nextPosition();\n }", "title": "" }, { "docid": "ca4765358c117e893fa988a485228d3b", "score": "0.6316686", "text": "function moveOn() {\n\n const snakeHead = snake[0];\n\n switch (direction) {\n\n case 'up':\n snakeHead.y -= step;\n break;\n\n case 'right':\n snakeHead.x += step;\n break;\n\n case 'left':\n snakeHead.x -= step;\n break;\n\n case 'down':\n snakeHead.y += step;\n break;\n };\n}", "title": "" }, { "docid": "cc2d654a7dba8b370516a642aced76e4", "score": "0.6312079", "text": "function moveHandler(event) {\n MouseAndTouch.preventDefault(event);\n if (touchEvents.active) {\n const changedTouches = event.changedTouches;\n const length = changedTouches.length;\n var touch, index;\n for (var i = 0; i < length; i++) {\n touch = changedTouches[i];\n if (touch.target == touchEvents.element) {\n index = touchEvents.findIndex(touch);\n if (index >= 0) {\n touchEvents.touches[index].update(touch);\n }\n }\n }\n // for double touch debug: delete touches if touch moves outside\n if (TouchEvents.doubleTouchDebug && (touchEvents.touches.length > 0) && !touchEvents.isInside(touchEvents.touches[0])) {\n touchEvents.touches.length = 0;\n touchEvents.update();\n touchEvents.setLast();\n touchEvents.getDifferences();\n touchEvents.endAction(touchEvents);\n } else {\n touchEvents.setLast();\n touchEvents.update();\n touchEvents.getDifferences();\n touchEvents.moveAction(touchEvents);\n }\n }\n }", "title": "" }, { "docid": "52acf2d88a5469dd6405894e7b7571a6", "score": "0.6302228", "text": "function _touchMove(event) {\n\t if (!this.options.enabled) {\n\t return;\n\t }\n\n\t // Process the touch event\n\t var primaryTouch;\n\t for (var i = 0; i < event.changedTouches.length; i++) {\n\t var changedTouch = event.changedTouches[i];\n\t for (var j = 0; j < this._scroll.activeTouches.length; j++) {\n\t var touch = this._scroll.activeTouches[j];\n\t if (touch.id === changedTouch.identifier) {\n\n\t // When a thresshold is configured, check whether the move operation (x/y ratio)\n\t // lies within the thresshold. A move of 10 pixels x and 10 pixels y is considered 45 deg,\n\t // which corresponds to a thresshold of 0.5.\n\t var moveDirection = Math.atan2(\n\t Math.abs(changedTouch.clientY - touch.prev[1]),\n\t Math.abs(changedTouch.clientX - touch.prev[0])) / (Math.PI / 2.0);\n\t var directionDiff = Math.abs(this._direction - moveDirection);\n\t if ((this.options.touchMoveDirectionThresshold === undefined) || (directionDiff <= this.options.touchMoveDirectionThresshold)){\n\t touch.prev = touch.current;\n\t touch.current = [changedTouch.clientX, changedTouch.clientY];\n\t touch.prevTime = touch.time;\n\t touch.direction = moveDirection;\n\t touch.time = Date.now();\n\t primaryTouch = (j === 0) ? touch : undefined;\n\t }\n\t }\n\t }\n\t }\n\n\t // Update move offset and emit event\n\t if (primaryTouch) {\n\t var delta = primaryTouch.current[this._direction] - primaryTouch.start[this._direction];\n\t this.updateScrollForce(this._scroll.touchDelta, delta);\n\t this._scroll.touchDelta = delta;\n\t }\n\t }", "title": "" }, { "docid": "4506449e62daae95d20b1f31c75ca5e8", "score": "0.6299886", "text": "move(direction) {\n this.moved = false;\n if(direction == \"up\"){\n // positive width\n var start = [];\n for(var i = 0; i < this.width; i++){\n start[i] = i;\n }\n this.makeItMove(this.width, start); \n\n } else if(direction == \"down\"){\n // negative width\n var first = this.width * (this.width - 1);\n var start = [];\n for(var i = 0; i < this.width; i++){\n start[i] = first + i;\n }\n this.makeItMove((-1 * this.width), start);\n\n } else if(direction == \"left\"){\n // always +1\n var start = [];\n for(var i = 0; i < this.width; i++){\n start[i] = (i * this.width);\n }\n this.makeItMove(1, start);\n\n } else if (direction == \"right\"){\n // always -1 \n var first = (this.width - 1);\n var start = [];\n for(var i = 0; i < this.width; i++){\n start[i] = first + (i * this.width);\n }\n this.makeItMove(-1, start);\n }\n // make move then add a tile\n this.makeRandomTile();\n // call all functions listening to onMove\n for(var i = 0; i < this.onMoveArr.length; i++){\n var funct = this.onMoveArr[i];\n funct(this.getGameState());\n }\n\n // check if move made player win\n // if yes, game is won and call functions listening to onWin\n if(this.won == true){\n for(var i = 0; i < this.onWinArr.length; i++){\n var funct = this.onWinArr[i];\n funct(this.getGameState());\n }\n }\n\n // check if move made player lose the game\n // if yes, then game is lost and call functions listening to onLose\n // if there are zeros, you have room and game is not lost\n var noZeros = true;\n for(var i = 0; i < this.board.length; i++){\n if(this.board[i] == 0){\n noZeros = false;\n break;\n }\n }\n // if you don't have any zeros, you have to check if there are any possible moves\n // only when there are no possible moves is the game over\n if(noZeros == true){\n var moving = false;\n for(var i = 0; i < this.width; i++){\n for(var k = 0; k < this.width; k++){\n var index = (i * this.width) + k;\n var val = this.board[index];\n if(k == this.width - 1){\n // then you are at end of row and don't want to check +1\n if(this.board[index-1] == val ||\n this.board[index-this.width] == val ||\n this.board[index+this.width] == val){\n moving = true;\n continue;\n }\n } else if(k == 0){\n // then you are at beginning of row and don't want to check -1\n if(this.board[index+1] == val ||\n this.board[index-this.width] == val ||\n this.board[index+this.width] == val){\n moving = true;\n continue;\n }\n } else {\n // you are in the middle and want to check everywhere\n if(this.board[index-1] == val ||\n this.board[index+1] == val ||\n this.board[index-this.width] == val ||\n this.board[index+this.width] == val){\n moving = true;\n continue;\n } \n }\n if(index == this.board.length - 1 && moving == false){\n this.over = true;\n }\n }\n }\n }\n \n if(this.over == true){\n for(var i = 0; i < this.onLoseArr.length; i++){\n var funct = this.onLoseArr[i];\n funct(this.getGameState());\n }\n }\n\n }", "title": "" }, { "docid": "f5ca84083408e4a994abf64c9f83f4a4", "score": "0.6290771", "text": "function OnTouchMoveThunk(/*object*/ sender, /*TouchEventArgs*/ e)\r\n { \r\n \tsender.OnTouchMove(e);\r\n }", "title": "" }, { "docid": "7f0102f6e59ecd14134269a837b7d61f", "score": "0.6280471", "text": "function move(event) {\n\tif (target == null && direction == 0) {\n\t\tif (event.screenX != x) {\n\t\t\tif (!rightCol) {\n\t\t\t\tdirection = 1;\n\t\t\t\tselectTarget(event.target);\n\t\t\t}\n\t\t}\n\t\telse if ( event.screenY) {\n\t\t\tif (!rightRow) {\n\t\t\t\tdirection = 2;\n\t\t\t\tselectTarget(event.target);\n\t\t\t}\n\t\t}\n\t}\n\tif (direction == 1) {\n\t\tif (event.screenX != x) {\n\t\t\tvar d = event.screenX - x;\n\t\t\tfor (var i = 0; i < target.length; i++) {\n\t\t\t\ttarget[i].style.left = tmpX[i] + d + \"px\";\n\t\t\t}\n\t\t\tvar tmp = d / (frameWidth / m);\n\t\t\tif (tmp < 0) tmp = parseInt(-(-tmp + 2 / 3));\n\t\t\telse tmp = parseInt(tmp + 2 / 3);\n\t\t\tif (tmp != temp) {\n\t\t\t\tif (start + tmp >= 0 && end + tmp < m) {\n\t\t\t\t\tswapCol(temp, tmp, d);\n\t\t\t\t\ttemp = tmp;\n } \n\t\t\t}\n\t\t}\n\t}\n\telse if (direction == 2) {\n\t\tif (event.screenY != y) {\n\t\t\tvar d = event.screenY - y;\n\t\t\tfor (var i = 0; i < target.length; i++) {\n\t\t\t\ttarget[i].style.top = tmpY[i] + d + \"px\";\n\t\t\t}\n\t\t\tvar tmp = d / (frameHeight / n);\n\t\t\tif (tmp < 0) tmp = parseInt(-(-tmp + 2 / 3));\n\t\t\telse tmp = parseInt(tmp + 2 / 3);\n\t\t\tif (tmp != temp) {\n\t\t\t\tif (start + tmp >= 0 && end + tmp < n) {\n\t\t\t\t\tswapRow(temp, tmp, d);\n\t\t\t\t\ttemp = tmp;\n }\n }\n\t\t}\n\t}\n\tfunction swapRow(a, b, d) {\n\t\tfor (var i = start; i <= end; i++) moveRow(i + a, i + b);\n\t\tif (b > a) {\n\t\t\tfor (var i = end + a + 1; i <= end + b; i++) moveRow(i, i - (end - start + 1));\n\t\t}\n\t\telse {\n\t\t\tfor (var i = start + a - 1; i >= start + b; i--) moveRow(i, i + (end - start + 1));\n }\n\t\tvar tmp = target.length;\n\t\tfor (var i = 0; i < tmp; i++) {\n\t\t\ttmpY[i] = -b * (frameHeight / n);\n\t\t\ttarget[i].style.top = (tmpY[i] + d) + \"px\";\n\t\t}\n\t\thightlight();\n\t}\n\tfunction swapCol(a, b, d) {\n\t\tfor (var i = start; i <= end; i++) moveCol(i + a, i + b);\n\t\tif (b > a) {\n\t\t\tfor (var i = end + a + 1; i <= end + b; i++) moveCol(i, i - (end - start + 1));\n\t\t}\n\t\telse {\n\t\t\tfor (var i = start + a - 1; i >= start + b; i--) moveCol(i, i + (end - start + 1));\n }\n\t\tvar tmp = target.length;\n\t\tfor (var i = 0; i < tmp; i++) {\n\t\t\ttmpX[i] = -b * (frameWidth / m);\n\t\t\ttarget[i].style.left = (tmpX[i] + d) + \"px\";\n\t\t}\n\t\thightlight();\n\t}\n\tfunction hightlight() {\n\t\tvar tmp = target.length;\n\t\tfor (var i = 0; i < tmp; i++) {\n\t\t\tframe.appendChild(target[i].parentElement);\n }\n }\n}", "title": "" }, { "docid": "192fccebacb3e43e732d3dc995177672", "score": "0.6278951", "text": "move(elapsedTime) {\n this.moveTime += elapsedTime;\n if (this.moveTime >= this.moveDuration) {\n elapsedTime = 0;\n }\n\n if (elapsedTime > 0) {\n let stepSize = this.moveDuration / elapsedTime;\n\n //card should move to the expectedPosition but added some x value for good visual effect\n let resultX = (this.expectedPosition.x + 500 - this.startPosition.x);\n if (resultX > 0)\n this.sprite.position.x += resultX / stepSize;\n\n let resultY = (this.expectedPosition.y - this.startPosition.y);\n if (resultY > 0)\n this.sprite.position.y += resultY / stepSize;\n }\n }", "title": "" }, { "docid": "48d511c092b4f53e22f2c695aba09f02", "score": "0.6278147", "text": "function move_callback(e) {\n clearTimeout(timeout);\n }", "title": "" }, { "docid": "24309be67096bf8985235dd7001596ff", "score": "0.62741375", "text": "function move() {\n myKarel.move();\n var name = (arguments.callee.toString()).split(' ')[1];\n pushActions('move', name);\n }", "title": "" }, { "docid": "5f8602e26c4601dd1e798209b521d8d4", "score": "0.6253154", "text": "function touchMoveHandler(e){\r\n\r\n if(isReallyTouch(e)){\r\n //preventing the easing on iOS devices\r\n event.preventDefault();\r\n\r\n var activeSection = $('.ms-left .ms-section.active');\r\n\r\n if (!isMoving) { //if theres any #\r\n var touchEvents = getEventsPage(e);\r\n touchEndY = touchEvents['y'];\r\n touchEndX = touchEvents['x'];\r\n\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (Math.abs(touchStartY - touchEndY) > ($(window).height() / 100 * options.touchSensitivity)) {\r\n\r\n if (touchStartY > touchEndY) {\r\n MS.moveSectionDown();\r\n\r\n } else if (touchEndY > touchStartY) {\r\n MS.moveSectionUp();\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f476b9f233f650454ed624f1c1e481f9", "score": "0.6253043", "text": "function touchMoved(){\n\n // print(move_position); \n // if (scaling != 1 ) {\n // if (mouseX < temp_x && move_position >= 0){\n // move_position += 10;\n // temp_x = mouseX \n // }\n // else if (mouseX >temp_x && move_position >= -1205) {\n // move_position -= 10;\n // temp_x = mouseX;\n // }\n\n // // if mouseY > temp_y) {\n\n // // }\n // }\n}", "title": "" }, { "docid": "952716b4978e22f7d43f0e782083d4e9", "score": "0.6251751", "text": "async touchMove(x, y) {\n const movePoints = [{ x: Math.round(x), y: Math.round(y) }];\n await __classPrivateFieldGet(this, _Touchscreen_client, \"f\").send('Input.dispatchTouchEvent', {\n type: 'touchMove',\n touchPoints: movePoints,\n modifiers: __classPrivateFieldGet(this, _Touchscreen_keyboard, \"f\")._modifiers,\n });\n }", "title": "" }, { "docid": "a5d3e6579abe963aad77e24d2f91b24c", "score": "0.6247296", "text": "$_handleMouseMove(e) {\n if (!this.selected$) return;\n\n let position = this.position$,\n delta;\n // Controller position\n delta = (e.pageY - this.currentY$) * this.$_sensitivity;\n if (e.shiftKey) {\n delta *= 0.1;\n }\n if (this.snap) {\n // snap to step\n const diff = Math.floor(delta / this.$_stepDelta) * this.$_stepDelta;\n position = this.temp$ - diff;\n } else if (delta) {\n position -= delta;\n this.currentY$ = e.pageY;\n } else {\n return;\n }\n\n // console.log(\"mouse-move\", position);\n this.$_updatePosition(position);\n }", "title": "" }, { "docid": "8e931bf0b84bb3fb39646d98bc3df3c6", "score": "0.62467647", "text": "function myMove(e){\n\n\t\t\tif (isDrag){\n\t\t\t\tgetMouse(e);\n\n\t\t\t\tmySel.x = mx - offsetx;\n\t\t\t\tmySel.y = my - offsety;\n\t\t\t\tmySel.x = Math.round(mySel.x/10)*10;\n\t\t\t\tmySel.y = 2.5+Math.round(mySel.y/50)*50;\n\n\t\t\t\t// something is changing position so we better invalidate the canvas!\n\t\t\t\tinvalidate();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "df65aa01f7aaf852263b5dfdd6d1000f", "score": "0.62442577", "text": "move(direction) {\r\n let validMove = false\r\n if (direction == \"left\") {\r\n //do not allow any more movement if tile has reached bottom\r\n if (this.rowsHaveSpaceLeft() & this.hasSpaceDown()) {\r\n this.moveElementLeft()\r\n validMove = true\r\n }\r\n }\r\n if (direction == \"right\") {\r\n //do not allow any more movement if tile has reached bottom\r\n if (this.rowsHaveSpaceRight() & this.hasSpaceDown()) {\r\n this.moveElementRight()\r\n validMove = true\r\n }\r\n }\r\n if (direction == \"down\") {\r\n if (this.hasSpaceDown()) {\r\n this.moveElementDown()\r\n validMove = true\r\n } else {\r\n //check if any rows are complete\r\n this.checkCompleteRow()\r\n //no space down, insert new element\r\n this.insertTile()\r\n }\r\n }\r\n if (validMove) {\r\n //if a valid move, notify game event change listeners the board has changed\r\n for (let i = 0; i < this.changeListeners.length; i++) {\r\n this.changeListeners[i](this.state)\r\n }\r\n }\r\n }", "title": "" }, { "docid": "857ad8e5c4390f9fb6104d9dc5ad2858", "score": "0.6244146", "text": "function moveduck(){\r\n var direction=Math.floor(Math.random() * directions.length);\r\n var top=parseInt(duck.style.top, 8);\r\n var left=parseInt(duck.style.left, 10);\r\n\r\n console.log('Duck left :'+duck.style.left);\r\n console.log('left+=move : ' + left+move);\r\n\r\n switch(directions[direction]){\r\n case \"N\":\r\n top-=move;\r\n break;\r\n\r\n case \"NE\":\r\n top-=move;\r\n left+=move;\r\n break;\r\n\r\n case \"E\":\r\n console.log('huidige positie : ' +left);\r\n left+=move;\r\n console.log('nieuwe positie : ' +left);\r\n break;\r\n\r\n case \"SE\":\r\n top+=move;\r\n left-=move;\r\n break;\r\n\r\n case \"S\":\r\n top-=move;\r\n break;\r\n\r\n case \"SW\":\r\n left-=move;\r\n break;\r\n\r\n case \"W\":\r\n left+=move;\r\n break;\r\n\r\n case \"NW\":\r\n top+=move;\r\n left-=move;\r\n break;\r\n }\r\n\r\n duck.style.top= top+ \"px\";\r\n duck.style.left= left+ \"px\";\r\n}", "title": "" }, { "docid": "56a88c214275e3b0a04ac70d66e32e8f", "score": "0.6242676", "text": "move() {\n this.x += this.xdir;\n this.y += this.ydir;\n }", "title": "" }, { "docid": "56a88c214275e3b0a04ac70d66e32e8f", "score": "0.6242676", "text": "move() {\n this.x += this.xdir;\n this.y += this.ydir;\n }", "title": "" }, { "docid": "6811e9e665c08a0542f9c430a2779c58", "score": "0.62406784", "text": "function moveHandler(e) {\n\t\tvar t=e.touches[0];\n\t\t// move element reletive to initial location of the drag\n\t\telement.style.left = ZLM.constrainDragX(wrapper, t.clientX - deltaX) + \"px\";\n\t\telement.style.top = ZLM.constrainDragY(wrapper, t.clientY - deltaY) +\"px\";\n\n\t\t// Now effectively kill the event\n\t\tif (event.stopPropagation) event.stopPropagation(); // DOM 2\n\t}", "title": "" }, { "docid": "b308a2678fb787112ebbaf120edd891e", "score": "0.6236921", "text": "function move_click(event){\n drag_x = event.clientX;\n drag_y = event.clientY;\n \n if (drag_x > front_canvas.width) drag_x = front_canvas.width - 1;\n if (drag_x < 0) drag_x = 0;\n \n if (drag_y > front_canvas.height) drag_y = front_canvas.height - 1;\n if(drag_y < 0) drag_y = 0;\n\n update_event_log('mouse_move', drag_x, drag_y);\n return true;\n }", "title": "" }, { "docid": "1926702927031b71ff7377ea0065a415", "score": "0.62331545", "text": "function move(e) {\n var to = coords(e);\n\n // Trigger `preventDefault()` if `x` is larger than `y` (scrolling horizontally).\n // If we `preventDefault()` while scrolling vertically, the window will not scroll.\n if (abs(start.x - to.x) > abs(start.y - to.y)) {\n e.preventDefault();\n }\n }", "title": "" }, { "docid": "b704c951ae1e115288663a2cd22f68de", "score": "0.6222068", "text": "function handleTouchMove(e, d) {\n dispatcher.call('customTouchMove', e, d, d3Selection.touch(e));\n }", "title": "" }, { "docid": "addba63b39ae5ba89891e9a4fec4c082", "score": "0.62193775", "text": "function onTouchMove(event) {\n\n if (g_temp.isControlEnabled == false)\n return (true);\n\n if (g_temp.touch_active == false)\n return (true);\n\n event.preventDefault();\n\n //detect moving without button press\n if (event.buttons == 0) {\n g_temp.touch_active = false;\n\n endStripTouchLoop(event);\n return (true);\n }\n\n //store current position\n var pagePos = getMouseOrientPosition(event);\n g_temp.lastPos = g_parent.getInnerStripPos();\n\n handleStripDrag(pagePos);\n\n storeTouchPortionData();\n\n }", "title": "" }, { "docid": "fa8eb8c5dbb6330b38cda7ccd1d6970a", "score": "0.6212112", "text": "interactAndMove(direction) {\n const target = this.position.add(direction)\n target.interact()\n if (target.isEmpty()) {\n this.moveTo(target)\n }\n }", "title": "" }, { "docid": "ac1d9c9a17bcb6d9c1d1ec2794c3a05d", "score": "0.6211338", "text": "function touchMoveDisplay(event_) {\n\t\t\tevent_.preventDefault();\n\t\t\tvar touch = event_.targetTouches[0];\n\t\t\tcontroller.moveTo(touch.pageX, touch.pageY);\n\t\t}", "title": "" }, { "docid": "36fcff1f970cfb2488aa6fb29510a6b0", "score": "0.62038386", "text": "function move(event) {\n switch(event.key) {\n case \"z\":\n if(checkUp() === 0) {\n if(looseUp === 0) {\n looseUp++;\n notOK = 0;\n }\n }\n\n else {\n resetLoose()\n notOK = 0;\n }\n break;\n\n case \"q\":\n if(checkLeft() === 0) {\n if(looseLeft === 0) {\n looseLeft++;\n notOK = 0;\n }\n }\n\n else {\n resetLoose()\n notOK = 0;\n }\n break;\n\n case \"s\":\n if(checkDown() === 0) {\n if(looseDown === 0) {\n looseDown++;\n notOK = 0;\n }\n }\n\n else {\n resetLoose()\n notOK = 0;\n }\n break;\n\n case \"d\":\n if(checkRight() === 0) {\n if(looseRight === 0) {\n looseRight++;\n notOK = 0;\n }\n }\n\n else {\n resetLoose()\n notOK = 0;\n }\n break;\n }\n\n loose();\n}", "title": "" }, { "docid": "88ab7b4e4b734b6fdb49720a6ded24f9", "score": "0.62030476", "text": "function touchMove(event) {\n\t\t\t\tif (fingerId>0){\n\t\t\t\t\tvar eventData = getEventData(event, fingerId);\n\t\t\t\t\tif (eventData){\n\t\t\t\t\t\tfinalCoord.x = eventData.x;\n\t\t\t\t\t\tfinalCoord.y = eventData.y;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar changeX = finalCoord.x - originalCoord.x;\n\t\t\t\t\t\tvar changeY = finalCoord.y - originalCoord.y;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//originalCoord.x = finalCoord.x;\n\t\t\t\t\t\t//originalCoord.y = finalCoord.y;\t\n\t\t\t\t\t\toptions.debug(\"Scroll: \"+changeX + \",\" + changeY);\n\t\t\t\t\t\toptions.scroll(changeX, changeY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Calculate real angle from coordinates\n\t\t\t\t//var angleX = ((finalCoord.y/320)*360)-180;\n\t\t\t\t//var angleY = ((finalCoord.x/320)*360)-180;\n\t\t\t\t\n\t\t\t\t// Adjust the rotation \n\t\t\t\t//rotateTo(finalCoord.x, finalCoord.y, angleX, angleY)*/\n\t\t\t}", "title": "" }, { "docid": "9719c663736dae94a41313ca7967c2e5", "score": "0.6202468", "text": "function move(dir)\n{\n //airconsole.message(AirConsole.SCREEN, { move: amount })\n\tairconsole.message(AirConsole.SCREEN, { direction: dir });\n\tconsole.log(\"move\");\n}", "title": "" }, { "docid": "359091c1d71f40c0a161768581374454", "score": "0.61886746", "text": "function reactionTouchMove (e) { \n if (!active) return; // Abbrechen, falls Zugmodus nicht aktiviert\n var obj = e.changedTouches[0]; // Liste der neuen Fingerpositionen \n reactionMove(obj.clientX,obj.clientY); // Position ermitteln, rechnen und neu zeichnen\n e.preventDefault(); // Standardverhalten verhindern \n }", "title": "" }, { "docid": "af0538879cca941eb1dccddda755b361", "score": "0.6184593", "text": "function move() {\n mode = \"move_old\";\n }", "title": "" }, { "docid": "fb30856a8e6110b4ffcf35dee2c102ec", "score": "0.61840636", "text": "function gameObjectMovementTest(dir, expectedX, expectedY) {\n var result;\n // simulate a key press\n keyboardEvent.keyCodeVal = keymap[dir].code;\n document.dispatchEvent(keyboardEvent);\n result = mock.x == expectedX && mock.y == expectedY;\n // reset the mock object\n mock.x = 0;\n mock.y = 0;\n resetImages();\n return result;\n}", "title": "" }, { "docid": "0bc93d5b01e9f5791760b231a7d9c842", "score": "0.6183177", "text": "function moveTesttube(testtube, x_pos, y_pos) {\n testtube_flag = false;\n getChild(testtube).on(\"click\", function(evt) { /** Testtube click function */ \n getChild(testtube).mouseEnabled = false;\n getChild(testtube).x = 555;\n getChild(testtube).y = 390;\n testtubeInMachine(testtube, x_pos, y_pos); /** Function for testtube placed in machine */\n });\n}", "title": "" }, { "docid": "f3afb4661c4d51a2f145272d9d05191b", "score": "0.61829156", "text": "function isMovementValidForChange() {\n\n var slides = g_parent.getSlidesReference();\n\n //check position, if more then half, move\n var diffPos = getDiffPosFromCurrentItem(slides);\n\n var breakSize = Math.round(slides.objCurrentSlide.width() * 3 / 8);\n\n if (Math.abs(diffPos) >= breakSize)\n return (true);\n\n //check gesture, if vertical mostly then not move\n var diffX = Math.abs(g_temp.lastMouseX - g_temp.startMouseX);\n var diffY = Math.abs(g_temp.lastMouseY - g_temp.startMouseY);\n\n //debugLine(\"diffx: \" + diffX, true, true);\n\n if (diffX < 20)\n return (false);\n\n //if(diffY >= diffX)\n //return(false);\n\n //check time. Short time always move\n var endTime = jQuery.now();\n var diffTime = endTime - g_temp.startTime;\n\n //debugLine(\"time: \" + diffTime, true);\n\n if (diffTime < 500)\n return (true);\n\n\n return (false);\n }", "title": "" }, { "docid": "2efa375ecef99a22081d900bf0cb6ded", "score": "0.6182289", "text": "move () {\n this.loc_x += this.move_x;\n this.loc_y += this.move_y;\n\n if ( this.loc_x >= width ) {\n this.move_x *= -1;\n this.loc_x = width - abs ( this.move_x );\n } else if ( this.loc_x <= 0 ) {\n this.move_x *= -1;\n this.loc_x = abs ( this.move_x );\n } else if ( this.loc_y >= height ) {\n this.move_y *= -1;\n this.loc_y = height - abs ( this.move_y );\n } else if ( this.loc_y <= 0 ) {\n this.move_y *= -1;\n this.loc_y = abs ( this.move_y );\n }\n }", "title": "" }, { "docid": "f28a081989d120da5cb90596752f28aa", "score": "0.61790895", "text": "move() {\n return null;\n }", "title": "" }, { "docid": "f28a081989d120da5cb90596752f28aa", "score": "0.61790895", "text": "move() {\n return null;\n }", "title": "" }, { "docid": "f5546184558393d5126c5dbe51fdb5fc", "score": "0.61714303", "text": "function move(e) {\n\t\t// grab the right player\n\t\tvar myPlayer = document.getElementsByClassName(\"player\")[0];\n\t\tvar x = parseInt(myPlayer.style.left);\n\t\tvar y = parseInt(myPlayer.style.top);\t\t\n\n\t\t// move up\n\t\tif(e.keyCode == 38) {\n\t\t\tdirection = \"up\";\n\t\t}\n\t\t\n\t\t// move down\n\t\telse if(e.keyCode == 40) {\t\t\t\n\t\t\tdirection = \"down\";\n\t\t}\n\n\t\t// move left \n\t\telse if(e.keyCode == 37) {\n\t\t\tdirection = \"left\";\n\t\t}\n\n\t\t// move right\n\t\telse if (e.keyCode == 39) {\n\t\t\tdirection = \"right\";\n\t\t}\n\t}", "title": "" } ]
57c1fa890cf70e387b9254b77c00f63b
throw an error if a required method doesn't exist
[ { "docid": "7b2db3162b942c540d18ed231638fc09", "score": "0.65276146", "text": "static checkMethod(t,m) {\n if (t[m] === undefined) {\n throw new TypeError(\"Must override method: \"+m);\n }\n }", "title": "" } ]
[ { "docid": "9474441192aaed9ad4ac8a10960d8922", "score": "0.753777", "text": "function required(){\n\t\tthrow new Error(\"This method is required and no implementation has been provided\");\n\t}", "title": "" }, { "docid": "20fe7148b33d8bceb13f3b63330c6f80", "score": "0.6333153", "text": "checkGetter(m) {\n if (this.__lookupGetter__(m) === undefined) {\n throw new TypeError(\"Must provide a getter: \"+m);\n }\n }", "title": "" }, { "docid": "41f67b205a76f8ed8f18c86894be6a76", "score": "0.6164071", "text": "function throwMethodUseError(methodName) {\n throw new Error(`You attempted to define the '${methodName}' method on a Glimmer Component, but that lifecycle hook does not exist in Ember.js applications, it only exists in Glimmer.js apps. You can rename this method, and you can trigger it using a modifier such as {{did-insert}} from '@ember/render-modifiers': https://github.com/emberjs/ember-render-modifiers.`);\n }", "title": "" }, { "docid": "2c5becea473bb259a058f8f56901294a", "score": "0.606747", "text": "function failUnimplemented() {\n throw new Error(\"Method not implemented.\");\n}", "title": "" }, { "docid": "d4ad5e271dc5fe825eddfbe30dbdfb95", "score": "0.6028989", "text": "function isRequired(param) {\n throw new Error(param + ` is required!`);\n}", "title": "" }, { "docid": "3c8930ebf6b0f486c9e3bc2deda51433", "score": "0.59615374", "text": "function validateNum(num, method) {\n if (typeof num !== 'number') {\n throw new Error(\"First argument of \".concat(method, \" method must be a number\"));\n }\n }", "title": "" }, { "docid": "9878915be4ee16b3b5345ced084b3f5f", "score": "0.59443104", "text": "has(x) {\n throw new Error(\"Abstract method\");\n }", "title": "" }, { "docid": "fb0aa99f71d912d96d78897811fa9c5b", "score": "0.5820303", "text": "has(x) { throw new Error(\"Abstract method\"); }", "title": "" }, { "docid": "071d2591c06dfd81a90548051f5d0601", "score": "0.57427", "text": "check(module, path) {\n throw new Error(\"The check method needs to be implemented.\");\n }", "title": "" }, { "docid": "821da9877f6004e2c4e53cfb24e0fd34", "score": "0.57157516", "text": "function methodIsValid(method)\n\t{\n\t\tvar methods = [\"GET\", \"POST\"];\n\t\t\n\t\tfor(var i=0; i < methods.length; i++)\n\t\t{\n\t\t\tif(methods[i] == method)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "650fd1c8945cdf7ced5ef9f1ec878645", "score": "0.5707248", "text": "exists() {\n\t\tthis.notImplemented()\n\t}", "title": "" }, { "docid": "bcf7c138e7c0653dbadebf86673be8b8", "score": "0.56717163", "text": "function _required(name, value) {\n if (!value) {\n throw new Error('required argument \\'' + name + '\\' not specified');\n }\n }", "title": "" }, { "docid": "ad3ead07d1bcd1fd3f060ca6e5496081", "score": "0.56204826", "text": "requiresSignature(method) {\n return this.signatureMethods.includes(method);\n }", "title": "" }, { "docid": "2e7bd1db8984333de07e490009b7e4e9", "score": "0.5596004", "text": "function notImplemented(req, res, next)\n {\n req.log.error(\"API endpoint %s not implemented\", req.path());\n throw new Error(\"Not implemented\");\n }", "title": "" }, { "docid": "c9390d006ab6d4ddf3f8367e148cae88", "score": "0.55839366", "text": "static error(type, method) {\n if(type === 1) console.warn(`No elements selected by ${method}`);\n }", "title": "" }, { "docid": "e5bc210d72bfd304af9109014bf2e187", "score": "0.5551329", "text": "onMiss(req, res) {\n debug(`fail! unrecognized method call: '${req.body.method}'`)\n\n // send ros error message\n res.send(xmlrpc.serializeResponse([\n -1, // error code\n `unrecognized method call '${req.body.method}'`,\n undefined,\n ]))\n }", "title": "" }, { "docid": "25f3a9ca69d69b1807f17ea2a6410ac7", "score": "0.55096847", "text": "function checkRequirements(requiresProp, named, has, msg) {\n Object.keys(named).forEach(name => {\n asArray(named[name][requiresProp]).forEach(requirement => {\n if (!has(requirement)) {\n throw new Error(msg(name, requirement))\n }\n })\n })\n}", "title": "" }, { "docid": "d0dcbf0d1c73787a946a13ca4277f363", "score": "0.5506371", "text": "renderQuestion() {\n throw new BadMethodCallException();\n }", "title": "" }, { "docid": "5bfe8a27d501285e6c9edc54279283d4", "score": "0.5475694", "text": "function validateFHOptions(options) {\n if (options.method !== 'GET' && options.method !== 'POST') {\n throw new Error('Unsupported method or method wasn\\'t provided');\n }\n if (options.data === undefined) {\n throw new Error('options.data not provided');\n }\n }", "title": "" }, { "docid": "e200e43ade871258dfe5da6662d18b70", "score": "0.5460011", "text": "isValid() {\n throw new Error(`Method validate of Validator mast be implemented`)\n }", "title": "" }, { "docid": "f1ccab1803a740c21b1049b026517d3a", "score": "0.54549193", "text": "function notImplemented() {\n throw new Error(\"Not implemented\");\n }", "title": "" }, { "docid": "e65f54113bb312bcbc5dc6e51b7d1574", "score": "0.5448445", "text": "function isRequired(key, name) {\n if (!key) {\n logger.error(`--${name} is required`);\n process.exit(1);\n }\n return key;\n}", "title": "" }, { "docid": "a1fe5b09b6592eb967fb7a6078eeb73d", "score": "0.5422449", "text": "injectDoRequire () {\n if (has(this.service, 'doRequireCall')) {\n throw Error(`service |${this.layerName}.${this.name}| allready has reserved |doRequireCall|, halt!`)\n }\n this.service.doRequireCall = this.proxyUpcomingExecute\n }", "title": "" }, { "docid": "9337a97ff7148bb53b89eb26420060ca", "score": "0.54131556", "text": "isSimple() {\n throw new Error(\"Abstract method.\");\n }", "title": "" }, { "docid": "78bb22418097da8cc7d4d378eb36111b", "score": "0.53877956", "text": "function throwMissingArgument(name, func) {\r\n throw new ArgumentNullError(name, 'Required argument ' + name + ' for function ' + func + ' is not defined');\r\n}", "title": "" }, { "docid": "4eb67f50a54963c5e591aabae9008ce5", "score": "0.5383469", "text": "function hasMethod(key, obj) {\n return has(key, obj) && typeof obj[key] === 'function';\n }", "title": "" }, { "docid": "3e3e146d83a0dbd72d042d7236bc627d", "score": "0.5357535", "text": "function NO_IMPLEMENT(_tip) {\n return Exception(1, _tip ? \"\".concat(_tip, \" has not been implemented\") : \"the action in this condition has not been implemented\");\n}", "title": "" }, { "docid": "fbec7117c583fe03d324c64519c4045b", "score": "0.535166", "text": "function NotAnErrorException() {}", "title": "" }, { "docid": "c60827f1303121a04d134be4a1cef9f4", "score": "0.53411865", "text": "handler () {\n throw new Error('Implementation pending')\n }", "title": "" }, { "docid": "261e534f957b459d33eb31361e37156e", "score": "0.53240323", "text": "function isMethod(path) {\n const isProbablyMethod = _astTypes.namedTypes.MethodDefinition.check(path.node) && path.node.kind !== 'constructor' || (_astTypes.namedTypes.ClassProperty.check(path.node) || _astTypes.namedTypes.Property.check(path.node)) && _astTypes.namedTypes.Function.check(path.get('value').node);\n\n return isProbablyMethod && !(0, _isReactComponentMethod.default)(path);\n}", "title": "" }, { "docid": "6d9d8f6993dd43868845529838a5d00e", "score": "0.5306359", "text": "function valid_api_methods() {\n return api_methods\n}", "title": "" }, { "docid": "204bd353b1d9458c8c4c6508ffcc101a", "score": "0.5294882", "text": "function _validateCommand(name, command) {\n if (!_.isString(command.description)) {\n throw new Error(sprintf('Command \"%s\" must have a description string', name));\n } else if (!_.isFunction(command.invoke)) {\n throw new Error(sprintf('Command \"%s\" must have an invoke function', name));\n }\n}", "title": "" }, { "docid": "d13cb55d169b89d41be6e39ad4466dc5", "score": "0.5288292", "text": "execute(){\n throw new Error(`Please implement this method.`);\n }", "title": "" }, { "docid": "d226c7579de02bf4f64ce013efb3d5bf", "score": "0.5282178", "text": "method(){}", "title": "" }, { "docid": "d226c7579de02bf4f64ce013efb3d5bf", "score": "0.5282178", "text": "method(){}", "title": "" }, { "docid": "bafbf9145256341c85e9c82e38d5b1d7", "score": "0.52413404", "text": "exists() {\n throw new Error('Not implemented yet')\n }", "title": "" }, { "docid": "b6fae39d75c6caec4d699dc39bd36e43", "score": "0.52366716", "text": "function ctxError() {\n throw error('interactor methods should not be called within assertions');\n}", "title": "" }, { "docid": "03bb7bb44200f946ca77c73d97c967ca", "score": "0.5236629", "text": "async _perform(req) {\n assert$1(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }", "title": "" }, { "docid": "b3d1376230d3464588acf0626c47ccd6", "score": "0.52300656", "text": "aspect() {\n throw new Error(\"You have to implement the method aspect!\");\n }", "title": "" }, { "docid": "19064e98c3884d3f97cade95aa8d6943", "score": "0.5220694", "text": "get(req, res) {\n throw new Error('You must implement get() in your REST controller');\n }", "title": "" }, { "docid": "80fb7a8f10958aa23c8aaae6027d39f2", "score": "0.5220361", "text": "function notImplementedYet(propertyName, objectName){\n\t\talert( \"The \" + propertyName + \" property or method of the \" + objectName \n\t\t\t\t+ \" object is not implemented yet.\");\n\t}", "title": "" }, { "docid": "643bcb1f380de6f17e228842f693fe79", "score": "0.52117944", "text": "function cause_error(){\n undefined_function();\n}", "title": "" }, { "docid": "2d5b79f268ef8c5e220b5404ae491d46", "score": "0.52101153", "text": "function ensureMethodType(method, index) {\n if (!isString(method)) {\n throw new Error('constructor of Interface class require second argument is \\'array of string\\', but method index ' + index + ' is not \\'string\\', is \\'' + (typeof method) + '\\'.');\n }\n\n return method;\n }", "title": "" }, { "docid": "bcd5ef39d118d331030e9fd3652fb043", "score": "0.5205225", "text": "function supports(method) {\n return ~methods.indexOf(method);\n}", "title": "" }, { "docid": "06473dd0a27fb3aa355e6cd92c403fea", "score": "0.5203745", "text": "function required() {\n return REQUIRED;\n }", "title": "" }, { "docid": "5ec346fb5d76112ad97b0e136a2247cc", "score": "0.5200417", "text": "async handle(key: string): Promise<boolean> {\n throw new Error('Method is abstract. Override in subclass.');\n }", "title": "" }, { "docid": "2184baae9a36a0a7265d064d3f85028a", "score": "0.5191186", "text": "function checkError(method, error, params) {\n var message = error.message;\n\n if (error.code === logger$9.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === 'string') {\n message = error.error.message;\n } else if (typeof error.body === 'string') {\n message = error.body;\n } else if (typeof error.responseText === 'string') {\n message = error.responseText;\n }\n\n message = (message || '').toLowerCase();\n var transaction = params.transaction || params.signedTransaction; // \"insufficient funds for gas * price + value + cost(data)\"\n\n if (message.match(/insufficient funds/)) {\n logger$6.throwError('insufficient funds for intrinsic transaction cost', logger$9.Logger.errors.INSUFFICIENT_FUNDS, {\n error: error,\n method: method,\n transaction: transaction\n });\n } // \"nonce too low\"\n\n\n if (message.match(/nonce too low/)) {\n logger$6.throwError('nonce has already been used', logger$9.Logger.errors.NONCE_EXPIRED, {\n error: error,\n method: method,\n transaction: transaction\n });\n } // \"replacement transaction underpriced\"\n\n\n if (message.match(/replacement transaction underpriced/)) {\n logger$6.throwError('replacement fee too low', logger$9.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error: error,\n method: method,\n transaction: transaction\n });\n }\n\n if (errorGas.has(method) && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {\n logger$6.throwError('cannot estimate gas; transaction may fail or may require manual gas limit', logger$9.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error: error,\n method: method,\n transaction: transaction\n });\n }\n\n throw error;\n}", "title": "" }, { "docid": "3eac33371e9d21897559c27b94c61bb2", "score": "0.51869", "text": "hasMethodRoute(method, route) {\n method = _checkMethod(method);\n // Separate potential query string\n let rq = route.split('?');\n return this.hasRoute(`${method}:${rq[0]}`);\n }", "title": "" }, { "docid": "7fa09e4553eaede9dbd0dbb2e673394c", "score": "0.5176918", "text": "function Qa(a,b,c){if(!a){throw t(\"areq\",\"Argument '{0}' is {1}\",b||\"?\",c||\"required\")}return a}", "title": "" }, { "docid": "5b606a7ca96a9be3590d252f4874a631", "score": "0.51654917", "text": "function triggerAPIMethod(prop, method) {\n if (canCall(prop, method)) {\n prop[method]();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "3956a0c158dda10b4419c90358eed77e", "score": "0.5160484", "text": "function notImplemented (method) {\n return function () {\n throw new Error('collection.' + method + ' not implemented');\n }\n}", "title": "" }, { "docid": "3956a0c158dda10b4419c90358eed77e", "score": "0.5160484", "text": "function notImplemented (method) {\n return function () {\n throw new Error('collection.' + method + ' not implemented');\n }\n}", "title": "" }, { "docid": "13f661b68e41cf4f3c082aa0b88c39de", "score": "0.51562357", "text": "function required(options, name, help) {\n\tif (!options[name]) {\n\t\tlog.error('Missing required options '+('--'+name).magenta.bold+' which should '+help);\n\t}\n}", "title": "" }, { "docid": "e853b609c192c7806e2e93c6344dd522", "score": "0.51558125", "text": "function isNotChained(method, otherArgs) {\n if (method == 'option' && (otherArgs.length == 0 ||\n (otherArgs.length == 1 && typeof otherArgs[0] == 'string'))) {\n return true;\n }\n return $.inArray(method, getters) > -1;\n }", "title": "" }, { "docid": "cb6e4b445bff4f23bb16230f4d86a82c", "score": "0.5151008", "text": "function ea(a,b,c){if(!a)throw hd(\"areq\",\"Argument '{0}' is {1}\",b||\"?\",c||\"required\");return a}", "title": "" }, { "docid": "3d6cc27f26ef0ee7f1e490e4f5e98007", "score": "0.5135555", "text": "msg() {\n throw new Error(`Method msg of Validator mast be implemented`)\n }", "title": "" }, { "docid": "6d7110250a9f0247c481bd1df92cb2d1", "score": "0.5134889", "text": "isMethodsAvailable() {\n return Object.entries(this.getMethods).length > 0\n }", "title": "" }, { "docid": "ce928308e59dc2300722a4d945dc3828", "score": "0.5132893", "text": "function plainMethod(fn) {\n return overridable(true, innocuous(fn));\n }", "title": "" }, { "docid": "53136b9b0baf93298720ad6657981cb1", "score": "0.51257616", "text": "function notImplemented(method) {\n return function() {\n throw new Error('collection.' + method + ' not implemented');\n };\n}", "title": "" }, { "docid": "5d63713643edfbbd1bb457878faf0d66", "score": "0.51200986", "text": "function isNotChained(method, otherArgs) {\n\tif (method == 'option' && (otherArgs.length == 0 ||\n\t\t\t(otherArgs.length == 1 && typeof otherArgs[0] == 'string'))) {\n\t\treturn true\n\t}\n\treturn $.inArray(method, getters) > -1\n}", "title": "" }, { "docid": "ebe8556973018fc42127dc52f09cd114", "score": "0.5110597", "text": "increaseExperience(){\n throw new Error(`You have to implement method ${this.increaseExperience.name} in all subclasses of Unit class`);\n }", "title": "" }, { "docid": "263250436906782ed057c05478a8b21d", "score": "0.51085806", "text": "getSignature() {\n throw new Error('Not Implemented');\n }", "title": "" }, { "docid": "2fff5f306a211894bba67ff27191c2e1", "score": "0.5105768", "text": "function urlError () {\n throw new Error('A \"url\" property or function must be specified');\n}", "title": "" }, { "docid": "926f133603b6725b760810dfc10ab53c", "score": "0.510547", "text": "function _raiseNotImplemented(msg){\n\tmsg = msg || \"\";\n\t$.error(\"Not implemented: \" + msg);\n}", "title": "" }, { "docid": "397301bb6619ffbb0ce2366903204a43", "score": "0.509149", "text": "function canCall(prop, method) {\n const api = canAccessAPI(prop);\n if (!api) {\n return false;\n }\n\n return (prop[method] && typeof prop[method] === 'function');\n}", "title": "" }, { "docid": "aa390894109dd4f60081554cf88afc5e", "score": "0.5087981", "text": "function required() {\n return REQUIRED;\n }", "title": "" }, { "docid": "614d3a485381e14dad496d665017bbf8", "score": "0.50842094", "text": "playCard(){\n throw \"Not Implemented\";\n }", "title": "" }, { "docid": "f7e2d19c35bde541d87e997600b200bb", "score": "0.5082365", "text": "setex() {\n throw new Error('Method requires implementation, see the cache client concrete object');\n }", "title": "" }, { "docid": "56f0e64d853abe7c9fdad69fde0c1b63", "score": "0.50608367", "text": "getSingleOrder(){\n console.log(\"Get Single Order\");\n throw new Error('Not Implimented');\n\n }", "title": "" }, { "docid": "23d2b5a0f2271fb5bad1da91c8ebfd83", "score": "0.50565803", "text": "throw404 () {}", "title": "" }, { "docid": "9058114e2991cae12f44debbd444dc27", "score": "0.50523764", "text": "function assertArg(arg,name,reason){if(!arg){throw ngMinErr('areq',\"Argument '{0}' is {1}\",name||'?',reason||\"required\");}return arg;}", "title": "" }, { "docid": "3fbef0cda0902755dfd04fc79b61d410", "score": "0.50463736", "text": "async body() {\n this.throwError(\"call to abstract base class method body()\");\n }", "title": "" }, { "docid": "7304243e08593e0417cf219cd65bd932", "score": "0.5042694", "text": "function isSimpleMethod() {\n return qq.indexOf([\"GET\", \"POST\", \"HEAD\"], options.method) >= 0;\n }", "title": "" }, { "docid": "03bee0bd40ec9a0a2cf9f609a5928975", "score": "0.50290406", "text": "async validate() {\n throw new Error(`Cannot validated ${this.fieldName}... BaseFieldValidator.validate must be implemented by inheriting class.`);\n }", "title": "" }, { "docid": "c31fbaaa04838a0e85fca00e9dc2fbb1", "score": "0.50265944", "text": "draw() {\n // Extending classes should implement this method.\n throw new TypeError('Method not implemented');\n }", "title": "" }, { "docid": "e4568df583716804b69a99c6e2b5aa98", "score": "0.50188655", "text": "onError(error, req, res, next){\n debug(`error handling method call: '${req.body.method}':`, error)\n\n // send ros error message\n res.send(xmlrpc.serializeResponse([\n -1, // error code\n `error handling method call '${req.body.method}'`,\n undefined,\n ]))\n\n next(error)\n }", "title": "" }, { "docid": "e4544bca8ff5c8bcbb16ef6019db1544", "score": "0.5016597", "text": "function _fnRemoved () {\n throw {code: 410, text: 'Object is removed'};\n}", "title": "" }, { "docid": "3fa41b233f84662f638564a682b514d6", "score": "0.50165", "text": "get hasMethods() {\r\n return this.getMethods().length > 0;\r\n }", "title": "" }, { "docid": "ee556d07fd00c37b01a4889eff81d72c", "score": "0.5001951", "text": "_assertExists (variable, errorMessage) {\n if (variable === undefined) {\n throw new InvalidArgError(errorMessage)\n }\n }", "title": "" }, { "docid": "9f16424b22e050be73b9ffb75167952c", "score": "0.49939203", "text": "function notImplemented() {\n return new Error('NotImplemented');\n}", "title": "" }, { "docid": "8719cbd39ecd0f54febdb2e6de044a23", "score": "0.49884838", "text": "publicApiCheck(req) {\n if (!self.options.publicApiProjection) {\n if (!self.canAccessApi(req)) {\n throw self.apos.error('notfound');\n }\n }\n }", "title": "" }, { "docid": "8719cbd39ecd0f54febdb2e6de044a23", "score": "0.49884838", "text": "publicApiCheck(req) {\n if (!self.options.publicApiProjection) {\n if (!self.canAccessApi(req)) {\n throw self.apos.error('notfound');\n }\n }\n }", "title": "" }, { "docid": "a0bfb7d51970bafb952573d2becf21f1", "score": "0.49793816", "text": "function isMethodAvailable(methodName, cb) {\n // Input check\n if (!cb) cb = Utils.noop;\n if (methodName === undefined) return cb(\"Invalid parameter\");\n\n // Prepare request\n var timestamp = Date.now();\n var request = {\n type: \"IS_METHOD_AVAILABLE\",\n data: {\n method: methodName\n },\n timestamp: timestamp,\n callback: cb\n };\n allRequests[timestamp] = request;\n\n // Pass to parent\n parent.postMessage(JSON.stringify(request), \"*\");\n }", "title": "" }, { "docid": "a4cad590a157496c5282c9d0a0edc09b", "score": "0.4959339", "text": "function whenNotFunction(fn, message) {\n if (typeof fn !== \"function\") {\n errorHandling_1.throwExpection(message);\n }\n}", "title": "" }, { "docid": "24662755e0212883272400b87d646c2c", "score": "0.49467698", "text": "function assertArg(arg,name,reason){if(!arg){throw ngMinErr('areq',\"Argument '{0}' is {1}\",name || '?',reason || \"required\");}return arg;}", "title": "" }, { "docid": "5e62a47a0cccb6d8bfc28de1820fbd14", "score": "0.49366358", "text": "checkOrThrow (error) {\n\t\tif (this.doesntCheck()) {\n\t\t\tthrow error;\n\t\t}\n\t}", "title": "" }, { "docid": "36ecfb7113292eb8ab90bab00bd074c6", "score": "0.4935171", "text": "_validateAndSetParams(params) {\n params = params || [];\n if (!Array.isArray(params)) params = [params];\n\n let errorMessages = [];\n // console.log(params);\n params.forEach((param, i) => {\n param = param || {};\n REQUIRED_PARAM_KEYS.forEach((key) => {\n if (!param[key]) errorMessages.push(`\\`${key}\\` is missing for params of \\`${this.fullName()}\\` method at ${i}`);\n });\n });\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join('\\n'));\n }\n\n this.params = params;\n }", "title": "" }, { "docid": "78583abc314895b151866cadb0b4751f", "score": "0.49342558", "text": "function required(text) {\n}", "title": "" }, { "docid": "156aa97acf103ef21efa5ab0288bfdb1", "score": "0.49209994", "text": "function throwErr(err){\n\tthrow 'unsupport operation : ' + err.toString()\n}", "title": "" }, { "docid": "8d8228d78957acafb10c56e875781b86", "score": "0.49134853", "text": "required() {\n let args = arguments;\n return this.get_field('_required_field', args);\n }", "title": "" }, { "docid": "5c41b120e1c05e83fd454be798e69acf", "score": "0.49114475", "text": "async handle () {\n throw new FrameworkError(\n `${this.name} has to implement \"handle(payload, request)\" method`\n );\n }", "title": "" }, { "docid": "1908f8d3fb95dba74226e4b32797420d", "score": "0.4902878", "text": "function bar(param) {\n if (param)\n throw 'bar';\n else\n return 'foo';\n}", "title": "" }, { "docid": "82d0202a06a28ac0e5b5a6ab197b3ef0", "score": "0.48891848", "text": "function _API_request(method, options) {\n\n if (typeof options !== \"object\" || options === {}){\n // there are no options or the param is invalid\n console.error('API: invalid options parameter.');\n return false; // kill it with fire!!! -> flag the reponse\n }\n\n // setup default values\n method = (typeof method === \"string\") ? method.trim().toUpperCase() : '_METHOD_UNDEFINED_';\n\n options.endpoint = (typeof options.endpoint === \"string\") ? options.endpoint.trim() : '_ENDPOINT_UNDEFINED_';\n\n options.data = (typeof options.data === \"object\") ? options.data : {};\n\n options.onSuccess = (typeof options.onSuccess === \"function\") ? options.onSuccess : function(){};\n options.onFailure = (typeof options.onFailure === \"function\") ? options.onFailure : function(){};\n\n options.fadeAnimate = (typeof options.fadeAnimate === \"boolean\") ? options.fadeAnimate : false;\n\n options.loadingBodyClass = (typeof options.loadingBodyClass === \"boolean\")\n ? (options.fadeAnimate || options.loadingBodyClass) // is overridden if animations are enabled\n : (options.fadeAnimate || false); // also gets overridden if animations are enabled\n\n // add optional HTML display element if the input object is also an HTML element\n options.errorElement = (options.errorElement instanceof HTMLElement) ? options.errorElement : null;\n\n switch (typeof options.errorBodyClass){\n case \"boolean\":\n // the input option is boolean - add class on error if true\n options.errorBodyClass = (options.errorBodyClass == true) ? 'error' : '';\n break;\n case \"string\":\n options.errorBodyClass = (options.errorBodyClass) ? options.errorBodyClass : ''\n break;\n default:\n // default option if neither boolean or string\n options.errorBodyClass = '';\n }\n\n\n if (validMethods.indexOf(method) > -1) {\n // the method is valid, so begin checking the requested endpoint\n\n if (verifiedEndpoints.indexOf(options.endpoint) > -1 || verifiedEndpoints.indexOf(options.endpoint + '/') > -1) {\n // the endpoint is verified -> begin checking the data\n\n if (typeof options.data === \"object\" && options.data !== {}) {\n // the data being passed is valid so prepare a request\n\n var apiRequest = new XMLHttpRequest();\n apiRequest.onreadystatechange = function () {\n\n if (apiRequest.readyState == 4){\n // the request is complete -> now check the status\n\n if (options.fadeAnimate) {\n // remove loading styles from body\n bodyClass.remove('loading-fade');\n setTimeout(function(){ bodyClass.remove('loading') }, 800);\n }\n\n if (options.loadingBodyClass){\n // force add the loading class if animations are disabled and the flag is set\n bodyClass.remove('loading');\n }\n\n if (apiRequest.status == 200) {\n // the request was received without errors -> but needs to be verified\n\n var parsedResponse; // create placeholder refrence to the JSON data to be parsed\n\n try {\n parsedResponse = JSON.parse(apiRequest.responseText);\n } catch (e) {\n console.error('API: JSON parse of response from endpoint \"' + options.endpoint + '\" failed.');\n }\n\n if (parsedResponse && typeof parsedResponse === \"object\") {\n // it's a valid object\n\n // extract apiResponseError from response\n var apiErrorResponse = (typeof parsedResponse.error === \"string\") ? parsedResponse.error : '';\n\n if (apiErrorResponse){\n // if the above setter evaluates as true then there is an error\n\n if (options.errorBodyClass){\n // the errorBody class needs to be added\n bodyClass.add(options.errorBodyClass);\n }\n\n if (options.errorElement){\n // there is an error reporting element and it needs to be set\n options.errorElement.innerHTML =apiErrorResponse;\n }\n }\n\n if (apiErrorResponse) {\n // there was an API error, return the result\n console.error('API: request to endpoint \"' + options.endpoint + '\" returned with error.');\n options.onFailure(apiRequest, parsedResponse);\n } else {\n // it worked, return output\n\n if (options.errorBodyClass){\n // the errorBody class needs to be removed\n bodyClass.remove(options.errorBodyClass);\n }\n\n if (options.errorElement){\n // there is an error reporting element and it needs to be cleared\n options.errorElement.innerHTML = '';\n }\n\n options.onSuccess(parsedResponse);\n return; // exit function\n }\n\n } else {\n console.error('API: invalid response from endpoint \"' + options.endpoint + '\".');\n options.onFailure(apiRequest);\n }\n\n } else {\n // the request is a failure -> output error and do callback\n\n if (apiErrorResponse){\n // if the above setter evaluates as true then there is an error\n\n if (options.errorBodyClass){\n // the errorBody class needs to be added\n bodyClass.add(options.errorBodyClass);\n }\n\n if (options.errorElement){\n // there is an error reporting element and it needs to be set\n options.errorElement.innerHTML = 'An ' + options.method + ' error occurred at endpoint [state: ' + apiRequest.readyState + '](code: ' + apiRequest.status + ')';\n }\n }\n\n console.error('API: request to endpoint \"' + options.endpoint + '\" returned with status [' + apiRequest.readyState + '](' + apiRequest.status + ')');\n options.onFailure(apiRequest); // do failure callback\n }\n\n }\n };\n // attempt to send the request\n try {\n apiRequest.open(method, options.endpoint, true);\n if (method === \"GET\"){\n apiRequest.send(); // send nothing\n } else {\n apiRequest.setRequestHeader('Content-Type', 'application/json');\n apiRequest.send(JSON.stringify(options.data));\n }\n } catch (e){\n // something went wrong\n console.log('API: critical request error!');\n console.log(e);\n return false; // prevent further execution\n }\n\n if (options.loadingBodyClass){\n // force add the loading class if animations are disabled and the flag is set\n bodyClass.add('loading');\n }\n\n if (options.fadeAnimate) {\n // add loading styles to body\n setTimeout(function(){ bodyClass.add('loading-fade') }, 100); // add fade\n }\n\n return true; // it it got to here then the request was submitted successfully.\n\n } else {\n console.warn('API: passed data is not a valid object. Ignoring request.')\n }\n } else {\n // the endpoint is not valid, ignore call\n console.error('API: \"' + options.endpoint + '\" is not a verified endpoint.');\n }\n } else {\n console.error('API: invalid method \"' + options.method + '\".');\n }\n return false; // if the API call gets here then it failed. Return boolean that states it failed.\n }", "title": "" }, { "docid": "dd20822706e148957d57ebdf6f9d62b4", "score": "0.48723978", "text": "call(target, method, args) {\n if (typeof target[method] !== 'function') {\n throw new utils_1.Exception(`Missing method \"${method}\" on \"${target.constructor.name}\"`);\n }\n return this.injector.call(target, method, args || []);\n }", "title": "" }, { "docid": "cd46a8c78c39c0c31d8b369fe5ba67b1", "score": "0.48712608", "text": "function InvalidParentMethodCall(name) {\n StdError.apply(this, arguments);\n this.message = prefix + \"::Parent Class doesn't have the method: \" + name;\n }", "title": "" }, { "docid": "cf5b721da7190a8d1509644de2dcb869", "score": "0.48712155", "text": "constructor() {\n throw new Error('Preconditions should not be instantiated.');\n }", "title": "" }, { "docid": "32350fd9c04b6bcaebcec8bbb9049634", "score": "0.4864049", "text": "function isRequired(target, reference, property) {\r\n // get the class constructor\r\n const constr = target.constructor;\r\n (0, logger_1.log)(`${constr.name}: checking if ${property} is required...`, \"silly\");\r\n // retrieve the current metadata\r\n const metadata = Reflect.getMetadata(METADATA_required, constr) || {};\r\n if (metadata.hasOwnProperty(property)) {\r\n const ret = metadata[property];\r\n if (typeof ret === \"boolean\")\r\n return ret;\r\n return ret(target, reference);\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "11c331eabce031f24d963c4ab5c93219", "score": "0.4863274", "text": "async checkEndpoint(endpoint) {\n\t\tawait this.checkInitialized();\n\t\tif (this._disabledEndpoints.map(endpoint => endpoint.toLowerCase()).includes(endpoint.toLowerCase()))\n\t\t\tthrow new Error(\"Endpoint disabled.\");\n\t}", "title": "" }, { "docid": "99fbdf740baf3132fb0b093799d72745", "score": "0.48600367", "text": "onNoMatch(req, res) {\n res.status(405).json({ error: `Method '${req.method}' Not Allowed` })\n }", "title": "" }, { "docid": "c5e542bba836f3e922d0583b49fbe0ec", "score": "0.4846564", "text": "bfs() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "title": "" } ]
aad007d3da5b003916c25cd8cb0d5a82
Returns the 2D cross product of AB and AC vectors, i.e., the zcomponent of the 3D cross product in a quadrant I Cartesian coordinate system (+x is right, +y is up). Returns a positive value if ABC is counterclockwise, negative if clockwise, and zero if the points are collinear.
[ { "docid": "42f9c893fb06438e9bd018d10ec4867c", "score": "0.59277487", "text": "function cross(a, b, c) {\n\t return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n\t }", "title": "" } ]
[ { "docid": "06c4d719aedd1134195ecb08e8b2214f", "score": "0.6839144", "text": "static crossProductZ(pointA, pointB, pointC) {\n const bX = pointB.x;\n const bY = pointB.y;\n return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));\n }", "title": "" }, { "docid": "f82ffef47ba240d694f2df6812970248", "score": "0.6751075", "text": "function crossProductZ( pointA, pointB, pointC)\r\n\t\t\t{\r\n\t\t\t\tvar bX = pointB.x;\r\n\t\t\t\tvar bY = pointB.y;\r\n\t\t\t\treturn ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));\r\n\t\t\t}", "title": "" }, { "docid": "6132d78d3db47dca4d38c9197411df04", "score": "0.59449893", "text": "function vec3CrossProduct(v1X, v1Y, v1Z, v2X, v2Y, v2Z) {\n return [\n (v1Y * v2Z) - (v1Z * v2Y),\n (v1Z * v2X) - (v1X * v2Z),\n (v1X * v2Y) - (v1Y * v2X)\n ];\n}", "title": "" }, { "docid": "a03a2969ad8733c7ff40b5665d59adb5", "score": "0.58597976", "text": "function cross(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0]);}", "title": "" }, { "docid": "af257c26830df6c0f144a8084c987fc4", "score": "0.58427197", "text": "function cross(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n }", "title": "" }, { "docid": "af257c26830df6c0f144a8084c987fc4", "score": "0.58427197", "text": "function cross(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n }", "title": "" }, { "docid": "c3663860c588ec86ba738910f5439e0b", "score": "0.574405", "text": "function cross(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}", "title": "" }, { "docid": "d9cca51c811f4c83e711d391a0c1a765", "score": "0.56835234", "text": "function cross3(a, b){\r\n\treturn [a[1]*b[2] - a[2]*b[1],\r\n\t\t\ta[2]*b[0] - a[0]*b[2],\r\n\t\t\ta[0]*b[1] - a[1]*b[0]];\r\n}", "title": "" }, { "docid": "72af680710d9a42ffcb813c41a831647", "score": "0.56294936", "text": "crossProduct(another) {\n return new Point(this.y * another.z - this.z * another.y, another.x * this.z - another.z * this.x, this.x * another.y - this.y * another.x);\n }", "title": "" }, { "docid": "d5b6a44c896a03c8fc3c02560411fae0", "score": "0.560905", "text": "function b2Cross_v3_v3(a, b)\r\n{\r\n\treturn new b2Vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);\r\n}", "title": "" }, { "docid": "dd75055335f7f4da5d32c2c1701e89d2", "score": "0.5588185", "text": "function clockwise(a, b, c) {\n return (a.y - b.y) * (c.x - b.x) -\n (b.x - a.x) * (b.y - c.y) >= 0;\n}", "title": "" }, { "docid": "73d46197c0cc689fddedfe5ffaa3e3a6", "score": "0.5556066", "text": "function cross(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2],\n bx = b[0], by = b[1], bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}", "title": "" }, { "docid": "73d46197c0cc689fddedfe5ffaa3e3a6", "score": "0.5556066", "text": "function cross(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2],\n bx = b[0], by = b[1], bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}", "title": "" }, { "docid": "cbd6f69214360c724203fe5520d4f637", "score": "0.55508775", "text": "function d3_cross2d(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}", "title": "" }, { "docid": "cbd6f69214360c724203fe5520d4f637", "score": "0.55508775", "text": "function d3_cross2d(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}", "title": "" }, { "docid": "2394450d7ac6d2124bd5a409a1966a27", "score": "0.5477578", "text": "function cross$1(a, b, c) {\n\t return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n\t}", "title": "" }, { "docid": "b8ad127a551280787180109232df4b17", "score": "0.545979", "text": "function cross$1(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}", "title": "" }, { "docid": "666978ca4f26bd3424eee453032bf8c8", "score": "0.5447765", "text": "function cross(a, b) {\n const ax = a.x,\n ay = a.y,\n az = a.z;\n const bx = b.x,\n by = b.y,\n bz = b.z;\n a.x = ay * bz - az * by;\n a.y = az * bx - ax * bz;\n a.z = ax * by - ay * bx;\n }", "title": "" }, { "docid": "226419cccd7cb211e468a630195ba391", "score": "0.53872466", "text": "function cross_vec3 (a, b) {\r\n\tvar x = a[1] * b[2] - a[2] * b[1];\r\n\tvar y = a[2] * b[0] - a[0] * b[2];\r\n\tvar z = a[0] * b[1] - a[1] * b[0];\r\n\treturn [x, y, z];\r\n}", "title": "" }, { "docid": "e851d48182084fe4a6969f137f22eef8", "score": "0.5383595", "text": "function b2Cross_v2_v2(a, b)\r\n{\r\n\treturn a.x * b.y - a.y * b.x;\r\n}", "title": "" }, { "docid": "206bd90a1bdbc44e718e50fe7c6a55e7", "score": "0.53822803", "text": "function cross(a,b){\n return [a[1]*b[2]-a[2]*b[1],\n a[2]*b[0]-a[0]*b[2],\n a[0]*b[1]-a[1]*b[0],\n 0];\n }", "title": "" }, { "docid": "2662492a88a346faaf66a3467ce6ab43", "score": "0.5367264", "text": "function isCcw (p1, p2, p3) {\n return (p2.x - p1.x) * (p3.y - p1.y) - (p3.x - p1.x) * (p2.y - p1.y)\n}", "title": "" }, { "docid": "1674c78fb61b8675fff22649e7e49588", "score": "0.5357184", "text": "static cross(a,b) {\n return a.x*b.y-a.y*b.x;\n }", "title": "" }, { "docid": "1406afe063712c14bc1b6b624d850fc3", "score": "0.53242296", "text": "function c2sp(x, y, z) {\n if (Math.pow(x,2) + Math.pow(y,2) + Math.pow(z,2) === 0) {\n return [0, 0, 0]\n }\n else {\n var r = Math.sqrt(Math.pow(x,2) + Math.pow(y,2) + Math.pow(z,2));\n var theta = Math.acos(z/r);\n if (y >= 0) {\n if (x === 0) {\n var phi = Math.PI/2;\n return [r, theta, phi]\n } else if (x > 0) {\n var phi = Math.atan(y/x)\n return [r, theta, phi]\n } else {\n var phi = Math.PI + Math.atan(y/x)\n return [r, theta, phi]\n }\n }\n else {\n if (x === 0) {\n var phi = 3*Math.PI/2;\n return [r, theta, phi]\n } else if (x < 0) {\n var phi = Math.PI + Math.atan(y/x);\n return [r, theta, phi];\n } else {\n var phi = 2*Math.PI + Math.atan(y/x);\n return [r, theta, phi]\n }\n }\n }\n}", "title": "" }, { "docid": "7022a13491b00befe4ec4843c4eae3df", "score": "0.527867", "text": "function getBarycentricCoordinates(A, B, C, P) {\n\n var l1 = ((B[1] - C[1]) * (P[0] - C[0]) + (C[0] - B[0]) * (P[1] - C[1])) / ((B[1] - C[1]) * (A[0] - C[0]) + (C[0] - B[0]) * (A[1] - C[1]));\n var l2 = ((C[1] - A[1]) * (P[0] - C[0]) + (A[0] - C[0]) * (P[1] - C[1])) / ((B[1] - C[1]) * (A[0] - C[0]) + (C[0] - B[0]) * (A[1] - C[1]));\n var l3 = 1 - l1 - l2;\n\n return [l1, l2, l3];\n\n }", "title": "" }, { "docid": "a67afdcbc571bfb1c192faac1f40c13e", "score": "0.5268196", "text": "function getAngleBisector(A, C, B, return_object)\n{\n var theta_C, theta_A ;\n // console.log(\"A,C,B: \",A,C,B);\n \n // Translate the points so that origin is 0,0\n var A_prime = subtractPoint(A,B);\n var C_prime = subtractPoint(C,B);\n \n \n \n if (A_prime[1] == 0) A_prime[1] = 0.0000001;\n if (C_prime[1] == 0) C_prime[1] = 0.0000001;\n if (A_prime[0] == 0) A_prime[0] = 0.0000001;\n if (C_prime[0] == 0) C_prime[0] = 0.0000001;\n \n theta_A = Math.atan2(A_prime[1],A_prime[0]);\n theta_C = Math.atan2(C_prime[1],C_prime[0]);\n \n // Get angle between A' and C'\n var theta = getRadiansBetweenPts(A_prime, C_prime);\n var phi, correction = false;\n if (\n // 1st & 3rd quadrant, concave left\n (A_prime[0] > 0 && A_prime[1] > 0 && C_prime[0] < 0 && C_prime[1] && theta_C < (theta_A - Math.PI))\n ||\n (C_prime[0] > 0 && C_prime[1] > 0 && A_prime[0] < 0 && A_prime[1] && theta_A < (theta_C - Math.PI))\n ||\n // 2nd quadrant and negative y\n (A_prime[0] < 0 && A_prime[1] > 0 && C_prime[1] < 0 && theta_C < (theta_A - Math.PI))\n ||\n (C_prime[0] < 0 && C_prime[1] > 0 && A_prime[1] < 0 && theta_A < (theta_C - Math.PI))\n )\n {\n phi = (Math.max(theta_A, theta_C) + theta/2);\n correction = true;\n // console.log(\"test\");\n }\n else\n {\n // console.log(\"test2\");\n phi = (Math.min(theta_A, theta_C) + theta/2);\n }\n \n // console.log(\"theta_A: \" + (theta_A * (180/Math.PI)) );\n // console.log(\"theta_C: \" + (theta_C * (180/Math.PI)) );\n // console.log((theta_A - theta_C)*(180/Math.PI));\n // console.log(\"phi: \",phi*(180/Math.PI));\n // Find unit vector that has angle of phi\n var D = [1];\n // tan(phi) = Dy/Dx\n // Dx = 1\n // var Dy_multiplier = -1;\n D[1] = Math.tan(phi);\n \n // return the function for the line passing trough D and B\n D = addPoints(D, B);\n \n return return_object \n ? {\n \"line\": getLineEquation(B, D),\n \"theta\": theta,\n \"phi\": phi,\n \"theta_A\": theta_A,\n \"theta_C\": theta_C,\n \"correction\":correction\n }\n : getLineEquation(B, D)\n ;\n \n}", "title": "" }, { "docid": "54d5118ac5425a294507561144f1b02d", "score": "0.5263242", "text": "cross(vector) {\n var B = vector.elements || vector;\n if (this.elements.length != 3 || B.length != 3) {\n return null;\n }\n var A = this.elements;\n return new Vector([\n A[1] * B[2] - A[2] * B[1],\n A[2] * B[0] - A[0] * B[2],\n A[0] * B[1] - A[1] * B[0]\n ]);\n }", "title": "" }, { "docid": "788c6d5adc8942d0bcf4949144c2d2d2", "score": "0.52353597", "text": "function crossProduct (vector1, vector2) {\n if ((vector1 == undefined || vector2 == undefined) ||\n (!Array.isArray(vector1) || !Array.isArray(vector2)) ||\n (vector1.length !== 3 || vector2.length !== 3)) throw \"Arguments are not 3D vectors!\";\n return [vector1[1]*vector2[2] - vector1[2]*vector2[1],\n vector1[2]*vector2[0] - vector1[0]*vector2[2],\n vector1[0]*vector2[1] - vector1[1]*vector2[0]];\n}", "title": "" }, { "docid": "69985d24e6c900b070c8f140943d90fd", "score": "0.5226307", "text": "function getSides(Ax, Ay, Bx, By, Cx, Cy){ \n return { \n a: dist(Bx, By, Cx, Cy), \n b: dist(Cx, Cy, Ax, Ay), \n c: dist(Ax, Ay, Bx, By), \n } \n}", "title": "" }, { "docid": "e08ef9dd6fab07ddfd403bb6b3a5e403", "score": "0.52136236", "text": "function cross (a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}", "title": "" }, { "docid": "f51f720c42f78d8b34efec8b73ed5797", "score": "0.5207125", "text": "function cross(a, b){\r\n\treturn a[0]*b[1] - a[1]*b[0];\r\n}", "title": "" }, { "docid": "3334dd471f610b0eff138c98262c195c", "score": "0.51831365", "text": "function cross(v0, v1) {\r\n\t\t\treturn [v0[1] * v1[2] - v0[2] * v1[1], v0[2] * v1[0] - v0[0] * v1[2], v0[0] * v1[1] - v0[1] * v1[0]];\r\n\t}", "title": "" }, { "docid": "93d521e299d8fb482a3a0c7c654ba2d4", "score": "0.5175288", "text": "function ccw(p1, p2, p3) {\n return p2.minus(p1).crossScalar(p3.minus(p1));\n }", "title": "" }, { "docid": "86687c8556898890bc557a2a65d42fee", "score": "0.51752186", "text": "function ccw(ax, ay, bx, by, cx, cy){\n\t//console.log(ax, ay, bx, by, cx, cy);\n\ttest = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay);\n\tif(test > 0)\n\t\treturn 1; //counter clock-wise\n\telse if(test == 0)\n\t\treturn 0; //co-linear\n\telse return -1; //clockwise\n}", "title": "" }, { "docid": "e0253a4918c6f78b337c56933f20bfe1", "score": "0.51595193", "text": "function cross(a, b) {\n return a[0] * b[1] - a[1] * b[0];\n}", "title": "" }, { "docid": "89af3aa50ff4f29926ff77f37216c5ce", "score": "0.51335573", "text": "cross(b) {\r\n return vec3(this.y * b.z - this.z * b.y, this.z * b.x - this.x * b.z, this.x * b.y - this.y * b.x);\r\n }", "title": "" }, { "docid": "89864c36ef27e50c9cbbabbdc97fd760", "score": "0.51306224", "text": "cross(other) {\n return new Vec3(this.y * other.z - this.z * other.y, this.z * other.x - this.x * other.z, this.x * other.y - this.y * other.x);\n }", "title": "" }, { "docid": "3d4b9693d4aa444a4ca060cc451a0383", "score": "0.5078725", "text": "function CAD3(A, B) {\n let A0, A1, B0, B1;\n let p0 = [];\n let p1 = [];\n let p2 = [];\n let p3 = [];\n let p4 = [];\n let solution = [];\n\n for (let i = 0; i < A.length + B.length - 1; i++) {\n solution[i] = 0;\n }\n\n if (A.length == 1) {\n return [A[0] * B[0], 0];\n }\n\n [A0, A1] = divideIntoHalf(A);\n [B0, B1] = divideIntoHalf(B);\n\n //here isntead of four recursion we only have to do three recursion\n p0 = CAD3(A0, B0);\n p3 = CAD3(A1, B1);\n\n p1 = CAD3(sumArray(A0, A1), sumArray(B0, B1));\n\n p4 = substractArray(p1, p0, p3);\n\n for (let i = 0, n = A.length; i < n; i++) {\n solution[i] += p0[i];\n solution[i + n / 2] += p4[i];\n solution[i + n] = p3[i];\n }\n return solution;\n}", "title": "" }, { "docid": "c579b92221edc4fe6fc1fcb1e83c5a97", "score": "0.50729084", "text": "function ccw( p1, p2, p3 ) {\n return p2.minus( p1 ).crossScalar( p3.minus( p1 ) );\n }", "title": "" }, { "docid": "d47841f87896ea1d59a8fae6bc40fec3", "score": "0.50563884", "text": "function CCW(p1, p2, p3) {\n return ((p1[1] - p3[1])*(p2[0] - p3[0]) - (p1[0] - p3[0])*(p2[1] - p3[1])) < 0 ? true : false;\n }", "title": "" }, { "docid": "f936d4aa31adefc1aad80c0bcc4f9929", "score": "0.50279164", "text": "static cross2D(a, b) {\n return a[0] * b[1] - a[1] * b[0];\n }", "title": "" }, { "docid": "a5df80ec865ea216fe6effff16f4bce0", "score": "0.50205314", "text": "function lineCrossPoint(Ax,Ay,Ax2,Ay2,Bx,By,Bx2,By2){\n point=[-999999,-999999];\n m1=(Ay-Ay2)/(Ax-Ax2);\n m2=(By-By2)/(Bx-Bx2);\n \n if(isFinite(m1)==false)m1=0;\n if(isFinite(m2)==false)m2=0;\n \n if(m1==0 || m2==0){\n //output.value+=\"in core m1:\"+m1+\" m2:\"+m2 +\"\\n\";\n if(m1==0 && m2!=0){\n if(Ax-Ax2==0){\n point=[Ax,lineCrossX(Bx,By,Bx2,By2,Ax)];\n return point;\n }else if(Ay-Ay2==0){\n point=[lineCrossY(Bx,By,Bx2,By2,Ay),Ay];\n return point;\n }\n }\n else if(m1!=0 && m2==0){\n if(Bx-Bx2==0){\n point=[Ax,lineCrossX(Ax,Ay,Ax2,Ay2,Bx)];\n return point;\n }else if(By-By2==0){\n point=[lineCrossY(Ax,Ay,Ax2,Ay2,By),By];\n return point;\n }\n } \n else if(m1==0 && m2 ==0){\n //output.value+=\"in 2 exceptions \\n\";\n if(Ax-Ax2==0 && By-By2==0){\n point=[Ax,By];\n //output.value+=\"Used Good 1st \\n\";\n return point;\n \n }\n if(Bx-Bx2==0 && Ay-Ay2==0){\n point=[Bx,Ay];\n //output.value+=\"Used Good 2nd \\n\";\n return point;\n }\n if(Ay-Ay2==0 && By-By2==0){\n output.value+=\"Used bad 3rd \\n\";\n output.value+=(\"Ax: \"+Ax+\" AY:\"+Ay+\" \\nAx2:\"+Ax2+\"Ay2:\"+Ay2+\"\\nBx: \"+Bx+\" BY:\"+By+\"\\n Bx2:\"+Bx2+\"By2:\"+By2+\"\\n\" );\n }\n if(Ax-Ax2==0 && Bx-Bx2==0){\n //alert(\"aa\");\n output.value+=\"Used bad 4th \\n\";\n }\n \n } \n }else if(m1!=0 && m2!=0){\n i1=(m1*(-Ax)+Ay)*(-1);\n i2=(m2*(-Bx)+By);\n x=(i1+i2)/(m1+m2*(-1));\n point=[x,lineCrossX(Ax,Ay,Ax2,Ay2,x)];\n return point;\n }else{\n return [0,0];\n }\n}", "title": "" }, { "docid": "2cda5a279d876aab21e9938ffc979f31", "score": "0.49930972", "text": "pointsAbs() {\n if (this.method == Triangle.method.COORDS) {\n return this.threeCoords;\n }\n\n var rLength1 = this.l1;\n var rLength2 = this.l2;\n\n var c1 = {\n x: this.x,\n y: this.y\n }\n\n var c2 = {\n x: c1.x + rLength1,\n y: c1.y\n }\n\n var rad = degToRad(this.theta);\n\n var c3 = {\n x: c1.x + rLength2 * Math.cos(rad),\n y: c1.y + rLength2 * Math.sin(rad),\n }\n\n // apply rotation around c1\n c2 = rotate(c2, c1, this.rotation);\n c3 = rotate(c3, c1, this.rotation);\n\n return {\n c1: c1,\n c2: c2,\n c3: c3\n };\n }", "title": "" }, { "docid": "3b2cc741a788ccab82031fc624e54337", "score": "0.4992113", "text": "function cos_angle(ax, ay, bx, by, cx, cy) {\r\n // compute a-b, c-b\r\n var bax = ax - bx;\r\n var bay = ay - by;\r\n var bcx = cx - bx;\r\n var bcy = cy - by;\r\n // normalize them\r\n var baMag = Math.sqrt(bax*bax + bay*bay);\r\n bax /= baMag;\r\n bay /= baMag;\r\n var bcMag = Math.sqrt(bcx*bcx + bcy*bcy);\r\n bcx /= bcMag;\r\n bcy /= bcMag;\r\n // I miss julia: dot(normalize(a-b), normalize(c-b))\r\n return bax * bcx + bay * bcy;\r\n}", "title": "" }, { "docid": "d53e90815a0ce7bed0d2dd87584a351c", "score": "0.49799818", "text": "function crossProductVector(vector0, vector1)\n{\n var crossProductVectorX = (vector0[1]*vector1[2] - vector0[2]*vector1[1]);\n var crossProductVectorY = (vector0[2]*vector1[0] - vector0[0]*vector1[2]);\n var crossProductVectorZ = (vector0[0]*vector1[1] - vector0[1]*vector1[0]);\n var crossProductVector = [crossProductVectorX, crossProductVectorY, crossProductVectorZ];\n return crossProductVector;\n}", "title": "" }, { "docid": "b0c2ae8b6c35ed495c8c573528ba5337", "score": "0.497639", "text": "function geoCross(o, a, b) {\n return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);\n}", "title": "" }, { "docid": "a157fec96b9d9e874385ca8dc3079366", "score": "0.49753922", "text": "function getRadiansBetweenPts(A,C,B)\n{\n var Ap, Cp, tA, tC, theta;\n if (typeof B === \"undefined\") B = [0,0];\n // Translate so that B is 0,0\n Ap = subtractPoint(A,B);\n Cp = subtractPoint(C,B);\n tA = Math.atan2(Ap[1],Ap[0]);\n tC = Math.atan2(Cp[1],Cp[0]);\n theta = Math.acos( \n (Ap[0]*Cp[0] + Ap[1]*Cp[1]) / (Math.sqrt( Math.pow(Ap[0],2) + Math.pow(Ap[1],2) ) * Math.sqrt( Math.pow(Cp[0],2) + Math.pow(Cp[1],2) ))\n );\n return theta;\n}", "title": "" }, { "docid": "2e8fc3dd61539d63c63a8e4ecf699d38", "score": "0.4962148", "text": "function crossProduct(vector1, vector2) {\n if(!isVectorOk(vector1) || !isVectorOk(vector2)) {\n throw 'Arguments are not 3D vectors!';\n }\n const vector3 = [];\n vector3[0] = vector1[1]*vector2[2] - vector1[2]*vector2[1];\n vector3[1] = vector1[2]*vector2[0] - vector1[0]*vector2[2];\n vector3[2] = vector1[0]*vector2[1] - vector1[1]*vector2[0];\n return vector3;\n}", "title": "" }, { "docid": "a8073b623e037cd1ea1d1d68fdacbb32", "score": "0.4918841", "text": "function ccw(x1, y1, x2, y2, x3, y3) {\n var cw = ((y3 - y1) * (x2 - x1)) - ((y2 - y1) * (x3 - x1));\n return cw > 0 ? true : cw < 0 ? false : true;\n }", "title": "" }, { "docid": "7f64d63226aad5f4f10c6e2aae04d0f6", "score": "0.49086618", "text": "function crossProduct (vectorA, vectorB)\r\n{\r\n\r\n}", "title": "" }, { "docid": "2ba82128158ae620ab18e4f2b9586450", "score": "0.49073118", "text": "function __cross(lA, lB) {\n if (!lA || !lB)\n return null;\n if (__parallel(lA, lB))\n return null;\n\n if (lA.vertical)\n return {x: lA.x, y: __lineY(lB, lA.x) };\n// return {x: lA.x, y: lB.k * lA.x + lB.d };\n if (lB.vertical)\n return {x: lB.x, y: __lineY(lA, lB.x) };\n// return {x: lB.x, y: lA.k * lB.x + lA.d };\n\n var x = (lB.d - lA.d) / (lA.k - lB.k);\n var y = lA.k * x + lA.d;\n return { x: x, y: y };\n}", "title": "" }, { "docid": "e754f131f1fe18cfb3720e18c2fc50e8", "score": "0.48848218", "text": "static cross(a, b) {\n return new Pt_1.Pt((a[1] * b[2] - a[2] * b[1]), (a[2] * b[0] - a[0] * b[2]), (a[0] * b[1] - a[1] * b[0]));\n }", "title": "" }, { "docid": "124e9f588a274fb949a66b2f82aaf785", "score": "0.48829514", "text": "function crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}", "title": "" }, { "docid": "124e9f588a274fb949a66b2f82aaf785", "score": "0.48829514", "text": "function crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}", "title": "" }, { "docid": "124e9f588a274fb949a66b2f82aaf785", "score": "0.48829514", "text": "function crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}", "title": "" }, { "docid": "1081d88dddf43ddb8ae60e56f8141ec4", "score": "0.4871291", "text": "function is_direct(A, B, C)\n{\n\tvar i = [ B[0]-A[0], B[1]-A[1], B[2]-A[2] ];\n\tvar j = [ C[0]-A[0], C[1]-A[1], C[2]-A[2] ];\n\tvar p = [ i[1]*j[2]-i[2]*j[1], i[2]*j[0]-i[0]*j[2], i[0]*j[1]-i[1]*j[0] ];\n\tvar scal = A[0]*p[0] + A[1]*p[1] + A[2]*p[2];\n\treturn scal > 0;\n}", "title": "" }, { "docid": "974d4fc8b350bcc74a2565376070c3a8", "score": "0.4862908", "text": "function Acos()\n {\n\n var p = undefined;\n var q = undefined;\n var r = undefined;\n \n p = new Cpx( this.re , this.im );\n \n q = this.Mul( p );\n \n p = new Cpx( 1.0 , 0.0 );\n \n r = q.Sub( p );\n \n p = r.Sqr();\n \n r = this.Add( p );\n \n p = r.Log();\n \n r = new Cpx( p.im , (- p.re) );\n\n return( r );\n\n }", "title": "" }, { "docid": "4d1c1c51996a414c59bec693253c38cd", "score": "0.4832905", "text": "function cross(v1, v2) {\n\treturn v1.x * v2.y - v2.x * v1.y;\n}", "title": "" }, { "docid": "a16987605bd86c41853c84168f33477e", "score": "0.48133147", "text": "static CrossProduct(vector1, vector2)\n\t{\n\t\tvar result = [vector1[1] * vector2[2] - vector1[2] * vector2[1], vector1[2] * vector2[0] - vector1[0] * vector2[2], vector1[0] * vector2[1] - vector1[1] * vector2[0]]\n\t\t\treturn result;\n\t}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "836c94e33a8d01fa81daea23c9435f74", "score": "0.48125315", "text": "function Zc(a,b){return Xc(this,a,b,-1)}", "title": "" }, { "docid": "11b9af868ede054031dda916cda057f4", "score": "0.47928464", "text": "function getCrossProduct(v1, v2) {\n\ti = (v1.j * v2.k - v2.j * v1.k);\n\tj = (v2.i * v1.k - v1.i * v2.k);\n\tk = (v1.i * v2.j - v2.i * v1.j);\n\n\tn = {\"i\":i, \"j\":j, \"k\":k};\n\n\treturn n;\n}", "title": "" }, { "docid": "993d4663a4ed1cb6e0a78761fb2fa04e", "score": "0.47903875", "text": "function getAngle(p1, p2, p3){\n\n //package up vectors\n var a = {\n x:p1.x - p2.x, \n y: p1.y - p2.y\n };\n var b = {\n x: p1.x - p3.x,\n y: p1.y - p3.y\n };\n \n var dp = a.x*b.x + a.y*b.y; //dot product\n \n var aa1 = Math.sqrt(a.x*a.x + a.y*a.y); //vector lengths\n var ab2 = Math.sqrt(b.x*b.x + b.y*b.y);\n \n //will return NAN and algorithm breaks, safety check.\n if(isNaN(Math.acos(dp/(aa1*ab2)))){\n alert(\"dp \"+dp+\" ab2 \"+ab2);\n alert(\"angle \"+dp/(aa1*ab2)+\", \"+Math.acos(dp/(aa1*ab2)));\n }\n return Math.acos(dp/(aa1*ab2)); \n}", "title": "" }, { "docid": "b4fa98046b1dbb7e1a054c3ba2a7be00", "score": "0.47834313", "text": "static crossProduct(vec1, vec2) {\n return vec1[0] * vec2[1] - vec1[1] * vec2[0];\n }", "title": "" }, { "docid": "abbdf097ef237bcdb8019840b96e379d", "score": "0.47541645", "text": "crs(A) {\n return this.x * A.y - this.y * A.x;\n }", "title": "" }, { "docid": "ede95eee8fb17f4847a448a409c641a5", "score": "0.4737442", "text": "function lineCrossX(Ax,Ay,Bx,By,pointX){\n m=(Ay-By)/(Ax-Bx);\n y=m*(pointX-Ax)+Ay; \n return y;\n}", "title": "" }, { "docid": "85412ce43ac096678614b1a6a8b38f21", "score": "0.47166803", "text": "function LOCangle(sideA, sideB, sideC) {\n\treturn Math.acos(\n\t\t(sideB*sideB + sideC*sideC - sideA*sideA) / (2 * sideB * sideC)\n\t);\n}", "title": "" }, { "docid": "0b152fed10b181aad2075b0b3ed514b6", "score": "0.4716306", "text": "function cross(A, B) {\n var C = [];\n _.each(A, function(a) {\n _.each(B, function(b) {\n C.push(a+b);\n });\n });\n return C;\n}", "title": "" }, { "docid": "3021ff89e30116cafb0f7bd877823462", "score": "0.47060612", "text": "function cross3( u, v ) {\n\n var ret = [0, 0, 0]; \n\n ret[0] = u[1] * v[2] - u[2] * v[1];\n ret[1] = u[2] * v[0] - u[0] * v[2];\n ret[2] = u[0] * v[1] - u[1] * v[0];\n\n return ret;\n}", "title": "" }, { "docid": "8cd57cd1c3db3b0ce17b54f40e651ef5", "score": "0.46750623", "text": "function inTriangle(Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Px,Py,Pz){\nv0 = getVectorFrom2Points(Ax,Ay,Az,Cx,Cy,Cz);\nv1 = getVectorFrom2Points(Ax,Ay,Az,Bx,By,Bz); \nv2 = getVectorFrom2Points(Ax,Ay,Az,Px,Py,Pz);\n\ndot00 = getDotProduct(v0[0],v0[1],v0[2],v0[0],v0[1],v0[2]);\ndot01 = getDotProduct(v0[0],v0[1],v0[2],v1[0],v1[1],v1[2]);\ndot02 = getDotProduct(v0[0],v0[1],v0[2],v2[0],v2[1],v2[2]);\ndot11 = getDotProduct(v1[0],v1[1],v1[2],v1[0],v1[1],v1[2]);\ndot12 = getDotProduct(v1[0],v1[1],v1[2],v2[0],v2[1],v2[2]);\n\n// Compute barycentric coordinates\ninvDenom = 1 / (dot00 * dot11 - dot01 * dot01);\nu = (dot11 * dot02 - dot01 * dot12) * invDenom;\nv = (dot00 * dot12 - dot01 * dot02) * invDenom;\n\n// Check if point is in triangle\nif((u >= 0) && (v >= 0) && (u + v < 1))\nreturn 1;\nelse\nreturn 0;\n \n}", "title": "" }, { "docid": "1533650003cc87ddf917e7d4495c9879", "score": "0.46672845", "text": "function two_of_three(x, y, z) {\n return x*x + y*y + z*z - Math.max(x*x, y*y, z*z);\n}", "title": "" }, { "docid": "21bb22c212f7193dc4e28bb95db1a4a8", "score": "0.46626174", "text": "function ecliptic(data, xp, yp, zp) {\n\tvar xecl = (cos(data.w) * cos(data.node) - sin(data.w) * sin(data.node) * cos(data.I)) * xp + (-sin(data.w) * cos(data.node) - cos(data.w) * sin(data.node) * cos(data.I)) * yp,\n\t\tyecl = (cos(data.w) * sin(data.node) + sin(data.w) * cos(data.node) * cos(data.I)) * xp + (-sin(data.w) * sin(data.node) + cos(data.w) * cos(data.node) * cos(data.I)) * yp,\n\t\tzecl = sin(data.w) * sin(data.I) * xp + cos(data.w) * sin(data.I) * yp;\n\n\treturn [xecl, yecl, -zecl];\n}", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "b6158ac9efc154899990703081a04eb3", "score": "0.46582833", "text": "function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }", "title": "" }, { "docid": "3966f6c3c182c5f58999a5cf20bb4167", "score": "0.46496624", "text": "static cross(v1, v2) {\r\n try {\r\n if (!(v1 instanceof Vector) || !(v2 instanceof Vector))\r\n throw \"Vector.cross: non-vector parameter\";\r\n else\r\n return(new Vector((v1.y*v2.z - v1.z*v2.y), (v1.z*v2.x - v1.x*v2.z), (v1.x*v2.y - v1.y*v2.x)));\r\n } // end try\r\n \r\n catch(e) {\r\n console.log(e);\r\n return(NaN);\r\n }\r\n }", "title": "" }, { "docid": "0a797d84fbfed9196550f4f645cdf122", "score": "0.46384102", "text": "function threePointParabola (y, x) {\n var a = ((y[1]-y[0])*(x[0]-x[2]) + (y[2]-y[0])*(x[1]-x[0]))/((x[0]-x[2])*(x[1]*x[1]-x[0]*x[0]) + (x[1]-x[0])*(x[2]*x[2]-x[0]*x[0]))\n var b = ((y[1] - y[0]) - a*(x[1]*x[1] - x[0]*x[0])) / (x[1]-x[0])\n var c = y[0] - a*x[0]*x[0] - b*x[0];\n return {a: a, b: b, c: c};\n}", "title": "" }, { "docid": "b8c0f5d3a14bf259dff2d3e1dcd7bfb5", "score": "0.46381935", "text": "function crossProduct(v1, v2, normal) {\n\tlet ret = [(v1[1] * v2[2] - v2[1] * v1[2]), -(v1[0] * v2[2] - v2[0] * v1[2]), (v1[0] * v2[1] - v2[0] * v1[1])];\n\tif (normal) {\n\t\tlet l = Math.sqrt(Math.pow(ret[0], 2) + Math.pow(ret[1], 2) + Math.pow(ret[2], 2));\n\t\tret[0] = ret[0] / l;\n\t\tret[1] = ret[1] / l;\n\t\tret[2] = ret[2] / l;\n\t}\n\treturn ret;\n}", "title": "" }, { "docid": "b8c0f5d3a14bf259dff2d3e1dcd7bfb5", "score": "0.46381935", "text": "function crossProduct(v1, v2, normal) {\n\tlet ret = [(v1[1] * v2[2] - v2[1] * v1[2]), -(v1[0] * v2[2] - v2[0] * v1[2]), (v1[0] * v2[1] - v2[0] * v1[1])];\n\tif (normal) {\n\t\tlet l = Math.sqrt(Math.pow(ret[0], 2) + Math.pow(ret[1], 2) + Math.pow(ret[2], 2));\n\t\tret[0] = ret[0] / l;\n\t\tret[1] = ret[1] / l;\n\t\tret[2] = ret[2] / l;\n\t}\n\treturn ret;\n}", "title": "" }, { "docid": "79c9e988c0cd55e36174f5cbeb96f268", "score": "0.46380138", "text": "function cubicCurveTo(point, controlPointA, controlPointB) {\r\n return \" C\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](controlPointA.x, 4)\r\n + \",\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](controlPointA.y, 4) + \" \" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](controlPointB.x, 4)\r\n + \",\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](controlPointB.y, 4) + \" \" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](point.x, 4)\r\n + \",\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](point.y, 4);\r\n}", "title": "" } ]
3f533c7d38913404f5f37933b1d3f003
getFunction is called when the user clicks on the Go button, first changing it to all lower case then removing ln and replacing with log(x) based e since this is the equivalent function, then checking to see if the user has already entered this function previously if not then a new object is created that holds the function and associated methods
[ { "docid": "4f1f56d43dca8e10670f9ae5040ef057", "score": "0.7015315", "text": "getFunction() {\n const expression = document.getElementById(\"funct\").value.toLowerCase();\n\n if (expression == \"\") {\n console.log(\"empty function field\");\n return;\n }\n // replace('ln(x)', 'log(x, 2.71828182846)')\n const finalexpression = this.scrubln(expression).trim();\n // console.log(finalexpression, expression);\n\n if (!this.functionAlreadyExists(expression)) {\n try {\n const node = math.parse(finalexpression);\n const code = node.compile();\n\n const coords = this.getExpressionValues(code);\n\n this.functionArray.push(\n new FunctionObject(expression, finalexpression, coords, code, this)\n );\n this.addFunctionDetailsDiv();\n this.drawFunctionValuesToGraph(coords);\n } catch (err) {\n console.log(\"input created a problem...\");\n console.log(err);\n }\n }\n console.log(\"expression alreadu input\");\n }", "title": "" } ]
[ { "docid": "9fdec8cbf039c51a9536de45afa92b87", "score": "0.5893249", "text": "function newFunction(){ //function declaration\n console.log(\"hello world\");\n }", "title": "" }, { "docid": "ffe7a33b46b56c9b8c710c37b19a711d", "score": "0.5776878", "text": "function getFunctionName( func ){\n\n\ttry {\n\t\tfunc = func.substr('function '.length);\n\t \tfunc = func.substr(0, func.indexOf('('));\n\n\t\tif( func == \"\" ) func = \"ANONYMOUS_FUNC\";\n\t\tif( func.indexOf( \"=>\" ) >= 0 ) func = \"ANONYMOUS_FUNC\";\n\n\t\treturn func;\n\t} catch( err ){\n\t\tconsole.log( \"\\x1b[31m%s\\x1b[0m\", \"[summer-mvc core]\", \"[logger.js]\", err );\n\t\tthrow err;\n\t}\n}", "title": "" }, { "docid": "20f2e8c331d4abd7d90154471d24d697", "score": "0.56283057", "text": "'ev'(env) {\n var args = this.args.map(function (a) {\n return a.ev(env);\n });\n\n for (var i = 0; i < args.length; i++) {\n if (args[i].is === 'undefined') {\n return {\n is: 'undefined',\n value: 'undefined'\n };\n }\n }\n\n if (this.name in CartoCSS.Tree.functions) {\n if (CartoCSS.Tree.functions[this.name].length <= args.length) {\n var val = CartoCSS.Tree.functions[this.name].apply(CartoCSS.Tree.functions, args);\n if (val === null) {\n env.error({\n message: 'incorrect arguments given to ' + this.name + '()',\n index: this.index,\n type: 'runtime',\n filename: this.filename\n });\n return {is: 'undefined', value: 'undefined'};\n }\n return val;\n } else {\n env.error({\n message: 'incorrect number of arguments for ' + this.name +\n '(). ' + CartoCSS.Tree.functions[this.name].length + ' expected.',\n index: this.index,\n type: 'runtime',\n filename: this.filename\n });\n return {\n is: 'undefined',\n value: 'undefined'\n };\n }\n } else {\n var fn = CartoCSS.Tree.Reference.mapnikFunctions[this.name];\n if (fn === undefined) {\n var functions = toPairs(CartoCSS.Tree.Reference.mapnikFunctions);\n // cheap closest, needs improvement.\n var name = this.name;\n var mean = functions.map(function (f) {\n return [f[0], CartoCSS.Tree.Reference.editDistance(name, f[0]), f[1]];\n }).sort(function (a, b) {\n return a[1] - b[1];\n });\n env.error({\n message: 'unknown function ' + this.name + '(), did you mean ' +\n mean[0][0] + '(' + mean[0][2] + ')',\n index: this.index,\n type: 'runtime',\n filename: this.filename\n });\n return {\n is: 'undefined',\n value: 'undefined'\n };\n }\n if (fn !== args.length &&\n // support variable-arg functions like `colorize-alpha`\n fn !== -1) {\n env.error({\n message: 'function ' + this.name + '() takes ' +\n fn + ' arguments and was given ' + args.length,\n index: this.index,\n type: 'runtime',\n filename: this.filename\n });\n return {\n is: 'undefined',\n value: 'undefined'\n };\n } else {\n // Save the evaluated versions of arguments\n this.args = args;\n return this;\n }\n }\n }", "title": "" }, { "docid": "a30651fe875929c9d97d370d6744f88b", "score": "0.56110394", "text": "checkCurrentFunctionPython() {\n var cursorPosition = this.currentEditor.getCursorBufferPosition();\n var text\n var i\n for( i = cursorPosition.row; i >= 0; --i ) {\n text = this.currentEditor.lineTextForBufferRow( i );\n text = text.split(' ');\n\n var isFunctionLinePy = text.includes('def')\n var isFunctionLinePerl = text.includes('sub')\n\n var keyword = '';\n if( isFunctionLinePy ) keyword = 'def'\n else if( isFunctionLinePy ) keyword = 'sub'\n\n if( keyword != '' ) {\n defIndex = text.indexOf( keyword );\n\n var n = text[ defIndex + 1 ].indexOf( '(' )\n if( n > -1 ) {\n text[ defIndex + 1 ] = text[ defIndex + 1 ].slice(0, n)\n }\n this.currentFunction = text[ defIndex + 1 ]\n break\n }\n else if( i == 0 ) {//the case where you are above the top level function and in the global scope, not a function scope\n this.currentFunction = \"???\";\n }\n }\n }", "title": "" }, { "docid": "db9c74cf399cacb39e9edb5ffcc50425", "score": "0.5565291", "text": "function getFunc() { return \"gate\"; }", "title": "" }, { "docid": "938707c252cb4e84a3e7b2701f8bbd7e", "score": "0.55369115", "text": "function getName(){\n console.log('THIS IS MY FUNCTION');\n}", "title": "" }, { "docid": "2243e9fb55b5cbda9f5aab926ab34311", "score": "0.55257875", "text": "function TrackByFunction() { }", "title": "" }, { "docid": "2243e9fb55b5cbda9f5aab926ab34311", "score": "0.55257875", "text": "function TrackByFunction() { }", "title": "" }, { "docid": "f468bab0166c9a9f74d2cfdec084fcdc", "score": "0.55229896", "text": "function functionName() { console.log('I am a function') }", "title": "" }, { "docid": "5325838f14da310676a0410967a8fa06", "score": "0.5500477", "text": "function newFunction(parameter) {\n //code here\n}", "title": "" }, { "docid": "8ad9632ca4d905584c235d76a1781745", "score": "0.5496564", "text": "function miFunction() {\n console.log(\"Esta primera funcion ha sido creado fuera de la clase\");\n}", "title": "" }, { "docid": "c2e8466f083b790a04cc39451959e848", "score": "0.54828805", "text": "function yFindLightSensor(str_func)\n{\n return YLightSensor.FindLightSensor(str_func);\n}", "title": "" }, { "docid": "d8f16db252ff9f34c702e4d7d7c07b59", "score": "0.5436849", "text": "function newFunction() {\n if (ben[0] === \"B\") {\n Bnames = ben + \" \" + Bnames;\n }\n\n if (emma[0] === \"B\") {\n Bnames = emma + \" \" + Bnames;\n }\n\n if (bolu[0] === \"B\") {\n Bnames = bolu + \" \" + Bnames;\n }\n}", "title": "" }, { "docid": "8fcc83393fb0e7709b477ae081e7e33b", "score": "0.54290026", "text": "function TrackByFunction() {}", "title": "" }, { "docid": "8fcc83393fb0e7709b477ae081e7e33b", "score": "0.54290026", "text": "function TrackByFunction() {}", "title": "" }, { "docid": "8fcc83393fb0e7709b477ae081e7e33b", "score": "0.54290026", "text": "function TrackByFunction() {}", "title": "" }, { "docid": "d5024f85a17a3aca8c6383cf333b1c30", "score": "0.5428234", "text": "function nameOfFunction() {\n console.log(\"Hello\");\n console.log(\"Hello\");\n console.log(\"Hello\");\n}", "title": "" }, { "docid": "8dabcbd1eb4ae0b6a7058a27ebe56f8e", "score": "0.5404673", "text": "function toggleFuncCode() {\n\tvar fList = window.context.state.functionList;\n\tvar index = fList.findIndex(func2 => func2.id === this.id);\n\tvar elem = fList[index];\n\tvar elemTxt;\n\tif(elem.type === funcOp) {\n\t\telemTxt = document.getElementById(\"op\" + this.id);\n\t\t// elemType = document.getElementById(\"type\" + this.id);\n\t\tvar newOperator = prompt(\"Operator:\", elem.op);\n\t\tif(newOperator === null || newOperator === elem.op) {\n\t\t\tif(newOperator === \"\") {\n\t\t\t\t// elemTxt.innerHTML = \"(?)\";\n\t\t\t\telem.op = \"\";\n\t\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\t\talert(\"The component operator is unset\");\n\t\t\t} else if(newOperator === elem.op){\n\t\t\t\talert(\"The component operator remains unchanged\");\n\t\t\t} \n\t\t} else if(newOperator.length > 1 || newOperator.includes(\" \")) {\n\t\t\talert(\"Invalid operator!\\nMust be only one of the following:\\n\\\"+\\\", \\\"-\\\", \\\"*\\\", \\\"\\/\\\"\");\n\t\t} else {\n\t\t\tswitch(newOperator) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\t// elemTxt.innerHTML = \"(\" + newOperator + \")\";\n\t\t\t\t\t//elemType.innerHTML = \"int\";\n\t\t\t\t\telem.op = newOperator;\n\t\t\t\t\telem.valueType = \"int\";\n\t\t\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\t\t\talert(\"The component operator is \" + newOperator);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\t// elemTxt.innerHTML = \"(\" + newOperator + \")\";\n\t\t\t\t\t// elemType.innerHTML = \"int\";\n\t\t\t\t\telem.op = newOperator;\n\t\t\t\t\telem.valueType = \"int\";\n\t\t\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\t\t\talert(\"The component operator is \" + newOperator);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\t// elemTxt.innerHTML = \"(\" + newOperator + \")\";\n\t\t\t\t\t// elemType.innerHTML = \"decimal\";\n\t\t\t\t\telem.op = newOperator;\n\t\t\t\t\telem.valueType = \"decimal\";\n\t\t\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\t\t\talert(\"The component operator is \" + newOperator);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\\/\":\n\t\t\t\t\t// elemTxt.innerHTML = \"(\" + newOperator + \")\";\n\t\t\t\t\t// elemType.innerHTML = \"decimal\";\n\t\t\t\t\telem.op = newOperator;\n\t\t\t\t\telem.valueType = \"decimal\";\n\t\t\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\t\t\talert(\"The component operator is \" + newOperator);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\":\n\t\t\t\t\t// elemTxt.innerHTML = \"(?)\";\n\t\t\t\t\t// elemType.innerHTML = \"\";\n\t\t\t\t\telem.op = newOperator;\n\t\t\t\t\telem.valueType = \"\";\n\t\t\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\t\t\talert(\"The component operator is unset\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\talert(\"Invalid operator!\\nMust be only one of the following:\\n\\\"+\\\", \\\"-\\\", \\\"*\\\", \\\"\\\\\\\"\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\telemTxt = document.getElementById(\"name\" + this.id);\n\tvar newName = prompt(\"Name:\", elem.name);\n\tif(newName === null || newName === elem.name) {\n\t\tif(newName === \"\") {\n\t\t\t// elemTxt.innerHTML = newName;\n\t\t\telem.name = newName;\n\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\tif(elem.type === funcBody || elem.type === funcRec) {\n\t\t\t\talert(\"The component is now a lambda function\");\n\t\t\t} else {\n\t\t\t\talert(\"Component remains unnamed\");\n\t\t\t}\n\t\t} else if(newName === elem.name){\t\n\t\t\talert(\"The component name remains: \" + elem.name);\n\t\t}\n\t} else if(newName.includes(\" \")) {\n\t\tif(elem.type === funcExp || elem.type === funcNExp) {\n\t\t\tvar spaceCount = 0;\n\t\t\tvar onlySpaces = true;\n\t\t\tvar i;\n\t\t\tfor (i = 0; i < newName.length; i++) {\n\t\t\t\tif(newName.charAt(i) === ' ') {\n\t\t\t\t\tspaceCount++;\n\t\t\t\t} else {\n\t\t\t\t\tonlySpaces = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(onlySpaces) {\n\t\t\t\talert(\"Invalid expression\");\n\t\t\t} else {\n\t\t\t\tif(newName.length < 20) {\n\t\t\t\t\tif(elem.type === funcExp) elem.type = funcNExp;\n\t\t\t\t\tif(spaceCount > 0 && newName.length >= 2*spaceCount) {\n\t\t\t\t\t\telem.full = true;\n\t\t\t\t\t} else elem.full = false;\n\t\t\t\t\telem.name = newName;\n\t\t\t\t\tvar nameSplit = newName.split(\" \");\n\t\t\t\t\tvar x;\n\t\t\t\t\tnewName = nameSplit[0];\n\t\t\t\t\tfor(x = 1; x < nameSplit.length; x++) newName += \"&nbsp\" + nameSplit[x];\n\t\t\t\t\t// elemTxt.innerHTML = newName;\n\t\t\t\t\telem.name = newName;\n\t\t\t\t\telemTxt.style.fontSize = \"100%\"\n\t\t\t\t\tif(newName.length > 4) elemTxt.style.fontSize = \"70%\";\n\t\t\t\t\tif(newName.length > 6) elemTxt.style.fontSize = \"60%\";\n\t\t\t\t\talert(\"The new name is: \" + elem.name);\n\t\t\t\t} else alert(\"Name too long\");\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Invalid function name\");\n\t\t}\n\t} else {\n\t\tif(newName === \"\") {\n\t\t\tif(elem.type === funcNExp) elem.type = funcExp;\n\t\t\telem.name = newName;\n\t\t\t// elemTxt.innerHTML = newName;\n\t\t\telemTxt.style.fontSize = \"100%\";\n\t\t\tif(elem.type === funcBody || elem.type === funcRec) {\n\t\t\t\talert(\"The component is now a lambda function\");\n\t\t\t} else {\n\t\t\t\talert(\"Component is now unnamed\");\n\t\t\t}\n\t\t} else {\n\t\t\tif(newName.length > 7) {\n\t\t\t\talert(\"Name too long\");\n\t\t\t} else {\t\t\t\t\t\n\t\t\t\tif(elem.type === funcExp) {\n\t\t\t\t\telemTxt.style.fontSize = \"80%\"\n\t\t\t\t\telem.type = funcNExp;\n\t\t\t\t} else elemTxt.style.fontSize = \"100%\"\n\t\t\t\telem.name = newName;\n\t\t\t\t// elemTxt.innerHTML = newName;\n\t\t\t\tif(newName.length > 6) elemTxt.style.fontSize = \"70%\";\n\t\t\t\talert(\"The new name is: \" + elem.name);\n\t\t\t}\n\t\t}\n\t}\n\twindow.context.forceUpdate();\n}", "title": "" }, { "docid": "b0c60b9001e9d7af0cf564de00490324", "score": "0.5385704", "text": "function lalalala() {\n\n}", "title": "" }, { "docid": "b58939bef8483458b69110907e830f52", "score": "0.53689086", "text": "function miFuncion(){\n\n}", "title": "" }, { "docid": "f6ce0baebed788277c0a67db8c59969e", "score": "0.53671473", "text": "function getFunction(code, argNames) {\r\n\t\t\tvar fn = window, parts = (code || \"\").split(\".\");\r\n\t\t\twhile (fn && parts.length) {\r\n\t\t\t\tfn = fn[parts.shift()];\r\n\t\t\t}\r\n\t\t\tif (typeof (fn) === \"function\") {\r\n\t\t\t\treturn fn;\r\n\t\t\t}\r\n\t\t\targNames.push(code);\r\n\t\t\treturn Function.constructor.apply(null, argNames);\r\n\t\t}", "title": "" }, { "docid": "034f4f048b250d500904d6bcf7c8a078", "score": "0.5361063", "text": "function alterJSFunction(fn_str, to_add_txt) {\n let _fn_str = fn_str;\n const _fn_params = _fn_str.substring(_fn_str.indexOf(\"(\")+1, _fn_str.indexOf(\")\"));\n\n _fn_str = _fn_str.slice(_fn_str.indexOf(\"{\") + 1, _fn_str.lastIndexOf(\"}\"));\n _fn_str = _fn_str.replace( _fn_str,to_add_txt+_fn_str)\n\n const _fn = new Function(_fn_params, _fn_str);\n return _fn;\n}", "title": "" }, { "docid": "cc1691a8ad2a6cd971afb9ff3fe04b9f", "score": "0.5356115", "text": "function _escapeFunction()\t\t\t\t\n\t\t{\n\t\t\tvar name = (value.name || 'anonymous');\n\t\t\tvar note = 'function ' + name + '(...)'\n\t\t\t\n\t\t\tvar msg = dotName.wrap('[]') + ': ' + note;\n\t\t\trtnValue.addListItem('functions', msg);\t\t\t//add to functions list\n\t\t\t\n\t\t\tif (isIgnored)\n\t\t\t\treturn _escapeDeletedFunctions(undefined, note);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tvar keys = Object.keys(value); \n\t\t\tif (keys.length === 0\n\t\t\t|| (keys.length === 1 && keys.displayName))\n\t\t\t\treturn _escapeDeletedFunctions(undefined, 'function ' + name + '(script only)');\n\t\t\t\n\t\t\tvar obj = {};\t\t\t\t\t\t\t\t\t\n\t\t\tkeys.forEach(function(key)\t\n\t\t\t{\n\t\t\t\t_escapeCheckConstructor(value[key], dotName + '.' + key)\n\t\t\t\tobj[key] = value[key];\n\t\t\t});\n\t\t\treturn _escapeValue(obj, note);\n\t\t\t//________________________________________________________________________________________\n\t\t\t/**\n\t\t\t *\tDetermine if Function excluded and type of Object created if not -- little bit complex\n\t\t\t *\tcode from EZ.cloneDev.object()...\n\t\t\t\n\t\t\tfunction _createFunctionClone()\n\t\t\t{\n\t\t\t\tvar clone = '';\n\t\t\t\tvar isNative = false;\n\t\t\t\tmsg = 'function ' + (obj.name || 'anonymous') + '()';\n\t\t\t\tvar script = Function.prototype.toString.call(obj);\n\t\t\t\tvar isNative = (/\\{\\s*\\[native code\\]\\s*\\}/.test(script));\n\t\t\t\tdo\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t //-------------------------\\\\\n\t\t\t\t\tif (isNative)\t\t\t\t\t\t\t\t\t\t //----- native function -----\\\\\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t//-----------------------------\\\\\t\n\t\t\t\t\t\tif (options.exclude.includes('native'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo.mergeListItem('excluded', msg + ' [native]', dotName)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse clone = obj;\t\t\t\t\t\t\t\t//keep as-is when not excluded\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //--------------------------\\\\\n\t\t\t\t\tvar keys = Object.keys(obj);\t\t\t\t\t\t //----- defined function -----\\\\\n\t\t\t\t\tvar idx = keys.indexOf('displayName');\t\t\t\t//------------------------------\\\\\t\n\t\t\t\t\tif (idx != -1)\n\t\t\t\t\t\tkeys.splice(idx,1);\n\t\t\t\t\tvar isEnum = (keys.length);\t\t\t\t\t\t\t//enumerable properties?\n\n\t\t\t\t\tif (options.exclude.includes('Function')\n\t\t\t\t\t&& (options.ignore.includes('script') && !isEnum))\n\t\t\t\t\t{\n\t\t\t\t\t\tinfo.mergeListItem('excluded', msg, dotName)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (options.ignore.includes('script') && !isEnum)\n\t\t\t\t\t{\n\t\t\t\t\t\tinfo.mergeListItem('excluded', msg + ' [no properties]', dotName);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (options.ignore.includes('script'))\t\t\t//if excluding script\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tscript = 'function ' + obj.name + '()';\n\t\t\t\t\t\tinfo.mergeListItem('excluded', msg + ' [script only]', dotName)\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (options.exclude.includes('Function') \t\t\t//if excluding Function and not script\n\t\t\t\t\t&& (!options.ignore.includes('script') || !isEnum))\t//...or no enumerable properties\n\t\t\t\t\t{\n\t\t\t\t\t\tinfo.mergeListItem('excluded', msg, dotName)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (options.ignore.includes('script'))\t\t\t\t//otherwise if ignoring script . . .\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!isEnum)\t\t\t\t\t\t\t\t\t//exclude function if no properties\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo.mergeListItem('excluded', msg + ' [no properties]', dotName);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscript = 'function ' + obj.name + '()';\t\t\t//exclude fn script\t\n\t\t\t\t\t\tinfo.mergeListItem('excluded', msg + ' [script only]', dotName)\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (options.ignore.includes('ignored_constructors'))\n\t\t\t\t\t{\n\t\t\t\t\t\tclone = {}\t\t\t\t\t\t\t\t\t\t//clone as Object\n\t\t\t\t\t\tinfo.mergeListItem('ignored_constructors', 'Function', dotName)\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{ \n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teval('clone=' + script);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tclone = {};\n\t\t\t\t\t\t\tinfo.addMessage('unable to clone function: ' + msg + ' @ ' + dotName.join('.').wrap('[]'))\n\t\t\t\t\t\t\tinfo.addDetails(EZ.getStackTrace());\n\t\t\t\t\t\t\tinfo.mergeListItem('excluded', msg + '[script syntax]', dotName)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (false)\n\t\t\t\treturn clone;\n\t\t\t}\n\t\t\t*/\n\t\t}", "title": "" }, { "docid": "32e43571a4e01c6b14753a4526f63975", "score": "0.5346014", "text": "function getFunctions()\n{\n lines = functionEditor.getValue().split(\"\\n\");\n functions = [];\n for(i = 0; i < lines.length; i++)\n {\n if(lines[i].charAt(0) != ' ' && lines[i].indexOf(\"|\") != 0)\n {\n //If the string does not start with a keyword and does contain a equals sign.\n if(!beginsWithKeyword(lines[i]) && lines[i].indexOf(\"=\") != -1)\n {\n lineSplit = lines[i].split(\"=\");\n lineSplit = lineSplit[0].split(\" \"); //Get content before equals sign, and split on spaces\n\n exsists = false;\n if(!exsists) { //Check if already added\n tmp = {};\n tmp.functionName = lineSplit[0]; //Function name will be the first element in the array split on spaces\n tmp.arguments = lineSplit.slice(1, lineSplit.length - 1).filter(Boolean); //Arguments are the words after it, .filter to filter out empty entries.\n functions[functions.length] = tmp;\n }\n\n }\n }\n }\n\n return functions;\n}", "title": "" }, { "docid": "9f0c2c5daa8f085ae37ffd3fade83f2e", "score": "0.5327715", "text": "function getFunctionFromString(functionDescribtor) {\n\t\t// Window as global element\n\t\tvar copy = window;\n\n\t\t// Retrieve function from string representation\n\t\tfunctionDescribtor.split(\".\").forEach(function(describtor){\n\t\t\tcopy = copy[describtor];\n\t\t});\n\n\t\treturn copy;\n\t}", "title": "" }, { "docid": "4813b81b576cfc941d000865b0d8c9cb", "score": "0.53053534", "text": "static _functionToCode(fn, name) {\r\n var txt = fn.toString()\r\n .replace(/\\/\\/.*/g, '')\r\n .replace(/\\s+/g, '')\r\n .replace(/var/g,'var ')\r\n .replace('return','return ') + ';';\r\n return txt\r\n }", "title": "" }, { "docid": "45214c4df25a6a4e50afbcfeeeb765c3", "score": "0.53049296", "text": "function greetFn1(name) {\n console.log(name+ \" iam from greetfn 1 function \");\n}", "title": "" }, { "docid": "3d85137a56bdcdf3f28733f0d9579f9e", "score": "0.52616215", "text": "function calcFunctions (func) {\n switch(func) {\n \n case 'backspace':\n case 'DEL':\n output.innerHTML = output.innerHTML.substring(0, output.innerHTML.length - 1);\n if (output.innerHTML === '') {\n output.innerHTML = '0';\n }\n \n if (output.innerHTML === 'Infinit') {\n output.innerHTML = '0';\n }\n \n if (output.innerHTML === 'Na') {\n output.innerHTML = '0';\n }\n \n break;\n \n case '.':\n if (!output.innerHTML.includes('.')) {\n calcNumbers(func);\n }\n break;\n \n case '+':\n console.log('Addition!');\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n calcState.arithmetic = addition;\n break;\n \n case 'enter':\n case '=':\n equalsFn(calcState.arithmetic);\n break;\n \n case '\\u002a':\n case 'x':\n console.log('Multiply!')\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n calcState.arithmetic = multiplication;\n break;\n \n case '/':\n case '\\u00F7':\n console.log('Division!')\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n calcState.arithmetic = division;\n break;\n \n case '-':\n console.log('Minus')\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n calcState.arithmetic = subtraction;\n break;\n \n case '%':\n console.log('Percentage')\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n output.innerHTML = firstNum / 100;\n break;\n \n case '\\u221a':\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n output.innerHTML = Math.sqrt(firstNum);\n break;\n \n case 'RND':\n firstNum = output.innerHTML;\n calcState.numFlag = true;\n output.innerHTML = Math.round(firstNum);\n \n default:\n break;\n }\n }", "title": "" }, { "docid": "6401d928cec14b0919dd6a4e1782d6ef", "score": "0.52510846", "text": "function TrackByFunction(){}", "title": "" }, { "docid": "ce9572b1d9fac04b59ab83b4ea807bd5", "score": "0.5246544", "text": "function functionName() {\n console.log(\"Hello World\");\n}", "title": "" }, { "docid": "ce9572b1d9fac04b59ab83b4ea807bd5", "score": "0.5246544", "text": "function functionName() {\n console.log(\"Hello World\");\n}", "title": "" }, { "docid": "c0c010faf8b66062876d14ea2a0371e8", "score": "0.5215703", "text": "function blabla() {\n\n}", "title": "" }, { "docid": "23edf71c53c889453eeb89161a859ff9", "score": "0.51993024", "text": "onClick(functionName) {\n return functionName;\n }", "title": "" }, { "docid": "32c196354343ae635e130a735d414aa3", "score": "0.51977336", "text": "function appFunction (){\n // isi Function\n console.log(\"saya pertama\")\n }", "title": "" }, { "docid": "db3584ce9953b1a0960e8dec2de032c4", "score": "0.5194051", "text": "function onloevha() {\n}", "title": "" }, { "docid": "b06da980343c89883fb889c673a53fc8", "score": "0.5183444", "text": "function display_code() {\n let user_code = '';\n user_code = document.getElementById('code').value;\n\n try {\n new Function(user_code);\n }\n catch(error) {\n document.getElementById('output').innerHTML = error.message;\n return;\n }\n \n let user_function = new Function(user_code);\n\n let user_result = user_function();\n\n document.getElementById('output').innerHTML = user_result;\n}", "title": "" }, { "docid": "d02c777bfeb7ccf4ecd75d21ea8ba45f", "score": "0.5179495", "text": "function logGreeting(fn){\n fn();\n}", "title": "" }, { "docid": "42982c6a664b2fc2901ab07576a2f1be", "score": "0.51782554", "text": "function cleanFunction(func) {\n var cleanedFunc = \"\";\n\n //add coeffients and powers to any standard function\n for (var i = 0; i < func.length; i++) {\n\n if ((func[i] == \"x\" || func[i] == \"(\") && i != func.length - 1 && func[i - 1] != \"^\") {\n\n //if it is a trig function\n if ($.inArray(func.substring(i - 3, i), trigFuncs) != -1 && $.inArray(func.substring(i - 6, i), invTrigFuncs) == -1) {\n console.log(func.substring(i - 6, i));\n\n if (i >= 4 && func[i - 4] != \"*\") {\n if (!isNaN(func[i - 4]))\n cleanedFunc = cleanedFunc.insert(i - 3, \"*\");\n else\n cleanedFunc = cleanedFunc.insert(i - 3, \"1*\");\n\n } else if (i < 4)\n cleanedFunc = cleanedFunc.insert(0, \"1*\");\n\n } else if ($.inArray(func.substring(i - 6, i), invTrigFuncs) != -1) {\n if (i >= 7 && func[i - 7] != \"*\") {\n if (!isNaN(func[i - 7]))\n cleanedFunc = cleanedFunc.insert(i - 3, \"*\");\n else\n cleanedFunc = cleanedFunc.insert(i - 3, \"1*\");\n\n } else if (i < 7)\n cleanedFunc = cleanedFunc.insert(0, \"1*\");\n\n } else {\n if (!isNaN(func[i - 1]) || func[i - 1] == \")\" || func[i - 1] == \"x\") {\n //make sure that coeffient is not the power of another term\n var isCoefficient = true;\n\n for (var x = i; x > 0; x--) {\n if (cleanedFunc[x] == \"+\" || cleanedFunc[x] == \"-\") {\n cleanedFunc += \"*\";\n break;\n }\n }\n\n } else if (func[i - 1] != \"*\") {\n //add a coefficient if neccessary\n if (i > 0)\n cleanedFunc += \"1*\"\n else\n cleanedFunc = cleanedFunc.insert(0, \"1*\")\n }\n }\n }\n\n //remove any spaces in function\n if (func[i] != \" \")\n cleanedFunc += func[i];\n\n //add a power if there is none\n if ((func[i] == \"x\" || func[i] == \")\") && i != func.length && func[i + 1] != \"^\")\n cleanedFunc += \"^1\";\n\n }\n\n return cleanedFunc;\n}", "title": "" }, { "docid": "d0b0cc19227a792c161b316da1310146", "score": "0.5172258", "text": "function selectedCommand(LiriReturn){\nswitch(LiriReturn) {\n case \"concert-this\": \n concertThis();\n break;\n case \"spotify-this-song\":\n SpotifyThisSong(); \n break;\n case \"movie-this\":\n movieThis(); \n break;\n case \"do-what-it-says\":\n doWhatItSays();\n break;\n default:\n console.log(\n \"here are the available functions for LIRI: concert-this, spotifiy-this-song, movie-this, do-what-it-says\"\n )\n}\n}", "title": "" }, { "docid": "4be28e5519790a2058c637e29747be22", "score": "0.5170618", "text": "function Tombola() {\n}", "title": "" }, { "docid": "c91b46dd41bd2084f23b32fe9f0c79f3", "score": "0.51571137", "text": "function one(){\n \n}", "title": "" }, { "docid": "07baaa7b10a2faddf5ad2c1b651b13e9", "score": "0.51540154", "text": "function miFuncion(){}", "title": "" }, { "docid": "07baaa7b10a2faddf5ad2c1b651b13e9", "score": "0.51540154", "text": "function miFuncion(){}", "title": "" }, { "docid": "07baaa7b10a2faddf5ad2c1b651b13e9", "score": "0.51540154", "text": "function miFuncion(){}", "title": "" }, { "docid": "65534bb1a463b98bce9398ecbad8bea7", "score": "0.5150901", "text": "function getOriginalFunction(func) {\n return func.__sentry_original__;\n }", "title": "" }, { "docid": "17e9e904e22b712bab6155ae664341f5", "score": "0.5148301", "text": "function getOriginalFunction(func) {\n\t return func.__sentry_original__;\n\t}", "title": "" }, { "docid": "2a55c304b29861091cb43d1bfdcc9961", "score": "0.51472", "text": "function logGreeting(fn) {\n fn();\n}", "title": "" }, { "docid": "eb0b98fc0b03372f5bf85341619f8088", "score": "0.51470846", "text": "function getOriginalFunction(func) {\n return func.__sentry_original__;\n}", "title": "" }, { "docid": "9146de4fd46a8ed0ea82d11c83f5d30e", "score": "0.5143978", "text": "function hello() { return 'hello mundo'; }", "title": "" }, { "docid": "0585db779a9b37cc09ed3c595b805008", "score": "0.5139632", "text": "function Hello(){\r\n return \"Hello\";\r\n}", "title": "" }, { "docid": "4c038830223206cfc169741da7b6109b", "score": "0.51390535", "text": "function fuctionPanier(){\n\n}", "title": "" }, { "docid": "e5135a420bb8b973525e4a6b87f5c8b1", "score": "0.5126381", "text": "function FunctionProfile() {\r\n}", "title": "" }, { "docid": "36f8769e899c11e1262897c5d1d1427f", "score": "0.51248187", "text": "createEnterChildFunction(functionName) {\n const { childFunction, functionName: realFunctionName } = this.createChildFunction(functionName);\n this.currentFunction = childFunction;\n // Return its full minecraft name\n return realFunctionName;\n }", "title": "" }, { "docid": "cefdbc1ef800d39a371108f7d414cfd2", "score": "0.51218164", "text": "function sentence() {\r\n console.log(\"I am a function\");\r\n}", "title": "" }, { "docid": "d102e70ec35fd1c625071b96e5bbe10d", "score": "0.5111661", "text": "function DynamicFunction(FunctionName) {\n\tif (typeof window[FunctionName.substr(0, FunctionName.indexOf(\"(\"))] == \"function\") {\n\t\tvar Fct = new Function(FunctionName);\n\t\tFct();\n\t} else console.log(\"Trying to launch invalid function: \" + FunctionName);\n}", "title": "" }, { "docid": "3d145f8424daa1b18c1db87a14a3836a", "score": "0.5106658", "text": "function hookFunction(event) {\n popebot.client.addListener(event, function () {\n var args = Array.prototype.slice.call(arguments);\n var methodName;\n\n // Prepend popebot to arguments.\n args.unshift(popebot);\n\n // Handle events with special characters in them.\n if (event === '+mode') {\n methodName = 'on_mode';\n } else if (event === '-mode') {\n methodName = 'on_unmode';\n } else {\n methodName = 'on_' + event;\n }\n\n // Call method in each module corresponding to the event.\n for (var j in popebot.modules) {\n if (popebot.modules[j].hasOwnProperty(methodName)) {\n var done = popebot.modules[j][methodName].apply(this, args);\n // If the current module has handled the event, break from the loop.\n if (done === true) {\n break;\n }\n }\n }\n });\n}", "title": "" }, { "docid": "3ca929e04b46ed87cbc877b56262adb8", "score": "0.5102045", "text": "function l(pvScriptName,pvFunctionName,pvMessage,pvLevel){\n\n // This function can be passed a pre-formatted log string, usually passed back from the balu-parse-server.\n // In this case, just console.log it, without the preceeding or trailing carriage returns\n if(typeof pvFunctionName === 'undefined' &&\n typeof pvMessage === 'undefined' &&\n typeof pvLevel === 'undefined') {\n console.log(pvScriptName.substring(1,pvScriptName.length));\n return '\\n' + pvScriptName.substring(1,pvScriptName.length);\n }\n\n var lvMaxAppNameLength = 22;\n var lvPadding = ' '.substring(0,lvMaxAppNameLength - gvAppName.length + 1);\n var lvLogText = '';\n\n switch(pvLevel) {\n\n case 'ERROR':\n if (gvLogErrors) {\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case 'PROCS':\n // Short for \"process\", these are the ubiquitous logs that\n // track (at the least) the start of every function, as well\n // as other key points\n // On by default\n if (gvLogProcs) {\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case 'ROUTE':\n // Similar to PROCS, but for the web server routes\n // On by default\n if (gvLogRoutes) {\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case ' INFO':\n // Additional to PROCS, these don't just track process, they\n // record information as well. Similar to DEBUG.\n // Off by default\n if (gvLogInfos){\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case 'DEBUG':\n // Useful log points for debugging\n // Off by default\n if (gvLogDebugs){\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case 'INITS':\n // Rather than putting PROCS in init functions (which always fire\n // and, once the app is working reliably, aren't particularly interesting)\n // Off by default\n if (gvLogInits){\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case ' AJAX':\n if (gvLogAJAX){\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case 'LSTNR':\n // Rather than putting PROCS in listeners (which can fire\n // continually in some scenarios), use LSTNR and keep them ...\n // Off by default\n if (gvLogLstnrs){\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n case ' TEMP':\n // What it says on the tin. These should not stay in the code for long\n // On by default\n if (gvLogTemps){\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + pvLevel + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n break;\n\n default:\n lvLogText = gvAppName.substring(0,lvMaxAppNameLength) + lvPadding + '| ' + 'UNKWN' + ': ' + pvScriptName + '.' + pvFunctionName + ': ' + pvMessage;\n console.log(lvLogText);\n lvLogText = '\\n' + lvLogText;\n }\n return lvLogText; // Set to '' if logging is off for the given level.\n}", "title": "" }, { "docid": "0921902a459eeadaf8d2de3ce79fee6c", "score": "0.509934", "text": "function newFunction() {\n\tvar rsName = _RecordsetName.getValue();\n\tvar funcName = 'get' + rsName.substr(0, 1).toUpperCase() + rsName.substr(1,rsName.length-1);\n\tvar ret = dwscripts.callCommand('CreateNewCFCFunction.htm',funcName);\n\tif (ret) {\n\t _cffunction__tag.initializeUI();\n\t\t_cffunction__tag.listControl.setIndex(_cffunction__tag.listControl.getLen()-1);\n\t}\n}", "title": "" }, { "docid": "e313ea42f7b40145d2d1844d64234c81", "score": "0.50920165", "text": "function functionifyEventString(fn, to){\n\t\tif(typeof fn === 'string') { \n\t\t\treturn function(e){\n\t\t\t\tvar value = e.value, \n\t\t\t\t\ts = e.source,\n\t\t\t\t\tc;\n\t\t\t\t\t\n\t\t\t\tswitch(s&&s._type){\n\t\t\t\t\tcase 'tabbedbar':\n\t\t\t\t\t\tvalue = s.labels[e.index];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvalue = (value && value.value)||value;\n\t\t\t\te.value = value;\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(to && to[fn]){\n\t\t\t\t\tto[fn](e);\n\t\t\t\t} else {\n\t\t\t\t\t(to||Ti.App).fireEvent(fn, K.extend({ value: value }, e).sanitize([\"type\", \"source\"]));\n\t\t\t\t}\n\t\t\t} \n\t\t} else {\n\t\t\treturn fn\n\t\t}\n\t}", "title": "" }, { "docid": "2ba25df5f70a888534223231633ae899", "score": "0.5081544", "text": "\"function name\"(){\n //do thing\n }", "title": "" }, { "docid": "912f41d4a0da7bbf540308b09dfbd66c", "score": "0.5081428", "text": "function normalizedFunctionString(fn) {\n return fn.toString().replace('function(', 'function (');\n}", "title": "" }, { "docid": "312a94e063b1088d3642dcaad375dbc6", "score": "0.5066097", "text": "function getFunctionName(aFunction) {\n var regexpResult = aFunction.toString().match(/function (\\w*)/);\n if (regexpResult && regexpResult[1]) {\n return regexpResult[1];\n }\n return 'anonymous';\n}", "title": "" }, { "docid": "fd84f4bd7e93f752f47395eb7ea2ad21", "score": "0.5064902", "text": "function logGreeting(fn){\n\tfn();\n}", "title": "" }, { "docid": "726d8bdf36fa478dac1b436132edfb8d", "score": "0.50638694", "text": "createEnterRootFunction(functionName, conflictStrategy) {\n const functionPath = this.getResourcePath(functionName).fullPathWithNamespace;\n this.currentFunction = this.resources.addResource('functions', {\n children: new Map(), commands: [], isResource: true, path: functionPath,\n }, conflictStrategy);\n return minecraft_1.toMCFunctionName(functionPath);\n }", "title": "" }, { "docid": "5dda59b967bd315e0b23dfd5ff0517db", "score": "0.50566983", "text": "sayHi2(){ return 'sayHi2' }", "title": "" }, { "docid": "57d890d6cc25dc896fcd9c71bb8aff3e", "score": "0.505009", "text": "function setLogFunction(logFunction)\n {\n my.logFunction = logFunction\n }", "title": "" }, { "docid": "5ed3a59329af5fb595b75969d7cd6c17", "score": "0.50398105", "text": "function add_function() {\n var func = jQuery('#function_dropdown').val();\n if( func === '') {\n alert('No group by function chosen');\n return;\n }\n var col = jQuery('#columns_dropdown').val();\n var val;\n if(func === 'COUNT') {\n val = 'COUNT(*)';\n }\n else {\n if( col === '') {\n alert('Select a column for the function selected please');\n return;\n }\n val = func + '(' + col + ')';\n }\n if(functions_applied.indexOf(val) !== -1) {\n alert('This function has been already added');\n return;\n }\n\n functions_applied.push(val);\n var ul = jQuery('#calcfuncsul');\n jQuery( \"<li data-id=\\\"\" + val + \"\\\" data-coltype=\\\"function\\\"></li>\" )\n .html( remove_me + ' ' +val )\n .appendTo( ul );\n\n }", "title": "" }, { "docid": "5ed3a59329af5fb595b75969d7cd6c17", "score": "0.50398105", "text": "function add_function() {\n var func = jQuery('#function_dropdown').val();\n if( func === '') {\n alert('No group by function chosen');\n return;\n }\n var col = jQuery('#columns_dropdown').val();\n var val;\n if(func === 'COUNT') {\n val = 'COUNT(*)';\n }\n else {\n if( col === '') {\n alert('Select a column for the function selected please');\n return;\n }\n val = func + '(' + col + ')';\n }\n if(functions_applied.indexOf(val) !== -1) {\n alert('This function has been already added');\n return;\n }\n\n functions_applied.push(val);\n var ul = jQuery('#calcfuncsul');\n jQuery( \"<li data-id=\\\"\" + val + \"\\\" data-coltype=\\\"function\\\"></li>\" )\n .html( remove_me + ' ' +val )\n .appendTo( ul );\n\n }", "title": "" }, { "docid": "382684e96da5f1eef9d3e8670023f92e", "score": "0.50343657", "text": "function GHG(){\n a_FAO_i='GHG';\n initializing_change();\n change();\n}", "title": "" }, { "docid": "1304c3a8fba673e59d92bf6e7b12618c", "score": "0.5029401", "text": "function addUserFunction(userFunctionEdn) {\n userFunctions.push(userFunctionEdn);\n}", "title": "" }, { "docid": "a4d8363407e3af52c557dca4455e48ef", "score": "0.5021639", "text": "function miFuncion (){}", "title": "" }, { "docid": "54ac1c8cb728d95ce3ab668c6e60f937", "score": "0.5017997", "text": "function klikni(){\n console.log(\"kliknuto\");\n}", "title": "" }, { "docid": "953558e2790a9b41280d2e00d448dae5", "score": "0.50175303", "text": "checkCurrentFunctionCPP() {\n var cursorPosition = this.currentEditor.getCursorBufferPosition();\n var exclusionList = [\"for\", \"while\", \"if\", \"else\", \"switch\", \"else\", \"}\"];\n\n //look for {, then look for identifier, ignore do/while/for/if/else if/else/switch\n var i;\n var done = false;\n this.currentFunction = \"???\";\n for( i = cursorPosition.row; i >= 0; --i ) {\n if( this.currentEditor.lineTextForBufferRow(i).includes('{') ) { //now look for function signature\n //find the function identifier mode immidietly to the left of the first { found above\n var functionLine;\n for( j = i; j >= 0; --j ) {\n if( exclusionList.some( substring=>this.currentEditor.lineTextForBufferRow(j).includes(substring) ) ) {\n break;\n }\n if( this.currentEditor.lineTextForBufferRow(j).includes('(') ) { \n functionLine = this.currentEditor.lineTextForBufferRow(j).split(' ');\n var j;\n for( k = 0; k < functionLine.length; ++k ) {\n if(functionLine[k].includes('(')){\n //handle func (...\n if( functionLine[k][0] == '(') {\n this.currentFunction = functionLine[k-1];\n done = true;\n }\n //handle func(...\n else {\n var n = functionLine[k].indexOf('(');\n this.currentFunction = ( functionLine[k] ).slice( 0, n );\n done = true;\n }\n \n }\n }\n if(done) {\n break;\n }\n }\n }\n if(done) {\n break;\n }\n }\n if(done) {\n break;\n }\n }\n }", "title": "" }, { "docid": "b38b615f43f7aaa15e7f978496ca77c6", "score": "0.50170755", "text": "function fie1(){\n console.log(\"fie1 wordt uitgevoerd\");\n}", "title": "" }, { "docid": "af84002b46d568e7ae203060c4c0238a", "score": "0.5014897", "text": "function gfg() {}", "title": "" }, { "docid": "30e4b16cd5ae92daef3b4537a229b48f", "score": "0.5005525", "text": "function hai(){\n\treturn \"haiiii\"\n}", "title": "" }, { "docid": "45266203c99a1b10925c0ad50ae88b26", "score": "0.5000846", "text": "function wrapFunction(functionDescribtor, newFunction) {\n\t\tvar reference = window;\n\t\tvar describtorParts = functionDescribtor.split(\".\");\n\t\tdescribtorParts.forEach(function(describtor, i) {\n\t\t\tif (describtorParts.length - 1 > i ) {\n\t\t\t\treference = reference[describtor];\n\t\t\t} else {\n\t\t\t\treference[describtor] = newFunction;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "1b106e1fb2c223892f5e56ad2baea5d7", "score": "0.49977455", "text": "function FunctionUtils() {}", "title": "" }, { "docid": "17ddf0e1326bbe6adc819d738616b670", "score": "0.49952617", "text": "enterProgram(ctx) { console.log(\" %s: %s\", __function, ctx.getText()); }", "title": "" }, { "docid": "c0fbe8ffbaea0abfa8524f067e9dffdb", "score": "0.49894398", "text": "function logTheArgument(someFunction) {\r\n someFunction();\r\n}", "title": "" }, { "docid": "fd0c31edc55e01648ca8db759444267e", "score": "0.49893165", "text": "function iPutTheFunIn(string){\n var halfStringLength = (string.length/2)\n var leftHalf = string.substring(0, halfStringLength)//identify the left half of the string\n var funWord = (leftHalf+\"fun\"+string.substring(halfStringLength,string.length))//stick fun in the middle\n return funWord\n}", "title": "" }, { "docid": "bf580c35ed83c0aaf67c3a0efea5a1fe", "score": "0.49764818", "text": "function behaviorFunction(){\n return \"MM_jumpMenuGo\";\n}", "title": "" }, { "docid": "6c8b13f39dccc203abc3ba54da96497c", "score": "0.49754116", "text": "yellHi() {\n console.log('HEY UMI')\n }", "title": "" }, { "docid": "bdfdccfe022a491b8744875bef0dc604", "score": "0.4974508", "text": "getEventName(eventType, funcName) {\n return `sls-${eventType}-${funcName}`.replace(/-/g, '_');\n }", "title": "" }, { "docid": "737b46ad2c1d04b1797f043f7d7347f7", "score": "0.497408", "text": "function logGreeting(fn) {\r\n\t// greet function is invoked\r\n\tfn();\r\n}", "title": "" }, { "docid": "4c9e110ba1d4e76e05b22c3da3e2f891", "score": "0.49685296", "text": "function getFuncion(num) {\n if (num === void 0) { num = 1; }\n return 'Función normal de JS';\n}", "title": "" }, { "docid": "a579d90deb6aba59bcfca8e299ef7b83", "score": "0.49683267", "text": "function myFunction(){\n console.log('Shazam');\n }", "title": "" }, { "docid": "96ca1f09b0b0876978c2ceb8724dc4aa", "score": "0.49673438", "text": "function fun1(){\n console.log('Thise is normal function');\n}", "title": "" }, { "docid": "266ffaafd77f7c4492aeb2cd32187d36", "score": "0.4966523", "text": "parseFunctions() {\n if (!Code.isScript(this.file)) return\n\n blanke.cooldownFn(\"parseFunctions\", 1000, () => {\n let text = this.codemirror.getValue()\n blanke.clearElement(this.el_class_methods)\n\n // get function list\n let class_list = {}\n let re_func = [\n /function\\s+(\\w+):(\\w+)\\(([\\w,\\s]*)\\)/g,\n /(\\w+)\\.(\\w+)\\s*=\\s*function\\s*\\(([\\w,\\s]*)\\)/g,\n ]\n for (let re of re_func) {\n let match\n while ((match = re.exec(text))) {\n let fn_info = {\n class: match[1],\n name: match[2],\n args: (match[3] || \"\").split(\",\").map(s => s.trim()),\n }\n this.function_list.push(fn_info)\n\n // add it to functions to class string\n if (!class_list[fn_info.class])\n class_list[\n fn_info.class\n ] = `<div class=\"class-name\">${fn_info.class}</div>`\n class_list[fn_info.class] += `\n\t\t\t\t\t\t<div class=\"method-container\">\n\t\t\t\t\t\t\t<div class=\"name\">${fn_info.name}(<div class=\"args\">${fn_info.args.join(\n \", \"\n )}</div>)</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`\n }\n }\n // combine all class strings\n for (let c in class_list) {\n this.el_class_methods.innerHTML += class_list[c]\n }\n })\n }", "title": "" }, { "docid": "cb99852578823cc4d3211c7f905e822c", "score": "0.49582016", "text": "function Ha(){}", "title": "" }, { "docid": "789d87c6dff59b79f570f7aa4dce2e4b", "score": "0.49582013", "text": "function sourceFunction()\n\t\t{\n\t\t\tinspect(func, 'Test function')\n\t\t}", "title": "" }, { "docid": "a3deb9ab3a2cd0b5ec4e04d178ba2879", "score": "0.49565107", "text": "function helloWord() {\n console.log(\"hello\");\n}", "title": "" }, { "docid": "465588a7ba5a7cc4e9610d926148c2e8", "score": "0.49556527", "text": "function switchModel(model) {\n optimalApp.model = model;\n switch (model) {\n case 'linear':\n optimalApp.functionmodel = function(points) {\n return JXG.Math.Numerics.regressionPolynomial(1, points);\n };\n break;\n case 'quadratic':\n optimalApp.functionmodel = function(points) {\n return JXG.Math.Numerics.regressionPolynomial(2, points);\n };\n break;\n case 'cubic':\n optimalApp.functionmodel = function(points) {\n return JXG.Math.Numerics.regressionPolynomial(3, points);\n };\n break;\n case 'quartic':\n optimalApp.functionmodel = function(points) {\n return JXG.Math.Numerics.regressionPolynomial(4, points);\n };\n break;\n case 'exponential':\n optimalApp.functionmodel = optimalApp.functionmodel; //TODO\n break;\n case 'logistic':\n optimalApp.functionmodel = optimalApp.functionmodel; //TODO\n break;\n case 'logarithmic':\n optimalApp.functionmodel = optimalApp.functionmodel; //TODO\n break;\n case 'step':\n optimalApp.functionmodel = optimalApp.functionmodel; //TODO\n break;\n case 'gaussian':\n optimalApp.functionmodel = optimalApp.functionmodel; //TODO\n break;\n case 'interpolated':\n optimalApp.functionmodel = JXG.Math.Numerics.CatmullRomSpline;\n break;\n case 'polynomial':\n optimalApp.functionmodel = JXG.Math.Numerics.lagrangePolynomial;\n break;\n default:\n alert('Invalid model to fit function to');\n }\n}", "title": "" }, { "docid": "53cb5b11086809c484e61c5692161780", "score": "0.49552104", "text": "function Func_s() {\n}", "title": "" }, { "docid": "cf33ec90aaab1219f05a0d2a17c5ac4d", "score": "0.4954164", "text": "function reusableFunction() {\r\n // alert('Hello Swati');\r\n console.log(\"Hello\")\r\n}", "title": "" }, { "docid": "917d2379cbdb03200e6c4c8d96409f65", "score": "0.49481732", "text": "function applyModifiers() {\n\t\ttry {\n\t\t\tvar rt = this.funcOldString;\n\t\t\tvar active = false;\n\n\t\t\tfor (var i=0; i< this.modifiers.length; i++){\n\t\t\t\tif ( !this.modsActive[i]) continue;\n\n\t\t\t\tx = rt.replace(this.modifiers[i][0], this.modifiers[i][1]);\n\t\t\t\tif (x == rt) { // if not found\n\t\t\t\t\t// print out an error message when the match fails.\n\t\t\t\t\t// These messages get lost on a refresh, so wait a few seconds to put it in the error log.\n\t\t\t\t\tsetTimeout( function (fname, repStr, ftstr) {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\tlogit(\"Unable to replace string in function \" + fname);\n\t\t\t\t\t\t\tlogit(\"Replacement string:\" + repStr );\n\t\t\t\t\t\t\tlogit(\"Function listing: \" + ftstr);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}(this.funcName, this.modifiers[i][0], ft), 5000);\n\t\t\t\t}\n\t\t\t\telse { }\n\n\t\t\t\trt = x;\n\t\t\t\tactive = true;\n\t\t\t}\n\n\t\t\tthis.funcNew = rt;\n\t\t\tif (active) {\n\t\t\t\t// apply the new function\n\t\t\t\tuW.uWFunc(this.funcName +' = '+ this.funcNew);\n\t\t\t} else {\n\t\t\t\t// set to the original function\n\t\t\t\tvar x1 = this.funcName.split('.');\n\t\t\t\tvar f1 = uW;\n\t\t\t\tfor (var i=0; i<x1.length-1; i++)\n\t\t\t\tf1 = f1[x1[i]];\n\t\t\t\tf1[x1[x1.length-1]] = this.funcOld;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tlogit(\"CalterFuncModifier \"+ this.funcName);\n\t\t\tlogerr(err);\n\t\t}\n\t}", "title": "" }, { "docid": "0ca26d5d2f9a634e52c5d06287621e31", "score": "0.49474204", "text": "function displayMessage() {\n // Task 8: Call each of the functions as properties of the imported object.\n // Task 17: Modify each of the function within each of the displayMessage so that they use only the variable name in the function call.\n console.log(countCharacter(\"What is the color of the sky?\", \"t\"));\n console.log(capitalizeFirstCharacterOfWords(\"What is the color of the sky?\"));\n console.log(reverseWord(\"What is the color of the sky?\"));\n console.log(reverseAllWords(\"What is the color of the sky?\"));\n console.log(replaceFirstOccurence(\"What is the color of the sky?\", \"sky\", \"water\"));\n console.log(Mencode(\"What is the color of the sky?\"));\n // Task 13: Use console.log() to display the output of palindrome()) function. You will need to pass the functions a string.\n console.log(palindrome(\"What is the color of the sky?\"));\n console.log(pigLatin(\"What is the color of the sky?\", \"$\"));\n}", "title": "" }, { "docid": "b5c807f1af8575257ff5c0d7bb5b1baf", "score": "0.49420393", "text": "function get_function_name(f) {\r\n\tvar str = f.toString();\r\n var name = str.split ('(')[0];\r\n name = name.split (/[' '{1,}]/)[1];\r\n return(name);\r\n}", "title": "" }, { "docid": "3ee19bebdd4132cc4c818142244fef14", "score": "0.49395177", "text": "function printUsername(fn) {\n return fn(\"biggaji\");\n}", "title": "" }, { "docid": "b2ea0beabdb9d257a21ca73cccb7cc77", "score": "0.49381182", "text": "function myFunction() {\n console.log('this is my function');\n}", "title": "" } ]
d0f96b85963b3c4d18fbc08500402699
Registers a secret which will get masked from logs
[ { "docid": "e75a4f8f0fad1d598d49396088141f94", "score": "0.68767434", "text": "function setSecret(secret) {\r\n command_1.issueCommand('add-mask', {}, secret);\r\n}", "title": "" } ]
[ { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "91c71f3459f11bb0d1aaad7586400e8f", "score": "0.68944424", "text": "function setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}", "title": "" }, { "docid": "1bf18df264c53e7f2e1d79a5b8bed663", "score": "0.58414763", "text": "function initializeSecret() {\n \n}", "title": "" }, { "docid": "9433d2d9d4f63b9df11c425bc012dbd8", "score": "0.5662957", "text": "function setSecret(val) {\n if (val) {\n if (val.match(/\\r|\\n/) && (\"\" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() !== 'TRUE') {\n throw new Error(exports.loc('LIB_MultilineSecret'));\n }\n exports.command('task.setsecret', {}, val);\n }\n}", "title": "" }, { "docid": "66c9a82e51f12d9aad5db73d52e9f95f", "score": "0.5526807", "text": "function _exposeTaskLibSecret(keyFile, secret) {\n if (secret) {\n var encryptKey = crypto.randomBytes(256);\n var cipher = crypto.createCipher(\"aes-256-ctr\", encryptKey);\n var encryptedContent = cipher.update(secret, \"utf8\", \"hex\");\n encryptedContent += cipher.final(\"hex\");\n var storageFile = path.join(_getVariable('Agent.TempDirectory') || _getVariable(\"agent.workFolder\") || process.cwd(), keyFile);\n fs.writeFileSync(storageFile, encryptKey.toString('base64'), { encoding: 'utf8' });\n return new Buffer(storageFile).toString('base64') + ':' + new Buffer(encryptedContent).toString('base64');\n }\n}", "title": "" }, { "docid": "739e9b805ba00209ca541c3bdf4302a6", "score": "0.5518866", "text": "function setSecret() {\n var pool = [];\n var index;\n\n if (allowDuplicates) {\n for (var i = 0 ; i < 4 ; i++) {\n secret[i] = getRandom();\n }\n } else {\n // From Jen, I think this will allow us to generate a code without duplicate colors\n pool = [1, 2, 3, 4, 5, 6];\n\n for (var i = 0 ; i < 4 ; i++) {\n index = Math.floor(Math.random() * pool.length);\n secret[i] = pool[index];\n pool.splice(index, 1);\n }\n }\n }", "title": "" }, { "docid": "f3c686f6a8ef3a16dae8338438b08f0b", "score": "0.5423172", "text": "function generateSecret() {\n try {\n return crypto.randomBytes(256).toString('hex');\n } catch (err) {\n logger('DbSecret','error',err);\n }\n}", "title": "" }, { "docid": "480c78ea681fba761aa0502a269484e5", "score": "0.5374314", "text": "function createSecretHolder(secret) {\n return {\n getSecret() {\n return secret;\n },\n setSecret(newSecret) {\n secret = newSecret;\n },\n };\n}", "title": "" }, { "docid": "d5b90aa92bbdba7ac0185e291f9477cc", "score": "0.53340024", "text": "function exportSecret(name, val) {\n exportVariable(name, val);\n // the runner will error with not implemented\n // leaving the function but raising the error earlier\n command_1.issueCommand('set-secret', {}, val);\n throw new Error('Not implemented.');\n}", "title": "" }, { "docid": "2ee906699543206c488e862377de386d", "score": "0.5324563", "text": "function exportSecret(name, val) {\r\n exportVariable(name, val);\r\n // the runner will error with not implemented\r\n // leaving the function but raising the error earlier\r\n command_1.issueCommand('set-secret', {}, val);\r\n throw new Error('Not implemented.');\r\n}", "title": "" }, { "docid": "0afb580608c1b558940a60a29fc7f8f7", "score": "0.53217643", "text": "function createSecretHolder(secret) {\n let mySecret = secret;\n const getSecret = () => {\n return mySecret;\n };\n\n const setSecret = (newSecret) => {\n mySecret = newSecret;\n };\n return {\n getSecret,\n setSecret,\n };\n}", "title": "" }, { "docid": "50ba0f2ee9647de47e01bd8dec7f091f", "score": "0.5307244", "text": "function secretKey() {\n\treturn 667;\n}", "title": "" }, { "docid": "ac739b6521272c445f57ddefd61fdef0", "score": "0.5240275", "text": "function registerJwtInterceptor() {\n\n }", "title": "" }, { "docid": "b1e734e8bb79691b60e50efc36615490", "score": "0.52386963", "text": "get secret() {\n return this.getStringAttribute('secret');\n }", "title": "" }, { "docid": "79d05f839b5cfcffca381de2312ef5f6", "score": "0.5141714", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "title": "" }, { "docid": "79d05f839b5cfcffca381de2312ef5f6", "score": "0.5141714", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "title": "" }, { "docid": "79d05f839b5cfcffca381de2312ef5f6", "score": "0.5141714", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "title": "" }, { "docid": "79d05f839b5cfcffca381de2312ef5f6", "score": "0.5141714", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "title": "" }, { "docid": "79d05f839b5cfcffca381de2312ef5f6", "score": "0.5141714", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "title": "" }, { "docid": "74d7688b0027f6ef4016c8fb955f30ac", "score": "0.5137694", "text": "function secret(secretCode) {\n return {\n saySecretCode() {\n console.log(secretCode)\n }\n }\n}", "title": "" }, { "docid": "b2260ae311efa21a17f0fbcffef32ecb", "score": "0.51292837", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n }", "title": "" }, { "docid": "c6e7bbc8997b27078731ed8863865c83", "score": "0.51132584", "text": "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n }", "title": "" }, { "docid": "b7943818405fb64a66727dc41cdb17fe", "score": "0.5101602", "text": "allowSentry() {\n localStorage.setItem('wallet:sentry', true);\n this.updateSentryState();\n }", "title": "" }, { "docid": "58f3357fee3c5dcb3455de053155e70e", "score": "0.5095846", "text": "async function createSecret (clientSecretsManager, arn, token) {\n const { RandomPassword: randomPassword } = await clientSecretsManager.getRandomPassword({\n PasswordLength: 32,\n ExcludePunctuation: true\n }).promise()\n console.log('RETRIEVED RANDOM PASSWORD:', randomPassword)\n\n const newSecretValue = {\n authMasterKey: randomPassword\n }\n const putSecretValueResponse = await clientSecretsManager.putSecretValue({\n SecretId: arn,\n SecretString: JSON.stringify(newSecretValue),\n VersionStages: ['AWSPENDING'],\n ClientRequestToken: token\n }).promise()\n console.log('PUT PENDING SECRET:', putSecretValueResponse)\n}", "title": "" }, { "docid": "037d83a59fe60a09f57f3be1e607cc03", "score": "0.5084505", "text": "async function setSecret (clientSecretsManager, arn) {\n return null\n}", "title": "" }, { "docid": "3e48003bab7f8cc355a70a6c64c5652f", "score": "0.5076736", "text": "function generateSecretKey() {\n\tconsole.log('- generating secret key...')\n\tlet secretKey = crypto.randomBytes(100).toString('hex')\n\tinsertInMongo(secretKey)\n\treturn secretKey\n}", "title": "" }, { "docid": "7c43834a4a3893ddc754355f70de0136", "score": "0.50759166", "text": "generateSharedSecret() {\n return this.randomBase32(16);\n }", "title": "" }, { "docid": "6050dfc94499366914f2bb30fc27d97f", "score": "0.50307333", "text": "function generateAdminToken(){\n return Base64(randomAlphanumeric() + \";\" + ip.address() + \";\" + process.env.MINERPORT);\n}", "title": "" }, { "docid": "7e5496f311600ebcbf242c958933f14a", "score": "0.50191486", "text": "async register (secret, registerGasLimit) {\n var that = this;\n if (secret === undefined) {\n that.account.keypair = utils.createAccount();\n that.account.aesKey = aes.generateKey();\n } else {\n that.account.keypair = utils.keyPairFromSecret(secret);\n that.account.aesKey = aes.generateKey(secret);\n }\n let isRegistered = await ClientBase.registered(that.beldex, that.account.publicKeySerialized());\n if (isRegistered) {\n // This branch would recover the account previously bound to the secret, and the corresponding balance.\n return await that.syncAccountState();\n } else {\n\n var [c, s] = utils.sign(that.beldex._address, that.account.keypair);\n if (registerGasLimit === undefined)\n registerGasLimit = 190000;\n let transaction = that.beldex.methods.register(that.account.publicKeySerialized(), c, s)\n .send({from: that.home, gas: registerGasLimit})\n .on('transactionHash', (hash) => {\n console.log(\"Registration submitted (txHash = \\\"\" + hash + \"\\\").\");\n })\n .on('receipt', (receipt) => {\n console.log(\"Registration successful.\");\n })\n .on('error', (error) => {\n that.account.keypair = undefined;\n console.log(\"Registration failed: \" + error);\n });\n return transaction;\n }\n }", "title": "" }, { "docid": "197b4907e16dabd4f23b8f57ae4ed5e6", "score": "0.49862805", "text": "function secretVariable() {\n var private = \"super secret code\"\n return funciton(){\n return private\n }\n}", "title": "" }, { "docid": "05b7e179b4241dffd2442aee69f7cfed", "score": "0.49572298", "text": "disallowSentry() {\n localStorage.setItem('wallet:sentry', false);\n this.updateSentryState();\n }", "title": "" }, { "docid": "2944c8bdc5970d6bf76dc5f06e43e9e4", "score": "0.49562937", "text": "random() {\n const arr = this.get(secretKey);\n return arr[Math.floor(Math.random() * arr.length)];\n }", "title": "" }, { "docid": "d4bf92ecd725aaf7bf25a29a07ce7a83", "score": "0.4947062", "text": "getLegalSecretWord(){\n return this.secrets[round(random(0,this.secrets.length))];\n }", "title": "" }, { "docid": "ce2db9fd18ad7b58671747455fc74794", "score": "0.49302", "text": "get secretStringInput() {\n return this._secretString;\n }", "title": "" }, { "docid": "3fb963eb496314afb8bce49c3e1af71f", "score": "0.49241325", "text": "function keyFromSecret(secret) {\n\tconst hash = createHash('md5');\n\thash.update('', 'hex');\n\thash.update(secret);\n\treturn hash.digest('hex').slice(0, 32);\n}", "title": "" }, { "docid": "3d6732bfce005daf267ed356361a0985", "score": "0.49067414", "text": "function secretVariable() {\n var private = 'super secret code';\n return function() {\n return private\n }\n}", "title": "" }, { "docid": "bdf0b7361df337f79189276dddbbc4e7", "score": "0.48993334", "text": "bind(scope, id) {\n const config = {\n enableBasicAuth: true,\n username: this.props.username,\n };\n if (this.props.password) {\n return {\n ...config,\n password: this.props.password.toString(),\n };\n }\n const secret = new secretsmanager.Secret(scope, id, {\n generateSecretString: {\n secretStringTemplate: JSON.stringify({ username: this.props.username }),\n generateStringKey: 'password',\n },\n });\n return {\n ...config,\n password: secret.secretValueFromJson('password').toString(),\n };\n }", "title": "" }, { "docid": "ceb41b8a3366b54e9ea79f405986ed13", "score": "0.4852153", "text": "block (token) {\n // let decoded = Jwt.decode(token, config.jwt.key)\n // let redis = plugins['hapi-redis'].client\n // let key = `${config.jwt.cache_prefix}${token}`\n // if(!(decoded.exp == null || decoded.exp == undefined )) {\n // let expiration = decoded.exp - moment().unix()\n // redis.multi().set(key, \"blocked\").expire(key, expiration).exec()\n // }\n // else {\n // redis.del(key)\n // }\n }", "title": "" }, { "docid": "6a18aea6a429f6a1362ce97fe8a4b8e8", "score": "0.48463893", "text": "recognizesSecret(secret) {\n throw new NotImplemented()\n }", "title": "" }, { "docid": "70955cbcdc48fa3cd00e1959fa3cccfe", "score": "0.48420954", "text": "function secret() {\n var sample = \"secret value\"\n return function() {\n return sample\n }\n}", "title": "" }, { "docid": "f7d7ba034f2e4f32129686eb50dbca0d", "score": "0.48275194", "text": "function createSecretHolder(secret) {\n let num = secret;\n const obj = {\n getSecret() {\n return num;\n },\n setSecret(n) {\n num = n;\n },\n };\n return obj;\n}", "title": "" }, { "docid": "f7d7ba034f2e4f32129686eb50dbca0d", "score": "0.48275194", "text": "function createSecretHolder(secret) {\n let num = secret;\n const obj = {\n getSecret() {\n return num;\n },\n setSecret(n) {\n num = n;\n },\n };\n return obj;\n}", "title": "" }, { "docid": "d1d159f5af65a987d699f4fede372591", "score": "0.482715", "text": "function ensureTokenIsValid(token) {\n if (token !== exports.secretToken) {\n throw new Error('Bad secret');\n }\n}", "title": "" }, { "docid": "0c38469bce64dbcf795fb4b4b0c19104", "score": "0.481167", "text": "function newSecret() {\n let secretSequence = \"\";\n while (secretSequence.length < 4) {\n let num = Math.floor(Math.random() * Math.floor(10));\n if (secretSequence.indexOf(num.toString()) === -1) {\n secretSequence = secretSequence + num;\n }\n }\n return secretSequence;\n }", "title": "" }, { "docid": "fdf68c6e3ba22b85b7892676f8c501c4", "score": "0.48097423", "text": "static fromSecretsManager(optionaName, secret) {\n return new ExposedSecret(optionaName, secret.secretArn);\n }", "title": "" }, { "docid": "0045901792db3fbe0ef274e291a070d8", "score": "0.48059493", "text": "function attachSecretMessage(marker, secretMessage) {\n const infowindow = new google.maps.InfoWindow({\n content: secretMessage,\n });\n\n marker.addListener(\"click\", () => {\n infowindow.open(marker.get(\"map\"), marker);\n });\n}", "title": "" }, { "docid": "6b9949ad2184ac1fd195f1088873fce2", "score": "0.48012096", "text": "static fromSecretsManager(optionName, secret) {\n return new ExposedSecret(optionName, secret.secretArn);\n }", "title": "" }, { "docid": "48e40286f0c995c3bc9f4017e28944a5", "score": "0.4769339", "text": "function registerNewVerif (v) {\n if (!serverLogs.publicKey) return -2; //Central server unknown\n if (serverLogs.verification[v.verificationID] != null) return -3; //verification already exists\n if (!verifySig(signatureStringifyer(v), serverLogs.publicKey, v.signature)) return -1; //Invalid Signature\n serverLogs.verification[v.verificationID] = v; //Save it\n fs.writeFileSync(__dirname + \"/serverLog.json\", JSON.stringify(serverLogs)); //Write it\n}", "title": "" }, { "docid": "249a3d6c03b811485e7565d06d29965f", "score": "0.4755715", "text": "function writePassword() {\n\n}", "title": "" }, { "docid": "0d636ffba2227a0a2829531b2fd7da88", "score": "0.474498", "text": "function secretVar(){\n var private = \"super secret code\";\n return function(){\n return private\n }\n}", "title": "" }, { "docid": "bb1b88c84aa2b04f8aeaef3dd8ae25a3", "score": "0.47386837", "text": "function get_secret_data(key) {\n const filepath = process.env[key + '_FILE'];\n if (filepath) {\n process.env[key] = secrets[path.parse(filepath).base] || process.env[key];\n }\n}", "title": "" }, { "docid": "6dffb41e3cdf03e268ebff93810b51fe", "score": "0.47282973", "text": "function serverRegister(token, callback) {\n server({ path: '/register/' + token }, function (result) {\n if (result.buffer.length === 0) {\n con.fatal('Empty response from server - verify that the token is correct and not already used.');\n } else {\n var obj = JSON.parse(result.buffer);\n obj.fingerprint = result.fingerprint;\n callback(obj);\n }\n }).end();\n}", "title": "" }, { "docid": "44a950980f75a90d63046691bbc8604d", "score": "0.4717365", "text": "function checkSecret(req, res, next) {\n if(!req.headers.secret || req.headers.secret != config.secret) {\n console.log('Unauthorized API call.');\n return res.sendStatus(401);\n }\n next();\n}", "title": "" }, { "docid": "d689a47be02eb45c8f7b8d480c9f00b9", "score": "0.47161028", "text": "function ensureSecretKey(app, environment) {\n\tconst secret = environment.get('server.cookies.secret', defaultSecret);\n\n\tif (typeof secret !== 'string') {\n\t\tthrow new TypeError('Session secret must be a String, you passed ' + typeof secret);\n\t}\n\n\tdebug('Setting Application Session Secret key `%s`', secret);\n\t\n\tapp.set('secret', secret);\n}", "title": "" }, { "docid": "fcef93d78faf947025197d139ce2e87c", "score": "0.47067946", "text": "function attachSecretMessage(marker, secretMessage) {\n var infowindow = new google.maps.InfoWindow({\n content: secretMessage\n });\n marker.addListener(\"click\", function() {\n infowindow.open(marker.get(\"map\"), marker);\n });\n }", "title": "" }, { "docid": "dc99ba7b99a9925cb76534f5f02e613e", "score": "0.47011334", "text": "function saveTokenBucket(ip, tokenBucket) {\n return new Promise((resolve, reject) => {\n redisClient.hmset(ip, tokenBucket, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n}", "title": "" }, { "docid": "b80a025fdbfb308c20fffa55adc613c9", "score": "0.46948403", "text": "recordPasswordsPageAccessInSettings() {}", "title": "" }, { "docid": "b0be1a6bb96d2a9e8f39fd8183293d45", "score": "0.46793357", "text": "function diPublicInInjector(injectorIndex, view, token) {\n bloomAdd(injectorIndex, view[TVIEW], token);\n}", "title": "" }, { "docid": "b0be1a6bb96d2a9e8f39fd8183293d45", "score": "0.46793357", "text": "function diPublicInInjector(injectorIndex, view, token) {\n bloomAdd(injectorIndex, view[TVIEW], token);\n}", "title": "" }, { "docid": "b0be1a6bb96d2a9e8f39fd8183293d45", "score": "0.46793357", "text": "function diPublicInInjector(injectorIndex, view, token) {\n bloomAdd(injectorIndex, view[TVIEW], token);\n}", "title": "" }, { "docid": "b0be1a6bb96d2a9e8f39fd8183293d45", "score": "0.46793357", "text": "function diPublicInInjector(injectorIndex, view, token) {\n bloomAdd(injectorIndex, view[TVIEW], token);\n}", "title": "" } ]
7ee52363584690ab192ce9eeeb1f288b
this function pulls events from a chart and returns as an array of objects
[ { "docid": "43606ad4abaa710882953bf191dd71f7", "score": "0.0", "text": "function generateEventDataArray(boxesPerSide, yearID){\n var timelineDataPts = []; //array of points to be plotted on the timeline\n for(var i = 0; i < boxesPerSide; i++) {\n for(var j = 0; j < boxesPerSide; j++) {\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + yearID + \"<br>\"; //label for the year in which the events took place\n for(var numType = 0; numType < 9; numType++){ //check each square for a fill\n var typeSquare = document.getElementById(\"comparetype\" + numType + \"compareyear\" + yearID);\n var triangle = document.getElementById(\"comparetricomparetype\" + numType + \"compareyear\" + yearID); //the triangle occupying the type square. could be null\n //for number of colors\n for(var numClr = 1; numClr <= numColors; numClr++){ //check which color the fill is\n if(triangle != null){\n console.log(\"triangle\");\n if(triangle.getAttribute(\"fill\") == arrayColors[numClr-1])\n {\n var country = countryNames[numClr-1];\n //9 if else statements for type of event. to avoid: would be nice to have an added attribute during makeGrid that is eventName\n if(numType == 0){\n //add data point object: year, color, text\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Beginning of war\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Beginning of war <br>\"; //using the color as a key, gets the corresponding country value from countries\n }\n else if(numType == 1){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Conquest, annexation, or union\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Conquest, annexation, or union <br>\";\n }\n else if(numType == 2){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Loss or disaster\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Loss or disaster <br>\";\n }\n else if(numType == 3){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Fall of state\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Fall of state <br>\";\n }\n else if(numType == 4){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Foundation or revolution\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Foundation or revolution <br>\";\n }\n else if(numType == 5){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Treaty or sundry\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Treaty or sundry <br>\";\n }\n else if(numType == 6){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Birth of remarkable individual\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Birth of remarkable individual <br>\";\n }\n else if(numType == 7){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Deed\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Deed <br>\";\n }\n else if(numType == 8){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Death of remarkable individual\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Death of remarkable individual <br>\";\n }\n } //end if triangle.getAttr\n } //end if triangle != null\n if(typeSquare.getAttribute(\"fill\") && (typeSquare.getAttribute(\"fill\") == arrayColors[numClr-1]))\n {\n var country = countryNames[numClr-1];\n //9 if else statements for type of event. to avoid: would be nice to have an added attribute during makeGrid that is eventName\n if(numType == 0){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Beginning of war\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Beginning of war <br>\"; //using the color as a key, gets the corresponding country value from countries\n }\n if(numType == 1){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Conquest, annexation, or union\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Conquest, annexation, or union <br>\";\n }\n if(numType == 2){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Loss or disaster\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Loss or disaster <br>\";\n }\n if(numType == 3){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Fall of state\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Fall of state <br>\";\n }\n if(numType == 4){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Foundation or revolution\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Foundation or revolution <br>\";\n }\n if(numType == 5){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Treaty or sundry\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Treaty or sundry <br>\";\n }\n if(numType == 6){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Birth of remarkable individual\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Birth of remarkable individual <br>\";\n }\n if(numType == 7){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Deed\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Deed <br>\";\n }\n if(numType == 8){\n timelineDataPts.push({year: yearID, color: arrayColors[numClr-1], text: country + \": Death of remarkable individual\"});\n //document.getElementById(\"timeline\").innerHTML = document.getElementById(\"timeline\").innerHTML + country + \": Death of remarkable individual <br>\";\n }\n } //end if typeSquare\n } //end for numClr\n } //end for numType\n yearID = yearID + 1;\n }\n }\n return timelineDataPts;\n }", "title": "" } ]
[ { "docid": "d5d97bcb6d32c33c95f394c335b49078", "score": "0.690329", "text": "function prepareDateEvents(es) {\n\n var events = [],\n sortedEvents,\n dateArray,\n chartData = [];\n \n es.forEach(function (evt) {\n\n // console.log(evt); // diag\n\n if (evt.type === 'PushEvent') {\n\n // when it's a push event, extract the commits\n evt.payload.commits.forEach(function (commit) {\n \n events.push({\n actor: evt.actor,\n avatar: evt.avatar,\n date: evt.date,\n payload: commit,\n type: \"Commit\"\n });\n\n });\n } else {\n events.push(evt);\n }\n });\n \n // sort events ascending\n sortedEvents = events.sort( (a, b) => new Date(a.date) - new Date(b.date) );\n // console.log(sortedEvents); // ok\n \n // get array of all dates in range\n dateArray = buildDateRange(sortedEvents);\n // console.log(dateArray);\n \n // build array of data points: [date, #events per date]\n chartData = dateArray.map(function (date) {\n return [\n \n // the date, as Month and Day\n date.slice(3, 10),\n \n // number of events per date\n sortedEvents.filter( (x) => formatDates(x.date) === date ).length\n ]; \n });\n \n return chartData;\n }", "title": "" }, { "docid": "deffe7bd1397b7754f7ad832c23b0b16", "score": "0.6636802", "text": "function getEvents(data) {\n let events = [];\n for(let i = 0; i < data.length; i++) {\n let timeObject = getStartTime(data[i].courseSchedule[0])\n let singleEvent = {\n id: createEventId(),\n title: data[i].courseSubject + ' ' + data[i].courseNumber +'-' + String(data[i].courseSection).padStart(3, '0'),\n daysOfWeek: timeObject.daysOfWeek,\n startTime: timeObject.startTime,\n endTime: timeObject.endTime,\n startRecur: semesterStart,\n endRecur: semesterEnd,\n allDay: false\n }\n events.push(singleEvent)\n }\n return events\n }", "title": "" }, { "docid": "bb5c072f559025b642e8066db2a4a7d5", "score": "0.6582366", "text": "function getEvents(){\n $scope.eventSource = [];\n for (var i = 0; i< $scope.events.length; i++){\n $scope.eventSource.push({title: $scope.events[i].title, startTime: new Date(momentInTimezone($scope.events[i].time_start)), endTime: new Date( momentInTimezone($scope.events[i].time_end)), key: $scope.events[i].key});\n }\n $scope.eventsLoaded = true;\n }", "title": "" }, { "docid": "ee91a6bf8c716ce68a875accf1655412", "score": "0.65756637", "text": "function getEvents() {\n return events\n}", "title": "" }, { "docid": "a72a472b101cdb6705d9f970398c0e31", "score": "0.6505005", "text": "async getEvents(gid) {\n const serializedEvents = await client.lrangeAsync(getEventsKey(gid), 0, MAX_EVENTS);\n const events = serializedEvents.map(JSON.parse);\n return events;\n }", "title": "" }, { "docid": "e7fcab0a51f26ec1ea65b0e6466ea2fe", "score": "0.64006686", "text": "function chartClickData () {\n var data = [];\n for (var i = 0; i < allProducts.length ; i++) {\n data.push(allProducts[i].timesClicked);\n }\n return data;\n}", "title": "" }, { "docid": "0dd74c83db6a8949e4100d94b1b8fd16", "score": "0.63753664", "text": "function getEvents(){\nreturn events;\n}", "title": "" }, { "docid": "0bf0a39e08f9be0739ba067bc31abb61", "score": "0.6372937", "text": "function eventarr(object){\n\t\t\t//note object is really only going to be apime\n\t\t\t//we need to isolate the events in the object\n\t\t\t// Note meeting location is a custom additional value\n\t\t\tvar pubcalarr = [];\n\t\t\tfor (var i=0; i<object[\"Calendar\"].length; i++){\n\t\t\t\t//object[\"Calendar\"][i] is an event\n\t\t\t\t//we want to isolate those events with and w/o a url\n\n\t\t\t\tif(object[\"Calendar\"][i][\"url\"] == \"\" || object[\"Calendar\"][i][\"url\"] == null){\n\n\t\t\t\t\t//no url to worry about:\n\n\t\t\t\t\tvar start = new Date(object[\"Calendar\"][i][\"timebegin\"]*1000);\n\t\t\t\t\tvar end = new Date(object[\"Calendar\"][i][\"timeend\"]*1000)\n\t\t\t\t\tvar name = object[\"Calendar\"][i][\"meetingname\"];\n\t\t\t\t\tvar loc = object[\"Calendar\"][i][\"location\"];\n\t\t\t\t\tpubcalarr.push({\n\t\t\t\t\t\ttitle: name,\n\t\t\t\t\t\tstart: start,\n\t\t\t\t\t\tend: end,\n\t\t\t\t\t\tlocation: loc,\n\t\t\t\t\t\tgname: object[\"Calendar\"][i][\"groupname\"]\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t//there is a url\n\t\t\t\t\tvar start = new Date(object[\"Calendar\"][i][\"timebegin\"]*1000);\n\t\t\t\t\tvar end = new Date(object[\"Calendar\"][i][\"timeend\"]*1000);\n\t\t\t\t\tvar url = object[\"Calendar\"][i][\"url\"];\n\t\t\t\t\tvar loc = object[\"Calendar\"][i][\"location\"];\n\t\t\t\t\tpubcalarr.push({\n\t\t\t\t\t\ttitle: name,\n\t\t\t\t\t\tstart: start,\n\t\t\t\t\t\tend: end,\n\t\t\t\t\t\tlocation: loc,\n\t\t\t\t\t\tgname: object[\"Calendar\"][i][\"groupname\"],\n\t\t\t\t\t\turl: url\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t};\n\t\t\treturn pubcalarr;\n\t\t}", "title": "" }, { "docid": "f1f1066fb13704d87ef955b5fc73ecb0", "score": "0.62693596", "text": "function getEvents() {\n console.log('getEvents');\n eventTracker.makeList().then(data => {\n let scraped = data[0].concat(data[1], data[2], data[3]);\n console.log('scraped');\n dbMethods.addEvents(scraped);\n });\n}", "title": "" }, { "docid": "d5829942ffef6db6f5f039875a4820ad", "score": "0.62377346", "text": "function getEvents() {\n\t/// \\todo add /api/events-since/{index} (and change Traffic Monitor to keep latest\n\tajax(\"/publish/EventLog\", function(r) {\n\t\tconst events = JSON.parse(r).events || [];\n\t\tfor (const event of events.slice(lastEvent+1)) {\n\t\t\tlastEvent = event.index;\n\t\t\tconst row = document.getElementById(\"event-log\").insertRow(0);\n\n\t\t\trow.insertCell(0).textContent = event.name;\n\t\t\trow.insertCell(1).textContent = event.type;\n\n\t\t\tconst cell = row.insertCell(2);\n\t\t\tif(event.isAvailable) {\n\t\t\t\tcell.textContent = \"available\";\n\t\t\t} else {\n\t\t\t\tcell.textContent = \"offline\";\n\t\t\t\trow.classList.add(\"error\");\n\t\t\t}\n\n\t\t\trow.insertCell(3).textContent = event.description;\n\t\t\trow.insertCell(4).textContent = new Date(event.time * 1000).toISOString();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3898edd5390b6735ed7ba219469610c9", "score": "0.6212171", "text": "getEventsByMonth(month) {\n\t\tvar myEvents = this.data.events;\t\t\t\t\t\t\t// De-reference everything\n\t\tvar myEventsArray = [];\t\t\t\t\t\t\t\t\t\t// Collect events in here\n\t\tfor (var i = 0; i < myEvents.length; i++)\t\t\t\t\t// Loop over events\n\t\t\tif (myEvents[i].date.substr(0,7) === month)\t\t\t\t// If its a match\n\t\t\t\tmyEventsArray.push(Object.assign({}, myEvents[i]));\t// Add it\n\t\tif (myEventsArray.length === 0)\t\t\t\t\t\t\t\t// If there weren't any\n\t\t\tconsole.error(\"No events found in month \" + month);\t\t\t// Let someone know\n\t\treturn myEventsArray;\t\t\t\t\t\t\t\t\t\t// Fini\n\t}", "title": "" }, { "docid": "23980206eb964f7a4ac7e58407bae92c", "score": "0.62041074", "text": "getEventsByDay(day) {\n\t\tvar ints = day.split('-');\t\t// Ensure the string is formatted correctly\n\t\tvar fMonth = \"0\"+ints[1];\t\t// This is just a long-ass way of padding 0s\n\t\tfMonth = fMonth.substr(fMonth.length-2);\n\t\tvar fDay = \"0\"+ints[2];\n\t\tfDay = fDay.substr(fDay.length-2);\n\t\tday = ints[0] + '-' + fMonth + '-' + fDay;\n\n\t\tvar myEvents = this.data.events;\t// This is like the same function as above, except for the padding\n\t\tvar myEventsArray = [];\n\t\tfor (var i = 0; i < myEvents.length; i++){\n\t\t\tif (myEvents[i].date === day)\t// Except for this line (no subtr)\n\t\t\t\tmyEventsArray.push(Object.assign({}, myEvents[i]));\n\t\t}\n\t\t/*if (myEventsArray.length === 0)\n\t\t\tconsole.error(\"No events found on day \" + day);*/ // Little angry..\n\t\treturn myEventsArray;\n\t}", "title": "" }, { "docid": "4a68728aca47c2b7792f7386112f5569", "score": "0.6149663", "text": "static async getEvents () {\n\t\tlet res = await this.request(\"events\");\n\t\treturn res.events;\n\t}", "title": "" }, { "docid": "dca5d3786145942242379837778f6ca4", "score": "0.6064499", "text": "function getEntries( date ) {\n var output = $.grep( eventData, function( obj ) {\n var dateData = obj.date == date\n return dateData\n })\n return output\n}", "title": "" }, { "docid": "71cb92c3c0f0e9e9fc8e33acb7687dce", "score": "0.6063799", "text": "function getEvents(casesByDate) {\n\tvar keys = Object.keys(casesByDate);\n\tvar arr = [];\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar idarr = keys[i].split(\"T\");\n\t\tvar d = {\n\t\t\t\"title\": casesByDate[keys[i]].length\n\t\t};\n\t\tarr.push(d);\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "34c50ccd41679d9ee9aba926dec9e04f", "score": "0.6056757", "text": "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red\n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "title": "" }, { "docid": "89a5b1cba57ebc3d61b84467a1da18f0", "score": "0.60399073", "text": "function dataSeries(curvedata){\n var series_data = [];\n for (var i=0; i < curvedata.length; i++) {\n series_data.push([addTime(curvedata[i][0]), curvedata[i][1]]);\n }\n return series_data;\n }", "title": "" }, { "docid": "789c539120d23a0d7217600a72075694", "score": "0.60270214", "text": "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: \"#f56954\", //red\n borderColor: \"#f56954\" //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: \"#f39c12\", //yellow\n borderColor: \"#f39c12\" //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: \"#0073b7\", //Blue\n borderColor: \"#0073b7\" //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: \"#00c0ef\", //Info (aqua)\n borderColor: \"#00c0ef\" //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: \"#00a65a\", //Success (green)\n borderColor: \"#00a65a\" //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: 'http://google.com/',\n backgroundColor: \"#3c8dbc\", //Primary (light-blue)\n borderColor: \"#3c8dbc\" //Primary (light-blue)\n }\n ];\n }", "title": "" }, { "docid": "23073e7be4621ab629368d644651d0f0", "score": "0.6002961", "text": "function getEvents(day, month, year) {\n var n = 0;\n var date_check = new Date(year, Number(month) - 1, day);\n var events = [];\n for (var i = 0; i < tiva_events.length; i++) {\n var start_date = new Date(tiva_events[i].year, Number(tiva_events[i].month) - 1, tiva_events[i].day);\n var end_date = new Date(tiva_events[i].year, Number(tiva_events[i].month) - 1, Number(tiva_events[i].day) + Number(tiva_events[i].duration) - 1);\n if ((start_date.getTime() <= date_check.getTime()) && (date_check.getTime() <= end_date.getTime())) {\n var first_day = (start_date.getTime() === date_check.getTime()) ? true : false;\n var last_day = (end_date.getTime() === date_check.getTime()) ? true : false;\n var event = {id: tiva_events[i].id, name: tiva_events[i].name, first_day: first_day, last_day: last_day, color: tiva_events[i].color};\n\n if (!first_day) {\n n = getOrderNumber(tiva_events[i].id, tiva_events[i].day, tiva_events[i].month, tiva_events[i].year);\n }\n\n events[n] = event;\n n++;\n }\n }\n\n return events;\n}", "title": "" }, { "docid": "55f75b0f406c386f1353c38b2978927a", "score": "0.59844846", "text": "async function getAllEvents() {\n const { body } = await dataFetcher({\n uri: `${BASE_URL}/events`,\n method: \"GET\",\n json: true\n });\n body.forEach(event => {\n const { _id, details, tags, createdAt } = event;\n const date = formatDate(createdAt);\n\n console.log(chalk.green(`[${date}]`), chalk.cyan(`${details}`));\n console.log(chalk.gray(`LogId: ${_id}`));\n\n if (tags.length) {\n console.log(chalk.gray(`Tags: ${tags.join()}\\n`));\n } else {\n console.log();\n }\n });\n}", "title": "" }, { "docid": "08a0cea980a0658df5e9646e6f69009c", "score": "0.595215", "text": "getEvents(value, filters) {\n let events = [];\n for (let patient in this.clinicalEvents) {\n const filtered = this.clinicalEvents[patient].filter(function (d) {\n return d.eventType === value && EventStore.attributesMatch(d.attributes, filters);\n });\n events.push({\"patient\": patient, \"events\": filtered});\n }\n return events;\n }", "title": "" }, { "docid": "1e6f2443046939441ea5ef37c6a73760", "score": "0.594024", "text": "function getEvents() {\n return $.ajax({\n type: \"GET\",\n url: '../data/events.json',\n async: false\n }).responseText;\n }", "title": "" }, { "docid": "73654d18a5ae2cf4eca583dcfb68784c", "score": "0.59398645", "text": "function weekly_filter_events(events) {\n let result = [];\n for (let index = 0; index < events.items.length; ++index) {\n const current = events.items[index];\n result.push({\n summary : current.summary,\n start : current.start.dateTime,\n end : current.end.dateTime,\n });\n }\n return result;\n}", "title": "" }, { "docid": "57c7972e0b462c74e456cd0d937f416a", "score": "0.59222305", "text": "function dataForChart(response) {\n var chartData = [];\n $.each( response.data, function( index, value ) {\n json_data = {\n date: new Date(value['ts']),\n value: value['value'].toFixed(2)\n };\n chartData.push(json_data);\n });\n return chartData;\n }", "title": "" }, { "docid": "12c7789d98657f43f56e8c778f2fdf8b", "score": "0.59215814", "text": "get_events(){\n var events = [];\n $.ajax({\n url: '/php/get_Events.php',\n type:'POST',\n async: false,\n dataType: \"json\",\n success : function(response){\n events = response;\n }.bind(this)\n });\n return events;\n }", "title": "" }, { "docid": "d78fd4999aaeb46784d2316b1634572a", "score": "0.5903721", "text": "function massageDataFromApi( results ) {\n\tfor(result in results) {\n\t\tdate.push(results[result].date);\n\t\tevent.push(results[result].events);\n\t}\n}", "title": "" }, { "docid": "e7381ddb85daffafee9f58abadce8330", "score": "0.58972526", "text": "static _fixEventsResponse (resp) {\n if (resp instanceof Array) {\n const arr = []\n for (let i = 0; i < resp.length; i++) {\n arr.push(PieceMakerApi._expandEventToObject(resp[i]))\n }\n return arr\n }\n return resp\n }", "title": "" }, { "docid": "227372f74d031cd761f552fc7e1eaee1", "score": "0.5870924", "text": "function toDataChart() {\n var movements = almacenamientoMovements.get();\n var movimientos = movements.ingresos.concat(movements.egresos);\n var form = myApp.formToJSON('#form-filter');\n var filtrados = controlador.filtrarPorPeriodo(movimientos, form.fecha, form.periodo);\n var resultados = controlador.crearArrayDatosNVD3(filtrados);\n\n return resultados;\n }", "title": "" }, { "docid": "c557ca7374672b4859ef72b2c606fdd5", "score": "0.5870901", "text": "eventsOnSelectedDay() {\n if (this.selectedDate === null) {\n return [];\n }\n return this.events.filter(el => isDateMatch(new Date(el.datetime), this.selectedDate))\n .sort((a, b) => a.datetime - b.datetime)\n }", "title": "" }, { "docid": "5625105417b2f4cd69f2d5fda63caae8", "score": "0.58683944", "text": "function getSensorValues(sensorEvents) {\n sensorValues = []\n sensorEvents.forEach((item) => {\n sensorValues.push(item.sensor_value)\n })\n return sensorValues\n }", "title": "" }, { "docid": "838a032c09867bce9c4009eda084a4d7", "score": "0.5849014", "text": "parseEvents(events) {\n return events.map(e => {\n return {\n start: moment.unix(e.timestamp),\n content: e.videoStream,\n id: e.id\n }\n })\n }", "title": "" }, { "docid": "4d76c861b14817a9d62841cfe6103575", "score": "0.5842612", "text": "function chartRenderedData () {\n var data = [];\n for (var i = 0; i < allProducts.length ; i++) {\n data.push(allProducts[i].timesrendered);\n }\n return data;\n\n}", "title": "" }, { "docid": "d58bfd5df74cd953728516dccd55658d", "score": "0.5841668", "text": "function getEvents () {\n return new Promise((res, rej) => {\n setTimeout(() => res(events), 500)\n })\n}", "title": "" }, { "docid": "5d5a03851aa213444a211bcf2974ebf4", "score": "0.58370054", "text": "function getData( callback ) {\n $.ajax({\n url: 'http://www.filmlinc.org/wp-content/themes/filmlinc/api-events.php?start=2016-09-30&end=2016-10-16',\n dataType: 'json',\n success: function( data, textStatus, jqXHR ) {\n\n rawEventData = _.sortBy( data, function( event ) {\n return event.start;\n });\n\n _.forEach( rawEventData, function( event ) {\n var endTime = moment( event.start ).add( event.running_time, 'minutes' ).format();\n event.end = endTime;\n event.endUTC = endTime;\n });\n\n groupedData = _.groupBy( rawEventData, function( event ) {\n return moment( event.start ).format( DATE_KEY_FORMAT );\n });\n\n callback();\n }\n })\n}", "title": "" }, { "docid": "b7325ca9ee75f4a15dfc660352b6470e", "score": "0.58344996", "text": "function getEventArray(thisShowDoEvents){\n if(thisShowDoEvents != null || thisShowDoEvents == true){ //if event exists in date\n var eventArray = sortEvents(thisShowDoEvents);\n console.log('Sortert LARGE -> SMALL ', eventArray);\n }\n calendar.innerHTML = renderEventsCal(eventArray); //Add events to calendar\n list.innerHTML = renderEventsList(eventArray); //Add events to list\n }", "title": "" }, { "docid": "e03561708236d02a8b998a62269a420e", "score": "0.58343816", "text": "function mhvApiGetEvents(from, to, callback) \n{\n\tvar xmlhttp = new XMLHttpRequest();\n\tvar url = mhvApiBaseUrl + \"events?from=\" + from + \"&to=\" + to;\n\n\txmlhttp.onreadystatechange = function() \n\t{\n\t\tif (xmlhttp.readyState == 4 && xmlhttp.status == 200) \n\t\t{\n\t\t\tvar myArr = JSON.parse(xmlhttp.responseText);\n\t\t\tcallback(myArr);\n\t\t}\n\t};\n\t\n\txmlhttp.open(\"GET\", url, true);\n\txmlhttp.send();\n}", "title": "" }, { "docid": "e726dad34481e6bddbeb9ae2c019a368", "score": "0.58338505", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "e726dad34481e6bddbeb9ae2c019a368", "score": "0.58338505", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "208529ec84d240490ed6a4f65f3d4dcd", "score": "0.58274996", "text": "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "title": "" }, { "docid": "208529ec84d240490ed6a4f65f3d4dcd", "score": "0.58274996", "text": "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "title": "" }, { "docid": "74ee713e764601b16ced4de2648d9e1b", "score": "0.5826305", "text": "function getDataFromEvent(event) {\n\n bpm = event.bpm;\n nominator = event.nominator;\n denominator = event.denominator;\n\n ticksPerBar = event.ticksPerBar;\n ticksPerBeat = event.ticksPerBeat;\n ticksPerSixteenth = event.ticksPerSixteenth;\n numSixteenth = event.numSixteenth;\n millisPerTick = event.millisPerTick;\n secondsPerTick = event.secondsPerTick;\n\n bar = event.bar;\n beat = event.beat;\n sixteenth = event.sixteenth;\n tick = event.tick;\n\n ticks = event.ticks;\n millis = event.millis;\n\n //console.log(bpm, event.type);\n //console.log('ticks', ticks, 'millis', millis, 'bar', bar);\n}", "title": "" }, { "docid": "35907375e6c80595ba7a6e8de4971ad8", "score": "0.58204323", "text": "function processCal(data,ical_url){\n let result = [];\n for (let k in data){\n let game;\n if (data.hasOwnProperty(k)) {\n let ev = data[k];\n if (ev.summary){\n game = processEvent(ev,ical_url);\n if (game){\n result.push(game);\n }\n }\n }\n }\n result.sort(gameSortCompare);\n return result;\n}", "title": "" }, { "docid": "9e861f3660bd105f7d572545c0ba3e15", "score": "0.58179957", "text": "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red \n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "title": "" }, { "docid": "39e9487203044754c537aa3172adce65", "score": "0.5817086", "text": "getAllEvents() {\n return this.axios.get('/events').then(({ data: events }) => events);\n }", "title": "" }, { "docid": "2d00fae4ba5be73595bf8c983a8f1aec", "score": "0.5816852", "text": "static get_events () {\n return new Promise(function(resolve, reject) {\n window.setTimeout(function () {\n resolve([\n {\n event_title: 'engineering interview test prep',\n start_date: '2016-03-10T15:00:00.000Z',\n end_date: '2016-03-10T15:30:00.000Z'\n },\n {\n event_title: 'coffee with paul',\n start_date: '2016-03-10T15:00:00.000Z',\n end_date: '2016-03-10T17:30:00.000Z'\n },\n {\n event_title: 'OOO for dentist',\n start_date: '2016-03-11T10:00:00.000Z',\n end_date: '2016-03-11T12:00:00.000Z'\n }\n ])\n }, 500)\n })\n }", "title": "" }, { "docid": "f0a178206ec74b77d518b839daaa33b9", "score": "0.58095795", "text": "async function getEvents() {\n try {\n const response = await fetch(API_URL);\n return response.json();\n } catch (err) {\n console.error(\"ERROR IN ASYNC FETCH EVENTS:\\n\", err);\n }\n }", "title": "" }, { "docid": "08dcdf1166544d560d0820aaae8f7cc4", "score": "0.5804019", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "08dcdf1166544d560d0820aaae8f7cc4", "score": "0.5804019", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "08dcdf1166544d560d0820aaae8f7cc4", "score": "0.5804019", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "08dcdf1166544d560d0820aaae8f7cc4", "score": "0.5804019", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "08dcdf1166544d560d0820aaae8f7cc4", "score": "0.5804019", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "433cc6c8dd62c1e494766eac9ab4fc8f", "score": "0.57947755", "text": "generateAggregateEventsArray() {\n return [ \n {\n aggregateType: \"Sample\",\n eventType: \"SampleEvent\"\n }\n ]\n }", "title": "" }, { "docid": "01e2145c28fa47daf98c34dc34bc8260", "score": "0.57933426", "text": "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "title": "" }, { "docid": "5220a82cdb469582c644407e1843bc77", "score": "0.5792411", "text": "function findCharts() {\n\n var charts = [];\n var chartQuery = document.querySelectorAll('[data-uib=\"media/chartjs\"]');\n\n for(var i = 0; i < chartQuery.length; i++) {\n\n var chartData = {\n chartDOMNode: null,\n chartType: null,\n chartData: null,\n id: null,\n chartRef: null\n };\n\n var elem = chartQuery[i];\n chartData.chartDOMNode = elem;\n chartData.chartType = elem.getAttribute('data-chart-type');\n chartData.chartData = elem.getAttribute('data-chart-data');\n chartData.id = elem.getAttribute('id');\n charts.push(chartData);\n }\n return charts;\n}", "title": "" }, { "docid": "81cf2a4621c5580835fa192ec7d200c6", "score": "0.57905287", "text": "function getEvents() {\n $.get(\"/api/events\", function(data) {\n console.log(\"Events\", data);\n events = data;\n initializeRows();\n });\n }", "title": "" }, { "docid": "640e0377153ec55a2e73e77c268062b8", "score": "0.5754225", "text": "function loadTimelineEvents(){\n var groups = [];\n $scope.selectByGroupData = [];\n gridService.loadTimelineEvents().then(function(response){\n \tif(response.data.length > 0){\n \t\tfor(var i=0;i<response.data.length;i++){\n\t \t\t$scope.selectByGroupData.push({\n\t \t\t\tid:i,\n\t \t\t\tlabel:response.data[i].eventname,\n\t \t\t\tgroup:response.data[i].eventgroup,\n\t \t\t});\n\n\t \t\tgroups.push({name:response.data[i].eventgroup});\n\n \t\t}\n \t\tcheckForEvents($scope.selectByGroupData);\n \t\tvar uniquegroups = uniqueItems(groups);\n \t\tfor(var b=0;b<uniquegroups.length;b++){\n \t \t\tugrps.push(uniquegroups[b].name);\n \t\t}\n \t}else {\n \t\t$scope.selectByGroupData = [];\n \t\t$scope.selectByGroupModel = [];\n \t}\n });\n\n }", "title": "" }, { "docid": "c7eb955af1190477615493236041813b", "score": "0.5748087", "text": "function getEvents() {\n\n var request = $http({\n method: \"get\",\n url: \"js/events.json\",\n params: {\n action: \"get\"\n }\n });\n\n return (request.then(handleSuccess, handleError));\n\n }", "title": "" }, { "docid": "ccd1a6ddd083c9dd19fe2dee37724d8f", "score": "0.5740623", "text": "function getLabs(data) {\n\t var jsonObject = getJSON(data);\n\n\t console.log(jsonObject);\n\n\t var dateStart = jsonObject[0].date_start;\n\t var labEvents = jsonObject[1];\n\n\t var labs = Object.keys(labEvents).filter(function (key) {\n\t return dateStart === labEvents[key].start;\n\t }).map(function (key) {\n\t return labEvents[key].name;\n\t }).sort();\n\n\t return labs;\n\t}", "title": "" }, { "docid": "0db11c5c520695f03e60572fdda3cf38", "score": "0.5736762", "text": "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scroll bar, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && (options.scrollBar || !options.autoScrolling)){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "d781f79a2e659d5fff3f16cf39f576bc", "score": "0.5726508", "text": "function loadEvents() {\n API.getEvents()\n .then((res) => {\n // console.log(res);\n // console.log(res.data);\n const eventsArray = [];\n const events = res.data;\n for (let i = 0; i < events.length; i++) {\n const eventObj = {\n id: events[i]._id,\n groupId: events[i].organization,\n start: events[i].start_date,\n end: events[i].end_date,\n title: events[i].title,\n url: events[i].event_url,\n description: events[i].description,\n extendedProps: {\n location: events[i].location,\n },\n };\n eventsArray.push(eventObj);\n }\n setEvent(eventsArray);\n })\n .catch((err) => console.log(err));\n }", "title": "" }, { "docid": "b483b07d79867eeb266fc59202ec977d", "score": "0.56982374", "text": "function getEventsPage(e) {\n var events = [];\n\n events.y = typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY;\n events.x = typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX;\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if (isTouch && isReallyTouch(e) && options.scrollBar) {\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "title": "" }, { "docid": "0bee87002b59b14661e4788f1568517d", "score": "0.56935173", "text": "function getEventsCallback(event) {\n\t\tvar jsonData = JSON.parse(event.target.responseText);\n\t\teventsInMonth=[];\n\t\t// filters only the events in the categories that have been checked\n\t\tfor (var e in jsonData.events) {\n\t\t\tif(checkedCats.includes(jsonData.events[e].category)) { \n\t\t\t\teventsInMonth.push(jsonData.events[e]);\n\t\t\t}\n\t\t\telse if(checkedCats.includes(\"uncategorized\") && jsonData.events[e].category==null) {\n\t\t\t\teventsInMonth.push(jsonData.events[e]);\n\t\t\t}\n\t\t}\n\n\t\t// displays dates and events in calendar cells\n\t\tvar eventsInMonthTemp = Array.from(eventsInMonth);\n\t\tfor(i=0 ; i<numDays ; i++) {\n\t\t\tcells[parseInt(currMonthFirstDay)+i].textContent = (i+1);\n\t\t\tvar linebreak = document.createElement(\"br\");\n\t\t\tcells[parseInt(currMonthFirstDay)+i].appendChild(linebreak);\n\t\t\tfor(var e in eventsInMonthTemp) {\n\t\t\t\tif(eventsInMonthTemp[e].day==(i+1)) {\n\t\t\t\t\tvar eventDiv = document.createElement(\"div\");\n\t\t\t\t\tvar strong = document.createElement(\"strong\");\n\t\t\t\t\tstrong.appendChild(document.createTextNode(eventsInMonthTemp[e].hr + \".\" + eventsInMonthTemp[e].min + eventsInMonthTemp[e].ampm + \": \"));\n\t\t\t\t\teventDiv.appendChild(strong);\n\t\t\t\t\teventDiv.appendChild(document.createTextNode(eventsInMonthTemp[e].eventName));\n\t\t\t\t\tcells[parseInt(currMonthFirstDay)+i].appendChild(eventDiv);\n\t\t\t\t\teventsInMonthTemp.shift;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// displays events in agenda table\n\t\tfor(var e in eventsInMonth) {\n\t\t\tvar newRow = document.createElement(\"tr\");\n\t\t\tvar newAgendaDateCell = document.createElement(\"td\");\n\t\t\tnewAgendaDateCell.append(document.createTextNode(eventsInMonth[e].day + \" \" + monthsNames[currentMonth.month]));\n\t\t\tnewAgendaDateCell.setAttribute(\"class\", \"agendadate\");\n\t\t\tvar newAgendaTimeCell = document.createElement(\"td\");\n\t\t\tnewAgendaTimeCell.append(document.createTextNode(eventsInMonth[e].hr + \".\" + eventsInMonth[e].min + eventsInMonth[e].ampm));\n\t\t\tnewAgendaTimeCell.setAttribute(\"class\", \"agendatime\");\n\t\t\tvar newAgendaEventNameCell = document.createElement(\"td\");\n\t\t\tnewAgendaEventNameCell.append(document.createTextNode(eventsInMonth[e].eventName));\n\t\t\tnewAgendaEventNameCell.setAttribute(\"class\", \"agendaeventname\");\n\t\t\tvar newAgendaCategoryCell = document.createElement(\"td\");\n\t\t\tif(eventsInMonth[e].category == null) {\n\t\t\t\tnewAgendaCategoryCell.append(document.createTextNode(\"uncategorized\"));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewAgendaCategoryCell.append(document.createTextNode(eventsInMonth[e].category));\n\t\t\t}\n\t\t\tnewAgendaCategoryCell.setAttribute(\"class\", \"agendacategory\");\n\t\t\tnewRow.appendChild(newAgendaDateCell);\n\t\t\tnewRow.appendChild(newAgendaTimeCell);\n\t\t\tnewRow.appendChild(newAgendaEventNameCell);\n\t\t\tnewRow.appendChild(newAgendaCategoryCell);\n\t\t\tagendaTable.appendChild(newRow);\n\t\t}\n\t}", "title": "" }, { "docid": "241223e648526eaf38b7df10a604a9e2", "score": "0.56922626", "text": "function getEvents(startDate, endDate, startTime, endTime, days) {\r\n Number.isInteger = Number.isInteger || function (value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n var Dates;\r\n if (days)\r\n Dates = getDates(startDate, endDate, days);\r\n else\r\n Dates = [startDate];\r\n var Events = [];\r\n var dt;\r\n\r\n for (var i = 0; i < Dates.length; i++) {\r\n dt = new Date(Dates[i].toString());\r\n dt.setHours(dt.getHours() + startTime);\r\n var event;\r\n if (!Number.isInteger(startTime))\r\n dt.setMinutes(dt.getMinutes() + 30);\r\n for (var j = 0; j < (endTime - startTime) * 2; j++) {\r\n if ($scope.key === \"avTimes\")\r\n event = '{\"Subject\": \"\", \"Categories\": [\"Free\"],\"Body\": {\"ContentType\": \"HTML\",\"Content\": \"\"},\"Start\": {\"DateTime\": \"' + new Date(dt).toISOString() + '\",\"TimeZone\": \"Pacific Standard Time\"},\"End\": {\"DateTime\": \"' + new Date(new Date(dt).setMinutes(dt.getMinutes() + 30)).toISOString() + '\",\"TimeZone\": \"Pacific Standard Time\"},\"Attendees\": []}';\r\n else \r\n event = '{\"Subject\": \"\", \"Categories\": [\"Red category\"],\"Body\": {\"ContentType\": \"HTML\",\"Content\": \"\"},\"Start\": {\"DateTime\": \"' + new Date(dt).toISOString() + '\",\"TimeZone\": \"Pacific Standard Time\"},\"End\": {\"DateTime\": \"' + new Date(new Date(dt).setMinutes(dt.getMinutes() + 30)).toISOString() + '\",\"TimeZone\": \"Pacific Standard Time\"},\"Attendees\": []}';\r\n Events.push(event);\r\n dt.setMinutes(dt.getMinutes() + 30);\r\n }\r\n\r\n }\r\n return Events;\r\n }", "title": "" }, { "docid": "efcc02bd370af433cea55e7f87efa74b", "score": "0.567675", "text": "function processEvents(eventsData) {\n return eventsData.map( event => {\n return new Event(event);\n });\n}", "title": "" }, { "docid": "def9c8210c2db647ca70135df4ad9281", "score": "0.5658973", "text": "function getEventData(eventName, v){\n var paramsPerEvent;\n\n if(!options.v2compatible){\n\n //using functions to run only the necessary bits within the object\n paramsPerEvent = {\n afterRender: function(){\n return {\n section: nullOrSection($(SECTION_ACTIVE_SEL)[0]),\n slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0])\n };\n },\n onLeave: function(){\n return {\n origin: nullOrSection(v.activeSection),\n destination: nullOrSection(v.element),\n direction: v.direction\n };\n },\n\n afterLoad: function(){\n return paramsPerEvent.onLeave();\n },\n\n afterSlideLoad: function(){\n return {\n section: nullOrSection(v.section),\n origin: nullOrSlide(v.prevSlide),\n destination: nullOrSlide(v.destiny),\n direction: v.direction\n };\n },\n\n onSlideLeave: function(){\n return paramsPerEvent.afterSlideLoad();\n }\n };\n }\n else{\n paramsPerEvent = {\n afterRender: function(){ return [container]; },\n onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; },\n afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; },\n afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; },\n onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; },\n };\n }\n\n return paramsPerEvent[eventName]();\n }", "title": "" }, { "docid": "def9c8210c2db647ca70135df4ad9281", "score": "0.5658973", "text": "function getEventData(eventName, v){\n var paramsPerEvent;\n\n if(!options.v2compatible){\n\n //using functions to run only the necessary bits within the object\n paramsPerEvent = {\n afterRender: function(){\n return {\n section: nullOrSection($(SECTION_ACTIVE_SEL)[0]),\n slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0])\n };\n },\n onLeave: function(){\n return {\n origin: nullOrSection(v.activeSection),\n destination: nullOrSection(v.element),\n direction: v.direction\n };\n },\n\n afterLoad: function(){\n return paramsPerEvent.onLeave();\n },\n\n afterSlideLoad: function(){\n return {\n section: nullOrSection(v.section),\n origin: nullOrSlide(v.prevSlide),\n destination: nullOrSlide(v.destiny),\n direction: v.direction\n };\n },\n\n onSlideLeave: function(){\n return paramsPerEvent.afterSlideLoad();\n }\n };\n }\n else{\n paramsPerEvent = {\n afterRender: function(){ return [container]; },\n onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; },\n afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; },\n afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; },\n onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; },\n };\n }\n\n return paramsPerEvent[eventName]();\n }", "title": "" }, { "docid": "41ca53fac188a96644427f8ac35a6f1e", "score": "0.5652567", "text": "get __chartEventNames() {\n return {\n /**\n * Fired when a new series is added.\n * @event chart-add-series\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n addSeries: 'chart-add-series',\n\n /**\n * Fired after a chart is exported.\n * @event chart-after-export\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n afterExport: 'chart-after-export',\n\n /**\n * Fired after a chart is printed.\n * @event chart-after-print\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n afterPrint: 'chart-after-print',\n\n /**\n * Fired before a chart is exported.\n * @event chart-before-export\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n beforeExport: 'chart-before-export',\n\n /**\n * Fired before a chart is printed.\n * @event chart-before-print\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n beforePrint: 'chart-before-print',\n\n /**\n * Fired when clicking on the plot background.\n * @event chart-click\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n click: 'chart-click',\n\n /**\n * Fired when drilldown point is clicked.\n * @event chart-drilldown\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n drilldown: 'chart-drilldown',\n\n /**\n * Fired when drilling up from a drilldown series.\n * @event chart-drillup\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n drillup: 'chart-drillup',\n\n /**\n * Fired after all the series has been drilled up if chart has multiple drilldown series.\n * @event chart-drillupall\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n drillupall: 'chart-drillupall',\n\n /**\n * Fired when the chart is finished loading.\n * @event chart-load\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n load: 'chart-load',\n\n /**\n * Fired when the chart is redraw. Can be called after a `Chart.configuration.redraw()`\n * or after an axis, series or point is modified with the `redraw` option set to `true`.\n * @event chart-redraw\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n redraw: 'chart-redraw',\n\n /**\n * Fired when an area of the chart has been selected.\n * @event chart-selection\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n selection: 'chart-selection'\n };\n }", "title": "" }, { "docid": "d3a16a9cca0955588d7ece8cbf2949a3", "score": "0.5650628", "text": "get __chartEventNames() {\n return {\n /**\n *\n * @event chart-add-series Fired when a new series is added\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n addSeries: 'chart-add-series',\n\n /**\n *\n * @event chart-after-export Fired after a chart is exported\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n afterExport: 'chart-after-export',\n\n /**\n *\n * @event chart-after-print Fired after a chart is printed\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n afterPrint: 'chart-after-print',\n\n /**\n *\n * @event chart-before-export Fired before a chart is exported\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n beforeExport: 'chart-before-export',\n\n /**\n *\n * @event chart-before-print Fired before a chart is printed\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n beforePrint: 'chart-before-print',\n\n /**\n *\n * @event chart-click Fired when clicking on the plot background\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n click: 'chart-click',\n\n /**\n *\n * @event chart-drilldown Fired when drilldown point is clicked\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n drilldown: 'chart-drilldown',\n\n /**\n *\n * @event chart-drillup Fired when drilling up from a drilldown series\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n drillup: 'chart-drillup',\n\n /**\n *\n * @event chart-drillupall Fired after all the series has been drilled up\n * if chart has multiple drilldown series\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n drillupall: 'chart-drillupall',\n\n /**\n *\n * @event chart-load Fired when the chart is finished loading\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n load: 'chart-load',\n\n /**\n *\n * @event chart-redraw Fired when the chart is redraw. Can be called after a `Chart.configuration.redraw()`\n * or after an axis, series or point is modified with the `redraw` option set to `true`\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n redraw: 'chart-redraw',\n\n /**\n *\n * @event chart-selection Fired when an area of the chart has been selected\n * @param {Object} detail.originalEvent object with details about the event sent\n * @param {Object} chart Chart object where the event was sent from\n */\n selection: 'chart-selection'\n };\n }", "title": "" }, { "docid": "cc17a705f8e4b298a9052f3c945ba133", "score": "0.564225", "text": "function generateChartData() {\n var chartData = [];\n var firstDate = new Date();\n firstDate.setDate(firstDate.getDate() - 100);\n\n for (var i = 0; i < 100; i++) {\n // we create date objects here. In your data, you can have date strings\n // and then set format of your dates using chart.dataDateFormat property,\n // however when possible, use date objects, as this will speed up chart rendering.\n var newDate = new Date(firstDate);\n newDate.setDate(newDate.getDate() + i);\n\n var visits = Math.round(Math.sin(i * 5) * i);\n var hits = Math.round(Math.random() * 80) + 500 + i * 3;\n var views = Math.round(Math.random() * 6000) + i * 4;\n\n chartData.push({\n date: newDate,\n visits: visits,\n hits: hits,\n views: views\n });\n }\n return chartData;\n }", "title": "" }, { "docid": "04a8769f7c24f9c4b9031013d01063f6", "score": "0.56420135", "text": "function getEventsPage(e){\r\n var events = new Array();\r\n\r\n events['y'] = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events['x'] = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n return events;\r\n }", "title": "" }, { "docid": "fa52e36a1ebce3656ff75b61e3a1b4b8", "score": "0.5634432", "text": "function getWeightData(orgUnitId, personId){\r\n var eventArray = [];\r\n\r\n //$.getJSON(getContextURLPath() + \"/api/events.json?orgUnit=\" + orgUnitId + \"&program=uy2gU8kT1jF&startDate=2012-01-01&endDate=\" + getDateOfToday() + \"&person=\" + personId, function(json) {\r\n // $.getJSON(\"http://localhost:8082/api/events.json?orgUnit=\" + orgUnitId + \"&program=uy2gU8kT1jF&startDate=2012-01-01&endDate=\" + getDateOfToday() + \"&person=\" + personId, function(json) {\r\n $.getJSON(getContextURLPath() + \"/api/events.json?orgUnit=DiszpKrYNg8&program=uy2gU8kT1jF&startDate=2012-01-01&endDate=\" + getDateOfToday() + \"&person=fSofnQR6lAU\", function(json) {\r\n\r\n var events = json.eventList;\r\n\r\n // Loop events\r\n for (var i = 0; i < events.length; i++) {\r\n var dataValues = events[i].dataValues;\r\n\r\n // Loop data values\r\n for (var j = 0; j < dataValues.length; j++) {\r\n\r\n // Test if the data value equals the id for weight data\r\n if (dataValues[j].dataElement == \"UXz7xuGCEhU\") {\r\n\r\n // Store date to sort events\r\n var event = new Object();\r\n event.date = events[i].eventDate;\r\n event.weight = parseInt(dataValues[j].value);\r\n event.category = events[i].programStage;\r\n eventArray.push(event);\r\n console.log(event);\r\n }\r\n }\r\n }\r\n\r\n // Sort events\r\n eventArray.sort(compareDate);\r\n var seriesData = [];\r\n console.log(\"Length of array: \" + eventArray.length);\r\n console.log(\"Contents: \" + eventArray);\r\n for (var i = 0; i < eventArray.length; i++) {\r\n seriesData[i] = [Date.UTC(parseInt(eventArray[i].date.substring(0,4)),parseInt(eventArray[i].date.substring(5,7))-1,parseInt(eventArray[i].date.substring(8,10))), eventArray[i].weight];\r\n console.log(\"inside loop\" + seriesData[i]);\r\n }\r\n\r\n\r\n makeGraph(seriesData);\r\n });\r\n\r\n}", "title": "" }, { "docid": "5cec24a7507c0404bf40ea5ec703ca9b", "score": "0.56322676", "text": "function getEventData(eventName, v){\r\n var paramsPerEvent;\r\n\r\n if(!options.v2compatible){\r\n\r\n //using functions to run only the necessary bits within the object\r\n paramsPerEvent = {\r\n afterRender: function(){\r\n return {\r\n section: nullOrSection($(SECTION_ACTIVE_SEL)[0]),\r\n slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0])\r\n };\r\n },\r\n onLeave: function(){\r\n return {\r\n origin: nullOrSection(v.activeSection),\r\n destination: nullOrSection(v.element),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n afterLoad: function(){\r\n return paramsPerEvent.onLeave();\r\n },\r\n\r\n afterSlideLoad: function(){\r\n return {\r\n section: nullOrSection(v.section),\r\n origin: nullOrSlide(v.prevSlide),\r\n destination: nullOrSlide(v.destiny),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n onSlideLeave: function(){\r\n return paramsPerEvent.afterSlideLoad();\r\n }\r\n };\r\n }\r\n else{\r\n paramsPerEvent = {\r\n afterRender: function(){ return [container]; },\r\n onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; },\r\n afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; },\r\n afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; },\r\n onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; },\r\n };\r\n }\r\n\r\n return paramsPerEvent[eventName]();\r\n }", "title": "" }, { "docid": "5cec24a7507c0404bf40ea5ec703ca9b", "score": "0.56322676", "text": "function getEventData(eventName, v){\r\n var paramsPerEvent;\r\n\r\n if(!options.v2compatible){\r\n\r\n //using functions to run only the necessary bits within the object\r\n paramsPerEvent = {\r\n afterRender: function(){\r\n return {\r\n section: nullOrSection($(SECTION_ACTIVE_SEL)[0]),\r\n slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0])\r\n };\r\n },\r\n onLeave: function(){\r\n return {\r\n origin: nullOrSection(v.activeSection),\r\n destination: nullOrSection(v.element),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n afterLoad: function(){\r\n return paramsPerEvent.onLeave();\r\n },\r\n\r\n afterSlideLoad: function(){\r\n return {\r\n section: nullOrSection(v.section),\r\n origin: nullOrSlide(v.prevSlide),\r\n destination: nullOrSlide(v.destiny),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n onSlideLeave: function(){\r\n return paramsPerEvent.afterSlideLoad();\r\n }\r\n };\r\n }\r\n else{\r\n paramsPerEvent = {\r\n afterRender: function(){ return [container]; },\r\n onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; },\r\n afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; },\r\n afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; },\r\n onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; },\r\n };\r\n }\r\n\r\n return paramsPerEvent[eventName]();\r\n }", "title": "" }, { "docid": "985a11e73af08aed56eb9571c8d17f93", "score": "0.56284165", "text": "function grabEvents(){\n\t$.get(\"https://appcues-interviews.firebaseio.com/calendar/events.json\", function(res){\n\t\tfor(var key in res){\n\t\t\tevents_map[key] = res[key];\n\t\t}\n\t}).done(function(){\n\t\tinputTimes(events_map);\n\t\tfindPosition(events_map);\n\t\trenderEvents(events_map);\n\t});\n}", "title": "" }, { "docid": "257993f398d84c0de79209c49bafd31c", "score": "0.5615895", "text": "function parseResponse(events, participant, calendarId) {\n\n\t\tvar parsedEvents = [];\n\n\t\t// check if any events were returned\n\t\tif (events && events.length > 0) {\n\n\n\t\t\t// iterate over all events of a calendar\n\t\t\tfor (i = 0; i < events.length; i++) {\n\n\t\t\t\tvar googleEvent = events[i];\n\n\t\t\t\tvar event = parseGoogleEvent(googleEvent, participant);\n\n\t\t\t\t// add to list of events\n\t\t\t\tparsedEvents.push(event);\n\n\t\t\t}\n\n\t\t}\n\t\t// print message to console otherwise\n\t\telse {\n\t\t\tconsole.log('No upcoming events found for calendar \"' + calendarId + '\".');\n\t\t}\n\n\t\treturn parsedEvents;\n\t\t\n\t}", "title": "" }, { "docid": "70a2a71f56e0100198e7dfc52a514c50", "score": "0.56129867", "text": "getAllEvents() {\r\n return Event.all;\r\n }", "title": "" }, { "docid": "816b8fbdb750db59a2b2f1057fd21bcb", "score": "0.561269", "text": "function events_callback(res) {\n var results = res[\"Results\"];\n var m_names = new Array(\"January\", \"February\", \"March\",\n \"April\", \"May\", \"June\", \"July\", \"August\", \"September\",\n \"October\", \"November\", \"December\");\n //display results\n for (var i in results) {\n var name = results[i][\"name\"];\n var category = results[i][\"category\"];\n var description = results[i][\"description\"];\n var link = results[i][\"link\"];\n var source = results[i][\"source\"];\n var time = results[i][\"time\"];\n var location = results[i][\"location\"];\n\n //Add category to set of categories\n if (categories.indexOf(category) === -1) {\n categories.push(category);\n }\n\n //Process time/date\n var tmp_date = new Date(Date.parse(time));\n var date = new Date(tmp_date.getUTCFullYear(),\n tmp_date.getUTCMonth(), tmp_date.getUTCDate(),\n tmp_date.getUTCHours(), tmp_date.getUTCMinutes(),\n tmp_date.getUTCSeconds());\n\n var curr_day = date.toString().split(\" \")[0];\n var curr_date = date.getDate();\n var curr_month = date.getMonth();\n var time_str = date.toLocaleString().split(\" \");\n time_str.splice(0, 1);\n var tmp_time = time_str[0];\n tmp_time = tmp_time.split(\":\");\n tmp_time.splice(2, 1);\n time_str[0] = tmp_time.join(\":\");\n time = curr_day + \", \" + m_names[curr_month] + \" \" +\n curr_date + \", \" + time_str.join(\" \");\n var date_tomorrow = new Date(date);\n date_tomorrow.setDate(date.getDate() + 1);\n\n event_data[i] = {\n \"name\": name,\n \"category\": category,\n \"description\": description,\n \"link\": link,\n \"source\": source,\n \"time\": time,\n \"date\": date,\n \"date_tomorrow\": date_tomorrow,\n \"location\": location\n };\n }\n color_array = coloring(categories.length).sort();\n populate_list(event_data);\n // set listeners\n set_listeners();\n\n\n //populate event display with either today's event or if not\n //today's then the closest event to today (looking forwards)\n if (!mobile) {\n populate_event_display(display_event);\n }\n}", "title": "" }, { "docid": "66ae0338490d8846bde0897b8c3f95f9", "score": "0.5606982", "text": "getAllEvents ({commit}) {\n if (process.env.NODE_ENV === 'development') {\n commit('setEvents', eventData)\n } else {\n axios.get('http://127.0.0.1:1323/api/v1/events').then(resp => {\n return resp.data\n }).then(data => {\n commit('setEvents', data)\n }).catch(error => {\n console.log('error getting data: ' + error)\n })\n }\n }", "title": "" }, { "docid": "8b89ad560bd5231cde2ff3fce75c4786", "score": "0.55852544", "text": "function getEventData(eventName,v){var paramsPerEvent;if(!options.v2compatible){//using functions to run only the necessary bits within the object\nparamsPerEvent={afterRender:function afterRender(){return{section:nullOrSection($(SECTION_ACTIVE_SEL)[0]),slide:nullOrSlide($(SLIDE_ACTIVE_SEL,$(SECTION_ACTIVE_SEL)[0])[0])};},onLeave:function onLeave(){return{origin:nullOrSection(v.activeSection),destination:nullOrSection(v.element),direction:v.direction};},afterLoad:function afterLoad(){return paramsPerEvent.onLeave();},afterSlideLoad:function afterSlideLoad(){return{section:nullOrSection(v.section),origin:nullOrSlide(v.prevSlide),destination:nullOrSlide(v.destiny),direction:v.direction};},onSlideLeave:function onSlideLeave(){return paramsPerEvent.afterSlideLoad();}};}else{paramsPerEvent={afterRender:function afterRender(){return[container];},onLeave:function onLeave(){return[v.activeSection,v.leavingSection,v.sectionIndex+1,v.direction];},afterLoad:function afterLoad(){return[v.element,v.anchorLink,v.sectionIndex+1];},afterSlideLoad:function afterSlideLoad(){return[v.destiny,v.anchorLink,v.sectionIndex+1,v.slideAnchor,v.slideIndex];},onSlideLeave:function onSlideLeave(){return[v.prevSlide,v.anchorLink,v.sectionIndex+1,v.prevSlideIndex,v.direction,v.slideIndex];}};}return paramsPerEvent[eventName]();}", "title": "" }, { "docid": "05efa2ce48aea33394a3c06742bf73db", "score": "0.5584785", "text": "function getData(req, res) {\n model({ date: `${remDash(req.query.start)}00-${remDash(req.query.end)}00`})\n .then(data => JSON.parse(data))\n .then((data) => {\n let newEv = data.events.event.map(event => ({\n title: event.title,\n url: event.url,\n start: event.start_time,\n color: 'green'\n }))\n return newEv\n })\n .then((data) => {\n // console.log(events)\n res.status(200).send(data)\n })\n .catch((err) => {\n console.log(err)\n })\n}", "title": "" }, { "docid": "14ff0924ddb2dafada76da9861222f96", "score": "0.5583069", "text": "function processHistoryData(data){\n var voteHistory2 = [];\n for (var i = 0; i < Math.min(60, data.length); i++) {\n let x = new Date(1000 * data[i].timestamp).toDateString();\n voteHistory2.push({\n x: data[i].timestamp,\n y: data[i].happiness_level});\n }\n return voteHistory2;\n}", "title": "" }, { "docid": "5ebefb365bc38815b508e80b9ffc6e1b", "score": "0.5568187", "text": "function getCharts(data, target_div) {\n var values = new Array();\n var startDate = null;\n var xAxisLabels = new Array();\n\n $.each(data, function(time, value) {\n var date = new Date(time);\n // Convert to UTC\n date = new Date(date.getTime() + (date.getTimezoneOffset() * 60000));\n if (startDate == null) {\n startDate = date;\n }\n\n xAxisLabels.push(date);\n values.push(value);\n });\n\n var data = {\n labels : getLabels(xAxisLabels),\n datasets : [\n {\n fillColor : \"rgba(151,187,205,0.5)\",\n strokeColor : \"rgba(151,187,205,1)\",\n pointColor : \"rgba(151,187,205,1)\",\n pointStrokeColor : \"#fff\",\n data : values\n }\n ]\n };\n\n var ctx = $(\"#\" + target_div).get(0).getContext(\"2d\");\n new Chart(ctx).Line(data, {});\n}", "title": "" }, { "docid": "eb42533ecdc64f070578950221bc0115", "score": "0.5563333", "text": "function chartEvent() {\n setAction('chart_data');\n }", "title": "" }, { "docid": "009902659cf05590e8fbd9e5306cc5a9", "score": "0.5561331", "text": "guildEvents(guild) {\n return this.upcomingEvents[guild] || [];\n }", "title": "" }, { "docid": "b64b7724f9f7a9517687575ee4cf6041", "score": "0.55586123", "text": "getAllEvents(objectInstance) {\n if (!objectInstance) {\n return [];\n }\n let prototype = Object.getPrototypeOf(objectInstance);\n return prototype._espDecoratorMetadata\n ? prototype._espDecoratorMetadata._events\n : [];\n }", "title": "" }, { "docid": "71927925e7197e2f4ee9f1d4a9177ba9", "score": "0.55558705", "text": "function getEventList() {\n return axios.get('/event')\n .then(res => updateEventList(res.data))\n}", "title": "" }, { "docid": "2a3e24ab07cbe15f403506e122409bcd", "score": "0.55444837", "text": "function getLabels(sensorEvents) {\n sensorDate = []\n sensorEvents.forEach((item) => {\n sensorDate.push(stringToDate(item.published_date))\n })\n return sensorDate;\n }", "title": "" }, { "docid": "2a3012722138adf89a5babd4758a2278", "score": "0.553497", "text": "async loadAllEvents(userId){\n let results\n if(this.userType == 'client'){\n results = await axios.get(`http://localhost:2011/events/client/${userId}`)\n }else{\n results = await axios.get(`http://localhost:2011/events/organiser/${userId}`)\n }\n // console.log('Clients events '+JSON.stringify(results.data))\n this.events = results.data.map(element => {\n element.id= element._id\n return new Event(element._id, element.client, element.status, element.title, element.occasion, element.date, element.startHour, element.endHour, element.numOfGuests, element.theme, element.food, element.flowers, element.musicList, element.place, element.organiser, element.assignmentRequests)\n })\n }", "title": "" }, { "docid": "67310dd6560160478be4e0305bd63acb", "score": "0.55325675", "text": "function loadDataInArray (arr, data){\n if(data.hasOwnProperty('Note')){\n alert('The API can make only 5 calls a minute, please try again in 1 minute')\n };\n\n let obj = data[\"Time Series (Daily)\"];\n Object.keys(obj).forEach( key => {\n arr.push([dateToTimestamp(key), parseFloat(obj[key]['4. close'])]) \n });\n return arr;\n}", "title": "" }, { "docid": "c53ec6ec7b046658b2f6d259892f88bd", "score": "0.55319834", "text": "function initialChartData() {\n var datetimeArray = [];\n for (var day = 0; day <= 6; day += 1) {\n var dayValue = [];\n for (var hour = 0; hour <= 23; hour += 1) {\n dayValue.push(0);\n }\n datetimeArray.push(dayValue);\n }\n return datetimeArray;\n }", "title": "" }, { "docid": "6c69f5f21988f5ff0af6fc19287310c2", "score": "0.551238", "text": "getDayEvents(url) {\n return axios.get(url);\n }", "title": "" }, { "docid": "f08abb74c42c9347745e8e7c672d1587", "score": "0.55107987", "text": "function chartDataCreator() {\n for (var i = 0; i < products.length; i++) {\n chartData.push(products[i].votes);\n chartData.push(products[i].views);\n }\n}", "title": "" }, { "docid": "7f80086687e7052ed1eed3a1c8ee73da", "score": "0.55084085", "text": "function drawCharts(event) {\r\n\tfetchLineChart(event.target.textContent).then(res => {\r\n\t\tconsole.log(res);\r\n\t\t//updating the chart with the data of the selected activity\r\n\t\tline.data.datasets[0].data = res;\r\n\t\tline.update();\r\n\t});\r\n\r\n\tfetchBarChart(event.target.textContent).then(res => {\r\n\t\tconsole.log(res);\r\n\t\t//updating the chart with the data of the selected activity\r\n\t\tbar.data.datasets[0].data = res;\r\n\t\tbar.update();\r\n\t});\r\n}", "title": "" }, { "docid": "062bb815c1eae89c9cde0f9d9c21fafb", "score": "0.5506081", "text": "function getData() {\n\t$scope.events = [];\n\treturn $http({\n\t\tmethod: 'GET',\n\t\turl: '/user_data/events',\n\t\tcache: true\n\t}).then(function(res) {\n\t\t\treturn res.data;\n\t\t}, function() {\n\t\t\tconsole.log(\"Couldn't load the events!\");\n\t\t});\n\t}", "title": "" }, { "docid": "29d3816273679042a8a82e4786d8c97c", "score": "0.5492564", "text": "getAll(){\n return this.events;\n }", "title": "" }, { "docid": "5b6acf640ca5e30fd4574fc35f30198b", "score": "0.5480356", "text": "function mydataprep(values) {\n const current_date = new Date();\n const number_year = current_date.getFullYear()-1;\n const number_month = current_date.getMonth() + 1;\n const number_day = current_date.getDate();\n const current_month = number_month.toString();\n const current_day = number_day.toString();\n\n var data = []\n _.map(values.results\n .month[current_month]\n .day[current_day],function(obj){\n var dt = obj.gatheredAt.split(\":\")\n var d = new Date(number_year+1,number_month-1,number_day,dt[0],dt[1])\n data.push({'x':d,'y':Math.round(obj.value)})\n //value.push({'y':obj.value})\n })\n //console.log(data)\n return data\n}", "title": "" }, { "docid": "1fdc574fb0623b5ff31447e1fc294ac6", "score": "0.5470951", "text": "function getEventsFromLocalStorage(){\n events = localStorage.getItem(\"events\");\n if (events){\n return JSON.parse(events);\n } else {\n return [\"\"];\n }\n}", "title": "" }, { "docid": "d831feb026cbe02009c950c3327ee41c", "score": "0.5470552", "text": "@computed\n get events(): Array<{ calendar: Calendar, event: Event }", "title": "" }, { "docid": "d831feb026cbe02009c950c3327ee41c", "score": "0.5470552", "text": "@computed\n get events(): Array<{ calendar: Calendar, event: Event }", "title": "" }, { "docid": "9c214a4b3b040a395121b39e04a8d128", "score": "0.5467143", "text": "function ajaxChartData(data_type) {\n $.ajax({url: \"/analytics/data/\" + data_type, \n async: false, \n success: function(data){\n for(i=0; i<data[\"data\"].length; i++) {\n chartData.push({\"date\": new Date(data[\"data\"][i][\"date\"]), \n \"total_dau\": data[\"data\"][i][\"total_dau\"],\n \"traders_today\": data[\"data\"][i][\"traders_today\"], \n \"accumulated_fans_today\": data[\"data\"][i][\"accumulated_fans_today\"]});\n }\n console.log(chartData);\n }\n });\n\n\n\n\n }", "title": "" }, { "docid": "6eefb8e18af1b34e00beb618fb00b5e9", "score": "0.5466245", "text": "eventCandidates(params) {\n const candidates = this.get('ajax').request('/datasets', { data: params });\n return candidates.then(doc => doc.objects.map(v => this.injectExplorerData('event', params, this.camelizeHash(v))), (reason) => {\n this.get('notify').error(`Event candidate query failed: ${reason}`);\n return { error: reason };\n });\n }", "title": "" } ]
15ff143d343e9de646c43b673d915052
end constructor of ZipAccessory Class / desactivate is used to set the status of the instance to "delete" Stop polling and get update method
[ { "docid": "f018e51990643cbb0402f1a1b3439af5", "score": "0.6758287", "text": "desactivate(){\n /* DEBUG */\n this.debug && this.log(\"[ZIPAC] > Method desactivate\", this.debugContext);\n\n this.timePolling = 0;\n this.isActivated = false;\n }", "title": "" } ]
[ { "docid": "aed377aa435ebe9edfe20fcb104becdc", "score": "0.5824554", "text": "identifyZipAccessory(){\n /* DEBUG */\n this.debug && this.log(\"[ZIPAC] > Method identifyZipAccessory\", this.debugContext);\n\n /* Logging the accessory information */\n this.log.warn(this.debugContext,\"------ Start Identify ------\");\n this.log.warn(this.debugContext,\"Name :\",this.name);\n this.log.warn(this.debugContext,\"Type :\",this.type);\n this.log.warn(this.debugContext,\"Serial :\",this.serial);\n this.log.warn(this.debugContext,\"Manufacturer :\",this.manufacturer);\n this.log.warn(this.debugContext,\"Model :\",this.model);\n this.log.warn(this.debugContext,\"State uuid :\",this.uuid);\n this.log.warn(this.debugContext,\"Device uuid :\",this.deviceUUID);\n this.log.warn(this.debugContext,\"Homebridge uuid :\",this.uuidGen);\n this.log.warn(this.debugContext,\"noStatus ? :\",this.noStatus);\n this.log.warn(this.debugContext,\"isOnSector ? :\",this.isOnSector);\n this.log.warn(this.debugContext,\"Last Value :\",this.lastValue);\n this.log.warn(this.debugContext,\"Battery Level :\",this.batteryLevel);\n this.log.warn(this.debugContext,\"Battery Limit :\",this.batteryLimit);\n this.log.warn(this.debugContext,\"Use Eve ? :\",this.useEve);\n this.log.warn(this.debugContext,\"Hidden ? :\",this.hidden);\n this.log.warn(this.debugContext,\"------ End Identify ------\");\n }", "title": "" }, { "docid": "03e1fa4b7b560eb3033230440e5752a9", "score": "0.58022213", "text": "constructor() { this.active = true; this.reset(); }", "title": "" }, { "docid": "e88f3add878410aec97361fb5e9d68ff", "score": "0.5524945", "text": "deactivate() { }", "title": "" }, { "docid": "beab2cbc1f060c266ac4367793137085", "score": "0.54906124", "text": "initAccessory() {\n return new Accessory(this.getName(), this.getUuid(), this.api.hap.Accessory.Categories.OUTLET);\n }", "title": "" }, { "docid": "c878f32a113c093ff25555925a42d323", "score": "0.54280674", "text": "delete(){\n\t\tthis._enabled = false;\n\t}", "title": "" }, { "docid": "ca0adfe0e94e42e9d9ed7c8fb95f08f0", "score": "0.54158825", "text": "constructor() {\n this.active = false;\n }", "title": "" }, { "docid": "814e9dc6f303a4d8d7ad70ac4f8af8f2", "score": "0.53977805", "text": "deactivate() {\n this.active = false;\n }", "title": "" }, { "docid": "bbcb71429f3a9d79581de3c15e371386", "score": "0.53850126", "text": "constructor(props) {\n super(props);\n this.state = {\n downloadItemList: [],\n isLoading: true,\n errors: null,\n show: false\n };\n\n this.handleActivate = this.handleActivate.bind(this);\n this.handleDeactivate = this.handleDeactivate.bind(this);\n this.handleDeleteProcess = this.handleDeleteProcess.bind(this);\n this.handleDownload = this.handleDownload.bind(this);\n this.submitDelete = this.submitDelete.bind(this);\n }", "title": "" }, { "docid": "838f7636d250fd48154d3932d8d08657", "score": "0.5378898", "text": "createAccessory(config,uuidGen){\n /* DEBUG */\n this.name = config.name;\n this.type = config.type;\n this.debug = config.debug || false;\n this.debugContext = \"[\" + this.type + \"/\" + this.name + \"]\";\n if(this.debugPlatform || this.debug){\n this.debug = true;\n this.log.warn(\"[ZIPAC] Debug mode set for\",this.debugContext);\n }\n this.debug && this.log(\"[ZIPAC] > Method createAccessory\", this.debugContext);\n /* Save parameters */\n this.uuidGen = uuidGen;\n /* New Accessory creation */\n this.platformAccessory = new Accessory(this.name,uuidGen);\n /* Add the context */\n this.fixContextFromConfig(config);\n /* Base Information */ // TODO : mode info needed ?\n this.platformAccessory.getService(Service.AccessoryInformation)\n .setCharacteristic(Characteristic.Manufacturer, this.manufacturer)\n .setCharacteristic(Characteristic.Model, this.model)\n .setCharacteristic(Characteristic.SerialNumber, this.serial);\n /* Add the service requested by user */\n this.platformAccessory.addService(this.createService(this.type,this.name));\n this.bindCharacteristic(this.type);\n // /* Check for additional sub accessories */\n // this.subaccessories = config.subaccessories || false;\n // if(!this.subaccessories){\n // this.debug && this.log(\"[ZIPAC] [createAccessory] Multiples detected. Create the children know.\", this.debugContext);\n // this.debug && this.log(\"[ZIPAC] [createAccessory] Number of accessories :\", this.subaccessories.length);\n // for (var index = 0; index < this.subaccessories.length; index++){\n // if(this.checkType(this.subaccessories[index].type)){\n // this.platformAccessory.addService(this.createService(this.subaccessories[index].type,this.subaccessories[index].name));\n // }\n // }\n // }else{\n // this.debug && this.log(\"[ZIPAC] [createAccessory] No multiples detected. This poor accessory is alone.\", this.debugContext);\n // }\n\n /* Return the created platformAccessory */\n return this.platformAccessory;\n }", "title": "" }, { "docid": "80836257a3fa960002d161f9a271c632", "score": "0.5362042", "text": "_desactivate() {\n const { destroySupplier, supplier } = this.props;\n\n destroySupplier(supplier.id);\n }", "title": "" }, { "docid": "f9351baea750eedf21f0f37293437346", "score": "0.53464705", "text": "rechargeAccessoryFromCache(accessory){\n /* DEBUG */\n this.debug = accessory.context.debug;\n /* reload instance variables from context */\n this.uuidGen = accessory.UUID;\n this.name = accessory.context.name;\n this.type = accessory.context.type;\n this.debugContext = \"[\" + this.type + \"/\" + this.name + \"]\";\n this.debug && this.log(\"[ZIPAC] > Method createAccessoryFromCache\", this.debugContext);\n this.uuid = accessory.context.uuid;\n this.uuidb = accessory.context.uuidb;\n this.testValue = accessory.context.testValue;\n this.noStatus = accessory.context.noStatus;\n this.reverseValue = accessory.context.reverseValue;\n this.nightMode = accessory.context.nightMode;\n this.deviceUUID = accessory.context.deviceUUID;\n this.manufacturer = accessory.context.manufacturer;\n this.model = accessory.context.model;\n this.serial = accessory.context.serial;\n this.min = accessory.context.min;\n this.max = accessory.context.max;\n this.range = accessory.context.range;\n this.batteryLimit = accessory.context.batteryLimit;\n this.batteryLevel = accessory.context.batteryLevel;\n this.isOnSector = accessory.context.isOnSector;\n this.timePolling = accessory.context.timePolling;\n this.useCache = accessory.context.useCache;\n this.hidden = accessory.context.hidden;\n this.backupValue = accessory.context.backupValue;\n /* save the platformAccessory */\n this.platformAccessory = accessory;\n /* If we create from cache, we need to rebind characteristics */\n this.bindCharacteristic(this.type,true);\n }", "title": "" }, { "docid": "123c35a447e5ffc939c3e1f9ac2f0e25", "score": "0.53351283", "text": "deactivate() {\n this.active = false;\n this.negativeActivation = false;\n this.currentActivatedConnecions = 0;\n }", "title": "" }, { "docid": "c4c4e382bcc54c06270d8ecd09449715", "score": "0.53233653", "text": "deallocate() {\n this.lastReturnTime = Date.now();\n this.state = PooledResourceStateEnum.IDLE;\n }", "title": "" }, { "docid": "c4c4e382bcc54c06270d8ecd09449715", "score": "0.53233653", "text": "deallocate() {\n this.lastReturnTime = Date.now();\n this.state = PooledResourceStateEnum.IDLE;\n }", "title": "" }, { "docid": "7da14d935e7c703cdab744238bd4d5f3", "score": "0.5323101", "text": "constructor(props) {\n super(props);ending: false\n this.deleteChain = this.deleteChain.bind(this);\n this.toggleDetails = this.toggleDetails.bind(this);\n this.submitForSave = this.submitForSave.bind(this);\n }", "title": "" }, { "docid": "d9067fc4daad373c4fe5410b3c538987", "score": "0.5312336", "text": "__init() {this.active = false;}", "title": "" }, { "docid": "a45989a5313b84c56e8e486c0ff968f7", "score": "0.5290304", "text": "function ConnexAccessory(that, name, zone) {\n this.log = that.log;\n this.name = name;\n this.zone = zone;\n // this.defaultTemp = that.defaultTemp;\n this.log_event_counter = 0;\n var uuid = UUIDGen.generate(name);\n\n if (!getAccessoryByName(name)) {\n this.log(\"Adding connex Device\", name, zone);\n this.accessory = new Accessory(name, uuid, 10);\n\n this.accessory.log = this.log;\n this.accessory.context.zone = zone;\n this.accessory.context.defaultTemp = that.defaultTemp;\n\n this.accessory.getService(Service.AccessoryInformation)\n .setCharacteristic(Characteristic.Manufacturer, \"connex\")\n .setCharacteristic(Characteristic.SerialNumber, hostname + \"-\" + this.name)\n .setCharacteristic(Characteristic.FirmwareRevision, require('./package.json').version);\n // Thermostat Service\n //\n\n this.accessory.addService(Service.Thermostat, this.name);\n this.accessory\n .getService(Service.Thermostat).isPrimaryService = true;\n\n /*\n Describes the current state of the device\n this.addCharacteristic(Characteristic.CurrentHeatingCoolingState);\n Characteristic.CurrentHeatingCoolingState.OFF = 0;\n Characteristic.CurrentHeatingCoolingState.HEAT = 1;\n Characteristic.CurrentHeatingCoolingState.COOL = 2;\n this.addCharacteristic(Characteristic.TargetHeatingCoolingState);\n Characteristic.TargetHeatingCoolingState.OFF = 0;\n Characteristic.TargetHeatingCoolingState.HEAT = 1;\n Characteristic.TargetHeatingCoolingState.COOL = 2;\n Characteristic.TargetHeatingCoolingState.AUTO = 3;\n this.addCharacteristic(Characteristic.CurrentTemperature);\n this.addCharacteristic(Characteristic.TargetTemperature);\n this.addCharacteristic(Characteristic.TemperatureDisplayUnits);\n Characteristic.TemperatureDisplayUnits.CELSIUS = 0;\n */\n\n this.accessory\n .getService(Service.Thermostat)\n .getCharacteristic(Characteristic.TargetHeatingCoolingState)\n .setProps({\n validValues: [0, 1, 3]\n });\n\n this.accessory\n .getService(Service.Thermostat)\n .getCharacteristic(Characteristic.TargetHeatingCoolingState)\n .on('set', setTargetHeatingCooling.bind(this.accessory));\n\n this.accessory\n .getService(Service.Thermostat)\n .getCharacteristic(Characteristic.TargetTemperature)\n .setProps({\n minStep: 0.5,\n minValue: -0,\n maxValue: 30\n })\n .on('set', setTargetTemperature.bind(this.accessory));\n\n this.accessory\n .getService(Service.Thermostat)\n .getCharacteristic(Characteristic.CurrentTemperature)\n .setProps({\n minValue: -100,\n maxValue: 100\n });\n\n this.accessory\n .getService(Service.Thermostat).getCharacteristic(Characteristic.TargetTemperature)\n .updateValue(Number(this.zone.Setpoint / 10));\n\n this.accessory\n .getService(Service.Thermostat).getCharacteristic(Characteristic.CurrentTemperature)\n .updateValue(Number(this.zone.CurrTemp / 10));\n\n if (this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.CurrentTemperature).value > this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.TargetTemperature).value) {\n this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.CurrentHeatingCoolingState)\n .updateValue(0);\n } else {\n this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.CurrentHeatingCoolingState)\n .updateValue(1);\n }\n\n if (!this.zone.Hold) {\n this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.TargetHeatingCoolingState)\n .updateValue(3);\n } else {\n if (this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.TargetTemperature).value === 0) {\n this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.TargetHeatingCoolingState)\n .updateValue(0);\n } else {\n this.accessory.getService(Service.Thermostat).getCharacteristic(Characteristic.TargetHeatingCoolingState)\n .updateValue(1);\n }\n }\n\n that.api.registerPlatformAccessories(\"homebridge-connex\", \"connex\", [this.accessory]);\n myAccessories.push(this.accessory);\n } else {\n this.log(\"Existing connex accessory\", name);\n }\n}", "title": "" }, { "docid": "7a668877d9bb30bf47d30a8bccdaf7eb", "score": "0.52383065", "text": "onDeactivate(){}", "title": "" }, { "docid": "0e8f5989f5517c6932d979144fe61467", "score": "0.5217588", "text": "get zip() { return this._zip; }", "title": "" }, { "docid": "0e8f5989f5517c6932d979144fe61467", "score": "0.5217588", "text": "get zip() { return this._zip; }", "title": "" }, { "docid": "9445611fc7e416c506ce1d9b587df1c6", "score": "0.5183709", "text": "deactivate()\n {\n this.deactivated = true;\n }", "title": "" }, { "docid": "b9aa3e181bb3bfc11f285e53d12b79cd", "score": "0.51714516", "text": "constructor () {\n\n this.Path = null;\n this.Cache = new Cache();\n this.State = \"BASE\";\n\n }", "title": "" }, { "docid": "ebe3668f6f49ff01ed7449ffe70e17ae", "score": "0.5149707", "text": "destroy(){}", "title": "" }, { "docid": "ebe3668f6f49ff01ed7449ffe70e17ae", "score": "0.5149707", "text": "destroy(){}", "title": "" }, { "docid": "ebe3668f6f49ff01ed7449ffe70e17ae", "score": "0.5149707", "text": "destroy(){}", "title": "" }, { "docid": "0b6079549c4855ea65f864c4269115b8", "score": "0.51300174", "text": "async unarchive() {\n await this.update({\"archived\": false});\n }", "title": "" }, { "docid": "35716eb32497b117f664d6e7b30c34d8", "score": "0.5114814", "text": "clearZipCodes() {\n this.zipCodeList = [];\n }", "title": "" }, { "docid": "5aaaf8dac0382e3c12d9c1fbdfa6f71d", "score": "0.51142615", "text": "destroy() {\n\t\t// Could be implemented\n\t}", "title": "" }, { "docid": "70720659b94a7b9d5d1cd051834ae718", "score": "0.510258", "text": "constructor() {\n this.reset();\n }", "title": "" }, { "docid": "70720659b94a7b9d5d1cd051834ae718", "score": "0.510258", "text": "constructor() {\n this.reset();\n }", "title": "" }, { "docid": "0918d30dc716c558c8f5421d8c0e4ec2", "score": "0.5100535", "text": "constructor() {\n this.clear();\n }", "title": "" }, { "docid": "b79b75c6c58fea60fd563f22a93c7e7b", "score": "0.50857943", "text": "constructor () {\n this.reset();\n }", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "1d16c4062bdd97dd04f5f07dacdc07b3", "score": "0.5067837", "text": "function deactivate() {}", "title": "" }, { "docid": "0a1ed2e4dcb483aad3c1083645fb2db2", "score": "0.50631094", "text": "constructor(props) {\n\n\tsuper(props)\n\n\tthis.deleteDeliveryOptionAndUpdateSubscriber = this.deleteDeliveryOptionAndUpdateSubscriber.bind(this)\n\n }", "title": "" }, { "docid": "540b199bdc52717768830a62a21057f4", "score": "0.5060457", "text": "deactivate() { \n\t\treturn this.set('_isActive', false) \n\t}", "title": "" }, { "docid": "10c757c9347541f8cf9817c3c428c850", "score": "0.50523823", "text": "constructor() {\n\t\tthis.clear();\n\t}", "title": "" }, { "docid": "10c757c9347541f8cf9817c3c428c850", "score": "0.50523823", "text": "constructor() {\n\t\tthis.clear();\n\t}", "title": "" }, { "docid": "d263d5c9d8bb7f118b56131ec68db5eb", "score": "0.5049634", "text": "destroy() {\n //TODO\n }", "title": "" }, { "docid": "1bf947495d2f27719e5fb1561785f9d2", "score": "0.50354975", "text": "function deactivate () { }", "title": "" }, { "docid": "ab2eb02b82d053175bc9a86abb50412b", "score": "0.50246406", "text": "constructor() {\n super(\"status\");\n \n this._knockout = false;\n this._dead = false;\n this._deathTime = 0;\n this._remove = false;\n }", "title": "" }, { "docid": "0b86b1b8b4a1329477b06d40d435f532", "score": "0.50204927", "text": "destroy() {\n destroyDestroyables(this);\n this.isDestroying = true;\n }", "title": "" }, { "docid": "3170d4c26238ca98a013a9c4ae7fad5b", "score": "0.497598", "text": "function ZipArchive() {\n if (CRC32TABLE.length === 0) {\n ZipArchive.initCrc32Table();\n }\n this.files = [];\n this.level = 'Normal';\n Save.isMicrosoftBrowser = !(!navigator.msSaveBlob);\n }", "title": "" }, { "docid": "0e26d1bf21b3a7fcd52af0cddf305adf", "score": "0.49698597", "text": "close() {\n if (this.locked === -1) {\n this.locked = 0;\n }\n }", "title": "" }, { "docid": "15c1832fc24eb12c64b713f3958a34f9", "score": "0.49529916", "text": "updatePolling(){\n /* DEBUG */\n this.debug && this.log(\"[ZIPAC] > Method updatePolling\", this.debugContext);\n\n /* Desactivation status */\n if(this.isActivated == false)\n return;\n\n /* Update based on type of service */\n if(this.platformAccessory.getService(Service.Switch))\n this.platformAccessory.getService(Service.Switch).getCharacteristic(Characteristic.On).getValue();\n if(this.platformAccessory.getService(Service.Lightbulb)){\n this.platformAccessory.getService(Service.Lightbulb).getCharacteristic(Characteristic.On).getValue();\n if(this.type == \"dimmer\")\n this.platformAccessory.getService(Service.Lightbulb).getCharacteristic(Characteristic.Brightness).getValue();\n }\n if(this.platformAccessory.getService(Service.Outlet)){\n this.platformAccessory.getService(Service.Outlet).getCharacteristic(Characteristic.On).getValue();\n this.platformAccessory.getService(Service.Outlet).getCharacteristic(Characteristic.OutletInUse).getValue();\n }\n if(this.platformAccessory.getService(Service.TemperatureSensor))\n this.platformAccessory.getService(Service.TemperatureSensor).getCharacteristic(Characteristic.CurrentTemperature).getValue();\n if(this.platformAccessory.getService(Service.LightSensor))\n this.platformAccessory.getService(Service.LightSensor).getCharacteristic(Characteristic.CurrentAmbientLightLevel).getValue();\n if(this.platformAccessory.getService(Service.MotionSensor)){\n this.platformAccessory.getService(Service.MotionSensor).getCharacteristic(Characteristic.MotionDetected).getValue();\n // this.platformAccessory.getService(Service.MotionSensor).getCharacteristic(Characteristic.StatusActive).getValue();\n }\n if(this.platformAccessory.getService(Service.ContactSensor))\n this.platformAccessory.getService(Service.ContactSensor).getCharacteristic(Characteristic.ContactSensorState).getValue();\n if(this.platformAccessory.getService(Service.Window)){\n this.platformAccessory.getService(Service.Window).getCharacteristic(Characteristic.CurrentPosition).getValue();\n this.platformAccessory.getService(Service.Window).getCharacteristic(Characteristic.TargetPosition).getValue();\n }\n if(this.platformAccessory.getService(Service.Door)){\n this.platformAccessory.getService(Service.Door).getCharacteristic(Characteristic.CurrentPosition).getValue();\n this.platformAccessory.getService(Service.Door).getCharacteristic(Characteristic.TargetPosition).getValue();\n }\n if(this.platformAccessory.getService(Service.WindowCovering)){\n this.platformAccessory.getService(Service.WindowCovering).getCharacteristic(Characteristic.CurrentPosition).getValue();\n this.platformAccessory.getService(Service.WindowCovering).getCharacteristic(Characteristic.TargetPosition).getValue();\n }\n if(this.platformAccessory.getService(Service.LeakSensor))\n this.platformAccessory.getService(Service.LeakSensor).getCharacteristic(Characteristic.LeakDetected).getValue();\n if(this.platformAccessory.getService(Service.CarbonMonoxideSensor))\n this.platformAccessory.getService(Service.CarbonMonoxideSensor).getCharacteristic(Characteristic.CarbonMonoxideDetected).getValue();\n if(this.platformAccessory.getService(Service.BatteryService)){\n this.platformAccessory.getService(Service.BatteryService).getCharacteristic(Characteristic.BatteryLevel).getValue();\n this.platformAccessory.getService(Service.BatteryService).getCharacteristic(Characteristic.ChargingState).getValue();\n }\n if(this.platformAccessory.getService(Service.SecuritySystem)){\n this.platformAccessory.getService(Service.SecuritySystem).getCharacteristic(Characteristic.SecuritySystemCurrentState).getValue();\n this.platformAccessory.getService(Service.SecuritySystem).getCharacteristic(Characteristic.SecuritySystemTargetState).getValue();\n this.platformAccessory.getService(Service.SecuritySystem).getCharacteristic(Characteristic.StatusFault).getValue();\n this.platformAccessory.getService(Service.SecuritySystem).getCharacteristic(Characteristic.StatusTampered).getValue();\n }\n }", "title": "" }, { "docid": "add0c95fc7717cff8e501d2238c551b4", "score": "0.4951931", "text": "function Unzipper() {\n\tif (!(this instanceof Unzipper)) {\n\t\treturn new Unzipper();\n\t}\n\n events.EventEmitter.call(this);\n\n\tconfigs.forEach(function(config) {\n\t\tvar sName = config.fileName;\n\t\tif (aCLDRMainFiles.indexOf(sName) === -1) {\n\t\t\taCLDRMainFiles.push(sName);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "203270dac94d3af1e4ee51e52b7b8bdb", "score": "0.4945197", "text": "clearState() {\n this.setProperties({\n random_name: '',\n metaData: {\n launchoption: '',\n domain: '',\n regionoption: '',\n resourceoption: '',\n unitoption: '',\n number_of_units: 1,\n storage_hddtype: '',\n selectionoption: '',\n keypairoption: '',\n keypairname: '',\n enable_publicipv4: false,\n enable_privateipv4: true,\n enable_publicipv6: false,\n enable_privateipv6: false\n }\n });\n }", "title": "" }, { "docid": "11196ec14b2650eddc050d244283742a", "score": "0.49448222", "text": "componentWillUnmount() {\n const instance = this;\n instance._clearRemoveTimer();\n instance._io && instance._io.abort();\n }", "title": "" }, { "docid": "3a426097c8d6a75ba77d8b5993d9eb3a", "score": "0.4928275", "text": "function AudioLibraryCleanSwitchAccessory(platform, api, switchService, name, version) {\n Service = api.hap.Service;\n Characteristic = api.hap.Characteristic;\n\n this.platform = platform;\n this.log = platform.log;\n this.config = platform.config;\n this.name = name;\n this.switchService = switchService;\n\n this.log(\"Adding AudioLibraryCleanSwitchAccessory\");\n\n this.informationService = new Service.AccessoryInformation();\n this.informationService\n .setCharacteristic(Characteristic.Manufacturer, \"github.com DeutscheMark\")\n .setCharacteristic(Characteristic.Model, \"Homebridge-Kodi AudioLibraryCleanSwitch\")\n .setCharacteristic(Characteristic.SerialNumber, version)\n .setCharacteristic(Characteristic.FirmwareRevision, version);\n\n this.switchService.getCharacteristic(Characteristic.On)\n .updateValue(false)\n .on('set', (on, callback) => {\n this.log(\"Setting \" + this.name + \": \" + on);\n if (on) {\n kodi.getActionResult(this.config, this.log, \"AudioLibrary.Clean\", { \"showdialogs\": true }, (error, result) => {\n if (!error && result && result != 'OK') {\n setTimeout(() => {\n this.log(\"Setting \" + this.name + \": false - Clean did not start!\");\n this.switchService.getCharacteristic(Characteristic.On).updateValue(false);\n }, 100);\n callback();\n } else {\n callback();\n }\n });\n } else {\n callback();\n }\n });\n}", "title": "" }, { "docid": "b208fe52afd4b7dc16ff8d3fc54b4f6a", "score": "0.4927817", "text": "function deactivate() { }", "title": "" }, { "docid": "b208fe52afd4b7dc16ff8d3fc54b4f6a", "score": "0.4927817", "text": "function deactivate() { }", "title": "" }, { "docid": "b208fe52afd4b7dc16ff8d3fc54b4f6a", "score": "0.4927817", "text": "function deactivate() { }", "title": "" }, { "docid": "b208fe52afd4b7dc16ff8d3fc54b4f6a", "score": "0.4927817", "text": "function deactivate() { }", "title": "" }, { "docid": "b208fe52afd4b7dc16ff8d3fc54b4f6a", "score": "0.4927817", "text": "function deactivate() { }", "title": "" }, { "docid": "b208fe52afd4b7dc16ff8d3fc54b4f6a", "score": "0.4927817", "text": "function deactivate() { }", "title": "" } ]
8c1721be14fa05e2a71f62f80bcd6ea7
Sets the background color of a cell based on its id. Used with the setHighlight() function to create a highlighted cursor effect on the grid.
[ { "docid": "7f90cdf7e7890a5de009d4313eecacae", "score": "0.62302595", "text": "function getBackgroundColor(thisCell) {\n if (thisCell.id == EMPTY) {\n var loc = getLocation(thisCell);\n if (cellGrid[loc[0]][loc[1]].visited == true)\n {\n return \"#b5d6ff\";\n }\n return \"white\";\n } else if (thisCell.id == WALL) {\n return \"#808080\";\n } else if (thisCell.id == START) {\n return \"#009000\";\n } else {\n return \"#AD000C\";\n }\n }", "title": "" } ]
[ { "docid": "b21a3572f7e7c2f00f0d38e482459b23", "score": "0.6826672", "text": "function changeCellBgcolor(obj){\r\n for(i=0;i<obj.cells.length;i++){\r\n obj.cells[i].style.backgroundColor = \"#FFE5BD\";\r\n }\r\n}", "title": "" }, { "docid": "b167a4c126b0731ba832a8e202a58ca9", "score": "0.6695543", "text": "function changeCellBackground(tdCurrent) {\n let selectedColor = COLOR_PICKER.val();\n tdCurrent.css( 'background-color', selectedColor);\n $( 'h1' ).css( 'color', selectedColor);\n}", "title": "" }, { "docid": "32e7606e8e2e6aa58312f47b667cf2a6", "score": "0.6661211", "text": "function setHighlight(thisCell) {\n thisCell.onmouseover = function () { this.style.backgroundColor = \"#D3D3D3\"; };\n thisCell.onmouseout = function () { this.style.backgroundColor = getBackgroundColor(thisCell); };\n }", "title": "" }, { "docid": "0ff921206e1aedad69314b258c25ecc7", "score": "0.6633612", "text": "function setBackground(id) {\n if (id < 300) {\n return '#C5C3C6';\n } else if (id < 500) {\n return '#C5C3C6';\n } else if (id < 600) {\n return '#C5C3C6';\n } else if (id < 700) {\n return '#C5C3C6';\n } else if (id < 800) {\n return '#C5C3C6';\n } else if (id == 800) {\n return '#FBC244';\n } else {\n return '#C5C3C6';\n };\n}", "title": "" }, { "docid": "93de6cfff01e29e1c27a565b5b876468", "score": "0.65588516", "text": "function setBackgroundColor(id, color) {\n document.getElementById(id).style.backgroundColor = color;\n}", "title": "" }, { "docid": "4e5a714172a8bb151f073f18e6b15986", "score": "0.65050423", "text": "function setCellColor(row, col, color) {\n table.rows[row].cells[col].style.background = color\n}", "title": "" }, { "docid": "947956b3cafb9d9cbb296f8c8c61796c", "score": "0.64486873", "text": "function setColor(element) {\n element.style = \"background-color: \" + element.id + \";\"\n}", "title": "" }, { "docid": "f51076918117ce97f7460f8b8a849d79", "score": "0.6418343", "text": "function changeColor(cell) {\n const color = document.getElementById(\"colorPicker\").value;\n cell.style.background = color;\n}", "title": "" }, { "docid": "b49d545b69ae2cf2aae7154be56186fe", "score": "0.6392061", "text": "function cellClick() {\n event.target.style.backgroundColor = colorPicker.value;\n}", "title": "" }, { "docid": "61408088accd502ca070f7e41a926362", "score": "0.63469607", "text": "function changeBackground(){\n if(chosenCell.style.backgroundColor != \"yellow\"){\n chosenCell.style.backgroundColor = \"yellow\";\n }\n\n}", "title": "" }, { "docid": "20974fa05ca9eddd50faf7a09cb42899", "score": "0.63339496", "text": "function changeBgColor(col) {\n bgColor = col;\n}", "title": "" }, { "docid": "309f27fd55a5ee2a217bfb5160e9879e", "score": "0.63313776", "text": "function highlight(td) {\n selectedTd = td;\n selectedTd.style.backgroundColor = color;\n}", "title": "" }, { "docid": "b2c8e8af5af6dd8dbf369a7e97e4d2c9", "score": "0.6292514", "text": "function bgChange(id, color) {\n\tif (document.getElementById(id).style.backgroundColor != \"red\") {\n\t\tdocument.getElementById(id).style.background = color;\n\t}\n}", "title": "" }, { "docid": "0f999974e22ab348a9cfc4f8b11f57b2", "score": "0.6283051", "text": "function changecolor(id)\n {\n\tdocument.getElementById(id).style.backgroundColor='white';\n }", "title": "" }, { "docid": "c77dd248b15250a25b4daeeef12ce489", "score": "0.627613", "text": "function rainbowChange(id) {\n const cell = document.getElementById(id);\n cell.style.backgroundColor = colors[Math.floor(Math.random() * Math.floor(colors.length))];\n cell.style.opacity = 1;\n}", "title": "" }, { "docid": "10a476598fc6a9edf2e36c47a4e5faad", "score": "0.62654316", "text": "function setCellColorLeft(col, row, color) {\n table.rows[row].cells[col].style.background = color\n}", "title": "" }, { "docid": "66a39fd1afdd6f4b93851933efe9a082", "score": "0.6263737", "text": "function changeColor() {\n const cell = event.target;\n if (cellColor == 'rainbow' && cell.class != 'used'){\n cell.style.setProperty('background-color', getRandomColor());\n cell.setAttribute('class', 'used');\n console.log(cellColor);\n }\n else {\n cell.style.background = 'black';\n console.log(cellColor);\n }\n}", "title": "" }, { "docid": "258a70075356b4bf56bc9c3adaeed9a7", "score": "0.62431496", "text": "function cellChange(id) {\n if (eraserChangeFlag === true) { \n eraserChange(id);\n } else if (rainbowChangeFlag === true) { \n rainbowChange(id);\n } else if (realismChangeFlag === true) { \n realChange(id)\n } else {\n const cell = document.getElementById(id); \n cell.style.backgroundColor = colors[newClick];\n cell.style.opacity = 1;\n }\n}", "title": "" }, { "docid": "a017237004d5b8341da418fc09ef074e", "score": "0.6213921", "text": "function HighlightDocsTableCell(docId, highlightColor){\r\n //unighlight table row if set\r\n if(document.getElementById(currentDocsTableRow)){\r\n\r\n //set the color to unhighlight table cell based on the type of the previous selected document in the table\r\n var color = null;\r\n\r\n //reset the color of the row that was previously selected\r\n document.getElementById(currentDocsTableRow).style.border = \"none\";\r\n document.getElementById(currentDocsTableRow).style.background = GetResourceColor(currentDocsTableRow);\r\n }\r\n\r\n //highlight the table row and add border to the new row\r\n if(document.getElementById(docId)){\r\n document.getElementById(docId).style.border = \"4px solid grey\";\r\n document.getElementById(docId).style.background = highlightColor;\r\n }\r\n\r\n //update the global that tracks the currently selected table row.\r\n currentDocsTableRow = docId;\r\n}", "title": "" }, { "docid": "c0e37599c91df2b8653a82f1b23ceb31", "score": "0.62117165", "text": "function cellColorer (){\n let colorVal = cellColor.value //sets cellColor value to the var colorVal\n cellColor.addEventListener(\"click\", function() {} ); //Adds click as an event type to cellColor\n this.setAttribute(\"style\" , `background-color:${colorVal}`) //Sets the color depending on the color picker on the website\n}", "title": "" }, { "docid": "ad8eb893f8edc9d90854d3ee064792f6", "score": "0.6185603", "text": "function fillCell() {\n\n\tlet color = document.getElementById('colorPicker'); \t//color local variable\n\n\t$('td').on('click', function () {\n\n\t\tif (event.target.style.backgroundColor) {\n\n\t\t\t$(event.target).css('background-color', '');\n\n\t\t} else {\n\n\t\t\t$(event.target).css('background-color', color.value);\n\n\t\t}\n\n\t});\n}", "title": "" }, { "docid": "0968f23f2ed1b7f642b1396e7d36a6c3", "score": "0.6181729", "text": "function assignColor() {\n selectedStyle.backgroundColor = red;\n}", "title": "" }, { "docid": "68118d4010f7b7cc4be6b4b26a30be43", "score": "0.6141671", "text": "function fillColor(cell) {\n const colour = document.getElementById(\"colorPicker\").value;\n cell.style.backgroundColor = colour;\n}", "title": "" }, { "docid": "4a0aab0f317da61a8323d5f943b67ad4", "score": "0.6139369", "text": "function select(id, colour) {\n document.getElementById(id).style.backgroundColor = colour;\n }", "title": "" }, { "docid": "d00335dc0ff4a3edb6bc9ca67dc0bbd7", "score": "0.61169565", "text": "function highlightCells(array) {\n for (var x = 0; x < array.length; x++) {\n board.rows[array[x][0]].cells[array[x][1]].style.background = textColor;\n board.rows[array[x][0]].cells[array[x][1]].style.color = primaryColor;\n board.rows[array[x][0]].cells[array[x][1]].style.borderColor = primaryColor;\n }\n}", "title": "" }, { "docid": "8f360490efc52ca64e52e7e1912e595b", "score": "0.61131364", "text": "function changeColor(cell){\n cell.style.backgroundColor = currentColor;\n cell.classList.remove(\"empty\");\n}", "title": "" }, { "docid": "9a448a122ddc435bd503c4a46dc204c5", "score": "0.6086858", "text": "function setProperties(cell) {\n\n // #6 click on a single cell, callback changeColor function\n cell.classList.add(\"noColor\");\n cell.addEventListener(\"click\", changeColor);\n \n //#10: click and hold (mouseover) from a single cell (start) to a different cell (end)\n // such that all affected/hovered-over cells from start to end change to the currently selected color.\n cell.addEventListener(\"mousedown\", e => {\n colored = true;\n });\n cell.addEventListener(\"mousemove\", e => {\n if (colored) {\n cell.style.backgroundColor = currentColor;\n cell.classList.remove(\"noColor\");\n }\n });\n cell.addEventListener(\"mouseup\", e => {\n if (colored) {\n colored = false;\n }\n });\n}", "title": "" }, { "docid": "75a8b321e0947e2a4f324c4ab6b1ca77", "score": "0.60571766", "text": "function realChange(id) {\n const cell = document.getElementById(id);\n\tlet opacity = Number(cell.style.opacity);\n\tcell.style.backgroundColor = 'black';\t\n\tcell.style.opacity = opacity + 0.2;\n}", "title": "" }, { "docid": "8f0a05a38ac19550a0df23ec5764cd72", "score": "0.60352397", "text": "function setColors(e){\n let randomNum1 = Math.floor(Math.random() * 256);\n let randomNum2 = Math.floor(Math.random() * 256);\n let randomNum3 = Math.floor(Math.random() * 256);\n // cell.classList.add('painted')\n this.style.cssText = `background-color: rgb(${randomNum1},${randomNum2},${randomNum3});`\n }", "title": "" }, { "docid": "ff8ca6bcd062f5e6230379b70652179a", "score": "0.6019554", "text": "function draw(cell) {\n \tif(cell.style.background = `rgb(255, 255, 255)`) {\n \t\t cell.style.background = `rgb(0, 0, 0)`;\n \t} \n}", "title": "" }, { "docid": "c97d6828d63433b3f675a0d260eb4aae", "score": "0.60141504", "text": "_highlightCellsByClue(clueId) {\n this.$grid.find('.highlight-cell').removeClass('highlight-cell');\n for(let i = 0; i < this.cells.length; i++)\n {\n for(let j = 0; j < this.cells[i].length; j++)\n {\n let cell = this.cells[i][j];\n if(this.activeDirection == 'across'){\n if(cell.clues.across == clueId){\n this._get$Cell(this._coordsToKey(i, j)).addClass('highlight-cell')\n }\n } else {\n if(cell.clues.down == clueId){\n this._get$Cell(this._coordsToKey(i, j)).addClass('highlight-cell')\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d1e93427da824a3c42d5162dee63583e", "score": "0.5958334", "text": "function colorCell(event) {\n\n // Select color input and change cell style\n const color = document.getElementById(\"colorPicker\").value;\n event.target.style.backgroundColor = color;\n}", "title": "" }, { "docid": "fb14e882ab254514fa0f26fc5d6df5aa", "score": "0.5954371", "text": "function setColor() {\n var cells = document.getElementsByClassName(\"box_cell\");\n var toggleColor = function() {\n this.style.backgroundColor = \"red\";\n }\n _.each(cells, function(cell) {\n cell.addEventListener(\"click\", toggleColor);\n });\n}", "title": "" }, { "docid": "63dd0ef3d60a63564782d8918320a043", "score": "0.59416807", "text": "setBackgroundColor(dataCell){\n let cells = $('.cell');\n dataCell[0].forEach(index =>{\n cells[index - 1].classList.add('mark-winner');\n });\n }", "title": "" }, { "docid": "987380ca743b34fd44bb963b809e1a41", "score": "0.59333444", "text": "function cellHovered(e){\n this.style.backgroundColor = \"yellow\";\n}", "title": "" }, { "docid": "e9b10da6ee2b8dada4d4412aad2890b0", "score": "0.5923216", "text": "updateBackgroundColor() {\n this.backgroundColor = Datas.Systems.getColor(this.isBackgroundColor ?\n this.backgroundColorID.getValue() : 1);\n }", "title": "" }, { "docid": "5390482288c32fb7d5b666c704e55b7d", "score": "0.59129906", "text": "function highlightRow(rowId, bgColor, after)\n{\n\tvar rowSelector = $(\"#\" + rowId);\n\trowSelector.css(\"background-color\", bgColor);\n\n\trowSelector.fadeTo(\"normal\", 0.5, function() { \n\t\trowSelector.fadeTo(\"fast\", 1, function() { \n\t\t\trowSelector.css(\"background-color\", '');\n\t\t});\n\t});\n}", "title": "" }, { "docid": "d5b921680fb8f02d6b1aa5f603e4999a", "score": "0.5900838", "text": "highlight () {\n for (let cell of this.cells) { // eslint-disable-line prefer-const\n cell.highlight()\n }\n if (this._headerCell) {\n this._headerCell.highlight()\n }\n }", "title": "" }, { "docid": "8efa5d6e8d19194f132d3f26ec4feac5", "score": "0.58870333", "text": "function setHighlight(ids) {\n\tvar idsArray = ids.split(\",\");\n\tfor ( var i = 0; i < idsArray.length; i++) {\n\t\tvar element = document.getElementById(idsArray[i]);\n\t\tif (element) {\n\t\t\telement.className = 'highlight';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d17bced61cb73a7b53dc14fd75055c58", "score": "0.5883298", "text": "function setCells(){ //Sets cells to be filled via backgroundColor//\nfor (i = 0; i < cells.length; i++){\n cells[i].setAttribute('onmouseover', 'colorThis(this)');\n cells[i].setAttribute('id', i.toString());\n}\nfunction clearCells(){ //TBD//\n const cellsContainer = document.getElementById('cells-container');\n while(cellsContainer.firstChild){\n cellsContainer.removeChild(cellsContainer.firstChild);\n }\n}\n}", "title": "" }, { "docid": "89ef89c28cad3f612681379bd1bb7523", "score": "0.58744496", "text": "function setSquareBackgroundColor(row, col, color) {\n\t\tdocument.getElementById('e2e_test_board_div_' + row + 'x' + col).style.background = color;\n\n\t}", "title": "" }, { "docid": "6d86b8d69e310a66386654cfd399f0a4", "score": "0.58709294", "text": "function pickCell(){\n var table = document.getElementById('drawGrid');\n if (table != null) {\n for (var i = 0; i < table.rows.length; i++) {\n for (var j = 0; j < table.rows[i].cells.length; j++)\n table.rows[i].cells[j].onclick = function() {\n tableText(this);\n };\n }\n }\n\n function tableText(tableCell) {\n \n tableCell.setAttribute(\"BGCOLOR\", colorValue);\n }\n}", "title": "" }, { "docid": "384e56a2112b81d1655cc5dc3dd25e7e", "score": "0.5868282", "text": "function resetHighlights() {\n var elements = getElementsByClassName(document, \"own_cell\");\n for (var i = 0; i < elements.length; i++) {\n if (boatStart != null && elements[i].id == \"own_cell_\"+boatStart[0]+\"_\"+boatStart[1]) {\n elements[i].style.backgroundColor = \"#FF0\" ;\n } else {\n elements[i].style.backgroundColor = \"#DDD\" ;\n }\n }\n}", "title": "" }, { "docid": "e5bee788f6e87a2e988fbd050e90e228", "score": "0.586398", "text": "function highlight(id) {\n\t$id(id).className = \"highlighted\";\n\tsetTimeout(function() {\n\t\t$id(id).className = \"\";\n\t}, 1000)\n}", "title": "" }, { "docid": "4f8dbbf9874f70580fc0832b7519f07e", "score": "0.5863671", "text": "function changeColor(e) {\n this.style.backgroundColor = changeGridColor;\n}", "title": "" }, { "docid": "ae7037e9c994c85b171470a6ed7f8026", "score": "0.5858049", "text": "function highlightBody(){\n document.getElementById(\"Body\").style.backgroundColor = \"#f2913d\";\n}", "title": "" }, { "docid": "291bd58c19d77181e9a853be19313029", "score": "0.58516335", "text": "function refresh() { \n for(var i = 0; i < size; i++)\n for(var j = 0; j < size; j++) {\n cells[i][j].css('background-color', '#' + colours[grid[i][j]]);\n }\n}", "title": "" }, { "docid": "87be4b4ac8bf7038f9fc0c346aebecf3", "score": "0.5845032", "text": "highlight () {\n for (let cell of this.cells) { // eslint-disable-line prefer-const\n cell.highlight()\n }\n if (this.titleCell) {\n this.titleCell.highlight()\n }\n }", "title": "" }, { "docid": "7f8a54704f4f3f8c47e0e127d99463c0", "score": "0.58277494", "text": "function resetColorsOgre() {\n for (var i = 0; i < HORTON.rows; i++) {\n for (var j = 0; j < HORTON.cols; j++) {\n var cell = document.getElementById(i + \"_\" + j);\n cell.style.backgroundColor = \"\";\n }\n }\n}", "title": "" }, { "docid": "e346b6cb22eeeca2c901f966dc4c61b9", "score": "0.5826482", "text": "function SetTableRowColor(tableRef, sCode, color){\r\n\t var rows = tableRef.rows;\r\n\t tableRow = document.getElementById(sCode);\r\n\tif(tableRow){\r\n \t\ttableRow.style.backgroundColor = color;\r\n }\r\n}", "title": "" }, { "docid": "5ab713531d04ffe41a0b1fb58aa87d69", "score": "0.5818783", "text": "function setBackgroundColor(len, bg) {\n for(var i = 0; i < len; i++) {\n grid[i].style.backgroundColor = bg;\n }\n}", "title": "" }, { "docid": "0555f14f686679d8604c6c473111b0bf", "score": "0.58170265", "text": "function refreshGrid() {\r\n //Cycle through rows\r\n for (var row = 0; row < 6; row++) {\r\n //Cycle through columns\r\n for (var col = 0; col < 7; col++) {\r\n if (grid[row][col] == 0) {\r\n //if no color, make it white\r\n document.getElementById(\"cell\" + row + col).style.background = \"#FFFFFF\";\r\n } else if (grid[row][col] == 1) {\r\n // if row and col = 1, turn it yellow\r\n document.getElementById(\"cell\" + row + col).style.background = \"#FFFF00\";\r\n } else if (grid[row][col] == 2) {\r\n document.getElementById(\"cell\" + row + col).style.background = \"#FF0000\";\r\n }\r\n\r\n }\r\n }\r\n}", "title": "" }, { "docid": "fbf981325a83a35e7adb0531c485c603", "score": "0.581348", "text": "function rowsColors(element, color) {\n element.style.backgroundColor = color;\n}", "title": "" }, { "docid": "3566bbba6f50b1271f26fe72adb1457c", "score": "0.5810903", "text": "function fillGrid(){\n const currentColor = $('#colorPicker').val();\n $('td').css('background-color', currentColor);\n}", "title": "" }, { "docid": "2a707c802dd2c58ffc90aff8344357a8", "score": "0.5800823", "text": "highlight(keyId){\n lightColor = DATA.lightColors[keyId],\n element = document.getElementById(`key-${keyId}`),\n originalColor = element.style.fill;\n element.setAttribute(`style`, `fill: ${lightColor};`);\n setTimeout( () => {\n element.setAttribute(`style`, `fill: ${originalColor};`);\n }, 300);\n }", "title": "" }, { "docid": "6a9bb8d9098e80dd1f38b810150ea559", "score": "0.5799395", "text": "function createNewCell(cell, id) {\n cell.setAttribute('class', \"unknown\");\n cell.setAttribute('id', id);\n cell.setAttribute('onClick', \"convertToCleared(this.id)\");\n if ((parseInt(id.substring(0, 2)) + parseInt(id.substring(id.length - 2, id.length))) % 2 == 0) {\n cell.className += \" light\";\n } else {\n cell.className += \" dark\";\n }\n}", "title": "" }, { "docid": "20728bd3b3dbe3b253083b66f644bae4", "score": "0.5798671", "text": "function refreshGrid() {\n let cellFill = document.querySelectorAll(\".cell\");\n cellFill.forEach(function(e){\n e.style.background = \"initial\";\n });\n fillCells();\n}", "title": "" }, { "docid": "9821ff9a7b332118064151d111b6e914", "score": "0.5797204", "text": "function overrideDefaultSelect(rowId, currentRowClass) {\n\t// This will override the glimpse of default even/odd class highlight\n\tif (EnumClassColors[currentRowClass])\n\t\thaasGrid.setRowTextStyle(rowId, \"background-color:\" + EnumClassColors[currentRowClass]);\n}", "title": "" }, { "docid": "422647b19b055070445de85a9142adca", "score": "0.5794612", "text": "function rowOver_color(which, what,kolor) {\n\t\t\t//alert(which);\n\t\t\tvar changed = document.getElementById(which);\n\t\t\t//alert(changed);\n\t\t\tif (which != clicked) {\n\t\t\t\t\tif (what == 1)\n\t\t\t\t\t\t\tchanged.style.backgroundColor = '#FFFFFF';\n\t\t\t\t\telse{\n\t\t\t\t\t\t\tif(which%2)\n\t\t\t\t\t\t\t\t\tchanged.style.backgroundColor = kolor;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tchanged.style.backgroundColor = kolor';\n\t\t\t\t\t}\n\t\t\t}\n\t\n\t}", "title": "" }, { "docid": "eb57e7bcc1f7c3a17389a07e7285fd62", "score": "0.57911557", "text": "function setHexColor(id, hex) {\n const ruleDiv = document.getElementById(id).closest('.rule');\n const hexIcon = document.getElementById(ruleDiv.id).querySelectorAll('.icon-hex-color');\n hexIcon[0].style.backgroundColor = '#' + hex;\n}", "title": "" }, { "docid": "4b7b55cd340f4f0cbd860c77552c30f1", "score": "0.5786945", "text": "function setCellHighlight (cell) {\r\n if (cell != cellHighlight) {\r\n\tclearCellHighlight();\r\n\tcellHighlight = cell;\r\n\tcellHighlight.classList.replace(\"brow\", Selhighlight);\r\n }\r\n}", "title": "" }, { "docid": "66b0a7e4eec64a04f3df1e066e14d18d", "score": "0.5783822", "text": "highlightCell(cell) {\n if (cell.highlight) return;\n let color = '#99ff33';\n // color = (color != null) ? color : mxConstants.DEFAULT_VALID_COLOR;\n // duration = (duration != null) ? duration : 1000;\n let opacity = 100;\n var state = this.graph.view.getState(cell);\n\n if (state != null) {\n var sw = Math.max(5, mxUtils.getValue(state.style, mxConstants.STYLE_STROKEWIDTH, 1) + 4);\n var hl = new mxCellHighlight(this.graph, color, sw, false);\n\n if (opacity != null) {\n hl.opacity = opacity;\n }\n\n hl.highlight(state);\n cell.highlight = hl;\n }\n }", "title": "" }, { "docid": "409da00be287c56dfe7df2211db0edd2", "score": "0.5767152", "text": "resetCellColor() {\n const defaultColor = \"rgb(237, 245, 225)\";\n\n if (this.cellColor === defaultColor) return;\n this.cellColor = defaultColor;\n }", "title": "" }, { "docid": "8892e7189a77394f3c29b9d306a5bb1e", "score": "0.5763451", "text": "function highlightByID(id) {\n if (recNodes[id]) {\n cy.$('#' + id).select();\n } else {\n console.log('couldn\\' highlight id: ' + id);\n }\n }", "title": "" }, { "docid": "8049ca41c337e52dc6f2fc92081a1afd", "score": "0.57579154", "text": "function colorOneDiv(){\n if(erasePressed === false && fillPressed === true){\n this.style.backgroundColor = colorChosen;\n }else if(erasePressed === true && fillPressed === true){\n this.style.backgroundColor = \"\";\n }\n if(replacePressed === true && erasePressed === false && fillPressed === false){\n var cells = document.querySelectorAll('#divGrid > div > div');\n Array.prototype.forEach.call(cells, function(cell){\n cell.style.backgroundColor = colorChosen;\n });\n }\n}", "title": "" }, { "docid": "f201dbbc89a37b2f6bb44832d47ecba2", "score": "0.5755188", "text": "function setupCellSelect(id) {\n // if any cell is selected, show it as the current cell\n if(grid.getActiveCell()!=null) {\n $(\"#\"+id).text(activeCell().name);\n }\n // set select cell button event\n $(\"#\"+id).click(function() {selectCurrentCell(id)});\n}", "title": "" }, { "docid": "d4ef029fbf61e38e87fcfbc4fe6f9c64", "score": "0.57502186", "text": "function highlight(id) {\n var myLine = chart.svg.selectAll('.line').filter(function(d) {\n return d.values[0].values.raw[0][config.id_col] === id[config.id_col];\n });\n myLine.select('path').attr('stroke-width', 4);\n\n var myPoints = chart.svg.selectAll('.point').filter(function(d) {\n return d.values.raw[0][config.id_col] === id[config.id_col];\n });\n myPoints.select('circle').attr('r', 4);\n }", "title": "" }, { "docid": "5c8d873d67897af1b3f757e05aff8cf1", "score": "0.57312536", "text": "function highlightRow(rowClicked){\n //set the highlight colour, I went with a light green\n let highlightColor = \"#d1ecb2\";\n\n //if the background of the row clicked is not already highlighted, highlight it\n if(!(rowClicked.bgColor === highlightColor)){\n rowClicked.bgColor = highlightColor;\n }\n //change the row background back to white if it is already highlighted\n else if (rowClicked.bgColor === highlightColor){\n rowClicked.bgColor=\"\";\n }\n }", "title": "" }, { "docid": "a1f6a90da12e957f1be8b036dfaebe9b", "score": "0.57261544", "text": "function highlightAcross(){\n if(Number(cell.substr(1,1))==1) { \n \n $('#11R').css('background-color','blue');\n $('#21R').css('background-color','blue');\n $('#31R').css('background-color','blue');\n \n }\n if(Number(cell.substr(1,1))==2) { \n \n $('#12R').css('background-color','blue');\n $('#22R').css('background-color','blue');\n $('#32R').css('background-color','blue');\n $('#42R').css('background-color','blue');\n $('#52R').css('background-color','blue');\n \n }\n if(Number(cell.substr(1,1))==3) { \n \n $('#13R').css('background-color','blue');\n $('#23R').css('background-color','blue');\n $('#33R').css('background-color','blue');\n $('#43R').css('background-color','blue');\n $('#53R').css('background-color','blue');\n \n }\n if(Number(cell.substr(1,1))==4) { \n \n $('#14R').css('background-color','blue');\n $('#24R').css('background-color','blue');\n $('#34R').css('background-color','blue');\n $('#44R').css('background-color','blue');\n $('#54R').css('background-color','blue');\n \n }\n if(Number(cell.substr(1,1))==5) { \n $('#35R').css('background-color','blue');\n $('#45R').css('background-color','blue');\n $('#55R').css('background-color','blue');\n \n }\n \n }", "title": "" }, { "docid": "3ff879b6d09ce4df32a3a77b338500c3", "score": "0.5724471", "text": "function highlight (field, id) {\n try {\n if (field.tagName == \"TABLE\" || field.tagName == \"TR\" || field.tagName == \"TD\") {\n if (field.className.indexOf (\"_highlight\") < 0 && (id == null || id == field.id))\n field.className = field.className + \"_highlight\";\n }\n \n if (field.hasChildNodes) {\n for (var i=0; i< field.childNodes.length; i++) {\n highlight (field.childNodes[i], id);\n }\n }\n } catch (e) {} \n}", "title": "" }, { "docid": "b78943e8d67a5213466498db044f5eb3", "score": "0.57212406", "text": "function setBackgroundColor(obj,color) {\n\tobj.css(\"background-color\", color)\n}", "title": "" }, { "docid": "1218b296069e5532d68d6bd33eb12dac", "score": "0.57201165", "text": "function setBGColorByElementId(docObj, tagID, bgColor) {\n var status = false;\n if (bgColor == \"\") {\n bgColor = \"TRANSPARENT\";\n }\n \n if (docObj.getElementById) {\n var obj2Hilite = docObj.getElementById(tagID);\n if (obj2Hilite && obj2Hilite.parentNode) {\n obj2Hilite.parentNode.style.backgroundColor = bgColor;\n status = true;\n }\n }\n return status;\n}", "title": "" }, { "docid": "74786a4849cad67e4ff55b2e2b2b0ee9", "score": "0.5715885", "text": "render() {\n return (\n <div className=\"cell\" style={{backgroundColor:this.state.color}} onClick={this.changeColor}>\n </div>\n )\n }", "title": "" }, { "docid": "170cc0857ae2284c1716eb84e9be318d", "score": "0.5709355", "text": "function setColorAndId(event) {\n if (color === \"white\") {\n changeColor(\"lightBlue\");\n } else {\n changeColor(\"white\");\n }\n\n //setId(event.target.id);\n }", "title": "" }, { "docid": "e32e48796466e0c9e1f3cb342e35e024", "score": "0.5707705", "text": "function highlight(check)\n\t{\n\t\tfor(var i = 0; i < check.length; i++)\n\t\t{\n\t\t\tdocument.getElementById(\"td\"+check[i]).style[\"color\"] = \"red\";\n\t\t\tdocument.getElementById(\"td\"+check[i]).style.backgroundColor = \"#a4a4a4\";\n\t\t}\n\t}", "title": "" }, { "docid": "5db9e80b7b8c389783e2d689cb5f6dd8", "score": "0.57075626", "text": "function setBackground(col) {\n $('body').css('background-color', col);\n}", "title": "" }, { "docid": "47684e6d5b3bedb527e150a51884f297", "score": "0.5697029", "text": "function setColorTabla(vCol,vGrid,color1,color2,e1,e2){\r\n for(var i=0;i<vGrid.getRowsNum();i++){\r\n var estado = vGrid.cells(i,vCol).getValue();\r\n if(estado==e1)\r\n vGrid.setRowTextStyle(vGrid.getRowId(i) ,'background-color:'+color1+';color:black;border-top: 1px solid white');\r\n else if(estado==e2)\r\n vGrid.setRowTextStyle(vGrid.getRowId(i) ,'background-color:'+color2+';color:black;border-top: 1px solid white');\r\n }\r\n}", "title": "" }, { "docid": "dd4360eb252f7aa5081e43840e164495", "score": "0.5683563", "text": "function setBackgroundColor(color){\n $('#bc_id_'+ins+' #bars').css(\"background-color\", color);\n }", "title": "" }, { "docid": "e2125bdaad517fe3154d1d19ef5cff47", "score": "0.5676021", "text": "function onFillAllClick() {\n // Store color of active palette button\n const fillColor = $('.active').css('background-color');\n // Replace background color of all cells with active color\n $('.grid .cell').css('background-color', fillColor);\n}", "title": "" }, { "docid": "dbf78080540cf3d816060debf4907bb7", "score": "0.5670959", "text": "function whenMouseClickOnGrid() {\n const color = $(\"#colorPicker\").val();\n $(this).css(\"background-color\", color);\n}", "title": "" }, { "docid": "0fed5bd4ab507c0cb54190d74de288eb", "score": "0.5668087", "text": "function setcellcolor(x, y, n)\n{\n\n\n//\tpost( \"setcellcolor: \", n );\n//\tpost( );\n\n\n\t\n\t\n\tcell[x][y].message( \"pict\", n );\n\t\t\t\n\n}", "title": "" }, { "docid": "93108594f772f5abacd4424f7db6491c", "score": "0.5664714", "text": "colorCell(x, y, color) {\n\t\tthis.ctx.fillStyle = color;\n\t\tconst xPos = x*(Cell.width+Cell.space) + Cell.space + this.xOffset;\n\t\tconst yPos = y*(Cell.width+Cell.space) + Cell.space;\n\t\tthis.ctx.fillRect(xPos, yPos, Cell.width, Cell.width);\n\t}", "title": "" }, { "docid": "7af9a6f02b033007c6a90707e942cf89", "score": "0.5664151", "text": "function highlightTitle(){\n document.getElementById(\"Title\").style.backgroundColor = \"#f2913d\";\n}", "title": "" }, { "docid": "e27c5547f5d69178b6a4fe9fcd13aa83", "score": "0.5660675", "text": "function setBoardBackgroundColor() {\n\t\tvar num = getRowColNum('board');\n for (var row = 0; row < num.rowsNum; row++) {\n\t\t\tfor (var col = 0; col < num.colsNum; col++) {\n\t\t\t\tsetSquareBackgroundColor(row, col, getBoardSquareColor(row, col));\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "63bbdcbff3bf27eeb39809d0b7638f34", "score": "0.565933", "text": "function respondToTheClick(evt) {\n //this function re-assign the color to match the one that was chosen and color each clicked cell\n color = types[3].value; \n evt.target.style.backgroundColor = color;\n}", "title": "" }, { "docid": "4f194bc708029f72558d5e4260af3c95", "score": "0.565394", "text": "function addClickEventToCells() {\n // Get the color\n const colorPicker = document.getElementById(\"colorPicker\");\n // Get all the cells\n const cells = document.getElementsByClassName('cell');\n const gridSize = cells.length\n for (let cellNo = 0; cellNo < gridSize; cellNo++) {\n // Listen to the click event\n cells[cellNo].addEventListener(\"click\", function (event) {\n let clickedCell = event.target;\n // Update color\n clickedCell.style.backgroundColor = colorPicker.value;\n });\n }\n}", "title": "" }, { "docid": "d1d77d96f43cfab6c0f9743c6005a345", "score": "0.56519175", "text": "function applyHighlight(...gridItems) {\n $.each(gridItems, function(index, gridItem) {\n $(gridItem).css('background-color', '#ffa');\n });\n }", "title": "" }, { "docid": "c7a4d320fb84a266ed566024382b5b30", "score": "0.56451035", "text": "function colorDown(eID)\n{\n\tdocument.getElementById(eID).style.backgroundColor = '#c9e5ed';\n}", "title": "" }, { "docid": "ba97ef5ffc795c08d6c228e734713c2b", "score": "0.5644668", "text": "function paint(boxId){\n // console.log(boxId)\n let box = document.getElementById(boxId)\n // console.log(box.style)\n // box.setAttribute(\"style\", `background-color:${color};`) \n box.style.backgroundColor =color\n}", "title": "" }, { "docid": "3e66fe91bc5313ca9dd33ab12e1ddac2", "score": "0.5638483", "text": "function paint (event){\n if (event.target.tagName == \"TD\"){\n event.target.style.backgroundColor = currentColor;\n}\n}", "title": "" }, { "docid": "c0d698587d4e4ec265ee716e3485ad13", "score": "0.5622701", "text": "static fillCell(rowId, cellId, value, cellClass = undefined, cellStyle = undefined)\n {\n let styleContent = (cellStyle == undefined) ? value : (\"<\" + cellStyle + \">\" + value + \"</\" + cellStyle + \">\");\n let content = (cellClass == undefined) ? styleContent : (\"<span class=\\\"\" + cellClass + \"\\\">\" + styleContent + \"</span>\");\n $(\"#row_\" + rowId + \" > #\" + cellId)[0].innerHTML = content;\n }", "title": "" }, { "docid": "c3955d85fff664e565ce51ffdff2b3c2", "score": "0.56191206", "text": "function changeColor(selection) {\n selection.style.backgroundColor = \"red\"\n}", "title": "" }, { "docid": "ec95531955606fa867f88a856a949cf7", "score": "0.56149745", "text": "function highlight(tag) {\n sensor_cell = document.getElementById(tag);\n sensor_cell.style.fontWeight=\"bold\";\n sensor_cell.style.fontSize=\"120%\";\n sensor_cell.style.color=\"#ffffff\";\n}", "title": "" }, { "docid": "8ef0354549192e0f40e636a5d62a92ca", "score": "0.560718", "text": "function colorPoint(grid_ident, row, col) {\n \"use strict\";\n return $(grid_ident + row + col).css('background-color', 'red');\n}", "title": "" }, { "docid": "d4b724afe97b40960cb825ca703f8597", "score": "0.56054366", "text": "function setBoardColor(color)\n{\n\tfor(var row= 0; row < 8; row++)\n\t\tfor(var col = 0; col < 8; col++)\n\t\t\tif ((row + col) % 2 == 0)\n\t\t\t\ttblChessboard.rows[row].cells[col].style.backgroundColor = color;\n}", "title": "" }, { "docid": "77f08b1b54e3e83833fc2c38f9777d1e", "score": "0.55981314", "text": "function colorUp(eID)\n{\n\tdocument.getElementById(eID).style.backgroundColor = '#b2d7e2';\n}", "title": "" }, { "docid": "1b6cedc7c9b35e4760d7be1c6a7f16a7", "score": "0.55922735", "text": "function change(that, bgcolor){\n\n \tthat.style.backgroundColor = bgcolor;\n\n \t}", "title": "" }, { "docid": "054f99190c66379d3034d0208d599b77", "score": "0.558663", "text": "function color() {\n for(var i = 0; i < board[0].children.length; i++) {\n var id = board[0].children[i].id;\n if(i % 2 === 0) {\n document.getElementById(id).style.background = c2;\n } else {\n document.getElementById(id).style.background = c1;\n }\n if(i >= 1 && (i+1) % 8 === 0) {\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n }\n }", "title": "" }, { "docid": "4eaf783a4290f1939c8ad166e88d7b84", "score": "0.5584595", "text": "function resetBoard(){\n \n for( var i=0; i < 77; ++i){\n if(document.getElementById(\"cell\"+ i).style.backgroundColor = \"black\"){\n document.getElementById(\"cell\"+ i).style.backgroundColor = \"white\";\n }\n } \n\n}", "title": "" }, { "docid": "310c11c7af2591e0690582acac614823", "score": "0.5574798", "text": "function applyColor(e) {\n let cell = e.target;\n\n switch (color) {\n case 'black':\n cell.style.background = 'black';\n break;\n case 'random':\n cell.style.background = getRandomColors();\n break;\n default:\n cell.style.background = 'hotpink';\n console.log(`Selected color = ${color}`);\n }\n setTheme(color)\n}", "title": "" } ]
2e216835a939317b45539d6ddfee2982
Stub out the debug functions.
[ { "docid": "0dc6c7b91e9392879bdca1db84f7e087", "score": "0.74535304", "text": "function ForDebug() {}", "title": "" } ]
[ { "docid": "a46970061dbcdb8ea926df4fd95213ef", "score": "0.6938535", "text": "function debug () {}", "title": "" }, { "docid": "3881f3db702c9b600d613edbbec00e1c", "score": "0.6826826", "text": "function Stub () {}", "title": "" }, { "docid": "cf74595da3072394871cca238b3b302d", "score": "0.67897946", "text": "function _instrumentDebug() {\n debugPrint = log;\n var cacheBuster = '?' + new Date().getTime().toString(36);\n require = Script.require(Script.resolvePath('./modules/_utils.js') + cacheBuster).makeDebugRequire(Script.resolvePath('.'));\n APP_HTML_URL += cacheBuster;\n overlayDebugOutput = _createOverlayDebugOutput({\n lineHeight: 12,\n font: { size: 12 },\n width: 250, height: 800 });\n // auto-disable camera move mode when debugging\n Script.scriptEnding.connect(function() {\n cameraConfig && cameraConfig.setValue('camera-move-enabled', false);\n });\n}", "title": "" }, { "docid": "3e2ebcd4e8e29628c59b42afa15f8fd1", "score": "0.66876894", "text": "function stub(){}", "title": "" }, { "docid": "3e2ebcd4e8e29628c59b42afa15f8fd1", "score": "0.66876894", "text": "function stub(){}", "title": "" }, { "docid": "fe22dbda05c311fe6822b8f99ef38e8f", "score": "0.6467061", "text": "function _Debug(t){}", "title": "" }, { "docid": "d470a5d8d89b669345c7a05b57808224", "score": "0.63590777", "text": "function off_debug() {\r\n debug_on = false;\r\n}", "title": "" }, { "docid": "3e80b6b76b436b97ded03f106408d7e9", "score": "0.63417995", "text": "function on_debug() {\r\n debug_on = true;\r\n}", "title": "" }, { "docid": "9ee28af9661ee9f70f5673db4bacfbf8", "score": "0.616929", "text": "function switchDebug () {\n Map.debug = !Map.debug;\n}", "title": "" }, { "docid": "746627f7f1add342f976ffa3fbf01cfc", "score": "0.6159941", "text": "function ff_enterDebug()\n{\n if(window.ff_config.debug) {\n return;\n }\n\n for (const log of ff_custom.debugTrace) {\n console.log(...log);\n }\n window.ff_config.debug = true;\n}", "title": "" }, { "docid": "3edf529081d5216763ee5b19a5650cdf", "score": "0.6150061", "text": "enterLibrary_debug(ctx) {\n\t}", "title": "" }, { "docid": "6ef4605f948ea956a4193f271e285292", "score": "0.6131174", "text": "function DebugInfo() {\n }", "title": "" }, { "docid": "24d089e838c731d6accd2a29587c5b39", "score": "0.61040217", "text": "function setupDebugmod() {\n\t// now create the simple console logger from debug module\n\tdebugfunc = debugmod(serviceName);\n\n\t// force it on for our service\n\tdebugmod.enable(serviceName);\n\n\t// return it\n\treturn debugfunc;\n}", "title": "" }, { "docid": "0b23e4aa52cef7400be42a4bb06f1103", "score": "0.6047515", "text": "function debug() {\n var con = global.console,\n filters = global.__debugFilter,\n isRegExpFilter = /^\\//,\n methodNames = [ 'error', 'warn', 'info', 'log', 'debug', 'trace' ];\n\n // convert the string key into a regexp\n function getRegExpFilter(pattern) {\n var parts = pattern.split('/');\n return new RegExp(parts[1], parts.length > 2 ? parts[2] : undefined);\n }\n\n function bindLogMethod(moduleName, prefix, methodName) {\n if (con) {\n var method;\n if (con[methodName]) {\n method = con[methodName];\n } else if (con.log) {\n method = con.log;\n }\n if (method) {\n if (filters && !filters.disabled) {\n var allowedMethods;\n for (var prop in filters) {\n if (filters.hasOwnProperty(prop) && prop !== '_default') {\n var matchesModule = prop === moduleName ||\n (isRegExpFilter.test(prop) && getRegExpFilter(prop).test(moduleName));\n\n if (matchesModule) {\n allowedMethods = filters[prop];\n break;\n }\n }\n }\n\n allowedMethods = allowedMethods || filters._default || [];\n if (allowedMethods.indexOf(methodName) < 0) {\n return function () {\n };\n }\n }\n\n if (typeof(method) === 'function' && method.bind) {\n return method.bind(con, prefix);\n } else {\n // native functions in older versions of IE aren't real functions, so we can't call bind() on them\n // IE doesn't have a native bind() function, and modernizr's polyfill doesn't work with IE's native functions\n // so, we need to default to what modernizr ends up doing anyways\n\n // additionally, PhantomJS (used for testing) does not currently support Function.prototype.bind\n // the issue is reported here: https://github.com/ariya/phantomjs/issues/10522\n // possible polyfill available: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fbind\n return function bind() {\n var args = Array.prototype.slice.call(arguments, 0);\n if (typeof(prefix) !== 'undefined') {\n args.unshift(prefix);\n }\n\n // work around the fact that IE doesn't add spaces between log arguments like everyone else\n if (typeof(method) !== 'function') {\n args = args.join(' ###').split('###');\n }\n\n Function.prototype.apply.apply(method, [ con, args ]);\n };\n }\n }\n }\n\n return function noop() { };\n }\n\n function debugLogger(moduleName) {\n var prefix = '',\n logger,\n i;\n if (typeof(moduleName) !== 'undefined') {\n prefix = '[' + moduleName + ']';\n }\n\n logger = bindLogMethod(moduleName, prefix, 'debug');\n logger.label = function applyLabel(label) {\n return debugLogger(moduleName + ': ' + label);\n };\n\n for (i = 0; i < methodNames.length; i++) {\n var methodName = methodNames[i];\n logger[methodName] = bindLogMethod(moduleName, prefix, methodName);\n }\n logger.debugLogger = debugLogger;\n return logger;\n }\n\n debugLogger.__debugLogger = true;\n\n return debugLogger;\n }", "title": "" }, { "docid": "d38592ded4275bb1e4da571c30e8df95", "score": "0.6044165", "text": "debug (messageParms) {\n // We can actually replace this method with a simpler one when not in debug.\n if (!IsDebug) {\n Logger.prototype.debug = () => {}\n return\n }\n\n this._print('[DEBUG]', lodash.toArray(arguments).slice())\n }", "title": "" }, { "docid": "d97009c62865218167d42976f28cdd09", "score": "0.60151756", "text": "function StubApi() {}", "title": "" }, { "docid": "dddcf6cf78be8faa9b330de8842439a8", "score": "0.6013544", "text": "function init (debug) {\n\t debug.inspectOpts = util._extend({}, exports.inspectOpts);\n\t}", "title": "" }, { "docid": "62bda6dd534fc0a24b49a1e672958aad", "score": "0.6001224", "text": "function deb(){\n\tdebugger;\n}", "title": "" }, { "docid": "cb2e85b045637e32b0a49753948b3577", "score": "0.59485465", "text": "function init (debug) {\n debug.inspectOpts = util._extend({}, exports.inspectOpts);\n}", "title": "" }, { "docid": "cb2e85b045637e32b0a49753948b3577", "score": "0.59485465", "text": "function init (debug) {\n debug.inspectOpts = util._extend({}, exports.inspectOpts);\n}", "title": "" }, { "docid": "b4ca72635070a297ae567cd3fb48a017", "score": "0.5920366", "text": "function testDebugClass()\n{\n Debug.info(\"testDebugClass() - PASS - info test call\");\n Debug.warning(\"testDebugClass() - PASS - warning test call\");\n\n Debug.assert_w(false, \"testDebugClass() - PASS - assert_w test call\"); \n\n // This will test Debug.error().\n Debug.assert(true, \"testDebugClass() - FAIL - Should not see this\");\n \n Debug.info(\"testDebugClass() - All tests PASSED\");\n \n return true;\n \n} // testDebugClass()", "title": "" }, { "docid": "5e364b681bc02f11d69b22143e783b6e", "score": "0.58842236", "text": "function runWithDebugger(myFunction) {\n debugger;\n myFunction();\n}", "title": "" }, { "docid": "57a25192c735d0073576ca232f09475e", "score": "0.5877203", "text": "function setup$2(env) {\n \tcreateDebug.debug = createDebug;\n \tcreateDebug.default = createDebug;\n \tcreateDebug.coerce = coerce;\n \tcreateDebug.disable = disable;\n \tcreateDebug.enable = enable;\n \tcreateDebug.enabled = enabled;\n \tcreateDebug.humanize = ms$2;\n \tcreateDebug.destroy = destroy;\n\n \tObject.keys(env).forEach(key => {\n \t\tcreateDebug[key] = env[key];\n \t});\n\n \t/**\n \t* The currently active debug mode names, and names to skip.\n \t*/\n\n \tcreateDebug.names = [];\n \tcreateDebug.skips = [];\n\n \t/**\n \t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n \t*\n \t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n \t*/\n \tcreateDebug.formatters = {};\n\n \t/**\n \t* Selects a color for a debug namespace\n \t* @param {String} namespace The namespace string for the for the debug instance to be colored\n \t* @return {Number|String} An ANSI color code for the given namespace\n \t* @api private\n \t*/\n \tfunction selectColor(namespace) {\n \t\tlet hash = 0;\n\n \t\tfor (let i = 0; i < namespace.length; i++) {\n \t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n \t\t\thash |= 0; // Convert to 32bit integer\n \t\t}\n\n \t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n \t}\n \tcreateDebug.selectColor = selectColor;\n\n \t/**\n \t* Create a debugger with the given `namespace`.\n \t*\n \t* @param {String} namespace\n \t* @return {Function}\n \t* @api public\n \t*/\n \tfunction createDebug(namespace) {\n \t\tlet prevTime;\n \t\tlet enableOverride = null;\n \t\tlet namespacesCache;\n \t\tlet enabledCache;\n\n \t\tfunction debug(...args) {\n \t\t\t// Disabled?\n \t\t\tif (!debug.enabled) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tconst self = debug;\n\n \t\t\t// Set `diff` timestamp\n \t\t\tconst curr = Number(new Date());\n \t\t\tconst ms = curr - (prevTime || curr);\n \t\t\tself.diff = ms;\n \t\t\tself.prev = prevTime;\n \t\t\tself.curr = curr;\n \t\t\tprevTime = curr;\n\n \t\t\targs[0] = createDebug.coerce(args[0]);\n\n \t\t\tif (typeof args[0] !== 'string') {\n \t\t\t\t// Anything else let's inspect with %O\n \t\t\t\targs.unshift('%O');\n \t\t\t}\n\n \t\t\t// Apply any `formatters` transformations\n \t\t\tlet index = 0;\n \t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n \t\t\t\t// If we encounter an escaped % then don't increase the array index\n \t\t\t\tif (match === '%%') {\n \t\t\t\t\treturn '%';\n \t\t\t\t}\n \t\t\t\tindex++;\n \t\t\t\tconst formatter = createDebug.formatters[format];\n \t\t\t\tif (typeof formatter === 'function') {\n \t\t\t\t\tconst val = args[index];\n \t\t\t\t\tmatch = formatter.call(self, val);\n\n \t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n \t\t\t\t\targs.splice(index, 1);\n \t\t\t\t\tindex--;\n \t\t\t\t}\n \t\t\t\treturn match;\n \t\t\t});\n\n \t\t\t// Apply env-specific formatting (colors, etc.)\n \t\t\tcreateDebug.formatArgs.call(self, args);\n\n \t\t\tconst logFn = self.log || createDebug.log;\n \t\t\tlogFn.apply(self, args);\n \t\t}\n\n \t\tdebug.namespace = namespace;\n \t\tdebug.useColors = createDebug.useColors();\n \t\tdebug.color = createDebug.selectColor(namespace);\n \t\tdebug.extend = extend;\n \t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n \t\tObject.defineProperty(debug, 'enabled', {\n \t\t\tenumerable: true,\n \t\t\tconfigurable: false,\n \t\t\tget: () => {\n \t\t\t\tif (enableOverride !== null) {\n \t\t\t\t\treturn enableOverride;\n \t\t\t\t}\n \t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n \t\t\t\t\tnamespacesCache = createDebug.namespaces;\n \t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n \t\t\t\t}\n\n \t\t\t\treturn enabledCache;\n \t\t\t},\n \t\t\tset: v => {\n \t\t\t\tenableOverride = v;\n \t\t\t}\n \t\t});\n\n \t\t// Env-specific initialization logic for debug instances\n \t\tif (typeof createDebug.init === 'function') {\n \t\t\tcreateDebug.init(debug);\n \t\t}\n\n \t\treturn debug;\n \t}\n\n \tfunction extend(namespace, delimiter) {\n \t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n \t\tnewDebug.log = this.log;\n \t\treturn newDebug;\n \t}\n\n \t/**\n \t* Enables a debug mode by namespaces. This can include modes\n \t* separated by a colon and wildcards.\n \t*\n \t* @param {String} namespaces\n \t* @api public\n \t*/\n \tfunction enable(namespaces) {\n \t\tcreateDebug.save(namespaces);\n \t\tcreateDebug.namespaces = namespaces;\n\n \t\tcreateDebug.names = [];\n \t\tcreateDebug.skips = [];\n\n \t\tlet i;\n \t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n \t\tconst len = split.length;\n\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tif (!split[i]) {\n \t\t\t\t// ignore empty strings\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n \t\t\tif (namespaces[0] === '-') {\n \t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n \t\t\t} else {\n \t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n \t\t\t}\n \t\t}\n \t}\n\n \t/**\n \t* Disable debug output.\n \t*\n \t* @return {String} namespaces\n \t* @api public\n \t*/\n \tfunction disable() {\n \t\tconst namespaces = [\n \t\t\t...createDebug.names.map(toNamespace),\n \t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n \t\t].join(',');\n \t\tcreateDebug.enable('');\n \t\treturn namespaces;\n \t}\n\n \t/**\n \t* Returns true if the given mode name is enabled, false otherwise.\n \t*\n \t* @param {String} name\n \t* @return {Boolean}\n \t* @api public\n \t*/\n \tfunction enabled(name) {\n \t\tif (name[name.length - 1] === '*') {\n \t\t\treturn true;\n \t\t}\n\n \t\tlet i;\n \t\tlet len;\n\n \t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n \t\t\tif (createDebug.skips[i].test(name)) {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t}\n\n \t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n \t\t\tif (createDebug.names[i].test(name)) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n \t}\n\n \t/**\n \t* Convert regexp to namespace\n \t*\n \t* @param {RegExp} regxep\n \t* @return {String} namespace\n \t* @api private\n \t*/\n \tfunction toNamespace(regexp) {\n \t\treturn regexp.toString()\n \t\t\t.substring(2, regexp.toString().length - 2)\n \t\t\t.replace(/\\.\\*\\?$/, '*');\n \t}\n\n \t/**\n \t* Coerce `val`.\n \t*\n \t* @param {Mixed} val\n \t* @return {Mixed}\n \t* @api private\n \t*/\n \tfunction coerce(val) {\n \t\tif (val instanceof Error) {\n \t\t\treturn val.stack || val.message;\n \t\t}\n \t\treturn val;\n \t}\n\n \t/**\n \t* XXX DO NOT USE. This is a temporary stub function.\n \t* XXX It WILL be removed in the next major release.\n \t*/\n \tfunction destroy() {\n \t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n \t}\n\n \tcreateDebug.enable(createDebug.load());\n\n \treturn createDebug;\n }", "title": "" }, { "docid": "065a1a85eeaba9b1e16adf4761f44d3d", "score": "0.58672434", "text": "function setup(env) {\n createDebug.debug = createDebug;\n createDebug[\"default\"] = createDebug;\n createDebug.coerce = coerce;\n createDebug.disable = disable;\n createDebug.enable = enable;\n createDebug.enabled = enabled;\n createDebug.humanize = __webpack_require__(/*! ms */ \"./node_modules/ms/index.js\");\n createDebug.destroy = destroy;\n Object.keys(env).forEach(function (key) {\n createDebug[key] = env[key];\n });\n /**\n * The currently active debug mode names, and names to skip.\n */\n\n createDebug.names = [];\n createDebug.skips = [];\n /**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\n createDebug.formatters = {};\n /**\n * Selects a color for a debug namespace\n * @param {String} namespace The namespace string for the for the debug instance to be colored\n * @return {Number|String} An ANSI color code for the given namespace\n * @api private\n */\n\n function selectColor(namespace) {\n var hash = 0;\n\n for (var i = 0; i < namespace.length; i++) {\n hash = (hash << 5) - hash + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n }\n\n createDebug.selectColor = selectColor;\n /**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\n function createDebug(namespace) {\n var prevTime;\n var enableOverride = null;\n\n function debug() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Disabled?\n if (!debug.enabled) {\n return;\n }\n\n var self = debug; // Set `diff` timestamp\n\n var curr = Number(new Date());\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n args[0] = createDebug.coerce(args[0]);\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O');\n } // Apply any `formatters` transformations\n\n\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {\n // If we encounter an escaped % then don't increase the array index\n if (match === '%%') {\n return '%';\n }\n\n index++;\n var formatter = createDebug.formatters[format];\n\n if (typeof formatter === 'function') {\n var val = args[index];\n match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`\n\n args.splice(index, 1);\n index--;\n }\n\n return match;\n }); // Apply env-specific formatting (colors, etc.)\n\n createDebug.formatArgs.call(self, args);\n var logFn = self.log || createDebug.log;\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.useColors = createDebug.useColors();\n debug.color = createDebug.selectColor(namespace);\n debug.extend = extend;\n debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n Object.defineProperty(debug, 'enabled', {\n enumerable: true,\n configurable: false,\n get: function get() {\n return enableOverride === null ? createDebug.enabled(namespace) : enableOverride;\n },\n set: function set(v) {\n enableOverride = v;\n }\n }); // Env-specific initialization logic for debug instances\n\n if (typeof createDebug.init === 'function') {\n createDebug.init(debug);\n }\n\n return debug;\n }\n\n function extend(namespace, delimiter) {\n var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n newDebug.log = this.log;\n return newDebug;\n }\n /**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\n\n function enable(namespaces) {\n createDebug.save(namespaces);\n createDebug.names = [];\n createDebug.skips = [];\n var i;\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (i = 0; i < len; i++) {\n if (!split[i]) {\n // ignore empty strings\n continue;\n }\n\n namespaces = split[i].replace(/\\*/g, '.*?');\n\n if (namespaces[0] === '-') {\n createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n createDebug.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n }\n /**\n * Disable debug output.\n *\n * @return {String} namespaces\n * @api public\n */\n\n\n function disable() {\n var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {\n return '-' + namespace;\n }))).join(',');\n createDebug.enable('');\n return namespaces;\n }\n /**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\n\n function enabled(name) {\n if (name[name.length - 1] === '*') {\n return true;\n }\n\n var i;\n var len;\n\n for (i = 0, len = createDebug.skips.length; i < len; i++) {\n if (createDebug.skips[i].test(name)) {\n return false;\n }\n }\n\n for (i = 0, len = createDebug.names.length; i < len; i++) {\n if (createDebug.names[i].test(name)) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Convert regexp to namespace\n *\n * @param {RegExp} regxep\n * @return {String} namespace\n * @api private\n */\n\n\n function toNamespace(regexp) {\n return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\\.\\*\\?$/, '*');\n }\n /**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\n\n function coerce(val) {\n if (val instanceof Error) {\n return val.stack || val.message;\n }\n\n return val;\n }\n /**\n * XXX DO NOT USE. This is a temporary stub function.\n * XXX It WILL be removed in the next major release.\n */\n\n\n function destroy() {\n console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n }\n\n createDebug.enable(createDebug.load());\n return createDebug;\n}", "title": "" }, { "docid": "bff91012f07f70243f7af983f0470c32", "score": "0.585074", "text": "function debug(text) { DEBUG && log(\"[DDT] \" + text); }", "title": "" }, { "docid": "ef10ecfe7c6d8856d1e88731e143b069", "score": "0.582871", "text": "function setup(env) {\n createDebug.debug = createDebug;\n createDebug['default'] = createDebug;\n createDebug.coerce = coerce;\n createDebug.disable = disable;\n createDebug.enable = enable;\n createDebug.enabled = enabled;\n createDebug.humanize = __webpack_require__(\n /*! ms */ './node_modules/debug/node_modules/ms/index.js',\n );\n createDebug.destroy = destroy;\n Object.keys(env).forEach(function(key) {\n createDebug[key] = env[key];\n });\n /**\n * The currently active debug mode names, and names to skip.\n */\n\n createDebug.names = [];\n createDebug.skips = [];\n /**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\n createDebug.formatters = {};\n /**\n * Selects a color for a debug namespace\n * @param {String} namespace The namespace string for the for the debug instance to be colored\n * @return {Number|String} An ANSI color code for the given namespace\n * @api private\n */\n\n function selectColor(namespace) {\n var hash = 0;\n\n for (var i = 0; i < namespace.length; i++) {\n hash = (hash << 5) - hash + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return createDebug.colors[\n Math.abs(hash) % createDebug.colors.length\n ];\n }\n\n createDebug.selectColor = selectColor;\n /**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\n function createDebug(namespace) {\n var prevTime;\n var enableOverride = null;\n\n function debug() {\n for (\n var _len = arguments.length, args = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n args[_key] = arguments[_key];\n }\n\n // Disabled?\n if (!debug.enabled) {\n return;\n }\n\n var self = debug; // Set `diff` timestamp\n\n var curr = Number(new Date());\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n args[0] = createDebug.coerce(args[0]);\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O');\n } // Apply any `formatters` transformations\n\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(\n match,\n format,\n ) {\n // If we encounter an escaped % then don't increase the array index\n if (match === '%%') {\n return '%';\n }\n\n index++;\n var formatter = createDebug.formatters[format];\n\n if (typeof formatter === 'function') {\n var val = args[index];\n match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`\n\n args.splice(index, 1);\n index--;\n }\n\n return match;\n }); // Apply env-specific formatting (colors, etc.)\n\n createDebug.formatArgs.call(self, args);\n var logFn = self.log || createDebug.log;\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.useColors = createDebug.useColors();\n debug.color = createDebug.selectColor(namespace);\n debug.extend = extend;\n debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n Object.defineProperty(debug, 'enabled', {\n enumerable: true,\n configurable: false,\n get: function get() {\n return enableOverride === null\n ? createDebug.enabled(namespace)\n : enableOverride;\n },\n set: function set(v) {\n enableOverride = v;\n },\n }); // Env-specific initialization logic for debug instances\n\n if (typeof createDebug.init === 'function') {\n createDebug.init(debug);\n }\n\n return debug;\n }\n\n function extend(namespace, delimiter) {\n var newDebug = createDebug(\n this.namespace +\n (typeof delimiter === 'undefined' ? ':' : delimiter) +\n namespace,\n );\n newDebug.log = this.log;\n return newDebug;\n }\n /**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\n function enable(namespaces) {\n createDebug.save(namespaces);\n createDebug.names = [];\n createDebug.skips = [];\n var i;\n var split = (typeof namespaces === 'string'\n ? namespaces\n : ''\n ).split(/[\\s,]+/);\n var len = split.length;\n\n for (i = 0; i < len; i++) {\n if (!split[i]) {\n // ignore empty strings\n continue;\n }\n\n namespaces = split[i].replace(/\\*/g, '.*?');\n\n if (namespaces[0] === '-') {\n createDebug.skips.push(\n new RegExp('^' + namespaces.substr(1) + '$'),\n );\n } else {\n createDebug.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n }\n /**\n * Disable debug output.\n *\n * @return {String} namespaces\n * @api public\n */\n\n function disable() {\n var namespaces = []\n .concat(\n _toConsumableArray(createDebug.names.map(toNamespace)),\n _toConsumableArray(\n createDebug.skips.map(toNamespace).map(function(namespace) {\n return '-' + namespace;\n }),\n ),\n )\n .join(',');\n createDebug.enable('');\n return namespaces;\n }\n /**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\n function enabled(name) {\n if (name[name.length - 1] === '*') {\n return true;\n }\n\n var i;\n var len;\n\n for (i = 0, len = createDebug.skips.length; i < len; i++) {\n if (createDebug.skips[i].test(name)) {\n return false;\n }\n }\n\n for (i = 0, len = createDebug.names.length; i < len; i++) {\n if (createDebug.names[i].test(name)) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Convert regexp to namespace\n *\n * @param {RegExp} regxep\n * @return {String} namespace\n * @api private\n */\n\n function toNamespace(regexp) {\n return regexp\n .toString()\n .substring(2, regexp.toString().length - 2)\n .replace(/\\.\\*\\?$/, '*');\n }\n /**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\n function coerce(val) {\n if (val instanceof Error) {\n return val.stack || val.message;\n }\n\n return val;\n }\n /**\n * XXX DO NOT USE. This is a temporary stub function.\n * XXX It WILL be removed in the next major release.\n */\n\n function destroy() {\n console.warn(\n 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.',\n );\n }\n\n createDebug.enable(createDebug.load());\n return createDebug;\n }", "title": "" }, { "docid": "429ff19709bf52d47bb0244eb8f461d5", "score": "0.58241564", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(6170);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "733475c8ef2c54fc0488411b1aaebb79", "score": "0.5816762", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(80900);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "b227af6ffbea66917f2ac8712f57f088", "score": "0.5816733", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(900);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "be850b935a1f2f52dc1ce1cc1f41893e", "score": "0.5808674", "text": "function setup$1(env) {\n \tcreateDebug.debug = createDebug;\n \tcreateDebug.default = createDebug;\n \tcreateDebug.coerce = coerce;\n \tcreateDebug.disable = disable;\n \tcreateDebug.enable = enable;\n \tcreateDebug.enabled = enabled;\n \tcreateDebug.humanize = ms$1;\n \tcreateDebug.destroy = destroy;\n\n \tObject.keys(env).forEach(key => {\n \t\tcreateDebug[key] = env[key];\n \t});\n\n \t/**\n \t* The currently active debug mode names, and names to skip.\n \t*/\n\n \tcreateDebug.names = [];\n \tcreateDebug.skips = [];\n\n \t/**\n \t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n \t*\n \t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n \t*/\n \tcreateDebug.formatters = {};\n\n \t/**\n \t* Selects a color for a debug namespace\n \t* @param {String} namespace The namespace string for the for the debug instance to be colored\n \t* @return {Number|String} An ANSI color code for the given namespace\n \t* @api private\n \t*/\n \tfunction selectColor(namespace) {\n \t\tlet hash = 0;\n\n \t\tfor (let i = 0; i < namespace.length; i++) {\n \t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n \t\t\thash |= 0; // Convert to 32bit integer\n \t\t}\n\n \t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n \t}\n \tcreateDebug.selectColor = selectColor;\n\n \t/**\n \t* Create a debugger with the given `namespace`.\n \t*\n \t* @param {String} namespace\n \t* @return {Function}\n \t* @api public\n \t*/\n \tfunction createDebug(namespace) {\n \t\tlet prevTime;\n \t\tlet enableOverride = null;\n \t\tlet namespacesCache;\n \t\tlet enabledCache;\n\n \t\tfunction debug(...args) {\n \t\t\t// Disabled?\n \t\t\tif (!debug.enabled) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tconst self = debug;\n\n \t\t\t// Set `diff` timestamp\n \t\t\tconst curr = Number(new Date());\n \t\t\tconst ms = curr - (prevTime || curr);\n \t\t\tself.diff = ms;\n \t\t\tself.prev = prevTime;\n \t\t\tself.curr = curr;\n \t\t\tprevTime = curr;\n\n \t\t\targs[0] = createDebug.coerce(args[0]);\n\n \t\t\tif (typeof args[0] !== 'string') {\n \t\t\t\t// Anything else let's inspect with %O\n \t\t\t\targs.unshift('%O');\n \t\t\t}\n\n \t\t\t// Apply any `formatters` transformations\n \t\t\tlet index = 0;\n \t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n \t\t\t\t// If we encounter an escaped % then don't increase the array index\n \t\t\t\tif (match === '%%') {\n \t\t\t\t\treturn '%';\n \t\t\t\t}\n \t\t\t\tindex++;\n \t\t\t\tconst formatter = createDebug.formatters[format];\n \t\t\t\tif (typeof formatter === 'function') {\n \t\t\t\t\tconst val = args[index];\n \t\t\t\t\tmatch = formatter.call(self, val);\n\n \t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n \t\t\t\t\targs.splice(index, 1);\n \t\t\t\t\tindex--;\n \t\t\t\t}\n \t\t\t\treturn match;\n \t\t\t});\n\n \t\t\t// Apply env-specific formatting (colors, etc.)\n \t\t\tcreateDebug.formatArgs.call(self, args);\n\n \t\t\tconst logFn = self.log || createDebug.log;\n \t\t\tlogFn.apply(self, args);\n \t\t}\n\n \t\tdebug.namespace = namespace;\n \t\tdebug.useColors = createDebug.useColors();\n \t\tdebug.color = createDebug.selectColor(namespace);\n \t\tdebug.extend = extend;\n \t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n \t\tObject.defineProperty(debug, 'enabled', {\n \t\t\tenumerable: true,\n \t\t\tconfigurable: false,\n \t\t\tget: () => {\n \t\t\t\tif (enableOverride !== null) {\n \t\t\t\t\treturn enableOverride;\n \t\t\t\t}\n \t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n \t\t\t\t\tnamespacesCache = createDebug.namespaces;\n \t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n \t\t\t\t}\n\n \t\t\t\treturn enabledCache;\n \t\t\t},\n \t\t\tset: v => {\n \t\t\t\tenableOverride = v;\n \t\t\t}\n \t\t});\n\n \t\t// Env-specific initialization logic for debug instances\n \t\tif (typeof createDebug.init === 'function') {\n \t\t\tcreateDebug.init(debug);\n \t\t}\n\n \t\treturn debug;\n \t}\n\n \tfunction extend(namespace, delimiter) {\n \t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n \t\tnewDebug.log = this.log;\n \t\treturn newDebug;\n \t}\n\n \t/**\n \t* Enables a debug mode by namespaces. This can include modes\n \t* separated by a colon and wildcards.\n \t*\n \t* @param {String} namespaces\n \t* @api public\n \t*/\n \tfunction enable(namespaces) {\n \t\tcreateDebug.save(namespaces);\n \t\tcreateDebug.namespaces = namespaces;\n\n \t\tcreateDebug.names = [];\n \t\tcreateDebug.skips = [];\n\n \t\tlet i;\n \t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n \t\tconst len = split.length;\n\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tif (!split[i]) {\n \t\t\t\t// ignore empty strings\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n \t\t\tif (namespaces[0] === '-') {\n \t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n \t\t\t} else {\n \t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n \t\t\t}\n \t\t}\n \t}\n\n \t/**\n \t* Disable debug output.\n \t*\n \t* @return {String} namespaces\n \t* @api public\n \t*/\n \tfunction disable() {\n \t\tconst namespaces = [\n \t\t\t...createDebug.names.map(toNamespace),\n \t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n \t\t].join(',');\n \t\tcreateDebug.enable('');\n \t\treturn namespaces;\n \t}\n\n \t/**\n \t* Returns true if the given mode name is enabled, false otherwise.\n \t*\n \t* @param {String} name\n \t* @return {Boolean}\n \t* @api public\n \t*/\n \tfunction enabled(name) {\n \t\tif (name[name.length - 1] === '*') {\n \t\t\treturn true;\n \t\t}\n\n \t\tlet i;\n \t\tlet len;\n\n \t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n \t\t\tif (createDebug.skips[i].test(name)) {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t}\n\n \t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n \t\t\tif (createDebug.names[i].test(name)) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n \t}\n\n \t/**\n \t* Convert regexp to namespace\n \t*\n \t* @param {RegExp} regxep\n \t* @return {String} namespace\n \t* @api private\n \t*/\n \tfunction toNamespace(regexp) {\n \t\treturn regexp.toString()\n \t\t\t.substring(2, regexp.toString().length - 2)\n \t\t\t.replace(/\\.\\*\\?$/, '*');\n \t}\n\n \t/**\n \t* Coerce `val`.\n \t*\n \t* @param {Mixed} val\n \t* @return {Mixed}\n \t* @api private\n \t*/\n \tfunction coerce(val) {\n \t\tif (val instanceof Error) {\n \t\t\treturn val.stack || val.message;\n \t\t}\n \t\treturn val;\n \t}\n\n \t/**\n \t* XXX DO NOT USE. This is a temporary stub function.\n \t* XXX It WILL be removed in the next major release.\n \t*/\n \tfunction destroy() {\n \t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n \t}\n\n \tcreateDebug.enable(createDebug.load());\n\n \treturn createDebug;\n }", "title": "" }, { "docid": "1c143a7ce0b3e8e9fd68f773f3432611", "score": "0.5804786", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(900);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "fd184170c0860adb33a90d174347e9da", "score": "0.58035564", "text": "enableDebug() {\n\t\tthis._debugEnabled = true;\n\t}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "ca8fbf6617eb2030f44576c45533cf9c", "score": "0.57979137", "text": "function init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}", "title": "" }, { "docid": "7080652e403b2ca9ed71edd11adbde3c", "score": "0.5796473", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(80900);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "7080652e403b2ca9ed71edd11adbde3c", "score": "0.5796473", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(80900);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "7080652e403b2ca9ed71edd11adbde3c", "score": "0.5796473", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __nccwpck_require__(80900);\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "92019baeb4b1b1f6556f4c880eaea01d", "score": "0.5795505", "text": "function init(debug) {\n debug.inspectOpts = {};\n var keys = Object.keys(exports.inspectOpts);\n\n for (var i = 0; i < keys.length; i++) {\n debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n }\n }", "title": "" }, { "docid": "d5865d428b227334a572d3763a0c80bb", "score": "0.57742196", "text": "function init(debug) {\n\t debug.inspectOpts = {};\n\t var keys = Object.keys(exports.inspectOpts);\n\n\t for (var i = 0; i < keys.length; i++) {\n\t debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t }\n\t }", "title": "" }, { "docid": "4d78939af9a6257c08726682f96ce1fa", "score": "0.57658577", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "4d78939af9a6257c08726682f96ce1fa", "score": "0.57658577", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "68d438371fa0c5205098eab4bf2ae8d4", "score": "0.5757003", "text": "function setupDebug() {\n\t\tvar debugFilepath = settings.DEBUG_FILEPATH;\n\t\tvar log_file = fs.createWriteStream(debugFilepath, {flags : \"w\"});\n\t\tvar log_stdout = process.stdout;\n\t\tconsole.log = function(d) { //\n\t\t\tlog_file.write(util.format(d) + \"\\n\");\n\t\t\tlog_stdout.write(util.format(d) + \"\\n\");\n\t\t};\n\t}", "title": "" }, { "docid": "7f44d92bcf7bf2c6b928c54ed1101b5b", "score": "0.57543087", "text": "function debug() {\n view.send({\n type: 'command',\n body: 'DEBUG_ON',\n });\n}", "title": "" }, { "docid": "9f8d53e8af1aa6593e255c8c68ddbab1", "score": "0.57511", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __webpack_require__(/*! ms */ \"./node_modules/debug/node_modules/ms/index.js\");\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "0ba359087ae0156b738a0ad939953bba", "score": "0.57488215", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __webpack_require__(/*! ms */ \"./node_modules/micromark/node_modules/ms/index.js\");\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "cc6e0162ac1cbbef39aea24c6a43f743", "score": "0.57438004", "text": "function setup(env) {\n \tcreateDebug.debug = createDebug;\n \tcreateDebug.default = createDebug;\n \tcreateDebug.coerce = coerce;\n \tcreateDebug.disable = disable;\n \tcreateDebug.enable = enable;\n \tcreateDebug.enabled = enabled;\n \tcreateDebug.humanize = ms;\n \tcreateDebug.destroy = destroy;\n\n \tObject.keys(env).forEach(key => {\n \t\tcreateDebug[key] = env[key];\n \t});\n\n \t/**\n \t* The currently active debug mode names, and names to skip.\n \t*/\n\n \tcreateDebug.names = [];\n \tcreateDebug.skips = [];\n\n \t/**\n \t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n \t*\n \t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n \t*/\n \tcreateDebug.formatters = {};\n\n \t/**\n \t* Selects a color for a debug namespace\n \t* @param {String} namespace The namespace string for the for the debug instance to be colored\n \t* @return {Number|String} An ANSI color code for the given namespace\n \t* @api private\n \t*/\n \tfunction selectColor(namespace) {\n \t\tlet hash = 0;\n\n \t\tfor (let i = 0; i < namespace.length; i++) {\n \t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n \t\t\thash |= 0; // Convert to 32bit integer\n \t\t}\n\n \t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n \t}\n \tcreateDebug.selectColor = selectColor;\n\n \t/**\n \t* Create a debugger with the given `namespace`.\n \t*\n \t* @param {String} namespace\n \t* @return {Function}\n \t* @api public\n \t*/\n \tfunction createDebug(namespace) {\n \t\tlet prevTime;\n \t\tlet enableOverride = null;\n \t\tlet namespacesCache;\n \t\tlet enabledCache;\n\n \t\tfunction debug(...args) {\n \t\t\t// Disabled?\n \t\t\tif (!debug.enabled) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tconst self = debug;\n\n \t\t\t// Set `diff` timestamp\n \t\t\tconst curr = Number(new Date());\n \t\t\tconst ms = curr - (prevTime || curr);\n \t\t\tself.diff = ms;\n \t\t\tself.prev = prevTime;\n \t\t\tself.curr = curr;\n \t\t\tprevTime = curr;\n\n \t\t\targs[0] = createDebug.coerce(args[0]);\n\n \t\t\tif (typeof args[0] !== 'string') {\n \t\t\t\t// Anything else let's inspect with %O\n \t\t\t\targs.unshift('%O');\n \t\t\t}\n\n \t\t\t// Apply any `formatters` transformations\n \t\t\tlet index = 0;\n \t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n \t\t\t\t// If we encounter an escaped % then don't increase the array index\n \t\t\t\tif (match === '%%') {\n \t\t\t\t\treturn '%';\n \t\t\t\t}\n \t\t\t\tindex++;\n \t\t\t\tconst formatter = createDebug.formatters[format];\n \t\t\t\tif (typeof formatter === 'function') {\n \t\t\t\t\tconst val = args[index];\n \t\t\t\t\tmatch = formatter.call(self, val);\n\n \t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n \t\t\t\t\targs.splice(index, 1);\n \t\t\t\t\tindex--;\n \t\t\t\t}\n \t\t\t\treturn match;\n \t\t\t});\n\n \t\t\t// Apply env-specific formatting (colors, etc.)\n \t\t\tcreateDebug.formatArgs.call(self, args);\n\n \t\t\tconst logFn = self.log || createDebug.log;\n \t\t\tlogFn.apply(self, args);\n \t\t}\n\n \t\tdebug.namespace = namespace;\n \t\tdebug.useColors = createDebug.useColors();\n \t\tdebug.color = createDebug.selectColor(namespace);\n \t\tdebug.extend = extend;\n \t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n \t\tObject.defineProperty(debug, 'enabled', {\n \t\t\tenumerable: true,\n \t\t\tconfigurable: false,\n \t\t\tget: () => {\n \t\t\t\tif (enableOverride !== null) {\n \t\t\t\t\treturn enableOverride;\n \t\t\t\t}\n \t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n \t\t\t\t\tnamespacesCache = createDebug.namespaces;\n \t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n \t\t\t\t}\n\n \t\t\t\treturn enabledCache;\n \t\t\t},\n \t\t\tset: v => {\n \t\t\t\tenableOverride = v;\n \t\t\t}\n \t\t});\n\n \t\t// Env-specific initialization logic for debug instances\n \t\tif (typeof createDebug.init === 'function') {\n \t\t\tcreateDebug.init(debug);\n \t\t}\n\n \t\treturn debug;\n \t}\n\n \tfunction extend(namespace, delimiter) {\n \t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n \t\tnewDebug.log = this.log;\n \t\treturn newDebug;\n \t}\n\n \t/**\n \t* Enables a debug mode by namespaces. This can include modes\n \t* separated by a colon and wildcards.\n \t*\n \t* @param {String} namespaces\n \t* @api public\n \t*/\n \tfunction enable(namespaces) {\n \t\tcreateDebug.save(namespaces);\n \t\tcreateDebug.namespaces = namespaces;\n\n \t\tcreateDebug.names = [];\n \t\tcreateDebug.skips = [];\n\n \t\tlet i;\n \t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n \t\tconst len = split.length;\n\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tif (!split[i]) {\n \t\t\t\t// ignore empty strings\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n \t\t\tif (namespaces[0] === '-') {\n \t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n \t\t\t} else {\n \t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n \t\t\t}\n \t\t}\n \t}\n\n \t/**\n \t* Disable debug output.\n \t*\n \t* @return {String} namespaces\n \t* @api public\n \t*/\n \tfunction disable() {\n \t\tconst namespaces = [\n \t\t\t...createDebug.names.map(toNamespace),\n \t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n \t\t].join(',');\n \t\tcreateDebug.enable('');\n \t\treturn namespaces;\n \t}\n\n \t/**\n \t* Returns true if the given mode name is enabled, false otherwise.\n \t*\n \t* @param {String} name\n \t* @return {Boolean}\n \t* @api public\n \t*/\n \tfunction enabled(name) {\n \t\tif (name[name.length - 1] === '*') {\n \t\t\treturn true;\n \t\t}\n\n \t\tlet i;\n \t\tlet len;\n\n \t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n \t\t\tif (createDebug.skips[i].test(name)) {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t}\n\n \t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n \t\t\tif (createDebug.names[i].test(name)) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n \t}\n\n \t/**\n \t* Convert regexp to namespace\n \t*\n \t* @param {RegExp} regxep\n \t* @return {String} namespace\n \t* @api private\n \t*/\n \tfunction toNamespace(regexp) {\n \t\treturn regexp.toString()\n \t\t\t.substring(2, regexp.toString().length - 2)\n \t\t\t.replace(/\\.\\*\\?$/, '*');\n \t}\n\n \t/**\n \t* Coerce `val`.\n \t*\n \t* @param {Mixed} val\n \t* @return {Mixed}\n \t* @api private\n \t*/\n \tfunction coerce(val) {\n \t\tif (val instanceof Error) {\n \t\t\treturn val.stack || val.message;\n \t\t}\n \t\treturn val;\n \t}\n\n \t/**\n \t* XXX DO NOT USE. This is a temporary stub function.\n \t* XXX It WILL be removed in the next major release.\n \t*/\n \tfunction destroy() {\n \t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n \t}\n\n \tcreateDebug.enable(createDebug.load());\n\n \treturn createDebug;\n }", "title": "" }, { "docid": "f8ce5aaa155b9f9bd02a3dcc19c5a4b3", "score": "0.5743315", "text": "function init (debug) {\n\t debug.inspectOpts = {};\n\t\n\t var keys = Object.keys(exports.inspectOpts);\n\t for (var i = 0; i < keys.length; i++) {\n\t debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t }\n\t}", "title": "" }, { "docid": "4bdb8c858ad2a2364e7b336c344921e4", "score": "0.5734688", "text": "function make_debugger(code, _breakpoints) {\r\n\tdebug_on = false;\r\n\tdebugger_marker = null;\r\n\treturn run(code, _breakpoints);\t\r\n}", "title": "" }, { "docid": "9b80136f60b897d08b808683db883841", "score": "0.5728298", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = ms;\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "9b80136f60b897d08b808683db883841", "score": "0.5728298", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = ms;\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "9b80136f60b897d08b808683db883841", "score": "0.5728298", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = ms;\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "b2a418bc5651c854ccef41037f02465c", "score": "0.572634", "text": "function whenDebugEnabled(fn) {\n if (isDebugEnabled()) {\n fn.call(null);\n }\n }", "title": "" }, { "docid": "a04ae2c60c0b956172989661d1a16a18", "score": "0.5723549", "text": "disableDebug() {\n\t\tthis._debugEnabled = false;\n\t}", "title": "" }, { "docid": "2e25928350611dbaa8ac33176dc99394", "score": "0.5719793", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = ms;\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "ebecd904cd2cabcaf7591c8a5bf6d65f", "score": "0.5712809", "text": "function next(){\n if(!debug){_next();}\n}", "title": "" }, { "docid": "ebecd904cd2cabcaf7591c8a5bf6d65f", "score": "0.5712809", "text": "function next(){\n if(!debug){_next();}\n}", "title": "" }, { "docid": "66cb7671b0ef5d87cb33c956cc2488d6", "score": "0.57096636", "text": "function init(debug) {\n debug.inspectOpts = {};\n\n var keys = Object.keys(exports.inspectOpts);\n for (var i = 0; i < keys.length; i++) {\n debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n }\n}", "title": "" }, { "docid": "7b080e8cbea74d2983bef2c1b1f2ee5c", "score": "0.5709485", "text": "function setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __webpack_require__(/*! ms */ \"./node_modules/ms/index.js\");\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}", "title": "" }, { "docid": "87254ab7d06115456284ccdd083968c7", "score": "0.57090235", "text": "function debug(data) { if (DEBUGGING) { console.log(\"DEBUG: \" + data); } }", "title": "" } ]
326a27c626fd427a9f671207490a3ecd
Get yesterday's COVID data on the US as a whole
[ { "docid": "2c9f72aef46ea345caa29d5fefa59de3", "score": "0.0", "text": "async function nationalUpdate(channel) {\n try {\n const countryData = await api.yesterday.countries({ country: 'USA' }); // Get data\n const {\n cases,\n todayCases,\n deaths,\n todayDeaths,\n recovered,\n active,\n critical,\n casesPerOneMillion,\n deathsPerOneMillion,\n } = pick(countryData, ['cases', 'todayCases', 'deaths', 'todayDeaths', 'recovered', 'active', 'critical', 'casesPerOneMillion', 'deathsPerOneMillion']);\n \n // Build the message\n const message = `Total Cases: ${numeral(cases).format('0,0')}\\n`\n + `Deaths: ${numeral(deaths).format('0,0')}\\n`\n + `Recovered: ${numeral(recovered).format('0,0')}\\n`\n + `In Critical Condition: ${numeral(critical).format('0,0')}\\n`\n + `Active Cases: ${numeral(active).format('0,0')}\\n\\n`\n + `Cases Per Million: ${numeral(casesPerOneMillion).format('0,0')}\\n`\n + `Deaths Per Million: ${numeral(deathsPerOneMillion).format('0,0')}\\n\\n`\n + `New Cases Reported So Far Today: ${numeral(todayCases).format('0,0')}\\n`\n + `New Deaths Reported So Far Today: ${numeral(todayDeaths).format('0,0')}\\n`;\n channel.send(message); // Send the message\n } catch (error) {\n console.log(error);\n channel.send('My apologies. I wasn\\'t able to get the numbers for the United States.');\n }\n}", "title": "" } ]
[ { "docid": "7e6f03e993da94b261b159173ece9db1", "score": "0.6639516", "text": "static async getHistoricalDataCountyThirtyDays(state){\n let res = await this.request(`data/us-counties/${state}`);\n return res.data;\n}", "title": "" }, { "docid": "b481c8cb78639e46060ff159aabd1886", "score": "0.6449288", "text": "static async getHistoricalCountriesThiryDays(){\n let res = await this.request(`data/historical-countries`);\n return res.data;\n }", "title": "" }, { "docid": "dbfdd87f69d55e11bc120cf77e5adfcf", "score": "0.6304337", "text": "static async getHistoricalDataCounty(state, days){\n let res = await this.request(`data/us-counties/${state}/${days}`);\n return res.data;\n}", "title": "" }, { "docid": "c971b0d5b0167255cdd795ddb369fa59", "score": "0.61601007", "text": "static async getHistoricalCountries(days){\n let res = await this.request(`data/historical-countries/${days}`);\n return res.data;\n }", "title": "" }, { "docid": "b5cb6d4ffdc67633e6357a0c533a7134", "score": "0.60575485", "text": "function getDatasetToday() {\r\n let index, value, result = [], newBandwidths = [];\r\n for (index = 0; index < timestamp.length; index++) {\r\n value = timestamp[index];\r\n if (value.substring(0, 11) === date.toLocaleString().substring(0, 11)) {\r\n result.push(index);\r\n }\r\n }\r\n for (index = 0; index < bandwidth.length; index++) {\r\n if (index >= result[0] && index <= result[index.length]) {\r\n newBandwidths.push(bandwidth[index])\r\n }\r\n }\r\n datesString = \"Date: \" + date.toLocaleString().substring(0, date.toLocaleString().indexOf('T'));\r\n\r\n return newBandwidths.toString().slice(1, -1).split(',');\r\n }", "title": "" }, { "docid": "45c839ee92e37c702a1b7b8c22afa94e", "score": "0.60487634", "text": "static async getHistoricalCountry(country, days){\n let res = await this.request(`data/countries/${country}/${days}`);\n return res.data;\n }", "title": "" }, { "docid": "e1aefa2e3c5761a077fd0b5ab9e30103", "score": "0.59444255", "text": "static async getGlobalHistoricalThirtyDays(){\n let res = await this.request(`data/historical-all`);\n return res.data;\n }", "title": "" }, { "docid": "b62910295a3eabb3a7d04c90d4418f7d", "score": "0.5944388", "text": "function getConcert(searchData) {\n axios.get(`https://rest.bandsintown.com/artists/${searchData}/events?app_id=codingbootcamp`)\n .then(function (response) {\n for (let i = 0; i < response.data.length; i++) {\n console.log(response.data[i].venue.name);\n console.log(response.data[i].venue.city);\n console.log(moment(response.data[i].datetime).format('MMMM Do YYYY'));\n console.log(\"---------------------\")\n }\n })\n}", "title": "" }, { "docid": "e7561147b7dfb10cc5b48df9177fb0d0", "score": "0.58950514", "text": "async getHistoCountryCases(country) {\n\t\tconst histoCases = await fetch(\n\t\t\t`https://disease.sh/v3/covid-19/historical/${country}?lastdays=all`\n\t\t);\n\t\tconst histoCasesJSON = await histoCases.json();\n\n\t\treturn histoCasesJSON;\n\t}", "title": "" }, { "docid": "6ad062e456d3f528560878c1b3805cfa", "score": "0.58796895", "text": "function bands() {\n axios.get(\"https://rest.bandsintown.com/artists/\" + value\n + \"/events?app_id=codingbootcamp\").then(function (response) {\n response.data.forEach(function (event) {\n console.log(event.venue.name)\n console.log(event.venue.city)\n console.log(event.datetime)\n });\n });\n\n}", "title": "" }, { "docid": "55765b7f7f390aa8f0f95b14c3573ff2", "score": "0.58442575", "text": "async getHistoGlobalCases() {\n\t\tconst response = await fetch(\n\t\t\t`https://disease.sh/v3/covid-19/historical/all?lastdays=all`\n\t\t);\n\t\tconst responseJSON = await response.json();\n\n\t\treturn responseJSON;\n\t}", "title": "" }, { "docid": "965587f05d47e8c67db8f2261e5dcc9e", "score": "0.5821575", "text": "function concertThis() {\n //Need to take searchTerm and input into the queryUrl to access the API\n axios.get(\"https://rest.bandsintown.com/artists/\" + searchTerm + \"/events?app_id=codingbootcamp\").then(\n function (response) {\n // Should let user know if there are no results\n if (!response.data.length) {\n console.log(\"No upcoming concerts :(\")\n }\n // Need to log name of venue, venue location, date of event (MM/DD/YYYY)\n for (var i = 0; i < response.data.length; i++) {\n //create variable for reponse.data[i]\n console.log(response.data[i].venue.name, response.data[i].venue.city, response.data[i].venue.region, response.data[i].venue.country);\n console.log(moment(response.data[i].datetime).format(\"MM/DD/YYYY\"));\n }\n }\n );\n}", "title": "" }, { "docid": "8fe3ecf25897dc522b50c3bb826a3de5", "score": "0.5750581", "text": "function getGlobalCovidStats(response) {\n flag = 1; //need to set to filter out Global Data\n\n //getting Covid Stats Data\n filterOutData(response[\"Global\"]);\n\n //display the date when API numbers were last updated\n displayLastUpdatedDate(response[\"Countries\"][0][\"Date\"]);\n\n\n}", "title": "" }, { "docid": "856c741062673f952583780810fac172", "score": "0.57466394", "text": "function concThis() {\n // just like the OMDB call we use the came axios call to get the concert's information from the JSON data that gets returned.\n axios.get(\"https://rest.bandsintown.com/artists/\" + search + \"/events?app_id=codingbootcamp&date=upcoming\").then(\n function (response) {\n // using a for loop we itterate through all of the tour dates and print to the command line the requested data via console.log\n for (i = 0; i < response.data.length; i++) {\n console.log(\"--------------------\")\n console.log(\"Artist: \" + search)\n console.log(\"Venue name: \" + response.data[i].venue.name);\n console.log(\"Location: \" + response.data[i].venue.city);\n // utilizing the Moment package we convert the concert dates to MM/DD/YYYY per the assignments readme.\n console.log(\"Date: \" + moment(response.data[i].datetime).format('MM/DD/YYYY'))\n console.log(\"--------------------\");\n };\n });\n}", "title": "" }, { "docid": "5fa9fd07f8b089836cec13aa42e7fa18", "score": "0.5743065", "text": "async function getData() {\n let response = await fetch(\n `https://covid-193.p.rapidapi.com/history?country=${enterCountry.value}&day=${year}-${month}-${day}`,\n {\n method: 'GET',\n headers: {\n 'x-rapidapi-key':\n '5f7daf8231mshe0f6a7f36012aa4p1a2ae1jsn91d66c35c706',\n 'x-rapidapi-host': 'covid-193.p.rapidapi.com',\n },\n }\n );\n let data = await response.json();\n data = JSON.stringify(data);\n data = JSON.parse(data);\n return data;\n }", "title": "" }, { "docid": "0132b11c8c863b842779312dc600df67", "score": "0.5708419", "text": "static setCurrentDayCovidHistory(allCountries) {\n const today = getTodayConvertedDate();\n let yesterday = today.split('/');\n yesterday[1] = String(Number(yesterday[1]) - 1);\n yesterday = yesterday.join('/');\n // eslint-disable-next-line consistent-return\n allCountries.forEach((country) => {\n try {\n country.timeline.cases[today] = country.cases;\n country.timeline.deaths[today] = country.deaths;\n country.timeline.recovered[today] = country.recovered;\n } catch (e) {\n return false;\n }\n });\n }", "title": "" }, { "docid": "deff481a20e1a7c41eb8f2fc288d3ba2", "score": "0.57070464", "text": "function getDateData(current) {\n request(`${url},${current}?exclude={currently, minutely, flags}`, (error, response, body) => {\n result = JSON.parse(body);\n const dailyTemp = {\n tempHigh: result.daily.data[0].temperatureHigh,\n tempLow: result.daily.data[0].temperatureLow\n }; \n if (dailyTemp.tempHigh > 75 || dailyTemp.tempLow < 62) {\n usedHVAC = true;\n totalDaysUsed++;\n }\n filteredData.push({\"date\": current, \"temps\": [dailyTemp], \"usedHVAC\": usedHVAC, \"totalDaysUsed\": totalDaysUsed});\n });\n }", "title": "" }, { "docid": "3f24ce08d3f5bbe893ec3b687c0f8bf7", "score": "0.57016104", "text": "static async getVaccineDataUSStateThirtyDays(state){\n let res = await this.request(`data/vaccine/us-state/${state}`);\n return res.data;\n}", "title": "" }, { "docid": "954ad0d8021714b0ba30fccab53f1d1c", "score": "0.5699045", "text": "async function getHistoricInfo(country) { // country or Global\n if (country === 'Global') {\n const url = 'https://disease.sh/v3/covid-19/historical/all?lastdays=1000';\n const response = await fetch(url);\n const countryStats = await response.json();\n console.log(JSON.stringify(countryStats, null, 2));// just for control\n return countryStats;\n }\n const url = `https://disease.sh/v3/covid-19/historical/${country}?lastdays=1000`;\n const response = await fetch(url);\n const countryStats = await response.json();\n const { cases, deaths, recovered } = countryStats.timeline;\n console.log(JSON.stringify({ cases, deaths, recovered }, null, 2)); // just for control\n return { cases, deaths, recovered };\n}", "title": "" }, { "docid": "581bf9e02b086335d9a5697f81ad325b", "score": "0.56837445", "text": "function getDataToday(input) {\n fetch(`${api.base}/data/2.5/weather?q=${input}&units=metric&appid=${api.key}`)\n .then(weather => {\n return weather.json();\n }).then(weather => {\n results(weather)\n let lat = weather.coord.lat\n let long = weather.coord.lon;\n fetch(`${api.base}/data/2.5/onecall?lat=${lat}&lon=${long}&exclude=minutely,daily,alerts&units=metric&appid=${api.key}`)\n .then(data => {\n return data.json()\n }).then((data) => {\n forecast(data)\n })\n });\n}", "title": "" }, { "docid": "00e2174f70723cab13265d718da8e23c", "score": "0.5678812", "text": "function GetUSACovidCasesPerDay() {\n\n $.ajax({\n async: true,\n type: 'GET',\n url: \"https://disease.sh/v3/covid-19/historical/USA?lastdays=all\",\n success: function (data) {\n //console.log(data);\n\n\n //callback\n var tempDates = Object.keys(data.timeline.cases);\n var tempCases = Object.values(data.timeline.cases);\n var changesPerDay = [];\n\n\n changesPerDay[0] = 0; //First element = 0 because we start with 0 new cases\n for (var i = 1; i < tempCases.length; i++) {\n //Fix outlier data from API\n changesPerDay[i] = tempCases[i] - tempCases[i - 1];\n //console.log(changesPerDay[i]);\n if (changesPerDay[i] > 1000000) {\n changesPerDay[i] = changesPerDay[i - 1];\n }\n //console.log(changesPerDay[i]);\n\n }\n GRAPH.options.scales.yAxes[0].scaleLabel.labelString = \"Number of Cases\";\n\n GRAPH.data.datasets[0].pointRadius = 0;\n GRAPH.data.labels = tempDates;\n GRAPH.data.datasets[0].data = changesPerDay;\n GRAPH.update();\n\n }\n });\n\n}", "title": "" }, { "docid": "aa68d93387ada129a88591689586e691", "score": "0.5668242", "text": "async function getChartData() {\n let response = await fetch(\n `https://coronavirus-map.p.rapidapi.com/v1/spots/year?region=${enterCountry.value}`,\n {\n method: 'GET',\n headers: {\n 'x-rapidapi-key':\n '5f7daf8231mshe0f6a7f36012aa4p1a2ae1jsn91d66c35c706',\n 'x-rapidapi-host': 'coronavirus-map.p.rapidapi.com',\n },\n }\n );\n let data = await response.json();\n data = JSON.stringify(data);\n data = JSON.parse(data);\n return data;\n }", "title": "" }, { "docid": "b75b7535fad930e17dfefa76a82a564b", "score": "0.5658028", "text": "function getBandsInTown(userSearch) {\n axios.get(\"https://rest.bandsintown.com/artists/\" + userSearch + \"/events?app_id=codingbootcamp\")\n .then(function (response) {\n for (var i = 0; i < response.data.length; i++) {\n var datetime = response.data[i].datetime;\n var dateArr = datetime.split('T');\n\n var concertResults =\n \"-----------------------------------------------------------------\" +\n \"\\nVenue Name: \" + response.data[i].venue.name +\n \"\\nVenue Location: \" + response.data[i].venue.city +\n \"\\nDate of the Event: \" + moment(dateArr[0], \"MM-DD-YYY\");\n console.log(concertResults);\n }\n })\n .catch(function (err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "84a06d9a4794ba94a89c766c167df159", "score": "0.56353384", "text": "static async getVaccineDataUSStatesThirtyDays(){\n let res = await this.request(`data/vaccine/us-states`);\n return res.data;\n}", "title": "" }, { "docid": "d07379ff5fc114fbb3556bac6d5d293d", "score": "0.56232125", "text": "function concertThis(){\n axios.get(\"https://rest.bandsintown.com/artists/\" + searchTerm + \"/events?app_id=codingbootcamp\").then(\n function(response) {\n \n //console.log let user know if there are no results\n if (response.data.length === 0) {\n console.log(\"That artist has no concerts scheduled\");\n return;\n }\n \n // Date/name/location\n for (var i = 0; i < 5; i++) {\n console.log(\"Date of Venue: \" + moment(response.data[i].datetime).format(\"MM/DD/YYYY\"));\n console.log(\"Name of Venue: \" + response.data[i].venue.name);\n console.log(\"Location of Venue: \" + response.data[i].venue.city + \", \"+ response.data[i].venue.country)\n }\n }\n );\n}", "title": "" }, { "docid": "3eff694c08c472cab0fb7e7599d6a9f2", "score": "0.5610329", "text": "static async getGlobalHistorical(days){\n let res = await this.request(`data/historical-all/${days}`);\n return res.data;\n }", "title": "" }, { "docid": "fd8b3f0056946dc81f8de7b935c71275", "score": "0.55786544", "text": "async function getCountryData(channel, query, yesterday = false) {\n const country = formatQuery(join(query, ' ')); // Format the submitted query\n try {\n /* eslint-disable-next-line */\n const countryData = yesterday ? await api.yesterday.countries({ country }) : await api.countries({ country }); // Get data\n const {\n cases,\n todayCases,\n deaths,\n todayDeaths,\n recovered,\n active,\n critical,\n casesPerOneMillion,\n deathsPerOneMillion,\n updated,\n } = pick(countryData, ['cases', 'todayCases', 'deaths', 'todayDeaths', 'recovered', 'active', 'critical', 'casesPerOneMillion', 'deathsPerOneMillion', 'updated']);\n const formattedCountry = formatCountry(country); // Format the country name\n const dateLastUpdated = moment(updated).fromNow(); // Format the date the data was last updated on\n \n // Build the message\n let message = `As of ${dateLastUpdated}, the current COVID-19 numbers in ${formattedCountry} are:\\n\\n`;\n if (yesterday) {\n message = `As of yesterday, the COVID-19 numbers in ${formattedCountry} were:\\n\\n`;\n }\n message += `Total Cases: ${numeral(cases).format('0,0')}\\n`\n + `Deaths: ${numeral(deaths).format('0,0')}\\n`\n + `Recovered: ${numeral(recovered).format('0,0')}\\n`\n + `In Critical Condition: ${numeral(critical).format('0,0')}\\n`\n + `Active Cases: ${numeral(active).format('0,0')}\\n\\n`\n + `Cases Per Million: ${numeral(casesPerOneMillion).format('0,0')}\\n`\n + `Deaths Per Million: ${numeral(deathsPerOneMillion).format('0,0')}\\n\\n`\n + `New Cases Reported ${yesterday ? 'Yesterday' : 'So Far Today'}: ${numeral(todayCases).format('0,0')}\\n`\n + `New Deaths Reported ${yesterday ? 'Yesterday' : 'So Far Today'}: ${numeral(todayDeaths).format('0,0')}\\n\\n`\n + 'NOTE: Worldometers tends to reset their daily counts at around 5-5:30pm PT, '\n + 'so if it is currently later in the day and the daily count is at 0 or otherwise curiously low, you may need to add \\'yesterday\\' to the end of your message to see today\\'s counts. This also means yesterday\\'s numbers will not be viewable after this point, as Worldometers has already reset their daily clock.';\n\n channel.send(message); // Send the message\n } catch (error) {\n console.log(error);\n channel.send(`My apologies. I wasn't able to get the numbers for ${country}.`);\n }\n}", "title": "" }, { "docid": "6e6d433325abc7ed875af099ef597b7d", "score": "0.5568428", "text": "function concerts() {\n const concertApi =\n \"https://rest.bandsintown.com/artists/\" + info + \"/events?app_id=codingbootcamp\";\n \n axios.get(concertApi).then(function(response) {\n const data= response.data[0];\n const concertData=[\n \n \n \n \"Artist: \" + info,\n \"Venue: \" + data.venue.name + \", \" + data.venue.region,\n \"Location: \" + data.venue.city + \", \" + data.venue.region,\n \"Date: \" + moment(data.datetime).format(\"l\"),\n \n \n \n ]\n console.log(concertData);\n })\n .catch(function(error){\n console.log(error);\n });\n }", "title": "" }, { "docid": "01ff29611984c543ae9231c5c45d72fb", "score": "0.5517217", "text": "getTodaySessions() {\n\n return new TotoAPI().fetch('/training/session/sessions?date=' + moment().format('YYYYMMDD'))\n .then((response) => response.json());\n\n }", "title": "" }, { "docid": "b0e2a2fbe01a016763a6803faa379f0d", "score": "0.5504698", "text": "static async getVaccineDataCountryThirtyDays(country){\n let res = await this.request(`data/vaccine/country/${country}`);\n return res.data; \n}", "title": "" }, { "docid": "d5b164d97daff3538b2933a5f7c120e1", "score": "0.5474531", "text": "function collateCovidData(response){\n _rep=response;\n date=response.date.toString();\n humanDateFormat=moment(date).format(\"LL\");\n // Note that the commented portions are left in for future use if we can get the information. If not we can delete these\n let newData= new FormatData(currentCity,humanDateFormat,response.date,response.positive,response.death);\n // Pushes data to COVIDData array.\n COVIDDataSet.push(newData);\n \n // When the loop is finished, will sort, store and display data.\n if(COVIDDataSet.length==datapoints){\n sortData();\n storeData();\n }\n}", "title": "" }, { "docid": "d2f9a8d18ea31fbb7772e82d269fc1ea", "score": "0.54708725", "text": "function bandsInTown(artistBandName)\n{\n let bandsUrl = `https://rest.bandsintown.com/artists/${artistBandName}/events?app_id=codingbootcamp`\n axios.get(bandsUrl)\n .then(response => {\n let concertData = response.data;\n\n for (concert of concertData)\n {\n console.log('Venue: ' + concert.venue.name\n + '\\nLocation: ' + concert.venue.city + ', ' + concert.venue.country\n + '\\nDate: ' + moment(concert.datetime).format('MM/DD/YYYY')\n + '\\n');\n }\n })\n .catch(error => {\n console.log('An error occured:', error);\n })\n}", "title": "" }, { "docid": "89e9dc943f6e721300120e0018aa6eec", "score": "0.54706407", "text": "function getConcert(artist) {\n //axios\n // using get to grab from the URL\n axios.get(\"https://rest.bandsintown.com/artists/\" + artist + \"/events?app_id=codingbootcamp\")\n .then(function (response) {\n console.log(\"Name of the Venue: \" + response.data[0].venue.name)\n console.log(\"Location: \" + response.data[0].venue.city)\n\n //using MOMENT to format the eventDate \n var eventDate = moment(response.data[0].datatime).format('MM/DD/YYYY')\n\n console.log(\"Date of Event: \" + eventDate);\n\n // console.log(response);\n })\n .catch(function (err) {\n console.log(err);\n });\n\n}", "title": "" }, { "docid": "fdffedae4d33a49e481e1001c5f66de7", "score": "0.5454068", "text": "function concertThis() {\n axios\n .get(\"https://rest.bandsintown.com/artists/\" + query + \"/events?app_id=codingbootcamp\")\n .then(function(response){\n console.log(\"The info for: \" + query + \" is \");\n // console.log(response.data)\n console.log(\"Venue: \" + response.data[0].venue.name);\n console.log(\"Venue Location: \" + response.data[0].venue.city + \" \" + response.data[0].venue.country);\n\n var dateConv = response.data[0].datetime;\n var newDate = moment(dateConv).format('MM/DD/YYYY');\n console.log(newDate);\n // console.log(\"Event Date: \" + response.data[0].datetime);\n })\n}", "title": "" }, { "docid": "4bb6eed54c9f031293a3296a726df0c9", "score": "0.54447174", "text": "function concertThis(artist) {\n axios.get(`https://rest.bandsintown.com/artists/${artist}/events?app_id=codingbootcamp`).then(function (response) {\n let data = response.data;\n //Displays fields for each concert venue\n data.forEach(element => {\n let venueName = element.venue.name\n let venueLocation = element.venue.country + \", \" + element.venue.region + \", \" + element.venue.city\n console.log(`\\n${artist}`);\n console.log(venueName);\n console.log(venueLocation);\n console.log(moment(element.datetime).format('MMMM Do[,] YYYY'));\n });\n })\n\n .catch(err => console.log(err))\n}", "title": "" }, { "docid": "a077dc9534f81eec0574691e2a47de99", "score": "0.54407895", "text": "cleanOneCall(response) {\n let array = [];\n // loop through response to get daily UV index\n response.data.daily.forEach(function (el) {\n array.push(el.uvi);\n });\n // get only 5 days\n array.splice(-3);\n return array;\n }", "title": "" }, { "docid": "6a303be1dce4057c5a7011ae187e0119", "score": "0.5429593", "text": "static async getVaccineDataCountriesThirtyDays(){\n let res = await this.request(`data/vaccine/countries`);\n return res.data;\n}", "title": "" }, { "docid": "db2831687321282fa6974ae37803fb51", "score": "0.5426878", "text": "function getConcert(artist) {\n\n axios.get(\"https://rest.bandsintown.com/artists/\" + artist + \"/events?app_id=codingbootcamp\").then(function (response) {\n // If there are no concerts found, prints a message to the user telling them so.\n if (response.data.length === 0) {\n console.log('\\nZERO RESULTS FOUND.\\n');\n }\n // Otherwise, run normally. I made 'variable i' start at 1 for the sake of displaying the number of each response.\n for (i = 1; i < response.data.length + 1; i++) {\n // If the location doesn't have a region (areas in Europe), then don't print the empty region with an extra comma and white space.\n if (response.data[i - 1].venue.region === \"\") {\n console.log('\\n' + i + ':\\nVENUE NAME: \"' + response.data[i - 1].venue.name +\n '\"\\nVENUE LOCATION: \"' + response.data[i - 1].venue.city + \", \" + response.data[i - 1].venue.country +\n '\"\\nDATE OF THE VENUE: ' + moment(response.data[i - 1].datetime).format(\"MM/DD/YYYY\") + '\\n\\n-----------------------------------');\n }\n else {\n console.log('\\n' + i + '\\nVENUE NAME: \"' + response.data[i - 1].venue.name +\n '\"\\nVENUE LOCATION: \"' + response.data[i - 1].venue.city + \", \" + response.data[i - 1].venue.region + \", \" + response.data[i - 1].venue.country +\n '\"\\nDATE OF THE VENUE: ' + moment(response.data[i - 1].datetime).format(\"MM/DD/YYYY\") + '\\n\\n-----------------------------------');\n }\n }\n });\n}", "title": "" }, { "docid": "03cb06161d79eb30c3816423ab38df7d", "score": "0.5411105", "text": "function getHistoricalWeatherByCity(city_name, country_code){\r\n $(\"#add_data_label\").text(\"Histories\");\r\n var forecast_arr = [];\r\n for(var k = 6; k > 1; k--){\r\n let d_1 = new Date();\r\n let d_2 = new Date();\r\n d_1.setDate(d_1.getDate() - k);\r\n d_2.setDate(d_2.getDate() - k + 1);\r\n let start_date = d_1.getFullYear() + \"-\" + (d_1.getMonth() + 1) + \"-\" + d_1.getDate();\r\n let end_date = d_2.getFullYear() + \"-\" + (d_2.getMonth() + 1) + \"-\" + d_2.getDate();\r\n let api = `https://api.weatherbit.io/v2.0/history/daily?city=${city_name},${country_code}&start_date=${start_date}&end_date=${end_date}&units=I&key=${API_key}`;\r\n fetch(api)\r\n .then(function(response){\r\n let data = response.json();\r\n return data;\r\n })\r\n .then(function(data){\r\n let forecast = data.data[0]\r\n forecast_arr.push(forecast);\r\n forecast_arr.sort(function(a, b){\r\n let date_1 = new Date(a.datetime)\r\n var date_2 = new Date(b.datetime);\r\n if(date_1.getTime() > date_2.getTime()){\r\n return -1;\r\n }\r\n if(date_1.getTime() < date_2.getTime()){\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n return forecast_arr;\r\n })\r\n .then(function(data){\r\n var m = 4;\r\n data.forEach(function(res){\r\n $(\"#\"+date_element_arr[Number(m)]).text(res.datetime);\r\n $(\"#\"+icon_element_arr[Number(m)]).html(\"\");\r\n $(\"#\"+temp_element_arr[Number(m)]).text(Math.ceil(res.temp));\r\n $(\"#\"+humidity_element_arr[Number(m)]).text(res.rh);\r\n m--;\r\n })\r\n });\r\n }\r\n }", "title": "" }, { "docid": "465eaede255379eca95bfca6f747818f", "score": "0.5410849", "text": "function concertSearch() {\n axios.get(\"https://rest.bandsintown.com/artists/\" + searchTerm + \"/events?app_id=codingbootcamp\")\n .then(function (response) {\n console.log(response.data)\n for (let i = 0; i < response.data.length; i++) {\n console.log(\"venue name:\", response.data[i].venue.name)\n console.log(\"location of concert:\", response.data[i].venue.city, response.data[i].venue.country)\n console.log(\"venue event date:\", moment(response.data[i].datetime, \"YYYY-MM-DD\").format(\"MM/DD/YYYY\"))\n console.log(\" __________________________________________________\")\n }\n\n })\n}", "title": "" }, { "docid": "f2e6b94ec2905848838ed96353b2d40a", "score": "0.53941584", "text": "function bands() {\n axios\n .get(\n `https://rest.bandsintown.com/artists/${search}/events?app_id=codingbootcamp`\n )\n .then(function(response) {\n for (i = 0; i < response.data.length; i++){\n var date = response.data[i].datetime;\n date = moment(date).format(\"MM/DD/YYYY\");\n // console.log(JSON.stringify(response.data, null, 2));\n console.log(`Artist: ${response.data[i].lineup}`);\n console.log(`Venue Name: ${response.data[i].venue.name}`);\n console.log(`Location: ${response.data[i].venue.city}, ${response.data[i].venue.country}`);\n console.log(`Date: ${date}`);\n console.log(`---------------------`);\n }\n })\n .catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "c9e0a87b603b072efc4d4dcf117bf3e6", "score": "0.53904605", "text": "static getData() {\r\n const dateSpec = {\r\n startDate: new Date(new Date().setDate(new Date().getDate() - 7)),\r\n endDate: new Date()\r\n };\r\n\r\n return Promise.all([\r\n fetch('/api/weather/current').then(res => res.json()),\r\n fetch(`/api/weather?${qs.stringify(dateSpec)}`).then(res => res.json())\r\n ])\r\n .then(result => ({\r\n current: result[0],\r\n past: result[1].reports//.filter(r => r.sol !== result[0].sol)\r\n }));\r\n }", "title": "" }, { "docid": "c714082dda128bd35691e0c8e47b5c76", "score": "0.5379713", "text": "function get5DayData() {\n const search = searchTerm ? searchTerm : \"Mostar\";\n fetch(`${api.base_5_day}${search}&units=metric&APPID=${api.key}`)\n .then((response) => response.json())\n .then((data) => {\n if (data.cod !== \"404\") {\n setCityName(data.city.name);\n setTemperatureTomorrow(Math.round(data.list[7].main.temp));\n setTemperatureAfterTomorrow(Math.round(data.list[15].main.temp));\n setDescriptionTomorrow(data.list[7].weather[0].description);\n setDescriptionAfterTomorrow(data.list[15].weather[0].description);\n setImageTomorrow(data.list[7].weather[0].icon);\n setImageAfterTomorrow(data.list[15].weather[0].icon);\n } else {\n }\n });\n }", "title": "" }, { "docid": "626012c70d9ceaf71de1fcd277c1d8d8", "score": "0.53796446", "text": "async function getStateData(channel, query, yesterday = false) {\n const state = formatState(join(query, ' ')); // Format the query\n try {\n /* eslint-disable-next-line */\n const stateData = yesterday ? await api.yesterday.states({ state }) : await api.states({ state }); // Get the data\n const {\n cases,\n todayCases,\n deaths,\n todayDeaths,\n active,\n } = pick(stateData, ['cases', 'todayCases', 'deaths', 'todayDeaths', 'active']);\n const recovered = cases - deaths - active; // Derive the number of recovered COVID cases\n \n // Build the message\n let message = `As of the latest update, the current COVID-19 numbers in ${v.titleCase(state)} are:\\n\\n`;\n if (yesterday) {\n message = `As of yesterday, the COVID-19 numbers in ${state} are:\\n\\n`;\n }\n message += `Total Cases: ${numeral(cases).format('0,0')}${state === 'Oregon' ? '*' : ''}\\n`\n + `Deaths: ${numeral(deaths).format('0,0')}\\n`\n + `Recovered: ${numeral(recovered).format('0,0')}\\n`\n + `Active Cases: ${numeral(active).format('0,0')}${state === 'Oregon' ? '*' : ''}\\n\\n`\n + `New Cases Reported ${yesterday ? 'Yesterday' : 'So Far Today'}: ${numeral(todayCases).format('0,0')}${state === 'Oregon' ? '*' : ''}\\n`\n + `New Deaths Reported ${yesterday ? 'Yesterday' : 'So Far Today'}: ${numeral(todayDeaths).format('0,0')}\\n\\n`\n + `${state === 'Oregon' ? '* Since May 5, 2020, Oregon discloses both confirmed and presumptive cases.\\n\\n' : ''}`\n + 'NOTE: Worldometers tends to reset their daily counts at around 5-5:30pm PT, '\n + 'so if it is currently later in the day and the daily count is at 0 or otherwise curiously low, you may need to add \\'yesterday\\' to the end of your message to see today\\'s counts. This also means yesterday\\'s numbers will not be viewable after this point, as Worldometers has already reset their daily clock.';\n\n channel.send(message); // Send the message\n } catch (error) {\n console.log(error);\n channel.send(`My apologies. I wasn't able to get the numbers for ${state}.`);\n }\n}", "title": "" }, { "docid": "e1daaa811d09662c42ac776350d05d4d", "score": "0.5376072", "text": "function fetchTotalChart(chart) {\r\n console.log(\"fetching total chart\");\r\n var resultsDate = [];\r\n var resultsActiveTotal = 0;\r\n var resultsConfirmedTotal = 0;\r\n var resultsRecoveredTotal = 0;\r\n var resultsDeadTotal = 0;\r\n\r\n\r\n fetch(\"https://pomber.github.io/covid19/timeseries.json\") //request data asynchronously\r\n .then(response => response.json())\r\n .then(function (data) {\r\n var countries = Object.values(data);\r\n var days = Object.values(data)[0]; //[0]\r\n // console.log(countryValues[68][days].deaths); // [country][days]\r\n console.log(countries);\r\n console.log(days.length);\r\n\r\n /* var c;\r\n var d; \r\n for (c =0; c < countries.length; c++){ // c for country\r\n let country = countries[c];\r\n for (d = 0; d < days.length - 1; d++){ // d for day\r\n \r\n console.log(country[0].confirmed);\r\n totalConfirmedDay = totalConfirmedDay + country[d].confirmed;\r\n \r\n \r\n \r\n }\r\n } */\r\n var d;\r\n var c;\r\n for (d = 0; d < days.length; d++) {\r\n // let deadTotal =\r\n // console.log(countries);\r\n for (c = 0; c < countries.length; c++) {\r\n\r\n }\r\n\r\n }\r\n\r\n })\r\n\r\n}", "title": "" }, { "docid": "444f1ad75aabb0077135349eb74c6307", "score": "0.5354087", "text": "function concert() {\n let artist = userInput;\n axios.get(\"https://rest.bandsintown.com/artists/\" + artist + \"/events?app_id=codingbootcamp\").then(function (response) {\n for (let i = 0; i < 1; i++) {\n console.log(\"Venue: \", response.data[i].venue.name);\n console.log(\"Location: \", response.data[i].venue.city, \"-\", response.data[i].venue.country);\n console.log(\"Date: \", moment(response.data[i].datetime).format(\"MM-DD-YYYY\"));\n };\n });\n}", "title": "" }, { "docid": "65aaed4fa52e5c4d10966a9f740e1c48", "score": "0.5341268", "text": "function GetUSACovidDeathsPerDay() {\n\n $.ajax({\n async: true,\n type: 'GET',\n url: \"https://disease.sh/v3/covid-19/historical/USA?lastdays=all\",\n success: function (data) {\n //console.log(data);\n\n\n //callback\n var tempDates = Object.keys(data.timeline.deaths);\n var tempCases = Object.values(data.timeline.deaths);\n var changesPerDay = [];\n\n\n changesPerDay[0] = 0; //First element = 0 because we start with 0 new cases\n for (var i = 1; i < tempCases.length; i++) {\n //Fix outlier data from API\n changesPerDay[i] = tempCases[i] - tempCases[i - 1];\n //console.log(changesPerDay[i]);\n if (changesPerDay[i] > 1000000) {\n changesPerDay[i] = changesPerDay[i - 1];\n }\n //console.log(changesPerDay[i]);\n\n }\n GRAPH.options.title.display = true;\n GRAPH.options.title.text = \"US Covid Daily Deaths\";\n GRAPH.options.scales.yAxes[0].scaleLabel.labelString = \"Number of Deaths\";\n\n GRAPH.data.datasets[0].pointRadius = 0;\n GRAPH.data.labels = tempDates;\n GRAPH.data.datasets[0].data = changesPerDay;\n GRAPH.update();\n\n }\n });\n\n}", "title": "" }, { "docid": "3a81e4703c0c1323a15b583aa011b710", "score": "0.532014", "text": "async function covidOverTimeUpdate() {\n const res = await axios.get(`https://api.covidtracking.com/v1/us/daily.json`);\n const data = res.data;\n posChartData(data);\n timeDateData(data);\n currentPosMax(data);\n currentMortMax(data);\n usDeaths(data);\n positiveRateOfChange(data);\n initChartPositive();\n initMortChart();\n initActiveChart();\n // console.log(data);\n}", "title": "" }, { "docid": "e47d6f7aaf505d198e77ee42cb76ec0f", "score": "0.53142893", "text": "static async getGlobalVaccineDataTotalThirtyDays(){\n let res = await this.request(`data/vaccine/global-total`);\n return res.data;\n}", "title": "" }, { "docid": "aa95f8afdcc62d55a4df3c26805a365a", "score": "0.5309539", "text": "function searchConcert() {\n axios.get(\"https://rest.bandsintown.com/artists/\" + searchTerm + \"/events?app_id=codingbootcamp\").then(\n function (response) {\n var concert = response.data[0];\n var dateTime = JSON.stringify(concert.datetime);\n console.log(divider);\n console.log(\"\\nVenue Name: \" + JSON.stringify(concert.venue.name));\n console.log(\"\\nVenue Location: \" + JSON.stringify(concert.venue.city) + ',' + JSON.stringify(concert.venue.country));\n console.log(\"\\nEvent Date: \" + moment(dateTime,\"YYYY-MM-DDTHH:mm:ss\").format(\"MM/DD/YYYY\"));\n console.log(divider);\n //log();\n }\n );\n}", "title": "" }, { "docid": "73a1bb149512489a6287d0fad0325cf8", "score": "0.5290442", "text": "async function statewiseDailyConfirmedData() {\n\tconst url = \"http://api.covid19india.org/states_daily_csv/confirmed.csv\";\n\treturn r2(url).text;\n}", "title": "" }, { "docid": "a1b96089140c5ed053650a3f14a7094f", "score": "0.52889836", "text": "function concertThis() {\n\n // Request is sent for concert info from api & displaed to the console based on searc paramenters\n var queryURL = \"https://rest.bandsintown.com/artists/\" + userQuery + \"/events?app_id=codingbootcamp\";\n\n axios.get(queryURL).then(\n function (response) {\n fs.writeFile(\"log/concert.json\", JSON.stringify(response.data, null, 2), function (err) {\n if (err) console.log(err);\n });\n console.log(response.data[0].venue.name);\n // console.log(\"Name of the venue: \" + response.data.Venue);\n console.log(response.data[0].venue.city + \" \" + response.data[0].venue.region);\n console.log(response.data[0].datetime);\n\n }\n );\n}", "title": "" }, { "docid": "d2b9ec46dc836639f81166a8637bf8fc", "score": "0.52743953", "text": "async function loadTimeSeriesData() {\n\tconst url = \"https://api.covid19india.org/data.json\";\n\treturn r2(url).json;\n}", "title": "" }, { "docid": "b431326ed1e4385adb02437da1d0961c", "score": "0.5273746", "text": "static async getVaccineDataUSStates(days){\n let res = await this.request(`data/vaccine/us-states/${days}`);\n return res.data;\n}", "title": "" }, { "docid": "4dc5e3a439fa9ce2fbc5195ae2170c4f", "score": "0.52638775", "text": "async getCurrentDayValues(){\n const url = this.getCurrentDayUrl(this.parameter);\n let values = []\n // fetches data from the provided url\n try{\n const response = await this.fetchTimeOut(url, { timeout: 10000 });\n if (response.ok){\n const result = await response.json();\n const records = await result.value.timeSeries[0].values;\n \n // gets the current day values\n records[0].value.forEach((value)=>{\n let timeValue = {};\n timeValue.value = value.value;\n timeValue.dateTime = value.dateTime;\n values.push(timeValue);\n })\n }\n } catch(error){ console.log(error) }\n\n return values;\n }", "title": "" }, { "docid": "ae1e9a31798b69b0e15b8f51683718a6", "score": "0.5263367", "text": "function concertThis(input2) {\n axios\n .get(\n \"https://rest.bandsintown.com/artists/\" +\n input2 +\n \"/events?app_id=codingbootcamp\"\n )\n // This will handle the response in a loop\n .then(function (response) {\n for (var i = 0; i < response.data.length; i++) {\n var datetime = response.data[i].datetime;\n var concertResults =\n \"--------------------------------------------------------------------\" +\n \"\\nVenue Name: \" +\n response.data[i].venue.name +\n \"\\nVenue Location: \" +\n response.data[i].venue.city +\n \"\\nDate of the Event: \" +\n moment(datetime, \"YYYY-MM-DD\").format(\"MM/DD/YYYY\");\n console.log(concertResults);\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "616d174b80880385a9ddd0076f6dae9f", "score": "0.52628756", "text": "static async getVaccineDataUSState(state, days){\n let res = await this.request(`data/vaccine/us-state/${state}/${days}`);\n return res.data;\n}", "title": "" }, { "docid": "d26263285de0d1bc9ca523344b194bd4", "score": "0.5260287", "text": "function GetTodayPriceInfo(){\n\tvar url = 'http://211.237.50.150:7080/openapi/' + ServiceKey + '/json/Grid_20141119000000000012_1/'+ TodayPriceInfo.getStartIdx() + '/' + TodayPriceInfo.getEndIdx() + '/';\n\n\tvar week = new Array('Sun', 'Mon', 'Tue', 'Wen', 'Thr', 'Fri', 'Sat');\n\tvar tempdate = new Date();\n\tvar date = new Date(tempdate.getFullYear(),tempdate.getMonth(), tempdate.getDate() - 3);\n\tvar tempweek = week[date.getDay()];\n\tif(tempweek == 'Sun')\n\t\tdate = new Date(tempdate.getFullYear(),tempdate.getMonth(), tempdate.getDate() - 4);\n\tvar today = String(date.getFullYear()) + (date.getMonth() + 1 < 10 ? '0' + String(date.getMonth() + 1) : String(date.getMonth() + 1)) \n\t+ (date.getDate() < 10 ? '0' + String(date.getDate()) : String(date.getDate()));\n\n\trequest({\n url: url,\n\t\tmethod: 'GET',\n\t\tqs:{\n\t\t\tAUCNG_DE: today\n\t\t}\n }, function (error, response, body) {\n\t\tif(error){\n\t\t\tconsole.log('GetTodayPriceInfo request module error : ' + err);\n\t\t\treturn;\n\t\t}\n\n\t\tif(yesterday == today)\n\t\t\treturn;\n\t\t\n\t\tvar jsondata = JSON.parse(body);\n\n\t\tif(TodayPriceInfo.getTotalCount() == -1002 ){\n\t\t\tjsonStr = new Array();\n\t\t\tTodayPriceInfo.setTotalCount(jsondata.Grid_20141119000000000012_1.totalCnt); \t\n\t\t}\n\n\t\tjsondata = jsondata.Grid_20141119000000000012_1.row;\n\t\tvar length = Object.keys(jsondata).length;\n\n\t\tconsole.log('TodayPriceInfo i_0 : ' + TodayPriceInfo.getStartIdx());\n\t\tconsole.log('TodayPriceInfo totalouCnt : ' +TodayPriceInfo.getTotalCount());\n\t\tconsole.log('TodayPriceInfo length : ' + length);\n\n\t\tfor(TodayPriceInfo.setJ(0); TodayPriceInfo.getJ() < length; TodayPriceInfo.setJ(TodayPriceInfo.getJ() + 1))\n\t\t\ttemp.push(jsondata[TodayPriceInfo.getJ()]);\n\n\t\tTodayPriceInfo.setTotalCount(TodayPriceInfo.getTotalCount() - 1000);\n\t\tTodayPriceInfo.setStartIdx(TodayPriceInfo.getStartIdx() + 1000);\n\t\tTodayPriceInfo.setEndIdx(TodayPriceInfo.getEndIdx() + 1000);\n\t\tTodayPriceInfo.setDebugSum(length);\n\n\t\tif(TodayPriceInfo.getTotalCount() <= 0){\n\t\t\tconsole.log('-------------------TodayPriceInfo SUM : ' + TodayPriceInfo.getDebugSum());\n\t\t\t\n\t\t\tvar r,c;\n\t\t\t\n\t\t\tfor(r = 0; r < temp.length - 2; r++){\n\t\t\t\tvar temp2 = new Array();\n\t\t\t\tvar k;\n\t\t\t\tvar flag1 = 0\n\t\t\t\tfor(k = 0; k < jsonStr.length; k++){\n\t\t\t\t\tif(jsonStr[k].PRDLST_NM == temp[r].PRDLST_NM && jsonStr[k].SPCIES_NM == temp[r].SPCIES_NM){\n\t\t\t\t\t\tflag1 = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(flag1 == 1)\n\t\t\t\t\t\tcontinue;\n\t\t\t\ttemp2.push(temp[r]);\n\t\t\t\tfor(c = r + 1; c < temp.length; c++){\n\t\t\t\t\tif(temp[r].PRDLST_NM == temp[c].PRDLST_NM && temp[r].SPCIES_NM == temp[c].SPCIES_NM){\n\t\t\t\t\t\ttemp2.push(temp[c]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttemp2.sort(function (a, b) { \n\t\t\t\t\treturn a.DELNGBUNDLE_QY < b.DELNGBUNDLE_QY ? -1 : a.DELNGBUNDLE_QY > b.DELNGBUNDLE_QY ? 1 : 0; \n\t\t\t\t});\n\t\t\t\tvar median = parseInt(temp2.length/2)\n\t\t\t\tvar cnt = 0;\n\t\t\t\tvar sum = 0;\n\t\t\t\tvar avg = 0;\n\n\t\t\t\tvar idx;\n\t\t\t\tfor(idx = 0; idx < temp2.length; idx++){\n\t\t\t\t\tif(temp2[median].DELNGBUNDLE_QY == temp2[idx].DELNGBUNDLE_QY){\n\t\t\t\t\t\tsum += temp2[idx].AVRG_AMT / (temp2[idx].DELNGBUNDLE_QY * 10);\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tavg = sum / cnt;\n\t\t\t\ttemp2[median].AVRG_AMT = avg;\n\t\t\t\tvar obj = new Object();\n\t\t\t\tobj.PRDLST_NM = temp2[median].PRDLST_NM;\n\t\t\t\tobj.SPCIES_NM = temp2[median].SPCIES_NM;\n\t\t\t\tobj.SPCIES_CD = temp2[median].SPCIES_CD;\n\t\t\t\tobj.WEIGHT_VAL = temp2[median].DELNGBUNDLE_QY;\n\t\t\t\tobj.AVGPRICE = avg;\n\n\t\t\t\tjsonStr.push(obj);\n\t\t\t}\n\t\t\tTodayPriceInfo.setTotalCount(-1002);\n\t\t\tTodayPriceInfo.setStartIdx(1);\n\t\t\tTodayPriceInfo.setEndIdx(1000);\n\t\t\tyesterday = today;\n\t\t\tMakeTodaySpecialPrice();\n\t\t\treturn;\n\t\t}\t\n\t\tGetTodayPriceInfo();\n\t});\n}", "title": "" }, { "docid": "1bc1f8d333fc164bad60ec8a3c2db6be", "score": "0.5255066", "text": "async function getWorldData(channel, yesterday = false) {\n try {\n const data = yesterday ? await api.yesterday.all() : await api.all(); // Get data\n const {\n cases,\n todayCases,\n deaths,\n todayDeaths,\n recovered,\n active,\n critical,\n casesPerOneMillion,\n deathsPerOneMillion,\n updated,\n } = pick(data, ['cases', 'todayCases', 'deaths', 'todayDeaths', 'recovered', 'active', 'critical', 'casesPerOneMillion', 'deathsPerOneMillion', 'updated']);\n const dateLastUpdated = moment(updated).fromNow(); // Format the date the data was last updated on\n \n // Build the message\n let message = `As of ${dateLastUpdated}, the current worldwide COVID-19 numbers are:\\n\\n`;\n if (yesterday) {\n message = 'As of yesterday, the worldwide COVID-19 numbers were:\\n\\n';\n }\n message += `Total Cases: ${cases.toLocaleString('en')}\\n`\n + `Deaths: ${numeral(deaths).format('0,0')}\\n`\n + `Recovered: ${numeral(recovered).format('0,0')}\\n`\n + `In Critical Condition: ${numeral(critical).format('0,0')}\\n`\n + `Active Cases: ${numeral(active).format('0,0')}\\n\\n`\n + `Cases Per Million: ${numeral(casesPerOneMillion).format('0,0')}\\n`\n + `Deaths Per Million: ${numeral(deathsPerOneMillion).format('0,0')}\\n\\n`\n + `New Cases Reported ${yesterday ? 'Yesterday' : 'So Far Today'}: ${numeral(todayCases).format('0,0')}\\n`\n + `New Deaths Reported ${yesterday ? 'Yesterday' : 'So Far Today'}: ${numeral(todayDeaths).format('0,0')}\\n\\n`\n + 'NOTE: Worldometers tends to reset their daily counts at around 5-5:30pm PT, '\n + 'so if it is currently later in the day and the daily count is at 0 or otherwise curiously low, you may need to add \\'yesterday\\' to the end of your message to see today\\'s counts. This also means yesterday\\'s numbers will not be viewable after this point, as Worldometers has already reset their daily clock.';\n\n channel.send(message); // Send the message\n } catch (error) {\n console.log(error);\n channel.send('My apologies. I wasn\\'t able to get the worldwide numbers.');\n }\n}", "title": "" }, { "docid": "37a7da998fd14b8a4a66eee13418de3e", "score": "0.5251295", "text": "function fetchHistoricalData() {\n // Get the selected date from the input element\n const selectedDate = document.getElementById(\"datePicker\").value;\n\n // Construct the API URL with the selected date\n const apiUrl = `https://coronavirus-monitor.p.rapidapi.com/coronavirus/cases_by_country.php`;\n\n fetch(apiUrl, {\n method: \"GET\",\n headers: {\n 'X-RapidAPI-Key': 'edd2277260mshf152755896d31e4p195aadjsn63b6c16d27fd',\n 'X-RapidAPI-Host': 'coronavirus-monitor.p.rapidapi.com'\n }\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n return response.json();\n })\n .then(data => {\n\n console.log(data);\n let countries_stat = data.countries_stat;\n // Process and display the historical data here\n for (let i = 0; i < countries_stat.length; i++) {\n console.log(countries_stat[i]);\n // Inserting new rows inside the table\n let row = table.insertRow(i + 1);\n let country_name = row.insertCell(0);\n let cases = row.insertCell(1);\n let deaths = row.insertCell(2);\n let recovered_per_country = row.insertCell(3);\n let new_cases = row.insertCell(4);\n let new_deaths = row.insertCell(5);\n country_name.innerHTML = countries_stat[i].country_name;\n cases.innerHTML = countries_stat[i].cases;\n deaths.innerHTML = countries_stat[i].deaths;\n recovered_per_country.innerHTML = countries_stat[i].total_recovered;\n new_cases.innerHTML = countries_stat[i].new_cases;\n new_deaths.innerHTML = countries_stat[i].new_deaths;\n }\n })\n .catch(error => {\n console.error('Fetch error:', error);\n });\n }", "title": "" }, { "docid": "0f5d3000a6ffa13fd2c011a1e5d04386", "score": "0.5249245", "text": "static async getVaccineDataCountry(country, days){\n let res = await this.request(`data/vaccine/country/${country}/${days}`);\n return res.data; \n}", "title": "" }, { "docid": "d75a58f1c66b57509c28050f4c198b75", "score": "0.52373177", "text": "static async getVaccineDataCountries(days){\n let res = await this.request(`data/vaccine/countries/${days}`);\n return res.data;\n}", "title": "" }, { "docid": "4bd19deb4039a9f1ac37fb342ef88c92", "score": "0.5233125", "text": "function concertThis(queryString) {\n if(!queryString) {\n console.log(\"No query provided - please enter the name of an artist or group.\");\n return;\n }\n // Set query string\n var query = \"https://rest.bandsintown.com/artists/\" + queryString + \"/events?app_id=\" + keys.bandsInTown.id;\n\n // Run get request\n axios.get(query)\n .then(function (response) {\n // Check to see if the artist in question has any upcoming shows\n if (response.data.length > 0) {\n console.log('\\n-------------------\\n');\n for (var i = 0; i < response.data.length; i++) {\n // Parse JSON into concert object properties\n var concert = {};\n concert.venue = response.data[i].venue.name;\n concert.city = response.data[i].venue.city;\n concert.region = response.data[i].venue.region;\n concert.country = response.data[i].venue.country;\n concert.date = response.data[i].datetime.split('T');\n\n // Not all concerts have a region associated with them, so set location as appropriate \n if (concert.region) {\n concert.location = concert.city + ', ' + concert.region + ', ' + concert.country;\n } else {\n concert.location = concert.city + ', ' + concert.country;\n }\n\n // Print output\n console.log(\"Venue: \" + concert.venue);\n console.log(\"Location: \" + concert.location);\n console.log(\"Date: \" + moment(concert.date[0], 'YYYY-MM-DD').format('MM/DD/YYYY'));\n console.log('\\n-------------------\\n');\n }\n } else {\n // Alert user if song is not found\n console.log(\"No upcoming concerts found for that artist.\");\n }\n })\n .catch(function (error) {\n console.log(\"No upcoming concerts found for that artist.\");\n });\n}", "title": "" }, { "docid": "ef7935a87fbbfb53151b234ed223831c", "score": "0.5222436", "text": "function searchBands(search) {\n axios.get(\"https://rest.bandsintown.com/artists/\" + search + \"/events?app_id=\" + keys.bit.key)\n .then(function (response) {\n response = response.data;\n for (i = 0; i < response.length; i++) {\n console.log(\"Venue: \" + response[i].venue.name);\n console.log(\"Location: \" + response[i].venue.city);\n let convertedDate = moment(response[i].datetime, \"YYYY-MM-DD\").format(\"MM/DD/YYYY\")\n console.log(\"Date: \" + convertedDate);\n console.log(\"______________________\");\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "8a788895b63ab4ed83410df895f9413d", "score": "0.52179796", "text": "static async getGlobalVaccineData(days){\n let res = await this.request(`data/vaccine/global-total/${days}`);\n return res.data;\n}", "title": "" }, { "docid": "6f6655b1245f4224a5c1c68b1fe4ae09", "score": "0.52108586", "text": "function fetchData(country, chart) {\r\n var resultsDate = [];\r\n var resultsActive = [];\r\n var resultsRecovered = [];\r\n var resultsDead = [];\r\n var resultsConfirmed = [];\r\n\r\n var resultsEmpty = [];\r\n var resultsDateSinceFirstDay = [];\r\n var resultsRecoveredSinceFirstDay = [];\r\n var resultsDeadSinceFirstDay = [];\r\n var resultsConfirmedSinceFirstDay = [];\r\n\r\n\r\n fetch(\"https://pomber.github.io/covid19/timeseries.json\") //request data asynchronously\r\n .then(response => response.json())\r\n .then(data => {\r\n\r\n data[country].forEach(({ date, confirmed, recovered, deaths }) => {\r\n resultsDate.push(date) //Date.parse()\r\n resultsActive.push(confirmed - recovered - deaths)\r\n resultsRecovered.push(recovered)\r\n resultsDead.push(deaths)\r\n resultsConfirmed.push(confirmed)\r\n\r\n if (confirmed === 0) {\r\n resultsEmpty.push(confirmed);\r\n\r\n }\r\n })\r\n console.log(\"Days without incident: \" + resultsEmpty.length);\r\n\r\n //sets the aspectRatio so that the chart doesn't cover the whole screen or is squeezed\r\n chart.aspectRatio = 3;\r\n const newLocal = chart.options = {\r\n title: {\r\n display: true,\r\n text: country\r\n },\r\n scales: {\r\n yAxes: [\r\n {\r\n type: 'linear',\r\n position: 'right'\r\n }\r\n ]\r\n },\r\n layout: {\r\n padding: {\r\n left: 0,\r\n right: 20,\r\n top: 0,\r\n bottom: 0\r\n }\r\n }\r\n };\r\n\r\n\r\n chart.data = {\r\n labels: resultsDate,\r\n datasets: [\r\n\r\n {\r\n label: \"active cases\",\r\n data: resultsActive, //testDate //[resultsActive]\r\n borderColor: \"yellow\",\r\n fill: false\r\n },\r\n {\r\n label: \"confirmed\",\r\n data: resultsConfirmed,\r\n borderColor: \"grey\"\r\n },\r\n {\r\n label: \"recovered\",\r\n data: resultsRecovered,\r\n borderColor: \"green\"\r\n },\r\n {\r\n label: \"dead\",\r\n data: resultsDead,\r\n borderColor: \"red\"\r\n }\r\n\r\n ]\r\n\r\n }\r\n\r\n chart.update();\r\n\r\n /* Ziyang Dai: echart: pie chart */\r\n var myChart = echarts.init(document.getElementById('main'));\r\n var showdata = data[country][data[country].length - 1];\r\n var activedata = showdata.confirmed - showdata.deaths - showdata.recovered;\r\n\r\n\r\n\r\n option = {\r\n tooltip: {\r\n trigger: 'item',\r\n formatter: '{a} <br/>{b} : {c} ({d}%)'\r\n },\r\n series: [{\r\n name: 'data',\r\n type: 'pie',\r\n radius: '50',\r\n center: ['50%', '50%'],\r\n data: [{\r\n value: activedata,\r\n name: 'active'\r\n },\r\n {\r\n value: showdata.deaths,\r\n name: 'deaths'\r\n },\r\n {\r\n value: showdata.recovered,\r\n name: 'recovered'\r\n }\r\n ],\r\n emphasis: {\r\n itemStyle: {\r\n shadowBlur: 10,\r\n shadowOffsetX: 0,\r\n shadowColor: 'rgba(0, 0, 0, 0.5)'\r\n }\r\n }\r\n }]\r\n };\r\n myChart.setOption(option);\r\n\r\n //bar chart\r\n var myChart2 = echarts.init(document.getElementById('main2'));\r\n var showdata2 = data[country][data[country].length - 1];\r\n var activedata2 = showdata2.confirmed - showdata2.deaths - showdata2.recovered;\r\n option2 = {\r\n color: ['#1A5276'],\r\n tooltip: {\r\n trigger: 'axis',\r\n axisPointer: {\r\n type: 'shadow'\r\n }\r\n },\r\n grid: {\r\n left: '3%',\r\n right: '4%',\r\n bottom: '2%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n data: ['confirmed', 'active', 'deaths', 'recovered'],\r\n axisTick: {\r\n alignWithLabel: true\r\n }\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value'\r\n }\r\n ],\r\n series: [\r\n {\r\n name: 'data',\r\n type: 'bar',\r\n barWidth: '60%',\r\n data: [\r\n {\r\n value: showdata2.confirmed,\r\n name: 'confirmed'\r\n },\r\n {\r\n value: activedata2,\r\n name: 'active'\r\n },\r\n {\r\n value: showdata2.deaths,\r\n name: 'deaths'\r\n },\r\n {\r\n value: showdata2.recovered,\r\n name: 'recovered'\r\n }\r\n ],\r\n }\r\n ]\r\n };\r\n myChart2.setOption(option2);\r\n\r\n //rate \r\n var myChart3 = echarts.init(document.getElementById('main3'));\r\n var mColor = [\"red\", \"green\"];\r\n option3 = {\r\n\r\n grid: {\r\n top: \"10%\",\r\n left: \"22%\",\r\n bottom: \"10%\",\r\n containLabel: true\r\n },\r\n xAxis: {\r\n show: false\r\n },\r\n\r\n yAxis: [\r\n {\r\n type: 'category',\r\n data: ['Mortality rate', 'Recovery rate'],\r\n\r\n axisLine: {\r\n show: false\r\n },\r\n aixsTick: {\r\n show: false\r\n }\r\n }, {\r\n show: true,\r\n data: [showdata.deaths, showdata.recovered],\r\n axisLine: {\r\n show: false\r\n },\r\n aixsLabel: {\r\n show: false\r\n }\r\n },\r\n\r\n ],\r\n series: [\r\n {\r\n name: \"country\",\r\n type: 'bar',\r\n data: [Math.round((showdata.deaths / showdata.confirmed) * 10000) / 100, Math.round((showdata.recovered / showdata.confirmed) * 10000) / 100],\r\n yAxisIndex: 0,\r\n itemStyle: {\r\n barBorderRadius: 20,\r\n color: function (params) {\r\n return mColor[params.dataIndex];\r\n }\r\n },\r\n barCategoryGap: 20,\r\n barWidth: 10,\r\n label: {\r\n show: true,\r\n position: \"insideLeft\",\r\n formatter: \"{c}%\"\r\n }\r\n },\r\n {\r\n name: \"confirmedcase\",\r\n type: 'bar',\r\n data: [100, 100],\r\n itemStyle: {\r\n color: \"none\",\r\n borderColor: \"black\",\r\n borderWidth: 3,\r\n barBorderRadius: 15\r\n },\r\n yAxisIndex: 1,\r\n barCategoryGap: 50,\r\n barWidth: 15\r\n }\r\n ]\r\n };\r\n\r\n myChart3.setOption(option3);\r\n\r\n })\r\n\r\n}", "title": "" }, { "docid": "9443b51f262d3417aa1b0d7331edfeac", "score": "0.5209966", "text": "function revHotelRespAPICall__ThisYear() {\n fetch('https://adevu-metric-dashboard.herokuapp.com/getHotelRespThisYear')\n .then(response => response.json())\n .then(data => loadRevHotelRespData__ThisYear(data));\n}", "title": "" }, { "docid": "b5b3c28574dffb2c5b7c00423e37c2e4", "score": "0.5207293", "text": "function getConcerts(name) {\n // get key from .env\n let apiKey = keys.apiKeys.bitKey;\n\n // format name for URL\n urlname = name.split(\" \").join(\"%20\");\n console.log(urlname);\n const URL = `https://rest.bandsintown.com/artists/${urlname}/events?app_id=${apiKey}`;\n\n // display a heading\n console.log(`\\n--------Upcoming ${name} Concerts:--------\\n`);\n\n // send request\n axios.get(URL).then(function(res) {\n //loop through returned concerts\n for (let i = 0; i < res.data.length; i++) {\n let date = moment(res.data[i].datetime).format(\"lll\");\n console.log(`${date}\n Lineup: ${res.data[i].lineup}\n Location: ${res.data[i].venue.city}, ${res.data[i].venue.country}\n Venue: ${res.data[i].venue.name}\n \\n------------------------------------------------\\n`);\n }\n\n // render menu\n displayPrompt();\n });\n}", "title": "" }, { "docid": "12c3d7d9a8a33bfe5a77770a6bff5839", "score": "0.51970524", "text": "function concertThisResult() {\n\n axios.get(\"https://rest.bandsintown.com/artists/\" + commandTwo + \"/events?app_id=codingbootcamp\")\n .then(res => {\n\n var datetime = moment(res.data[0].datetime);\n\n var DateOfEvent = datetime.format(\"MM-DD-YYYY\");\n console.log(chalk.yellow(res.data[0].venue.name));\n console.log(chalk.yellow(res.data[0].venue.city));\n console.log(chalk.yellow(DateOfEvent));\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "42624a266ce883ddd3d8f4fce154868b", "score": "0.51833487", "text": "function concertThis() {\n value = process.argv[3];\n if (value === undefined || value === \"\") {\n value = \"I Want it That Way\"\n }\n console.log(value);\n axios.get(\"https://rest.bandsintown.com/artists/\" + value + \"/events?app_id=\" + process.env.bandsInTnKey)\n .then(function (response) {\n for (i = 0; i < 11; i++) {\n\n console.log(\"--------------------------\")\n console.log(\"The list is all bands\")\n console.log(response.data[i].venue.city)\n console.log(response.data[i].datetime)\n time = response.data[i].datetime;\n var eventDate = moment(time).format('MMMM Do YYYY')\n console.log(\"This is the date: \" + eventDate)\n console.log(\"--------------------------\");\n logger.write(\"Concert-this has a venue named \" + response.data[i].venue.name + \" \\n\");\n logger.write(\"The location of the venue is \" + response.data[i].venue.city + \" \\n\");\n logger.write(\"The date at the venue is \" + eventDate + \" \\n\");\n\n }\n })\n .catch(function (error) {\n console.log(\"Axios Error: \", error);\n })\n}", "title": "" }, { "docid": "529c9bb76890fc40723f5f821ca8e338", "score": "0.5182368", "text": "getReconciliationToday(params) {\n return this.get(`api/companies/${params.companyId}/store/${params.storeId}/reconciliationToday/${params.currentDate}`);\n }", "title": "" }, { "docid": "8c1b7526374f3d2197df35f3ea3a2fc1", "score": "0.5177439", "text": "function bitThis() {\n console.log(userInput);\n axios.get(`https://rest.bandsintown.com/artists/${userInput.trim()}/events?app_id=codingbootcamp`).then(\n function (response) {\n for (var i = 0; i < response.data.length; i++) {\n\n console.log(\"========================================\")\n console.log(response.data[i].venue.name);\n console.log(response.data[i].venue.city);\n console.log(moment(response.data[i]).format(\"MM-DD-YYYY\"));\n console.log(\"========================================\")\n }\n }\n )\n}", "title": "" }, { "docid": "0493a4f26c9aa87908f2ecfa3fd41473", "score": "0.51707983", "text": "function concertThis(userInput) {\n var artist = userInput;\n var url = \"https://rest.bandsintown.com/artists/\" + artist + \"/events?app_id=codingbootcamp\";\n for (var i=0; i < response.data.length; i++){\n console.log(\"-------------------------------------\")\n console.log(\"Name of Venue: \" + response.data[i].venue.name);\n console.log(\"Venue Location: \" + response.data[i].venue.city);\n console.log(\"Date: \" + moment (response.data[i].date, 'MM/DD/YYYY').format(\"MM/DD/YYYY\"));\n console.log(\"-------------------------------------\");\n }\n }", "title": "" }, { "docid": "8389a6ef1554a28c18fd65f43049b0d2", "score": "0.5168579", "text": "function concertSearch(searchTerm) {\n\n // Then run a request with axios to the OMDB API with the movie specified\n var queryUrl = \"https://rest.bandsintown.com/artists/\" + searchTerm + \"/events?app_id=codingbootcamp\";\n\n axios.get(queryUrl).then(\n function (response) {\n var objectReturned = response.data;\n for (i = 0; i < objectReturned.length; i++) {\n console.log(objectReturned[i].venue.name);\n console.log(objectReturned[i].venue.city);\n console.log(moment(objectReturned[i].datetime).format(\"MM/DD/YYYY\"));\n console.log(\"__________________________\");\n\n }\n }\n );\n}", "title": "" }, { "docid": "b1cdbcb751c7f4da34262d8fe8f73f30", "score": "0.5160431", "text": "function concertThis(random) {\n var band = input.slice(3).join(\" \");\n if (!band) {\n band = \"metallica\";\n }\n if (random) {\n band = random;\n }\n var queryURL =\n \"https://rest.bandsintown.com/artists/\" +\n band +\n \"/events/?app_id=b7b374713cf3e2cf710b82eac648971e\";\n\n axios.get(queryURL).then(\n function(response) {\n if (response.data.length === 0) {\n console.log(\"This artist has no upcoming shows\");\n } else if (response.data[1] === \"w\") {\n console.log(\"No artist found\");\n } else {\n console.log(\n \"Here are some upcoming shows for \" +\n band +\n \".\\n------------------------------------------------------\"\n );\n var searchType = \"Concert search\";\n var shows = \"\";\n for (i = 0; i < 3 && i < response.data.length; i++) {\n console.log(response.data[i].venue.name);\n console.log(response.data[i].venue.city);\n console.log(moment(response.data[i].datetime).format(\"MM/DD/YYYY\"));\n console.log(\"\\n\");\n shows +=\n response.data[i].venue.name +\n \", \" +\n response.data[i].venue.city +\n \", \" +\n moment(response.data[i].datetime).format(\"MM/DD/YYYY\");\n if (i === 0 || i === 1) {\n shows += \", \";\n }\n }\n log(searchType, shows);\n }\n },\n function(error) {\n console.log(error.response);\n }\n );\n}", "title": "" }, { "docid": "e63e99200f80b8200845a6c01a0e4c20", "score": "0.51595247", "text": "function concertThis(subject) {\n var queryURL = \"https://rest.bandsintown.com/artists/\" + subject + \"/events?app_id=codingbootcamp\";\n\n axios.get(queryURL)\n .then(function (response) {\n if (response.status == 200) {\n let data = response.data[0];\n console.log(\"Venue name: \" + data.venue.name +\n \"\\nVenue location: \" + data.venue.city +\n \"\\nDate of Event: \" + moment(data.datetime).format(\"MM/DD/YYYY\"));\n }\n })\n}", "title": "" }, { "docid": "45fe75ae2bd90f1c02525a2c3683636d", "score": "0.51439524", "text": "function retrieveRawData() {\n \n $.get('https://data.cdc.gov/api/views/bi63-dtpu/rows.json?accessType=DOWNLOAD')\n .done(function(response) {\n\n var data = response.data;\n // Restructure Data Set\n for(var i=0; i< data.length; i++){\n var dataItem = data[i];\n\n var updatedItem = {\n 'year': Number(dataItem[8]), \n 'category': dataItem[9],\n 'cause': dataItem[10],\n 'state': dataItem[11],\n 'total': Number(dataItem[12])\n };\n\n // Cleanse Data\n if(updatedItem.state != 'United States'){\n rawData.push(updatedItem);\n }\n };\n\n // Create sub-data sets\n stateData = getStateData(rawData);\n yearData = getYearData(rawData);\n causeData = getCauseData(rawData);\n\n // Load First Visual: Least granular data set \n causeVisual(rawData);\n addCauseEventListeners();\n\n return rawData;\n });\n}", "title": "" }, { "docid": "9594e02a75aeccc1c3a463d89afed408", "score": "0.51318526", "text": "function bandsintown(inputs) {\n var queryUrl =\n \"https://rest.bandsintown.com/artists/\" +\n inputs +\n \"/events?app_id=codingbootcamp\";\n\n axios.get(queryUrl).then(function (response) {\n \n console.log(\"Name of the venue: \" + response.data[0].venue.name);\n console.log(\"Venue location: \" + response.data[0].venue.city);\n console.log(\"Date of the event: \" + moment(response.data[0].datetime).format(\"MM-DD-YYYY\"));\n });\n}", "title": "" }, { "docid": "3a845bf49e67f7af475c6692ae99a774", "score": "0.50854975", "text": "function concertThis(artist) {\n const queryUrl =\n \"https://rest.bandsintown.com/artists/\" +\n artist +\n \"/events?app_id=codingbootcamp\";\n\n axios\n .get(queryUrl)\n .then(function(response) {\n console.log(`***** concert-this results for: ${artist} *****`);\n for (let i = 0; i < response.data.length; i++) {\n console.log(`\n ===================================================================================\n Venue Name: ${response.data[i].venue.name}\n Location: ${response.data[i].venue.city}, ${\n response.data[i].venue.region\n }, ${response.data[i].venue.country}\n Date: ${moment(response.data[i].venue.datetime).format(\n \"MM/DD/YYYY\"\n )}\n ===================================================================================`);\n }\n })\n .catch(function(error) {\n if (error) {\n console.log(`\n ===================================================================================\n Sorry I could not find that.\n Error message: ${error}\n ===================================================================================`);\n }\n });\n}", "title": "" }, { "docid": "a6739bc294e5640de32687f7400216e5", "score": "0.5085033", "text": "function getHistoricalSpotPrices(endDate, startDate, apiBaseUrl) {\n return axios\n .get(\n apiBaseUrl + \"/api\",\n\n {\n withCredentials: true,\n params: {\n startDate: startDate,\n endDate: endDate\n },\n validateStatus: function(status) {\n return status < 500; // Reject only if the status code is greater than or equal to 500\n }\n }\n )\n .then(console.log(startDate));\n }", "title": "" }, { "docid": "44afe53745c854da475e82dae3642650", "score": "0.50815225", "text": "function concertInfo(userInput) {\n\n\n let queryUrl = \"https://rest.bandsintown.com/artists/\" + userInput + \"/events?app_id=codingbootcamp\";\n\n axios.get(queryUrl).then(function(response) {\n\n console.log(queryUrl);\n console.log(response.data);\n\n // Saving response into variable \n let concerts = response.data;\n \n // Loop through response data array to obtain specific data from bands in town api\n for (let i = 0; i < concerts.length; i++) {\n\n // Displaying venue info\n \n console.log(\"\\n=====UPCOMING CONCERT=====\\n\");\n console.log(\"Venue: \" + concerts[i].venue.name);\n console.log(\"City: \" + concerts[i].venue.city);\n // Using moment.js to convert date of event to a more user-friendly format\n console.log(\"Event Date: \" + moment(concerts[i].datetime).format(\"MM/DD/YYYY\"));\n\n }\n\n })\n .catch((error) => {\n if (error) {\n console.log(error)\n }\n })\n}", "title": "" }, { "docid": "c979bb31fcac4ed3d66ae867d1d10fe8", "score": "0.5080843", "text": "function fetchTotalData() {\r\n var resultsDate = [];\r\n var resultsConfirmed = 0;\r\n var resultsRecovered = 0;\r\n var resultsDead = 0;\r\n var resultsActive = 0;\r\n\r\n var resultsConfirmedBefore = 0;\r\n var resultsConfirmedIncrease = 0;\r\n var resultsRecoveredBefore = 0;\r\n var resultsRecoveredIncrease = 0;\r\n var resultsDeadBefore = 0;\r\n var resultsDeadIncrease = 0;\r\n var resultsActiveBefore = 0;\r\n var resultsActiveIncrease = 0;\r\n\r\n\r\n\r\n\r\n fetch(\"https://pomber.github.io/covid19/timeseries.json\") //request data asynchronously\r\n .then(response => response.json())\r\n .then(function (data) {\r\n var countryValues = Object.values(data);\r\n var countries = Object.values(data).length;\r\n var days = Object.values(data)[0].length - 1;\r\n console.log(\"amount of countries: \" + countries);\r\n console.log(\"amount of days: \" + days);\r\n console.log(countryValues[68][days].deaths); // [country][days]\r\n\r\n var c;\r\n for (c = 0; c < countries; c++) {\r\n resultsConfirmed = resultsConfirmed + countryValues[c][days].confirmed;\r\n resultsRecovered = resultsRecovered + countryValues[c][days].recovered;\r\n resultsDead = resultsDead + countryValues[c][days].deaths;\r\n resultsActive = resultsConfirmed - resultsRecovered - resultsDead;\r\n\r\n resultsConfirmedBefore = resultsConfirmedBefore + countryValues[c][days - 1].confirmed;\r\n resultsRecoveredBefore = resultsRecoveredBefore + countryValues[c][days - 1].recovered;\r\n resultsDeadBefore = resultsDeadBefore + countryValues[c][days - 1].deaths;\r\n\r\n\r\n }\r\n resultsConfirmedIncrease = resultsConfirmed - resultsConfirmedBefore;\r\n resultsRecoveredIncrease = resultsRecovered - resultsRecoveredBefore;\r\n resultsDeadIncrease = resultsDead - resultsDeadBefore;\r\n resultsActiveIncrease = resultsConfirmedIncrease - resultsRecoveredIncrease - resultsDeadIncrease;\r\n\r\n console.log(resultsConfirmedIncrease);\r\n document.getElementById(\"totalStats\").innerHTML = (\"<table><th>Global </th><th>Cases</th></th><th>Increase</th>\"\r\n + \"<tr><td>Confirmed: </td><td>\" + resultsConfirmed + \"</td><td class='globalPlus'> &#8593; &nbsp;\" + resultsConfirmedIncrease + \"</td></tr>\"\r\n + \"<tr><td>Active: </td><td>\" + resultsActive + \"</td><td class='globalPlus'> &#8593; &nbsp;\" + resultsActiveIncrease + \"</td></tr>\"\r\n + \"<tr><td>Recovered: </td><td>\" + resultsRecovered + \"</td><td class='globalPlus'> &#8593; &nbsp;\" + resultsRecoveredIncrease + \"</td></tr>\"\r\n + \"<tr><td>Dead: </td><td>\" + resultsDead + \"</td><td class='globalPlus'> &#8593; &nbsp;\" + resultsDeadIncrease + \"</td></tr></table> \"\r\n );\r\n\r\n /* Ziyang Dai: echart display*/\r\n var myChart = echarts.init(document.getElementById('main'));\r\n var myChart2 = echarts.init(document.getElementById('main2'));\r\n var myChart3 = echarts.init(document.getElementById('main3'));\r\n\r\n var mycon = Object.values(data);\r\n var sumconfirmed = 0;\r\n var sumdeaths = 0;\r\n var sumrecovered = 0;\r\n mycon.forEach((ele) => {\r\n sumconfirmed += ele[ele.length - 1].confirmed;\r\n sumdeaths += ele[ele.length - 1].deaths;\r\n sumrecovered += ele[ele.length - 1].recovered;\r\n })\r\n console.log(sumconfirmed)\r\n console.log(sumdeaths)\r\n console.log(sumrecovered)\r\n var activedata = sumconfirmed - sumdeaths - sumrecovered;\r\n\r\n option = {\r\n tooltip: {\r\n trigger: 'item',\r\n formatter: '{a} <br/>{b} : {c} ({d}%)'\r\n },\r\n series: [{\r\n name: 'data',\r\n type: 'pie',\r\n radius: '50',\r\n center: ['50%', '40%'],\r\n data: [{\r\n value: activedata,\r\n name: 'active'\r\n },\r\n {\r\n value: sumdeaths,\r\n name: 'deaths'\r\n },\r\n {\r\n value: sumrecovered,\r\n name: 'recovered'\r\n }\r\n ],\r\n emphasis: {\r\n itemStyle: {\r\n shadowBlur: 10,\r\n shadowOffsetX: 0,\r\n shadowColor: 'rgba(0, 0, 0, 0.5)'\r\n }\r\n }\r\n }]\r\n };\r\n myChart.setOption(option);\r\n\r\n option2 = {\r\n color: ['#1A5276'],\r\n tooltip: {\r\n trigger: 'axis',\r\n axisPointer: {\r\n type: 'shadow'\r\n }\r\n },\r\n grid: {\r\n left: '3%',\r\n right: '4%',\r\n bottom: '2%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n data: ['confirmed', 'active', 'deaths', 'recovered'],\r\n axisTick: {\r\n alignWithLabel: true\r\n }\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value'\r\n }\r\n ],\r\n series: [\r\n {\r\n name: 'data',\r\n type: 'bar',\r\n barWidth: '60%',\r\n data: [\r\n {\r\n value: sumconfirmed,\r\n name: 'confirmed'\r\n },\r\n {\r\n value: activedata,\r\n name: 'active'\r\n },\r\n {\r\n value: sumdeaths,\r\n name: 'deaths'\r\n },\r\n {\r\n value: sumrecovered,\r\n name: 'recovered'\r\n }\r\n ],\r\n }\r\n ]\r\n };\r\n myChart2.setOption(option2);\r\n\r\n\r\n\r\n var mColor = [\"red\", \"green\"];\r\n option3 = {\r\n\r\n grid: {\r\n top: \"10%\",\r\n left: \"22%\",\r\n bottom: \"10%\",\r\n containLabel: true\r\n },\r\n xAxis: {\r\n show: false\r\n },\r\n\r\n yAxis: [\r\n {\r\n type: 'category',\r\n data: ['Mortality rate', 'Recovery rate'],\r\n\r\n axisLine: {\r\n show: false\r\n },\r\n aixsTick: {\r\n show: false\r\n }\r\n }, {\r\n show: true,\r\n data: [resultsDead, resultsRecovered],\r\n axisLine: {\r\n show: false\r\n },\r\n aixsLabel: {\r\n show: false\r\n }\r\n },\r\n\r\n ],\r\n series: [\r\n {\r\n name: \"country\",\r\n type: 'bar',\r\n data: [Math.round((resultsDead / resultsConfirmed) * 10000) / 100, Math.round((resultsRecovered / resultsConfirmed) * 10000) / 100],\r\n yAxisIndex: 0,\r\n itemStyle: {\r\n barBorderRadius: 20,\r\n color: function (params) {\r\n return mColor[params.dataIndex];\r\n }\r\n },\r\n barCategoryGap: 20,\r\n barWidth: 10,\r\n label: {\r\n show: true,\r\n position: \"insideLeft\",\r\n formatter: \"{c}%\"\r\n }\r\n },\r\n {\r\n name: \"confirmedcase\",\r\n type: 'bar',\r\n data: [100, 100],\r\n itemStyle: {\r\n color: \"none\",\r\n borderColor: \"black\",\r\n borderWidth: 3,\r\n barBorderRadius: 15\r\n },\r\n yAxisIndex: 1,\r\n barCategoryGap: 50,\r\n barWidth: 15\r\n }\r\n ]\r\n };\r\n\r\n myChart3.setOption(option3);\r\n })\r\n\r\n}", "title": "" }, { "docid": "7dd4f5b79e48488e5a4e5ee310acdda4", "score": "0.50789005", "text": "function fetchExtranet(cookies, dateNow, dateNext){\n var headers = {\n 'Cookie' : cookies.join(';')\n }\n var url = args.address+'/Student/Calendar/GetStudentEvents?start='+ formatDate( dateNow ) +'&end='+ formatDate( dateNext );\n \n var options = {\n 'method': 'get',\n 'headers': headers,\n };\n var response = makeHttpRequest(url, options);\n\n return response;\n}", "title": "" }, { "docid": "652f763864c0897df7cd04099d6bdddd", "score": "0.50777805", "text": "static async getCompTimeSeriesData(state){\n let res = await this.request(`data/comp-data/time-series/${state}`);\n return res.data;\n}", "title": "" }, { "docid": "4359d655e6d4673e08c571e2a137548a", "score": "0.5070028", "text": "getStatistics() {\n let year = document.getElementById('yearSelector').value;\n let id = document.getElementById('vendorId').value;\n let url = 'http://127.0.0.1:8000/get-time/' + id;\n axios.get(url).then(response => {\n let orderCreatedAt = [];\n response.data.forEach(element => {\n orderCreatedAt.push(element.created_at.slice(0, 7));\n });\n let arr = [];\n let m;\n for (let y = 1; y <= 12; y++) {\n y > 9 ? m = y : m = \"0\" + y.toString();\n let count = 0;\n for (let i = 0; i < orderCreatedAt.length; i++) {\n if (orderCreatedAt[i] == year + m)\n count++\n }\n arr.push(count);\n }\n this.canvas.destroy();\n this.initChart(arr);\n });\n }", "title": "" }, { "docid": "baed914ff42753d95551aafaf2d031bf", "score": "0.50698346", "text": "function getChartData(cities) {\n const query = knex.select().from('observations').column(knex.raw('DATE(timestamp) as date')).min('temperature as min').max('temperature as max').whereIn('city', cities).whereRaw('DATE(timestamp) >= (CURDATE() - INTERVAL 14 DAY)').groupBy('date');\n\n return query.then(resp => {\n // Format data so it's understandable\n // by the Recharts library\n return resp.map(result => {\n const date = new Date(result.date).toISOString().substr(5, 5);\n\n return {\n date,\n temperature: [result.min, result.max]\n };\n });\n });\n}", "title": "" }, { "docid": "e6ae0417969e27d77fddb709160f0649", "score": "0.5069223", "text": "function getTodayEvents(cb) {\n var query_start_date = moment().set({'hour': 0, 'minute': 0, 'second': 10}).format(ENV['CALDAV_TIME_FORMAT'] || process.env.CALDAV_TIME_FORMAT) + \"Z\";\n var query_end_date = moment().set({'hour': 23, 'minute': 59, 'second': 59}).format(ENV['CALDAV_TIME_FORMAT'] || process.env.CALDAV_TIME_FORMAT) + \"Z\";\n\n var output = {};\n output.start_date = query_start_date;\n output.end_date = query_end_date;\n\n caldav.getEvents(ENV['CALDAV_URL'] || process.env.CALDAV_URL,\n ENV['CALDAV_USERNAME'] || process.env.CALDAV_USERNAME,\n ENV['CALDAV_PASSWORD'] || process.env.CALDAV_PASSWORD, query_start_date, query_end_date, (res) => {\n cb(res);\n });\n}", "title": "" }, { "docid": "dbd1abe4e4e1fa70c5f289674e71138d", "score": "0.50669885", "text": "function getConcerts (artistName) {\n\n var queryUrl = \"https://rest.bandsintown.com/artists/\" + artistName + \"/events?app_id=codingbootcamp\";\n\n axios.get(queryUrl)\n .then(function (response) {\n // limit to 10 results\n if (response.data.length > 10) {\n response.data.length = 10;\n }\n\n // show artist name\n console.log(\"===============================================================================\");\n console.log(artistName);\n console.log(\"===============================================================================\");\n\n // loop through results to display each\n for (var i = 0; i < response.data.length; i++) {\n \n // use moment.js to change date format\n var date = moment(response.data[i].datetime).format(\"MM/DD/YYYY\");\n // use moment.js to format time\n var time = moment(response.data[i].datetime).format(\"hh:mm A\");\n\n // if other country, list country instead of state\n if (response.data[i].venue.region === \"\") {\n var state = response.data[i].venue.country;\n } else {\n var state = response.data[i].venue.region;\n }\n\n // info to save and print\n var toLog = [\n response.data[i].venue.name,\n response.data[i].venue.city + \", \" + state,\n date,\n time\n ].join(\"\\n\");\n\n // log the data to the txt file and console\n fs.appendFile(\"log.txt\", toLog + \"\\n\\n\", function(err) {\n\n // log errors if any\n if (err) {\n console.log(err);\n } else {\n // if no error, log to console\n console.log(\"\\n\" + toLog + \"\\n\\n\");\n }\n\n });\n\n }\n\n // if no results\n if (response.data.length === 0) {\n var noResults = \"There are no upcoming events for that artist or band.\";\n console.log(noResults);\n\n // if no results, log this\n fs.appendFile(\"log.txt\", noResults + \"\\n\\n\", function (err) {\n if (err) {\n console.log(err);\n }\n });\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n\n}", "title": "" }, { "docid": "fe652e0387f48ff3fccfa1e73f6e3167", "score": "0.5064482", "text": "function concert(referenceBand) {\n var bandUrl = \"https://rest.bandsintown.com/artists/\" + referenceBand + \"/events?app_id=codingbootcamp\";\n console.log(bandUrl)\n\n axios.get(bandUrl).then(\n function (response) {\n console.log(response[0])\n console.log(\"**********GENERATING***BAND***INFO: \" + referenceBand + \"*******\");\n // for (var i = 0; i < response.data.length; i++) {\n\n // var dateTime = response.data[i].datetime; //saves date/time response into a variable\n\n // var dateArr = datetime.split('T'); //splits the date and the time in the response\n\n // var concertResults =\n // \"-------------------------------------------------\" +\n // \"\\nVenue Name: \" + response.data[i].venue.name +\n // \"\\nVenue location: \" + response.data[i].venue.city +\n // \"\\nDate of event: \" + moment(dateArr[0], \"YYYY-DD-MM\").format('DD/MM/YYYY'); //moment(dateArr[0] CREATING A FUNTION TAKING MOMENT AKA TIME AND TAKING THE DATEARR[0]\n // //changes to new format\n // console.log(concertResults);\n // }\n console.log(\" \");\n console.log(\"*********************************\"); //make space and display this on users side\n })\n .catch(function (error) {\n console.log('This is the error: ' + error); // will detect any wrong inputs from the user & prompt \n });\n\n}", "title": "" }, { "docid": "2103ead312be64f83f528fcf29ade421", "score": "0.50573254", "text": "function concertThis() {\n var URL = \"https://rest.bandsintown.com/artists/\" + askLiri + \"/events?app_id=codingbootcamp\";\n axios.get(URL).then(\n function (response) {\n var data = response.data[0]\n\n var concertLog =\n \"\\n*******************( BANDS IN TOWN )*******************\\n\" +\n\n \"\\nNAME OF VENUE: \" + data.venue.name +\n \"\\nLOCATION: \" + data.venue.city +\n \"\\nDATE: \" + data.datetime +\n\n \"\\n*******************( BANDS IN TOWN )*******************\\n\"\n console.log(concertLog);\n logToFile(concertLog);\n }\n )\n}", "title": "" }, { "docid": "63cd9d38f776b35ea5fb0c4f68ee6e93", "score": "0.50560206", "text": "function getTotalVisitsToday() { \r\n\treturn 0;\r\n\r\n\tif (this.tsid === \"BUVBKQP3QL13VUS\") { \r\n\t\tlog.info(this+\" getting total visits today \");\r\n\t}\r\n\t\r\n\tvar count = 0;\r\n\tfor (var i in this.visitors) { \r\n\t\tcount += this.getVisitsToday(i);\r\n\t}\r\n\t\r\n\treturn count;\r\n}", "title": "" }, { "docid": "1c840b516b56e42e0a312dabea2e683a", "score": "0.50417227", "text": "function concertThis(artist,call) \n{\n\n // Varaible to call API \n var bandsInTownURL = \"https://rest.bandsintown.com/artists/\"+ artist+\"/events?app_id=\"+ bandInTown;\n \n // Variable for the date \n var datetime;\n\n // Call the API\n request(bandsInTownURL, function(error, response, body) \n {\n // If statement for a correct response\n if (!error && response.statusCode === 200) \n {\n var data = JSON.parse(body);\n \n // loop through all concert venues\n for (var i = 0;i < body.length; i++) \n {\n\n // Retrieve data\n if(data[i] != undefined) \n {\n console.log(\"\\nVenue: \"+data[i].venue.name);\n if(data[i].venue.city != '')\n console.log(\"\\nCity: \"+data[i].venue.city);\n if(data[i].venue.region != '')\n console.log(\"\\nRegion: \"+data[i].venue.region);\n if(data[i].venue.country != '')\n console.log(\"\\nCountry: \"+data[i].venue.country);\n datetime = moment(data[i].datetime,\"YYYY-MM-DDtHH:mm:ss\").format(\"MM/DD/YYYY\");\n console.log(\"\\nDate: \"+ datetime+\"\\n\");\n stored.push(...[data[i].venue.name,data[i].venue.city,data[i].venue.region,data[i].venue.country,datetime]);\n }\n if(data[i] === undefined && i===0) \n {\n console.log(\"\\nSorry we don't see any concerts. Try entering another place. :(\")\n stored.push(\"Sorry we don't see any concerts. :(\");\n }\n }\n }\n call();\n });\n \n}", "title": "" }, { "docid": "d8f3d8fee5c6354f20ed809bac16790c", "score": "0.5040327", "text": "function getBands(band) {\n\n\n if (process.argv[2] === 'concert-this') {\n\n\n axios.get(\"https://rest.bandsintown.com/artists/\" + band + \"/events?app_id=codingbootcamp\").then(\n function (response) {\n\n var bandsData = response.data;\n\n if (!bandsData.length) {\n console.log(\"No results for this band found\");\n return;\n } else {\n\n console.log(\"Upcoming concerts for \" + band + \":\");\n\n for (var i = 0; i < bandsData.length; i++) {\n var show = bandsData[i];\n\n\n console.log(\"Venue Name: \" + show.venue.name);\n console.log(\"Venue Location: \" + show.venue.city);\n console.log(\"Event Date: \" + moment(show.datetime).format(\"MM/DD/YYYY\"));\n\n }\n }\n }\n )\n\n }\n}", "title": "" }, { "docid": "b44c862a9bcb52192187f6195f2fa09a", "score": "0.5017798", "text": "function bandsThis(input) {\n var queryUrl = 'https://rest.bandsintown.com/artists/' + input + '/events?app_id=codingbootcamp&date=upcoming'\n axios.get(queryUrl)\n .then(function (response) {\n var jsonData = response.data\n for (i = 0; i < jsonData.length; i++) {\n log(chalk.greenBright('\\nName: ' + input + '\\n' +\n 'Venue: ' + jsonData[i].venue.name + '\\n' +\n 'Location: ' + jsonData[i].venue.city + ', ' + jsonData[i].venue.region + '\\n' +\n 'Date: ' + moment(jsonData[i].datetime).format('MMMM Do YYYY') + '\\n' +\n '-----------------------------------------------------------------------'))\n\n }\n }).catch(function (error) {\n log(chalk.redBright(error))\n })\n}", "title": "" }, { "docid": "2f84d752abaadfd60da7bf12bae6ad6f", "score": "0.5012039", "text": "function stitchData(covidData, unemploymentData) {\n returnArray = [];\n\n covidData.forEach((covidDatum) => {\n unemploymentData.forEach((unemploymentDatum) => {\n if (\n covidDatum.region.province == unemploymentDatum.state &&\n covidDatum.date ==\n moment(unemploymentDatum.file_week_ended).format(\"YYYY[-]MM[-]DD\")\n ) {\n // \"...\" grabs all properties within the var that follows\n let returnDatum = { ...covidDatum, ...unemploymentDatum };\n returnArray.push(returnDatum);\n }\n });\n });\n\n return returnArray;\n}", "title": "" }, { "docid": "e0d470c4db9cb43b664ace0e7c5bab17", "score": "0.5001501", "text": "function concertThis() {\n if (userInput === \"\") {\n console.log(\"\\n Type Artist/Band name to display Concert Information.\\n\");\n } else {\n var queryUrl =\n \"https://rest.bandsintown.com/artists/\" +\n userInput +\n \"/events?app_id=\" +\n bandKey;\n // console.log(queryUrl)\n axios.get(queryUrl).then(function (data) {\n // console.log(data.data[0]);\n\n console.log(\"\\n\" + \"Venue: \" + data.data[0].venue.name + \"\\n\"); //Name of the venue\n console.log(\"Venue location: \" + data.data[0].venue.city + \"\\n\"); //Venue location\n\n var date = data.data[0].datetime;\n nod;\n date = moment(date).format(\"MMMM Do YYYY, h:mm:ss a\");\n console.log(\"Event Date: \" + date + \"\\n\"); //Date of the Event (use moment to format this as \"MM/DD/YYYY\")\n });\n }\n}", "title": "" }, { "docid": "f2d768d8bd86d6d291e8c1f7ab3de9fb", "score": "0.50002474", "text": "function getChartData(siteName, nocache, cb) {\n if (!siteChartStore.hasOwnProperty(siteName)) {\n siteChartStore[siteName] = new CS(siteName);\n ddbLastFetch[siteName] = 0;\n }\n\n if (nocache || (Date.now() - ddbLastFetch[siteName] > 1000)) {\n // Fetch from DDB if it's been more than a second since last refresh\n updateVoteCountsFromDdb(siteName, cb);\n } else {\n cb(null, siteChartStore[siteName]);\n }\n}", "title": "" }, { "docid": "fbe359917c2e0fd2f0385a4fb603bbcb", "score": "0.4997474", "text": "async function dailyWeather() {\n let apiURL = `https://api.openweathermap.org/data/2.5/onecall?lat=${lat}&lon=${lon}&lang=es&units=metric&appid=98f52917cd500fa8685f8b088d03de2c`;\n let response = await fetch(apiURL);\n let data = response.json();\n return data;\n }", "title": "" }, { "docid": "6702a7615c53244dc22d9d83aed52903", "score": "0.4987692", "text": "function getVisitsToday(tsid) { \r\n\treturn 0;\r\n\r\n\tif (!this.visitors) { \r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\tif (this.tsid === \"BUVBKQP3QL13VUS\") { \r\n\t\tthis.logDebugInfo(this+\" getting visits today for \"+tsid);\r\n\t}\r\n\t\r\n\tvar list = this.visitors[tsid];\r\n\tvar gt = current_gametime();\r\n\t\r\n\tvar count = 0;\r\n\tfor (var i in list) { \r\n\t\tvar time = list[i];\r\n\t\tif (is_same_day(time, gt)) { \r\n\t\t\tcount ++;\r\n\t\t}\r\n\t\t/*else { \r\n\t\t\tbreak; // timestamps are in order with the most recent first\r\n\t\t}*/\r\n\t}\r\n\t\r\n\treturn count;\r\n}", "title": "" }, { "docid": "1c77a849f0ab24e1d18ae824c934380a", "score": "0.49845514", "text": "cleanForecast(response) {\n // 1 day in unix time\n const day = 86400;\n\n // get 1st day unix time from response\n let dt = response.data.list[0].dt;\n\n // create array to store the unix time for the 5 days\n let array = [];\n // add the 1st day\n array.push(dt);\n\n // add dt time for the 4 other days and add it to array\n for (let i = 4; i > 0; i--) {\n dt = dt + day;\n array.push(dt);\n }\n\n // create array to store cleaned up response\n let array2 = [];\n\n // add city info to array\n // in 1st place, used for data display in client\n array2.push(response.data.city);\n\n // loop through response and push into it the 4 days we need\n response.data.list.forEach(function (el) {\n if (array.includes(el.dt)) {\n array2.push(el);\n }\n });\n\n return array2;\n }", "title": "" }, { "docid": "4d45e066512043ebc5a626feef988681", "score": "0.49832428", "text": "function covidCases(stateName) {\n let totalCases = document.querySelector(\".total-cases\");\n let totalDeaths = document.querySelector(\".death-cases\");\n const request = new XMLHttpRequest();\n request.open('GET','https://covid.cdc.gov/covid-data-tracker/COVIDData/getAjaxData?id=US_MAP_DATA',true);\n request.onload = function() {\n if (this.status == 200) {\n const covidDataResponse = JSON.parse(this.responseText);\n var covidDataArray = covidDataResponse['US_MAP_DATA'];\n for (var i= 0 ; i < covidDataArray.length ; i++) {\n if(covidDataArray[i]['abbr'] == stateName) {\n totalCases.innerText = covidDataArray[i].tot_cases; \n totalDeaths.innerText = covidDataArray[i].tot_death\n }\n }\n }else {\n console.log(\"Data Not found\");\n }\n \n }\n request.send();\n}", "title": "" } ]
22ba4921ee61017e2e46740c2d699f20
Merge in the settings. If something exists in the new config that doesn't match the schema of the default config, regard it as an error and log it.
[ { "docid": "80ccc48e6b441a3c50deac3f0190d120", "score": "0.0", "text": "function mixinSettings(source, dest, path) {\n for (var n in source) {\n if (source.hasOwnProperty(n)) {\n if (dest.hasOwnProperty(n)) {\n if (_typeof(source[n]) === 'object' && source[n] !== null) {\n mixinSettings(source[n], dest[n], path.slice() + n + '.');\n } else {\n dest[n] = _Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].clone(source[n]);\n }\n }\n }\n }\n }", "title": "" } ]
[ { "docid": "866bee49ca693ff7e3e978fc533aa99a", "score": "0.666076", "text": "mergeOptions() {\n\t\tthis.config = _.defaultsDeep(this.configFile, ServiceBroker.defaultOptions);\n\n\t\tthis.config = this.overwriteFromEnv(this.config);\n\n\t\tif (this.flags.silent) this.config.logger = false;\n\n\t\tif (this.flags.hot) this.config.hotReload = true;\n\n\t\t// console.log(\"Merged configuration\", this.config);\n\t}", "title": "" }, { "docid": "0ea4ea7644940cc070f4f0350defd86d", "score": "0.6267697", "text": "function defaultConfigDone(err, defaultConfig) {\n\n if(err) {\n return done(err);\n }\n\n // if no config given -> just override with default config\n if(!configs) {\n configs = defaultConfig;\n\n // init config\n initConfig(options, configs, initDone);\n }\n // else -> merge them\n else if (defaultConfig) {\n var defaultConfigKey = Object.keys(defaultConfig)[0];\n var configKeys = Object.keys(configs || {});\n var config;\n\n for(var i= 0, l=configKeys.length; i<l; i++) {\n config = configs[configKeys[i]];\n\n complement(config, defaultConfig[defaultConfigKey], options.merger);\n }\n\n done(null, configs);\n } else {\n // init config\n initConfig(options, configs, initDone);\n }\n\n function initDone( err, configs) {\n if(err) {\n return done(err);\n }\n\n done(null, configs);\n }\n }", "title": "" }, { "docid": "a5db7acf055a935ec78bb11a9b06f88e", "score": "0.6224902", "text": "mergeDefaultConfigs() {\n\t\tthis.controlOptions = deepmerge( config.defaults, this.controlOptions, {\n\t\t\tarrayMerge: ( destination, source ) => source\n\t\t} );\n\n\t\tthis.baseConfig = $.extend( true, {}, this.controlOptions );\n\n\t\tthis.options.target = null;\n\t\tthis.controlOptions = deepmerge( this.controlOptions, this.options, {\n\t\t\tarrayMerge: ( destination, source ) => source\n\t\t} );\n\t}", "title": "" }, { "docid": "259b43f8ac17258518533e48dfff00d7", "score": "0.6198406", "text": "updateInternalConfig () {\n // If the given external and internal configs are the same, do nothing\n if (_.isEqual(this.config, this.value)) return\n // Go through all config keys defined on *this* chart\n // All other elements of config will be ignored\n _.each(this.config, (val, key) => {\n // Undefined value is treated in special way: It is assigned the global default, defined in this mixin\n if (val === undefined) {\n if (!(key in this.defaultConfigValues)) throw Error(`No default value for config '${key}' available!`)\n // Don't assign default if value is given by external config\n if (!(key in this.value)) this.$set(this.config, key, _.cloneDeep(this.defaultConfigValues[key]))\n }\n if (key in this.value) this.$set(this.config, key, this.value[key])\n })\n }", "title": "" }, { "docid": "dba85eb2d5d68c181a3fb9ee77aac1c2", "score": "0.6019585", "text": "defaultConfig(config) {\n // If it's not an object, we discard the information\n if (!(config instanceof Object)) {\n return;\n }\n\n // We use lodash to perform a deep merge, instead of overwriting\n // root values with the spread operator\n this.defaultConfigObject = _.merge(this.defaultConfigObject, config);\n }", "title": "" }, { "docid": "8a8d701a736caf5ea8e840977e1bbc32", "score": "0.6004231", "text": "_saveMergedDefaults() {\n\t\tthis.configDefaults = this._convertDefault(\n\t\t\t[ ...this.baseConfig.defaults, ...this.controlOptions.defaults ]\n\t\t);\n\t}", "title": "" }, { "docid": "bc459527b9a3b4ea56d153664a8b61bc", "score": "0.5976779", "text": "function mergeConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function merger(key, target, source, options) {\n var tval = target[key] || {};\n var sval = source[key];\n\n if (key === 'scales') {\n // scale config merging is complex. Add our own function here for that\n target[key] = mergeScaleConfig(tval, sval);\n } else if (key === 'scale') {\n // used in polar area & radar charts since there is only one scale\n target[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n } else {\n helpers$1._merger(key, target, source, options);\n }\n }\n });\n }", "title": "" }, { "docid": "b81c1c2e50ac115294d5bb00211a59c7", "score": "0.59228516", "text": "function mergeSettings( defSettings, custSettings) {\n\t\tfor ( let key in custSettings) {\n\t\t\tif( custSettings.hasOwnProperty( key ) ) {\n\t\t\t\tdefSettings[key] = custSettings[key];\n\t\t\t}\n\t\t}\n\t\treturn defSettings;\n\t}", "title": "" }, { "docid": "c74bc81990b7d6227042fd73d1e3b7ea", "score": "0.58991116", "text": "function mergeConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function (key, target, source, options) {\n var tval = target[key] || {};\n var sval = source[key];\n\n if (key === 'scales') {\n // scale config merging is complex. Add our own function here for that\n target[key] = mergeScaleConfig(tval, sval);\n } else if (key === 'scale') {\n // used in polar area & radar charts since there is only one scale\n target[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n } else {\n helpers$1._merger(key, target, source, options);\n }\n }\n });\n }", "title": "" }, { "docid": "12393f5e2fa6e7d788c4e5486ae521fe", "score": "0.5881805", "text": "function applyAlternateSettings () {\n\t\tvar envCookie = document.cookie.match(/__forcev18env=(\\w*)/), // \"dev|staging|preview|\".\n\t\t\tconfigName = IBM.common.config.ibmForceConfig || \"\"; // \"dev|staging|preview|\".\n\t\t\n\t\t// #1. Check if we forced a config thru the build (var at top), and set flag if so.\n\t\tif (configName) {\n\t\t\tIBM.common.config.forced = true;\n\t\t}\n\t\t\n\t\t// #2. Check for environment cookie that overrides whatever the build says to use.\n\t\tif (envCookie && envCookie[1] !== \"\") {\n\t\t\tconfigName = envCookie[1];\n\t\t\tIBM.common.config.forced = false;\n\t\t}\n\n\t\t// Now apply the alternate settings if we need to and they are valid settings.\n\t\tif (configName !== \"\" && configName !== \"production\" && settings[configName]) {\n\t\t\t$.extend(true, IBM.common.config, settings[configName]);\n\t\t}\n\t}", "title": "" }, { "docid": "a1a6cb77a081f700f8770ee1e3e559a2", "score": "0.5820646", "text": "function mergeConfig(/* config objects ... */) {\r\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\r\n\t\tmerger: function(key, target, source, options) {\r\n\t\t\tvar tval = target[key] || Object.create(null);\r\n\t\t\tvar sval = source[key];\r\n\r\n\t\t\tif (key === 'scales') {\r\n\t\t\t\t// scale config merging is complex. Add our own function here for that\r\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\r\n\t\t\t} else if (key === 'scale') {\r\n\t\t\t\t// used in polar area & radar charts since there is only one scale\r\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\r\n\t\t\t} else {\r\n\t\t\t\thelpers$1._merger(key, target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "f320d6d5086459da5794b089817e8c07", "score": "0.58162534", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || Object.create(null);\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "f320d6d5086459da5794b089817e8c07", "score": "0.58162534", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || Object.create(null);\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "f320d6d5086459da5794b089817e8c07", "score": "0.58162534", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || Object.create(null);\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "3c99845ce4d621c27598b7e579b930f6", "score": "0.58122057", "text": "function mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "d7cd661dd009c5fca656fd11aeec960b", "score": "0.5766192", "text": "mergeNodeConfig(nodeConfig, base = this.config) {\n if (!nodeConfig) {\n Object.keys(base).forEach((configKey) => {\n nodeConfig[configKey] = base[configKey];\n });\n return;\n }\n\n if (nodeConfig._merged) {\n // This node config has already merged with the top level configuration and any templates it has specified\n return;\n }\n\n // Access all templates uniformly through the templates array\n if (nodeConfig.template) {\n if (nodeConfig.templates) {\n nodeConfig.templates.unshift(nodeConfig.template);\n } else {\n nodeConfig.templates = [nodeConfig.template];\n }\n nodeConfig.template = undefined;\n }\n\n // If the node configuration has any templates defined, we destructively apply the template variables directly on\n // the configuration itself and remove the template key so this template application only needs to happen once\n // for each scene.\n\n if (nodeConfig.templates) {\n nodeConfig.templates.forEach((templateName) => {\n const template = this.templates[templateName];\n if (template) {\n Object.keys(template).forEach((key) => {\n nodeConfig[key] = mergeValues(template[key], nodeConfig[key]);\n });\n }\n });\n }\n nodeConfig.templates = undefined;\n\n Object.keys(base).forEach((key) => {\n if (key === 'children') {\n return;\n }\n\n // We still check the truthiness of base[key] because typeof null evaluates to 'object'\n nodeConfig[key] = mergeValues(base[key], nodeConfig[key]);\n });\n\n // Set an internal flag to indicate that base config and templates have been applied\n nodeConfig._merged = true;\n }", "title": "" }, { "docid": "fe2bf56bebf571d6802f62f270c432ae", "score": "0.57158047", "text": "ensureDefaults() {\n if ( typeof(this._defaults) !== undefined ) {\n for ( var k in this._defaults ) {\n if ( this._data[k] === undefined ) {\n this.setConfig(k, this._defaults[k]);\n }\n }\n }\n }", "title": "" }, { "docid": "62a70ba3e7dcdcc8d68facf7eb2abec3", "score": "0.5707583", "text": "function combineConfig(configs, defaults, // Should hold only the optional properties of Config, but I haven't managed to express that\ncombine = {}) {\n let result = {};\n for (let config of configs)\n for (let key of Object.keys(config)) {\n let value = config[key], current = result[key];\n if (current === undefined)\n result[key] = value;\n else if (current === value || value === undefined) ; // No conflict\n else if (Object.hasOwnProperty.call(combine, key))\n result[key] = combine[key](current, value);\n else\n throw new Error(\"Config merge conflict for field \" + key);\n }\n for (let key in defaults)\n if (result[key] === undefined)\n result[key] = defaults[key];\n return result;\n}", "title": "" }, { "docid": "bf08209a6b1bda066269c8eb514089cb", "score": "0.5612734", "text": "function mergeConfigUpdated(original, saved) {\n var clean = {};\n var result = {};\n var original = JSON.unflatten(original);\n console.log(original);\n function walk() {\n var test = \"\";\n for (var v in saved) {\n if (typeof saved[v] === 'object' && saved[v] !== null) {\n result[v] = {};\n for (var x in saved[v]) {\n if (typeof saved[v][x] === 'object' && saved[v][x] !== null) {\n result[v][x] = {};\n for (var z in saved[v][x]) {\n if (typeof saved[v][x][z] === 'object' && saved[v][x][z] !== null) {\n result[v][x][z] = {};\n for (var y in saved[v][x][z]) {\n if (typeof saved[v][x][z][y] === 'object' && saved[v][x][z][y] !== null) {\n result[v][x][z][y] = {};\n } else {\n if(!original [v][x][z][y])original [v][x][z][y]={\"default\":\"\"};\n result[v][x][z][y] = {\"value\":saved[v][x][z][y]||false,\"default\":original [v][x][z][y].default||\"false\"};\n }\n }\n } else {\n if(!original [v][x][z])original [v][x][z]={\"default\":\"\"};\n result[v][x][z] = {\"value\":saved[v][x][z]||false,\"default\":original[v][x][z].default||\"false\"};\n }\n }\n } else {\n if(!original [v][x]) original [v][x]={\"default\":\"\"};\n result[v][x] = {\"value\":saved[v][x]||false,\"default\":original[v][x].default||\"false\"};\n }\n }\n } else {\n if(!original [v])original [v]={\"default\":\"\"};\n result[v] = {\"value\":saved[v]||false,\"default\":original[v].default||\"false\"};\n }\n }\n }\n walk();\n return result;\n}", "title": "" }, { "docid": "23b43813a6b64447f4ed5623b59016c7", "score": "0.5598367", "text": "static setConfig(defaultConfig) {\n FCC.config = FCC.utils.merge({}, FCC.config, defaultConfig);\n }", "title": "" }, { "docid": "e10fc9813f508138a8fb81ea5bbcb589", "score": "0.55858517", "text": "function changeSettings(state, newSettings) {\n if (newSettings.nullable) {\n Lo.merge(state.nullable, newSettings.nullable);\n }\n if (newSettings.generateGraphQLSDLFile) {\n state.generateGraphQLSDLFile = newSettings.generateGraphQLSDLFile;\n }\n if (newSettings.rootTypingsGlobPattern) {\n state.rootTypingsGlobPattern = newSettings.rootTypingsGlobPattern;\n }\n if (newSettings.connections) {\n Object.keys(newSettings.connections)\n // must already have the defaults\n .filter((key) => state.connections[key] === undefined)\n .forEach((key) => {\n state.connections[key] = Lo.merge(state.connections[key], connectionPluginConfigManagedByNexus);\n });\n Lo.merge(state.connections, newSettings.connections);\n }\n}", "title": "" }, { "docid": "d1ae3ee2d515e5345d2a65e85c2799c5", "score": "0.5560951", "text": "function mergeConfigs() {\n var configs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n configs[_i] = arguments[_i];\n }\n function isNilOrNaN(val) {\n return lodash_1.isNil(val) || (lodash_1.isNumber(val) && isNaN(val));\n }\n // helper to get the first defined value for a given config key\n // from the config sources in a type safe manner\n function get(k) {\n return configs\n .reverse()\n .reduce(function (entry, config) { return !isNilOrNaN(config[k]) ? config[k] : entry; }, exports.DefaultConfig[k]);\n }\n return {\n port: get('port'),\n bind: get('bind'),\n env: get('env'),\n debugNamespace: get('debugNamespace'),\n keyPath: get('keyPath'),\n crtPath: get('crtPath'),\n logFile: get('logFile'),\n disableSSL: get('disableSSL'),\n disableProxy: get('disableProxy'),\n disableEnvCheck: get('disableEnvCheck'),\n timeout: get('timeout'),\n customRootUri: get('customRootUri'),\n customBitcoinNetwork: get('customBitcoinNetwork'),\n };\n}", "title": "" }, { "docid": "e095f07066d67aa2eeb21da0660485c0", "score": "0.55444074", "text": "function overrideDefaultConfig (defaultConfig, overrideConfig) {\n if (overrideConfig) {\n if (!isMetricTypesConfigurationValid(overrideConfig)) {\n throw 'Metric type configuration is invalid, please read the documentation';\n }\n\n defaultConfig.agg = overrideConfig.agg || defaultConfig.agg;\n defaultConfig.aggFreq = overrideConfig.aggFreq || defaultConfig.aggFreq;\n defaultConfig.tags = overrideConfig.tags || defaultConfig.tags;\n }\n}", "title": "" }, { "docid": "2674dc060ffa144044bbf5e6d748da95", "score": "0.55382967", "text": "function extendConf(conf, f) {\n if (_.isArray(conf.extends)) {\n async.reduce(conf.extends, conf, function(res, filePath, cb) {\n loadCheckbuildConf(filePath, function(err, conf) {\n /**\n * Do almost like _.defaultsDeep, but without merging arrays\n */\n function defaultsDeep(config, defaults) {\n if (_.isPlainObject(config)) {\n return _.mapValues(_.defaults(config, defaults), function(val, index) {\n return defaultsDeep(_.get(config, index), _.get(defaults, index));\n });\n }\n\n return config || defaults;\n }\n\n cb(err, defaultsDeep(res, conf));\n });\n }, f);\n } else {\n f(null, conf);\n }\n }", "title": "" }, { "docid": "db92a8a1a0fe1fdae05724619170fa12", "score": "0.5530135", "text": "function _applyConfigDefaults(config, defaultOptions) {\n return Object.assign(Object.assign({}, defaultOptions), config);\n }", "title": "" }, { "docid": "3a48de7906fefb12163764905c0e5a76", "score": "0.5523793", "text": "_mergeSettings(settings, extraSettings) {\r\n for (let name in extraSettings) {\r\n if (name == 'paths') {\r\n continue;\r\n }\r\n\r\n if (!_.has(settings, name)) {\r\n settings[name] = extraSettings[name];\r\n continue;\r\n }\r\n\r\n let option = _.findWhere(argvOptions, { realName: name });\r\n\r\n if (option.type == 'array') {\r\n for (let value in extraSettings[name]) {\r\n if (!_.includes(settings[name], value)) {\r\n settings[name].push(value);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (extraSettings.paths) {\r\n if (!settings.paths) {\r\n settings.paths = {};\r\n }\r\n\r\n for (let urlPath in extraSettings.paths) {\r\n if (!_.has(settings.paths, urlPath)) {\r\n settings.paths[urlPath] = extraSettings.paths[urlPath];\r\n }\r\n else {\r\n extraSettings.paths[urlPath].forEach(function(staticPath) {\r\n if (!_.includes(settings.paths[urlPath], staticPath)) {\r\n settings.paths[urlPath].push(staticPath);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "828a8cb0a778218cd1a0c3d0b12df6a1", "score": "0.5516582", "text": "loadCustomConfig() {\n try {\n const config = require(`${process.cwd()}/config/server.js`) || {};\n\n this._config = merge.all([this._config, config]);\n } catch (err) {\n if (!err.code || err.code !== 'MODULE_NOT_FOUND') {\n throw err;\n }\n }\n }", "title": "" }, { "docid": "0adcaf5496e223e4a87393b0dd070983", "score": "0.5495224", "text": "mergeConfig(state, config) {\n if (typeof config !== 'object') {\n console.error('config is not an object', config);\n return;\n }\n\n // security: do not accept dynamic parentOrigin\n const parentOrigin = (\n state.config && state.config.ui\n && state.config.ui.parentOrigin\n )\n ? state.config.ui.parentOrigin\n : config.ui.parentOrigin || window.location.origin;\n const configFiltered = {\n ...config,\n ...{ ui: { ...config.ui, parentOrigin } },\n };\n if (state.config && state.config.ui && state.config.ui.parentOrigin\n && config.ui && config.ui.parentOrigin\n && config.ui.parentOrigin !== state.config.ui.parentOrigin\n ) {\n console.warn('ignoring parentOrigin in config: ', config.ui.parentOrigin);\n }\n state.config = mergeConfig(state.config, configFiltered);\n }", "title": "" }, { "docid": "ee4173f3e23ca9a1519397d19112db88", "score": "0.5494963", "text": "function mergeRuleConfig(defaultConfig, buildConfig = {}, userConfig = {}) {\n let rule;\n // Omit the default loader and options if the user is configuring their own\n if (defaultConfig.loader && (userConfig.loader || userConfig.use)) {\n let {\n loader: defaultLoader, options: defaultOptions } = defaultConfig,\n defaultRuleConfig = _objectWithoutProperties(defaultConfig, ['loader', 'options']);\n rule = (0, _webpackMerge2.default)(defaultRuleConfig, userConfig);\n } else {\n rule = (0, _utils.replaceArrayMerge)(defaultConfig, buildConfig, userConfig);\n }\n if (rule.options && Object.keys(rule.options).length === 0) {\n delete rule.options;\n }\n return rule;\n}", "title": "" }, { "docid": "4e2f50cf00348741389b1f884c15d654", "score": "0.54750824", "text": "function replaceConfig(config) {\n _buildConfig = config;\n}", "title": "" }, { "docid": "79c9b249da3959b0927716b9ba24a217", "score": "0.545321", "text": "function mergeConfigs(dst, src) {\n _.forEach(src || {}, (value, key) => {\n\n // if destination exists & already has `~override` flag, keep it intact\n if (_.isObject(dst[key]) && dst[key]['~override']) return;\n\n // if source has `~override` flag - override whole value in destination\n if (value && value['~override']) {\n dst[key] = value;\n return;\n }\n\n // if both nodes are arrays, concatenate them\n if (_.isArray(value) && _.isArray(dst[key])) {\n value.forEach(v => { dst[key].push(v); });\n return;\n }\n\n // if both nodes are objects - merge recursively\n if (_.isObject(value) && _.isObject(dst[key])) {\n mergeConfigs(dst[key], value);\n return;\n }\n\n // destination node does not exist - create\n // or both nodes are of different types - override.\n dst[key] = value;\n return;\n });\n\n return dst;\n}", "title": "" }, { "docid": "fac28acb598a60c227d725f238f0362b", "score": "0.54404604", "text": "enrichSchemaWithConfig(schema, config) {\n return mergeWith(schema, config, (currentSchema, currentConfig, key) => {\n if ((key === 'properties' || key === 'items') && !currentSchema) {\n console.warn(`config => ${JSON.stringify(currentConfig, (configKey, value) => {\n if (typeof value === 'function') {\n return 'ƒ()';\n }\n return value;\n }, 2)} should not be under \"${key}\" because schema does not have \"${key}\"`);\n // cancel merge to avoid creating broken json schema\n return null;\n }\n if (currentSchema && key === 'properties') {\n const configKeys = Object.keys(currentConfig);\n configKeys\n .filter(configKey => !currentSchema[configKey])\n .forEach(wrongConfigKey => {\n delete currentConfig[wrongConfigKey];\n console.warn(wrongConfigKey);\n });\n }\n });\n }", "title": "" }, { "docid": "23adb62edf50afb5646b684456faf5c9", "score": "0.5411099", "text": "function merge(new_options) {\n\tconst errors = schema.validate(new_options);\n\n\tif (errors.length) {\n\t\t// We'll just throw the first error,\n\t\t// and let the user correct his object property by property\n\t\t// until he gets it right.\n\t\tthrow errors[0];\n\t}\n\n\t_.merge(options, new_options);\n}", "title": "" }, { "docid": "7c1c3c5e07bd25acd9e082ffccb189b8", "score": "0.54084516", "text": "function configuration(override) {\n var res = __assign({}, exports.DefaultConfig);\n if (override.src)\n Object.assign(res.src, override.src);\n if (override.dest)\n Object.assign(res.dest, override.dest);\n if (override.bundle)\n Object.assign(res.bundle, override.bundle);\n if (override.page) {\n if (override.page.title)\n Object.assign(res.page.title, override.page.title);\n if (override.page.favicon)\n res.page.favicon = override.page.favicon;\n if (override.page.meta)\n res.page.meta = override.page.meta;\n if (override.page.fonts)\n res.page.fonts = override.page.fonts;\n if (override.page.scripts)\n res.page.scripts = override.page.scripts;\n if (override.page.stylesheets)\n res.page.stylesheets = override.page.stylesheets;\n if (override.page.post)\n res.page.post = override.page.post;\n }\n if (override.dev)\n Object.assign(res.dev, override.dev);\n if (override.theme)\n res.theme = override.theme;\n if (override.markdown) {\n Object.assign(res.markdown, override.markdown);\n if (override.markdown.customComponents)\n res.markdown.BlockQuote = marked_1.quotedComponents(override.markdown.customComponents);\n }\n if (override.tocMarkdown) {\n Object.assign(res.tocMarkdown, override.tocMarkdown);\n if (override.tocMarkdown.customComponents)\n res.markdown.BlockQuote = marked_1.quotedComponents(override.tocMarkdown.customComponents);\n }\n if (override.misc)\n res.misc = override.misc;\n return res;\n}", "title": "" }, { "docid": "3e9645acacf6d2fa8535fbe9fef13ee9", "score": "0.54072475", "text": "function mergeConfig(config) {\n /* tslint:disable:typedef */\n var merge = require('lodash.merge');\n /* tslint:enable:typedef */\n _buildConfig = merge({}, _buildConfig, config);\n}", "title": "" }, { "docid": "f63e29bb7159581e12a4efa860f17849", "score": "0.53851956", "text": "function mergeSettings(oldSettings, newSettings) {\n if (oldSettings === void 0) { oldSettings = {}; }\n var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _settingsMergeWith(newSettings);\n return mergeSettingsWith(oldSettings);\n}", "title": "" }, { "docid": "f63e29bb7159581e12a4efa860f17849", "score": "0.53851956", "text": "function mergeSettings(oldSettings, newSettings) {\n if (oldSettings === void 0) { oldSettings = {}; }\n var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _settingsMergeWith(newSettings);\n return mergeSettingsWith(oldSettings);\n}", "title": "" }, { "docid": "f63e29bb7159581e12a4efa860f17849", "score": "0.53851956", "text": "function mergeSettings(oldSettings, newSettings) {\n if (oldSettings === void 0) { oldSettings = {}; }\n var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _settingsMergeWith(newSettings);\n return mergeSettingsWith(oldSettings);\n}", "title": "" }, { "docid": "6defad8fbf0e5428436fd24b13c67b9a", "score": "0.5384212", "text": "function configMerge(fields) {\n var cfgList = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n cfgList[_i - 1] = arguments[_i];\n }\n var dstConfig = {};\n fields.forEach(function (f) {\n cfgList.forEach(function (srcConfig) {\n var o = srcConfig[f];\n var t = typeof o;\n if (t != 'undefined') {\n if (Array.isArray(o) || t != 'object' || o == null)\n dstConfig[f] = o;\n else\n dstConfig[f] = Object.assign({}, dstConfig[f], configMerge(Object.keys(o), o));\n }\n });\n });\n return dstConfig;\n }", "title": "" }, { "docid": "dd3ec5044a5fa1b2c63610365b678dc1", "score": "0.5380984", "text": "function mergeSettings(oldSettings, newSettings) {\r\n if (oldSettings === void 0) { oldSettings = {}; }\r\n var mergeSettingsWith = isSettingsFunction(newSettings) ? newSettings : settingsMergeWith(newSettings);\r\n return mergeSettingsWith(oldSettings);\r\n}", "title": "" }, { "docid": "dd3ec5044a5fa1b2c63610365b678dc1", "score": "0.5380984", "text": "function mergeSettings(oldSettings, newSettings) {\r\n if (oldSettings === void 0) { oldSettings = {}; }\r\n var mergeSettingsWith = isSettingsFunction(newSettings) ? newSettings : settingsMergeWith(newSettings);\r\n return mergeSettingsWith(oldSettings);\r\n}", "title": "" }, { "docid": "d7bc96ce97a43876d42cdc60e4b487a1", "score": "0.53735316", "text": "function _applyConfigDefaults(config, defaultOptions) {\n return Object.assign(Object.assign({}, defaultOptions), config);\n}", "title": "" }, { "docid": "e1c31c3ce794aed65c2ecc7b53db16ff", "score": "0.53719574", "text": "function mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign$1(__assign$1(__assign$1({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign$1(__assign$1({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n }", "title": "" }, { "docid": "58dc2cac3ce2e78d011f5c484a617ef3", "score": "0.5368681", "text": "function _applyConfigDefaults(config) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__core_util_object_extend__[\"a\" /* extendObject */])(new __WEBPACK_IMPORTED_MODULE_2__snack_bar_config__[\"a\" /* MdSnackBarConfig */](), config);\n}", "title": "" }, { "docid": "40a4052032d2760c7fc96d337f938bbd", "score": "0.5364546", "text": "function mergeSettings(obj, otherobj) {\n var name;\n for (name in otherobj) {\n if (!obj[name]) {\n obj[name] = otherobj[name];\n }\n }\n}", "title": "" }, { "docid": "8385e30fa6fae5ff572f632832150c40", "score": "0.5329404", "text": "function mergeLoaderConfig(defaultConfig, buildConfig = {}, userConfig = {}) {\n let loader;\n // If the loader is being changed, only use the provided config\n if (userConfig.loader) {\n loader = _extends({}, userConfig);\n } else {\n // The only arrays used in default options are for PostCSS plugins, which we\n // want the user to be able to completely override.\n loader = (0, _utils.replaceArrayMerge)(defaultConfig, buildConfig, userConfig);\n }\n if (loader.options && Object.keys(loader.options).length === 0) {\n delete loader.options;\n }\n return loader;\n}", "title": "" }, { "docid": "c277e67ddeb8fdb1ba8275901a1662cf", "score": "0.53275204", "text": "function _applyConfigDefaults(config, defaultOptions) {\n return Object.assign(Object.assign({}, defaultOptions), config);\n}", "title": "" }, { "docid": "68ab1ad4fa0acf2db80bfb375d9ec2d9", "score": "0.5315823", "text": "function _checkConfiguration() {\n const config = env.conf.plantuml || {};\n if (config.puml) {\n if (typeof config.puml.create === 'boolean') myConfig.createPuml = config.puml.create;\n if (config.puml.destination) {\n myConfig.pathPuml = config.puml.destination;\n logger.debug(`${logPrefix} got destination path from config: ${myConfig.pathPuml}`);\n }\n }\n logger.info(`${logPrefix} using destination path for puml files: ${myConfig.pathPuml}`);\n\n if (config.images) {\n if (typeof config.images.create === 'boolean') myConfig.createImages = config.images.create;\n if (typeof config.images.replaceWithImage === 'boolean') myConfig.replaceWithImage = config.images.replaceWithImage;\n if (config.images.destination) {\n myConfig.pathImages = config.images.destination;\n logger.debug(`${logPrefix} got destination path from config: ${myConfig.pathImages}`);\n }\n if (config.images.defaultFormat) {\n myConfig.imageFormat = config.images.defaultFormat;\n }\n }\n logger.info(`${logPrefix} using destination path for image files: ${myConfig.pathImages}`);\n}", "title": "" }, { "docid": "374d633449f0ff15983d0c69a88f494d", "score": "0.5307035", "text": "function _applyConfigDefaults(dialogConfig) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__core_util_object_extend__[\"a\" /* extendObject */])(new __WEBPACK_IMPORTED_MODULE_6__dialog_config__[\"a\" /* MdDialogConfig */](), dialogConfig);\n}", "title": "" }, { "docid": "18c5e721c5a155894f287eeea0dcf2d2", "score": "0.53033876", "text": "workspaceDidChangeConfiguration(params) {\n lodash_1.merge(this.settings, params.settings);\n }", "title": "" }, { "docid": "e6d538eb1becf11639caebcc2e199d5c", "score": "0.52886206", "text": "function mergeConfigs(extendedConfig, extendingConfig) {\n var filteredExtendedConfig = _.omit(_.cloneDeep(extendedConfig), privateKeys);\n var filteredExtendingConfig = _.omit(_.cloneDeep(extendingConfig), privateKeys);\n return _.merge(filteredExtendedConfig, filteredExtendingConfig);\n}", "title": "" }, { "docid": "5abb6adfdfc1ba6f964141d985883ebd", "score": "0.5286629", "text": "function extendConfigWithDefaults({\n options,\n config\n}) {\n config = { ...config\n };\n\n for (let [key, value] of Object.entries(defaultConfig)) {\n value = getValue(options, key) || getValue(config, key) || value;\n setValue(config, key, value);\n }\n\n return config;\n}", "title": "" }, { "docid": "400c76492ff780e0fcf60192f4922ee4", "score": "0.5253956", "text": "updateDefaults(defaults, oldDefaults) {\n if (!this.isConfiguring) {\n const entries = Object.entries(defaults);\n this.eachWidget(widget => {\n entries.forEach(([prop, value]) => {\n // Apply defaults only if current value matches the old default\n if (widget[prop] === oldDefaults[prop]) {\n widget[prop] = value;\n }\n });\n }, false);\n }\n }", "title": "" }, { "docid": "19b094e4550c0acfbc4f1f2677b91182", "score": "0.5241356", "text": "function mergeOneConfig(memo, config) {\n for (const [k, v] of Object.entries(config)) {\n switch (k) {\n // this list of extension names is appended\n case 'disabledExtensions':\n case 'federated_extensions':\n memo[k] = [...(memo[k] || []), ...v];\n break;\n // these `@org/pkg:plugin` are merged at the first level of values\n case 'litePluginSettings':\n case 'settingsOverrides':\n if (!memo[k]) {\n memo[k] = {};\n }\n for (const [plugin, defaults] of Object.entries(v || {})) {\n memo[k][plugin] = { ...(memo[k][plugin] || {}), ...defaults };\n }\n break;\n default:\n memo[k] = v;\n }\n }\n return memo;\n}", "title": "" }, { "docid": "30434ad7758e2abc3372e75774db0891", "score": "0.5240178", "text": "function _applyConfigDefaults(dialogConfig) {\n return extendObject(new MdDialogConfig(), dialogConfig);\n}", "title": "" }, { "docid": "a89d3b21cf33ebd7d036d4f3410f599a", "score": "0.52291083", "text": "function applyConfigDefaults(config, defaultOptions) {\n return Object.assign(Object.assign({}, defaultOptions), config);\n}", "title": "" }, { "docid": "871110c9885ad86fb4fd6ae22bce9d22", "score": "0.5225492", "text": "function fixLabelConfig(config) {\r\n var defaults = config.defaults;\r\n if (!defaults) {\r\n defaults = config.defaults = {};\r\n }\r\n for (var i=0; i<defaultLabelConfigs.length; i++) {\r\n var name = defaultLabelConfigs[i];\r\n\r\n // applying \"undefined\" value can cause form fields and labels to have \"undefined\" string in the generated HTML styles.\r\n if (typeof defaults[name] === \"undefined\" && typeof config[name] !== \"undefined\") {\r\n defaults[name] = config[name];\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b2419774bfa6faec88077975c9711c5c", "score": "0.5224607", "text": "initialConfigurations() {\n if (!state.RatWorkShop_DungeonMasterTools_Roll20_5E.modules[DungeonMasterToolsBarbarian.MODULE_NAME] ||\n !state.RatWorkShop_DungeonMasterTools_Roll20_5E.modules[DungeonMasterToolsBarbarian.MODULE_NAME].version ||\n state.RatWorkShop_DungeonMasterTools_Roll20_5E.modules[DungeonMasterToolsBarbarian.MODULE_NAME].version !== DungeonMasterToolsBarbarian.VERSION) {\n // Sync Settings to Latest Settings\n Object.entries(DungeonMasterToolsBarbarian.DEFAULT_STATE).forEach(([key, options]) => {\n if (!['version', 'gcUpdated', 'events', 'modules'].includes(key)) {\n const settings = Object.assign(state.RatWorkShop_DungeonMasterTools_Roll20_5E[key]);\n\n // Merge New Default Settings over old settings\n state.RatWorkShop_DungeonMasterTools_Roll20_5E[key] = { ...state.RatWorkShop_DungeonMasterTools_Roll20_5E[key], ...options };\n\n // Now Merge back any custom changes\n state.RatWorkShop_DungeonMasterTools_Roll20_5E[key] = { ...state.RatWorkShop_DungeonMasterTools_Roll20_5E[key], ...settings };\n }\n });\n state.RatWorkShop_DungeonMasterTools_Roll20_5E.modules[DungeonMasterToolsBarbarian.MODULE_NAME].version = DungeonMasterToolsBarbarian.VERSION;\n }\n\n const gc = globalconfig && globalconfig.RatWorkShop_DungeonMasterTools_Roll20_5E;\n if (gc && gc.lastsaved && gc.lastsaved > state.RatWorkShop_DungeonMasterTools_Roll20_5E.modules[DungeonMasterToolsBarbarian.MODULE_NAME].gcUpdated) {\n log(' > Updating from Global Config < ['+(new Date(g.lastsaved*1000))+']');\n\n state.RatWorkShop_DungeonMasterTools_Roll20_5E.modules[DungeonMasterToolsBarbarian.MODULE_NAME].gcUpdated = gc.lastsaved;\n if ('tokenIcon-rage' in gc) {\n state.RatWorkShop_DungeonMasterTools_Roll20_5E.tokenIcons['rage'] = gc['tokenIcon-rage'];\n }\n }\n }", "title": "" }, { "docid": "6040b581655a5d8b1c8c020123933a17", "score": "0.52206236", "text": "function overrideMetricDefaultConfigs (defaultConfig, overrideConfig) {\n if (overrideConfig) {\n overrideDefaultConfig(defaultConfig.timer, overrideConfig.timer);\n overrideDefaultConfig(defaultConfig.counter, overrideConfig.counter);\n overrideDefaultConfig(defaultConfig.gauge, overrideConfig.gauge);\n }\n}", "title": "" }, { "docid": "f28d83feb00336b1b3498f92330f5725", "score": "0.5219148", "text": "function setDefaultConfiguration(audit) {\n 'use strict';\n var config = audit || {};\n config.rules = config.rules || [];\n config.checks = config.checks || [];\n config.data = config.data || {\n checks: {},\n rules: {}\n };\n return config;\n }", "title": "" }, { "docid": "64981f479954bf481df2363c41294f30", "score": "0.52040774", "text": "function fillSettings() {\n fs.readFile(\n path.join(appPath, 'settings.json'),\n 'utf8',\n (error, data) => {\n if (error) {\n return logger.error(\n 'Unable to read app/settings.json:',\n error\n )\n }\n\n try {\n data = JSON.parse(data)\n } catch (error) {\n return logger.error(\n 'Unable to parse app/settings.json:',\n error\n )\n }\n\n lastSaveTime = Date.now() + 1\n\n for (let section in data) {\n for (let subSection in data[section]) {\n if (typeof data[section][subSection] === 'object') {\n let keyGroup = section + '.' + subSection\n if (\n typeof data[section][subSection].map ===\n 'string'\n ) {\n keyGroup = data[section][subSection].map\n }\n keyGroup += '.'\n\n let entries = data[section][subSection].entries\n\n for (let option in entries) {\n if (!settings.has(keyGroup + option)) {\n settings.set(\n keyGroup + option,\n entries[option].default\n )\n }\n }\n }\n }\n }\n }\n )\n }", "title": "" }, { "docid": "2629d0992b830d04826f58da8f6dd0c8", "score": "0.5190525", "text": "function cleanupConfigs(cfg) {\n if (!_.isPlainObject(cfg)) return;\n if (cfg['~override']) delete cfg['~override'];\n\n _.forEach(cfg, cleanupConfigs);\n}", "title": "" }, { "docid": "d774a647af0e09255d54131b7d25db50", "score": "0.5187822", "text": "resetConfig()\n {\n this.config = this._defaultConfig();\n }", "title": "" }, { "docid": "d774a647af0e09255d54131b7d25db50", "score": "0.5187822", "text": "resetConfig()\n {\n this.config = this._defaultConfig();\n }", "title": "" }, { "docid": "780f06e2f102ee51a935b236e4cec38d", "score": "0.51737845", "text": "function mergeScaleConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function merger(key, target, source, options) {\n if (key === 'xAxes' || key === 'yAxes') {\n var slen = source[key].length;\n var i, type, scale;\n\n if (!target[key]) {\n target[key] = [];\n }\n\n for (i = 0; i < slen; ++i) {\n scale = source[key][i];\n type = valueOrDefault$9(scale.type, key === 'xAxes' ? 'category' : 'linear');\n\n if (i >= target[key].length) {\n target[key].push({});\n }\n\n if (!target[key][i].type || scale.type && scale.type !== target[key][i].type) {\n // new/untyped scale or type changed: let's apply the new defaults\n // then merge source scale to correctly overwrite the defaults.\n helpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);\n } else {\n // scales type are the same\n helpers$1.merge(target[key][i], scale);\n }\n }\n } else {\n helpers$1._merger(key, target, source, options);\n }\n }\n });\n }", "title": "" }, { "docid": "6a38835d99fd24559972a920aa3b6321", "score": "0.5164409", "text": "setConfig(newConfig) {\n if (newConfig !== undefined) {\n config = newConfig;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4c07781c4e744daa5f7b4535b5b33881", "score": "0.5162176", "text": "violatedConfigs(overridingConfig = {}, srcConfig = {}) {\n const result = [];\n\n const keys = Object.keys(overridingConfig);\n\n _.forEach(keys, key => {\n if (this.configs.includes(key)) return;\n if (!_.isEqual(overridingConfig[key], srcConfig[key])) result.push(key);\n });\n\n return result;\n }", "title": "" }, { "docid": "ba6fcb0f241c36cc37db076434375fa4", "score": "0.51558626", "text": "function loadSettings(data, override) {\r\n\tvar prevSettings = jsonClone(settings);\r\n\tfor (var i in settingTypes) {\r\n\t\tif ((settingTypes[i] != 'unchange' || override) && data.settings.hasOwnProperty(i)) {\r\n\t\t\tif (settings[i] != data.settings[i]) {\r\n\t\t\t\tsettings[i] = data.settings[i];\r\n\t\t\t\tlog(0, 'Setting: ' + i + ' updated to: ' + data.settings[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ((prevSettings.teams != settings.teams && settings.teamMode) ||\r\n\t\tprevSettings.teamMode != settings.teamMode) {\r\n\t\tinitTeams(settings.teams);\r\n\t}\r\n\tif (prevSettings.gamemode != settings.gamemode) {\r\n\t\tloadGamemode(settings.gamemode);\r\n\t}\r\n\tif (prevSettings.numBots != settings.numBots) {\r\n\t\tAIHandler.init(settings.numBots, Player);\r\n\t}\r\n\tsendToAll('update_settings', settings);\r\n}", "title": "" }, { "docid": "18b1ce07d5fa7b0a475b2e4cce7fc659", "score": "0.51506996", "text": "function resetConfig() {\n writeConfig(skyuxConfigOriginal);\n}", "title": "" }, { "docid": "43750901efe9ae2d32bc6b63ffee1bbc", "score": "0.5147185", "text": "configureJava() {\n this.config.defaults(requiredConfig);\n }", "title": "" }, { "docid": "27eb425f21df7ccdf21836a057af6103", "score": "0.5138607", "text": "function updateConfig() {\n var savConf = {};\n savConf.env = appConfig.env;\n savConf.database = appConfig.database;\n savConf.http = appConfig.http;\n fs.writeFile(appConfigFile, JSON.stringify(savConf));\n}", "title": "" }, { "docid": "58cf59cf312bbdf1307988d844f862c6", "score": "0.5132774", "text": "function defaultConfig (config) {\n config = config || {}\n config.issuePrefixes = config.issuePrefixes || ['#']\n return config\n}", "title": "" }, { "docid": "58cf59cf312bbdf1307988d844f862c6", "score": "0.5132774", "text": "function defaultConfig (config) {\n config = config || {}\n config.issuePrefixes = config.issuePrefixes || ['#']\n return config\n}", "title": "" }, { "docid": "58cf59cf312bbdf1307988d844f862c6", "score": "0.5132774", "text": "function defaultConfig (config) {\n config = config || {}\n config.issuePrefixes = config.issuePrefixes || ['#']\n return config\n}", "title": "" }, { "docid": "3f268d3a2d316eb37872fca0d8c33b52", "score": "0.5124001", "text": "function _applyConfigDefaults(defaults, config) {\n return Object.assign(Object.assign({}, defaults), config);\n }", "title": "" }, { "docid": "e6af386eb92b3bb19a079f4013b33a31", "score": "0.51082325", "text": "function concatUserDefinedConfigFile() {\n var userDefinedConfigFilePath = path.join(exports.homedir, USER_DEFINED_CONFIG_FILE_NAME);\n \n if (!fs.existsSync(userDefinedConfigFilePath)) {\n return;\n }\n\n var userConfig;\n try {\n userConfig = JSON.parse(fs.readFileSync(userDefinedConfigFilePath));\n } catch (err) {\n console.log(\"ERROR: empty or malformed configuration file at '\" + userDefinedConfigFilePath +\n \"'. Config file must be in JSON format.\");\n throw err;\n }\n\n if (!userConfig.pluginDirPaths || userConfig.pluginDirPaths.length === 0) {\n return;\n }\n\n exports.config.pluginDirPaths = exports.config.pluginDirPaths.concat(userConfig.pluginDirPaths);\n exports.config.pluginInterfaceDirPaths = exports.config.pluginInterfaceDirPaths.concat(userConfig.pluginInterfaceDirPaths);\n}", "title": "" }, { "docid": "c869440f8a228bb17fc9539a176603e6", "score": "0.5084495", "text": "function mergeScaleConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function (key, target, source, options) {\n if (key === 'xAxes' || key === 'yAxes') {\n var slen = source[key].length;\n var i, type, scale;\n\n if (!target[key]) {\n target[key] = [];\n }\n\n for (i = 0; i < slen; ++i) {\n scale = source[key][i];\n type = valueOrDefault$8(scale.type, key === 'xAxes' ? 'category' : 'linear');\n\n if (i >= target[key].length) {\n target[key].push({});\n }\n\n if (!target[key][i].type || scale.type && scale.type !== target[key][i].type) {\n // new/untyped scale or type changed: let's apply the new defaults\n // then merge source scale to correctly overwrite the defaults.\n helpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);\n } else {\n // scales type are the same\n helpers$1.merge(target[key][i], scale);\n }\n }\n } else {\n helpers$1._merger(key, target, source, options);\n }\n }\n });\n }", "title": "" }, { "docid": "606a31b41ea5353d1926a2f780cb118f", "score": "0.50760365", "text": "persistentConfig(config) {\n // If it's not an object, we discard the information\n if (!(config instanceof Object)) {\n return;\n }\n\n // We use lodash to perform a deep merge, instead of overwriting\n // root values with the spread operator\n this.persistentConfigObject = _.merge(this.persistentConfigObject, config);\n }", "title": "" }, { "docid": "dcedaca867111aa9541aa2740d85c4dc", "score": "0.50753874", "text": "_loadDefaultConfig(force){\n\t\tif(!this.config || force){\n\n\t\t\tthis.config = {};\n\n\t\t\t//load base config from defaults\n\t\t\tfor(let key in Ajax.defaultConfig){\n\t\t\t\tthis.config[key] = Ajax.defaultConfig[key];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "81d2a5c15e1c203da41a623f6b476b1b", "score": "0.5075104", "text": "function customisedConfig(config) {\n\t const customised = {};\n\t for (const key in config) {\n\t const attr = key;\n\t const defaultSource = defaultConfig[attr];\n\t const configSource = config[attr];\n\t const child = {};\n\t let found = false;\n\t for (const key2 in configSource) {\n\t const attr2 = key2;\n\t if (configSource[attr2] !== defaultSource[attr2]) {\n\t child[attr2] = configSource[attr2];\n\t found = true;\n\t }\n\t }\n\t if (found) {\n\t customised[attr] = child;\n\t }\n\t }\n\t return customised;\n\t}", "title": "" }, { "docid": "4159b6ce44733b2f1d26210bbd190eec", "score": "0.50698453", "text": "function processConfig(config) {\n if (!config) {\n return config;\n }\n var settingsServiceInstance = SettingsService.getInstance();\n var entries = config.entries || {};\n if (entries.fpr_enabled !== undefined) {\n // TODO: Change the assignment of loggingEnabled once the received type is\n // known.\n settingsServiceInstance.loggingEnabled =\n String(entries.fpr_enabled) === 'true';\n }\n else {\n // Config retrieved successfully, but there is no fpr_enabled in template.\n // Use secondary configs value.\n settingsServiceInstance.loggingEnabled = DEFAULT_CONFIGS.loggingEnabled;\n }\n if (entries.fpr_log_source) {\n settingsServiceInstance.logSource = Number(entries.fpr_log_source);\n }\n if (entries.fpr_log_endpoint_url) {\n settingsServiceInstance.logEndPointUrl = entries.fpr_log_endpoint_url;\n }\n // Key from Remote Config has to be non-empty string, otherwsie use local value.\n if (entries.fpr_log_transport_key) {\n settingsServiceInstance.transportKey = entries.fpr_log_transport_key;\n }\n if (entries.fpr_vc_network_request_sampling_rate !== undefined) {\n settingsServiceInstance.networkRequestsSamplingRate = Number(entries.fpr_vc_network_request_sampling_rate);\n }\n if (entries.fpr_vc_trace_sampling_rate !== undefined) {\n settingsServiceInstance.tracesSamplingRate = Number(entries.fpr_vc_trace_sampling_rate);\n }\n // Set the per session trace and network logging flags.\n settingsServiceInstance.logTraceAfterSampling = shouldLogAfterSampling(settingsServiceInstance.tracesSamplingRate);\n settingsServiceInstance.logNetworkAfterSampling = shouldLogAfterSampling(settingsServiceInstance.networkRequestsSamplingRate);\n return config;\n}", "title": "" }, { "docid": "d0b7d0a9db82146820b1ee95e0f285d3", "score": "0.50684834", "text": "_applyMessagesConfig(messagesConfig) {\n if (messagesConfig.compilerMessageReporting) {\n for (const messageId of Object.getOwnPropertyNames(messagesConfig.compilerMessageReporting)) {\n const reportingRule = MessageRouter._getNormalizedRule(messagesConfig.compilerMessageReporting[messageId]);\n if (messageId === 'default') {\n this._compilerDefaultRule = reportingRule;\n }\n else if (!/^TS[0-9]+$/.test(messageId)) {\n throw new Error(`Error in API Extractor config: The messages.compilerMessageReporting table contains` +\n ` an invalid entry \"${messageId}\". The identifier format is \"TS\" followed by an integer.`);\n }\n else {\n this._reportingRuleByMessageId.set(messageId, reportingRule);\n }\n }\n }\n if (messagesConfig.extractorMessageReporting) {\n for (const messageId of Object.getOwnPropertyNames(messagesConfig.extractorMessageReporting)) {\n const reportingRule = MessageRouter._getNormalizedRule(messagesConfig.extractorMessageReporting[messageId]);\n if (messageId === 'default') {\n this._extractorDefaultRule = reportingRule;\n }\n else if (!/^ae-/.test(messageId)) {\n throw new Error(`Error in API Extractor config: The messages.extractorMessageReporting table contains` +\n ` an invalid entry \"${messageId}\". The name should begin with the \"ae-\" prefix.`);\n }\n else if (!ExtractorMessageId_1.allExtractorMessageIds.has(messageId)) {\n throw new Error(`Error in API Extractor config: The messages.extractorMessageReporting table contains` +\n ` an unrecognized identifier \"${messageId}\". Is it spelled correctly?`);\n }\n else {\n this._reportingRuleByMessageId.set(messageId, reportingRule);\n }\n }\n }\n if (messagesConfig.tsdocMessageReporting) {\n for (const messageId of Object.getOwnPropertyNames(messagesConfig.tsdocMessageReporting)) {\n const reportingRule = MessageRouter._getNormalizedRule(messagesConfig.tsdocMessageReporting[messageId]);\n if (messageId === 'default') {\n this._tsdocDefaultRule = reportingRule;\n }\n else if (!/^tsdoc-/.test(messageId)) {\n throw new Error(`Error in API Extractor config: The messages.tsdocMessageReporting table contains` +\n ` an invalid entry \"${messageId}\". The name should begin with the \"tsdoc-\" prefix.`);\n }\n else if (!this._tsdocConfiguration.isKnownMessageId(messageId)) {\n throw new Error(`Error in API Extractor config: The messages.tsdocMessageReporting table contains` +\n ` an unrecognized identifier \"${messageId}\". Is it spelled correctly?`);\n }\n else {\n this._reportingRuleByMessageId.set(messageId, reportingRule);\n }\n }\n }\n }", "title": "" }, { "docid": "3a30d9a80ab59127bc6c7547afdd4423", "score": "0.50597245", "text": "function processConfig(config) {\r\n if (!config) {\r\n return config;\r\n }\r\n var settingsServiceInstance = SettingsService.getInstance();\r\n var entries = config.entries || {};\r\n if (entries.fpr_enabled !== undefined) {\r\n // TODO: Change the assignment of loggingEnabled once the received type is\r\n // known.\r\n settingsServiceInstance.loggingEnabled =\r\n String(entries.fpr_enabled) === 'true';\r\n }\r\n else {\r\n // Config retrieved successfully, but there is no fpr_enabled in template.\r\n // Use secondary configs value.\r\n settingsServiceInstance.loggingEnabled = DEFAULT_CONFIGS.loggingEnabled;\r\n }\r\n if (entries.fpr_log_source) {\r\n settingsServiceInstance.logSource = Number(entries.fpr_log_source);\r\n }\r\n if (entries.fpr_log_endpoint_url) {\r\n settingsServiceInstance.logEndPointUrl = entries.fpr_log_endpoint_url;\r\n }\r\n // Key from Remote Config has to be non-empty string, otherwsie use local value.\r\n if (entries.fpr_log_transport_key) {\r\n settingsServiceInstance.transportKey = entries.fpr_log_transport_key;\r\n }\r\n if (entries.fpr_vc_network_request_sampling_rate !== undefined) {\r\n settingsServiceInstance.networkRequestsSamplingRate = Number(entries.fpr_vc_network_request_sampling_rate);\r\n }\r\n if (entries.fpr_vc_trace_sampling_rate !== undefined) {\r\n settingsServiceInstance.tracesSamplingRate = Number(entries.fpr_vc_trace_sampling_rate);\r\n }\r\n // Set the per session trace and network logging flags.\r\n settingsServiceInstance.logTraceAfterSampling = shouldLogAfterSampling(settingsServiceInstance.tracesSamplingRate);\r\n settingsServiceInstance.logNetworkAfterSampling = shouldLogAfterSampling(settingsServiceInstance.networkRequestsSamplingRate);\r\n return config;\r\n}", "title": "" }, { "docid": "3a30d9a80ab59127bc6c7547afdd4423", "score": "0.50597245", "text": "function processConfig(config) {\r\n if (!config) {\r\n return config;\r\n }\r\n var settingsServiceInstance = SettingsService.getInstance();\r\n var entries = config.entries || {};\r\n if (entries.fpr_enabled !== undefined) {\r\n // TODO: Change the assignment of loggingEnabled once the received type is\r\n // known.\r\n settingsServiceInstance.loggingEnabled =\r\n String(entries.fpr_enabled) === 'true';\r\n }\r\n else {\r\n // Config retrieved successfully, but there is no fpr_enabled in template.\r\n // Use secondary configs value.\r\n settingsServiceInstance.loggingEnabled = DEFAULT_CONFIGS.loggingEnabled;\r\n }\r\n if (entries.fpr_log_source) {\r\n settingsServiceInstance.logSource = Number(entries.fpr_log_source);\r\n }\r\n if (entries.fpr_log_endpoint_url) {\r\n settingsServiceInstance.logEndPointUrl = entries.fpr_log_endpoint_url;\r\n }\r\n // Key from Remote Config has to be non-empty string, otherwsie use local value.\r\n if (entries.fpr_log_transport_key) {\r\n settingsServiceInstance.transportKey = entries.fpr_log_transport_key;\r\n }\r\n if (entries.fpr_vc_network_request_sampling_rate !== undefined) {\r\n settingsServiceInstance.networkRequestsSamplingRate = Number(entries.fpr_vc_network_request_sampling_rate);\r\n }\r\n if (entries.fpr_vc_trace_sampling_rate !== undefined) {\r\n settingsServiceInstance.tracesSamplingRate = Number(entries.fpr_vc_trace_sampling_rate);\r\n }\r\n // Set the per session trace and network logging flags.\r\n settingsServiceInstance.logTraceAfterSampling = shouldLogAfterSampling(settingsServiceInstance.tracesSamplingRate);\r\n settingsServiceInstance.logNetworkAfterSampling = shouldLogAfterSampling(settingsServiceInstance.networkRequestsSamplingRate);\r\n return config;\r\n}", "title": "" }, { "docid": "c355bd82ffac4fa182776fb33249df47", "score": "0.5059324", "text": "function updateConfig(){\n if($('#ipStart').val()) config['ipScanStart'] = $('#ipStart').val();\n if($('#ipEnd').val()) config['ipScanEnd'] = $('#ipEnd').val();\n if($('#domain').val()) config['domain'] = $('#domain').val();\n if($('#ignoreHost').val() == \"True\") config['ignoreHost'] = 'true';\n else config['ignoreHost'] = 'false';\n}", "title": "" }, { "docid": "9bbd49b54f559afa3e2daf84a2b18f84", "score": "0.5041252", "text": "merge(rhs) {\n return new Config(mergeInternal(this.config, rhs.config));\n }", "title": "" }, { "docid": "4a06a2104db28433cfeb138c06bcd9e9", "score": "0.5039526", "text": "configureDebug(key, value) {\n // set default data structure to the settings\n this.settings[key] = this.settings[key] || {};\n\n // merge with the default value\n const enabled = typeof value.enabled === 'boolean'\n ? value.enabled : (this.settings[key]['enabled'] || false);\n this.settings[key]['enabled'] = enabled;\n\n // override values based on global debug flag\n const values = _.omit(value, ['enabled']);\n _.each(values, (childValue, childKey) => {\n this.settings[key][childKey] = enabled\n ? childValue : false;\n });\n }", "title": "" }, { "docid": "c2d19c888db0ea2b7192b4c07c310cf8", "score": "0.50202566", "text": "function mix(target) {\n for (var prop in baseConfig) {\n if (baseConfig.hasOwnProperty(prop)) {\n target[prop] = baseConfig[prop];\n }\n }\n return target;\n }", "title": "" }, { "docid": "e9eebfbbb659a1611a822a0ace79683f", "score": "0.5019808", "text": "function processConfig(config) {\n if (!config) return config;\n var settingsServiceInstance = SettingsService.getInstance();\n var entries = config.entries || {};\n\n if (entries.fpr_enabled !== undefined) {\n // TODO: Change the assignment of loggingEnabled once the received type is known.\n settingsServiceInstance.loggingEnabled = String(entries.fpr_enabled) === 'true';\n } else {\n // Config retrieved successfully, but there is no fpr_enabled in template.\n // Use secondary configs value.\n settingsServiceInstance.loggingEnabled = SECONDARY_CONFIGS.loggingEnabled;\n }\n\n if (entries.fpr_log_source) {\n settingsServiceInstance.logSource = Number(entries.fpr_log_source);\n }\n\n if (entries.fpr_log_endpoint_url) {\n settingsServiceInstance.logEndPointUrl = entries.fpr_log_endpoint_url;\n }\n\n if (entries.fpr_vc_network_request_sampling_rate !== undefined) {\n settingsServiceInstance.networkRequestsSamplingRate = Number(entries.fpr_vc_network_request_sampling_rate);\n }\n\n if (entries.fpr_vc_trace_sampling_rate !== undefined) {\n settingsServiceInstance.tracesSamplingRate = Number(entries.fpr_vc_trace_sampling_rate);\n } // Set the per session trace and network logging flags.\n\n\n settingsServiceInstance.logTraceAfterSampling = shouldLogAfterSampling(settingsServiceInstance.tracesSamplingRate);\n settingsServiceInstance.logNetworkAfterSampling = shouldLogAfterSampling(settingsServiceInstance.networkRequestsSamplingRate);\n return config;\n}", "title": "" }, { "docid": "b42ccae22741c31270e5bcab5302907c", "score": "0.50097924", "text": "function writeConfig() {\n self._repo.config.set(config, function (err) {\n if (err) {\n return callback(err);\n }\n\n addDefaultAssets();\n });\n }", "title": "" }, { "docid": "6fe6dd9b0482463353cdade6c98dec4d", "score": "0.50093764", "text": "setConfig(config) {\n super.setConfig(this.processConfig(config));\n }", "title": "" } ]
16a591d38c4e3001fc474b0f88a0811c
Validate the Street Address one field
[ { "docid": "cbedc3217262d8ab36a8d36c2a746f00", "score": "0.785145", "text": "function validateAddressOne() {\n var addressOne = document.getElementById(\"addressStreetOne\");\n var addressOneError = document.getElementById(\"addressStreetOneRequirements\");\n\n //If the address one field is empty, or does not match the \"123 Name St\" format, return false\n if (isEmpty(addressOne.value) || (!streetAddressPattern.test(addressOne.value))) {\n styleError(addressOne, addressOneError, false);\n return false;\n }\n else {\n styleError(addressOne, addressOneError, true);\n return true;\n }\n}", "title": "" } ]
[ { "docid": "651302a8306ee71cd6176fa4e63ab58a", "score": "0.7374787", "text": "function validateAddress(){\n\tvar nomeRegex = /^[a-z]+( [a-z]+)*$/i;\n\tvar cognomeRegex = /^[a-z]+(( |\\'|\\-)[a-z]+)*$/i;\n\tvar viaRegex = /^[a-z]+ [\\w]+\\.?(( |\\-)[\\w]+\\.?)*$/i;\n\tvar civicoRegex = /^[\\w \\.\\-\\\\]+$/;\n\tvar cittaRegex = /^[a-z]+( [a-z]+)*( [a-z]+\\'[a-z]+)*( [a-z]+)*$/i;\n\tvar provinciaRegex = /^[a-z]+(( |\\-)[a-z]+)*$/i;\n\tvar capRegex = /^\\d{5}$/;\n\tvar statoRegex = /^[a-z]{2,}( [a-z]+)*( [a-z]+\\'[a-z]+)*( [a-z]+)*$/i;\n\tvar telefonoRegex = /^((00|\\+)39)?(0\\d{5,9}|3\\d{9})$/;\n\n\treset(nome);\n\treset(cognome);\n\treset(via);\n\treset(civico);\n\treset(citta);\n\treset(provincia);\n\treset(cap);\n\treset(stato);\n\treset(telefono);\n\n\t//gestisce gli errori uno alla volta, dall'alto al basso, se no lo screen reader non legge bene\n\tif(nome.value == \"\" || !(nome.value.trim()).match(nomeRegex)){\n\t\tdisplayError(nome);\n\t\treturn false;\n\t}\n\tif(cognome.value == \"\" || !(cognome.value.trim()).match(cognomeRegex)){\n\t\tdisplayError(cognome);\n\t\treturn false;\t\n\t}\t\n\tif (via.value == \"\" || !(via.value.trim()).match(viaRegex)){\n\t\tdisplayError(via);\n\t\treturn false;\n\t}\n\tif(civico.value == \"\" || !(civico.value.trim()).match(civicoRegex)){\n\t\tdisplayError(civico);\n\t\treturn false;\n\t}\n\tif(citta.value == \"\" || !(citta.value.trim()).match(cittaRegex)){\n\t\tdisplayError(citta);\n\t\treturn false;\n\t}\n\tif(provincia.value == \"\" || !(provincia.value.trim()).match(provinciaRegex)){\n\t\tdisplayError(provincia);\n\t\treturn false;\n\t}\n\tif(cap.value == \"\" || !(cap.value.trim()).match(capRegex)){\n\t\tdisplayError(cap);\n\t\treturn false;\n\t}\n\tif(stato.value == \"\" || !(stato.value.trim()).match(statoRegex)){\n\t\tdisplayError(stato);\n\t\treturn false;\n\t}\n\tif(telefono.value != \"\"){ \n\t\tvar numTel = telefono.value.replace(/\\s+/g, \"\");\n\t\tconsole.log(numTel);\n\t\tif(!numTel.match(telefonoRegex)){\n\t\t\tdisplayError(telefono);\n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ad9e98c1681005076330de84c9a05711", "score": "0.7330747", "text": "validateAddress() {\n\t\tif (!this.request.body.address) {\n\t\t\tthrow new Error(\"Address cannot be empty. Please provide a valid address\");\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9bfa20d7d27a0eb5cf1e88a06f3bac1d", "score": "0.72594553", "text": "function isValidAddress(street, city, country, state, zipcode) {\n if (street !== null && city !== null && country !== null && state !== null && zipcode !== null) {\n return true;\n }\n // arbitraty use of field to keep linter happy until we answer #1\n return true;\n}", "title": "" }, { "docid": "6b03e91ca5d8da3ced6f204796375fcc", "score": "0.71827537", "text": "validateAddress(address, callback) {\n mc.validateAddress({ address: address }, callback);\n }", "title": "" }, { "docid": "dfe34f1d5d7ddc8bdb49c3b828eb01dc", "score": "0.7159144", "text": "function isValidAddress(value) {\n if (typeof value === 'string') {\n return /^[0-9a-f]{40}$/.test(value);\n }\n return false;\n}", "title": "" }, { "docid": "a7b62f0df3d2c63c45db75b97cd66305", "score": "0.7123201", "text": "function validateAddressTwo() {\n var addressTwo = document.getElementById(\"addressStreetTwo\");\n var addressTwoError = document.getElementById(\"addressStreetTwoRequirements\");\n\n //If the second address field is not empty, ensure that it matches the \"123 Name St\" format\n if (!isEmpty(addressTwo.value)) {\n if (!streetAddressPattern.test(addressTwo.value)) {\n styleError(addressTwo, addressTwoError, false);\n return false;\n }\n else {\n styleError(addressTwo, addressTwoError, true);\n return true;\n }\n }\n else {\n styleError(addressTwo, addressTwoError, true);\n return true;\n }\n}", "title": "" }, { "docid": "1f3e21771fd0be37ab70f81fc389070b", "score": "0.7031888", "text": "validateAddress(address) {\n return this.Web3.utils.isAddress(address.toLowerCase());\n }", "title": "" }, { "docid": "7db5d78297b7ab432a80d07846bf2ad9", "score": "0.70301145", "text": "function address_validate(){\n\tvar zip_code = document.getElementById(\"zip\").value;\n\tvar contact_number = document.getElementById(\"contact_number\").value;\n\tvar error_message = \"\";\n\tif ( zip_code == \"\" || zip_code == \"None\" || !zip_code.match(/^[0-9]{6}$/g)){\n\t\terror_message += \"Enter 6 digit zip code\\n\"\n\t}\n\tif ( contact_number == \"\" || contact_number == \"None\" || !contact_number.match(/^[0-9]{10}$/g)){\n\t\terror_message += \"Enter 10 digit contact number\\n\"\n\t}\n\tif (error_message!==\"\"){\n\t\talert (error_message)\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "fe2b84aa78853c2f69099a3ae4616966", "score": "0.6921932", "text": "function addressValidity()\n {\n const addressValid = contact.address;\n if(regExForAddress(addressValid))\n {\n address.style.border = 'solid 2px green'\n address.style.boxShadow = '0px 0px 4px green'\n return true;\n }\n else\n {\n address.style.border = 'solid 2px red'\n address.style.boxShadow = '0px 0px 4px red'\n alert(\"Aucun symbole n'est autorisé pour l'adresse\");\n return false;\n }\n }", "title": "" }, { "docid": "343b5734b4e70e5ab4c2725b7d8f4023", "score": "0.6914468", "text": "validAddress(address) {\n return address.length > 0 && address.length <= 45\n }", "title": "" }, { "docid": "826a1a1b3be4943d8eccb17e84309a3f", "score": "0.68895686", "text": "function checkAddress(event) {\n\tvar address = document.getElementById('address');\n\tif(address.value.trim() == \"\") {\n\t\terrorMap.set(\"Address\", \"Address is required\");\n\t\taddress.style.borderColor = \"red\";\n\t\tevent.preventDefault();\n\t} else {\n\t\tdeleteEntry(\"Address\");\n\t\taddress.style.borderColor = \"green\";\n\t}\n}", "title": "" }, { "docid": "a9ef2223a67a99a1dbb11ef8faa91425", "score": "0.6796226", "text": "function addressValidating() {\n let x = document.forms[\"userInfo\"][\"address\"].value;\n if (x.length < 10) {\n document.getElementById(\"addressError\").innerHTML = \"Address is required.\";\n document.getElementsByClassName(\"required-field\")[2].style.display =\n \"block\";\n return false;\n } else {\n document.getElementsByClassName(\"required-field\")[2].style.display = \"none\";\n document.getElementById(\"addressError\").innerHTML = \"\";\n return true;\n }\n}", "title": "" }, { "docid": "40de3aaa2962b8729ccf6479402b26fd", "score": "0.6762187", "text": "static isValidAddress(address) {\n try {\n MoneroUtils.validateAddress(address);\n return true;\n } catch (e) {\n return false;\n }\n }", "title": "" }, { "docid": "0b46e6b062c84f0e12341b16ea1b07a3", "score": "0.6660146", "text": "function isValid(address) {\n var invalidFieldsList = validate(address);\n return (invalidFieldsList.length === 0);\n}", "title": "" }, { "docid": "016d7d7c0ae169aa7fc0472e30690a09", "score": "0.66530144", "text": "isValidShippingAddress(value) {\n console.log(value);\n if (value.length < 15)\n throw Error('Validation Error: shipping address is invalid');\n }", "title": "" }, { "docid": "1a4a43320632fa9ac158cc8194d08fa2", "score": "0.6628981", "text": "function checkAddress() {\n\tgeocoder.getLocations(jQuery(\"#Field01_1\").val(), function(response) {\n if ( response && response.Status.code === 200)\n {\n\t\tvar loc = response.Placemark[0];\n\n\t\tjQuery(\"#Field01_1\").val( loc.address.substr(0,loc.address.lastIndexOf(',')) );\n\t\tjQuery(\"#Field01_2\").val( loc.Point.coordinates[1] );\n\t\tjQuery(\"#Field01_3\").val( loc.Point.coordinates[0] );\n\n\t\t// Get the ZPID and basic home info\n\t\tjQuery.getJSON(ajax+\"/zillow.php?c=?\", {loc:jQuery(\"#Field01_1\").val()}, function(data){\n\t\t jQuery(\"#Field01_4\").val( data.zpid );\n\t\t});\n }\n\t});\n\treturn false;\n }", "title": "" }, { "docid": "a625061eb5f421c8da9ed83aaac17e9e", "score": "0.6595264", "text": "function validate(address) {\n var country = address.country;\n var invalidFields = [];\n\n // Shortcut no-country error,\n // we are clueless without a country\n if (!country) {\n return [{country: 'Missing'}];\n }\n var fields = format(country).fields;\n\n function fieldError(field, message) {\n var err = {};\n err[field] = message;\n return err;\n }\n\n // Check if all the fields match the expectations\n _.keys(fields).forEach( function (field) {\n // Field must be defined unless marked as optional\n if (!address[field] && !fields[field].optional) {\n invalidFields.push(fieldError(field, 'Missing'));\n return;\n }\n // Field must match defined regexp\n if (fields[field].regexp && !address[field].match(fields[field].regexp)) {\n invalidFields.push(fieldError(field, 'Regexp fail'));\n }\n // Field must be one in a list of defined values\n if (fields[field].values && !_.findWhere(fields[field].values, {value: address[field]})) {\n invalidFields.push(fieldError(field, 'Invalid value'));\n }\n });\n\n // Check for extra fields\n // _.keys(address).forEach( function (field) {\n // if (!(field in fields)) {\n // invalidFields.push(fieldError(field, 'Unknown field'));\n // }\n // });\n\n return invalidFields;\n}", "title": "" }, { "docid": "b10f720ba0a667f54b5bda833d67cea2", "score": "0.6584964", "text": "function checkAddress()\n{\n var MIN_SHORT = 1;\n var MIN_LONG = 2;\n var MIN_TAO = 2;\n var MAX_LONG = 50;\n var MAX_SHORT = 8;\n var MAX_TAO = 100;\n\n var tao = document.getElementById(\"tao\").value;\n var street = document.getElementById(\"street\").value;\n var hNumber = document.getElementById(\"hNumber\").value;\n var box = document.getElementById(\"box\").value;\n var postalCode = document.getElementById(\"postalCode\").value;\n var city = document.getElementById(\"city\").value;\n var country = document.getElementById(\"country\").value;\n\n var taoOK = 1;\n var streetOK = 1;\n var hNumberOK = 1;\n var boxOK = 1;\n var postalCodeOK = 1;\n var cityOK = 1;\n var countryOK = 1;\n\n // check tao\n if (tao == \"\")\n {\n taoOK = 0;\n document.getElementById(\"taoErr\").innerHTML = \"\";\n }\n else\n {\n if (tao.length < MIN_TAO)\n {\n taoOK = 1;\n document.getElementById(\"taoErr\").innerHTML = \" At least \"+ MIN_TAO +\" characters required\";\n }\n else\n {\n if (tao.length > MAX_TAO)\n {\n taoOK = 1;\n document.getElementById(\"taoErr\").innerHTML = \" Maximum \"+ MAX_TAO +\" characters allowed\";\n }\n else\n {\n taoOK = 0;\n document.getElementById(\"taoErr\").innerHTML = \"\";\n }\n }\n }\n // check street\n if (street == \"\")\n {\n streetOK = 1;\n document.getElementById(\"streetErr\").innerHTML = \"* Street is required\";\n }\n else\n {\n if (street.length < MIN_LONG)\n {\n streetOK = 1;\n document.getElementById(\"streetErr\").innerHTML = \"* At least \"+ MIN_LONG +\" characters required\";\n }\n else\n {\n if (street.length > MAX_LONG)\n {\n streetOK = 1;\n document.getElementById(\"streetErr\").innerHTML = \"* Maximum \"+ MAX_LONG +\" characters allowed\";\n }\n else\n {\n streetOK = 0;\n document.getElementById(\"streetErr\").innerHTML = \"* \";\n }\n }\n }\n // check hNumber\n if (hNumber == \"\")\n {\n hNumberOK = 1;\n document.getElementById(\"hNumberErr\").innerHTML = \"* Number is required\";\n }\n else\n {\n if (hNumber.length < MIN_SHORT)\n {\n hNumberOK = 1;\n document.getElementById(\"hNumberErr\").innerHTML = \"* At least \"+ MIN_SHORT +\" character required\";\n }\n else\n {\n if (hNumber.length > MAX_SHORT)\n {\n hNumberOK = 1;\n document.getElementById(\"hNumberErr\").innerHTML = \"* Maximum \"+ MAX_SHORT +\" characters allowed\";\n }\n else\n {\n hNumberOK = 0;\n document.getElementById(\"hNumberErr\").innerHTML = \"* \";\n }\n }\n }\n // check box\n if (box.length > MAX_SHORT)\n {\n boxOK = 1;\n document.getElementById(\"boxErr\").innerHTML = \" Maximum \"+ MAX_SHORT +\" characters allowed\";\n }\n else\n {\n boxOK = 0;\n document.getElementById(\"boxErr\").innerHTML = \"\";\n }\n // check postal code\n if (postalCode == \"\")\n {\n postalCodeOK = 1;\n document.getElementById(\"postalCodeErr\").innerHTML = \"* Postal code is required\";\n }\n else\n {\n if (postalCode.length < MIN_SHORT)\n {\n postalCodeOK = 1;\n document.getElementById(\"postalCodeErr\").innerHTML = \"* At least \"+ MIN_SHORT +\" character required\";\n }\n else\n {\n if (postalCode.length > MAX_SHORT)\n {\n postalCodeOK = 1;\n document.getElementById(\"postalCodeErr\").innerHTML = \"* Maximum \"+ MAX_SHORT +\" characters allowed\";\n }\n else\n {\n postalCodeOK = 0;\n document.getElementById(\"postalCodeErr\").innerHTML = \"* \";\n }\n }\n }\n // check city\n if (city == \"\")\n {\n cityOK = 1;\n document.getElementById(\"cityErr\").innerHTML = \"* City is required\";\n }\n else\n {\n if (city.length < MIN_LONG)\n {\n cityOK = 1;\n document.getElementById(\"cityErr\").innerHTML = \"* At least \"+ MIN_LONG +\" characters required\";\n }\n else\n {\n if (city.length > MAX_LONG)\n {\n cityOK = 1;\n document.getElementById(\"cityErr\").innerHTML = \"* Maximum \"+ MAX_LONG +\" characters allowed\";\n }\n else\n {\n cityOK = 0;\n document.getElementById(\"cityErr\").innerHTML = \"* \";\n }\n }\n }\n // check country\n if (country == \"\")\n {\n countryOK = 1;\n document.getElementById(\"countryErr\").innerHTML = \"* Country is required\";\n }\n else\n {\n if (country.length < MIN_LONG)\n {\n countryOK = 1;\n document.getElementById(\"countryErr\").innerHTML = \"* At least \"+ MIN_LONG +\" characters required\";\n }\n else\n {\n if (country.length > MAX_LONG)\n {\n countryOK = 1;\n document.getElementById(\"countryErr\").innerHTML = \"* Maximum \"+ MAX_LONG +\" characters allowed\";\n }\n else\n {\n countryOK = 0;\n document.getElementById(\"countryErr\").innerHTML = \"* \";\n }\n }\n }\n\n // decide if OK to send to server\n if (taoOK + streetOK + hNumberOK + boxOK + postalCodeOK + cityOK + countryOK > 0)\n {\n return false;\n }\n return true;\n} // end function checkAddress", "title": "" }, { "docid": "12767050e93fcd6bdfa862f3a8cc1d69", "score": "0.6561458", "text": "isAddress(address) {\n try {\n return this.web3.utils.isAddress(address);\n } catch (error) {\n console.log(error);\n throw new Error('Failed validate address');\n }\n }", "title": "" }, { "docid": "e91ce83135609aa80ad085dafb29384e", "score": "0.65450364", "text": "function checkSTR_Address1()\r\n{\r\n if(document.getElementById(\"STR_Address1\").value.trim() == \"\")\r\n {\r\n document.getElementById(\"STRAdd1Err\").innerHTML =\"You must enter a Address1\";\r\n STR_Address1.focus();\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "856e71202576132623631e9448456aa3", "score": "0.65154034", "text": "function checkAddress1()\n{\n\tvar x = document.getElementById(\"addr1\").value;\n\tif ( x == null || x ==\"\" )\n\t \t{\n\t\t\tvar message = \"This field cannot be blank\";\n\t \t}\n\telse \n\t\t{\n\t\t\tvar message = \" \";\n\t\t}\n\tdocument.getElementById(\"addr1span\").innerHTML = message;\n}", "title": "" }, { "docid": "8b165eda9dcb655fcfda30de2b17be7d", "score": "0.6467691", "text": "function checkAddress_vendor()\r\n{\r\n if(document.getElementById(\"add1\").value.trim() == \"\")\r\n {\r\n document.getElementById(\"add1err\").innerHTML =\"You must enter Address1\";\r\n add1.focus();\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "a530479220b32580a8769728fe489232", "score": "0.6449643", "text": "function checkAddress2()\n{\n\tvar x = document.getElementById(\"addr2\").value;\n\tif ( x == null || x ==\"\" )\n\t\t{\n\t\t\tvar message = \"This field cannot be blank\";\n\t \t}\n\telse \n\t\t{\n\t\t\tvar message = \" \";\n\t\t}\n\tdocument.getElementById(\"addr2span\").innerHTML = message;\n}", "title": "" }, { "docid": "87538729319e36689cb4377a0da34e63", "score": "0.643044", "text": "function validateUSAZipCode(field) {\n // empty fields pass validation\n if (field === undefined || field === null) {\n return true;\n }\n var regex = new RegExp(/(^\\d{5}$)|(^\\d{5}-\\d{4}$)/);\n return regex.test(field);\n}", "title": "" }, { "docid": "1a9f8fe12e962181bf9d562434ae9a17", "score": "0.64293474", "text": "function validateAddress(address) {\n var template = {\n surname: {\n required: true,\n type: ''\n },\n firstname: {\n required: true,\n type: ''\n },\n phone_number: {\n required: true,\n type: ''\n },\n address: {\n type: ''\n }\n }\n\n for(var key in address) {\n if (template[key] === undefined) {\n return new Error('Address object failed validation: ' + key + ' is not a valid phone book entry');\n } else if (typeof address[key] !== typeof template[key].type) {\n return new Error('Address object failed validation: ' + key + ' is not of expected type ' + typeof template[key].type);\n }\n }\n for(var key in template) {\n if (template[key].required && address[key] === undefined) {\n return new Error('Address object is missing ' + key);\n }\n }\n\n return;\n}", "title": "" }, { "docid": "5ff4b7caba47ad718ec28477b8f10f23", "score": "0.64179397", "text": "function addressField() {\n var address = document.getElementById(\"address\");\n if (address.value === null || address.value === \"\") {\n window.alert(\"Address is required\");\n } else {\n document.getElementById(\"AddressOutput\").innerHTML = address.value;\n // return true;\n }\n }", "title": "" }, { "docid": "51462bf9f6c345afe69e2976157bae6a", "score": "0.6417375", "text": "function updateAddressValidation (newUserAddress) {\n if (!newUserAddress.addressLine) {\n return 'You must enter an Address line';\n }\n\n if (!newUserAddress.country) {\n return 'You must enter a Country';\n }\n\n if (!newUserAddress.city) {\n return 'You must enter a City';\n }\n\n if (!newUserAddress.postcode) {\n return 'You must enter a Postcode';\n }\n\n return false;\n}", "title": "" }, { "docid": "15f9142bc2e0588434eefddf6c67aa56", "score": "0.641537", "text": "function checkAddressEmpty() {\n var address = document.studentForm.sAddress.value;\n if (address == \"\" || address == null) {\n var message = \"Address should not be empty\";\n showResult(message);\n return true;\n } else\n hideResult();\n return false;\n}", "title": "" }, { "docid": "10048aa5582850bb3f472ebfa8e55faa", "score": "0.64037526", "text": "verifyAddressRequest(address) {\n if (this.validAddresses[address]) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3770cd0efc2c33a5655be33570aac2e6", "score": "0.63982344", "text": "function validateAddress(address){\n if(address == \"\"){\n document.getElementById(\"errorAddress\").innerHTML=\" *Address is empty\";\n\t\treturn false;\n }else if(/[<>?@#$%^*()]/.test(address)){\n document.getElementById(\"errorAddress\").innerHTML=\" *Invalid characters\";\n\t\treturn false;\n }else if(address.length > 30){\n\t\tdocument.getElementById(\"errorAddress\").innerHTML=\" *Characters is too long\";\n\t\treturn false;\n\t}\n\treturn true;\n\n}", "title": "" }, { "docid": "c8dcc3c757fc2392a32e7c4753447b74", "score": "0.6372892", "text": "function validateAddress() {\n var Area = $(\"#address\").val();\n if (Area == null || Area == \"\") {\n $(\"#error_Address\").text(\"Please enter your address\");\n return false;\n } else {\n $(\"#error_Address\").hide();\n }\n}", "title": "" }, { "docid": "f8eec61df2e36b77bfbf55738e348d50", "score": "0.63589317", "text": "function fn_address_check(){\r\n\t$(\"#address_check\").val('no');\r\n\tvar zip_num = $.trim($(\"#zip_num\").val());\r\n\tvar address1 = $.trim($(\"#address1\").val());\r\n\tvar address2 = $.trim($(\"#address2\").val());\r\n\t\r\n\tif (zip_num == \"\" || address1 == \"\" || address2 == \"\") {\r\n\t\t$(\"#address_error_msg\").css(\"color\", \"red\");\r\n\t\t$(\"#address_error_msg\").text(\"주소를 확인하세요.\");\r\n\t\t$('#address2').focus();\r\n\t\treturn false;\r\n\t}\r\n\t$(\"#address_check\").val('yes');\r\n\treturn true;\r\n}", "title": "" }, { "docid": "166034cfa57eb019720cd51d409805b5", "score": "0.63414747", "text": "function handleAddressValidation() {\n var addressContainer = document.getElementById(\"address-input-row\");\n var errorSpan = document.getElementById(\"address-error-span\");\n var inputFields = addressContainer.getElementsByTagName(\"input\");\n var address = [];\n var anyFieldEmpty = false;\n for (var i = 0; i < inputFields.length; i++) {\n if (inputFields[i].value.trim() == \"\") {\n anyFieldEmpty = true;\n break;\n }\n else {\n address.push(inputFields[i].value);\n }\n }\n if (anyFieldEmpty) {\n errorSpan.innerText = \"One of required fields is empty.\";\n errorSpan.setAttribute(\"data-valid\", \"false\");\n return null;\n }\n else {\n errorSpan.innerText = \"\";\n errorSpan.setAttribute(\"data-valid\", \"true\");\n return address;\n }\n}", "title": "" }, { "docid": "bcca8e52d037fd1a55f705bbc8d02770", "score": "0.6325985", "text": "function validateAddress(){\n var addressCheck = $('#address-text')[0].validity.valid;\n if(addressCheck){\n $('#confirm-button').attr('disabled', false);\n }else{\n $('#confirm-button').attr('disabled', true);\n }\n}", "title": "" }, { "docid": "069ee3fc56010b696a60095f7f6c1d9e", "score": "0.63222337", "text": "function check_address() {\n var address = $(\"#form_address\").val();\n if (address !== \"\") {\n $(\"#error_address\").hide();\n $(\"#form_address\").css(\"border-bottom\", \"2px solid #00ff11\");\n } else {\n $(\"#error_address\").html(\"Fill The Form\");\n $(\"#error_address\").show();\n $(\"#form_address\").css(\"border-bottom\", \"2px solid red\");\n error_addressV = true;\n }\n}", "title": "" }, { "docid": "11b1bba78787537702ba0454d6b4445b", "score": "0.6293925", "text": "function validatePalladioAccount(account)\n{\n return web3.utils.isAddress(account);\n}", "title": "" }, { "docid": "a8a65ba5724317480ce9c3ee917007a3", "score": "0.628514", "text": "function validate_address($t,shakeEnable) {\n\t\t var required = $t.hasClass('creativecontactform_required') ? true : false;\n\t\t var value = $.trim( $t.val() );\n\t\t if((!required && value == '') || value.length > 0)\n\t\t\t $t.parents('.creativecontactform_field_box').removeClass('creativecontactform_error');\n\t\t else {\n\t\t\t $t.parents('.creativecontactform_field_box').addClass('creativecontactform_error');\n\t\t\t if(shakeEnable) {\n\t\t\t\t var form_id = $t.parents('.creativecontactform_wrapper').find(\".creativecontactform_send\").attr(\"roll\");\n\t\t\t\t var creativecontactform_shake_count = creativecontactform_shake_count_array[form_id];\n\t\t\t\t var creativecontactform_shake_distanse = creativecontactform_shake_distanse_array[form_id];\n\t\t\t\t var creativecontactform_shake_duration = creativecontactform_shake_duration_array[form_id];\n\t\t\t\t$t.parents('.creativecontactform_input_element').shake({'shakes': creativecontactform_shake_count,'distance': creativecontactform_shake_distanse,'duration':creativecontactform_shake_duration});\n\t\t\t }\n\t\t }\n\t }", "title": "" }, { "docid": "58ac664668793602179027a7dbfdd856", "score": "0.6268202", "text": "function validateAddressBook(){\nvar fName = document.forms[\"frmAddress\"][\"fName\"].value;\nvar lName = document.forms[\"frmAddress\"][\"lName\"].value;\nvar street = document.forms[\"frmAddress\"][\"street\"].value;\nvar zipCode = document.forms[\"frmAddress\"][\"zipCode\"].value;\nvar city = document.forms[\"frmAddress\"][\"city\"].value;\n\tif(fName == \"\"){\n\t\t\tdocument.getElementById(\"msg-container\").innerHTML=\"Please enter First Name\";\n\t\t\tdocument.getElementById('fName').focus();\n\t\t\treturn false;\n\t}\n\t\n\tif(lName == \"\"){\n\t\t\tdocument.getElementById(\"msg-container\").innerHTML=\"Please enter Last Name\";\n\t\t\tdocument.getElementById('lName').focus();\n\t\t\treturn false;\n\t}\n\tif(street == \"\"){\n\t\t\tdocument.getElementById(\"msg-container\").innerHTML=\"Please enter value for street\";\n\t\t\tdocument.getElementById('street').focus();\n\t\t\treturn false;\n\t}\n\tif(zipCode == \"\"){\n\t\t\tdocument.getElementById(\"msg-container\").innerHTML=\"Please enter zip code\";\n\t\t\tdocument.getElementById('zipCode').focus();\n\t\t\treturn false;\n\t}\n\tif(city == \"\"){\n\t\t\tdocument.getElementById(\"msg-container\").innerHTML=\"Please select City\";\n\t\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "f38d3329533a2073aad70d7414195f2b", "score": "0.6266986", "text": "function validateCanadaPostalCode(field) {\n // empty fields pass validation\n if (field === undefined || field === null) {\n return true;\n }\n var regex = new RegExp(/(^[A-Za-z0-9]{6}$)|(^[A-Za-z0-9]{3}\\s[A-Za-z0-9]{3}$)/);\n return regex.test(field);\n}", "title": "" }, { "docid": "49ff55689b9fa8c43fcb76a221d111f1", "score": "0.62611115", "text": "function oneToOneMappingValidation () {\n var txtValidArray = new Array();\n txtValidArray[0] = \"tf1_sourceIPAddr, \"+LANG_LOCALE['12028'];\n txtValidArray[1] = \"tf1_mappedIPAddr, \"+LANG_LOCALE['12028'];\n txtValidArray[2] = \"tf1_rangeLength, \"+LANG_LOCALE['30210'];\n \n if (txtFieldArrayCheck(txtValidArray) == false) \n return false;\n\n if (ipv4Validate ('tf1_sourceIPAddr', 'IP', false, true, LANG_LOCALE['11281'], LANG_LOCALE['11031'], true) == false)\n return false;\n \n if (ipv4Validate ('tf1_mappedIPAddr', 'IP', false, true, LANG_LOCALE['11281'], LANG_LOCALE['11031'], true) == false)\n return false;\n\n var rangeLenObj = document.getElementById('tf1_rangeLength');\n if (numericValueRangeCheck (rangeLenObj, \"\", \"\",1, 254, true, LANG_LOCALE['30211']+': ', \"\") == false) \t\n return false;\n\n\tsetHiddenChks('tf1_frmOneToOneMapping');\n return true;\n}", "title": "" }, { "docid": "e12c560c26bda3bd95379cb21655b342", "score": "0.62540185", "text": "addressValidationSuccessSingleBadAddress() {\n return asyncReturn(\n {\n addresses: [\n {\n address: {\n addressLine1: '123 McGee',\n addressType: 'UNKNOWN',\n city: 'San Francisco',\n countryName: 'United States',\n countryCodeIso3: 'USA',\n stateCode: 'CA',\n zipCode: '94122',\n },\n addressMetaData: {\n confidenceScore: 0.0,\n addressType: 'Unknown',\n deliveryPointValidation: 'MISSING_ZIP',\n },\n },\n ],\n validationKey: -245128725,\n },\n 1000,\n );\n }", "title": "" }, { "docid": "f6a45a030fc73fbd105d313fb595db92", "score": "0.62492424", "text": "function validateAccount(account)\n{\n return web3.utils.isAddress(account);\n}", "title": "" }, { "docid": "908cad32335ccf3246002cfc3388ee1b", "score": "0.6248166", "text": "function validateAddress(id) {\n var place = document.getElementsByName(id)[0];\n\n // if address is empty\n if (place.value == \"\") {\n alert(\"Please enter a valid \" + id);\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "f6248919aa1f4f122bdac1d304f9b9e5", "score": "0.6247897", "text": "checkAddress(address) {\n return Web3.utils.isAddress(address)\n }", "title": "" }, { "docid": "62433cf75cd27af7ddb3f0a3561d4fde", "score": "0.6239955", "text": "function validatePoint({ address: { street, location: { lat, lon } }, timestamp }) {\n if (typeof street != 'string') return { valid: false, msg: 'Calle invalida' };\n if (typeof lat != 'number') return { valid: false, msg: 'Latitud de inicio/fin invalida' };\n if (typeof lon != 'number') return { valid: false, msg: 'Longitud de inicio/fin invalida' };\n if (typeof timestamp != 'number') return { valid: false, msg: 'Timestamp de inicio/fin invalido' };\n\n return { valid: true };\n}", "title": "" }, { "docid": "91def431b6e5a79bdbe251230303ad36", "score": "0.6220423", "text": "function validateAddresses(id){\r\n\tvar address = document.getElementById(id).value;\r\n\tvar geocoder = new google.maps.Geocoder();\r\n\tgeocoder.geocode({'address': address},function(results, status){\r\n\t if (status === google.maps.GeocoderStatus.OK && results.length == 1) {\r\n\t \tvalueChanger(id+\"Validator\",true);\r\n\t }\r\n\t else{\r\n\t \tvalueChanger(id+\"Validator\",false);\r\n\t }\r\n\t});\r\n}", "title": "" }, { "docid": "0b47368c99bec19b782a9ac978540e9a", "score": "0.62164974", "text": "function add_validate(address)\n {\n var regAdd = /^(?=.*\\d)[a-zA-Z\\s\\d\\/]+$/;\n\n if(regAdd.test(address) == false)\n {\n document.getElementById(\"statusAdd\").innerHTML\t= \"<span class='warning'>Address is not valid yet.</span>\";\n }\n else\n {\n document.getElementById(\"statusAdd\").innerHTML\t= \"<span class='valid'>Thanks, Address looks valid!</span>\";\n }\n }", "title": "" }, { "docid": "f4fabdb6b01c1d55c0926583dbda8edb", "score": "0.6193363", "text": "validatorAddress(address){\n try {\n const result = this.api.isValidAddress(address);\n console.log(result)\n return result;\n } catch (error) {\n console.log(error)\n }\n }", "title": "" }, { "docid": "dd92b920cb2e711d896e635b4371d001", "score": "0.6191437", "text": "function isValidAddress(address) {\n const api = new RippleAPI();\n if (address[0] === 'r') return api.isValidAddress(address);\n else return rippleAddressCodec.isValidXAddress(address);\n}", "title": "" }, { "docid": "076614471449357fd181bb682a38921f", "score": "0.619139", "text": "function Postalcode_validation() \r\n { \r\n if(UPostalcode.value.match(Postalcode_V)) \r\n { \r\n Province_validation();\r\n return true; \r\n } \r\n else \r\n { \r\n alert('A Canadian postal code is a six-character string that forms part of a postal address in Canada. They are in the format A1A1A1'); \r\n UPostalcode.focus(); \r\n return false; \r\n } \r\n }", "title": "" }, { "docid": "354162b7bbcd04102ff16250eee1fa5d", "score": "0.61895657", "text": "function validateAddress(postcode) {\n // Ensure postcode matches UK postcode format\n if(!postcode.toUpperCase().match(/(GIR 0AA)|((([ABCDEFGHIJKLMNOPRSTUWYZ][0-9][0-9]?)|(([ABCDEFGHIJKLMNOPRSTUWYZ][ABCDEFGHKLMNOPQRSTUVWXY][0-9][0-9]?)|(([ABCDEFGHIJKLMNOPRSTUWYZ][0-9][ABCDEFGHJKSTUW])|([ABCDEFGHIJKLMNOPRSTUWYZ][ABCDEFGHKLMNOPQRSTUVWXY][0-9][ABEHMNPRVWXY])))) [0-9][ABDEFGHJLNPQRSTUWXYZ]{2})/g\n)) return false;\n\n // Set request to send to the getAddress API\n var addressRequest = {\n uri: 'https://api.getAddress.io/v2/uk/' + postcode + '?api-key=' + process.env.API_KEY_GETADDRESS,\n json: true,\n resolveWithFullResponse: true\n };\n // Send request\n return rpromise(addressRequest)\n .then(function(response) {\n //console.log(response.statusCode);\n if(response.statusCode === 200) return true;\n })\n .catch(function(error) {\n //console.log(error);\n return false;\n });\n}", "title": "" }, { "docid": "542b9733403df4b584035f72e59e071f", "score": "0.61630225", "text": "static validateAddress(address, digests) {\r\n if (!objectHelper_1.ObjectHelper.isType(address, address_1.Address)) {\r\n throw new businessError_1.BusinessError(\"The address should be an object of type Address\");\r\n }\r\n if (!arrayHelper_1.ArrayHelper.isTyped(digests, trytes_1.Trytes)) {\r\n throw new businessError_1.BusinessError(\"The digests should be an array of type Trytes\");\r\n }\r\n return address.toTrytes().toString() ===\r\n new multiSigAddress_1.MultiSigAddress().finalize(digests).toTrytes().toString();\r\n }", "title": "" }, { "docid": "0f39fcf50cb815c6f09c8d157a2368d1", "score": "0.6153261", "text": "function addressfield(add){\n var myadd= /^[a-zA-Z0-9 ]*$/;\n if(add.match(myadd))\n {\n return true;\n }\n else\n alert(\"invalid address\");\n}", "title": "" }, { "docid": "3d80fc09bcbcb8cfefdc49cb6c1ea4da", "score": "0.6135062", "text": "function validateDeliveryAddress01() {\n if ($(\"#txt-deliadd01\").val().length == 0) {\n $(\"#address_error\").show();\n $(\"#txt-deliadd01\").css(\"background-color\", background_color);\n $(\"#address_error\").text(\"Please enter the mandatory fields of the address.\");\n return false;\n } else {\n $(\"#txt-deliadd01\").css(\"background-color\", \"white\");\n $(\"#address_error\").hide();\n }\n}", "title": "" }, { "docid": "5b326782f4c913cd74a21985be467ce7", "score": "0.6128303", "text": "isValidAddress(address) {\n return (addressCodec.isValidClassicAddress(address) ||\n addressCodec.isValidXAddress(address));\n }", "title": "" }, { "docid": "2f79ab172b8c91df35b7e3721c4634dc", "score": "0.6118093", "text": "function CheckAddress() {\n\t\tif (login.AllowServerCall && Validation.IsEmail(_emailField)) {\n\t\t\tvar serverCall = new ServerCall(\"EmailCheck\");\n\t\t\tserverCall.Callback = CheckAddressResult;\n\t\t\tserverCall.Parameters = \"address=\" + _emailField.value;\n\t\t\tGlobal.ProgressBar.Start(\"Validating e-mail\");\n\t\t\tserverCall.Start();\n\t\t}\n\t}", "title": "" }, { "docid": "746844e396ec4840a9f76f22105f13c2", "score": "0.60868984", "text": "function checkAddress(inputName){\n if (submitSuburb == $('#replace-suburb').text()) {\n $('#suburb-tooltip').css('display','none');\n } else {\n $('#suburb-tooltip').css('display','block');\n }\n if($('#street_number').val()!= ''){\n $(\".notification\").html(\"\");\n $(inputName).prop('disabled', false);\n $(\"\")\n } else {\n $(\".notification\").html(\"Please enter your full address, including your house number. This information won’t be shared with agents\")\n $(inputName).prop('disabled', true);\n }\n }", "title": "" }, { "docid": "ecf8f493a4e37241196ac62091c91445", "score": "0.6063484", "text": "function isAddress(str) {\n\treturn str.match(/^[a-f0-9]{76}$/) !== null;\n}", "title": "" }, { "docid": "e52180bfcee7b9287a7a04caad2ee434", "score": "0.6034522", "text": "function valad() {\n 'use strict';\n var ad = (document.getElementById('inAddress').value);\n //window.alert(\"Your address is \" + ad);\n //window.alert(ad.length);\n if (ad.length < 4) {\n window.alert(\"You must fill in your Address\");\n document.getElementById('inAddress').focus();\n return false;\n } else {\n return true;\n //window.alert(\"Address is good.\");\n }\n}", "title": "" }, { "docid": "86308f5abc1891652f3b3d21d673238a", "score": "0.602323", "text": "function validateAddressline1(addressline1)\n{\n\n if((document.getElementById(addressline1).value)!=\"\")\n {\n document.getElementById(addressline1).style.background='#ccffcc';\n document.getElementById(addressline1+'Error').style.display='none';\n return true;\n }\n else\n {\n document.getElementById(addressline1).style.background='#e35152';\n document.getElementById(addressline1+'Error').style.display='block';\n return false;\n }\n}", "title": "" }, { "docid": "75ea1b649c3255bb9d4c0b2770f96f7d", "score": "0.59886616", "text": "function valbad() {\n 'use strict';\n var adb = (document.getElementById('bilAddress').value);\n //window.alert(\"Your address is \" + adb);\n //window.alert(adb.length);\n if (adb.length < 4) {\n window.alert(\"You must fill in your Address\");\n document.getElementById('bilAddress').focus();\n return false;\n } else {\n return true;\n //window.alert(\"Address is good.\");\n }\n}", "title": "" }, { "docid": "9519c19ac8000f0aadec409378e14ebb", "score": "0.5957492", "text": "function isValidAddress(str, multi) {\r\n\tif (typeof str !== \"string\") {\r\n\t\treturn false;\r\n\t}\r\n\tif (multi) {\r\n\t\treturn str === str.toUpperCase() && str.length === 32;\r\n\t}\r\n\t// v2.4.1 wallet accepts launch URIs with email, different aliases and phone\r\n\treturn (str === str.toUpperCase() && str.length === 32) ||\r\n\t\t/^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(str) ||\r\n\t\t/^reddit\\/[a-z0-9\\-_]{3,20}$/i.test(str) ||\r\n\t\t/^steem\\/[a-z0-9\\-_.]{3,20}$/i.test(str) ||\r\n\t\t/^@([a-z\\d\\-_])+$/i.test(str) ||\r\n\t\t/^\\+\\d{9,14}$/.test(str);\r\n}", "title": "" }, { "docid": "c27cf237394beb0caac4b98d417ca747", "score": "0.59483486", "text": "function validateForm(){\n// create object variables from form\n var fname = document.getElementById('fname').value;\n var lname = document.getElementById('lname').value;\n var street = document.getElementById('street').value;\n var line2 = document.getElementById('line2').value;\n var city = document.getElementById('city').value;\n var state = document.getElementById('state').value;\n var zip = document.getElementById('zip').value;\n var form = document.getElementById(\"changeAddress\");\n var er = document.getElementById('error');\n var valid = 0;\n\n // is fname >0 & < 50 characters\n if(fname.length < 50){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"First name must be less than 50 characters\";\n er.style.display = \"inline-block\";\n return\n }\n // is lname >0 & < 50 characters\n if(lname.length < 50){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"Last name must be less than 50 characters\";\n er.style.display = \"inline-block\";\n return\n }\n\n // is street address > 125 characters\n if(street.length < 126){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"Street address must be less than 126 characters\";\n er.style.display = \"inline-block\";\n return\n }\n // is Address Line 2 > 125 characters\n if(line2.length < 126){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"Address Line 2 must be less than 126 characters\";\n er.style.display = \"inline-block\";\n return\n }\n // is city > 50 characters\n if(city.length < 50){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"City must be less than 50 characters\";\n er.style.display = \"inline-block\";\n return\n }\n // is state > 30 characters\n if(state.length < 30){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"State must be less than 30 characters\";\n er.style.display = \"inline-block\";\n return\n }\n // is zip less than 10 characters\n if(zip.length < 10){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n er.innerHTML = \"Zip must be less than 10 characters\";\n er.style.display = \"inline-block\";\n return\n }\n// are all the required fields\n var full = true;\n if(fname.length < 1) full = false;\n if(lname.length < 1) full = false;\n if(street.length < 1) full = false;\n if(city.length < 1) full = false;\n if(state.length < 1) full = false;\n if(zip.length < 1) full = false;\n\n if(full){\n valid++;\n er.innerHTML = \"\";\n er.style.display = \"none\";\n } else {\n document.getElementById('fname').style.backgroundColor = \"#CC99CC\";\n document.getElementById('lname').style.backgroundColor = \"#CC99CC\";\n document.getElementById('street').style.backgroundColor = \"#CC99CC\";\n document.getElementById('city').style.backgroundColor = \"#CC99CC\";\n document.getElementById('state').style.backgroundColor = \"#CC99CC\";\n document.getElementById('zip').style.backgroundColor = \"#CC99CC\";\n er.innerHTML = \"Be sure to fill all the highlighted fields\";\n er.style.display = \"inline-block\";\n return\n }\n\n // if all checks clear submit the form\n form.submit();\n}", "title": "" }, { "docid": "26b7afdf91bb5cff657f3c645b2d5dea", "score": "0.591845", "text": "function validateDeliveryAddress02() {\n if ($(\"#txt-deliadd02\").val().length == 0) {\n $(\"#address_error\").show();\n $(\"#txt-deliadd02\").css(\"background-color\", background_color);\n $(\"#address_error\").text(\"Please enter the mandatory fields highlighted.\");\n return false;\n } else {\n $(\"#txt-deliadd02\").css(\"background-color\", \"white\");\n $(\"#address_error\").hide();\n }\n}", "title": "" }, { "docid": "404a8d2615f28994e54944b48e0155f8", "score": "0.59060997", "text": "function validatePostalCode(value, element) {\n\t// this.optional(element) will return true if the element is empty.\n\t// It's used to skip validation of empty, non-required elements.\n\t// Yes, this is an unfortunate naming on jQuery.validation's part.\n\tif (this.optional(element)) {\n\t\treturn true;\n\t}\n\n\tif (undefined == value || null == value) {\n\t\treturn false;\n\t}\n\n\tvar lenValue = value.length;\n\n\t// Format is either \"12345\" or \"123 45\". \n\tif (lenValue != 5 && lenValue != 6) {\n\t\treturn false;\n\t}\n\n\t// If length is 5, then there can be no space.\n\tif (lenValue == 5 && value.indexOf(' ') != -1) {\n\t\treturn false;\n\t}\n\n\t// If length is 6, then 4th character must be a space.\n\tif (lenValue == 6 && value[3] != ' ') {\n\t\treturn false;\n\t}\n\n\t// Check first three digits.\n\tvar part = value.substring(0,3);\n\tvar number = +part;\n\tif (isNaN(number)) {\n\t\treturn false;\n\t}\n\n\t// Check last two digits.\n\tpart = value.substring(lenValue-2);\n\tnumber = +part;\n\tif (isNaN(number)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "b1a53aa583e9fce25d598491b5e4a902", "score": "0.5904809", "text": "function validateForm(){\n\t\n\tvar currentAddress1 = document.forms[\"myForm\"][\"currentAddress1\"].value;\n\t\n\tvar regeUpperCase=\"[ABCEGHJKLMNPRSTVXY][0-9][ABCEGHJKLMNPRSTVWXYZ] ?[0-9][ABCEGHJKLMNPRSTVWXYZ][0-9]\";\n\tvar regexLowerCase=\"[abceghjklmnprstvxy][0-9][abceghjklmnprstvwxyz] ?[0-9][abceghjklmnprstvwxyz][0-9]\";\n\n\t\n\t\tif(!currentAddress1){\n\t\t document.getElementById('input_2001').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t document.getElementById('geocomplete').focus();\n\t\t return false;\n\t\t}else if(!(currentAddress1.match(regeUpperCase) || currentAddress1.match(regexLowerCase)) ){\n\t\t\tdocument.getElementById('input_2001').innerHTML = \"<span style='color:red'>*Please Enter Proper Address.</span>\";\n\t\t\tdocument.getElementById('geocomplete').focus();\t\n\t\t\treturn false;\n\t\t} \n\t\t\n\t\telse{\n \tdocument.getElementById(\"input_2001\").innerHTML=\"\";\n \t}\n\t\t\n\t\tvar movedIn1 = document.forms[\"myForm\"][\"movedIn1\"].value;\n\t\tif(!movedIn1){\n\t\t document.getElementById('input_2002').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t document.getElementById('datepicker').focus();\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"input_2002\").innerHTML=\"\";\n \t}\n\t\t\n\t\tvar canadacheckinform = document.forms[\"myForm\"][\"canadacheckinform\"].value;\n\t\t\n\t\tif(canadacheckinform=='no'){\n\t\t\t\n\t\t\tconsole.log(\"canadacheckinform \"+canadacheckinform);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t * changes from here for new address\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\tvar currentAddress2 = document.forms[\"myForm\"][\"currentAddress2\"].value;\n\t\t\tif(!currentAddress2){\n\t\t\t document.getElementById('input_2003').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t\t document.getElementById('geocomplete1').focus();\n\t\t\t return false;\n\t\t\t}else if(!(currentAddress2.match(regeUpperCase) || currentAddress2.match(regexLowerCase)) ){\n\t\t\t\tdocument.getElementById('input_2003').innerHTML = \"<span style='color:red'>*Please Enter Proper Address.</span>\";\n\t\t\t\tdocument.getElementById('geocomplete1').focus();\t\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\n\t\t\telse{\n\t \tdocument.getElementById(\"input_2003\").innerHTML=\"\";\n\t \t}\n\t\t\t\n\t\t\tvar movedIn2 = document.forms[\"myForm\"][\"movedIn2\"].value;\n\t\t\t\n\t\t\tif(!movedIn2){\n\t\t\t\t\n\t\t\t document.getElementById('input_2004').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t\t document.getElementById('datepicker1').focus();\n\t\t\t return false;\n\t\t\t}else{\n\t \tdocument.getElementById(\"input_2004\").innerHTML=\"\";\n\t \t}\n\t\t\t\n\t\t\tvar currentAddress3 = document.forms[\"myForm\"][\"currentAddress3\"].value;\t\n\t\t\tif(!currentAddress3){\n\t\t \t document.getElementById('input_2005').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('geocomplete2').focus();\n\t\t\t return false;\n\t\t\t}else if(!(currentAddress3.match(regeUpperCase) || currentAddress3.match(regexLowerCase)) ){\n\t\t\t\tdocument.getElementById('input_2005').innerHTML = \"<span style='color:red'>*Please Enter Proper Address.</span>\";\n\t\t\t\tdocument.getElementById('geocomplete2').focus();\t\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\n\t\t\telse{\n\t\t\tdocument.getElementById(\"input_2005\").innerHTML=\"\";\n\t\t\t}\n\t\t\n\t\t\tvar movedIn3 = document.forms[\"myForm\"][\"movedIn3\"].value;\n\t\t\tif(!movedIn3){\n\t\t \t document.getElementById('input_2006').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('datepicker2').focus();\n\t\t \treturn false;\n\t\t\t}else{\n\t\t\tdocument.getElementById(\"input_2006\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t\t/** changes for new 3 fields for address */\n\t\t\t\n\t\t\tvar currentAddress4 = document.forms[\"myForm\"][\"currentAddress4\"].value;\t\n\t\t\tif(!currentAddress4){\n\t\t \t document.getElementById('input_2007').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('geocomplete3').focus();\n\t\t\t return false;\n\t\t\t}else if(!(currentAddress4.match(regeUpperCase) || currentAddress4.match(regexLowerCase)) ){\n\t\t\t\tdocument.getElementById('input_2007').innerHTML = \"<span style='color:red'>*Please Enter Proper Address.</span>\";\n\t\t\t\tdocument.getElementById('geocomplete3').focus();\t\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\n\t\t\telse{\n\t\t\tdocument.getElementById(\"input_2007\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t\tvar movedIn4 = document.forms[\"myForm\"][\"movedIn4\"].value;\n\t\t\tif(!movedIn4){\n\t\t \t document.getElementById('input_2008').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('datepicker3').focus();\n\t\t \treturn false;\n\t\t\t}else{\n\t\t\tdocument.getElementById(\"input_2008\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t\tvar currentAddress5 = document.forms[\"myForm\"][\"currentAddress5\"].value;\t\n\t\t\tif(!currentAddress5){\n\t\t \t document.getElementById('input_2009').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('geocomplete4').focus();\n\t\t\t return false;\n\t\t\t}else if(!(currentAddress5.match(regeUpperCase) || currentAddress5.match(regexLowerCase)) ){\n\t\t\t\tdocument.getElementById('input_2009').innerHTML = \"<span style='color:red'>*Please Enter Proper Address.</span>\";\n\t\t\t\tdocument.getElementById('geocomplete4').focus();\t\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse{\n\t\t\tdocument.getElementById(\"input_2009\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t\tvar movedIn5 = document.forms[\"myForm\"][\"movedIn5\"].value;\n\t\t\tif(!movedIn5){\n\t\t \t document.getElementById('input_2010').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('datepicker4').focus();\n\t\t \treturn false;\n\t\t\t}else{\n\t\t\tdocument.getElementById(\"input_2010\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tvar currentAddress6 = document.forms[\"myForm\"][\"currentAddress6\"].value;\t\n\t\t\tif(!currentAddress6){\n\t\t \t document.getElementById('input_2011').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('geocomplete5').focus();\n\t\t\t return false;\n\t\t\t}else if(!(currentAddress6.match(regeUpperCase) || currentAddress6.match(regexLowerCase)) ){\n\t\t\t\tdocument.getElementById('input_2011').innerHTML = \"<span style='color:red'>*Please Enter Proper Address.</span>\";\n\t\t\t\tdocument.getElementById('geocomplete5').focus();\t\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse{\n\t\t\tdocument.getElementById(\"input_2011\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t\tvar movedIn6 = document.forms[\"myForm\"][\"movedIn6\"].value;\n\t\t\tif(!movedIn6){\n\t\t \t document.getElementById('input_2012').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \t document.getElementById('datepicker5').focus();\n\t\t \treturn false;\n\t\t\t}else{\n\t\t\tdocument.getElementById(\"input_2012\").innerHTML=\"\";\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\treturn true;\t\n\t}", "title": "" }, { "docid": "bb80212aec3f6912ff99a9579c8dca74", "score": "0.5878123", "text": "function validateEmprAddress(txtID,imageArea,messageArea){\r\n\t var invalid = \" \";\r\n\t var minLength = 40; \r\n\t var flag=\"true\";\r\n\t var emprAddress = document.getElementById(\"address\").value;\r\n\t \r\n\t if(emprAddress==\"\"){\r\n\t message=\"Please enter Address \"\r\n\t flag=\"false\"\r\n\t if(joinfreeValidate == 0)\r\n\t joinfreeValidate = 7\r\n\t setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n\t return false;\r\n\t // check for minimum length\r\n\t }else if (emprAddress.length > minLength){\r\n\t message=\"Address should be within\" + minLength + \" characters long. Try again.\"\r\n\t flag=\"false\"\r\n\t if(joinfreeValidate == 0)\r\n\t joinfreeValidate = 7\r\n\t setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n\t return false;\r\n\t }else if(trimFieldVal(emprAddress)==\"\"){\r\n\t message=\"Please enter Address\"\r\n\t flag=\"false\"\r\n\t if(joinfreeValidate == 0)\r\n\t joinfreeValidate = 7\r\n\t setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n\t return false;\r\n\t }else {\r\n\t message=\"\"\r\n\t setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n\t return true;\r\n\t }\r\n\t\r\n\t}", "title": "" }, { "docid": "468fa09ff07e1e694db4ac5ab6c73c80", "score": "0.5866421", "text": "function validateAddressline2(addressline2)\n{\n\n if((document.getElementById(addressline2).value)!=\"\")\n {\n document.getElementById(addressline2).style.background='#ccffcc';\n document.getElementById(addressline2+'Error').style.display='none';\n return true;\n }\n else\n {\n document.getElementById(addressline2).style.background='#e35152';\n document.getElementById(addressline2+'Error').style.display='block';\n return false;\n }\n\n}", "title": "" }, { "docid": "b47d6c4e8f1cb772f8f719add86e5b0d", "score": "0.58483773", "text": "function address(x){return (x.address ===inputvalue[0]);}", "title": "" }, { "docid": "9d034bfd7574b758335fbb8b2bb94653", "score": "0.58449066", "text": "function addressBilling() {\n var address02 = document.getElementById(\"address02\");\n if (address02.value === null || address02.value === \"\") {\n window.alert(\"Address is required\");\n } else {\n document.getElementById(\"AddressOutput02\").innerHTML = address02.value;\n }\n }", "title": "" }, { "docid": "fbbe3f477c791a47b9b7dc83ae569ca2", "score": "0.5838113", "text": "set address(address) {\n const ADDRESS_NAME_REGEX = RegExp(\"^[a-zA-Z0-9]{4,}\");\n if (ADDRESS_NAME_REGEX.test(address)) this._address = address;\n else throw \"Address Name: \" + address + \" is Invalid\";\n }", "title": "" }, { "docid": "9d64b7a7d3dfc00f2f98f0fda5b5389b", "score": "0.58358645", "text": "validateZipcode() {\n const location = this.state.location.value;\n\n if (location.length === 0) {\n return 'Enter a zip code';\n } else if (!postcodeValidator(location, 'US')) {\n return 'Enter a valid zip code';\n }\n }", "title": "" }, { "docid": "329e12aa0aee5f286c415d099b5e3ca1", "score": "0.58341616", "text": "function validateZipCode(field) {\n if (field === undefined || field === null) {\n return false;\n }\n var zip_regexp = /^[0-9]+(?:[-\\s]*)?(?:[0-9]*)?$/;\n if (zip_regexp.test(field) !== true) {\n return false;\n }\n return validateMinLength(field, 5) && validateMaxLength(field, 10);\n}", "title": "" }, { "docid": "877cc619165c25acdc69f93252825b26", "score": "0.5826584", "text": "function validatePhone(field){\n if(/^([0-9]{4})(-)([0-9]{4})+$/.test(field.value)){\n setValid(field);\n return true;\n }else{\n setInvalid(field, `Telefono no cumple el formato ####--####`);\n return false;\n }\n}", "title": "" }, { "docid": "8ae2452c9af538c944b90f55bef31e12", "score": "0.5822333", "text": "function validatePostalCode() {\n\t\t// I storing the given postal code in a variable for easy access.\n\t\tvar value = document.getElementById(\"postal_code\").value;\n\t\t//this regex accepts only data of the the following kind: XXXX-XXX where X must be a digit.\n\t\tvar zip = new RegExp(\"^[0-9]{4}-[0-9]{3}$\", \"m\");\n\t\t//Since this is an optional field, if it's not filled by the user\n\t\t// it should be marked as valid in order to allow the submit button to enable.\n\t\tif (value!=''){\n\t\t\t//if it wasn't correctly filled in, turns red indicating error.\n\t\t\tif (false == zip.test(value)) {\n\t\t\t\tfPostalCode = false;\n\t\t\t\tdocument.getElementById(\"postal_code\").style.borderColor = \"red\";\n\t\t\t//if it was correctly filled in, then shows green, indicating success.\n\t\t\t}else{ \n\t\t\t\tfPostalCode = true;\n\t\t\t\tdocument.getElementById(\"postal_code\").style.borderColor = \"green\";\n\t\t\t}\n\t\t//if it wasn't filled and since this is an optional field,\n\t\t// then allow it to continue by marking it as correct.\n\t\t}else{\n\t\t\tfPostalCode = true;\n\t\t\tdocument.getElementById(\"postal_code\").style.borderColor = \"#cccccc\";\n\t\t}\n\tbtnSubmit();\n\t}", "title": "" }, { "docid": "0c07be6f09569955545facb5fdabe79e", "score": "0.5803676", "text": "function phonenumber(ele){\n if (ele.name === \"phone2\") {\n var phone1 = document.getElementById('phone').value\n console.log(\"phone1\", phone1, ele.value);\n if ( phone.trim() !== ele.value.trim()) {\n document.getElementById('errors').innerHTML = \"Please enter a 3 digit area code\";\n ele.value = \"\";\n return\n } else {\n document.getElementById('errors').innerHTML = \"\";\n }\n }\n var phoneno = /^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;\nif(!ele.value.match(phoneno)) {\n document.getElementById('errors').innerHTML = \"Please enter a 10 digit number\";\n ele.value = \"\"\n } else {\n document.getElementById('errors').innerHTML = \"\"\n }\n}", "title": "" }, { "docid": "fb9534d0fe323ebfb979755feb5a5189", "score": "0.57926226", "text": "function regCheck(reg){\n\n var error = '';\n var flag = true;\n\n if (!reg.email){\n error = 'Please enter your email to continue';\n flag = false;\n }\n\n if (!reg.street1){\n error = 'Please enter a Street Address to continue';\n flag = false;\n }\n else if (reg.street1.length < 3){\n error = 'Street Address must be at least 3 characters long';\n flag = false;\n }\n else if (!reg.city){\n error = 'Please enter a City Name to continue';\n flag = false;\n }\n else if (!reg.zip == ' '){\n error = 'Please enter a valid City Name';\n flag = false;\n }\n if (flag == true){\n return true;\n } else if (flag == false){\n return error;\n }\n} // End Reg Check", "title": "" }, { "docid": "50f8a697d4b3cbc2d0adb9d49bd2cb43", "score": "0.57784337", "text": "function _checkAddressIsNotEmpty(oFinalData, iResultLength, sCity, sPostalCode, sCurrentScvId) {\n\tfor (let i = 0; i < oFinalData.length; i++) {\n\t\tif (oFinalData[i].SCV_ID === sCurrentScvId) {\n\t\t\tif (oFinalData[i].CITY === \"\" || oFinalData[i].POSTAL_CODE === \"\") {\n\t\t\t\toFinalData[i].CITY = sCity;\n\t\t\t\toFinalData[i].POSTAL_CODE = sPostalCode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "31e6a0ddff1a6334635c7c40c2e6b8a8", "score": "0.57565075", "text": "function parseAddress(address) {\n var tokens = tokenize(address.trim())\n function getLastToken() { if (tokens.length == 0) throw \"Invalid Address\"; return tokens[tokens.length - 1]; }\n function removeLastToken() { if (tokens.length == 0) throw \"Invalid Address\"; tokens.splice(tokens.length - 1, 1); }\n var zip = '';\n if (getLastToken().type == 'number') {\n zip = getLastToken().value;\n removeLastToken();\n if (getLastToken().type == 'separator' && getLastToken().value == '-') {\n removeLastToken();\n if (getLastToken().type != 'number') {\n throw \"Invalid Zip Code\"\n }\n zip = getLastToken().value + '-' + zip;\n removeLastToken();\n }\n }\n else {\n throw \"Zip code not found\";\n }\n while (getLastToken().type == 'space' || getLastToken().type == 'separator') {\n removeLastToken();\n }\n var state = '';\n state = getLastToken().value\n var stateIndex = knownStates.indexOf(state.toUpperCase())\n if (stateIndex == -1) {\n if (state in abrevations) {\n state = abrevations[state];\n }\n else { // Maybe is a two word state\n removeLastToken(); // remove curent space\n removeLastToken(); // remove separator\n state = getLastToken().value.toLowerCase() + state.toLowerCase();\n\n if (state in abrevations) {\n state = abrevations[state];\n }\n else { // Maybe is a three word state\n removeLastToken(); // remove curent space\n removeLastToken(); // remove separator\n state = getLastToken().value.toLowerCase() + state.toLowerCase();\n if (state in abrevations) {\n state = abrevations[state];\n removeLastToken(); // remove separator\n }\n else {\n throw \"State not recognized\";\n }\n }\n }\n }\n while (getLastToken().type == 'space' || getLastToken().type == 'separator') {\n removeLastToken();\n }\n var city = '';\n while (getLastToken().type != 'separator') {\n city = getLastToken().value + city;\n removeLastToken();\n }\n removeLastToken();\n var streetAddress = ''\n for (var i = 0; i < tokens.length; i++) {\n streetAddress += tokens[i].value;\n }\n return { zip: zip, state: state, city:city, streetAddress: streetAddress };\n }", "title": "" }, { "docid": "7f125f5f3cd7169ef84fd8d46a0d0dfc", "score": "0.5744993", "text": "static verifyAddress(addr) {\n return address.verifyAddress(addr);\n }", "title": "" }, { "docid": "1374e6c1c7b8de28b58e7d50e2e0284d", "score": "0.5742205", "text": "function validatePhone(txtPhone) {\n var a = txtPhone;\n var filter = /^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/;\n if (filter.test(a)) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "92905dc48217c30a6dead6a4a8975e49", "score": "0.5733573", "text": "function validateAddress(form1)\n{\n\tvar webAlert =\"The correct format for WebServer is:- user@host/dir\";\n\tvar emailAlert= \"The correct format for Email is:- user@host\";\n\t\n\t//web Address \n\tvar webAddress = form1.webserver.value ;\n\t\t\n\t//email Address\n\tvar emailAddress = form1.email.value;\n\t\n\t//Check for web server address format is user@host/dir\n\tif(webAddress.length>0)\n\t{\n\t\tvar webArray = webAddress.split(\"@\")\n\t\tif(webArray.length>1)\n\t\t{\n\t\t\tvar webArray1 =\twebArray[1].split(\"/\");\n\t\t\tif((webArray1.length<=1)||(webArray[0].length<=0)||(webArray1[0].length<=0)\n\t\t\t\t||(webArray1[1].length<=0))\n\t\t\t{\n\t\t\t\talert(webAlert);\n\t\t\t\tform1.webserver.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\t\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\talert(webAlert);\n\t\t\tform1.webserver.focus();\n\t\t\treturn false;\n\t\t}\n\t}\n\t//web server validation ends here\n\t\n\t//Check for email address format is user@host\n\n\tif(emailAddress.length>0)\n\t{\n\t\tvar emailArray = emailAddress.split(\"@\");\n\t\tif((emailArray.length <=1)||(emailArray[0].length<=0)||(emailArray[1].length<=0))\n\t\t{\n\t\t\n\t\t\talert(emailAlert);\n\t\t\tform1.email.focus();\n\t\t\treturn false;\n\t\t}\n\t}\n\t//email address validation ends here\n\t\n\treturn true;\t\t\n\t \n}", "title": "" }, { "docid": "867f832f72cde930f46ed1f818dae400", "score": "0.57205206", "text": "async \"Filecoin.WalletValidateAddress\"(inputAddress) {\n await __classPrivateFieldGet(this, _blockchain).waitForReady();\n const address = address_1.Address.validate(inputAddress);\n return address.serialize();\n }", "title": "" }, { "docid": "917b4139ef0de10c7d4c556f5c6908eb", "score": "0.5711622", "text": "function setAddress()\n{\n\tvm.customerAddress = _streetAddressField.value;\n}", "title": "" }, { "docid": "66a768e7842a78489226524ae2d0e5dc", "score": "0.5697842", "text": "function addressValidatorContinue(type) {\n useAddressValidator = '';\n doAddAddress(document.checkoutform);\n closeAddressValidatorModal();\n}", "title": "" }, { "docid": "fddbfdbf5caad81dad5b4b61feed5a53", "score": "0.56932527", "text": "zipCodeValidation() {\n if (this.form.country === country.options[0].label) {\n return {\n required: true,\n max: 20,\n numeric: true,\n };\n } else {\n return {\n required: true,\n max: 20,\n alpha_num: true,\n };\n }\n }", "title": "" }, { "docid": "dd4081116ff21dea9931280f431eb913", "score": "0.566015", "text": "function isEntryValid() {\n return (\n countryElement.value !== \"\"\n );\n}", "title": "" }, { "docid": "a9fd8f1f6e163131f588c894e5526817", "score": "0.56570184", "text": "function validateZip(zipcode){\n var US_postalCodeRegex = /^([0-9]{5})(?:[-\\s]*([0-9]{4}))?$/;\n return US_postalCodeRegex.test(zipcode);\n}", "title": "" }, { "docid": "3aeee251e219a05aa09391f9143375c3", "score": "0.5656177", "text": "function phoneValidate(phone) {\n if (!phone) {\n return false;\n } else {\n var res = phone.match(/\\d{3}\\-\\d{7}/g);\n if (res && phone.length === 11) {\n return true;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "881bcb4524f914bdb5be76ee920a1b9e", "score": "0.5654238", "text": "isValidXAddress(address) {\n return addressCodec.isValidXAddress(address);\n }", "title": "" }, { "docid": "8ea92c6472d7c20755a3ee404f195dec", "score": "0.5647902", "text": "function isEthereumAddress(value) {\n return typeof value === \"string\" && validator.isEthereumAddress(value);\n}", "title": "" }, { "docid": "b19a64017a61f737036bf9b5086e8222", "score": "0.56339306", "text": "function checkPhoneNumberIfValid(phoneNumberEntry) {\n return /(\\d{3})\\-(\\d{3})\\-(\\d{4})/.test(phoneNumberEntry);\n}", "title": "" }, { "docid": "d1f52ff2bc439f1b38166c1a21ccbcad", "score": "0.56236917", "text": "function isValidPostcode(postcode) {\n const regex = /^[a-z]{1,2}\\d[a-z\\d]?\\s*\\d[a-z]{2}$/i;\n return regex.test(postcode.replace(/\\s/g, ''));\n }", "title": "" }, { "docid": "a004bbfa4f17f12791397cb10f80a2e6", "score": "0.56216496", "text": "function validatePhoneNumber(phone){\n var regex = '^(\\\\+\\\\d{1,2})?\\\\d{10}$';\n return validateField(phone, regex);\n}", "title": "" }, { "docid": "a8d184f3b5c8ef3dd3ea32a006cf12b0", "score": "0.5614888", "text": "function validateAddress(fieldsetId) {\n var inputElements = document.querySelectorAll(\"#\" + fieldsetId + \" input\");\n var errorDiv = document.querySelectorAll(\"#\" + fieldsetId + \" .errorMessage\")[0];\n var fieldsetValidity = true;\n var elementCount = inputElements.length;\n var currentElement;\n try {\n //Loop though the input field looking for blanks\n for (var i = 0; i < elementCount; i++) {\n currentElement = inputElements[i];\n if (currentElement.value === \"\") {\n //Blanks\n currentElement.style.background = \"rgb(255,233,233)\";\n fieldsetValidity = false;\n } else {\n //Non-blanks\n currentElement.style.background = \"rgb(255,255,255)\";\n }\n }\n //Validate select list field\n currentElement = document.querySelectorAll(\"#\" + fieldsetId + \" select\")[0];\n if (currentElement.selectedIndex === -1) {\n currentElement.style.border = \"1px solid red\";\n fieldsetValidity = false;\n } else {\n currentElement.style.border = \"\";\n }\n if (!fieldsetValidity) {\n //Action for invald fieldset\n if (fieldsetId === \"billingAddress\") {\n throw \"Please complete all billing address information.\";\n } else {\n throw \"Please complete all delivery address information.\";\n }\n } else {\n errorDiv.style.display = \"none\";\n errorDiv.innerHTML = \"\";\n }\n } catch (msg) {\n errorDiv.style.display = \"block\";\n errorDiv.innerHTML = msg;\n formValidity = false;\n }\n}", "title": "" }, { "docid": "bc700455af1c0e6712e25196278b3ec3", "score": "0.56016505", "text": "function setAddress(request) {\r\n\t\tvar jsonData = request.responseText.evalJSON();\r\n\t\tvar error = jsonData.error;\r\n\t\tif (error == '') {\r\n\t\t\tvar street = jsonData.street;\r\n\t\t\tvar place = jsonData.place;\r\n\t\t\tif (street != undefined && place != undefined) {\r\n\t\t\t\t$('street').value = street;\r\n\t\t\t\t$('place').value = place;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$('street').value = \"\";\r\n\t\t\t$('place').value = \"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cdbf964fbc434481ce40d718acf84335", "score": "0.5597491", "text": "function Address(street, city, zipCode) {\n this.street = street;\n this.city = city;\n this.zipCode = zipCode;\n}", "title": "" }, { "docid": "5e40062f880054de862f781f638f935d", "score": "0.5589591", "text": "registerValidAddress(address, validationData) {\n if (!this,validAddresses[address]) {\n this.validAddresses[address] = validationData;\n }\n }", "title": "" }, { "docid": "a49cc470d297fe75db72fd1ef49bb212", "score": "0.5579498", "text": "function validatePhNumber(phone) {\n var re = /^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$/;\n return re.test(phone);\n}", "title": "" }, { "docid": "98ec5ab2d22a5e8bdb7442cd765351af", "score": "0.5578845", "text": "function validateContacttelephone(){\n\t\t//if it's NOT valid\n\t\t\t\n\t\tvar a = $(\"#contacttelephone\").val();\n\t\tvar filter = /^[0-9+ ]+$/ ;\n\t\t//if it's valid email\n\tif(filter.test(a))\n\t{\n\t\t\tcontacttelephone.removeClass(\"error\");\n\t\t\tcontacttelephoneInfo.text(\"\");\n\t\t\tcontacttelephoneInfo.removeClass(\"error\");\n\t\t\treturn true;\n\t\t}\n\t\t//if it's NOT valid\n\t\telse{\n\t\t\tcontacttelephone.addClass(\"error\");\n\t\t\tcontacttelephoneInfo.text(\"Please enter valid Contact Person Phone number\");\n\t\t\tcontacttelephoneInfo.addClass(\"error\");\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t}", "title": "" } ]
a4bbc11d5832b29164cdbb92811902f9
Maybe time for a factory?
[ { "docid": "251c1a39dab690ba5814920b743ffe61", "score": "0.0", "text": "function makePlayer(player) {\n return add('player', {\n\n })\n }", "title": "" } ]
[ { "docid": "34773fce9f430848b22e81baceefa435", "score": "0.6928581", "text": "function factory() {}", "title": "" }, { "docid": "34773fce9f430848b22e81baceefa435", "score": "0.6928581", "text": "function factory() {}", "title": "" }, { "docid": "12cbf3696b55a914f7c8f3911c261d17", "score": "0.68455094", "text": "function Factory() {}", "title": "" }, { "docid": "c65b6284bc6c3d1a056be21b31fd6e8f", "score": "0.6110447", "text": "function TruckFactory () {}", "title": "" }, { "docid": "c65b6284bc6c3d1a056be21b31fd6e8f", "score": "0.6110447", "text": "function TruckFactory () {}", "title": "" }, { "docid": "1c11da51f4f0d21060eeee00831d20b1", "score": "0.59964675", "text": "function GoblinFactory() {}", "title": "" }, { "docid": "0c9b7e6ffd9b12003f9a578e440cac7a", "score": "0.59536386", "text": "forCreate() { return withCreateTime(this); }", "title": "" }, { "docid": "4305fb1bcb3fbc1b8039e331c8a05221", "score": "0.59497446", "text": "function createFxNow() {\n\tsetTimeout( clearFxNow, 0 );\n\treturn ( fxNow = da.nowId() );\n}", "title": "" }, { "docid": "302ff599dad4fa206a38d5b49ed69428", "score": "0.5882419", "text": "function init_FactoryMethod() {\n //creation of a factory method\n let factory1 = new ConcreteCreator1();\n let factory2 = new ConcreteCreator2();\n //running method which creates as a result some products (concrete products)\n factory1.AnOperation();\n factory2.AnOperation();\n}", "title": "" }, { "docid": "f3e8fe99bc7a16208630e0f2181ab51a", "score": "0.58489496", "text": "function randomFactory(){\n return Math.floor(Math.random()*4);\n}", "title": "" }, { "docid": "0e164026854e9258926be9369ffee36e", "score": "0.5836842", "text": "function factory (name){\n\treturn {\n\t\tname:name\n\t};\n}", "title": "" }, { "docid": "01597f121e3e7ec78e0c397728e1c68a", "score": "0.57877773", "text": "findRandTime() {\n // Finds a random number between 1 and 60\n this.waitTime = parseInt(Math.random() * 60) + 1;\n }", "title": "" }, { "docid": "6bc8f2f8d329c2783c36350270322ca5", "score": "0.5758521", "text": "create() {\n return this.cache('creating', () => $q.when(this) );\n }", "title": "" }, { "docid": "a68e576c7dc80e1d49432fb854edf0d7", "score": "0.5756872", "text": "static Create() {}", "title": "" }, { "docid": "9f2ecd42732f0742cb880d3ebb6fa5d8", "score": "0.5734044", "text": "static time () { return performance.now() }", "title": "" }, { "docid": "e20f4537e8807e89c2d64c67d8d8764a", "score": "0.5697553", "text": "function personFactory(name){\n let count = 0\n return {\n count: () => count++,\n name: name,\n type: 'person'\n }\n}", "title": "" }, { "docid": "b64e696918f8ef8511972169dcee7094", "score": "0.5687982", "text": "function create(){\n return 0;\n}", "title": "" }, { "docid": "1b1132a1eca76122004cd424cc1904d7", "score": "0.56788653", "text": "function factory(name) {\n return {\n name: name\n };\n}", "title": "" }, { "docid": "e00c45e61ddbdbe920b8c06196480fdc", "score": "0.5666466", "text": "function Factory() {\n let employee;\n this.createEmployee = function (type) {\n if (type === 'fullTime') {\n employee = new fullTime()\n } else if (type === 'partTime') {\n employee = new partTime()\n }\n employee.type = type\n return employee\n }\n}", "title": "" }, { "docid": "9384e0bbf8109a2acd0728e1ede8aa1e", "score": "0.56210756", "text": "function createFxNow() {\n \twindow.setTimeout( function() {\n \t\tfxNow = undefined;\n \t} );\n \treturn ( fxNow = Date.now() );\n }", "title": "" }, { "docid": "1826fa0aa6a00eedd701c466bca541ce", "score": "0.5611133", "text": "getRandomTiming() {\n return Math.floor(Math.random() * (1500 - 250 + 1) + 250)\n }", "title": "" }, { "docid": "2e074a39bbb60826beccb612b8346792", "score": "0.56095666", "text": "function createFxNow() {\n window.setTimeout( function() {\n fxNow = undefined;\n } );\n return ( fxNow = Date.now() );\n }", "title": "" }, { "docid": "5d12770de0472a97872b7bacaaf15b9a", "score": "0.56028086", "text": "timeLimit() {}", "title": "" }, { "docid": "5843af0fa1b365a4d0db7a92feef519b", "score": "0.55741554", "text": "get lifetime() { return Date.now() - stats.templateInit }", "title": "" }, { "docid": "555fe5ca4a2de21345f8285ee0580df2", "score": "0.55718327", "text": "function GnubbyFactory() {}", "title": "" }, { "docid": "555fe5ca4a2de21345f8285ee0580df2", "score": "0.55718327", "text": "function GnubbyFactory() {}", "title": "" }, { "docid": "d7ed726dfc11c6f28479d7c4c1fc8ff4", "score": "0.5568881", "text": "function newd (){ return time = new Date()}", "title": "" }, { "docid": "c085a1f332c1c9666e691e07dfadddc7", "score": "0.55660176", "text": "function createFxNow() {\n\t\twindow.setTimeout( function() {\n\t\t\tfxNow = undefined;\n\t\t} );\n\t\treturn ( fxNow = Date.now() );\n\t}", "title": "" }, { "docid": "c085a1f332c1c9666e691e07dfadddc7", "score": "0.55660176", "text": "function createFxNow() {\n\t\twindow.setTimeout( function() {\n\t\t\tfxNow = undefined;\n\t\t} );\n\t\treturn ( fxNow = Date.now() );\n\t}", "title": "" }, { "docid": "c085a1f332c1c9666e691e07dfadddc7", "score": "0.55660176", "text": "function createFxNow() {\n\t\twindow.setTimeout( function() {\n\t\t\tfxNow = undefined;\n\t\t} );\n\t\treturn ( fxNow = Date.now() );\n\t}", "title": "" }, { "docid": "c085a1f332c1c9666e691e07dfadddc7", "score": "0.55660176", "text": "function createFxNow() {\n\t\twindow.setTimeout( function() {\n\t\t\tfxNow = undefined;\n\t\t} );\n\t\treturn ( fxNow = Date.now() );\n\t}", "title": "" }, { "docid": "20d43fab06385059cd217380523c131b", "score": "0.5540742", "text": "function createFxNow() {\n window.setTimeout(function () {\n fxNow = undefined;\n });\n return (fxNow = Date.now());\n }", "title": "" }, { "docid": "aee5b0945b2867e2968161ed8df0b469", "score": "0.5532728", "text": "function createFxNow() {\n window.setTimeout( function() {\n fxNow = undefined;\n } );\n return ( fxNow = Date.now() );\n }", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" }, { "docid": "9c87e80cf448fc1408685cda75fa2ac1", "score": "0.55231744", "text": "function createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}", "title": "" } ]
7554e0103008b63ace9b6b434c3f197a
validation utils end objects starts
[ { "docid": "e8749f7cf37089903d3818edcfacfc38", "score": "0.0", "text": "function getObjectPropertyValue (obj, prop, deflt) {\n // return value of this property for this object, or the default\n // result is {error_msg: <err if obj or prop not defined>, value: <val or default>}\n\n var result = { error_msg: null, value: null};\n\n result.error_msg = validateObject(obj, null, 'Object passed is not defined');\n result.error_msg = result.error_msg ||\n validateObjectProperty(obj, prop, null, 'Property [' + prop + '] does not exist');\n\n result[\"value\"] = result.error_msg ? null : obj[prop] || deflt;\n\n return result;\n}", "title": "" } ]
[ { "docid": "b71c546cf0bc105c31535396da04aa88", "score": "0.66009533", "text": "function doValidation() {\r\n\r\n}", "title": "" }, { "docid": "2aa15598b329b34f4ac5585da4d4f14b", "score": "0.6557313", "text": "_validate() {\n\t}", "title": "" }, { "docid": "2aa15598b329b34f4ac5585da4d4f14b", "score": "0.6557313", "text": "_validate() {\n\t}", "title": "" }, { "docid": "2aa15598b329b34f4ac5585da4d4f14b", "score": "0.6557313", "text": "_validate() {\n\t}", "title": "" }, { "docid": "838b851169a005c8e181a42520e518cd", "score": "0.6409693", "text": "validate() {\n if(!(this._id instanceof mongodb.ObjectID)) throw new Error('_id is not valid');\n if(!(this.date instanceof Date)) throw new Error('date is not valid');\n if(!(this.employeeID instanceof mongodb.ObjectID)) throw new Error('employeeID is not valid');\n if(typeof(this.jobNumber) !== 'number') throw new Error('jobNumber is not valid');\n if(!(this.jobID instanceof mongodb.ObjectID) && this.jobID !== null) throw new Error('jobID is not valid');\n if(typeof(this.estCrewSize) !== 'number') throw new Error('estCrewSize is not valid');\n if(typeof(this.estCrewHours) !== 'number') throw new Error('estCrewHours is not valid');\n if(typeof(this.tmCrewSize) !== 'number') throw new Error('tmCrewSize is not valid');\n if(typeof(this.tmCrewHours) !== 'number') throw new Error('tmCrewHours is not valid');\n if(typeof(this.lunchTaken) !== 'boolean') throw new Error('lunchTaken is not valid');\n if(typeof(this.jobFinished) !== 'boolean') throw new Error('jobFinished is not valid');\n if(typeof(this.offHauled) !== 'boolean') throw new Error('offHauled is not valid');\n if(typeof(this.yardsHauled) !== 'number') throw new Error('yardsHauled is not valid');\n if(typeof(this.notes) !== 'string') throw new Error('notes is not valid');\n }", "title": "" }, { "docid": "1e1a899d20b4c4b912234e398ebfdab0", "score": "0.634085", "text": "isValid() {\n this.firstName = this.validateFirstName(this.firstName)\n this.lastName = this.validateLastName(this.lastName)\n this.hireDate = this.validateHireDate(this.hireDate)\n this.role = this.validateRole(this.role)\n }", "title": "" }, { "docid": "ce68c30ae1d4392cf18d84a7d389ef6d", "score": "0.629303", "text": "function Validation() {}", "title": "" }, { "docid": "00d8cd4be21ab6adaf968455bcf58cc8", "score": "0.6267663", "text": "async validate() {}", "title": "" }, { "docid": "4c7fecba0507661baadc18251d47c510", "score": "0.6218563", "text": "function validate(inst, validation)\r\n{\r\n}", "title": "" }, { "docid": "8376d2f60bf590d0d9407605e78dcacd", "score": "0.6188921", "text": "_validate() {\n\t\t// TODO: creating roads is nice, but they should be removed if not used\n\t\t// TODO: if can build extractor but was not build -> build\n\t\t// TODO: if has extractor but no courier -> build?\n\n\t\t// no base, no problems\n\t\tif (!this._room.memory.base) {\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\tthis._validateRoads();\n\t\tthis._validateCreeps();\n\t\tthis._validateBuildings();\n\t}", "title": "" }, { "docid": "dcfdbfd6272b17fac2294a1e09e0de08", "score": "0.6090228", "text": "validate() {\n // Check the object\n if (!this.obj) {\n throw new Error('undefined object');\n }\n // Check this tween will be updated\n if (!this.parent) {\n throw new Error('no ticker');\n }\n // Easing\n if (!this.ease) {\n this.ease = easing_1.easeNames[\"linear\" /* Linear */];\n }\n this.check();\n }", "title": "" }, { "docid": "03af39f303cdc6c81da7310f14b0c8e6", "score": "0.6032896", "text": "validate() {\r\n if (typeof(this.events) == \"undefined\" || typeof(this.events.length) == \"undefined\" || this.events.length == 0) {\r\n this.logError(\"Timeline configuration has no events.\")\r\n }\r\n\r\n // make sure all eras have start and end dates\r\n for (var i = 0; i < this.eras.length; i++) {\r\n if (typeof(this.eras[i].start_date) == 'undefined' || typeof(this.eras[i].end_date) == 'undefined') {\r\n var era_identifier;\r\n if (this.eras[i].headline) {\r\n era_identifier = this.eras[i].headline\r\n } else {\r\n era_identifier = \"era \" + (i + 1);\r\n }\r\n this.logError(\"All eras must have start and end dates. [\" + era_identifier + \"]\") // add internationalization (I18N) and context\r\n }\r\n };\r\n }", "title": "" }, { "docid": "868fc7cb31e652f4eb53d0630e86c9ec", "score": "0.5996159", "text": "_validate() {\n const oThis = this,\n entityKindsMap = shardConstant.invertedEntityKinds;\n\n if (\n entityKindsMap[oThis.entityKind] &&\n CommonValidator.validateBoolean(\n oThis.isAvailableForAllocation && CommonValidator.validateNonZeroIntegerArray(oThis.shardNumbers)\n )\n ) {\n logger.info('Validations done.');\n } else {\n throw 'Validations failed';\n }\n }", "title": "" }, { "docid": "d83b4a98107a0336212c87342c24f1d8", "score": "0.5888392", "text": "function object_object(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if(isEmptyValue(value)&&!rule.required){return callback();}es_rule.required(rule,value,source,errors,options);if(value!==undefined){es_rule.type(rule,value,source,errors,options);}}callback(errors);}", "title": "" }, { "docid": "5b244184fddbebbd0034225f48dde705", "score": "0.58771974", "text": "validationPassed(result) {\n /* @Todo, you can override the method then customize it as you want */\n }", "title": "" }, { "docid": "3ed7ee7299aa199440911b962adb2523", "score": "0.5860675", "text": "function next(){\r\n validate();\r\n}", "title": "" }, { "docid": "7ce7ffaa7df941ab8c39e7054c489644", "score": "0.58507305", "text": "function validation() {\n //Course name checking\n if (!nameRegex.test(className.value)) {\n className.style.backgroundColor = \"red\";\n className.focus();\n return false;\n } else {\n className.style.backgroundColor = \"white\";\n }\n //Start date checking\n if (!dateRegex.test(startDate.value)) {\n startDate.style.backgroundColor = \"red\";\n startDate.focus();\n return false;\n } else {\n startDate.style.backgroundColor = \"white\";\n }\n //End date checking\n if (!dateRegex.test(endDate.value)) {\n endDate.style.backgroundColor = \"red\";\n endDate.focus();\n return false;\n } else {\n endDate.style.backgroundColor = \"white\";\n }\n }", "title": "" }, { "docid": "4003793d2d89e6b712a5906b5497e6ac", "score": "0.5836952", "text": "validate(request_model) {}", "title": "" }, { "docid": "c1fc82a608d53ee55fa98b5075144aaa", "score": "0.58299714", "text": "validations() {\n return this.expandVuelidateObjectRecursively(this.$v.payload);\n }", "title": "" }, { "docid": "da29d45a610c0e7322b7a8a3cad7a558", "score": "0.58277875", "text": "constructor() {\n super();\n this._errors = new Errors();\n this._validating = false;\n }", "title": "" }, { "docid": "49981bcab6c6dc259db7041325338360", "score": "0.5817281", "text": "valid() {\n if(this.objectDetails.options.enum) {\n this.joiObj = this.joiObj.valid(this.objectDetails.options.enum);\n }\n }", "title": "" }, { "docid": "69007e3cdd974879f8882e16492fbbe9", "score": "0.57970864", "text": "validate() {\n\t return true;\n\t }", "title": "" }, { "docid": "0cc6b338f38ba903bb5b21a977e18eb6", "score": "0.57709324", "text": "validation () {\n throw new Error('Validation: Method Not Implemented')\n }", "title": "" }, { "docid": "0ed83904e5d31b8f75f8ceea0bfc4b9a", "score": "0.5767431", "text": "function verifyForm(data) {\n if(!$scope.startdate.getdate()) {\n throw {message: \"開始日期沒有填寫\"};\n }\n if(!$scope.enddate.getdate()) {\n throw {message: \"結束日期沒有填寫\"};\n }\n if( $scope.startdate.getdate() == $scope.enddate.getdate() ){\n throw {message: \"開始時間與結束時間相等\"};\n }\n }", "title": "" }, { "docid": "5c2f6fd47b6204e9d9f93e1b70b36bd2", "score": "0.57669276", "text": "validate() {\n for (var key in this.invalidatedProps) {\n this[prop] = this.invalidatedProps[prop];\n }\n\n for (var key in this.nextFrameCalls) {\n this.nextFrameCalls[key]();\n }\n\n this.invalidatedProps = {};\n this.nextFrameCalls = {};\n }", "title": "" }, { "docid": "bb8849bf1612e72bc353b9bbf900b4b5", "score": "0.5742122", "text": "function validate() {\n let redFields = [];\n if (!gym_id) redFields.push('gym_id');\n // if (!instructor) redFields.push(\"instructor\")\n if (!img) redFields.push('img');\n if (!name) redFields.push('name');\n if (!description) redFields.push('description');\n // if (!genres) redFields.push(\"genres\")\n if (!type) redFields.push('type');\n if (!price) redFields.push('price');\n\n console.log('type: ', type);\n\n if (redFields.length) {\n setRedFields(redFields);\n throw new Error('Required fields must be filled.');\n }\n\n // if (instructor.length < 3 || instructor.length > 50) {\n // setRedFields([\"instructor\"])\n // throw new Error(\"Instructor's name must be between 3 and 50 characters long.\")\n // }\n if (name.length < 3 || name.length > 120) {\n setRedFields(['name']);\n throw new Error('Class name must be between 3 and 120 characters long.');\n }\n if (description.length < 3 || description.length > 500) {\n setRedFields(['description']);\n throw new Error(\n 'Description of the class must be between 3 and 500 characters long.',\n );\n }\n // if (genres.length < 2 || genres.length > 5) {\n // setRedFields([\"genres\"])\n // throw new Error(\"Must have selected between 2 and 5 genres.\")\n // }\n\n let priceError = false;\n let signs = price.match(/[$]/g);\n let commas = price.match(/[.]/g);\n let letters = price.match(/[A-Za-z]/g);\n if (signs && signs.length !== 1) priceError = true;\n if (price[0] !== '$') priceError = true;\n if (commas && commas.length > 1) priceError = true;\n if (letters) priceError = true;\n if (priceError) {\n setRedFields(['price']);\n throw new Error('Price must follow format: $xx.xx');\n }\n }", "title": "" }, { "docid": "4038fb24ed823ef7f0ee758759146651", "score": "0.57415694", "text": "function initialvalidation() {\n ensPhoneValidation();\n ensEmailValidation();\n cllpPhoneValidation();\n eml4EmailValidation;\n iceNameValidation();\n icePhone1Validation();\n icePhone2Validation();\n icePhone3Validation();\n ice2NameValidation();\n ice2Phone1Validation();\n ice2Phone2Validation();\n ice2Phone3Validation();\n mis1NameValidation();\n mis1Phone1Validation();\n mis1Phone2Validation();\n mis1Phone3Validation();\n mis2NameValidation();\n mis2Phone1Validation();\n mis3NameValidation();\n mis3Phone1Validation();\n}", "title": "" }, { "docid": "e3d92bd71321c85e8e593216cfa73f2b", "score": "0.5730278", "text": "validateMarkers (data) {\n\t\tconst outputObject = this.outputObject || data[this.objectName];\n\t\tthis.inputMarkers = this.inputMarkers || this.inputObject.markers;\n\t\tconst inputMarker = this.inputMarkers[0];\n\t\tthis.validateEachMarker(data);\n\t\tthis.validateMarkerLocations(data);\n\n\t\t// if we created a file stream, validate it\n\t\tif (this.test.streamOnTheFly) {\n\t\t\tthis.validateStream(data);\n\t\t}\n\t\telse if (!this.test.streamUpdatesOk) {\n\t\t\tAssert(typeof data.streams === 'undefined', 'streams array should not be defined');\n\t\t}\n\n\t\t// if we created a repo, validate it\n\t\tif (this.test.repoOnTheFly) {\n\t\t\tthis.validateRepo(data);\n\t\t}\n\t\telse if (inputMarker && (inputMarker.repoId || inputMarker.fileStreamId || (inputMarker.commitHash && inputMarker.remotes))) {\n\t\t\tthis.validateRepoUpdatedWithCommitHash(data);\n\t\t}\n\t\telse {\n\t\t\tAssert(data.repos === undefined, 'repos should be undefined');\n\t\t}\n\t}", "title": "" }, { "docid": "26a3fbc889ecaeaa276ecefcdc0ab55f", "score": "0.57266384", "text": "validate() {\n if (!JDLRelationship.isValid(this)) {\n throw new buildException(exceptions.InvalidObject, 'The exception is not in a valid state.');\n }\n checkRelationshipType(this);\n }", "title": "" }, { "docid": "fd50202af04cda2d193d0c7511700d88", "score": "0.57176894", "text": "function validateObject(model, logger, config) {\n\tlet isOk = 0;\n\n\tisOk += _validateExporter(model, logger, config);\n\tisOk += _validateWriter(model, logger, config);\n\tisOk += _validateSources(model, logger, config);\n\tisOk += _validateDataGenerator(model, logger, config);\n\n\tif (isOk > 0) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "e471a7786285b6a4e778177128d9777d", "score": "0.569634", "text": "afterValidChange() { }", "title": "" }, { "docid": "e471a7786285b6a4e778177128d9777d", "score": "0.569634", "text": "afterValidChange() { }", "title": "" }, { "docid": "a7b27c9b94492f77409b4c774d4f420e", "score": "0.5689345", "text": "_markAsValid() {\n\t this.$points.find( '.point' ).removeClass( 'has-error' );\n\t }", "title": "" }, { "docid": "3ddc92e5baf7d9cd7e4bb7b4c97cf437", "score": "0.5684779", "text": "function ejercicio06(user){\n var objetito = {\n valid : true,\n errors : []\n };\n\n\n comprobarNombre(user,objetito);\n\n comprobarEmail(user,objetito);\n\n comprobarEdad(user,objetito);\n \n if (objetito.errors.length==0){\n objetito.valid=true;\n }else{\n objetito.valid=false;\n }\n return objetito;\n}", "title": "" }, { "docid": "4db7fb924690da61ed81f2a7685e5cb1", "score": "0.56709486", "text": "function Create_Validation_Obj(type){\n \t/// @def - Returns an error object\n \t\n \t\n \t/// The default type is set to fail if no type declared\n \tif (typeof type === 'undefined') type = 'fail';\n \t\n \t\n \t/// Create error object\n \tvar error = {};\n \n \n /// Set parameters based on type \t\n \tswitch(type){ \t\n \tcase 'fail': \t\n \terror = { pass:false, message:'fail' }; \t\n \t break;\n \tcase 'pass':\n \terror = { pass:true, message:'pass' }; \n \t break; \n default:break;\n \t}\n \t\n \n return error;\n \t}", "title": "" }, { "docid": "27cc66f3f48c419d23c51d2d4a4d44ec", "score": "0.5669028", "text": "get valid(){ return this.m_validated && this.m_valError===null; }", "title": "" }, { "docid": "38087a310d24e829836121c7fd9f4b50", "score": "0.5656333", "text": "function _validate()\n{\n\tviewModel.isFormSubmissible = rQueryClient.validateModel(viewModel, _validationSet);\n}", "title": "" }, { "docid": "38087a310d24e829836121c7fd9f4b50", "score": "0.5656333", "text": "function _validate()\n{\n\tviewModel.isFormSubmissible = rQueryClient.validateModel(viewModel, _validationSet);\n}", "title": "" }, { "docid": "48c24efbb2daaaa048cf5776a9ecfbd1", "score": "0.565541", "text": "_markAsValid(){this.$points.find('.point').removeClass('has-error');}", "title": "" }, { "docid": "8b444b6b2ec5fcfd111b190bb595c85e", "score": "0.564505", "text": "function next(){\n ValidityState(); \n }", "title": "" }, { "docid": "c07d1478cf837867b8a32aa3d8925188", "score": "0.5635563", "text": "validate() {\n // Get generic API validation errors\n this._super();\n let errors = get(this, 'errors')||[];\n if ( !get(this, 'model.name') ) {\n errors.push('Name is required');\n }\n\n // Add more specific errors\n if (!get(this, 'config.projectId')) {\n errors.push('Project ID is required');\n }\n\n if (!get(this, 'config.apiKey')) {\n errors.push('API Key is requried');\n }\n\n if (!get(this, 'config.plan') || get(this, 'config.plan') == \"\") {\n errors.push('Plan is required');\n }\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if ( get(errors, 'length') ) {\n set(this, 'errors', errors.uniq());\n return false;\n } else {\n set(this, 'errors', null);\n return true;\n }\n }", "title": "" }, { "docid": "c91f9b558265aae1f34d8bbabc8a119e", "score": "0.5622618", "text": "validate() {\n // Get generic API validation errors\n this._super();\n var errors = get(this, 'errors') || [];\n\n if ( !get(this, 'cluster.name') ) {\n errors.push('Name is required');\n }\n\n // Add more specific errors\n\n // Check something and add an error entry if it fails:\n // if ( parseInt(get(this, 'config.memorySize'), defaultRadix) < defaultBase ) {\n // errors.push('Memory Size must be at least 1024 MB');\n // }\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if ( get(errors, 'length') ) {\n set(this, 'errors', errors);\n\n return false;\n } else {\n set(this, 'errors', null);\n\n return true;\n }\n }", "title": "" }, { "docid": "b178323bcf2039cc7897630d8321953a", "score": "0.56029725", "text": "function ValidationError() {\n this._errors = {};\n}", "title": "" }, { "docid": "f634a7e7119c608082c5274fc0dea067", "score": "0.55989367", "text": "init() {\n this._super();\n\n assert(`You must provide a validatee`, this.validatee);\n assert(`You must provide validations`, this.validations);\n\n this._validationKeys = [];\n\n let errors = Ember.Object.create({\n _validatee: this.validatee\n });\n this.set('errors', errors);\n\n this._defineValidationProperties(this.validatee, errors, this.validations);\n this._defineIsValid();\n }", "title": "" }, { "docid": "82b0646ca61e6af3800973a21ef3128f", "score": "0.55909556", "text": "validate() {\n // Get generic API validation errors\n this._super();\n var errors = get(this, 'errors') || [];\n\n if (!get(this, 'cluster.name')) {\n errors.push('Name is required');\n }\n\n const tenancyId = get(this, 'config.tenancyId');\n\n if (!tenancyId.startsWith('ocid1.tenancy')) {\n errors.push('A valid tenancy OCID is required');\n }\n\n const compartmentId = get(this, 'config.compartmentId');\n\n if (!compartmentId.startsWith('ocid1.compartment') && !compartmentId.startsWith('ocid1.tenancy')) {\n errors.push('A valid compartment OCID is required');\n }\n\n const userOcid = get(this, 'config.userOcid');\n\n if (!userOcid.startsWith('ocid1.user')) {\n errors.push('A valid user OCID is required');\n }\n\n const kmsKeyOcid = get(this, 'config.kmsKeyId');\n\n if ((kmsKeyOcid.length > 0) && !kmsKeyOcid.startsWith('ocid1.key')) {\n errors.push('Not a valid kms key OCID');\n }\n\n // TODO Add more specific errors\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if (get(errors, 'length')) {\n set(this, 'errors', errors);\n\n return false;\n } else {\n set(this, 'errors', null);\n\n return true;\n }\n }", "title": "" }, { "docid": "49ce2a15158fae5bedf155c46619919e", "score": "0.5590579", "text": "validate() {\n if (this.validated) {\n return;\n }\n /**\n * Do not attempt to validate when `maximumAllowedLimit` is not\n * defined.\n */\n if (this.maximumAllowedLimit === undefined) {\n this.validated = true;\n return;\n }\n if (this.file.state === 'streaming') {\n this.validateWhenGettingStreamed();\n return;\n }\n if (this.file.state === 'consumed') {\n this.validateAfterConsumed();\n return;\n }\n }", "title": "" }, { "docid": "60687a09474a743f9bbaa511f256a8ae", "score": "0.55484575", "text": "validate() {\n var return_value = {};\n if (this.name==\"\") return_value.name = false;\n if (this.reactions.length==0) return_value.reactions = false;\n this.parameters.forEach(function(p) {if (p.value===undefined) return_value.parameters=false;});\n if (this.growth.parameter==\"\") return_value.growth_parameter = false;\n if (this.division_trigger==\"\") return_value.division_trigger = false;\n if (this.volume_share==\"\") return_value.volume_share = false;\n return_value.valid = Object.keys(return_value).length>0 ? false : true;\n return return_value;\n }", "title": "" }, { "docid": "565b26c3313ca0ae32c13153861d4e9a", "score": "0.5546402", "text": "function validate(obj,to_validate_field)\n{\n\tvar error_fields = new Array();\n\tvar correct_fields = new Array();\n\tvar err_i=0;\n\tvar cor_i=0;\n\tvar religion_val = get_religion_value();\n\tvar to_check_array = new Array();\n\tvar temp_name;\n\tvar called_from_on_blur = 0;\n\n\tif(!submit_button_clicked)\n\t{\n\t\tif((obj && obj.name != \"relationship\") || to_validate_field)\n\t\t{\n\t\t\t//alert(to_validate_field)\n\t\t\t//alert(obj.name);\n\t\t\ttemp_name = obj.name ? obj.name : to_validate_field;\n\t\t\tif(temp_name.indexOf(\"_displaying_arr[]\") > 0)\t\n\t\t\t\ttemp_name = temp_name.substr(0,temp_name.length - 17);\n\t\t\telse if(temp_name.indexOf(\"_arr[]\") > 0)\n\t\t\t\ttemp_name = temp_name.substr(0,temp_name.length - 6);\n\t\t\telse if(temp_name.indexOf(\"_button\") > 0)\n\t\t\t\ttemp_name = temp_name.substr(0,temp_name.length - 7);\n\t\t\telse if(temp_name == \"lage\" || temp_name == \"hage\")\n\t\t\t\ttemp_name = \"partner_age\";\n\t\t\telse if(temp_name == \"lheight\" || temp_name == \"hheight\")\n\t\t\t\ttemp_name = \"partner_height\";\n\n\t\t\tif(in_array(temp_name,validate_fields))\n\t\t\t\tto_check_array[0] = temp_name;\n\n\t\t\tcalled_from_on_blur = 1;\n\t\t}\n\t}\n\telse\n\t{\n\t\tsubmit_button_clicked = 0;\n\t\tto_check_array = validate_fields;\n\t}\n\n\tvar i1 = to_check_array.length;\n\tfor(var i=0;i<i1;i++)\n\t{\n\t\tvar field_name = to_check_array[i];\n\t\tif(field_name==\"email\")\n\t\t{\n\t\t\t/*if(docF.email_is_ok.value == 0)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"email_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}*/\n\t\t\tif(\"\"==docF.email.value)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"email_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"email_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"password\")\n\t\t{\n\t\t\tvar trimmed_password = trim(docF.password.value);\n\t\t\tif(trimmed_password == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"password_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"password_error1\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"password_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"password_error3\").style.display = 'none';\n\t\t\t}\n\t\t\telse if(trimmed_password.length < 6 || trimmed_password.length > 40)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"password_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"password_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"password_error2\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"password_error3\").style.display = 'none';\n\t\t\t}\n\t\t\telse if(trimmed_password != docF.password.value)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"password_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"password_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"password_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"password_error3\").style.display = 'inline';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"password_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"confirm_password\")\n\t\t{\n\t\t\tvar trimmed_confirm_password = trim(docF.confirm_password.value);\n\t\t\tif(trimmed_confirm_password == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"confirm_password_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"confirm_password_error1\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"confirm_password_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"confirm_password_error3\").style.display = 'none';\n\t\t\t}\n\t\t\telse if(trim(docF.password.value) != trimmed_confirm_password)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"confirm_password_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"confirm_password_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"confirm_password_error2\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"confirm_password_error3\").style.display = 'none';\n\t\t\t}\n\t\t\telse if(trimmed_confirm_password != docF.confirm_password.value)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"confirm_password_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"confirm_password_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"confirm_password_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"confirm_password_error3\").style.display = 'inline';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"confirm_password_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"fname_user\" || field_name==\"lname_user\")\n\t\t{\n\t\t\tvar allowed_chars = /^[a-zA-Z\\.\\,\\s]+$/;\n\t\t\tvar fname_invalid_chars = 0;\n\t\t\tvar lname_invalid_chars = 0;\n\n\t\t\tif(docF.fname_user.value != \"\")\n\t\t\t{\n\t\t\t\tif(!allowed_chars.test(docF.fname_user.value))\n\t\t\t\t\tfname_invalid_chars = 1;\n\t\t\t}\n\t\t\tif(docF.lname_user.value != \"\")\n\t\t\t{\n\t\t\t\tif(!allowed_chars.test(docF.lname_user.value))\n\t\t\t\t\tlname_invalid_chars = 1;\n\t\t\t}\n\n\t\t\tif(trim(docF.fname_user.value) == \"\" && trim(docF.lname_user.value) == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"fname_lname_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"fname_error1\").style.display = \"inline\";\n\t\t\t\tdocument.getElementById(\"fname_error2\").style.display = \"none\";\n\t\t\t}\n\t\t\telse if(fname_invalid_chars || lname_invalid_chars)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"fname_lname_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"fname_error1\").style.display = \"none\";\n\t\t\t\tdocument.getElementById(\"fname_error2\").style.display = \"inline\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"fname_lname_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name==\"username\")\n\t\t{\n\t\t\t/*if(docF.username_is_ok.value == 0)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"username_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}*/\n\t\t\tif(\"\"==docF.username.value)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"username_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\tvar username_val=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._1234567890\"\n\t\t\t\t\tusername_str=docF.username.value\n\t\t\t\t\tfor (i=0; i<username_str.length; i++) {\n\t\t\t\t\t\tif (username_val.indexOf(username_str.charAt(i),0) == -1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\terror_fields[err_i] = \"username_submit_err\";\n\t\t\t\t\t\t\terr_i++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_fields[err_i]!=\"username_submit_err\")\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"username_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\n\t\t}\n\t\telse if(field_name==\"gender\")\n\t\t{\n\t\t\tvar gender_selected = 0;\n\t\t\tvar gender_arr = document.getElementsByName(\"gender\");\n\t\t\tvar j1 = gender_arr.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(gender_arr[j].checked == true)\n\t\t\t\t\tgender_selected = 1;\n\t\t\t}\n\t\t\tif(!gender_selected)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"gender_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"gender_submit_err\";\n\t\t\t\tcor_i++;\n\n\t\t\t\t//show partner income only for females\n\t\t\t\tif(called_from_on_blur)\n\t\t\t\t\tshow_hide_partner(\"\",\"income\");\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"day\" || field_name == \"month\" || field_name == \"year\")\n\t\t{\n\t\t\tvar gender_arr = document.getElementsByName(\"gender\");\n\t\t\tvar j1 = gender_arr.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(gender_arr[j].checked == true)\n\t\t\t\t\tgender_val_selected = gender_arr[j].value;\n\t\t\t}\n\n\t\t\tif(\"\"==document.getElementById(field_name).value)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"day_month_year_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"dob_error1\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"dob_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"dob_error3\").style.display = 'none';\n\t\t\t}\n\t\t\telse if(docF.day.value != \"\" && docF.month.value != \"\" && docF.year.value != \"\")\n\t\t\t{\n\t\t\t\tif(gender_val_selected == \"M\" && age < 21)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"day_month_year_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"dob_error1\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"dob_error2\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"dob_error3\").style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse if(gender_val_selected == \"F\" && age < 18)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"day_month_year_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"dob_error1\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"dob_error2\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"dob_error3\").style.display = 'inline';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = \"day_month_year_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"day_month_year_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name==\"partner_age\")\n\t\t{\n\t\t\tif(docF.lage.value == \"\" || docF.hage.value == \"\")\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"partner_age_error1\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"partner_age_error2\").style.display = 'none';\n\n\t\t\t\terror_fields[err_i] = \"partner_age_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse if(parseInt(docF.lage.value) > parseInt(docF.hage.value))\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"partner_age_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"partner_age_error2\").style.display = 'inline';\n\n\t\t\t\terror_fields[err_i] = \"partner_age_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_age_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"mstatus\")\n\t\t{\n\t\t\tvar mstatus_selected = 0;\n\t\t\tvar mstatus_arr = document.getElementsByName(\"mstatus\");\n\t\t\tvar j1 = mstatus_arr.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(mstatus_arr[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tmstatus_selected = 1;\n\t\t\t\t\tvar mstatus_value = mstatus_arr[j].value;\n\t\t\t\t\tmstatus_selected_value = mstatus_value;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!mstatus_selected)\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"mstatus_error1\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"mstatus_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"married_down_arrow\").style.display = 'none';\n\n\t\t\t\terror_fields[err_i] = \"mstatus_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse if(mstatus_value == \"M\" && (religion_val == \"\" || religion_val != \"2\"))\n\t\t\t{\n\n\t\t\t\terror_fields[err_i] = \"mstatus_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"mstatus_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"mstatus_error2\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"married_down_arrow\").style.display = 'block';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"married_down_arrow\").style.display = 'none';\n\t\t\t\tcorrect_fields[cor_i] = \"mstatus_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name==\"partner_mstatus\")\n\t\t{\n\t\t\tvar partner_mstatus_selected = 0;\n\t\t\tvar partner_mstatus_checkboxes = document.getElementsByName(\"partner_mstatus_arr[]\");\n\t\t\tvar j1 = partner_mstatus_checkboxes.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(partner_mstatus_checkboxes[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tpartner_mstatus_selected = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*if(!partner_mstatus_selected)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_mstatus_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse */\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_mstatus_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"has_children\")\n\t\t{\n\t\t\tif(typeof(mstatus_selected_value) == \"undefined\")\n\t\t\t{\n\t\t\t\tvar mstatus_arr = document.getElementsByName(\"mstatus\");\n\t\t\t\tvar j1 = mstatus_arr.length;\n\t\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t\t{\n\t\t\t\t\tif(mstatus_arr[j].checked == true)\n\t\t\t\t\t{\n\t\t\t\t\t\tmstatus_selected_value = mstatus_arr[j].value;\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\tif(mstatus_selected_value && mstatus_selected_value != \"N\")\n\t\t\t{\n\t\t\t\tvar has_children_selected = 0;\n\t\t\t\tvar has_children_arr = document.getElementsByName(\"has_children\");\n\t\t\t\tvar j1 = has_children_arr.length;\n\t\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t\t{\n\t\t\t\t\tif(has_children_arr[j].checked == true)\n\t\t\t\t\t\thas_children_selected = 1;\n\t\t\t\t}\n\t\t\t\tif(!has_children_selected)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"has_children_submit_err\";\n\t\t\t\t\terr_i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = \"has_children_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"has_children_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name==\"partner_height\")\n\t\t{\n\t\t\tif(docF.lheight.value == \"\" || docF.hheight.value == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_height_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"partner_height_error1\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"partner_height_error2\").style.display = 'none';\n\t\t\t}\n\t\t\telse if(parseInt(docF.lheight.value) > parseInt(docF.hheight.value))\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_height_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"partner_height_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"partner_height_error2\").style.display = 'inline';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_height_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"citizenship\")\n\t\t{\n\t\t\tvar country_val = docF.country_residence.value.split(\"|X|\");\n\t\t\tcountry_val = country_val[0].split(\"|}|\");\n\t\t\tif(\"\" == docF.citizenship.value && \"51\" != country_val[1])\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"citizenship_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"citizenship_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"phone\")\n\t\t{\n\t\t\tvar found_in_array = 0 ;\n\t\t\tvar mfound_in_array = 0 ;\n\t\t\tvar j1 = box_action_values.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(docF.phone.value == box_action_values[j])\n\t\t\t\t\tfound_in_array = 1;\n\t\t\t\tif(docF.mobile.value == box_action_values[j])\n\t\t\t\t\tmfound_in_array = 1;\n\t\t\t}\n\t\t\tvar filter = /^[0-9]+$/;\n\t\t\tif(found_in_array || docF.phone.value == \"\")\n\t\t\t{\n\t\t\t\tif(mfound_in_array ||docF.mobile.value == \"\")\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"phone_error1\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"phone_error2\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"phone_error3\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(!filter.test(docF.phone.value) && docF.phone.value != \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"phone_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"phone_error2\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"phone_error3\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'inline';\n\t\t\t}\n\t\t\telse if(docF.phone.value.length < 6 && docF.phone.value != \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"phone_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"phone_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"phone_error3\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'inline';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'inline';\n\n\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"phone_owner_name\")\n\t\t{\n\t\t\tvar found_in_array = 0;\n\t\t\tvar j1 = box_action_values.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(docF.phone.value == box_action_values[j])\n\t\t\t\t\tfound_in_array = 1;\n\t\t\t}\n\t\t\tif(!found_in_array && docF.phone.value != \"\")\n\t\t\t{\n\t\t\t\tvar allowed_chars = /^[a-zA-Z\\.\\,\\s]+$/;\n\t\t\t\tvar invalid_chars = 0\n\t\t\t\tif(\"\"!=docF.phone_owner_name.value)\n\t\t\t\t{\n\t\t\t\t\tvar temp_val = docF.phone_owner_name.value;\n\t\t\t\t\tif(!allowed_chars.test(temp_val))\n\t\t\t\t\t\tinvalid_chars = 1;\n\t\t\t\t}\n\n\t\t\t\tif(\"\"==docF.phone_owner_name.value)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"phone_owner_name_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"phone_owner_name_error1\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"phone_owner_name_error2\").style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse if(invalid_chars)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"phone_owner_name_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"phone_owner_name_error1\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"phone_owner_name_error2\").style.display = 'inline';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = \"phone_owner_name_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"phone_owner_name_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"showphone\")\n\t\t{\n\t\t\tvar found_in_array = 0;\n\t\t\tvar j1 = box_action_values.length; \n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(docF.phone.value == box_action_values[j])\n\t\t\t\t\tfound_in_array = 1;\n\t\t\t}\n\n\t\t\tif(!found_in_array && docF.phone.value != \"\" && docF.showphone.value == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"showphone_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"showphone_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"mobile\")\n\t\t{\n\t\t\tvar found_in_array = 0 ;\n\t\t\tvar pfound_in_array = 0 ;\n\t\t\tvar j1 = box_action_values.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(docF.mobile.value == box_action_values[j])\n\t\t\t\t\tfound_in_array = 1;\n\t\t\t\tif(docF.phone.value == box_action_values[j])\n\t\t\t\t\tpfound_in_array = 1;\n\t\t\t}\n\t\t\tvar filter = /^[0-9]+$/;\n\n\t\t\tif(found_in_array || docF.mobile.value == \"\")\n\t\t\t{\n\t\t\t\tif(pfound_in_array || docF.phone.value == \"\")\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"mobile_error1\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"mobile_error2\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"mobile_error3\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(!filter.test(docF.mobile.value) && docF.mobile.value != \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"mobile_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"mobile_error2\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"mobile_error3\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'inline';\n\t\t\t}\n\t\t\telse if(docF.mobile.value.length < 10 && docF.mobile.value != \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"mobile_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"mobile_error2\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"mobile_error3\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'inline';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"contact_number_error\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"contact_number_noerror\").style.display = 'inline';\n\n\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"mobile_owner_name\")\n\t\t{\n\t\t\tvar found_in_array = 0 ;\n\t\t\tvar j1 = box_action_values.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(docF.mobile.value == box_action_values[j])\n\t\t\t\t\tfound_in_array = 1;\n\t\t\t}\n\t\t\tif(!found_in_array && docF.mobile.value != \"\")\n\t\t\t{\n\t\t\t\tvar allowed_chars = /^[a-zA-Z\\.\\,\\s]+$/;\n\t\t\t\tvar invalid_chars = 0\n\t\t\t\tif(\"\"!=docF.mobile_owner_name.value)\n\t\t\t\t{\n\t\t\t\t\tvar temp_val = docF.mobile_owner_name.value;\n\t\t\t\t\tif(!allowed_chars.test(temp_val))\n\t\t\t\t\t\tinvalid_chars = 1;\n\t\t\t\t}\n\n\t\t\t\tif(\"\"==docF.mobile_owner_name.value)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"mobile_owner_name_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"mobile_owner_name_error1\").style.display = 'inline';\n\t\t\t\t\tdocument.getElementById(\"mobile_owner_name_error2\").style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse if(invalid_chars)\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"mobile_owner_name_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\tdocument.getElementById(\"mobile_owner_name_error1\").style.display = 'none';\n\t\t\t\t\tdocument.getElementById(\"mobile_owner_name_error2\").style.display = 'inline';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = \"mobile_owner_name_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"mobile_owner_name_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"showmobile\")\n\t\t{\n\t\t\tvar found_in_array = 0 ;\n\t\t\tvar j1 = box_action_values.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(docF.mobile.value == box_action_values[j])\n\t\t\t\t\tfound_in_array = 1;\n\t\t\t}\n\n\t\t\tif(!found_in_array && docF.mobile.value != \"\" && docF.showmobile.value == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"showmobile_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"showmobile_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"time_to_call_start\" || field_name == \"start_am_pm\" || field_name==\"time_to_call_end\" || field_name == \"end_am_pm\")\n\t\t{\n\t\t\tif((docF.start_am_pm.value == docF.end_am_pm.value && parseInt(docF.time_to_call_start.value) >= parseInt(docF.time_to_call_end.value)) || (docF.start_am_pm.value == \"PM\" && docF.end_am_pm.value == \"AM\"))\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"time_to_call_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"time_to_call_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"religion\")\n\t\t{\n\t\t\tif(typeof(mstatus_selected_value) == \"undefined\")\n\t\t\t{\n\t\t\t\tvar mstatus_arr = document.getElementsByName(\"mstatus\");\n\t\t\t\tvar j1 = mstatus_arr.length;\n\t\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t\t{\n\t\t\t\t\tif(mstatus_arr[j].checked == true)\n\t\t\t\t\t{\n\t\t\t\t\t\tmstatus_selected_value = mstatus_arr[j].value;\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\tif(religion_val == \"\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"religion_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse if(religion_val != \"2\" && mstatus_selected_value && mstatus_selected_value == \"M\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"mstatus_submit_err\";\n\t\t\t\terr_i++;\n\n\t\t\t\tdocument.getElementById(\"mstatus_error1\").style.display = 'none';\n\t\t\t\tdocument.getElementById(\"mstatus_error2\").style.display = 'inline';\n\t\t\t\tdocument.getElementById(\"married_down_arrow\").style.display = 'block';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"religion_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"caste\")\n\t\t{\n\t\t\tif(religion_val == \"5\" || religion_val == \"6\" || religion_val == \"7\" || religion_val == \"8\")\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(docF.caste.value == \"\")\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\t\terr_i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/*else if(field_name==\"partner_degree\")\n\t\t{\n\t\t\tvar partner_education_selected = 0;\n\t\t\tvar partner_education_checkboxes = document.getElementsByName(\"partner_degree_arr[]\");\n\t\t\tvar j1 = partner_education_checkboxes.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(partner_education_checkboxes[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tpartner_education_selected = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!partner_education_selected)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_degree_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_degree_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}*/\n\t\telse if(field_name==\"partner_income\")\n\t\t{\n\t\t\tvar partner_income_selected = 0;\n\t\t\tvar partner_income_checkboxes = document.getElementsByName(\"partner_income_arr[]\");\n\t\t\tvar j1 = partner_income_checkboxes.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(partner_income_checkboxes[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tpartner_income_selected = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!partner_income_selected && gender_val_selected == \"F\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_income_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_income_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name==\"partner_mtongue\")\n\t\t{\n\t\t\tvar partner_mtongue_selected = 0;\n\t\t\tvar partner_mtongue_checkboxes = document.getElementsByName(\"partner_mtongue_arr[]\");\n\t\t\tvar j1 = partner_mtongue_checkboxes.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(partner_mtongue_checkboxes[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tpartner_mtongue_selected = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!partner_mtongue_selected)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_mtongue_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_mtongue_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name==\"partner_religion\")\n\t\t{\n\t\t\tvar partner_religion_selected = 0;\n\t\t\tvar partner_religion_checkboxes = document.getElementsByName(\"partner_religion_arr[]\");\n\t\t\tvar j1 = partner_religion_checkboxes.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(partner_religion_checkboxes[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tpartner_religion_selected = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!partner_religion_selected)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_religion_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_religion_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n/*\t\telse if(field_name == \"caste_entry\")\n\t\t{\n\t\t\tif(docF.caste.value >= 242 && docF.caste.value <= 246)\n\t\t\t{\n\t\t\t\tvar allowed_chars = /^[a-zA-Z\\.\\s]+$/;\n\n\t\t\t\tif(docF.caste_entry.value == \"\")\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"caste_entry_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\t//document.getElementById(\"caste_entry_error1\").style.display = 'inline';\n\t\t\t\t\t//document.getElementById(\"caste_entry_error2\").style.display = 'none';\n\t\t\t\t}\n\t\t\t\telse if(!allowed_chars.test(docF.caste_entry.value))\n\t\t\t\t{\n\t\t\t\t\terror_fields[err_i] = \"caste_entry_submit_err\";\n\t\t\t\t\terr_i++;\n\n\t\t\t\t\t//document.getElementById(\"caste_entry_error1\").style.display = 'none';\n\t\t\t\t\t//document.getElementById(\"caste_entry_error2\").style.display = 'inline';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcorrect_fields[cor_i] = \"caste_entry_submit_err\";\n\t\t\t\t\tcor_i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"caste_entry_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n*/\n\t\telse if(field_name==\"partner_caste\")\n\t\t{\n\t\t\tvar partner_caste_selected = 0;\n\t\t\tvar partner_caste_checkboxes = document.getElementsByName(\"partner_caste_arr[]\");\n\t\t\tvar j1 = partner_caste_checkboxes.length;\n\t\t\tfor(var j=0;j<j1;j++)\n\t\t\t{\n\t\t\t\tif(partner_caste_checkboxes[j].checked == true)\n\t\t\t\t{\n\t\t\t\t\tpartner_caste_selected = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!partner_caste_selected && religion_val != \"5\" && religion_val != \"6\" && religion_val != \"7\" && religion_val != \"8\")\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"partner_caste_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"partner_caste_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse if(field_name == \"termsandconditions\")\n\t\t{\n\t\t\tif(docF.termsandconditions.checked==false)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = \"termsandconditions_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = \"termsandconditions_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(\"\"==document.getElementById(field_name).value)\n\t\t\t{\n\t\t\t\terror_fields[err_i] = field_name + \"_submit_err\";\n\t\t\t\terr_i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcorrect_fields[cor_i] = field_name + \"_submit_err\";\n\t\t\t\tcor_i++;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar i1 = error_fields.length;\n\tfor(var i=0;i<i1;i++)\n\t{\n\t\tdiv_id = error_fields[i];\n\t\tdocument.getElementById(div_id).style.display = 'block';\n\t}\n\tvar i1 = correct_fields.length;\n\tfor(var i=0;i<i1;i++)\n\t{\n\t\tvar div_id = correct_fields[i];\n\t\tif(!in_array(div_id, error_fields))\n\t\t\tdocument.getElementById(div_id).style.display = 'none';\n\t}\n\n\tif(error_fields.length == 0)\n\t\treturn true;\n\telse\n\t{\n\t\tvar required_index = error_fields[0].indexOf(\"_submit_err\");\n\t\trequired_field_name = error_fields[0].substring(0,required_index);\n\t\tif(required_field_name.match(\"fname_lname\"))\n\t\t\trequired_field_name = \"fname_user\";\n\t\telse if(in_array(required_field_name, partner_fields_array))\n\t\t\trequired_field_name += \"_arr[]\";\n\t\telse if(required_field_name == \"day_month_year\")\n\t\t\trequired_field_name = \"day\";\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "1eecb07b2678a52fbbb433963f9a1e0b", "score": "0.55446124", "text": "validate() {\n // Get generic API validation errors\n this._super();\n var errors = get(this, 'errors')||[];\n \n if (!get(this, 'model.scalewayConfig.commercialType') ) {\n errors.push('Specifying an Instance Type is required');\n }\n \n if (!get(this, 'model.scalewayConfig.region') ) {\n errors.push('Specifying an Region is required');\n }\n\n if (!get(this, 'model.scalewayConfig.organization') ) {\n errors.push('Specifying an Organization is required');\n }\n\n if (!get(this, 'model.scalewayConfig.token') ) {\n errors.push('Specifying a Token is required');\n }\n\n if (!get(this, 'model.scalewayConfig.image') ) {\n errors.push('Specifying an Image is required');\n }\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if ( get(errors, 'length') )\n {\n set(this, 'errors', errors);\n return false;\n }\n else\n {\n set(this, 'errors', null);\n return true;\n }\n }", "title": "" }, { "docid": "9054f56d705fa604fb62f28c34698538", "score": "0.5539639", "text": "validateProperties() {\r\n for (var pro in this.rules) {\r\n var conf = this.rules[pro];\r\n for (let i in conf) {\r\n let r = conf[i];\r\n if (r == 'require' && this[pro] !== 0 && !this[pro]) {\r\n this.setError(pro, \"Property \" + pro + \" is required.\")\r\n }\r\n if (r == 'int' && this[pro] && !utilities.validateIsInt(this[pro])) {\r\n this.setError(pro, \"Property \" + pro + \" is not integer.\")\r\n }\r\n if (r == 'float' && this[pro] && !utilities.validateIsFloat(this[pro])) {\r\n this.setError(pro, \"Property \" + pro + \" is not float.\")\r\n }\r\n if (r == 'lower' && this[pro]) {\r\n this[pro] = this[pro].toString().toLowerCase();\r\n }\r\n if (r == 'upper' && this[pro]) {\r\n this[pro] = this[pro].toString().toUpperCase(); aa\r\n }\r\n if (r == 'namespace' && this[pro] && !utilities.validateNameSpaceName(this[pro])) {\r\n this.setError(pro, \"Property \" + pro + \" is invalid. A namespace just contains a-z,A_Z,0-9,_\")\r\n }\r\n }\r\n }\r\n console.log(this.error)\r\n if (utilities.objectIsEmpty(this.error)) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "5afdfa208be8b1e9ee682cf000afc018", "score": "0.553886", "text": "validateProperties() {\n\n \t\tlet retVal = super.validateProperties();\n \t\tretVal = retVal ? this.validateTarget() : retVal;\n\n \t\treturn retVal;\n \t}", "title": "" }, { "docid": "88d18ce413f66061838c939e7daf21c7", "score": "0.55343574", "text": "finalizeValidation(isValid, errorMessage) {\n share.setValid(this.index, isValid);\n // For the last item, reset counters\n if (this.isLast && share.getAllValid()) {\n // Everything is valid, reset the singleton\n // reset all arrays so we don't pick them up on the next page\n share.reset();\n } else if (this.isLast) {\n // Something is invalid, reset only the counter but keep the array\n share.resetCounter();\n }\n return { isValid, errorMessage };\n }", "title": "" }, { "docid": "b29a3f21f8d9b4ec69caf6f878aeea94", "score": "0.55336434", "text": "function Validator() {}", "title": "" }, { "docid": "ceb8445a8d78607584f4c783f7ff6f2a", "score": "0.55290765", "text": "function validate(inst, vo)\r\n{\r\n if ($super.validate) {\r\n $super.validate(inst, vo);\r\n }\r\n}", "title": "" }, { "docid": "8968f86d89542967a75c5610d97f92e1", "score": "0.55231285", "text": "function validateInput(obj) {\n\t\n\tvar errorMessage = [];\n\n\tif (obj.topicName != \"\" && obj.topicName != null &&\n\t\t obj.location != \"\" && obj.location != null && \n\t\t obj.description != \"\" && obj.description != null) {\n\t\t\t\n\t\tconsole.log(\"all filled out\");\n\n\t\tdocument.getElementById(\"message\").classList.add('hide');\n\n\t} else {\n\n\t\tif (obj.topicName == \"\" || obj.topicName == obj.topicName.toLowerCase()) {\n\n\t\t\terrorMessage.push(\"*Enter a topic name that includes spaces and lowercase letters\");\n\t\t}\n\t\t\n\t\tif (obj.description == \"\") {\n\t\t\n\t\t\terrorMessage.push(\"*Please enter a description\");\n\t\t}\n\n\t\tif (obj.location == \"\" || !(/^[A-Za-z0-9-]+\\.[A-Za-z]{3}$/.test(obj.location))) {\n\t\t\n\t\t\terrorMessage.push('*Enter a file name that includes letters and \".\" (file.gif)');\n\t\t}\n\n\t\tdisplayErrors(errorMessage);\n\t\tobj.success = false;\n\t}\n\n\treturn obj;\n}", "title": "" }, { "docid": "60e4d66c6b68d5b48081d8045e0893ae", "score": "0.551538", "text": "function checkGlobalValidation(e) {\n checkFirstElementValue()\n checkLastElementValue()\n checkEmail()\n checkBirthDate()\n checkQuantity()\n checkCity()\n checkBox()\n //vérifie que toute les propriétés de l'objet soit vraie\n const hasUnvalidProperty = Object.keys(inputState).find(key => inputState[key] === false);\n // si une ou plusieurs fausse la validation n'est pas posiible\n if(hasUnvalidProperty) {\n e.preventDefault()\n // si toute vraie alors disparition des champs et apparition du text et du bouton\n } else {\n formData[0].style.display = \"none\";\n formData[1].style.display = \"none\";\n formData[2].style.display = \"none\";\n formData[3].style.display = \"none\";\n formData[4].style.display = \"none\";\n formData[5].style.display = \"none\";\n formData[6].style.display = \"none\";\n document.querySelector(\".text-label\").style.display = \"none\";\n validateBtn.style.display = \"none\";\n finModal.style.display = \"block\"\n final.style.display = \"block\"\n // Affichage des infos saisies dans le console\n info()\n e.preventDefault()\n }\n}", "title": "" }, { "docid": "7800b86d9878fda469a16d50b9f3ec10", "score": "0.55049", "text": "registerMoreValidate() {}", "title": "" }, { "docid": "a71669fc8b6fad8163e03e07fc544877", "score": "0.5500634", "text": "checkSchedule1DocValidity() {\n //Set Schedulec Doc complete based on Line12 entered & (Shcedule c enter value)\n if (this.scheduleCList.length.size === 0) {\n this.objInputFields.bScheduleCDocComplete = false;\n this.objInputFields.dLine12Adjusted = 0;\n\n } else if (!this.bLine3Disabled) {\n //value is entered in Line12 ShceduleC and check with Line 12 entered value & ShceduleC Line3\n this.objInputFields.dLine12Adjusted = this.dLine3Total;\n if (this.objInputFields.dLine12 === this.dLine3Total) {\n this.objInputFields.bScheduleCDocComplete = true;\n } else {\n this.objInputFields.bScheduleCDocComplete = false;;\n }\n } else if (!this.bLine29_31Disabled) {\n //value is entered in Line29/31 ShceduleC and check with Line 12 entered value & ShceduleC Line31\n this.objInputFields.dLine12Adjusted = this.dLine29Total;\n if (this.objInputFields.dLine12 === this.dLine31Total) {\n this.objInputFields.bScheduleCDocComplete = true;\n } else {\n this.objInputFields.bScheduleCDocComplete = false;;\n }\n }\n }", "title": "" }, { "docid": "b3870e2c4cdb7731ec9a0152c28d2264", "score": "0.5498131", "text": "function limpiarValidacion(object) {\n $('#error'+object.attr('id')).html('');\n object.parent().removeClass('has-danger');\n}", "title": "" }, { "docid": "36c2cbfa54a2ec5b5cd0c23616778669", "score": "0.5496331", "text": "async _validate() {\n assert(this.currentUser, 'currentUser is required');\n assert(\n this.currentUser.id,\n 'currentUser.id is required',\n );\n assert(\n this.currentUser.email,\n 'currentUser.email is required',\n );\n\n assert(this.data, 'profile is required');\n }", "title": "" }, { "docid": "0bc933e2055b4666e5189d912ca9bcb5", "score": "0.5486954", "text": "validate(attrs) {\n\n }", "title": "" }, { "docid": "85bd8cf7313ce8fee64572fbb995e7a8", "score": "0.5476062", "text": "function validate() {\n\tcheckName()\n\tcheckEmail()\n\tcheckPhone()\n\tcheckZip()\n\tvalidatePassword()\n\tclearInputs()\n}", "title": "" }, { "docid": "91ee91aac3960e19e7d86731f63d7bca", "score": "0.5474666", "text": "static createValidations(formGroup) {\n formGroup.validations.forEach(validator => {\n if(validator === this.REQUIRED) {\n if(formGroup.value === '' ) {\n formGroup.addError({\n field: formGroup.id,\n message: `${formGroup.id} cannot be empty`\n });\n } \n }\n if(validator === this.MINVALUE) {\n if(formGroup.value.split('').length < this.minCharacters ) {\n formGroup.addError({\n field: formGroup.id,\n message: `${formGroup.id} needs minimum ${this.minCharacters} characters`\n });\n } \n }\n if(validator === this.STRING_FORMAT) {\n let regx = /^[a-zA-Z ]{0,30}$/ ;\n if(formGroup.value !== '' && !regx.test(formGroup.value)) {\n formGroup.addError({\n field: formGroup.id,\n message: `${formGroup.id} should be valid string and maximum 30 characters allowed`,\n });\n }\n }\n if(validator === this.NUMBER_FORMAT) {\n let regx = /^\\d{10}$/ ;\n if(formGroup.value !== '' && !regx.test(formGroup.value)) {\n formGroup.addError({\n field: formGroup.id,\n message: `${formGroup.id} should be valid number`,\n });\n }\n }\n if(validator === this.EMAIL_FORMAT) {\n let regx = /\\S+@\\S+\\.\\S+/;\n if(formGroup.value !== '' && !regx.test(formGroup.value)) {\n formGroup.addError({\n field: formGroup.id,\n message: `${formGroup.id} should be valid`,\n });\n }\n }\n }); \n }", "title": "" }, { "docid": "166b3e6f9a5be07e27a76fb5da9496d9", "score": "0.5473427", "text": "function MandatoryValidator() {\r\n try {\r\n OneViewConsole.Debug(\"MandatoryValidator Start\", \"Framework.MandatoryValidator\");\r\n\r\n var MyInstance = this;\r\n var MandatoryMetaDataForAll = OneViewSessionStorage.Get(\"MandatoryMetaData\");\r\n\r\n this.ValidateOLD = function (AryDcResultDetails, $scope, xlatService, toaster, Operation) {\r\n try {\r\n OneViewConsole.Debug(\"Validate Start\", \"MandatoryValidator.Validate\");\r\n \r\n MandatoryMetaDataForAll = JSON.parse(MandatoryMetaDataForAll);\r\n //alert(\"MandatoryMetaDataForAll : \" + JSON.stringify(MandatoryMetaDataForAll));\r\n var oDefaultValidationResponse = new DefaultValidationResponse();\r\n oDefaultValidationResponse.IsSuccess = true;\r\n var MetData = MandatoryMetaDataForAll[Operation];\r\n\r\n var MandatoryElementsArray = MetData.MandatoryElements;\r\n var CombinedMessage = xlatService.xlat('Mandatory');\r\n var SuffixMessage = xlatService.xlat('and');\r\n \r\n\r\n var IsAnyEmpty = false;\r\n var CountOfEmpty = 0;\r\n\r\n var oScope=$scope;\r\n\r\n \r\n for (var itr1 = 0; itr1 < MandatoryElementsArray.length ; itr1++) {\r\n\r\n if (MandatoryElementsArray[itr1].Type == undefined || MandatoryElementsArray[itr1].Type == \"DefaultDCValidationRuleMetaData\"){\r\n\r\n var AttributeNodeId = MandatoryElementsArray[itr1].AttributeNodeId;\r\n var ControlId = MandatoryElementsArray[itr1].ControlId;\r\n var defaultValue = MandatoryElementsArray[itr1].DefaultValue;\r\n defaultValue = defaultValue.toLowerCase();\r\n for (var itr2 = 0; itr2 < AryDcResultDetails.length ; itr2++) {\r\n\r\n var IsEmpty = false;\r\n var DcResultDetailsEntity = AryDcResultDetails[itr2];\r\n var IsListData = false;\r\n if (DcResultDetailsEntity.AttributeNodeId == AttributeNodeId && DcResultDetailsEntity.ControlId == ControlId) {\r\n var valueFromPage = DcResultDetailsEntity.Answer;\r\n \r\n if (DcResultDetailsEntity.AnswerDataType == 'STRING' && DcResultDetailsEntity.AnswerDataType != \"\") {\r\n valueFromPage = valueFromPage.toLowerCase();\r\n }\r\n\r\n if (DcResultDetailsEntity.IsDynamicAnswer == 'true') {\r\n if (DcResultDetailsEntity.AnswerValue == undefined || DcResultDetailsEntity.AnswerValue == '') {\r\n oDefaultValidationResponse.IsSuccess = false;\r\n IsAnyEmpty = true;\r\n IsEmpty = true;\r\n CountOfEmpty++;\r\n }\r\n }\r\n else if (valueFromPage === defaultValue || valueFromPage === '' || valueFromPage == undefined) {\r\n oDefaultValidationResponse.IsSuccess = false;\r\n\r\n IsAnyEmpty = true;\r\n IsEmpty = true;\r\n CountOfEmpty++;\r\n }\r\n\r\n if (IsEmpty == true && CountOfEmpty == MandatoryElementsArray.length && CountOfEmpty != 1) {\r\n CombinedMessage = CombinedMessage + SuffixMessage + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n\r\n else if (CountOfEmpty > 1 && IsEmpty == true) {\r\n CombinedMessage = CombinedMessage + \",\" + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n\r\n else if (IsEmpty == true) {\r\n CombinedMessage = CombinedMessage + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n\r\n }\r\n }\r\n }\r\n else if (MandatoryElementsArray[itr1].Type == \"AdvanceDCValidationRuleMetaData\") {\r\n //alert(\"MandatoryElementsArray[itr1]\" + MandatoryElementsArray[itr1].DCValidationRule); \r\n //alert(\"Eval \" + eval(MandatoryElementsArray[itr1].DCValidationRule));\r\n if (eval(MandatoryElementsArray[itr1].DCValidationRule) == false) {\r\n oDefaultValidationResponse.IsSuccess = false;\r\n IsAnyEmpty = true;\r\n CountOfEmpty++;\r\n if (CountOfEmpty > 1) {\r\n CombinedMessage = CombinedMessage + \",\" + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n else {\r\n CombinedMessage = CombinedMessage + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n }\r\n }\r\n\r\n }\r\n //if (IsAnyEmpty == true && Operation != 'Submit') {\r\n if (IsAnyEmpty == true) {\r\n // toaster.pop('warning', xlatService.xlat('Title_Notification'), CombinedMessage);\r\n alert(CombinedMessage);\r\n }\r\n\r\n oDefaultValidationResponse.IsErrorMessageExecuted = true;\r\n\r\n OneViewConsole.Debug(\"Validate End\", \"MandatoryValidator.Validate\");\r\n\r\n return oDefaultValidationResponse;\r\n }\r\n\r\n catch (Excep) {\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.Validate\", Excep);\r\n }\r\n finally {\r\n MandatoryMetaDataForAll = null;\r\n oDefaultValidationResponse = null;\r\n MetData = null;\r\n MandatoryElementsArray = null;\r\n CombinedMessage = null;\r\n SuffixMessage = null;\r\n IsAnyEmpty = null;\r\n CountOfEmpty = null;\r\n AttributeNodeId = null;\r\n ControlId = null;\r\n defaultValue = null;\r\n IsEmpty = null;\r\n DcResultDetailsEntity = null;\r\n IsListData = null;\r\n valueFromPage = null;\r\n }\r\n }\r\n\r\n this.Validate = function (AryDcResultDetails, $scope, xlatService, toaster, Operation, IsEnableMandatoryStyle, IsPageLoad, PageLoadMandatoryOperation, IsAutoSave) {\r\n try {\r\n OneViewConsole.Debug(\"Validate Start\", \"MandatoryValidator.Validate\");\r\n \r\n var CombinedMessage = xlatService.xlat('Mandatory');\r\n var SuffixMessage = xlatService.xlat('and');\r\n\r\n MandatoryMetaDataForAll = JSON.parse(MandatoryMetaDataForAll);\r\n\r\n var oDefaultValidationResponse = new DefaultValidationResponse();\r\n oDefaultValidationResponse.IsSuccess = true;\r\n\r\n if (IsPageLoad == true && PageLoadMandatoryOperation == 'Save') {\r\n var Metadata = MandatoryMetaDataForAll.SaveValidationMetaData;\r\n //alert(\"Metadata : \" + JSON.stringify(Metadata));\r\n MyInstance.ValidateBeforeSaveOrSubmit(Metadata, CombinedMessage, SuffixMessage, oDefaultValidationResponse, AryDcResultDetails, $scope, xlatService, IsEnableMandatoryStyle, IsPageLoad, IsAutoSave);\r\n }\r\n else if (IsPageLoad == true && PageLoadMandatoryOperation == 'Submit') {\r\n var Metadata = MandatoryMetaDataForAll.SubmitValidationMetaData;\r\n MyInstance.ValidateBeforeSaveOrSubmit(Metadata, CombinedMessage, SuffixMessage, oDefaultValidationResponse, AryDcResultDetails, $scope, xlatService, IsEnableMandatoryStyle, IsPageLoad, IsAutoSave);\r\n }\r\n else if (Operation == 'Save') {\r\n var Metadata = MandatoryMetaDataForAll.SaveValidationMetaData;\r\n //alert(\"Metadata : \" + JSON.stringify(Metadata));\r\n MyInstance.ValidateBeforeSaveOrSubmit(Metadata, CombinedMessage, SuffixMessage, oDefaultValidationResponse, AryDcResultDetails, $scope, xlatService, IsEnableMandatoryStyle, IsPageLoad, IsAutoSave);\r\n }\r\n else if (Operation == 'Submit') {\r\n var Metadata = MandatoryMetaDataForAll.SubmitValidationMetaData;\r\n MyInstance.ValidateBeforeSaveOrSubmit(Metadata, CombinedMessage, SuffixMessage, oDefaultValidationResponse, AryDcResultDetails, $scope, xlatService, IsEnableMandatoryStyle, IsPageLoad, IsAutoSave);\r\n }\r\n\r\n \r\n OneViewConsole.Debug(\"Validate End\", \"MandatoryValidator.Validate\");\r\n\r\n return oDefaultValidationResponse;\r\n }\r\n\r\n catch (Excep) {\r\n // alert(\"MandatoryValidator.Validate\" + Excep);\r\n // alert(\"MandatoryValidator.Validate\" + JSON.stringify( Excep));\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.Validate\", Excep);\r\n }\r\n finally { \r\n oDefaultValidationResponse = null;\r\n MetData = null;\r\n MandatoryElementsArray = null;\r\n CombinedMessage = null;\r\n SuffixMessage = null;\r\n IsAnyEmpty = null;\r\n CountOfEmpty = null;\r\n AttributeNodeId = null;\r\n ControlId = null;\r\n defaultValue = null;\r\n IsEmpty = null;\r\n IsListData = null;\r\n valueFromPage = null;\r\n }\r\n }\r\n\r\n this.ValidateBeforeSaveOrSubmit = function (Metadata, CombinedMessage, SuffixMessage, oDefaultValidationResponse, AryDcResultDetails, $scope, xlatService, IsEnableMandatoryStyle, IsPageLoad, IsAutoSave) {\r\n try {\r\n \r\n OneViewConsole.Debug(\"ValidateBeforeSaveOrSubmit Start\", \"MandatoryValidator.ValidateBeforeSaveOrSubmit\");\r\n \r\n var IsAnyEmpty = false;\r\n var CountOfEmpty = 0;\r\n\r\n var oScope = $scope;\r\n\r\n if (Metadata != undefined) {\r\n if (Metadata.IsAgainstDC == true) {\r\n // alert('Metadata :' + JSON.stringify(Metadata));\r\n if (Metadata.DCValidationRuleMetaData != undefined) {\r\n for (var i = 0; i < Metadata.DCValidationRuleMetaData.length ; i++) {\r\n // alert('Metadata.DCValidationRuleMetaData :' + JSON.stringify(Metadata.DCValidationRuleMetaData));\r\n if (Metadata.DCValidationRuleMetaData[i].Type == \"DefaultDCValidationRuleMetaData\") {\r\n if (Metadata.DCValidationRuleMetaData[i].MandatoryElements != undefined) {\r\n var FailedAttributeNodeList = [];\r\n var PassedAttributeNodeList = [];\r\n var MandatoryElementsArray = Metadata.DCValidationRuleMetaData[i].MandatoryElements;\r\n for (var itr1 = 0; itr1 < MandatoryElementsArray.length ; itr1++) {\r\n var AttributeNodeId = MandatoryElementsArray[itr1].AttributeNodeId;\r\n var ControlId = MandatoryElementsArray[itr1].ControlId;\r\n var defaultValue = MandatoryElementsArray[itr1].DefaultValue;\r\n defaultValue = defaultValue.toLowerCase();\r\n\r\n for (var itr2 = 0; itr2 < AryDcResultDetails.length ; itr2++) {\r\n\r\n var IsEmpty = false;\r\n var DcResultDetailsEntity = AryDcResultDetails[itr2];\r\n var IsListData = false;\r\n if (DcResultDetailsEntity.AttributeNodeId == AttributeNodeId && DcResultDetailsEntity.ControlId == ControlId) {\r\n var valueFromPage = DcResultDetailsEntity.Answer;\r\n\r\n if (DcResultDetailsEntity.AnswerDataType == 'STRING' && DcResultDetailsEntity.AnswerDataType != \"\") {\r\n valueFromPage = valueFromPage.toLowerCase();\r\n }\r\n\r\n if (DcResultDetailsEntity.IsDynamicAnswer == 'true') {\r\n if (DcResultDetailsEntity.AnswerValue == undefined || DcResultDetailsEntity.AnswerValue == '') {\r\n oDefaultValidationResponse.IsSuccess = false;\r\n IsAnyEmpty = true;\r\n IsEmpty = true;\r\n CountOfEmpty++;\r\n }\r\n }\r\n else if (valueFromPage === defaultValue || valueFromPage === '' || valueFromPage == undefined) {\r\n oDefaultValidationResponse.IsSuccess = false;\r\n\r\n IsAnyEmpty = true;\r\n IsEmpty = true;\r\n CountOfEmpty++;\r\n }\r\n\r\n if (IsEmpty == true && CountOfEmpty == MandatoryElementsArray.length && CountOfEmpty != 1) {\r\n CombinedMessage = CombinedMessage + SuffixMessage + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n\r\n else if (CountOfEmpty > 1 && IsEmpty == true) {\r\n CombinedMessage = CombinedMessage + \",\" + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n\r\n else if (IsEmpty == true) {\r\n CombinedMessage = CombinedMessage + xlatService.xlat(MandatoryElementsArray[itr1].ErrorMessageKey);\r\n }\r\n\r\n\r\n if (IsEnableMandatoryStyle == true) {\r\n if (IsEmpty == true) {\r\n FailedAttributeNodeList.push({ 'AttributeNodeId': AttributeNodeId, 'ControlId': ControlId });\r\n }\r\n else {\r\n PassedAttributeNodeList.push({ 'AttributeNodeId': AttributeNodeId, 'ControlId': ControlId });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (IsEnableMandatoryStyle == true) {\r\n MyInstance.SetMandatoryFieldsColor(FailedAttributeNodeList, PassedAttributeNodeList, IsPageLoad);\r\n }\r\n }\r\n }\r\n else if (Metadata.DCValidationRuleMetaData[i].Type == \"CustomDCValidationRuleMetaData\") {\r\n \r\n //alert('CustomDCValidationRuleMetaData'+JSON.stringify(Metadata.DCValidationRuleMetaData[i]));\r\n var Response;\r\n\r\n var obj = new window[Metadata.DCValidationRuleMetaData[i].OfflineDCValidationConfigObjectKey];\r\n if (obj != undefined) {\r\n if (IsPageLoad == true) {\r\n //Parameters : AryDcResultDetails, IsAlertMessageEnabled,IsPageLoad\r\n Response = obj.Execute(AryDcResultDetails, false, true);\r\n }\r\n else {\r\n Response = obj.Execute(AryDcResultDetails, true);\r\n }\r\n\r\n\r\n if (Response.IsSuccess == false) {\r\n IsAnyEmpty = true;\r\n oDefaultValidationResponse.IsSuccess = Response.IsSuccess;\r\n CombinedMessage = CombinedMessage + Response.ErrorMessage;\r\n \r\n if (IsEnableMandatoryStyle == true) {\r\n //alert('Response vv : ' + JSON.stringify(Response));\r\n MyInstance.SetMandatoryFieldsColor(Response.FailedAttributeNodeList, Response.PassedAttributeNodeList, IsPageLoad);\r\n }\r\n }\r\n }\r\n }\r\n else if (Metadata.DCValidationRuleMetaData[i].Type == \"AdvanceDCValidationRuleMetaData\") {\r\n //alert('Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation) :' + Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation);\r\n //alert('eval(Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation) : ' + eval(Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation));\r\n\r\n Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation = Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation.replace(/#/g, \"'\");\r\n\r\n if (eval(Metadata.DCValidationRuleMetaData[i].FinalJavaScriptEquation) == false) {\r\n oDefaultValidationResponse.IsSuccess = false;\r\n IsAnyEmpty = true;\r\n CountOfEmpty++;\r\n if (CountOfEmpty > 1) {\r\n CombinedMessage = CombinedMessage + \",\" + xlatService.xlat(Metadata.DCValidationRuleMetaData[i].ErrorMessageKey);\r\n }\r\n else {\r\n CombinedMessage = CombinedMessage + xlatService.xlat(Metadata.DCValidationRuleMetaData[i].ErrorMessageKey);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n else {\r\n alert('MandatoryValidator.ValidateBeforeSaveOrSubmit : Not Supported IsAgainstDC=true');\r\n }\r\n }\r\n\r\n //if (IsAnyEmpty == true && Operation != 'Submit') {\r\n if (IsAnyEmpty == true && IsPageLoad != true) {\r\n // toaster.pop('warning', xlatService.xlat('Title_Notification'), CombinedMessage);\r\n if (IsAutoSave != true) {\r\n alert(CombinedMessage);\r\n }\r\n }\r\n\r\n oDefaultValidationResponse.IsErrorMessageExecuted = true;\r\n\r\n OneViewConsole.Debug(\"ValidateBeforeSaveOrSubmit End\", \"MandatoryValidator.ValidateBeforeSaveOrSubmit\");\r\n\r\n // alert('oDefaultValidationResponse :' + JSON.stringify(oDefaultValidationResponse));\r\n return oDefaultValidationResponse;\r\n\r\n }\r\n catch (Excep) {\r\n // alert(\"MandatoryValidator.ValidateBeforeSaveOrSubmit\" + Excep);\r\n // alert(\"MandatoryValidator.ValidateBeforeSaveOrSubmit\" + JSON.stringify(Excep));\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.ValidateBeforeSaveOrSubmit\", Excep);\r\n }\r\n }\r\n\r\n\r\n this.SetMandatoryFieldsColor = function (FailedAttributeNodeList, PassedAttributeNodeList, IsPageLoad) {\r\n try {\r\n \r\n OneViewConsole.Debug(\"SetMandatoryFieldsColor Start\", \"MandatoryValidator.SetMandatoryFieldsColor\");\r\n\r\n var _oDOM = new DOM();\r\n _oDOM.RemoveClass(\"ContentId\", \"has-footer\");\r\n\r\n var FailedStyle = \"col rounded light-bg ans-red\"; \r\n if (IsPageLoad == true) {\r\n FailedStyle = \"col rounded light-bg ans-mant\";\r\n }\r\n\r\n MyInstance.SetStyleForPassedAttributes(PassedAttributeNodeList);\r\n MyInstance.SetStyleForFailedAttributes(FailedAttributeNodeList, FailedStyle);\r\n // MyInstance.SetOrRemoveClass(FailedAttributeNodeList, FailedStyle, 'AddClass');\r\n // MyInstance.SetOrRemoveClass(PassedAttributeNodeList, FailedStyle, 'RemoveClass');\r\n\r\n OneViewConsole.Debug(\"SetMandatoryFieldsColor End\", \"MandatoryValidator.SetMandatoryFieldsColor\");\r\n\r\n\r\n }\r\n catch (Excep) {\r\n // alert(\"MandatoryValidator.SetMandatoryFieldsColor\" + Excep);\r\n // alert(\"MandatoryValidator.SetMandatoryFieldsColor\" + JSON.stringify(Excep));\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.SetMandatoryFieldsColor\", Excep);\r\n }\r\n }\r\n\r\n this.SetStyleForPassedAttributes = function (AttributeNodeList) {\r\n try {\r\n\r\n OneViewConsole.Debug(\"SetStyleForPassedAttributes Start\", \"MandatoryValidator.SetStyleForPassedAttributes\");\r\n\r\n var PassedStyle = \"ans-mant\";\r\n var FailedStyle = \"ans-red\";\r\n var _oDOM = new DOM();\r\n if (AttributeNodeList != undefined && AttributeNodeList != null) {\r\n for (var i = 0; i < AttributeNodeList.length; i++) {\r\n var TemplateData = AttributeNodeList[i];\r\n var DivId = 'Column_' + TemplateData.AttributeNodeId;\r\n _oDOM.RemoveClass(DivId, FailedStyle);\r\n _oDOM.AddClass(DivId, PassedStyle);\r\n \r\n }\r\n }\r\n OneViewConsole.Debug(\"SetStyleForPassedAttributes End\", \"MandatoryValidator.SetStyleForPassedAttributes\");\r\n\r\n\r\n }\r\n catch (Excep) {\r\n alert(\"MandatoryValidator.SetStyleForPassedAttributes\" + Excep);\r\n alert(\"MandatoryValidator.SetStyleForPassedAttributes\" + JSON.stringify(Excep));\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.SetStyleForPassedAttributes\", Excep);\r\n }\r\n }\r\n\r\n\r\n this.SetStyleForFailedAttributes = function (AttributeNodeList, FailedStyle) {\r\n try {\r\n\r\n OneViewConsole.Debug(\"SetStyleForFailedAttributes Start\", \"MandatoryValidator.SetStyleForFailedAttributes\");\r\n\r\n var _oDOM = new DOM();\r\n var PassedStyle = \"col rounded light-bg ans-mant\";\r\n if (AttributeNodeList != undefined && AttributeNodeList != null) {\r\n for (var i = 0; i < AttributeNodeList.length; i++) {\r\n var TemplateData = AttributeNodeList[i];\r\n var DivId = 'Column_' + TemplateData.AttributeNodeId;\r\n _oDOM.RemoveClass(DivId, \"ans-mant\");\r\n _oDOM.RemoveClass(DivId, \"ans-red\");\r\n _oDOM.AddClass(DivId, FailedStyle); \r\n }\r\n }\r\n OneViewConsole.Debug(\"SetStyleForFailedAttributes End\", \"MandatoryValidator.SetStyleForFailedAttributes\");\r\n\r\n\r\n }\r\n catch (Excep) {\r\n alert(\"MandatoryValidator.SetStyleForFailedAttributes\" + Excep);\r\n alert(\"MandatoryValidator.SetStyleForFailedAttributes\" + JSON.stringify(Excep));\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.SetStyleForFailedAttributes\", Excep);\r\n }\r\n }\r\n\r\n\r\n this.SetOrRemoveClass = function (AttributeNodeList, Class, OperationToDo) {\r\n try {\r\n\r\n OneViewConsole.Debug(\"SetOrRemoveClass Start\", \"MandatoryValidator.SetOrRemoveClass\");\r\n\r\n var _oDOM = new DOM();\r\n if (AttributeNodeList != undefined && AttributeNodeList != null) {\r\n for (var i = 0; i < AttributeNodeList.length; i++) {\r\n var TemplateData = AttributeNodeList[i];\r\n var DivId = 'Div_' + TemplateData.AttributeNodeId + '_' + TemplateData.ControlId;\r\n //alert(DivId + \", \"+ OperationToDo + ' , TemplateData : ' + JSON.stringify(TemplateData));\r\n if (OperationToDo == 'AddClass') {\r\n _oDOM.AddClass(DivId, Class);\r\n }\r\n else if (OperationToDo == 'RemoveClass') {\r\n _oDOM.RemoveClass(DivId, Class);\r\n }\r\n }\r\n }\r\n OneViewConsole.Debug(\"SetOrRemoveClass End\", \"MandatoryValidator.SetOrRemoveClass\");\r\n\r\n\r\n }\r\n catch (Excep) {\r\n alert(\"MandatoryValidator.SetOrRemoveClass\" + Excep);\r\n alert(\"MandatoryValidator.SetOrRemoveClass\" + JSON.stringify(Excep));\r\n throw oOneViewExceptionHandler.Create(\"FrameWork\", \"MandatoryValidator.SetOrRemoveClass\", Excep);\r\n }\r\n }\r\n\r\n\r\n OneViewConsole.Debug(\"MandatoryValidator End\", \"Framework.MandatoryValidator\");\r\n }\r\n catch (Excep) {\r\n throw oOneViewExceptionHandler.Create(\"Framework\", \"MandatoryValidator\", Excep);\r\n }\r\n\r\n}", "title": "" }, { "docid": "0faf6704e0611cb91a7a71ed1a29451c", "score": "0.5470393", "text": "validateString(property, data, schema) {\n let result = {\n isValid: true,\n messages: []\n }\n try {\n\n if (!schema) {\n schema = this.schema[property]\n }\n\n // Validate custom functions\n let validationResult = this.validateCustomRules(property, data, schema)\n result.isValid = (result.isValid && validationResult.isValid)\n result.messages = validationResult.messages\n\n // Validate required\n if (!data[property] && data[property] !== 0) {\n if (schema.required) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} es requerido`)\n }\n return result\n }\n\n // Validate data type\n if (!(typeof data[property] === 'string' || data[property] instanceof String)) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName}debe ser una Cadena`)\n\n return result\n }\n\n // Validate length\n if (schema.length) {\n if (schema.length.min) {\n if (data[property].trim().length < schema.length.min) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} debe tener una longitud mínima de ${schema.length.min}`)\n\n return result\n }\n }\n\n if (schema.length.max) {\n if (data[property].trim().length > schema.length.max) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} debe tener una longitud máxima de ${schema.length.max}`)\n\n return result\n }\n }\n }\n\n // Validate email\n if (schema.isEmail) {\n //const regexEmail = /\\S+@\\S+\\.\\S+/\n if (!validator.isEmail(data[property])) {\n result.isValid = false\n result.messages.push(`El campo ${schema.displayName} debe ser un correo válido`)\n }\n }\n\n // Validate url\n if (schema.isURL) {\n //const regexEmail = /\\S+@\\S+\\.\\S+/\n if (!validator.isURL(data[property])) {\n result.isValid = false\n result.messages.push(`El campo ${schema.displayName} debe ser una URL válida`)\n }\n }\n\n // Validate password\n if (schema.isPassword) {\n let passwordSchema = new passwordValidator();\n\n // Add properties to it\n passwordSchema\n .is().min(8) // Minimum length 8\n .has().uppercase() // Must have uppercase letters\n .has().lowercase() // Must have lowercase letters\n .has().digits() // Must have digits\n\n if (!passwordSchema.validate(data[property])) {\n result.isValid = false\n result.messages.push(`El campo ${schema.displayName} es una contraseña demasiado débil`)\n }\n }\n } catch (error) {\n console.error(error)\n }\n return result\n }", "title": "" }, { "docid": "607d90955aae417f282ea97b44a809b4", "score": "0.5448573", "text": "validateWorkRequest() {\n\n }", "title": "" }, { "docid": "6cf7e3bad33f822cdcc17c70e3d8a113", "score": "0.54442084", "text": "validate(args) {\n\n }", "title": "" }, { "docid": "c25696a83d000cc41f155d04a198b315", "score": "0.544317", "text": "function validate() {\n\t//validate pickup information\n\tif (validatePickup()) {\n\t\t\n\t\t//validate name and phone\n\t\tif (validateInfo()) {\n\t\t\t\n\t\t\t//validate credit card\n\t\t\tif (validateCC()) {\n\t\t\t\t\n\t\t\t\t//proceed\n\t\t\t\tcompleteOrder();\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "cc1eca947f7ec15c005500ae4bcd2f55", "score": "0.5437301", "text": "function validate(){\n\treset(codice);\n\treset(prezzo);\n\treset(immagine);\n\treset(marca);\n\n\t//gestisce gli errori uno alla volta, dall'alto al basso, se no lo screen reader non legge bene\n\tif(codice.value == \"\"){\n\t\tdisplayError(codice);\n\t\treturn false;\n\t}\n\tif(prezzo.value == \"\"){\n\t\tdisplayError(prezzo);\n\t\treturn false;\t\n\t}\n\tif(marca.value == \"\"){\n\t\tdisplayError(marca);\n\t\treturn false;\t\n\t}\t\n\tif(immagine.files.length == 0){\n\t\tdisplayError(immagine);\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "b2c1ffa9a73ca66e55171afad4515d46", "score": "0.5435317", "text": "validateArray(property, data, schema) {\n let result = {\n isValid: true,\n messages: [],\n innerValidation: {}\n }\n try {\n\n if (!schema) {\n schema = this.schema[property]\n }\n\n // Validate custom functions\n let validationResult = this.validateCustomRules(property, data, schema)\n result.isValid = (result.isValid && validationResult.isValid)\n result.messages = validationResult.messages\n\n // Validate required\n if (data[property] === null || data[property] === undefined) {\n if (schema.required) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} es requerido`)\n }\n return result\n }\n\n // Validate data type\n if (!Array.isArray(data[property])) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} debe ser unn array`)\n\n return result\n }\n\n // Validate data type\n if (!Array.isArray(data[property])) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} debe ser unn array`)\n\n return result\n }\n\n // Validate length\n if (schema.length) {\n if (schema.length.min) {\n if (data[property].length < schema.length.min) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} debe tener una longitud mínima de ${schema.length.min}`)\n\n return result\n }\n }\n\n if (schema.length.max) {\n if (data[property].length > schema.length.max) {\n result.isValid = false\n result.messages.push(`'El campo ${schema.displayName} debe tener una longitud máxima de ${schema.length.max}`)\n\n return result\n }\n }\n }\n\n if (schema.hasOwnProperty('innerSchema')) {\n\n let innerValidator = new SchemaValidator(schema.innerSchema)\n\n let element\n let index = 0\n console.debug(data[property])\n for (element of data[property]) {\n let tempResult\n switch (schema.innerSchema.type) {\n case 'object':\n tempResult = innerValidator.validate(element)\n break;\n default:\n tempResult = this.validateArrayElement(schema.innerSchema, element)\n break;\n }\n console.debug(element)\n console.debug(tempResult)\n if (!tempResult.isValid) {\n result.isValid = (result.isValid && tempResult.isValid)\n result.innerValidation[`${index}`] = tempResult\n }else{\n result.innerValidation[`${index}`] = {\n isValid : true\n }\n }\n index++\n }\n }\n } catch (error) {\n console.error(error)\n }\n return result\n }", "title": "" }, { "docid": "c29976b3c579d25f97b8daddcba71833", "score": "0.54321265", "text": "function validateValues() {\n if (ctrl.item.kind === 'cron') {\n var scheduleField = lodash.find(ctrl.selectedClass.fields, { name: 'schedule' });\n var intervalInputIsFilled = !lodash.isEmpty(ctrl.editItemForm.item_interval.$viewValue);\n var scheduleInputIsFilled = !lodash.isEmpty(ctrl.editItemForm.item_schedule.$viewValue);\n var bothFilled = intervalInputIsFilled && scheduleInputIsFilled;\n\n scheduleField.allowEmpty = intervalInputIsFilled;\n lodash.assign(scheduleField, {\n moreInfoIconType: bothFilled ? 'warn' : 'info',\n moreInfoOpen: bothFilled\n });\n ctrl.editItemForm.item_interval.$validate();\n if (intervalInputIsFilled) {\n ctrl.editItemForm.item_interval.$setDirty();\n }\n } else if (ctrl.item.kind === 'rabbit-mq') {\n var queueName = lodash.find(ctrl.selectedClass.fields, { name: 'queueName' });\n var topics = lodash.find(ctrl.selectedClass.fields, { name: 'topics' });\n var queueNameIsFilled = !lodash.isEmpty(ctrl.editItemForm.item_queueName.$viewValue);\n var topicsIsFilled = !lodash.isEmpty(ctrl.editItemForm.item_topics.$viewValue);\n\n // Queue Name and Topics cannot be both empty at the same time\n // at least one of them should be filled\n // if one of them is filled, the other is allowed to be empty\n queueName.allowEmpty = topicsIsFilled;\n topics.allowEmpty = queueNameIsFilled;\n\n // update validity: if empty is not allowed and value is currently empty - mark invalid, otherwise valid\n ctrl.editItemForm.item_queueName.$setValidity('text', queueName.allowEmpty || queueNameIsFilled);\n ctrl.editItemForm.item_topics.$setValidity('text', topics.allowEmpty || topicsIsFilled);\n } else if (ctrl.item.kind === 'kafka-cluster') {\n ctrl.item.attributes.sasl.enable = !lodash.isEmpty(ctrl.item.attributes.sasl.user) && !lodash.isEmpty(ctrl.item.attributes.sasl.password);\n }\n }", "title": "" }, { "docid": "a8cc6ff62c9a8546196c75608ff177ba", "score": "0.5427767", "text": "init()\n {\n if(!Util.isNullOrEmpty(this.__type) || !Util.isNullOrEmpty(this.__structure))\n throw new Error(10, 'Params invalid');\n else\n {\n if(!Util.isJSON(this.__structure))\n throw new Error(11, 'JSON invalid');\n else\n {\n if(this.Schema(new LObject(this.__type), JSON.parse(this.__structure), db.schema))\n {\n let ruleEngine = new RuleEngine(new LObject(this.__type), db);\n ruleEngine.init();\n //console.warn(\"init rule engine\");\n }\n else \n throw new Error(22, \"Problema process behaviour\");\n }\n \n }\n \n }", "title": "" }, { "docid": "8d95359d5e4bc8268fca9110b0ff734a", "score": "0.5418291", "text": "function validateMany(objects, error_function, done) {\n obj = objects.pop()\n obj.validate(function(err) {\n error_function(err);\n if (objects.length > 0) validateMany(objects, error_function, done);\n else done(); \n }) \n}", "title": "" }, { "docid": "6d95abf504924c2042ef6df4bf0f711c", "score": "0.5416976", "text": "function validateEnd(){\n $classStart = DOTB.util.DateUtils.parse($('#class_start').val(),cal_date_format).getTime();\n $classEnd = DOTB.util.DateUtils.parse($('#class_end').val(),cal_date_format).getTime();\n //get date start study\n $date_end = DOTB.util.DateUtils.parse($('#end_study').val(),cal_date_format);\n if($date_end==false){\n toastr.error('Invalid date');\n $('#end_study').val('');\n }else{\n $end = $date_end.getTime();\n if($end < $classStart || $end > $classEnd){\n toastr.error('Invalid date range. Please, choose another date!!')\n }\n }\n}", "title": "" }, { "docid": "d13181919617a3e3c9984ad7f2d6523d", "score": "0.54116726", "text": "function saveValidation() {\n\t\t\t\tvar isValid = true;\n\t\t\t\t$scope.validation = {};\n\n\t\t\t\tisValid = $scope.externalId.externalIdValidation();\n\n\t\t\t\tif($scope.newAdv.name === undefined || $scope.newAdv.name === null || $scope.newAdv.name.length <= 2){\n\t\t\t\t\t$scope.validation.name = \"Please enter a name longer than 2 characters\";\n\t\t\t\t\tisValid = false;\n\t\t\t\t}\n\t\t\t\tif($scope.newAdv.vertical === undefined || $scope.newAdv.vertical === null){\n\t\t\t\t\t$scope.validation.vertical = \"Please select status\";\n\t\t\t\t\tisValid = false;\n\t\t\t\t}\n\t\t\t\tif($scope.newAdv.status === undefined || $scope.newAdv.status === null){\n\t\t\t\t\t$scope.validation.status = \"Please select vertical\";\n\t\t\t\t\tisValid = false;\n\t\t\t\t}\n\n\t\t\t\tif(isValid){\n\t\t\t\t\t$scope.validation = {};\n\t\t\t\t}\n\t\t\t\treturn isValid;\n\t\t\t}", "title": "" }, { "docid": "e7eab61a3fc33e3c4f55ddcf994a0289", "score": "0.54105043", "text": "validateFields() {\n const firstName = document.querySelector(`#${this.firstNameFieldID}`);\n const lastName = document.querySelector(`#${this.lastNameFieldID}`);\n const dayPrice = document.querySelector(`#${this.dayPriceFieldID}`);\n const startDate = document.querySelector(`#${this.startDateFieldID}`);\n const endDate = document.querySelector(`#${this.endDateFieldID}`);\n\n validate(firstName, /^[a-zA-Z][^\\s]*[\\s|a-zA-Z]*?$/);\n validate(lastName, /^[a-zA-Z][^\\s]*[\\s|a-zA-Z]*?$/);\n validate(dayPrice, /^[0-9][^\\s]*$/);\n validate(startDate, /^[0-9]{4}-[0-9]{2}-[0-9]{2}/);\n validate(endDate, /^[0-9]{4}-[0-9]{2}-[0-9]{2}/);\n }", "title": "" }, { "docid": "70a56201cdb94dce9c9538aff4edab02", "score": "0.540802", "text": "function validarCamposVaciosAntes(obj) {\n\n if (obj.cliente == \"\" || obj.embarcacion == \"\" || obj.estado == \"\" || obj.fecha_emision == \"\" ||\n obj.puerto_embarque == \"\" || obj.puerto_desembarque == \"\" || obj.orometro_inicial_m1 == \"\" || obj.orometro_inicial_m2 == \"\" ||\n obj.horaSal == \"\" || obj.minSal == \"\" || obj.horaArrib == \"\" || //obj.orometro_final_m1 == \"\" || obj.orometro_final_m2 == \"\" || \n obj.minArrib == \"\" || obj.contrato_recepcion == \"\" || obj.capitan_embarcacion == \"\" ||\n obj.cliente == null || obj.embarcacion == null || obj.estado == null || obj.fecha_emision == null ||\n obj.puerto_embarque == null || obj.puerto_desembarque == null || obj.orometro_inicial_m1 == null || obj.orometro_inicial_m2 == null ||\n obj.horaSal == null || obj.minSal == null || obj.horaArrib == null || //obj.orometro_final_m1 == null || obj.orometro_final_m2 == null ||\n obj.minArrib == null || obj.contrato_recepcion == null || obj.capitan_embarcacion == null) {\n\n if (obj.cliente == \"\" || obj.cliente == undefined || obj.cliente == null) {\n $(document.getElementById(\"cliente\")).notify(\"Seleccione Cliente\", { position: \"right\" });\n }\n if (obj.fecha_emision == \"\" || obj.fecha_emision == null) {\n $(document.getElementById(\"fecha\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.orometro_inicial_m1 == \"\" || obj.orometro_inicial_m1 == null) {\n $(document.getElementById(\"oromIni1\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.orometro_inicial_m2 == \"\" || obj.orometro_inicial_m2 == null) {\n $(document.getElementById(\"oromIni2\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.orometro_final_m1 == \"\" || obj.orometro_final_m1 == null) {\n $(document.getElementById(\"oromFin1\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.orometro_final_m2 == \"\" || obj.orometro_final_m2 == null) {\n $(document.getElementById(\"oromFin2\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.horaSal == \"\" || obj.horaSal == null) {\n $(document.getElementById(\"horaSal\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.minSal == \"\" || obj.minSal == null) {\n $(document.getElementById(\"minSal\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.horaArrib == \"\" || obj.horaArrib == null) {\n $(document.getElementById(\"horaLleg\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n if (obj.minArrib == \"\" || obj.minArrib == null) {\n $(document.getElementById(\"minLleg\")).notify(\"Campo Vac\\u00EDo\", { position: \"right\" });\n }\n //if (obj.orometro_inicial_m1 >= obj.orometro_final_m1) {\n // $(document.getElementById(\"oromFin1\")).notify(\"Debe ser mayor al Inicial\", { position: \"right\" });\n //}\n //if (obj.orometro_inicial_m2 >= obj.orometro_final_m2) {\n // $(document.getElementById(\"oromFin2\")).notify(\"Debe ser mayor al Inicial\", { position: \"right\" });\n //}\n //if (obj.orometro_inicial_m1 >= obj.orometro_final_m1) {\n // $(document.getElementById(\"oromFin1\")).notify(\"Debe ser mayor al Inicial\", { position: \"right\" });\n //}\n //if (obj.orometro_inicial_m2 >= obj.orometro_final_m2) {\n // $(document.getElementById(\"oromFin2\")).notify(\"Debe ser mayor al Inicial\", { position: \"right\" });\n //}\n\n return false;\n } else {\n if (obj.orometro_final_m1 != \"\" || obj.orometro_final_m2 != \"\" || obj.orometro_final_m1 != null || obj.orometro_final_m2 != null ||\n obj.orometro_final_m1 != undefined || obj.orometro_final_m2 != undefined) {\n\n if (obj.orometro_inicial_m1 >= obj.orometro_final_m1 || obj.orometro_inicial_m2 >= obj.orometro_final_m2) {\n\n if (obj.orometro_inicial_m1 >= obj.orometro_final_m1 && obj.orometro_final_m1 != \"\" && obj.orometro_final_m1 != null) {\n $(document.getElementById(\"oromFin1\")).notify(\"Debe ser mayor al Inicial\", { position: \"right\" });\n return false;\n }\n if (obj.orometro_inicial_m2 >= obj.orometro_final_m2 && obj.orometro_final_m2 != \"\" && obj.orometro_final_m2 != null) {\n $(document.getElementById(\"oromFin2\")).notify(\"Debe ser mayor al Inicial\", { position: \"right\" });\n return false;\n }\n\n return true;\n\n } else\n return true;\n } else\n return true;\n }\n}", "title": "" }, { "docid": "6a97cba48ce6ab723363dcd7d9e0ef5f", "score": "0.5404649", "text": "function loadValidation() {\n setValidateUNHCR(true);\n setValidatePhoneNo(true);\n setValidateOtherPhoneNo(true);\n}", "title": "" }, { "docid": "ddf1f4ce68f65bce0226e09419c47d1d", "score": "0.5398265", "text": "save() {\n\t\tthis.typeValidate();\n\t}", "title": "" }, { "docid": "62c53a75f2818ed6c1480d9d3d1a0ee9", "score": "0.5392527", "text": "function validatedFields() {\n const $startDate = $('#startDate');\n const $endDate = $('#endDate');\n const $pointValue = $('#pointValue');\n const $searchPreviousChallenge = $('#searchPreviousChallenge');\n const $challengeTitle = $('#challengeTitle');\n const $activityText = $('#activityText');\n const $shortDescription = $('#shortDescription');\n const $specificDemographicText = $('#targetingDetails');\n\n let allInputsAreValid = true;\n\n function validate($element) {\n if ($element.val()) {\n $element.removeClass('is-invalid');\n } else {\n $element.addClass('is-invalid');\n allInputsAreValid = false;\n }\n }\n\n // validation for start and end date timing\n function validateStartIsBeforeEndDate() {\n if (moment(endDate).isBefore(startDate)) {\n alert('Error: The Start Date must be before the End Date.');\n $startDate.addClass('is-invalid');\n $endDate.addClass('is-invalid');\n allInputsAreValid = false;\n } else {\n $startDate.removeClass('is-invalid');\n $endDate.removeClass('is-invalid');\n }\n }\n\n switch (step) {\n case 'NetNew':\n validate($startDate);\n validate($endDate);\n validate($pointValue);\n validateStartIsBeforeEndDate();\n break;\n case 'Historical':\n validate($searchPreviousChallenge);\n validate($startDate);\n validate($endDate);\n validate($pointValue);\n validateStartIsBeforeEndDate();\n break;\n case 'ChallengeContent':\n validate($challengeTitle);\n validate($activityText);\n validate($shortDescription);\n break;\n case 'AdditionalDetails':\n targeting === 'Specific Demographic' ? validate($specificDemographicText) : '';\n break;\n }\n\n return allInputsAreValid;\n }", "title": "" }, { "docid": "a77860ee75d176e691ea4bcea5e21ec2", "score": "0.5383907", "text": "function saveValidations(){\n\t\t\n\t\tfor (i=0;i<fields.length;i++){\n\t\t\tfinalFieldValidations[fields[i]].length = 0;\n // loop through the original and new rules and take the one that are not cancelled by the user.\n\t\t\tfor (j=0;j< newFieldValidations[fields[i]].length + fieldValidations[fields[i]].length;j++){\n\t\t\t\tvar listElement = $(\"#\"+fields[i]+\"_\"+j);\n\t\t\t\tif(!$(listElement).hasClass('hiderule')){\n\t\t\t\t\tconsole.log($(listElement).text());\n\t\t\t\t\tfinalFieldValidations[fields[i]].push($(listElement).text()); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n}", "title": "" }, { "docid": "dab355d266e4cce338df40fcee799cba", "score": "0.5380587", "text": "validate(data) {\n if (typeof data !== 'object') {\n data = {};\n }\n // TODO: implement schema\n return data;\n }", "title": "" }, { "docid": "ad61a1c57f279eb215e30ee9d07c3111", "score": "0.5379664", "text": "function customValidation(event){\n\n const field=event.target;\n\n // logica para verificar se existem erros\n function verifyErrors(){\n let foundError=false;\n\n // for in vai iterar sobre cada propriedade do objeto error poderia ser chamado de key\n for (let error in field.validity){\n // console.log(field.validity[error])\n\n if(error ≠ \"customError\" && field.validity[error]){\n foundError=error\n }\n }\n return foundError;\n }\n\n const error= verifyErrors();\n console.log(\"Error Exists\",error)\n\n verifyErrors();\n\n if(error){\n // troca a mensagem do required\n fields.setCustomValidity(\"Esse campo é obrigatório\")\n }else{\n field.setCustomValidity(\"\")\n }\n\n \n //validity objeto com propriedades escondidas:ValueMissing,typeMisMatch,patternMisMatch..\n console.log(field.validity)\n\n // no Validity-> custom Error :true\n // mensagem disparada toda hora \n field.setCustomValidity(\"Esse campo é obrigatório\")\n}", "title": "" }, { "docid": "f54852410d35ea0db6ffa3685ac1b7ac", "score": "0.5375993", "text": "function validateEditForm(formObj) {\n clearNotice();\n\n var resourceName = formObj.resource_name.value\n startDate = formObj.start_date.value;\n\tstartTime = formObj.start_time.value;\n\tendDate = formObj.end_date.value;\n\tendTime = formObj.end_time.value;\n\n\tif(resourceName.length == 0) {\n addError('Please select a resource.');\n }\n\n\tif(startDate.trim().length == 0) {\n\t addError('Please enter start date.');\n\t}\n\t\n\tif(startTime.trim().length == 0) {\n addError('Please enter start time.');\n }\n\t\n\tif(endDate.trim().length == 0) {\n addError('Please enter end date.');\n }\n\t\n\tif(endTime.trim().length == 0) {\n addError('Please enter end time.');\n }\n\n\tif(startDate.trim().length != 0 && isValidDate(startDate)) {\n addError('Please enter valid start date.');\n }\n\tif(startTime.trim().length != 0 && isValidTime(startTime)) {\n addError('Please enter valid start time.');\n }\n\tif(endDate.trim().length != 0 && isValidDate(endDate)) {\n addError('Please enter valid end date.');\n }\n\tif(endTime.trim().length != 0 && isValidTime(endTime)) {\n addError('Please enter valid end time.');\n }\n\t\n\tif (Date.parse(endDate.value + \" \" + endTime.value) < Date.parse(startDate.value + \" \" + startTime.value)) {\n\t addError('End Date and time cannot be before start date and time.');\n\t}\n\t\n\tif(((Math.round(Date.parse(endDate.value+\" \"+endTime.value) - Date.parse(startDate.value+\" \"+startTime.value))/1000)/60 < 10 ) && error == 0){\n\t addError('Time difference must be greater than 10 minutes.');\n\t}\n\n\tif (hasErrorNotice()) {\n displayNotice();\n return false;\n }\n\tdisableButton();\n return true;\n}", "title": "" }, { "docid": "be6563d5510bb033863c3d3035aab948", "score": "0.53752875", "text": "orgValidate(data){\n \n const schema=joi.object({\n 'id': joi.number().integer().optional(),\n 'name': joi.string().required()\n });\n \n return schema.validate(data); //returns {error,value} after validation\n }", "title": "" }, { "docid": "c814ccbabce49c6baeed4b26af9727c7", "score": "0.53697187", "text": "function validate(){ \n var mottoTime = getProperty(\"this\", \"mottoTime\")\n var year = trimString(getProperty(\"this\", \"year\"));\n var week = getCleanList(getProperty(\"this\", \"week\"));\n var monday = getCleanList(getProperty(\"this\", \"monday\"));\n var tuesday = getCleanList(getProperty(\"this\", \"tuesday\"));\n var wednesday = getCleanList(getProperty(\"this\", \"wednesday\"));\n var thursday = getCleanList(getProperty(\"this\", \"thursday\"));\n var friday = getCleanList(getProperty(\"this\", \"friday\"));\n var saturday = getCleanList(getProperty(\"this\", \"saturday\"));\n var sunday = getCleanList(getProperty(\"this\", \"sunday\"));\n var dayAfter = getCleanList(getProperty(\"this\", \"dayAfter\"));\n var holidays = getCleanList(getProperty(\"this\", \"holidays\"));\n var plan = trimString(getProperty(\"this\", \"plan\"));\n \n \n var result = [];\n \n if (mottoTime === \"\") {\n var validationResult = \"mottoTime is required\";\n logMessage(validationResult);\n result.push(validationResult);\n } else if (!exists(mottoTime)) {\n var validationResult = \"mottoTime '\" + mottoTime + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n \n if (year === \"\") {\n var validationResult = \"year is required\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n \n if (year < 2019 || year > 2050) { //Beware: this is arbitrary\n var validationResult = \"year should be >= 2019 and <= 2050\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n \n if (week.length < 1) {\n var validationResult = \"at least 1 week is required\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n \n for (var i = 0; i < week.length; i++){\n if (week[i] < 1 || week[i] > 53) {\n var validationResult = \"week '\" + week[i] + \"' is not a valid value\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n for (var i = 0; i < monday.length; i++){\n if (!exists(monday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"monday timeslot '\" + monday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n\n for (var i = 0; i < tuesday.length; i++){\n if (!exists(tuesday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"tuesday timeslot '\" + tuesday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n for (var i = 0; i < wednesday.length; i++){\n if (!exists(wednesday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"wednesday timeslot '\" + wednesday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n for (var i = 0; i < thursday.length; i++){\n if (!exists(thursday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"thursday timeslot '\" + thursday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n for (var i = 0; i < friday.length; i++){\n if (!exists(friday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"friday timeslot '\" + friday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n for (var i = 0; i < saturday.length; i++){\n if (!exists(saturday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"saturday timeslot '\" + saturday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n for (var i = 0; i < sunday.length; i++){\n if (!exists(sunday[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"sunday timeslot '\" + sunday[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n\n for (var i = 0; i < holidays.length; i++){\n if (!exists(holidays[i],\"trigger/motto/timeSlot\")) {\n var validationResult = \"holiday timeslot '\" + holidays[i] + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n if (plan === \"\") {\n var validationResult = \"Scenario is required\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n \n if (plan !== \"\") {\n if (!exists(plan, \"plans\")) {\n var validationResult = \"Scenario '\" + plan + \"' not found\";\n logMessage(validationResult);\n result.push(validationResult);\n }\n }\n \n if (result.length === 0) { \n setProperty(\"this\", \"validationResult\", \"OK\"); \n return true\n } else {\n setProperty(\"this\", \"validationResult\", result.join(\", \")); \n return false\n }\n}", "title": "" }, { "docid": "e17371ece5cbd68e3a131e003be3181f", "score": "0.5369347", "text": "function validate()\r\n{\t\r\n\tp_sa_uc_helper.setTraceMsgLevel(log_level);\r\n\tp_sa_uc_helper.traceMsg(\"validate()\");\r\n\t//p_sa_uc_helper.traceMsg(uc_name);\r\n\tp_sa_uc_helper.setUCName(uc_name);\r\n\r\n\tvalidate_performed = true;\r\n\r\n\tdvt_activity_instances = 1; \r\n\t//dvt_activity_names = \"\"; \r\n\tdvt_activity_resources = \"\";\r\n\r\n\tif (uiaMode == \"Live\")\r\n\t{\r\n\t\tdvt_activity_resources = \"System Analyzer\";\r\n\t}\r\n\r\n\tif(scripting){\r\n//\t\tJTManager.getInstance();\r\n\t}\r\n\r\n\tvalid = true;\r\n\treturn valid;\r\n}", "title": "" }, { "docid": "52c771f195c652e637b6858c9301c32a", "score": "0.53657055", "text": "async validate() {\n this._validateLocalisedId();\n this._validateEstablishmentName();\n this._validateStatus();\n\n // if the status is unchecked or deleted, then don't continue validation\n if (!STOP_VALIDATING_ON.includes(this._status)) {\n await this._validateAddress();\n this._validateEstablishmentType();\n\n this._validateShareWithCQC();\n this._validateShareWithLA();\n\n this._validateMainService();\n this._validateRegType();\n this._validateProvID();\n await this._validateLocationID();\n\n this._validateAllServices();\n this._validateServiceUsers();\n this._validateCapacitiesAndUtilisations();\n\n this._validateTotalPermTemp();\n this._validateAllJobs();\n this._validateJobRoleTotals();\n\n this._validateReasonsForLeaving();\n this._validateAdvertising();\n this._validateInterviews();\n this._validateRepeatTraining();\n this._validateAcceptCareCertificate();\n this._validateSickPay();\n this._validateHoliday();\n this._validatePensionContribution();\n this._validateBenefits();\n\n // this._validateNoChange(); // Not working, disabled for LA Window\n }\n\n return this.validationErrors.length === 0;\n }", "title": "" }, { "docid": "ac48940c3b3e46ad194db29c5f1de236", "score": "0.53649306", "text": "function validateThis(data){\n\n}", "title": "" }, { "docid": "844e21d4a01ec3e8e634efdbe85c2c0d", "score": "0.5362859", "text": "validate(_value, _utils) {\n return false;\n }", "title": "" }, { "docid": "a98ed71478c58d159afbbec3636e1371", "score": "0.5358143", "text": "init(){this._initFieldsFromSpec(this.fields,this._spec.fields);this._pristine=!0;this._isValid=!0}", "title": "" }, { "docid": "a2b5b834bcbfb0cdb28a71767024228a", "score": "0.53438026", "text": "validate() {\n\n // pull requirements to loop through\n let requiredNames = Object.keys(this._required);\n\n // go through each requirement\n // for loop used to terminate function on first invalidity.\n for (let i = 0; i < requiredNames.length; i++) {\n \n // get info\n let name = requiredNames[i],\n test = this._validationMap[this._required[name]],\n value = this._store[name];\n\n // if any invalid conditions are met, set state & notify invalidity, return\n if ((value === undefined) || (test === undefined) || (test(value) === false)) {\n this._valid = false;\n this.formInvalid.notify();\n return;\n }\n }\n\n // if not returned by for loop, form is valid.\n this._valid = true;\n this.formValid.notify();\n\n }", "title": "" }, { "docid": "77b70b651852e880f14f14efcc93d32b", "score": "0.53315866", "text": "function doValidate() {\n if (passenger.citizenship.value.id == 189)//Россия\n {\n //поездка по России\n var tripInsideRF = $scope.isTripInsideRF($scope.item);\n\n //если поездка в Украину\n var tripInsideUkraine = $scope.isInside($scope.item, [226], true);\n\n var doc_num = $elem.val();\n //console.log('doc_num', doc_num);\n doc_num = doc_num.replace(/\\s+/g, '');\n\n var isRuPassp = $scope.isCaseValid(function () {\n Validators.ruPassport(doc_num, 'err');\n });\n\n var isBirthDoc = $scope.isCaseValid(function () {\n Validators.birthPassport(doc_num, 'err');\n });\n\n //console.log('tripInsideRF', tripInsideRF, 'tripInsideUkraine', tripInsideUkraine, 'isRuPassp', isRuPassp, 'isBirthDoc', isBirthDoc);\n\n if (tripInsideRF) {\n if (isRuPassp || isBirthDoc) {\n //passenger[hideField][hideFieldName] = true;\n\n //console.log(passenger.doc_expirationDate.id);\n var $to = $(\"#\" + passenger.doc_expirationDate.id);\n $scope.tooltipControl.close($to);\n\n return;\n }\n }\n else if (tripInsideUkraine) { //если в Украине\n if (isRuPassp || isBirthDoc) {\n setTimeout(function () {\n var $to = $(\"#\" + passenger.doc_series_and_number.id);\n $scope.tooltipControl.close($to);\n $scope.tooltipControl.init($to, 'С 1 марта 2015 года граждане РФ могут въезжать<br/>на территорию Украины только по заграничному паспорту.');\n $scope.tooltipControl.open($to);\n }, 100);\n\n return;\n }\n else {\n var $to = $(\"#\" + passenger.doc_series_and_number.id);\n $scope.tooltipControl.close($to);\n }\n }\n }\n\n //passenger[hideField][hideFieldName] = false;\n return;\n }", "title": "" }, { "docid": "237fed864f76ce8335e4a816e9a10279", "score": "0.5331235", "text": "validate(_value, _utils) {\n return false;\n }", "title": "" }, { "docid": "7f27fe0e0e11186daad4f9e16372caf1", "score": "0.5331202", "text": "function seteoValidacion() {\n\tvalidacionColumna();\n\tvalidacionFila();\n\t// Si hay dulces que borrar\n\tif ($('img.delete').length !== 0) {\n\t\tborraAnimacionDulce();\n\t}\n}", "title": "" }, { "docid": "0c51f651a6072cf000b705a445bd0660", "score": "0.5329495", "text": "checkRules() {\n const brokenRules = _brokenRules.get( this );\n brokenRules.clear();\n _brokenRules.set( this, brokenRules );\n\n const context = new ValidationContext( _store.get( this ), brokenRules );\n const properties = _properties.get( this );\n const rules = _rules.get( this );\n properties.forEach( property => {\n rules.validate( property, context );\n } );\n checkChildRules.call( this );\n\n _isValidated.set( this, true );\n }", "title": "" }, { "docid": "003a9b8b3ad409cde171e10fc2615ec8", "score": "0.5327895", "text": "function resetValidation(){\n first = true;\n}", "title": "" }, { "docid": "6a3ce1430ad9aeee2d3c253448031fdb", "score": "0.53185403", "text": "formIsValid () {\n const vaildForm = this.dateIsValid() && this.phaseIsValid() && this.statusIsValid() && this.notesIsValid();\n return vaildForm;\n }", "title": "" }, { "docid": "d6f0bafff9d69e02c779cfeaad5ce68c", "score": "0.5303841", "text": "run() {\n\t\tthis.errors = [];\n\t\tthis.warnings = [];\n\t\t\n\t\tthis._validate();\n\t\tthis._fixProblems();\n\t\tthis._visualize();\n\t}", "title": "" }, { "docid": "0b86fb854747cfdd350588ace922c906", "score": "0.53033155", "text": "function _verifyIntegrity() {\n\t /*var i;\n\t for (var propName in this._properties) {\n\t var prop = this._properties[propName];\n\t if (prop.particle) {\n\t if (isNaN(prop.particle.getEnergy())) {\n\t throw 'invalid particle energy: ' + propName;\n\t }\n\t var value = prop.particle.getPosition();\n\t for (i = 0; i < value.length; i++) {\n\t if (isNaN(value[i])) {\n\t throw 'invalid particle value: ' + propName + '(' + i + ')';\n\t }\n\t }\n\t value = prop.endState.get();\n\t for (i = 0; i < value.length; i++) {\n\t if (isNaN(value[i])) {\n\t throw 'invalid endState value: ' + propName + '(' + i + ')';\n\t }\n\t }\n\t }\n\t }*/\n\t }", "title": "" }, { "docid": "d0588872e3de08833ef034277c4ac8f4", "score": "0.5303147", "text": "function validar() {\n validarCampos(nacionR, nombreR, fechNacR, calleR);\n validarDni(numDocR,inputDni);\n validarEmail(email,emailR);\n\n}", "title": "" } ]
65af602c7d2dd2cfe4d035f6ae088997
Replace unicode chars with their cssunicode definitions replaces \e000 until \efff (used in some icon fonts)
[ { "docid": "0647a7fb89dc0f09d033751aed10ab83", "score": "0.81666756", "text": "function replaceUnicodeCssChars(string) {\n return string.replace(/[\\uE000-\\uEFFF]/g, function (char) {\n return '\\\\' + char.charCodeAt(0).toString(16);\n });\n }", "title": "" } ]
[ { "docid": "1623efd8ba9a95c8b2601682090f6d42", "score": "0.70353174", "text": "static replaceUnicodeCodePoint(num) {\n return num > 0x10ffff || num == 0x00 ? 0xfffd : num\n }", "title": "" }, { "docid": "fe269be95514bc69839426f36a593629", "score": "0.6981965", "text": "function puzzleme_character_replace(s) {\n s = s.replaceAll('â\\u0080\\u009c', '\"');\n s = s.replaceAll('â\\u0080\\u009d', '\"');\n s = s.replaceAll('â\\u0080\\u0098', \"'\");\n s = s.replaceAll('â\\u0080\\u0099', \"'\");\n s = s.replaceAll('â\\u0080\\u0094', \"--\");\n return s;\n}", "title": "" }, { "docid": "e68c5c1ebbfcf0bdad5e759eccd2a968", "score": "0.68031496", "text": "function convertEscapes(text) {\n return text.replace(/\\\\u([0-9A-F]{4})/gi, (match, hex) => String.fromCharCode(parseInt(hex,16)));\n}", "title": "" }, { "docid": "9f547deee20a75973bc75c9580b98478", "score": "0.6714228", "text": "function remove_unicode_escape_codes() {\n\tvar errors = document.querySelectorAll('pre.error')\n\tfor (var i = 0; i < errors.length; i++) {\n\t\tvar orig = errors[i].innerHTML\n\t\tvar newer = orig.replace(/\\ufffd\\[\\d+m/g, \"\")\n\t\tif (orig !== newer) {\n\t\t\terrors[i].innerHTML = newer;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7330d8a620878e07e8a0f2d4f5a1f844", "score": "0.66613394", "text": "convertUnicode(input) {\n return input.replace(/\\\\u(\\w\\w\\w\\w)/g,function(a,b) {\n var charcode = parseInt(b,16);\n return String.fromCharCode(charcode);\n });\n \n }", "title": "" }, { "docid": "0887c101e9d8f2664af9d3496321fb15", "score": "0.65902776", "text": "cleanTextSpecialChars(text) {\n return he\n .decode(text)\n .replace(/[\\u2018\\u2019]/g, \"'\")\n .replace(/[\\u201C\\u201D]/g, '\"')\n .replace(/[\\u2013\\u2014]/g, '-')\n .replace(/[\\u2026]/g, '...')\n }", "title": "" }, { "docid": "a02641880bdfe759ac818f3b7a54854d", "score": "0.6587704", "text": "function replaceUtf(str){\n\tstr = findAndReplace(str, \"+\", \" \");\n\t//Add the rest of the UTF-8 replacements below...\n\tstr = findAndReplace(str, \"%40\", \"@\");\n\treturn str;\n}", "title": "" }, { "docid": "30f944430cc25fa947fa956b536014d2", "score": "0.6540378", "text": "function replaceEmojis(text, replacer) {\r\n \tvar unifiedEmojiRanges = [\r\n\t\t '\\ud83c[\\udf00-\\udfff]', // U+1F300 to U+1F3FF\r\n\t\t '\\ud83d[\\udc00-\\ude4f]', // U+1F400 to U+1F64F\r\n\t\t '\\ud83d[\\ude80-\\udeff]' // U+1F680 to U+1F6FF\r\n\t\t];\r\n\t\tvar reg = new RegExp(unifiedEmojiRanges.join('|'), 'g');\r\n\t\treturn text.replace(reg, replacer);\r\n }", "title": "" }, { "docid": "ba085d2f555b97586c64cb3e272aaf18", "score": "0.64655703", "text": "function formatEmoji(unicode) {\n let bare = unicode.split(\" \")[0].substr(2); //discard 2 first letters\n return \"&#x\" + bare + \";\";\n}", "title": "" }, { "docid": "785bb9c1624e00c5934afc19b5b2bcb9", "score": "0.6404205", "text": "function D(e){var t=\"\\xa0\",n=/([\\xab\\xbf\\xa1]) /g,r=/ ([!?:;.,\\u203d\\xbb])/g;return e=(e=(e=(e=(e=e.replace(/--/g,\"\\u2014\")).replace(/\\s*\\u2014\\s*/g,\"\\u2009\\u2014\\u2009\")).replace(/\\.\\.\\./g,\"\\u2026\")).replace(n,\"$1\"+t)).replace(r,t+\"$1\")}", "title": "" }, { "docid": "a42bce7a2a23675a532f25b6000c5bde", "score": "0.6388667", "text": "encodeOldStyleChars(str){\n \n return str.replace(/\\[/g,'&#91;');\n \n }", "title": "" }, { "docid": "38be478bfd6eb74ed898e43f5802fbc6", "score": "0.6260201", "text": "function stringUnicode(str){\n str = str.replace(' ','\\u00a0');//espacio sin separación.\n str = str.replace('¡','\\u00a1');//signo de apertura de exclamación.\n str = str.replace('¢','\\u00a2');//signo de centavo.\n str = str.replace('£','\\u00a3');//signo de Libra Esterlina.\n str = str.replace('¤','\\u00a4');//signo de divisa general.\n str = str.replace('¥','\\u00a5');//signo de yen.\n str = str.replace('¦','\\u00a6');//barra vertical partida.\n str = str.replace('§','\\u00a7');//signo de sección.\n str = str.replace('¨','\\u00a8');//diéresis - umlaut.\n str = str.replace('©','\\u00a9');//signo de derechos de autor - copyright.\n str = str.replace('ª','\\u00aa');//género feminino - indicador ordinal f.\n str = str.replace('«','\\u00ab');//comillas anguladas de apertura.\n str = str.replace('¬','\\u00ac');//signo de no - símbolo lógico.\n str = str.replace('®','\\u00ae');//signo de marca registrada.\n str = str.replace('¯','\\u00af');//macrón - raya alta.\n str = str.replace('°','\\u00b0');//signo de grado.\n str = str.replace('±','\\u00b1');//signo de más o menos.\n str = str.replace('²','\\u00b2');//superíndice dos - cuadrado.\n str = str.replace('³','\\u00b3');//superíndice tres - cúbico.\n str = str.replace('´','\\u00b4');//acento agudo - agudo espaciado.\n str = str.replace('µ','\\u00b5');//signo de micro.\n str = str.replace('¶','\\u00b6');//signo de fin de párrafo.\n str = str.replace('·','\\u00b7');//punto medio - coma Georgiana.\n str = str.replace('¸','\\u00b8');//cedilla.\n str = str.replace('¹','\\u00b9');//superíndice uno.\n str = str.replace('º','\\u00ba');//género masculino - indicador ordinal m.\n str = str.replace('»','\\u00bb');//comillas anguladas de cierre.\n str = str.replace('¼','\\u00bc');//fracción un cuarto.\n str = str.replace('½','\\u00bd');//fracción medio - mitad.\n str = str.replace('¾','\\u00be');//fracción tres cuartos.\n str = str.replace('¿','\\u00bf');//signo de interrogación - apertura.\n str = str.replace('À','\\u00c0');//A mayúscula con acento grave.\n str = str.replace('Á','\\u00c1');//A mayúscula con acento agudo.\n str = str.replace('Â','\\u00c2');//A mayúscula con acento circunflejo.\n str = str.replace('Ã','\\u00c3');//A mayúscula con tilde.\n str = str.replace('Ä','\\u00c4');//A mayúscula con diéresis.\n str = str.replace('Å','\\u00c5');//A mayúscula con anillo.\n str = str.replace('Æ','\\u00c6');//diptongo AE mayúscula (ligadura).\n str = str.replace('Ç','\\u00c7');//C cedilla mayúscula.\n str = str.replace('È','\\u00c8');//E mayúscula con acento grave.\n str = str.replace('É','\\u00c9');//E mayúscula con acento agudo.\n str = str.replace('Ê','\\u00ca');//E mayúscula con acento circunflejo.\n str = str.replace('Ë','\\u00cb');//E mayúscula con diéresis.\n str = str.replace('Ì','\\u00cc');//I mayúscula con acento grave.\n str = str.replace('Í','\\u00cd');//I mayúscula con acento agudo.\n str = str.replace('Î','\\u00ce');//I mayúscula con acento circunflejo.\n str = str.replace('Ï','\\u00cf');//I mayúscula con diéresis.\n str = str.replace('Ð','\\u00d0');//ETH islandesa mayúscula.\n str = str.replace('Ñ','\\u00d1');//N mayúscula con tilde - eñe.\n str = str.replace('Ò','\\u00d2');//O mayúscula con acento grave.\n str = str.replace('Ó','\\u00d3');//O mayúscula con acento agudo.\n str = str.replace('Ô','\\u00d4');//O mayúscula con acento circunflejo.\n str = str.replace('Õ','\\u00d5');//O mayúscula con tilde.\n str = str.replace('Ö','\\u00d6');//O mayúscula con diéresis.\n str = str.replace('×','\\u00d7');//signo de multiplicación.\n str = str.replace('Ø','\\u00d8');//O mayúscula with slash.\n str = str.replace('Ù','\\u00d9');//U mayúscula con acento grave.\n str = str.replace('Ú','\\u00da');//U mayúscula con acento agudo.\n str = str.replace('Û','\\u00db');//U mayúscula con acento circunflejo.\n str = str.replace('Ü','\\u00dc');//U mayúscula con diéresis.\n str = str.replace('Ý','\\u00dd');//Y mayúscula con acento agudo.\n str = str.replace('Þ','\\u00de');//THORN islandesa mayúscula.\n str = str.replace('ß','\\u00df');//s minúscula (alemán) - Beta minúscula.\n str = str.replace('à','\\u00e0');//a minúscula con acento grave.\n str = str.replace('á','\\u00e1');//a minúscula con acento agudo.\n str = str.replace('â','\\u00e2');//a minúscula con acento circunflejo.\n str = str.replace('ã','\\u00e3');//a minúscula con tilde.\n str = str.replace('ä','\\u00e4');//a minúscula con diéresis.\n str = str.replace('å','\\u00e5');//a minúscula con anillo.\n str = str.replace('æ','\\u00e6');//diptongo ae minúscula (ligadura).\n str = str.replace('ç','\\u00e7');//c cedilla minúscula.\n str = str.replace('è','\\u00e8');//e minúscula con acento grave.\n str = str.replace('é','\\u00e9');//e minúscula con acento agudo.\n str = str.replace('ê','\\u00ea');//e minúscula con acento circunflejo.\n str = str.replace('ë','\\u00eb');//e minúscula con diéresis.\n str = str.replace('ì','\\u00ec');//i minúscula con acento grave.\n str = str.replace('í','\\u00ed');//i minúscula con acento agudo.\n str = str.replace('î','\\u00ee');//i minúscula con acento circunflejo.\n str = str.replace('ï','\\u00ef');//i minúscula con diéresis.\n str = str.replace('ð','\\u00f0');//eth islandesa minúscula.\n str = str.replace('ñ','\\u00f1');//eñe minúscula - n minúscula con tilde.\n str = str.replace('ò','\\u00f2');//o minúscula con acento grave.\n str = str.replace('ó','\\u00f3');//o minúscula con acento agudo.\n str = str.replace('ô','\\u00f4');//o minúscula con acento circunflejo.\n str = str.replace('õ','\\u00f5');//o minúscula con tilde.\n str = str.replace('ö','\\u00f6');//o minúscula con diéresis.\n str = str.replace('÷','\\u00f7');//signo de división.\n str = str.replace('ø','\\u00f8');//o barrada minúscula.\n str = str.replace('ù','\\u00f9');//u minúscula con acento grave.\n str = str.replace('ú','\\u00fa');//u minúscula con acento agudo.\n str = str.replace('û','\\u00fb');//u minúscula con acento circunflejo.\n str = str.replace('ü','\\u00fc');//u minúscula con diéresis.\n str = str.replace('ý','\\u00fd');//y minúscula con acento agudo.\n str = str.replace('þ','\\u00fe');//thorn islandesa minúscula.\n str = str.replace('ÿ','\\u00ff');//y minúscula con diéresis.\n str = str.replace('Œ','\\u0152');//OE mayúscula (ligadura).\n str = str.replace('œ','\\u0153');//oe minúscula (ligadura).\n str = str.replace('Š','\\u0160');//S mayúscula con caron.\n str = str.replace('š','\\u0161');//s minúscula con caron - acento hacek.\n str = str.replace('Ÿ','\\u0178');//Y mayúscula con diéresis.\n str = str.replace('ƒ','\\u0192');//f minúscula itálica - signo de función.\n str = str.replace('–','\\u2013');//raya corta.\n str = str.replace('——','\\u2014');//raya larga.\n str = str.replace('‘','\\u2018');//comilla izquierda - citación.\n str = str.replace('’','\\u2019');//comilla derecha - citación.\n str = str.replace('‚','\\u201a');//comilla de citación - baja.\n str = str.replace('“','\\u201c');//comillas de citación - arriba izquierda.\n str = str.replace('”','\\u201d');//comillas de citación - arriba derecha.\n str = str.replace('„','\\u201e');//comillas de citación - abajo.\n str = str.replace('†','\\u2020');//cruz.\n str = str.replace('‡','\\u2021');//doble cruz.\n str = str.replace('•','\\u2022');//viñeta - bullet.\n str = str.replace('…','\\u2026');//puntos suspensivos.\n str = str.replace('‰','\\u2030');//signo de pro mil.\n str = str.replace('€','\\u20ac');//signo de euro.\n str = str.replace('™','\\u2122');//signo de marca registrada - trade mark.\n\n return str;//Regresa la cadena codificada con unicode.\n}", "title": "" }, { "docid": "8c2cbaa5e6582e2c1ec5b60c3e6df0b1", "score": "0.624383", "text": "function removeInvalidUnicode(str) {\n return str.replace(/[\\uD800-\\uDFFF]/g, (chr, pos) => {\n if (chr.charCodeAt(0) <= 0xdbff) {\n return pos < str.length && str.charCodeAt(pos + 1) >= 0xdc00 && str.charCodeAt(pos + 1) <= 0xdfff ? chr : '\\uFFFD';\n } else {\n return pos > 0 && str.charCodeAt(pos - 1) >= 0xd800 && str.charCodeAt(pos - 1) <= 0xdbff ? chr : '\\uFFFD';\n }\n });\n}", "title": "" }, { "docid": "dfd6dccadc1486e10a83995235e18519", "score": "0.62149084", "text": "function u(e){return/[\\u0080-\\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}", "title": "" }, { "docid": "925fa062892c35f8bda72ee0559a1727", "score": "0.6192501", "text": "function replaceEscapeSequences(string) {\n return string\n .replace(/[\\b]/g, \"\\\\b\")\n .replace(/\\f/g, \"\\\\f\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\v/g, \"\\\\v\")\n .replace(\n /[\\x00-\\x1f\\x7f-\\x9f]/g,\n (c) => \"\\\\x\" + c.charCodeAt(0).toString(16).padStart(2, \"0\"),\n );\n }", "title": "" }, { "docid": "dea67a4f950fee3f1925d8b4f0fec4cd", "score": "0.61498934", "text": "_unescape(item) {\n let invalid = false;\n const replaced = item.replace(escapeSequence, (sequence, unicode4, unicode8, escapedChar) => {\n // 4-digit unicode character\n if (typeof unicode4 === 'string') return String.fromCharCode(Number.parseInt(unicode4, 16)); // 8-digit unicode character\n\n if (typeof unicode8 === 'string') {\n let charCode = Number.parseInt(unicode8, 16);\n return charCode <= 0xFFFF ? String.fromCharCode(Number.parseInt(unicode8, 16)) : String.fromCharCode(0xD800 + ((charCode -= 0x10000) >> 10), 0xDC00 + (charCode & 0x3FF));\n } // fixed escape sequence\n\n\n if (escapedChar in escapeReplacements) return escapeReplacements[escapedChar]; // invalid escape sequence\n\n invalid = true;\n return '';\n });\n return invalid ? null : replaced;\n }", "title": "" }, { "docid": "056e217e3c497a80bea0d421002c0380", "score": "0.61409175", "text": "function convertSpecialCharacters(str) {\n str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, \"a\");\n str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, \"e\");\n str = str.replace(/ì|í|ị|ỉ|ĩ/g, \"i\");\n str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, \"o\");\n str = str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, \"u\");\n str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g, \"y\");\n str = str.replace(/đ/g, \"d\");\n str = str.replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g, \"A\");\n str = str.replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g, \"E\");\n str = str.replace(/Ì|Í|Ị|Ỉ|Ĩ/g, \"I\");\n str = str.replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g, \"O\");\n str = str.replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g, \"U\");\n str = str.replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g, \"Y\");\n str = str.replace(/Đ/g, \"D\");\n return str;\n }", "title": "" }, { "docid": "403d724696a1aa0c4ea4f85754676c87", "score": "0.6130081", "text": "function uni2ent(srcTxt) {\r\n var entTxt = '';\r\n\r\nvar logTxt = '';\r\n var c, hi, lo;\r\n var len = 0;\r\n for (var i=0, code; code=srcTxt.charCodeAt(i); i++) {\r\n var rawChar = srcTxt.charAt(i);\r\n if (code > 255) {\r\n // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single characters)\r\n if (0xD800 <= code && code <= 0xDBFF) {\r\n hi = code;\r\n lo = srcTxt.charCodeAt(i+1);\r\n code = ((hi - 0xD800) * 0x400) + (lo - 0xDC00) + 0x10000;\r\n i++;\r\n rawChar += srcTxt.charAt(i+1);\r\n }\r\n // Low surrogate\r\n else if (0xDC00 <= code && code <= 0xDFFF) {\r\n hi = srcTxt.charCodeAt(i-1);\r\n lo = code;\r\n code = ((hi - 0xD800) * 0x400) + (lo - 0xDC00) + 0x10000;\r\n rawChar = srcTxt.charAt(i-1) + rawChar;\r\n }\r\n c = \"&#x\" + code.toString(16).toUpperCase() + \";\";\r\n\r\nlogTxt += ' Char['+rawChar+'] --> Entity['+c+']\\n';\r\n }\r\n else {\r\n c = srcTxt.charAt(i);\r\n }\r\n entTxt += c;\r\n len++;\r\n }\r\n\r\nif (logTxt != '') {\r\n GM_log('UNICODE CHANGES:\\n' + logTxt + '\\n\\n');\r\n}\r\n\r\n return entTxt;\r\n}", "title": "" }, { "docid": "c85f4b33906d799a0b25f89ea2747baa", "score": "0.61008954", "text": "function escapeCssStrChar(ch) {\n return cssStrChars[ch]\n || (cssStrChars[ch] = '\\\\' + ch.charCodeAt(0).toString(16) + ' ');\n }", "title": "" }, { "docid": "c85f4b33906d799a0b25f89ea2747baa", "score": "0.61008954", "text": "function escapeCssStrChar(ch) {\n return cssStrChars[ch]\n || (cssStrChars[ch] = '\\\\' + ch.charCodeAt(0).toString(16) + ' ');\n }", "title": "" }, { "docid": "254181f99f9967aa87fb5a3122938d0f", "score": "0.607419", "text": "function prepEntities(str) {\n // The regular expression below uses an alternation to look for a surrogate pair _or_\n // a single character that we might want to make an entity out of. The first part of the\n // alternation (the [\\uD800-\\uDBFF][\\uDC00-\\uDFFF] before the |), you want to leave\n // alone, it searches for the surrogates. The second part of the alternation you can\n // adjust as you see fit, depending on how conservative you want to be. The example\n // below uses [\\u0000-\\u001f\\u0080-\\uFFFF], meaning that it will match and convert any\n // character with a value from 0 to 31 (\"control characters\") or above 127 -- e.g., if\n // it's not \"printable ASCII\" (in the old parlance), convert it. That's probably\n // overkill, but you said you wanted to make entities out of things, so... :-)\n return str.replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\u0000-\\u001f\\u0080-\\uFFFF]/g, function(match) {\n var high, low, charValue, rep\n\n // Get the character value, handling surrogate pairs\n if (match.length == 2) {\n // It's a surrogate pair, calculate the Unicode code point\n high = match.charCodeAt(0) - 0xD800;\n low = match.charCodeAt(1) - 0xDC00;\n charValue = (high * 0x400) + low + 0x10000;\n }\n else {\n // Not a surrogate pair, the value *is* the Unicode code point\n charValue = match.charCodeAt(0);\n }\n\n // See if we have a mapping for it\n rep = entityMap[charValue];\n if (!rep) {\n // No, use a numeric entity. Here we brazenly (and possibly mistakenly)\n rep = \"&#\" + charValue + \";\";\n }\n\n // Return replacement\n return rep;\n });\n}", "title": "" }, { "docid": "4f82fe67d4114945a12bdf94ef478577", "score": "0.60488075", "text": "function decodeCssEscape(s) {\n var i = parseInt(s.substring(1), 16);\n // If parseInt didn't find a hex diigt, it returns NaN so return the\n // escaped character.\n // Otherwise, parseInt will stop at the first non-hex digit so there's no\n // need to worry about trailing whitespace.\n if (i > 0xffff) {\n // A supplemental codepoint.\n return i -= 0x10000,\n String.fromCharCode(\n 0xd800 + (i >> 10),\n 0xdc00 + (i & 0x3FF));\n } else if (i == i) {\n return String.fromCharCode(i);\n } else if (s[1] < ' ') {\n // \"a backslash followed by a newline is ignored\".\n return '';\n } else {\n return s[1];\n }\n }", "title": "" }, { "docid": "4f82fe67d4114945a12bdf94ef478577", "score": "0.60488075", "text": "function decodeCssEscape(s) {\n var i = parseInt(s.substring(1), 16);\n // If parseInt didn't find a hex diigt, it returns NaN so return the\n // escaped character.\n // Otherwise, parseInt will stop at the first non-hex digit so there's no\n // need to worry about trailing whitespace.\n if (i > 0xffff) {\n // A supplemental codepoint.\n return i -= 0x10000,\n String.fromCharCode(\n 0xd800 + (i >> 10),\n 0xdc00 + (i & 0x3FF));\n } else if (i == i) {\n return String.fromCharCode(i);\n } else if (s[1] < ' ') {\n // \"a backslash followed by a newline is ignored\".\n return '';\n } else {\n return s[1];\n }\n }", "title": "" }, { "docid": "d69bd70a49016004cc6c18d20175e878", "score": "0.60323554", "text": "function unicodeToChar(text) {\n return text.replace(/\\\\u[\\dA-F]{4}/gi,\n function (match) {\n return String.fromCharCode(parseInt(match.replace(/\\\\u/g, ''), 16));\n });\n}", "title": "" }, { "docid": "0f60a8fa248e48939aaa4cbfc1d76aa0", "score": "0.60288346", "text": "function convertUnicodeString(str) {\r\n\t\tvar convertedText = str.replace(/\\\\u[\\dA-Fa-f]{4}/g, function (unicodeChar) {\r\n\t\t\treturn String.fromCharCode(parseInt(unicodeChar.replace(/\\\\u/g, ''), 16));\r\n\t\t});\r\n\t\treturn convertedText;\r\n\t}", "title": "" }, { "docid": "7e911bc4b225db348e0c77701edf18b7", "score": "0.6018711", "text": "_unescape(item) {\n let invalid = false;\n const replaced = item.replace(escapeSequence, (sequence, unicode4, unicode8, escapedChar) => {\n // 4-digit unicode character\n if (typeof unicode4 === 'string')\n return String.fromCharCode(Number.parseInt(unicode4, 16));\n // 8-digit unicode character\n if (typeof unicode8 === 'string') {\n let charCode = Number.parseInt(unicode8, 16);\n return charCode <= 0xFFFF ? String.fromCharCode(Number.parseInt(unicode8, 16)) :\n String.fromCharCode(0xD800 + ((charCode -= 0x10000) >> 10), 0xDC00 + (charCode & 0x3FF));\n }\n // fixed escape sequence\n if (escapedChar in escapeReplacements)\n return escapeReplacements[escapedChar];\n // invalid escape sequence\n invalid = true;\n return '';\n });\n return invalid ? null : replaced;\n }", "title": "" }, { "docid": "586e7b55474e2509bfb4396bea5b8562", "score": "0.599789", "text": "function escapeCssUrlChar(ch) {\n return cssUrlChars[ch]\n || (cssUrlChars[ch] = (ch < '\\x10' ? '%0' : '%')\n + ch.charCodeAt(0).toString(16));\n }", "title": "" }, { "docid": "586e7b55474e2509bfb4396bea5b8562", "score": "0.599789", "text": "function escapeCssUrlChar(ch) {\n return cssUrlChars[ch]\n || (cssUrlChars[ch] = (ch < '\\x10' ? '%0' : '%')\n + ch.charCodeAt(0).toString(16));\n }", "title": "" }, { "docid": "8b7a71164025d6e33fb050e1b2edc348", "score": "0.5987468", "text": "function replaceSpecialCharactors(str){\n return str.replace(/[\\.\\$\\[\\]\\#\\/]/g, \"_\");\n}", "title": "" }, { "docid": "9cb7f877254f0bb0bc5e8eaa1dccde5c", "score": "0.5948239", "text": "function unicodeify(e) {\n var element = $(e.target),\n text = element.val(),\n caret = element.caret();\n var newtext = text.replace(/(^| )\"/g, '$1“')\n .replace(/([^ ])\"/g, '$1”')\n .replace(/(^| )'/g, '$1‘')\n .replace(/([^ ])'/g, '$1’');\n if (newtext != text) {\n element.val(newtext);\n element.caret(caret);\n }\n}", "title": "" }, { "docid": "29e312eee94e18b82c9cf0adf2b3318f", "score": "0.59381616", "text": "function unicodeLiteral(str)\n{\n var i;\n var result = \"\";\n for( i = 0; i < str.length; ++i) {\n if(str.charCodeAt(i) < 32) {\n result += \"\\\\u\" + fixedHex(str.charCodeAt(i),4);\n } else {\n result += str[i];\n }\n }\n return result;\n}", "title": "" }, { "docid": "b7a0ca3969d3a4a8adc760fb266a5827", "score": "0.5926498", "text": "function surrogateES6 (code) {\n code = toNumber(code)\n if (code < 0x10000) {\n return u(code)\n }\n return '\\\\u{' + code.toString(16).toUpperCase() + '}'\n}", "title": "" }, { "docid": "196f0c91a2b38e4c6484d33205d2218a", "score": "0.5924674", "text": "function normalizeUnicodeCharacters(str) {\n return str.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}", "title": "" }, { "docid": "4c0fbdcb49ed8ad124b1d5db38b4ec55", "score": "0.5916031", "text": "function remove_accent(str) {\n // Mapa de acentos\n var map={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ý':'Y','ß':'s','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ø':'o','ù':'u','ú':'u','û':'u','ü':'u','ý':'y','ÿ':'y','Ā':'A','ā':'a','Ă':'A','ă':'a','Ą':'A','ą':'a','Ć':'C','ć':'c','Ĉ':'C','ĉ':'c','Ċ':'C','ċ':'c','Č':'C','č':'c','Ď':'D','ď':'d','Đ':'D','đ':'d','Ē':'E','ē':'e','Ĕ':'E','ĕ':'e','Ė':'E','ė':'e','Ę':'E','ę':'e','Ě':'E','ě':'e','Ĝ':'G','ĝ':'g','Ğ':'G','ğ':'g','Ġ':'G','ġ':'g','Ģ':'G','ģ':'g','Ĥ':'H','ĥ':'h','Ħ':'H','ħ':'h','Ĩ':'I','ĩ':'i','Ī':'I','ī':'i','Ĭ':'I','ĭ':'i','Į':'I','į':'i','İ':'I','ı':'i','IJ':'IJ','ij':'ij','Ĵ':'J','ĵ':'j','Ķ':'K','ķ':'k','Ĺ':'L','ĺ':'l','Ļ':'L','ļ':'l','Ľ':'L','ľ':'l','Ŀ':'L','ŀ':'l','Ł':'L','ł':'l','Ń':'N','ń':'n','Ņ':'N','ņ':'n','Ň':'N','ň':'n','ʼn':'n','Ō':'O','ō':'o','Ŏ':'O','ŏ':'o','Ő':'O','ő':'o','Œ':'OE','œ':'oe','Ŕ':'R','ŕ':'r','Ŗ':'R','ŗ':'r','Ř':'R','ř':'r','Ś':'S','ś':'s','Ŝ':'S','ŝ':'s','Ş':'S','ş':'s','Š':'S','š':'s','Ţ':'T','ţ':'t','Ť':'T','ť':'t','Ŧ':'T','ŧ':'t','Ũ':'U','ũ':'u','Ū':'U','ū':'u','Ŭ':'U','ŭ':'u','Ů':'U','ů':'u','Ű':'U','ű':'u','Ų':'U','ų':'u','Ŵ':'W','ŵ':'w','Ŷ':'Y','ŷ':'y','Ÿ':'Y','Ź':'Z','ź':'z','Ż':'Z','ż':'z','Ž':'Z','ž':'z','ſ':'s','ƒ':'f','Ơ':'O','ơ':'o','Ư':'U','ư':'u','Ǎ':'A','ǎ':'a','Ǐ':'I','ǐ':'i','Ǒ':'O','ǒ':'o','Ǔ':'U','ǔ':'u','Ǖ':'U','ǖ':'u','Ǘ':'U','ǘ':'u','Ǚ':'U','ǚ':'u','Ǜ':'U','ǜ':'u','Ǻ':'A','ǻ':'a','Ǽ':'AE','ǽ':'ae','Ǿ':'O','ǿ':'o'};\n var res=''; // Variable donde se almacenara la palabre sin acentos\n // Ciclo que recorre cada letra de la palabra\n for (var i=0; i<str.length; i++) {\n c = str.charAt(i); // Captura cada letra de la palabra\n res += map[c] || c; // Guarda la letra procesada y sin acentos\n }\n // Retorna la palabra sin acentos\n return res;\n }", "title": "" }, { "docid": "d617809806ddd333123abb522c8b47b1", "score": "0.5911457", "text": "function yeezyfy() {\n doEmoji(yeezy);\n}", "title": "" }, { "docid": "59a9de3e4290bb2d9bca5bacdd3ed2d7", "score": "0.5894307", "text": "decodeOldstyleChars(str){\n \n return str.replace(/&#91;/g,'[');\n \n }", "title": "" }, { "docid": "394e850b290f40fdb74e5bce04c3604b", "score": "0.58789206", "text": "function unescapeUnicode(str) {\n // unescape unicode codes\n var codes = [];\n var code = parseInt(str.substr(2), 16);\n if (code >= 0 && code < Math.pow(2, 16)) {\n codes.push(code);\n }\n // convert codes to text\n var unescaped = '';\n for (var i = 0; i < codes.length; ++i) {\n unescaped += String.fromCharCode(codes[i]);\n }\n return unescaped;\n}", "title": "" }, { "docid": "037ce98dd84f7c53d19c79a5c9b4fceb", "score": "0.5872935", "text": "function escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}", "title": "" }, { "docid": "037ce98dd84f7c53d19c79a5c9b4fceb", "score": "0.5872935", "text": "function escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}", "title": "" }, { "docid": "037ce98dd84f7c53d19c79a5c9b4fceb", "score": "0.5872935", "text": "function escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}", "title": "" }, { "docid": "037ce98dd84f7c53d19c79a5c9b4fceb", "score": "0.5872935", "text": "function escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}", "title": "" }, { "docid": "037ce98dd84f7c53d19c79a5c9b4fceb", "score": "0.5872935", "text": "function escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}", "title": "" }, { "docid": "4168fbcf8c909b8505bb3e0e3754b061", "score": "0.5867165", "text": "function C2E(str) {\r\n\tstr = str.replace(/&/g, '&#38;');\r\n\tstr = str.replace(/'/g, '&#39;');\r\n\tstr = str.replace(/\"/g, '&#34;');\r\n\tstr = str.replace(/\\\\/g, '&#92;');\r\n\tvar acc = '';\r\n\tfor (var i = 0; i < str.length; i++) {\r\n\t\tif ((str.charCodeAt(i) > 31 && str.charCodeAt(i) < 127)\r\n\t\t\t\t&& str.charAt(i) != '|')\r\n\t\t\tacc += str.charAt(i)\r\n\t\telse\r\n\t\t\tacc += '&#' + str.charCodeAt(i) + ';';\r\n\t}\r\n\treturn acc;\r\n}", "title": "" }, { "docid": "df769a0f4ed2a46bed34f2dcdf669d02", "score": "0.58651674", "text": "function specialCharCleanup(textbox){\n specialchartext = escape($(textbox).val());\n specialchartext = specialchartext.replace(/%u201C/g, \"\\\"\");\n specialchartext = specialchartext.replace(/%u201D/g, \"\\\"\");\n specialchartext = specialchartext.replace(/%u2018/g, \"'\");\n specialchartext = specialchartext.replace(/%u2019/g, \"'\");\n specialchartext = specialchartext.replace(/%u2026/g, \"...\");\n specialchartext = specialchartext.replace(/%u2013/g, \"&ndash;\");\n specialchartext = specialchartext.replace(/%u2014/g, \"&mdash;\");\n specialchartext = specialchartext.replace(/%A9/g, \"&copy;\");\n specialchartext = specialchartext.replace(/%AE/g, \"&reg;\");\n specialchartext = specialchartext.replace(/%u2122/g, \"&trade;\");\n specialchartext = unescape(specialchartext);\n $(textbox).val(specialchartext);\n}", "title": "" }, { "docid": "8bcc51d518c405e9de07a843d057d5aa", "score": "0.58530205", "text": "function drawCharset() {\r\n let chars = \"\"\r\n for (let ch = 0x20; ch <= 0x7F; ch++)\r\n chars += String.fromCharCode(ch)\r\n drawText(21, 0, chars)\r\n}", "title": "" }, { "docid": "19b8156886f52a7cdfcb9391fb4a4906", "score": "0.5852464", "text": "function stripAccent(str)\n{\n var s=str;\n\n var rExps=[ \n /[\\xC0-\\xC2]/g, /[\\xE0-\\xE2]/g,\n /[\\xC8-\\xCA]/g, /[\\xE8-\\xEB]/g,\n /[\\xCC-\\xCE]/g, /[\\xEC-\\xEE]/g,\n /[\\xD2-\\xD4]/g, /[\\xF2-\\xF4]/g,\n /[\\xD9-\\xDB]/g, /[\\xF9-\\xFB]/g, \n /[\\xD1]/g, /[\\xF1]/g ];\n\n var repChar=['A','a','E','e','I','i','O','o','U','u','N','n'];\n\n for(var i=0; i<rExps.length; i++)\n s=s.replace(rExps[i],repChar[i]);\n\n return s;\n}", "title": "" }, { "docid": "f2ff5face9d465704ea18a0392c4ce7e", "score": "0.58282", "text": "function defineRemapTableForWindows1252() {\n\n const remapTable = []\n \n function remap(unicode, windows1252, expected, actual, utf8Bytes) {\n remapTable.push({unicode, windows1252, expected, actual, utf8Bytes})\n }\n\n // Data from: https://www.i18nqa.com/debug/utf8-debug.html\n\n remap(\"U+20AC\", \"0x80\", \"€\", \"€\", \"%E2 %82 %AC\")\n remap(\"U+00C0\", \"0xC0\", \"À\", \"À\", \"%C3 %80\")\n\n remap(\"\", \"0x81\", \"\", \"\", \"\")\n remap(\"U+00C1\", \"0xC1\", \"Á\", \"Ã\", \"%C3 %81\")\n\n remap(\"U+201A\", \"0x82\", \"‚\", \"‚\", \"%E2 %80 %9A\")\n remap(\"U+00C2\", \"0xC2\", \"Â\", \"Â\", \"%C3 %82\")\n\n remap(\"U+0192\", \"0x83\", \"ƒ\", \"Æ’\", \"%C6 %92\")\n remap(\"U+00C3\", \"0xC3\", \"Ã\", \"Ã\", \"%C3 %83\")\n\n remap(\"U+201E\", \"0x84\", \"„\", \"„\", \"%E2 %80 %9E\")\n remap(\"U+00C4\", \"0xC4\", \"Ä\", \"Ä\", \"%C3 %84\")\n\n remap(\"U+2026\", \"0x85\", \"…\", \"…\", \"%E2 %80 %A6\")\n remap(\"U+00C5\", \"0xC5\", \"Å\", \"Ã…\", \"%C3 %85\")\n\n remap(\"U+2020\", \"0x86\", \"†\", \"†\", \"%E2 %80 %A0\")\n remap(\"U+00C6\", \"0xC6\", \"Æ\", \"Æ\", \"%C3 %86\")\n\n remap(\"U+2021\", \"0x87\", \"‡\", \"‡\", \"%E2 %80 %A1\")\n remap(\"U+00C7\", \"0xC7\", \"Ç\", \"Ç\", \"%C3 %87\")\n\n remap(\"U+02C6\", \"0x88\", \"ˆ\", \"ˆ\", \"%CB %86\")\n remap(\"U+00C8\", \"0xC8\", \"È\", \"È\", \"%C3 %88\")\n\n remap(\"U+2030\", \"0x89\", \"‰\", \"‰\", \"%E2 %80 %B0\")\n remap(\"U+00C9\", \"0xC9\", \"É\", \"É\", \"%C3 %89\")\n\n remap(\"U+0160\", \"0x8A\", \"Š\", \"Å \", \"%C5 %A0\")\n remap(\"U+00CA\", \"0xCA\", \"Ê\", \"Ê\", \"%C3 %8A\")\n\n remap(\"U+2039\", \"0x8B\", \"‹\", \"‹\", \"%E2 %80 %B9\")\n remap(\"U+00CB\", \"0xCB\", \"Ë\", \"Ë\", \"%C3 %8B\")\n\n remap(\"U+0152\", \"0x8C\", \"Œ\", \"Å’\", \"%C5 %92\")\n remap(\"U+00CC\", \"0xCC\", \"Ì\", \"ÃŒ\", \"%C3 %8C\")\n\n remap(\"\", \"0x8D\", \"\", \"\", \"\")\n remap(\"U+00CD\", \"0xCD\", \"Í\", \"Ã\", \"%C3 %8D\")\n\n remap(\"U+017D\", \"0x8E\", \"Ž\", \"Ž\", \"%C5 %BD\")\n remap(\"U+00CE\", \"0xCE\", \"Î\", \"ÃŽ\", \"%C3 %8E\")\n\n remap(\"\", \"0x8F\", \"\", \"\", \"\")\n remap(\"U+00CF\", \"0xCF\", \"Ï\", \"Ã\", \"%C3 %8F\")\n\n remap(\"\", \"0x90\", \"\", \"\", \"\")\n remap(\"U+00D0\", \"0xD0\", \"Ð\", \"Ã\", \"%C3 %90\")\n\n remap(\"U+2018\", \"0x91\", \"‘\", \"‘\", \"%E2 %80 %98\")\n remap(\"U+00D1\", \"0xD1\", \"Ñ\", \"Ñ\", \"%C3 %91\")\n\n remap(\"U+2019\", \"0x92\", \"’\", \"’\", \"%E2 %80 %99\")\n remap(\"U+00D2\", \"0xD2\", \"Ò\", \"Ã’\", \"%C3 %92\")\n\n remap(\"U+201C\", \"0x93\", \"“\", \"“\", \"%E2 %80 %9C\")\n remap(\"U+00D3\", \"0xD3\", \"Ó\", \"Ó\", \"%C3 %93\")\n\n remap(\"U+201D\", \"0x94\", \"”\", \"â€\", \"%E2 %80 %9D\")\n remap(\"U+00D4\", \"0xD4\", \"Ô\", \"Ô\", \"%C3 %94\")\n\n remap(\"U+2022\", \"0x95\", \"•\", \"•\", \"%E2 %80 %A2\")\n remap(\"U+00D5\", \"0xD5\", \"Õ\", \"Õ\", \"%C3 %95\")\n\n remap(\"U+2013\", \"0x96\", \"–\", \"–\", \"%E2 %80 %93\")\n remap(\"U+00D6\", \"0xD6\", \"Ö\", \"Ö\", \"%C3 %96\")\n\n remap(\"U+2014\", \"0x97\", \"—\", \"—\", \"%E2 %80 %94\")\n remap(\"U+00D7\", \"0xD7\", \"×\", \"×\", \"%C3 %97\")\n\n remap(\"U+02DC\", \"0x98\", \"˜\", \"Ëœ\", \"%CB %9C\")\n remap(\"U+00D8\", \"0xD8\", \"Ø\", \"Ø\", \"%C3 %98\")\n\n remap(\"U+2122\", \"0x99\", \"™\", \"â„¢\", \"%E2 %84 %A2\")\n remap(\"U+00D9\", \"0xD9\", \"Ù\", \"Ù\", \"%C3 %99\")\n\n remap(\"U+0161\", \"0x9A\", \"š\", \"Å¡\", \"%C5 %A1\")\n remap(\"U+00DA\", \"0xDA\", \"Ú\", \"Ú\", \"%C3 %9A\")\n\n remap(\"U+203A\", \"0x9B\", \"›\", \"›\", \"%E2 %80 %BA\")\n remap(\"U+00DB\", \"0xDB\", \"Û\", \"Û\", \"%C3 %9B\")\n\n remap(\"U+0153\", \"0x9C\", \"œ\", \"Å“\", \"%C5 %93\")\n remap(\"U+00DC\", \"0xDC\", \"Ü\", \"Ü\", \"%C3 %9C\")\n\n remap(\"\", \"0x9D\", \"\", \"\", \"\")\n remap(\"U+00DD\", \"0xDD\", \"Ý\", \"Ã\", \"%C3 %9D\")\n\n remap(\"U+017E\", \"0x9E\", \"ž\", \"ž\", \"%C5 %BE\")\n remap(\"U+00DE\", \"0xDE\", \"Þ\", \"Þ\", \"%C3 %9E\")\n\n remap(\"U+0178\", \"0x9F\", \"Ÿ\", \"Ÿ\", \"%C5 %B8\")\n remap(\"U+00DF\", \"0xDF\", \"ß\", \"ß\", \"%C3 %9F\")\n\n remap(\"U+00A0\", \"0xA0\", \"\", \" \", \"%C2 %A0\")\n remap(\"U+00E0\", \"0xE0\", \"à\", \"à \", \"%C3 %A0\")\n\n remap(\"U+00A1\", \"0xA1\", \"¡\", \"¡\", \"%C2 %A1\")\n remap(\"U+00E1\", \"0xE1\", \"á\", \"á\", \"%C3 %A1\")\n\n remap(\"U+00A2\", \"0xA2\", \"¢\", \"¢\", \"%C2 %A2\")\n remap(\"U+00E2\", \"0xE2\", \"â\", \"â\", \"%C3 %A2\")\n\n remap(\"U+00A3\", \"0xA3\", \"£\", \"£\", \"%C2 %A3\")\n remap(\"U+00E3\", \"0xE3\", \"ã\", \"ã\", \"%C3 %A3\")\n\n remap(\"U+00A4\", \"0xA4\", \"¤\", \"¤\", \"%C2 %A4\")\n remap(\"U+00E4\", \"0xE4\", \"ä\", \"ä\", \"%C3 %A4\")\n\n remap(\"U+00A5\", \"0xA5\", \"¥\", \"Â¥\", \"%C2 %A5\")\n remap(\"U+00E5\", \"0xE5\", \"å\", \"Ã¥\", \"%C3 %A5\")\n\n remap(\"U+00A6\", \"0xA6\", \"¦\", \"¦\", \"%C2 %A6\")\n remap(\"U+00E6\", \"0xE6\", \"æ\", \"æ\", \"%C3 %A6\")\n\n remap(\"U+00A7\", \"0xA7\", \"§\", \"§\", \"%C2 %A7\")\n remap(\"U+00E7\", \"0xE7\", \"ç\", \"ç\", \"%C3 %A7\")\n\n remap(\"U+00A8\", \"0xA8\", \"¨\", \"¨\", \"%C2 %A8\")\n remap(\"U+00E8\", \"0xE8\", \"è\", \"è\", \"%C3 %A8\")\n\n remap(\"U+00A9\", \"0xA9\", \"©\", \"©\", \"%C2 %A9\")\n remap(\"U+00E9\", \"0xE9\", \"é\", \"é\", \"%C3 %A9\")\n\n remap(\"U+00AA\", \"0xAA\", \"ª\", \"ª\", \"%C2 %AA\")\n remap(\"U+00EA\", \"0xEA\", \"ê\", \"ê\", \"%C3 %AA\")\n\n remap(\"U+00AB\", \"0xAB\", \"«\", \"«\", \"%C2 %AB\")\n remap(\"U+00EB\", \"0xEB\", \"ë\", \"ë\", \"%C3 %AB\")\n\n remap(\"U+00AC\", \"0xAC\", \"¬\", \"¬\", \"%C2 %AC\")\n remap(\"U+00EC\", \"0xEC\", \"ì\", \"ì\", \"%C3 %AC\")\n\n remap(\"U+00AD\", \"0xAD\", \"­\", \"­\", \"%C2 %AD\")\n remap(\"U+00ED\", \"0xED\", \"í\", \"í\", \"%C3 %AD\")\n\n remap(\"U+00AE\", \"0xAE\", \"®\", \"®\", \"%C2 %AE\")\n remap(\"U+00EE\", \"0xEE\", \"î\", \"î\", \"%C3 %AE\")\n\n remap(\"U+00AF\", \"0xAF\", \"¯\", \"¯\", \"%C2 %AF\")\n remap(\"U+00EF\", \"0xEF\", \"ï\", \"ï\", \"%C3 %AF\")\n\n remap(\"U+00B0\", \"0xB0\", \"°\", \"°\", \"%C2 %B0\")\n remap(\"U+00F0\", \"0xF0\", \"ð\", \"ð\", \"%C3 %B0\")\n\n remap(\"U+00B1\", \"0xB1\", \"±\", \"±\", \"%C2 %B1\")\n remap(\"U+00F1\", \"0xF1\", \"ñ\", \"ñ\", \"%C3 %B1\")\n\n remap(\"U+00B2\", \"0xB2\", \"²\", \"²\", \"%C2 %B2\")\n remap(\"U+00F2\", \"0xF2\", \"ò\", \"ò\", \"%C3 %B2\")\n\n remap(\"U+00B3\", \"0xB3\", \"³\", \"³\", \"%C2 %B3\")\n remap(\"U+00F3\", \"0xF3\", \"ó\", \"ó\", \"%C3 %B3\")\n\n remap(\"U+00B4\", \"0xB4\", \"´\", \"´\", \"%C2 %B4\")\n remap(\"U+00F4\", \"0xF4\", \"ô\", \"ô\", \"%C3 %B4\")\n\n remap(\"U+00B5\", \"0xB5\", \"µ\", \"µ\", \"%C2 %B5\")\n remap(\"U+00F5\", \"0xF5\", \"õ\", \"õ\", \"%C3 %B5\")\n\n remap(\"U+00B6\", \"0xB6\", \"¶\", \"¶\", \"%C2 %B6\")\n remap(\"U+00F6\", \"0xF6\", \"ö\", \"ö\", \"%C3 %B6\")\n\n remap(\"U+00B7\", \"0xB7\", \"·\", \"·\", \"%C2 %B7\")\n remap(\"U+00F7\", \"0xF7\", \"÷\", \"÷\", \"%C3 %B7\")\n\n remap(\"U+00B8\", \"0xB8\", \"¸\", \"¸\", \"%C2 %B8\")\n remap(\"U+00F8\", \"0xF8\", \"ø\", \"ø\", \"%C3 %B8\")\n\n remap(\"U+00B9\", \"0xB9\", \"¹\", \"¹\", \"%C2 %B9\")\n remap(\"U+00F9\", \"0xF9\", \"ù\", \"ù\", \"%C3 %B9\")\n\n remap(\"U+00BA\", \"0xBA\", \"º\", \"º\", \"%C2 %BA\")\n remap(\"U+00FA\", \"0xFA\", \"ú\", \"ú\", \"%C3 %BA\")\n\n remap(\"U+00BB\", \"0xBB\", \"»\", \"»\", \"%C2 %BB\")\n remap(\"U+00FB\", \"0xFB\", \"û\", \"û\", \"%C3 %BB\")\n\n remap(\"U+00BC\", \"0xBC\", \"¼\", \"¼\", \"%C2 %BC\")\n remap(\"U+00FC\", \"0xFC\", \"ü\", \"ü\", \"%C3 %BC\")\n\n remap(\"U+00BD\", \"0xBD\", \"½\", \"½\", \"%C2 %BD\")\n remap(\"U+00FD\", \"0xFD\", \"ý\", \"ý\", \"%C3 %BD\")\n\n remap(\"U+00BE\", \"0xBE\", \"¾\", \"¾\", \"%C2 %BE\")\n remap(\"U+00FE\", \"0xFE\", \"þ\", \"þ\", \"%C3 %BE\")\n\n remap(\"U+00BF\", \"0xBF\", \"¿\", \"¿\", \"%C2 %BF\")\n remap(\"U+00FF\", \"0xFF\", \"ÿ\", \"ÿ\", \"%C3 %BF\")\n\n return remapTable\n}", "title": "" }, { "docid": "24b8099f251b096d3892eabff2c02d56", "score": "0.5825505", "text": "function replaceAccentChars(s) {\n var r = s.toLowerCase();\n r = r.replace(new RegExp(/[àáâãäå]/g), 'a');\n r = r.replace(new RegExp(/æ/g), 'ae');\n r = r.replace(new RegExp(/ç/g), 'c');\n r = r.replace(new RegExp(/[èéêë]/g), 'e');\n r = r.replace(new RegExp(/[ìíîï]/g), 'i');\n r = r.replace(new RegExp(/ñ/g), 'n');\n r = r.replace(new RegExp(/[òóôõö]/g), 'o');\n r = r.replace(new RegExp(/œ/g), 'oe');\n r = r.replace(new RegExp(/[ùúûü]/g), 'u');\n r = r.replace(new RegExp(/[ýÿ]/g), 'y');\n return r;\n }", "title": "" }, { "docid": "94f9dd555f33f8da2787fe6f99d07cdc", "score": "0.58200884", "text": "function fw24h_replace_bad_char(string) {\n\tstring = string.replace('&', '&#38;');\n\tstring = string.replace('<', '&lt;');\n\tstring = string.replace('>', '&gt;');\n\tstring = string.replace('\"', '&#34;');\n\tstring = string.replace(\"'\", '&#39;');\n\tstring = string.replace('\\\\', '&#92;');\n\tstring = string.replace('=', '&#61;');\n\tstring = string.replace('(', '&#40;');\n\tstring = string.replace(')', '&#41;');\n\tstring = string.replace(\"-\", '&#45;');\n\tstring = string.replace(\"|\", '&#124;');\n\n\treturn string;\n}", "title": "" }, { "docid": "94f9dd555f33f8da2787fe6f99d07cdc", "score": "0.58200884", "text": "function fw24h_replace_bad_char(string) {\n\tstring = string.replace('&', '&#38;');\n\tstring = string.replace('<', '&lt;');\n\tstring = string.replace('>', '&gt;');\n\tstring = string.replace('\"', '&#34;');\n\tstring = string.replace(\"'\", '&#39;');\n\tstring = string.replace('\\\\', '&#92;');\n\tstring = string.replace('=', '&#61;');\n\tstring = string.replace('(', '&#40;');\n\tstring = string.replace(')', '&#41;');\n\tstring = string.replace(\"-\", '&#45;');\n\tstring = string.replace(\"|\", '&#124;');\n\n\treturn string;\n}", "title": "" }, { "docid": "3a0837c9052b4dd24b20619151f83161", "score": "0.58111894", "text": "function escapeUnicodeForSwiftype(str) {\n var result = '';\n\n for (var index = 0; index < str.length; index++) {\n // only convert to unicode escape sequence if the character is not ASCII\n if (str[index].charCodeAt(0) > 127) {\n result += escapeUnicode(str[index]);\n } else {\n result += str[index];\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "19b4e818883051d74cb727ad5536bde0", "score": "0.5806103", "text": "function cleanup_zwj(inputText) {\r\n return inputText.replace(/\\u200C|\\u200D/g, '');\r\n}", "title": "" }, { "docid": "03a39aec67ab089641e2ad60673e8cc8", "score": "0.5775116", "text": "function fixEscapeSequences(str) {\n /* \n * Sometimes Youtube uses '\\U' which should be '\\u'. So try to replace any invalid \n * escape sequences with their lowercase versions first.\n */\n var re = /[^\\\\](\\\\[^\"\\/\\\\bfnrtu])/g;\n return str.replace(re, function(m) {\n if(!re.test(m.toLowerCase()))\n return (m[0] + m.substring(1).toLowerCase());\n else\n return (m[0] + \"\");\n });\n}", "title": "" }, { "docid": "0e534c6fe075ef281fec24066a6a78a6", "score": "0.5766765", "text": "function replace_chars(str){\n\t\t/*obj with words to replace*/\n\t\tvar chars = {\n\t\t\t\"&aacute;\" : \"á\",\n\t\t\t\"&eacute;\" : \"é\",\n\t\t\t\"&iacute;\" : \"í\",\n\t\t\t\"&oacute;\" : \"ó\",\n\t\t\t\"&uacute;\" : \"ú\",\n\t\t\t\"&ntilde;\" : \"ñ\"\n\t\t}\n\t\tfor(c in chars){\n\t\t\tstr = str.replace(new RegExp(c.replace(), 'g'), chars[c]);\n\t\t}\n\t\treturn str;\n\t}", "title": "" }, { "docid": "3fb7f5fb55ffac10cd66833a903263a6", "score": "0.5758237", "text": "function unescapeSpecialChars(text) {\n // Swap back in all the special characters we've hidden.\n text = text.replace(/~E(\\d+)E/g, function(wholeMatch, m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n });\n return text;\n }", "title": "" }, { "docid": "bc977a9b1bbe96ece0c819ebc848341e", "score": "0.5753537", "text": "renderEmojis(text) {\n return text.replace(/{[^}]+?}/ig, match => {\n const code = match.replace(/[^a-z0-9]/ig,'').toLowerCase();\n return this.manamojis[code] ? '<:'+(code.length < 2 ? code+'_':code)+':'+this.manamojis[code]+'>':'';\n });\n }", "title": "" }, { "docid": "e5eb63b50fff37da7186059dbbb95e5d", "score": "0.57508117", "text": "function make_unicode(data) {\r\n var table = { 13: '\\r' }, // New line conversion\r\n reverse = { 13: 13 }, i = 0;\r\n while (i < data.length) {\r\n table[155 + i] = String.fromCharCode(data[i]);\r\n reverse[data[i]] = 155 + i++;\r\n }\r\n i = 32;\r\n while (i < 127) {\r\n table[i] = String.fromCharCode(i);\r\n reverse[i] = i++;\r\n }\r\n self.unicode_table = table;\r\n self.reverse_unicode_table = reverse;\r\n }", "title": "" }, { "docid": "3f8b7630ddb11e8d17ad9eac22673420", "score": "0.57405967", "text": "function search_text1(text) {\n var s2 = String.fromCharCode(176);\n return text.replace('0C', s2)\n // });\n\n }", "title": "" }, { "docid": "39cdf24c49d8135d6f0b68d3a8aa6acb", "score": "0.5735504", "text": "function convertRawTextToSafeText(str) {\n var toChange = findIllegalChars(str);\n for(var i = toChange.length-1; i >= 0; i--) {\n \t\t$(\"#t\").append(i + \" \" + toChange[i]);\n var badChar = str.charAt(toChange[i]);\n var newChar = getIllegalReplacement(badChar);\n str = stringReplaceAt(str, toChange[i], newChar);\n }\n str = addLineBreaks(str);\n return str;\n}", "title": "" }, { "docid": "e39f24d39fae49d836d8d693df67a743", "score": "0.57151395", "text": "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n .replace(/\\u0000/g, '\\u0001\\u0001');\n}", "title": "" }, { "docid": "e39f24d39fae49d836d8d693df67a743", "score": "0.57151395", "text": "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n .replace(/\\u0000/g, '\\u0001\\u0001');\n}", "title": "" }, { "docid": "e39f24d39fae49d836d8d693df67a743", "score": "0.57151395", "text": "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n .replace(/\\u0000/g, '\\u0001\\u0001');\n}", "title": "" }, { "docid": "e39f24d39fae49d836d8d693df67a743", "score": "0.57151395", "text": "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n .replace(/\\u0000/g, '\\u0001\\u0001');\n}", "title": "" }, { "docid": "e39f24d39fae49d836d8d693df67a743", "score": "0.57151395", "text": "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n .replace(/\\u0000/g, '\\u0001\\u0001');\n}", "title": "" }, { "docid": "253ad7700c02222e342be43a925091fb", "score": "0.5707437", "text": "function interpretEscapes(str) {\n const escapes = {\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n };\n return str.replace(/\\\\(u[0-9a-fA-F]{4}|[^u])/, function(_, escape) {\n const type = escape.charAt(0);\n const hex = escape.slice(1);\n if (type === 'u') return String.fromCharCode(parseInt(hex, 16));\n if (escapes.hasOwnProperty(type)) return escapes[type];\n return type;\n });\n}", "title": "" }, { "docid": "415933b8858a9ad9da6d440c4e94d758", "score": "0.570081", "text": "function replaceFontChar( codeAry , mapLine ){\n //ss = \"\";\n var fontAry = new Array();\n fontAry = mapLine.split( fontmapSep1 ); // 切割字串\n if( fontAry.length<4 ){\n return;\n }\n var fontName = fontAry[0]; // 字體名稱\n var replSymStart = fontAry[1]; // 前符\n var replSymEnd = fontAry[2]; // 後符\n var replSymAry = new Array(); // 替換文字陣列\n replSymAry = fontAry[3].split( fontmapSep2 );\n //ss += fontName + replSymStart + replSymEnd + replSymAry + \"\\n\";\n //writeStrToFile( ss , txtFileName );\n \n if( checkFontExist(fontName) == false ){ // 該指定字體在文件中不存在\n //alert( fontName + \" 不存在\" );\n return false;\n }\n\n //尋找字體\n //ss += fontName + \" \\n\"\n for( v1=0 ; v1<replSymAry.length ; v1++ ){\n app.findTextPreferences = NothingEnum.nothing;\n app.changeTextPreferences = NothingEnum.nothing;\n with ( app.findTextPreferences ){\n appliedFont = fontName;\n findWhat = codeAry[v1];\n } \n var objs = inDoc.findText(); // 找到物件\n //ss += \" \" + codeAry[v1] + \" 數量:\" + objs.length + \"\\n\";\n for( v2=objs.length-1 ; v2>=0 ; v2-- ){\n //ss += \" find Object: \" + objs[v2].contents.toString() + \"\\n\";\n objs[v2].appliedFont = \"新細明體\";\n if( replSymAry[v1]!=\"\" ){\n objs[v2].contents = replSymStart + replSymAry[v1].toString() + replSymEnd; // 替換內容\n }else{\n //對應替換字若為空,表示不替換原字碼\n objs[v2].contents = replSymStart +codeAry[v1].toString() + replSymEnd; // 只加前後符\n } \n }\n }\n //writeStrToFile( ss , txtFileName );\n}", "title": "" }, { "docid": "da44dc499ef48a36f6304918138f883a", "score": "0.5700698", "text": "function unicodeEscape(string) {\n\n function padWithLeadingZeros(string) {\n return new Array(5 - string.length).join(\"0\") + string;\n }\n\n function unicodeCharEscape(charCode) {\n return \"\\\\u\" + padWithLeadingZeros(charCode.toString(16));\n }\n return string.split(\"\")\n .map(function (char) {\n var charCode = char.charCodeAt(0);\n return charCode > 127 ? unicodeCharEscape(charCode) : char;\n })\n .join(\"\");\n }", "title": "" }, { "docid": "70080dbb37f6414b54833e9fbbe54f90", "score": "0.570043", "text": "function escapeBlob(str) {\n\t return str\n\t .replace(/\\u0002/g, '\\u0002\\u0002')\n\t .replace(/\\u0001/g, '\\u0001\\u0002')\n\t .replace(/\\u0000/g, '\\u0001\\u0001');\n\t}", "title": "" }, { "docid": "b9bfe32a1250a267b63622060b34f981", "score": "0.5699903", "text": "function fromUnicodeLiteral(str)\n{\n var r = /\\\\u([\\d\\w]{4})/gi;\n str = str.replace(r, function (match, grp) {\n return String.fromCharCode(parseInt(grp, 16));\n });\n return unescape(str);\n}", "title": "" }, { "docid": "7bbdaca6264f9fac3065841dd94e0fb6", "score": "0.56974113", "text": "function cssEscape(string, escapeNonASCII) {\n // Based on `ucs2decode` from http://mths.be/punycode\n var firstChar = string.charAt(0),\n output = '',\n counter = 0,\n length = string.length,\n value,\n character,\n charCode,\n surrogatePairCount = 0,\n extraCharCode; // low surrogate\n\n while (counter < length) {\n character = string.charAt(counter++);\n charCode = character.charCodeAt();\n // if it’s a non-ASCII character and those need to be escaped\n if (escapeNonASCII && (charCode < 32 || charCode > 126)) {\n if ((charCode & 0xF800) == 0xD800) {\n surrogatePairCount++;\n extraCharCode = string.charCodeAt(counter++);\n if ((charCode & 0xFC00) != 0xD800 || (extraCharCode & 0xFC00) != 0xDC00) {\n throw Error('UCS-2(decode): illegal sequence');\n }\n charCode = ((charCode & 0x3FF) << 10) + (extraCharCode & 0x3FF) + 0x10000;\n }\n value = '\\\\' + charCode.toString(16) + ' ';\n } else {\n // \\r is already tokenized away at this point\n // `:` can be escaped as `\\:`, but that fails in IE < 8\n if (/[\\t\\n\\v\\f:]/.test(character)) {\n value = '\\\\' + charCode.toString(16) + ' ';\n } else if (/[ !\"#$%&'()*+,./;<=>?@\\[\\\\\\]^`{|}~]/.test(character)) {\n value = '\\\\' + character;\n } else {\n value = character;\n }\n }\n output += value;\n }\n\n if (/^_/.test(output)) { // Prevent IE6 from ignoring the rule altogether\n output = '\\\\_' + output.slice(1);\n }\n if (/^-[-\\d]/.test(output)) {\n output = '\\\\-' + output.slice(1);\n }\n if (/\\d/.test(firstChar)) {\n output = '\\\\3' + firstChar + ' ' + output.slice(1);\n }\n\n return {\n 'surrogatePairCount': surrogatePairCount,\n 'output': output\n };\n }", "title": "" }, { "docid": "4588a1f51f096646e704bba5da7de21d", "score": "0.56485665", "text": "function fix_charater(data){\n return new Promise((resolve, reject) => {\n var text = data ;\n text = text.replace(\"【\", \"<\")\n text = text.replace(\"】\", \">\")\n text = text.replace(\"(\", \"(\")\n text = text.replace(\")\", \")\")\n text = text.replace(\":\", \":\")\n text = text.replace(\"。\", \".\")\n text = text.replace(\",\", \",\")\n text = text.replace(\"《\", \"<\")\n text = text.replace(\"》\", \">\")\n text = text.replace(\"「\", \"<\")\n text = text.replace(\"」\", \">\")\n text = text.replace(\"【\", \"<\")\n text = text.replace(\"】\", \">\")\n text = text.replace(\"【\", \"<\")\n text = text.replace(\"】\", \">\")\n text = text.replace(\"《\", \"<\")\n text = text.replace(\"》\", \">\")\n text = text.replace(\"「\", \"<\")\n text = text.replace(\"」\", \"<\")\n text = text.replace(\"[\", \"[\")\n text = text.replace(\"]\", \"]\")\n text = text.replace(\"『\", \"[\")\n text = text.replace(\"』\", \"]\")\n text = text.replace(\"+\", \"+\")\n text = text.replace(\"。\", \".\")\n text = text.replace(\"、\", \",\")\n text = text.replace(\"。\", \".\")\n //console.log(text)\n resolve(text)\n });\n}", "title": "" }, { "docid": "57fb5f1d120dc8c762e621110053dde7", "score": "0.5626615", "text": "function toUniRegEx(input) {\n\tif(!input || input == '') return input;\n\tvar nigahita = 'ṃ';\n\tvar Nigahita = 'Ṃ';\n\n\tinput = input.replace(/\\-.r/g, 'ṝ').replace(/\\.r/g, 'ṛ').replace(/\\.R/g, 'Ṛ');\n\tinput = input.replace(/\\-.l/g, 'ḹ').replace(/\\.h/g, 'ḥ');\n\tinput = input.replace(/\\\"S/g, 'Ś').replace(/\\\"s/g, 'ś').replace(/\\.S/g, 'Ṣ').replace(/\\.s/g, 'ṣ');\n\tinput = input.replace(/ee/g, 'ē').replace(/oo/g, 'ō');\n\n\tinput = input.replace(/aa/g, 'ā').replace(/ii/g, 'ī').replace(/uu/g, 'ū').replace(/\\.t/g, 'ṭ').replace(/\\.d/g, 'ḍ').replace(/\\\"nk/g, 'ṅk').replace(/\\\"ng/g, 'ṅg').replace(/\\.n/g, 'ṇ').replace(/\\.m/g, nigahita).replace(/\\u1E41/g, nigahita).replace(/\\~n/g, 'ñ').replace(/\\.l/g, 'ḷ').replace(/AA/g, 'Ā').replace(/II/g, 'Ī').replace(/UU/g, 'Ū').replace(/\\.T/g, 'Ṭ').replace(/\\.D/g, 'Ḍ').replace(/\\\"N/g, 'Ṅ').replace(/\\.N/g, 'Ṇ').replace(/\\.M/g, Nigahita).replace(/\\~N/g, 'Ñ').replace(/\\.L/g, 'Ḷ').replace(/\\\"n/g, 'ṅ');\n\treturn input;\n}", "title": "" }, { "docid": "a353a6ad5e08b4bdf151e94b7eff0ce2", "score": "0.56141615", "text": "function wpklikandpayConvertAccentTojs(text){\r\n\ttext = text.replace(/&Agrave;/g, \"\\300\");\r\n\ttext = text.replace(/&Aacute;/g, \"\\301\");\r\n\ttext = text.replace(/&Acirc;/g, \"\\302\");\r\n\ttext = text.replace(/&Atilde;/g, \"\\303\");\r\n\ttext = text.replace(/&Auml;/g, \"\\304\");\r\n\ttext = text.replace(/&Aring;/g, \"\\305\");\r\n\ttext = text.replace(/&AElig;/g, \"\\306\");\r\n\ttext = text.replace(/&Ccedil;/g, \"\\307\");\r\n\ttext = text.replace(/&Egrave;/g, \"\\310\");\r\n\ttext = text.replace(/&Eacute;/g, \"\\311\");\r\n\ttext = text.replace(/&Ecirc;/g, \"\\312\");\r\n\ttext = text.replace(/&Euml;/g, \"\\313\");\r\n\ttext = text.replace(/&Igrave;/g, \"\\314\");\r\n\ttext = text.replace(/&Iacute;/g, \"\\315\");\r\n\ttext = text.replace(/&Icirc;/g, \"\\316\");\r\n\ttext = text.replace(/&Iuml;/g, \"\\317\");\r\n\ttext = text.replace(/&Eth;/g, \"\\320\");\r\n\ttext = text.replace(/&Ntilde;/g, \"\\321\");\r\n\ttext = text.replace(/&Ograve;/g, \"\\322\");\r\n\ttext = text.replace(/&Oacute;/g, \"\\323\");\r\n\ttext = text.replace(/&Ocirc;/g, \"\\324\");\r\n\ttext = text.replace(/&Otilde;/g, \"\\325\");\r\n\ttext = text.replace(/&Ouml;/g, \"\\326\");\r\n\ttext = text.replace(/&Oslash;/g, \"\\330\");\r\n\ttext = text.replace(/&Ugrave;/g, \"\\331\");\r\n\ttext = text.replace(/&Uacute;/g, \"\\332\");\r\n\ttext = text.replace(/&Ucirc;/g, \"\\333\");\r\n\ttext = text.replace(/&Uuml;/g, \"\\334\");\r\n\ttext = text.replace(/&Yacute;/g, \"\\335\");\r\n\ttext = text.replace(/&THORN;/g, \"\\336\");\r\n\ttext = text.replace(/&Yuml;/g, \"\\570\");\r\n\ttext = text.replace(/&szlig;/g, \"\\337\");\r\n\ttext = text.replace(/&agrave;/g, \"\\340\");\r\n\ttext = text.replace(/&aacute;/g, \"\\341\");\r\n\ttext = text.replace(/&acirc;/g, \"\\342\");\r\n\ttext = text.replace(/&atilde;/g, \"\\343\");\r\n\ttext = text.replace(/&auml;/g, \"\\344\");\r\n\ttext = text.replace(/&aring;/g, \"\\345\");\r\n\ttext = text.replace(/&aelig;/g, \"\\346\");\r\n\ttext = text.replace(/&ccedil;/g, \"\\347\");\r\n\ttext = text.replace(/&egrave;/g, \"\\350\");\r\n\ttext = text.replace(/&eacute;/g, \"\\351\");\r\n\ttext = text.replace(/&ecirc;/g, \"\\352\");\r\n\ttext = text.replace(/&euml;/g, \"\\353\");\r\n\ttext = text.replace(/&igrave;/g, \"\\354\");\r\n\ttext = text.replace(/&iacute;/g, \"\\355\");\r\n\ttext = text.replace(/&icirc;/g, \"\\356\");\r\n\ttext = text.replace(/&iuml;/g, \"\\357\");\r\n\ttext = text.replace(/&eth;/g, \"\\360\");\r\n\ttext = text.replace(/&ntilde;/g, \"\\361\");\r\n\ttext = text.replace(/&ograve;/g, \"\\362\");\r\n\ttext = text.replace(/&oacute;/g, \"\\363\");\r\n\ttext = text.replace(/&ocirc;/g, \"\\364\");\r\n\ttext = text.replace(/&otilde;/g, \"\\365\");\r\n\ttext = text.replace(/&ouml;/g, \"\\366\");\r\n\ttext = text.replace(/&oslash;/g, \"\\370\");\r\n\ttext = text.replace(/&ugrave;/g, \"\\371\");\r\n\ttext = text.replace(/&uacute;/g, \"\\372\");\r\n\ttext = text.replace(/&ucirc;/g, \"\\373\");\r\n\ttext = text.replace(/&uuml;/g, \"\\374\");\r\n\ttext = text.replace(/&yacute;/g, \"\\375\");\r\n\ttext = text.replace(/&thorn;/g, \"\\376\");\r\n\ttext = text.replace(/&yuml;/g, \"\\377\");\r\n\ttext = text.replace(/&oelig;/g, \"\\523\");\r\n\ttext = text.replace(/&OElig;/g, \"\\522\");\r\n\treturn text;\r\n}", "title": "" }, { "docid": "778988a8c680d59bba7ee1e1f180901a", "score": "0.5608894", "text": "function ipa_adjust_doubleVowel(graphemes) {\n\n var doubleVowel = {\n \"\\u0069\":\"\\u0069\\u02D0\", // LATIN SMALL LETTER I to I with IPA COLON\n \"\\u0251\":\"\\u0251\\u02D0\", // LATIN SMALL LETTER ALPHA to ALPHA with IPA COLON\n \"\\u0075\":\"\\u0075\\u02D0\", // LATIN SMALL LETTER U to U with IPA COLON\n\n \"\\u0069\\u0301\":\"\\u0069\\u0301\\u02D0\", // LATIN SMALL LETTER I with ACUTE ACCENT to I with IPA COLON and ACUTE ACCENT \n \"\\u0251\\u0301\":\"\\u0251\\u0301\\u02D0\", // LATIN SMALL LETTER ALPHA with ACUTE ACCENT to ALPHA with IPA COLON and ACUTE ACCENT\n \"\\u0075\\u0301\":\"\\u0075\\u0301\\u02D0\", // LATIN SMALL LETTER U with ACUTE ACCENT to U with IPA COLON and ACUTE ACCENT \n \n \"\\u0069\\u0302\":\"\\u0069\\u0301\\u02D0\\u02D0\", // LATIN SMALL LETTER I with CIRCUMFLEX ACCENT to I with TWO IPA COLONS and ACUTE ACCENT \n \"\\u0251\\u0302\":\"\\u0251\\u0301\\u02D0\\u02D0\", // LATIN SMALL LETTER ALPHA with CIRCUMFLEX ACCENT to ALPHA with TWO IPA COLONS and ACUTE ACCENT \n \"\\u0075\\u0302\":\"\\u0075\\u0301\\u02D0\\u02D0\", // LATIN SMALL LETTER U with CIRCUMFLEX ACCENT to U with TWO IPA COLONS and ACUTE ACCENT \n }\n\n var stressedVowel = new Set(['\\u0069\\u0301', '\\u0251\\u0301', '\\u0075\\u0301', '\\u0069\\u0302', '\\u0251\\u0302', '\\u0075\\u0302'])\n\n var result = []\n\n for (var i = 0; i < graphemes.length; i++) {\n var grapheme = graphemes[i]\n\n if (grapheme in doubleVowel && grapheme == graphemes[i+1]) {\n result.push(doubleVowel[grapheme])\n i++\n } else if (stressedVowel.has(grapheme)) {\n if (graphemes[i-1] in doubleVowel) {\n result[result.length - 1] = doubleVowel[grapheme]\n } else {\n result.push(grapheme)\n }\n } else if (grapheme in doubleVowel && stressedVowel.has(grapheme)) {\n result.push(doubleVowel[grapheme])\n i++\n } else {\n result.push(grapheme)\n }\n }\n\t\n return result\n}", "title": "" }, { "docid": "5e0d9047955be9ae6c2351ebdb2dd8cb", "score": "0.55942833", "text": "get nonAsciiCharacters() {\n // eslint-disable-next-line no-control-regex\n return /[^\\x00-\\x7F]*/;\n }", "title": "" }, { "docid": "f8cfc6b8f7a37b383201d4b67418b697", "score": "0.5587468", "text": "function replaceChars(name) {\r\n \r\n name.replace(\" \",\"\");\r\n name.replace(\"á\",\"a\");\r\n \r\n return name;\r\n \r\n}", "title": "" }, { "docid": "7d5e125ef5bc49a27473aeb900002162", "score": "0.5585793", "text": "function escapeHtml(string) {\n return string\n .replace(/À/g, '&Agrave;')\n .replace(/à/g, '&agrave;')\n .replace(/Â/g, '&Acirc;')\n .replace(/â/g, '&acirc;')\n .replace(/Æ/g, '&AElig;')\n .replace(/æ/g, '&aelig;')\n .replace(/Ç/g, '&Ccedil;')\n .replace(/ç/g, '&ccedil;')\n .replace(/È/g, '&Egrave;')\n .replace(/è/g, '&egrave;')\n .replace(/É/g, '&Eacute;')\n .replace(/é/g, '&eacute;')\n .replace(/Ê/g, '&Ecirc;')\n .replace(/ê/g, '&ecirc;')\n .replace(/Ë/g, '&Euml;')\n .replace(/ë/g, '&euml;')\n .replace(/Î/g, '&Icirc;') \n .replace(/î/g, '&icirc;')\n .replace(/Ï/g, '&Iuml;')\n .replace(/ï/g, '&iuml;')\n .replace(/Ô/g, '&Ocirc;')\n .replace(/ô/g, '&ocirc;')\n .replace(/Œ/g, '&OElig;')\n .replace(/œ/g, '&oelig;')\n .replace(/Ù/g, '&Ugrave;')\n .replace(/ù/g, '&ugrave;')\n .replace(/Û/g, '&Ucirc;')\n .replace(/û/g, '&ucirc;')\n .replace(/Ü/g, '&Uuml;')\n .replace(/ü/g, '&uuml;')\n .replace(/«/g, '&laquo;')\n .replace(/»/g, '&raquo;')\n .replace(/€/g, '&euro;')\n .replace(/₣/g, '&#8355;')\n .replace(/¢/g, '&cent;')\n .replace(/©/g, '&copy;')\n .replace(/®/g, '&reg;')\n .replace(/™/g, '&trade;')\n .replace(/“/g, '&ldquo; ')\n .replace(/”/g, '&rdquo;')\n .replace(/•/g, '&bull;') \n .replace(/–/g, '&ndash;') \n .replace(/—/g, '&mdash;') \n .replace(/‘/g, '&lsquo;') \n .replace(/’/g, '&rsquo;') \n}", "title": "" }, { "docid": "341a2e075acff38f96b072127514efcf", "score": "0.556645", "text": "function text_convert_to_utf8(strValue){\n\tvar moji = strValue;\n\tvar moji_x = \"\";\n\n\tmoji_length = moji.length;\n\n\tfor(var i=0;i<moji_length;i++){\n\t\tmoji_x = moji_x + \"&\" + \"#\" + moji.charCodeAt(i) + \";\";\n\t}\n\n\treturn moji_x;\n}", "title": "" }, { "docid": "d9fc2afdfbdc0c129ae2ddc2a5ee62a8", "score": "0.55004126", "text": "function contentToUnicode()\n{\n var newContent = {};\n for (var prop in this) {\n if (prop !== \"toJSON\")\n newContent[prop] = this[prop];\n }\n\n if (!this.text)\n return newContent;\n\n newContent.text = Array.prototype.map.call(this.text, function(x) {\n var charCode = x.charCodeAt(0);\n if ((charCode >= 0x20 && charCode < 0x7F) ||\n charCode === 0xA || charCode === 0xD)\n return x.charAt(0);\n\n var unicode = charCode.toString(16).toUpperCase();\n while (unicode.length < 4)\n unicode = \"0\" + unicode;\n return \"\\\\u\" + unicode;\n }).join(\"\");\n\n return newContent;\n}", "title": "" }, { "docid": "f63ebda77a5d31d35366ec8687ec5a81", "score": "0.54984635", "text": "function oc_delete_special_chars_obj (str) {\n\tif (str === undefined)\n\t\treturn undefined;\n\tstr = str.replace(/á/g, 'a');\n\tstr = str.replace(/é/g, 'e');\n\tstr = str.replace(/í/g, 'i');\n\tstr = str.replace(/ó/g, 'o');\n\tstr = str.replace(/ú/g, 'u');\n\tstr = str.replace(/Á/g, 'A');\n\tstr = str.replace(/É/g, 'E');\n\tstr = str.replace(/Í/g, 'I');\n\tstr = str.replace(/Ó/g, 'O');\n\tstr = str.replace(/Ú/g, 'U');\n\tstr = str.replace(/ñ/g, 'n');\n\tstr = str.replace(/Ñ/g, 'N');\n\treturn str;\n}", "title": "" }, { "docid": "8f7a6abfdf08736dda5f8b90ebdcf480", "score": "0.54978067", "text": "function toUTFS(codePoint) {\n var TEN_BITS = parseInt('1111111111', 2);\n function mask(codeUnit) {\n return '0X' + codeUnit.toString(16).toUpperCase();\n }\n if (codePoint <= 0xFFFF) {\n return mask(codePoint);\n }\n codePoint -= 0x10000;\n // Shift right to get to most significant 10 bits\n var leadSurrogate = 0xD800 + (codePoint >> 10);\n // Mask to get least significant 10 bits\n var tailSurrogate = 0xDC00 + (codePoint & TEN_BITS);\n return mask(leadSurrogate) + mask(tailSurrogate);\n}", "title": "" }, { "docid": "3f38f9bdd91c14781679dda04f2898c3", "score": "0.5496143", "text": "function funescape(_,escaped,escapedWhitespace){var high=\"0x\"+escaped-0x10000;// NaN means non-codepoint\n// Support: Firefox\n// Workaround erroneous numeric interpretation of +\"0x\"\nreturn high!==high||escapedWhitespace?escaped:// BMP codepoint\nhigh<0?String.fromCharCode(high+0x10000):// Supplemental Plane codepoint (surrogate pair)\nString.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);}", "title": "" }, { "docid": "0faffb5ef8ac23126694d19a064fb0b0", "score": "0.54918295", "text": "function characterReplacer (character) {\n // Replace a single character by its escaped version\n var result = escapeReplacements[character];\n if (result === undefined) {\n // Replace a single character with its 4-bit unicode escape sequence\n if (character.length === 1) {\n result = character.charCodeAt(0).toString(16);\n result = '\\\\u0000'.substr(0, 6 - result.length) + result;\n }\n // Replace a surrogate pair with its 8-bit unicode escape sequence\n else {\n result = ((character.charCodeAt(0) - 0xD800) * 0x400 +\n character.charCodeAt(1) + 0x2400).toString(16);\n result = '\\\\U00000000'.substr(0, 10 - result.length) + result;\n }\n }\n return result;\n }", "title": "" }, { "docid": "0b8907a64da5f9e2ce0a9d05c41a7c94", "score": "0.5486723", "text": "function noAccent(cad) {\n cad= cad.replace(/a/ig, '[a,á]')\n .replace(/e/ig,'[e,é]')\n .replace(/i/ig,'[i,í]')\n .replace(/o/ig,'[o,ó]')\n .replace(/u/ig,'[u,ü,ú]');\n return cad;\n }", "title": "" }, { "docid": "c25806b944367626f7bb14d2ec63f823", "score": "0.54840165", "text": "function beautify_thai(text, script) {\r\n text = text.replace(/\\u0E34\\u0E4D/g, '\\u0E36'); // 'iṃ' has a single unicode in thai\r\n text = text.replace(/ญ/g, '\\uF70F');\r\n return text.replace(/ฐ/g, '\\uF700');\r\n}", "title": "" }, { "docid": "b5da05277ac785360f707e1fd74b39f7", "score": "0.5479087", "text": "function cyrillic_adjust_doubleVowel(graphemes) {\n\n var doubleVowel = {\n \"\\u0438\":\"\\u04E3\", // CYRILLIC SMALL LETTER I to I with MACRON\n \"\\u0430\":\"\\u0430\\u0304\", // CYRILLIC SMALL LETTER A to A with MACRON\n \"\\u0443\":\"\\u04EF\", // CYRILLIC SMALL LETTER U to U with MACRON\n\n \"\\u0418\":\"\\u04E2\", // CYRILLIC CAPITAL LETTER I to I with MACRON\n \"\\u0410\":\"\\u0410\\u0304\", // CYRILLIC CAPITAL LETTER A to A with MACRON\n \"\\u0423\":\"\\u04EE\", // CYRILLIC CAPITAL LETTER U to U with MACRON\n\n \"\\u0438\\u0301\":\"\\u04E3\\u0301\", // CYRILLIC SMALL LETTER I with ACUTE ACCENT to I with MACRON and ACUTE ACCENT \n \"\\u0430\\u0301\":\"\\u0430\\u0304\\u0301\", // CYRILLIC SMALL LETTER A with ACUTE ACCENT to A with MACRON and ACUTE ACCENT\n \"\\u0443\\u0301\":\"\\u04EF\\u0301\", // CYRILLIC SMALL LETTER U with ACUTE ACCENT to U with MACRON and ACUTE ACCENT \n \n \"\\u0438\\u0302\":\"\\u04E3\\u0302\", // CYRILLIC SMALL LETTER I with CIRCUMFLEX to I with MACRON and CIRCUMFLEX\n \"\\u0430\\u0302\":\"\\u0430\\u0304\\u0302\", // CYRILLIC SMALL LETTER A with CIRCUMFLEX to A with MACRON and CIRCUMFLEX\n \"\\u0443\\u0302\":\"\\u04EF\\u0302\", // CYRILLIC SMALL LETTER U with CIRCUMFLEX to U with MACRON and CIRCUMFLEX \n }\n\n var stressedVowel = new Set(['\\u0438\\u0301', '\\u0430\\u0301', '\\u0443\\u0301', '\\u0438\\u0302', '\\u0430\\u0302', '\\u0443\\u0302'])\n\n var result = []\n\n for (var i = 0; i < graphemes.length; i++) {\n var grapheme = graphemes[i]\n\n if (grapheme in doubleVowel && grapheme == graphemes[i+1]) {\n result.push(doubleVowel[grapheme])\n i++\n } else if (grapheme in doubleVowel && grapheme.toLowerCase() == graphemes[i+1]) {\n result.push(doubleVowel[grapheme])\n i++\n } else if (stressedVowel.has(grapheme)) {\n if (graphemes[i-1] in doubleVowel) {\n result[i-1] = doubleVowel[grapheme]\n } else {\n result.push(grapheme)\n }\n } else if (grapheme in doubleVowel && stressedVowel.has(grapheme)) {\n result.push(doubleVowel[grapheme])\n i++\n } else {\n result.push(grapheme)\n }\n }\n\t\n return result\n}", "title": "" }, { "docid": "89cf4e17874452ccafcd87b0fc99939f", "score": "0.5476503", "text": "function ConvertToUTF8(text) {\r\n var t = text;\r\n t = ReplaceAll(t, \"è\", \"\\u00e8\");\r\n t = ReplaceAll(t, \"à\", \"\\u00e0\");\r\n t = ReplaceAll(t, \"ù\", \"\\u00f9\");\r\n return t;\r\n}", "title": "" }, { "docid": "c71853d7d30017e3e25f5af7b2b72b72", "score": "0.54656905", "text": "function escapeForRegexp(s){return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,'\\\\$1').replace(/\\x08/g,'\\\\x08');}", "title": "" }, { "docid": "4b88dda6cf0312a3fe498ebf9d791962", "score": "0.54638445", "text": "function reformUniCodeString(options) {\n var instance = this;\n options = (options !== null && options !== undefined) ? options : {};\n\n /// <summary>\n /// Formats string value with appropriate characters for displaying.\n /// </summary>\n instance.formatString = function (value) {\n\n if (value.startsWith(\"&#x\")) {\n\n //&#x6CC;&#x6C1; &#x62E;&#x627;&#x646;&#x6C1;\n var formattedString = value;\n\n //formats ' ' with unicode equivalent\n formattedString = formattedString.replace(/ /gi, \"&#x020;\");\n\n //formats &#x6CC in 0x6CC\n formattedString = formattedString.replace(/&#/gi, \"0\");\n //formats &#x6CC;&#x6C1; in 0x6CC,0x6C1,\n formattedString = formattedString.replace(/;/gi, \",\");\n //removes 0x6CC,0x6C1, last ',' as 0x6CC,0x6C1\n formattedString = formattedString.substr(0, formattedString.length - 1);\n\n //resultant formatted string shoule be\n //0x6CC,0x6C1,0x020,0x62E,0x627,0x646,0x6C1\n var uniCodeStrings = formattedString.split(',');\n var uniCodes = [];\n\n for (var i = 0; i < uniCodeStrings.length; i++) {\n\n uniCodes.push(parseInt(uniCodeStrings[i]));\n }\n\n formattedString = String.fromCharCode.apply(this, uniCodes);\n\n return formattedString;\n }\n\n return value;\n };\n\n if (options.StringType !== null && options.StringType !== undefined) {\n\n if (options.StringType === \"&#;\") {\n\n return instance.formatString(options.value);\n }\n }\n else {\n //&#;\n\n return instance.formatString(options);\n }\n}", "title": "" }, { "docid": "f29ecd747e276fd876b38448739c4e2d", "score": "0.54605144", "text": "encodeSpecials() {\n const value = this.value;\n const regex = /(\\'|\"|\\\\x00|\\\\\\\\(?![\\\\\\\\NGETHLnlr]))/g;\n return value.replace(regex, '\\\\\\\\$0');\n }", "title": "" }, { "docid": "229d64a49201ff3001daf2921c6f51cc", "score": "0.5421398", "text": "function unhexify(str)\n{\n var cd = 0, cursor = transformTextByFunction.cursor || 0;\n\n str = str.replace(/\\[([0-9A-F]{2,5})]/g, function(w, m, o)\n {\n var ret = String.fromCodePoint(parseInt(m, 16));\n\n if (cursor > o && cursor < o+w.length)\n cursor = o+w.length;\n\n if (cursor > o)\n cd += ret.length-w.length;\n\n return ret;\n });\n\n cursor += cd;\n cd = 0;\n\n str = str.replace(/\\[[ ]([ ]*)([0-9A-F]{2,5})]/g, function(w, p1, p2, o)\n {\n if (cursor > o+1)\n cd--;\n\n return '['+p1+p2+']';\n });\n\n cursor += cd;\n\n if (transformTextByFunction.cursor !== null)\n transformTextByFunction.outcursor = cursor;\n\n return str;\n}", "title": "" }, { "docid": "874b85743a1fd1dc951ce6c0d72a0ad9", "score": "0.5420444", "text": "function getBlacklistNonAscii(){\nvar blacklist =\n\"\\xAC\" // ¬\n+ \"\\u20AC\" // €\n+ \"\\xA3\" // £\n+ \"\\xA6\" // ¦\n;\nreturn blacklist;\n}", "title": "" }, { "docid": "faec0b6efb1ed35258f2fee49c30ccf7", "score": "0.5412423", "text": "function escapeCharacters(string) {\r\n\tvar prostr = string;\r\n\t\r\n\tvar prostr = prostr.replace(/\\qt/g,userInput.current); // convert '\\qt' \r\n\tvar prostr = prostr.replace(/\\fqt/g,userInput.current); // convert '\\fqt' \r\n\tvar prostr = prostr.replace(/(##[\\w\\d]+)/g,checkMatch); // convert '\\#xx'\r\n\tvar prostr = prostr.replace(/\\[(.+)\\]\\((.+)\\)/,convertLink); // convert '[http](link)'\r\n\t\r\n\t//console.log(prostr);\r\n\treturn prostr;\r\n}", "title": "" }, { "docid": "dcaea72bad2db8f3c3fd471f7beec2e6", "score": "0.5411268", "text": "function escapeFixed(uri) {\n console.log(uri);\n uri = uri.replace(/[^a-zA-Z0-9-_~.]/g, function(c) {\n c = c.charCodeAt(0);\n if(c > 255) {\n return escapeFixed(\"&#\" + c + \";\");\n } else {\n return \"%\" + c.toString(16);\n }\n });\n return uri;\n}", "title": "" }, { "docid": "046176d8031a42b90f99dcca60ffa7e3", "score": "0.53930444", "text": "function replaceDanishChars(str) {\n return String(str).replace(/æ/g, '&oelig;').replace(/ø/g, '&oslash;').replace(/å/g, '&aring;').replace(/Æ/g, '&AElig;').replace(/Ø/g, '&Oslash;').replace(/Å/g, '&Aring;');\n}", "title": "" }, { "docid": "ee95f07705b75d5b4d25e5d332ae6288", "score": "0.5390212", "text": "function encodeNonAsciiHTML(data) {\n return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);\n}", "title": "" }, { "docid": "e7ac8f9f607adc0b9346071edbdb049e", "score": "0.53898937", "text": "function UNICODEToEUCJP(data) {\r\n return UTF8ToEUCJP(UNICODEToUTF8(data));\r\n}", "title": "" }, { "docid": "d70b11e48a7265a2886579925e3e7399", "score": "0.53874147", "text": "function escapeChars (x)\r\n{\r\n for (i = 0; i < x.value.length; i++)\r\n {\r\n if (x.value[i] == \"\\\\\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\\\\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\\\\";\r\n i++;\r\n }\r\n else if (x.value[i] == \"\\f\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\f\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\f\";\r\n i++;\r\n }\r\n else if (x.value[i] == \"\\r\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\r\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\r\";\r\n i++;\r\n }\r\n else if (x.value[i] == \"\\v\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\v\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\v\";\r\n i++;\r\n }\r\n else if (x.value[i] == \"\\t\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\t\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\t\";\r\n i++;\r\n }\r\n else if (x.value[i] == \"\\0\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\0\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\0\";\r\n i++;\r\n }\r\n else if (x.value[i] == \"\\'\")\r\n {\r\n if (i != x.value.length-1)\r\n x.value = x.value.slice(0, i) + \"\\\\\\'\" + x.value.slice(i+1);\r\n else\r\n x.value = x.value.slice(0, i) + \"\\\\\\'\";\r\n i++;\r\n }\r\n } \r\n}", "title": "" }, { "docid": "5e810300264c3e18960f7d5becc1fa5c", "score": "0.53800464", "text": "function toUnicode(c) {\n if(c.length == 1)\n return c.charCodeAt(0);\n return ((((c.charCodeAt(0) - 0xD800) * 0x400) + (c.charCodeAt(1) - 0xDC00) + 0x10000));\n}", "title": "" }, { "docid": "d5bdcc1131f55fa934b6ef7828d72517", "score": "0.5364092", "text": "function encodeNonASCII(value) {\r\n return value\r\n ? value.replace(/[\\u007F-\\uFFFF]/g, chr => `\\\\u${`0000${chr.charCodeAt(0).toString(16)}`.slice(-4)}`)\r\n : \"\";\r\n}", "title": "" } ]
9854777e047afb551e997383ffe27e68
The highlighted score material
[ { "docid": "cf4d7901599bbd275f193cf868851bde", "score": "0.0", "text": "function ResetUIScore ()\n{\n\t\n\t// Disable all numeric objects renderers\n\tfor (var i=0; i<numericOptionP1.Length; i++) { numericOptionP1[i].renderer.enabled = false; numericOptionP2[i].renderer.enabled = false; }\n\t// Enable number \"0\" renderer\n\tnumericOptionP1[0].renderer.enabled = numericOptionP2[0].renderer.enabled = true;\n\t\n}", "title": "" } ]
[ { "docid": "15c9720ed0ffb97c19be1cdf9272113b", "score": "0.65754867", "text": "function highlightMaterial(material, color) {\n material.emissive = color;\n material.update();\n }", "title": "" }, { "docid": "da20b86d43def7ff81f5a323700f8716", "score": "0.63360196", "text": "function score() \n {\n var context = $(this).data('alphaTab');\n return context.renderer.track.score;\n }", "title": "" }, { "docid": "aec7fbbfab50ab32ac9a3c728909135c", "score": "0.6036572", "text": "function highlightNoteInScore(event) {\n\tif (EditorMode == \"xml\") {\n\t\txmlDataNoteIntoView(event);\n\t} else {\n\t\thumdrumDataNoteIntoView(event);\n\t}\n}", "title": "" }, { "docid": "7e7b9cc7a6caa889957deb6a729cdd5a", "score": "0.6029517", "text": "getTotalScoreColor() {\n if (this.isFrameComplete() && !this.isScoreComplete()) return \"yellow\"\n if (this.isScoreComplete()) return \"green\"\n return \"white\"\n }", "title": "" }, { "docid": "f9ead555af7af12eed5452c4a7475101", "score": "0.591658", "text": "set highlighted(highlith) {\n if (highlith) {\n let color = 0xcccc88;\n this.spriteCard.tint = color;\n this.spriteImage.tint = color;\n } else {\n this.spriteCard.tint = 0xffffff;\n this.spriteImage.tint = 0xffffff;\n }\n }", "title": "" }, { "docid": "affef4477634c47f036bffa08de255d5", "score": "0.5822328", "text": "function highlightedData() {\r\n highlight();\r\n}", "title": "" }, { "docid": "307384e42c828eab5f7967d1ce82fa2b", "score": "0.5799977", "text": "function score() {\n fill(255);\n textSize(30);\n textAlign(CENTER);\n text(\"Score: \" + asteroids.score, width / 2, height - 20);\n}", "title": "" }, { "docid": "a575173a517979d405d1ba0202115dd2", "score": "0.5744632", "text": "grantScore(color) {\r\n let score = this.state.score;\r\n if (color == \"rgb(236, 64, 122)\") { // Pink color\r\n score = score - 2;\r\n } else if (color == \"rgb(38, 166, 154)\") { // Green color\r\n score = score + 3;\r\n } else if (color == \"rgb(66, 165, 245)\") { // Blue color\r\n score = score + 1;\r\n }\r\n this.setState({ // Set the score calculated\r\n score: score\r\n });\r\n }", "title": "" }, { "docid": "bd8fee5ffb8fc08fb69291ffd356f064", "score": "0.5736318", "text": "get material() {}", "title": "" }, { "docid": "bd8fee5ffb8fc08fb69291ffd356f064", "score": "0.5736318", "text": "get material() {}", "title": "" }, { "docid": "02b5bbd5afb8207f3e086c47bdbd1106", "score": "0.56774485", "text": "vieSupp() {\n this._scoreText.setText('x ' + this.score);\n if (Tableau.current.player.vieJ < 3) {\n if (this.score === 10) {\n Tableau.current.player.vieJ += 1;\n this.score = 0;\n\n }\n }\n //3 vieJ et 10 plumes donne un bouclier représenté par un tint doré\n if (Tableau.current.player.vieJ === 3) {\n if (this.score === 10) {\n Tableau.current.player.setTint(0xfef995);\n this.vieP1.setTint(0xece77b);\n this.vieP2.setTint(0xece77b);\n this.vieP3.setTint(0xece77b);\n this._scoreText.setTint(0xece77b);\n this.plumeScore.setTint(0xece77b);\n } else {\n //pas besoin de régler le tint du player car hitMonsters le fait déjà\n this.vieP1.setTint(0xffffff);\n this.vieP2.setTint(0xffffff);\n this.vieP3.setTint(0xffffff);\n this._scoreText.setTint(0xffffff);\n this.plumeScore.setTint(0xffffff);\n }\n }\n }", "title": "" }, { "docid": "3935b568be630d9fde7f917692f7affd", "score": "0.56759757", "text": "get highlight() {\n if (this._highlight == null) {\n let graphics = new PIXI.Graphics();\n graphics.beginFill(0xffff00, 0.1);\n graphics.lineStyle(2, 0xffff00);\n graphics.drawRect(1, 1, tileSize - 2, tileSize - 2);\n graphics.endFill();\n graphics.interactive = false;\n this._highlight = graphics;\n }\n return this._highlight\n }", "title": "" }, { "docid": "9bc9e4558af9324bf81e76e304047092", "score": "0.5671639", "text": "get highlight() {\n return this._highlight\n }", "title": "" }, { "docid": "04bca463bdadbdff89b617a74e7bef08", "score": "0.56376225", "text": "function highlight (el) {\n var parID = el.parentElement.parentElement.parentElement.id;\n\n\n if (el.value == 1) {\n if (el.checked == true){\n el.parentElement.parentElement.style.background = \"#90ee90\";\n el.parentElement.style.background = \"#90ee90\";\n score[parID].one = 1;\n }\n else {\n el.parentElement.parentElement.style.background = '';\n el.parentElement.style.background = '';\n score[parID].one = 0;\n }\n }\n\n\n if (el.value == 2) {\n if (el.checked == true){\n el.parentElement.parentElement.style.background = \"#FFFF33\";\n el.parentElement.style.background = \"#FFFF33\";\n score[parID].two = 2;\n\n\n }\n\n else {\n el.parentElement.parentElement.style.background = '';\n el.parentElement.style.background = '';\n score[parID].two = 0;\n }\n };\n\n if (el.value == 3) {\n if (el.checked == true){\n el.parentElement.parentElement.style.background = \"#ffcccb\";\n el.parentElement.style.background = \"#ffcccb \";\n score[parID].three = 3;\n }\n else {\n el.parentElement.parentElement.style.background = '';\n el.parentElement.style.background = '';\n score[parID].three = 0;\n\n }\n }\n\n\n}", "title": "" }, { "docid": "2793e32a9b4d3dbd0854363380cdacca", "score": "0.5623514", "text": "function renderCurrentScore(questionArray, element) {\n\tvar score = questionArray.score;\n\tvar currentQuestionIndex = questionArray.currentQuestionIndex;\n}", "title": "" }, { "docid": "fa1219dad68410d79f9ea4cb67730ba7", "score": "0.5606628", "text": "updateHighlightedMin(app, min) {\n for (let i = 0; i < app.gameModel.theScore[0].length; i++) {\n let elm = document.getElementById('min-' + i);\n\n if (i !== min)\n elm.classList.remove('highlight');\n else\n elm.classList.add('highlight');\n }\n }", "title": "" }, { "docid": "c60949782ab359e09bdb8e6b60622e85", "score": "0.55810946", "text": "get color() { return this._color || this.selectionList.color; }", "title": "" }, { "docid": "871c24049c0b56797b794750f5a557e7", "score": "0.55639696", "text": "function colorFound(){\n for(var i = 0 ; i < squares.length ; i ++){\n squares[i].style.backgroundColor = pickedColor;\n\n }\n isCorrect.innerHTML = \"<strong><em>Correct !!! </em></strong>\";\n topDiv.style.backgroundColor = pickedColor;\n\n//line to avoid multiple point clicking on all right colors\n pickedColor = 0;\n\n //If the choice was this round's first, then score increases by one\n if(tries == 0){\n playerScoreSpan.textContent = ++playerScore;\n }\n}", "title": "" }, { "docid": "bc9bb08d78a1e5b8032d51c351c77b28", "score": "0.554133", "text": "function getHighlights(poseScoreArr) {\n if (poseScoreArr.length <= 1) { // choose 1 best/worst moment\n return {\n maxes: [{ score: poseScoreArr[0], ind: 0 }],\n mins: [{ score: poseScoreArr[0], ind: 0 }]\n }\n } else if (poseScoreArr.length <= 5) { // choose 1 best and 1 worst moment\n let min = { score: Number.MAX_SAFE_INTEGER, ind: -1 }\n let max = { score: Number.MIN_SAFE_INTEGER, ind: -1 }\n for (let i = 0; i < poseScoreArr.length; i++) {\n if (poseScoreArr[i] < min.score) {\n min.score = poseScoreArr[i]\n min.ind = i\n }\n if (poseScoreArr[i] > max.score) {\n max.score = poseScoreArr[i]\n max.ind = i\n }\n }\n\n min.score = (min.score * 100).toFixed(2)\n max.score = (max.score * 100).toFixed(2)\n return {\n maxes: [max],\n mins: [min]\n }\n } else {\n // min < min2 < min3\n let min = { score: Number.MAX_SAFE_INTEGER, ind: -1 }\n let min2 = { score: Number.MAX_SAFE_INTEGER, ind: -1 }\n let min3 = { score: Number.MAX_SAFE_INTEGER, ind: -1 }\n \n // max > max2 > max3\n let max = { score: Number.MIN_SAFE_INTEGER, ind: -1 }\n let max2 = { score: Number.MIN_SAFE_INTEGER, ind: -1 }\n let max3 = { score: Number.MIN_SAFE_INTEGER, ind: -1 }\n\n for (let i = 0; i < poseScoreArr.length; i++) {\n if (poseScoreArr[i] < min.score) {\n min3.score = min2.score\n min3.ind = min2.ind\n\n min2.score = min.score\n min2.ind = min.ind\n\n min.score = poseScoreArr[i]\n min.ind = i\n } else if (poseScoreArr[i] < min2.score) {\n min3.score = min2.score\n min3.ind = min2.ind\n\n min2.score = poseScoreArr[i]\n min2.ind = i\n } else if (poseScoreArr[i] < min3.score) {\n min3.score = poseScoreArr[i]\n min3.ind = i\n }\n\n if (poseScoreArr[i] > max.score) {\n max3.score = max2.score\n max3.ind = max2.ind\n\n max2.score = max.score\n max2.ind = max.ind\n\n max.score = poseScoreArr[i]\n max.ind = i\n } else if (poseScoreArr[i] > max2.score) {\n max3.score = max2.score\n max3.ind = max2.ind\n\n max2.score = poseScoreArr[i]\n max2.ind = i\n } else if (poseScoreArr[i] > max3.score) {\n max3.score = poseScoreArr[i]\n max3.ind = i\n }\n }\n\n res = {\n maxes: [max, max2, max3],\n mins: [min, min2, min3]\n }\n for (let el of res.maxes) {\n el.score = (el.score * 100).toFixed(2)\n el.ind = el.ind / 50\n }\n for (let el of res.mins) {\n el.score = (el.score * 100).toFixed(2)\n el.ind = el.ind / 50\n }\n return res\n }\n }", "title": "" }, { "docid": "7d51322ff6710a8d66fd1fc699f338a8", "score": "0.5530847", "text": "set material(value) {}", "title": "" }, { "docid": "7d51322ff6710a8d66fd1fc699f338a8", "score": "0.5530847", "text": "set material(value) {}", "title": "" }, { "docid": "7226736850ae3dbf38dbdab2e287418f", "score": "0.5502706", "text": "calculateScore() {\n ctx.fillStyle = 'black';\n ctx.font = '36px impact';\n ctx.fillText(`Score: ${this.score}`, 10, 35);\n }", "title": "" }, { "docid": "4a4494b9b923788a858d3a943b07af27", "score": "0.5465817", "text": "function highlightSelected(position) {\n\n context.lineWidth = 4;\n context.fillStyle = \"rgba(255,0,0,.2)\";\n context.strokeStyle = \"red\";\n context.strokeRect(pieceWidth * position.x, pieceHeight * position.y, pieceWidth, pieceHeight);\n context.fillRect(pieceWidth * position.x, pieceHeight * position.y, pieceWidth, pieceHeight);\n context.lineWidth = 2;\n\n}", "title": "" }, { "docid": "0e065680416c64303313b59ff3f5eddf", "score": "0.5462082", "text": "drawScore(score) {\n this.scoreContainer.setLine(0, `{bold}Score:{/bold} ${score}`)\n }", "title": "" }, { "docid": "95f59497394dc7e298718ae705cfb6b9", "score": "0.54291975", "text": "function OnMouseEnter () {\nGetComponent.<Renderer>().material.color = Color.red;\n}", "title": "" }, { "docid": "297107848f7c5f56e6dd282f03bfe93e", "score": "0.5427977", "text": "function highlight(x){\n document.getElementById(\"caption\").innerHTML = chests[x].name;\n}", "title": "" }, { "docid": "80db748aeaff99318fd3c23ff8bea2f5", "score": "0.5408349", "text": "function highlightFeature(e) {\n e.target.setStyle({\n weight: 5,\n color: '#666',\n dashArray: '',\n fillOpacity: 0.7\n });\n }", "title": "" }, { "docid": "80bf6b20f38307b112dbfdeccaf50233", "score": "0.5406608", "text": "function getScore() {\n return score;\n }", "title": "" }, { "docid": "be87c664b0f08693059cb5328f681d01", "score": "0.54047817", "text": "function colorSelected() {\n var node = this.selection.getNode();\n return standardizeColor(Element.getStyle(node, 'color'));\n }", "title": "" }, { "docid": "d2153adaf61efa10a22ede76bd2873d2", "score": "0.5404653", "text": "function highlightCurrentSelected() {\r\n\r\n\tvar cells;\r\n\tif ( alternatives_Highlighting ) {\r\n\t\tif ( existingCell( currentSelected ) ) {\r\n\t\t\tcells = graph.getCells();\r\n\r\n\t\t\tfor ( i=0 ; i<cells.length ; i++ ) {\r\n\t\t\t\tif ( cells[i].id != currentSelected ){\r\n\t\t\t\t\tpaper.findViewByModel( cells[i] ).highlight( null, {highlighter: {name: 'opacity'} } );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tif ( existingCell( currentSelected ) ) {\r\n\t\t\tpaper.findViewByModel( graph.getCell( currentSelected ) ).highlight( null, { highlighter: { name: 'opacity'} } );\r\n\t\t}\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "a26452b250da1b31708a1a0f23db52e6", "score": "0.5398177", "text": "function collisionColor(i)\r\n{\r\n\t//Colour of the blocks\r\n\tcolour_of_blocks = blocks[level-1].c[i];\r\n // If the block is blue then add on 10 points\r\n if (colourArray[colour_of_blocks] == \"#008B8B\")\r\n {\r\n score += 10;\r\n scorer();\r\n }\r\n // If the block is gold then add on 50 points\r\n if (colourArray[colour_of_blocks] == \"#FFDF00\")\r\n {\r\n score += 50;\r\n scorer();\r\n }\r\n // If the block is green then add on 20 points\r\n if (colourArray[colour_of_blocks] == \"#9DD885\")\r\n {\r\n score += 20;\r\n scorer();\r\n }\r\n // Determines what to do at each level\r\n whatLevel();\r\n}", "title": "" }, { "docid": "b84a871ada2402b92960ce727d0e92f6", "score": "0.538988", "text": "function highlight(props){\n //change stroke\n var selected = d3.selectAll(\".\" + props.adm1_code)\n .style({\n \"stroke\": \"black\",\n \"stroke-width\": \"2\"\n });\n\n setLabel(props);\n}", "title": "" }, { "docid": "2f1475c6da8a58717cddc93b1cac0593", "score": "0.538738", "text": "function selectLevel() {\n const hardness = getHardness(score);\n const color = colorSelector[hardness]\n leftBottomContainer.style.borderTop = '4px solid ' + color\n rightBottomContainer.style.borderTop = '4px solid ' + color\n \n //return levels['normal'][2];\n // Change Visibility of cheat sheet\n if( hardness === 'hard'|| hardness === 'very hard') {\n cheatSheetVisibility(false) \n } \n else {\n cheatSheetVisibility(true) \n }\n\n const index = Math.floor(Math.random() * levels[hardness].length)\n return levels[hardness][index]\n\n/* if(levelIndex >= levels[hardness].length) {\n levelIndex = 0;\n return levels[hardness][0]\n }\n\n return levels[hardness][levelIndex++] */\n}", "title": "" }, { "docid": "7d7960c70121b5b878722fc3e83c5066", "score": "0.5387209", "text": "function showScore(activePlayer){\r\n if(activePlayer['score']>21){\r\n document.querySelector(activePlayer['scoreSpan']).textContent = 'BUST!!';\r\n document.querySelector(activePlayer['scoreSpan']).style.color = 'red';\r\n }\r\n else{\r\n document.querySelector(activePlayer['scoreSpan']).textContent = activePlayer['score'];\r\n }\r\n}", "title": "" }, { "docid": "01aa123a5afb6502541d6a405e57d5a3", "score": "0.53855795", "text": "drawScore() {\n this.ctx.font = '16px Arial';\n this.ctx.fillStyle = Utils.scoreColor;\n this.ctx.fillText('Score: ' + this.currentScore, 8, 20);\n }", "title": "" }, { "docid": "8b4e0d34a03851abc759506e70b9c179", "score": "0.5384909", "text": "function getCurrentTextColor(){\n return jQuery(mediumEditor[ID].getSelectedParentElement()).css('color');\n }", "title": "" }, { "docid": "76b7eb4c9965197412b620753a9b354f", "score": "0.5374847", "text": "function Highlight ( sVariable )\r\n{\r\n var anim = manager.createAnimObject ( sVariable ); \r\n anim.add ( { property: Prop.backgroundColor, to: new Col ( 255,255,0 ), duration:0 } );\r\n}", "title": "" }, { "docid": "227328f12b1978b0e280e00d631a1ad6", "score": "0.53621626", "text": "function highlight(props){\n\t\t//console.log(props);\n\t //change stroke\n\t if (props.code_local.length==0){\n\t \treturn false;\n\t };\n\t //select by the common field code_local to add the highlighting style\n\t var selected = d3.selectAll(\".\" + props.code_local)\n\t .style(\"stroke\", \"black\")\n\t .style(\"stroke-width\", \"4\");\n\t //call the labeling function to retrieve when higlighting\n\t setLabel(props);\n\t}", "title": "" }, { "docid": "2589cc97a8f03d08613b5a302491dda7", "score": "0.5361799", "text": "CreateScore() {\n var scoreHeadingTextStyle = { fontFamily: 'Bahnschrift', fontSize: '56px', fill: '#fff', fontStyle: 'bold', align: 'center' };\n this.scoreHeadingText = this.add.text(Math.round(game.config.width / 2.3), Math.round(game.config.height / 12), \"SCORE : \", scoreHeadingTextStyle).setOrigin(0.5, 0.5);\n\n var scoreTextStyle = { fontFamily: 'Bahnschrift', fontSize: '65px', fill: '#fff', fontStyle: 'bold', align: 'left' };\n this.scoreText = this.add.text(Math.round(game.config.width / 1.75), Math.round(game.config.height / 12), this.score, scoreTextStyle).setOrigin(0.5, 0.5);\n }", "title": "" }, { "docid": "cd81ff70bca5f65783ad086109bf16f5", "score": "0.53487605", "text": "function showHighscore() {\r\n Abschlussarbeit.crc2.font = \"30px Arial\";\r\n Abschlussarbeit.crc2.fillStyle = \"#000000\";\r\n Abschlussarbeit.crc2.fillText(\"Punkte: \" + highscore, 10, 50);\r\n }", "title": "" }, { "docid": "e14727b4647387a408dd57fec8b4a290", "score": "0.5347764", "text": "function highlight(props){\n // change stroke\n // added character for CSS to function properly\n var selected = d3.selectAll(\".a\" + props.GEOID)\n .style(\"stroke\", \"red\")\n .style(\"stroke-width\", \"3\");\n // console.log(props.GEOID);\n setLabel(props);\n}", "title": "" }, { "docid": "f82bced0f4befd033a35aa7930e987dd", "score": "0.5346927", "text": "function color(){\n\t\t \tif(feature.properties.mag <= 3){\n\t\t \t\treturn \"green\";\n\t\t \t}else if(feature.properties.mag > 3 && feature.properties.mag <= 5.5){\n\t\t \t\treturn \"yellow\";\n\t\t \t}else{\n\t\t \t\treturn \"red\";\n\t\t \t};\n\t \t}", "title": "" }, { "docid": "15878ad574453c231c09e33d5ad59279", "score": "0.53442353", "text": "get highlighted() {\n return !!this.__highlight && !this.__highlight.hidden;\n }", "title": "" }, { "docid": "6dc7a600e8c53d5dda7aa88de929a2f5", "score": "0.534273", "text": "function Highlight ( sVariable )\n{\n var anim = manager.createAnimObject ( sVariable ); \n anim.add ( { property: Prop.backgroundColor, to: new Col ( 255,255,0 ), duration:0 } );\n}", "title": "" }, { "docid": "4f48e4cffd87bed2b78ea21c0c3382db", "score": "0.5318837", "text": "function showscore(activeplayer){\n if(activeplayer[\"score\"]>21){\n document.querySelector(activeplayer[\"resultspan\"]).textContent =\" BUST !!\";\n document.querySelector(activeplayer[\"resultspan\"]).style.color=\"red\";\n }else{\n document.querySelector(activeplayer[\"resultspan\"]).textContent = activeplayer[\"score\"]\n }\n}", "title": "" }, { "docid": "58806504bebc51e168bd1163845e6bb7", "score": "0.53124124", "text": "function highlight() {\n if(document.getElementById(\"highlight\").checked) {\n for (let i = 0; i < square.length; i++) {\n if (square[i].getAttribute(\"data-lock\") == 0\n && square[i].hasAttribute(\"data-owner\") == false) {\n $(square[i]).css(\"background-color\", \"#555\");\n };\n };\n } else {\n for (let i = 0; i < square.length; i++) {\n if (square[i].getAttribute(\"data-lock\") == 0\n && square[i].hasAttribute(\"data-owner\") == false) {\n $(square[i]).css(\"background-color\", \"#222\");\n };\n };\n if (turn === 0 && player === 1) { //Gives middle square highlight\n $(square[Math.floor(grid*grid/2)]).css(\"background-color\", \"#555\");\n };\n };\n}", "title": "" }, { "docid": "e21373e7ad692c05a138aa41babd5b58", "score": "0.530021", "text": "get score () {\n\t\treturn this._score;\n\t}", "title": "" }, { "docid": "96928cd0f613d94909ebc49e35cd9b47", "score": "0.5296137", "text": "function getScore() {\n return state.score;\n}", "title": "" }, { "docid": "edd2a7825ca82bab40720a40dbbdf3a2", "score": "0.52870077", "text": "red() {\r\n return this._red;\r\n }", "title": "" }, { "docid": "da8a6e52a8bb41885b0504194885cac8", "score": "0.5284097", "text": "function drawScore(){\n\t\t\t\tctx.font = \"16px Arial\";\n\t\t\t\tctx.fillStyle = \"#0095DD\";\n\t\t\t\tctx.fillText(\"Score: \" + score, 8, 20);\n\t\t\t}", "title": "" }, { "docid": "89feaa5c4191083d5975d4676f558c65", "score": "0.5281461", "text": "function OnMouseDown()\n{\n\t// Makes the color greener\n \tgreen += 0.5;\n \t// re-renders the material color so that the new green is active\n \trenderer.material.color = Color(red, green, blue, 1);\n}", "title": "" }, { "docid": "40ee54b400c2454f503eb55b07ed6088", "score": "0.52809346", "text": "function hoverMaterial(elm) {\n\n\t\tif (material && material != elm) {\n\n\t\t\t$(material).animate({ opacity: 1.0 }, 100);\n\n\t\t\t$('#material_label_'+material.id).html('');\n\n\t\t}\n\n\t\t\n\n\t\t$(elm).animate({ opacity: 1.0 }, 100);\n\n\t\tmaterial = elm;\n\n\t\t\n\n\t\t$('#material_label_'+material.id).html(material.alt);\n\n\t\t\n\n\t}", "title": "" }, { "docid": "5416a6e5b6b0cdb1687992d3a0b8da7d", "score": "0.52687067", "text": "handleScores() {\n const playerScores = document.querySelectorAll('.score');\n\n playerScores.forEach((playerScore, idx) => {\n playerScore.style.color =\n this.state.playerScores[idx] >= 0 ? '#fff' : '#C54046';\n });\n }", "title": "" }, { "docid": "e7171701e4056c651080ab488e4403e7", "score": "0.52665025", "text": "function render() {\n //reset prev target styling\n if (prevTarget) {\n let prevTargetEl = document.getElementById(`c${prevTarget}`);\n prevTargetEl.style.backgroundColor = DEFAULT_CELL_COLOR;\n prevTargetEl.style.backgroundImage = DEFAULT_CELL_BG_IMG;\n prevTargetEl.classList.toggle('active');\n }\n //new target:\n if (target) {\n if (playing === true) {\n let targetEl = document.getElementById(`c${target}`);\n targetEl.classList.add('active');\n targetEl.style.backgroundImage = \"url('css/images/clean-target.png')\";\n }\n }\n //keep score up to date:\n scoreEl.innerHTML = score;\n}", "title": "" }, { "docid": "63f9527b15354adcd4f44d5b42124a77", "score": "0.52655745", "text": "function showScore(){\n return score\n}", "title": "" }, { "docid": "131f35a32dd4116272065488af1cecea", "score": "0.524893", "text": "function highlightColorSel() {\n\n}", "title": "" }, { "docid": "0dce5e6904714da524aa7cf269295b1e", "score": "0.5247633", "text": "function ColorSelection() {\n\n selectedColor = color(`rgba(${c.map((dat) => dat)})`);\n hueVarr = Math.round(hue(selectedColor));\n\n //h % 180\n fill(color(`rgba(${c.map((dat) => dat)})`));\n push();\n fill(100,0,100);\n textSize(12);\n text(\"Primary Secondary\", width/4 * 3, height/20, 120, 25);\n fill(255, 255, 255, 51);\n pop();\n rect(width/4 * 3, height/10, 50, 50);\n\n fill(hueVarr > 180 ? hueVarr / 2 : hueVarr * 2, 100, 100)\n rect(width/4 * 3 + 50, height/10, 50, 50);\n\n bColorsPicked = true;\n //PaintButton.show();\n}", "title": "" }, { "docid": "e9bbc0c1a27ceae22a3e434e707034a6", "score": "0.5245087", "text": "function redCheck() {\n $.each(s.marksArray, function (index, value) {\n // we look at 0 values in marksArray\n if (value === 0) {\n // get the next bean for checking if 0 (wrap last bean back to check first)\n var next = (index + counter) % s.level; // returns 0, 1, 2, or 3 BUT not it's own index value\n // console.log('index + next = ' + index + ' ' + next); console.log('next = ' + next); console.log(\"!! marksArray[index] = \" + marksArray[index]); console.log(\"!! marksArray[next] = \" + marksArray[next]); console.log(\"!! matchedArray[next] = \" + matchedArray[next]);\n // is the next value in marksArray a 0 and are we not checking against a guess peg that's already been matched?\n if (s.marksArray[index] === 0 && s.matchedArray[next] === 0) {\n // check if the colours match\n Mastermind.updateReds(index, next);\n }\n }\n });\n }", "title": "" }, { "docid": "e00ce086678e433f374f8cd6e6376672", "score": "0.5244703", "text": "function highlightRook(x,y, figure, color){\r\n\tcoordy = letters.indexOf(y);\r\n\tcoordx = parseInt(x)-1;\r\n\thiglightBeam(coordx,coordy,0,1, color);\r\n\thiglightBeam(coordx,coordy,1,0, color);\r\n\thiglightBeam(coordx,coordy,-1,0, color);\r\n\thiglightBeam(coordx,coordy,0,-1, color);\r\n\tfigure.parent(\"td\").addClass(\"highlight\");\r\n}", "title": "" }, { "docid": "a8914d3517c7e0364762acb2962f2f0b", "score": "0.52392316", "text": "function load_Score(){\r\n\t\t\t//2D Text\r\n\t\t\t\r\n\t\t\t//Player 1 Score\r\n\t\t\tP1Score=0;\r\n\t\t\ttext = \"Player 1: \"+P1Score;\r\n\t\t\tP1Texture = new THREEx.DynamicTexture(512,512)\r\n\t\t\tP1Texture.context.font\t= \"bolder 37px Verdana\";\r\n\t\t\tP1Texture.clear('Black').drawText(text, 12, 306, 'Red');\r\n\t\t\t//Adding Texture to the Scene\r\n\t\t\tDyGeometry = new THREE.PlaneGeometry( 7, 5, 1);\r\n\t\t\tDyMaterial = new THREE.MeshBasicMaterial({\r\n\t\t\t\tmap\t: P1Texture.texture\r\n\t\t\t});\r\n\t\t\tP1Mesh = new THREE.Mesh( DyGeometry, DyMaterial );\r\n\t\t\tP1Mesh.position.set(-5.9,4.65,35);\r\n\t\t\t//scene.add( P1Mesh );\r\n\t\t\t\r\n\t\t\t//Player 2 Score\r\n\t\t\tP2Score=0;\r\n\t\t\ttext = \"Player 2: \"+P2Score;\r\n\t\t\tP2Texture = new THREEx.DynamicTexture(512,512)\r\n\t\t\tP2Texture.context.font\t= \"bolder 37px Verdana\";\r\n\t\t\tP2Texture.clear('Black').drawText(text, 12, 306, 'DeepSkyBlue');\r\n\t\t\t//Adding Texture to the Scene\r\n\t\t\tDyGeometry = new THREE.PlaneGeometry( 7, 5, 1);\r\n\t\t\tDyMaterial = new THREE.MeshBasicMaterial({\r\n\t\t\t\tmap\t: P2Texture.texture\r\n\t\t\t});\r\n\t\t\tP2Mesh = new THREE.Mesh( DyGeometry, DyMaterial );\r\n\t\t\tP2Mesh.position.set(-1,4.65,35);\r\n\t\t\t//scene.add( P2Mesh );\r\n\t\t\t\r\n\t\t\t//Player 3 Score\r\n\t\t\tP3Score=0;\r\n\t\t\ttext = \"Player 3: \"+P3Score;\r\n\t\t\tP3Texture = new THREEx.DynamicTexture(512,512)\r\n\t\t\tP3Texture.context.font\t= \"bolder 37px Verdana\";\r\n\t\t\tP3Texture.clear('Black').drawText(text, 12, 306, 'Lime');\r\n\t\t\t//Adding Texture to the Scene\r\n\t\t\tDyGeometry = new THREE.PlaneGeometry( 7, 5, 1);\r\n\t\t\tDyMaterial = new THREE.MeshBasicMaterial({\r\n\t\t\t\tmap\t: P3Texture.texture\r\n\t\t\t});\r\n\t\t\tP3Mesh = new THREE.Mesh( DyGeometry, DyMaterial );\r\n\t\t\tP3Mesh.position.set(3.75,4.65,35);\r\n\t\t\t//scene.add( P3Mesh );\r\n\t\t\t\r\n\t\t\t//Player 4 Score\r\n\t\t\tP4Score=0;\r\n\t\t\ttext = \"Player 4: \"+P4Score;\r\n\t\t\tP4Texture = new THREEx.DynamicTexture(512,512)\r\n\t\t\tP4Texture.context.font\t= \"bolder 37px Verdana\";\r\n\t\t\tP4Texture.clear('Black').drawText(text, 12, 306, 'DarkViolet');\r\n\t\t\t//Adding Texture to the Scene\r\n\t\t\tDyGeometry = new THREE.PlaneGeometry( 7, 5, 1);\r\n\t\t\tDyMaterial = new THREE.MeshBasicMaterial({\r\n\t\t\t\tmap\t: P4Texture.texture\r\n\t\t\t});\r\n\t\t\tP4Mesh = new THREE.Mesh( DyGeometry, DyMaterial );\r\n\t\t\tP4Mesh.position.set(8.5,4.65,35);\r\n\t\t\t//scene.add( P4Mesh );\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\ttext = \"Player 1: 1\";\r\n\t\t\tdynamicTexture.clear('Black').drawText(text, 12, 306, 'Red')\r\n\t\t\tP1Mesh.material. map= dynamicTexture.texture;\r\n\t\t\t**/\r\n\t\t\t//Source for 2D Text\r\n\t\t\t//http://learningthreejs.com/blog/2014/05/02/easy-to-use-dynamic-texture-to-write-text-in-your-3d-object-with-threex-dot-dynamictexture-game-extensions-for-three-dot-js/\r\n\t\t\t//https://github.com/jeromeetienne/threex.dynamictexture\r\n\t\t}", "title": "" }, { "docid": "73d1811eb5b05daa444e92553cf1f11f", "score": "0.52388513", "text": "renderScore(){\n \t\tvar indents = [];\n \t\tfor (var i = 0; i < this.props.game.state.remainingLives; i++) {\n \t\t indents.push(<span className=\"coin\" key={\"coin-\"+i}>\n \t \t\t\t\t\t\t<img alt=\"\" src={require(\"../images/ui/coin.svg\")} />\n \t \t\t\t\t\t</span>);\n \t\t}\n \t\t for (var j = i; j < this.props.game.state.defaultNumberOfLives; j++) {\n \t\t indents.push(<span className=\"coin\" key={\"coin-\"+j}>\n \t \t\t\t\t\t\t<img alt=\"\" src={require(\"../images/ui/coinOff.svg\")} />\n \t \t\t\t\t\t</span>);\n \t\t} \n \t\treturn indents;\n \t}", "title": "" }, { "docid": "1b2a5280b58334571a555066468b7da0", "score": "0.5236011", "text": "function getFrontColor(){\n\treturn cube.front.squares[4].color;\n}", "title": "" }, { "docid": "08bd3651271794ba0e6b52c99c0f7f3f", "score": "0.52323234", "text": "function highlight(props){\n //change stroke\n var selected = d3.selectAll(\".\" + props.GEOID)\n .style(\"stroke\", \"gold\")\n .style(\"stroke-width\", \"2\");\n //add popup on hover\n setLabel(props);\n}", "title": "" }, { "docid": "044db5c3dbdf4a4d18f7cb82ed78d7ac", "score": "0.5226232", "text": "function drawScore() {\n\t\tctx.font = \"18px Arial\";\n\t\tctx.fillStyle = \"black\";\n\t\tctx.fillText(\"Score: \"+score, 8, 20);\n\t}", "title": "" }, { "docid": "80cc4a360afee57e6f675d521d0b285c", "score": "0.5219551", "text": "function checkHighlight() {\r\n\tif (mouseTarget) {\r\n\t\tvar project = getProject(mouseTarget);\r\n\t\t// if tool active, restrict to its home canvas\r\n\t\tif (project && (project===toolProject || !(tool))) {\r\n\t\t\tvar point = view2project(project.view, \r\n\t\t\t\t\tmousePageX,\r\n\t\t\t\t\tmousePageY);\r\n\t\t\t/* Hit test doesn't seem to work by default on Text, or on groups\r\n\t\t\tvar options = { tolerance:2, fill:true, stroke:true, segments: true };\r\n\t\t\tvar res = project.hitTest(point, options);\r\n\t\t\tconsole.log('highlight test at '+point+' -> '+res);\r\n\t\t\tvar item = (res) ? res.item : null;\r\n\t\t\t*/\r\n\t\t\t//console.log('highlight test at '+point+' in '+project);\r\n\t\t\t\r\n\t\t\tvar tolerance = 2/project.view.zoom;\r\n\t\t\tvar items = new Array();\r\n\t\t\tvar children = project.layers[0].children;\r\n\t\t\tif ((project===objectDetailProject || project===objectOverviewProject) && children.length>0)\r\n\t\t\t\t// look inside top-level group in object editor\r\n\t\t\t\tchildren = children[0].children;\r\n\t\t\tfor (var ci=0; ci<children.length; ci++) {\r\n\t\t\t\tvar c = children[ci];\r\n\t\t\t\tvar grandchildren = [c];\r\n\t\t\t\tvar testpoint = point;\r\n\t\t\t\t// look inside sequences\r\n\t\t\t\tif (c.children && c.children['frames']) {\r\n\t\t\t\t\tvar frames = c.children['frames'];\r\n\t\t\t\t\tgrandchildren = frames.children;\r\n\t\t\t\t\tvar invcmat = c.matrix.createInverse();\r\n\t\t\t\t\tif (invcmat==null) {\r\n\t\t\t\t\t\tconsole.log('could not get inverse of sequence matrix');\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar invfmat = frames.matrix.createInverse();\r\n\t\t\t\t\tif (invfmat==null) {\r\n\t\t\t\t\t\tconsole.log('could not get inverse of sequence frames matrix');\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar matrix = invcmat.concatenate(invfmat);\r\n\t\t\t\t\ttestpoint = matrix.transform(point);\r\n\t\t\t\t\t//console.log('in sequence, point '+point+' -> '+testpoint+' via '+matrix+' ('+invcmat+', '+invfmat+')');\r\n\t\t\t\t}\r\n\t\t\t\tfor (var gci=0; gci<grandchildren.length; gci++) {\r\n\t\t\t\t\tvar gc = grandchildren[gci];\r\n\t\t\t\t\tvar bounds = gc.bounds;\r\n\t\t\t\t\tif (testpoint.x>=bounds.left-tolerance &&\r\n\t\t\t\t\t\t\ttestpoint.x<=bounds.right+tolerance &&\r\n\t\t\t\t\t\t\ttestpoint.y>=bounds.top-tolerance &&\r\n\t\t\t\t\t\t\ttestpoint.y<=bounds.bottom+tolerance) {\r\n\t\t\t\t\t\titems.push(gc);\r\n\t\t\t\t\t\t//console.log('- hit '+ci+':'+c+' '+bounds+'+/-'+tolerance);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t//console.log('- missed '+ci+':'+c+' '+bounds+'+/-'+tolerance);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar item = (items.length>0) ? items[items.length-1] : null;\r\n\t\t\tif (item) {\r\n\t\t\t\tif (item===highlightItem && project===highlightProject) \r\n\t\t\t\t\t; // no-op\r\n\t\t\t\telse {\r\n\t\t\t\t\tclearHighlight();\r\n\t\t\t\t\tproject.activate();\r\n\t\t\t\t\thighlight(project, item);\r\n\t\t\t\t\tredraw(paper);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tclearHighlight();\r\n\t\t}\r\n\t\telse\r\n\t\t\tclearHighlight();\r\n\t}\r\n\telse\r\n\t\tclearHighlight();\r\n}", "title": "" }, { "docid": "0c3bc6535e974dfe387421240fad4d1e", "score": "0.521382", "text": "get highlightingHandled() {\r\n return this.i.d;\r\n }", "title": "" }, { "docid": "1476af3fc3a5eea44faec08fbce02070", "score": "0.52137786", "text": "function highlight() {\n\t\tthis.style.backgroundColor = \"#5B6D7F\";\n\t}", "title": "" }, { "docid": "fa05c03557d7a7e3715e644675bc06d4", "score": "0.52126753", "text": "get selectedItemHoverTextColor() {\n return brushToString(this.i.h9);\n }", "title": "" }, { "docid": "16ed313628ec0acd94c1823dd8640120", "score": "0.52097034", "text": "get outline() {\n return brushToString(this.i.ap);\n }", "title": "" }, { "docid": "f83829d395a09ebf527f8744597ad18a", "score": "0.5201343", "text": "displayScore(){\n this.ctx.font = '18px sans-serif';\n this.ctx.fillStyle = 'black';\n this.ctx.fillText(\"Score: \" + this.score, 8, 20);\n }", "title": "" }, { "docid": "6ddf1dc279a0da0efd8f615b44c35ecd", "score": "0.5199088", "text": "function drawScore() {\n\n\tnoStroke();\n fill(255);\n textSize(30);\n textAlign(LEFT);\n text(score, 50, 100);\n}", "title": "" }, { "docid": "01a11bb0dbb419832d8a49c11f122a7e", "score": "0.51957244", "text": "function drawScore(){\r\n\t\tctx.save();\r\n\t\tctx.font = \"bold 200px sans-serif\";\r\n\t\tctx.fillStyle = \"gray\";\r\n\t\tctx.textAlign = \"center\";\r\n\t\tctx.textBaseline = \"middle\";\r\n\t\tvar centerX = canvasWidth/2;\r\n\t\tvar centerY = canvasHeight/2;\r\n\t\tctx.fillText(score.toString(),centerX,centerY);\r\n\t\tctx.restore();\r\n\t}", "title": "" }, { "docid": "c8b75668f6b8b6f2f86679fbdd9f0b73", "score": "0.5191728", "text": "function createHighlight(currentSquare) {\n let currentColor = currentSquare.target.style.backgroundColor;\n let rgbArray = [];\n let newArray = [];\n\n // Takes square's current rgb and puts values into an array \n rgbArray = currentColor.substring(4, currentColor.length-1)\n .replace(/ /g, '')\n .split(',');\n\n\n\n if (state == \"shadow\") {\n for (i=0; i<3; i++){\n let newColor = Math.floor(rgbArray[i] - (rgbArray[i]*.1));\n newArray.push(newColor)\n \n }\n\n\n } else if (state == \"lighten\") {\n for (i=0; i<3; i++){\n let newColor = Math.floor(Number(rgbArray[i]) + (Number(rgbArray[i])*.1));\n newArray.push(newColor)\n }\n\n } \n\n let newArrayString = newArray.toString()\n\n let newRGB = `rgb(${newArrayString})`\n return newRGB\n}", "title": "" }, { "docid": "4a75300fe52897aa7190d915972e29f0", "score": "0.5185899", "text": "function showScore(activePlayer){\n\n \nif(activePlayer['score'] > 21){ // stops the players hitting more \n document.querySelector(activePlayer['ScoreSpan']).textContent = \"Busted@!!!!\"\n document.querySelector(activePlayer['ScoreSpan']).style.color = 'Red'\n}else{ // otherwise show the actiev score\n document.querySelector(activePlayer['ScoreSpan']).textContent = activePlayer['score'];\n }\n \n}", "title": "" }, { "docid": "1aedf8b25a209c6f469c3573ce916e66", "score": "0.51855856", "text": "function mouseClicked() {\n // increment score by 1\n // STATE.score += 1;\n}", "title": "" }, { "docid": "ce5f50523e470f972b4daf3304b23f5b", "score": "0.51812506", "text": "highlight () {\n this.highlighted = true\n }", "title": "" }, { "docid": "ce5f50523e470f972b4daf3304b23f5b", "score": "0.51812506", "text": "highlight () {\n this.highlighted = true\n }", "title": "" }, { "docid": "d052632760b72dad80e2839e26e1ddd4", "score": "0.51774496", "text": "drawScore() {\n this.ctx.font = \"40px Arial\";\n this.ctx.fillStyle = \"#ffffff\";\n this.ctx.fillText(\"Score: \"+ this.score, 20, 50);\n }", "title": "" }, { "docid": "d4c113a8fa9a53836f1f2e763698afae", "score": "0.5174513", "text": "function updateScore() {\n\n if (score.highscore < score.current) {\n score.highscore = score.current;\n }\n\n ctx.font = 'bold 50px Arial';\n ctx.strokeStyle = '#000';\n ctx.lineWidth = 6;\n ctx.strokeText(score.current, CANVAS_WIDTH / 2 - 20, 50);\n ctx.fillStyle = '#ffffff';\n ctx.fillText(score.current, CANVAS_WIDTH / 2 - 20, 50);\n}", "title": "" }, { "docid": "a32987831df7361c89fb56c3b5868280", "score": "0.517009", "text": "function renderScore() {\n if (hiScore !== null) {\n if (scoreBoard > hiScore) {\n localStorage.setItem('hiScore', scoreBoard);\n }\n }\n hiScore = +localStorage.getItem('hiScore');\n $('.scoreBoard').text('HiScore:' + hiScore + \" Score:\" + scoreBoard);\n }", "title": "" }, { "docid": "18584bea8746bfbfe394af145fab69a6", "score": "0.516997", "text": "function showScores() {}", "title": "" }, { "docid": "9a64ce56ab3954b5ed505d1956385fc9", "score": "0.5166995", "text": "function highlight(props){\n //change stroke\n var selected = d3.selectAll(\".\" + props.SOVEREIGNT)\n .style(\"stroke\", \"blue\")\n .style(\"stroke-width\", \"2px\");\n setLabel(props);\n }", "title": "" }, { "docid": "c09e7711cd8c082cdf520b949549da4e", "score": "0.51658374", "text": "get score() {\n\t\treturn this.__score;\n\t}", "title": "" }, { "docid": "c92b2bc7cd8d99a2f38cdb283d310cc3", "score": "0.51632094", "text": "function score() {\n let score = gamePattern.length - 1;\n document.getElementById(\"score\").innerText = score * 10;\n }", "title": "" }, { "docid": "98a6c77cef32872af702a7a52ab0da58", "score": "0.5161774", "text": "get materials() {\n return this[$materials];\n }", "title": "" }, { "docid": "f42ec57cdff5474f61f0d74f34233958", "score": "0.5158525", "text": "showIndice(){\n const indicesArray = this.triesArray[this.lastTry].compareCombinaisons(this.winCombinaison);\n this.triesArray[this.lastTry].colorIndices(indicesArray);\n }", "title": "" }, { "docid": "d850183fd37b01bc6feda1895ff8afb1", "score": "0.51563936", "text": "startMaterials() {\r\n this.redAppearence = new CGFappearance(this.scene);\r\n this.redAppearence.setAmbient(0.3, 0.3, 0.3, 1);\r\n this.redAppearence.setDiffuse(0.9, 0.9, 0.9, 1);\r\n this.redAppearence.setSpecular(0.1, 0.1, 0.1, 1);\r\n this.redAppearence.setShininess(10);\r\n this.redAppearence.loadTexture(\"scenes/images/red.jpg\");\r\n\r\n this.greyAppearence = new CGFappearance(this.scene);\r\n this.greyAppearence.setAmbient(0.3, 0.3, 0.3, 1);\r\n this.greyAppearence.setDiffuse(0.9, 0.9, 0.9, 1);\r\n this.greyAppearence.setSpecular(0.1, 0.1, 0.1, 1);\r\n this.greyAppearence.setShininess(10);\r\n this.greyAppearence.loadTexture(\"scenes/images/dark-grey.jpg\");\r\n }", "title": "" }, { "docid": "52689374464f4d98d7179237321331d8", "score": "0.5155947", "text": "get highlightColor() {\n return super.highlightColor || DEFAULT_HIGHLIGHT_COLOR;\n }", "title": "" }, { "docid": "eac4f09b72aeac1bccbb2a1b31c58954", "score": "0.5155484", "text": "function changeScore(e) {\n // var item = $.reviewItemList.sections[0].items[e.itemIndex];\n // item.score.text = Math.round(this.getValue()); // Math.round(this.getValue() * 100) / 100;\n // $.reviewItemList.sections[0].updateItemAt(e.itemIndex, item);\n \n if(e.itemIndex === 0) review.personality.scores[0] = \n Math.round(this.getValue());\n \n if(e.itemIndex === 1) review.technique.scores[0] = \n Math.round(this.getValue());\n \n if(e.itemIndex === 2) review.tactics.scores[0] = \n Math.round(this.getValue());\n \n if(e.itemIndex === 3) review.physical.scores[0] = \n Math.round(this.getValue());\n}", "title": "" }, { "docid": "e26ed293a6759543cce604f108d1a29f", "score": "0.51467824", "text": "function drawScore() {\n // set features first, so they are active when the text is drawn\n ctx.font = '16px Arial';\n ctx.fillStyle = '#0095DD';\n ctx.fillText('Score: ' + score, 8, 20);\n ctx.fillText('Hi Score: ' + hiScore, 98, 20);\n}", "title": "" }, { "docid": "38194ce37df153403fe197199f28339f", "score": "0.5144623", "text": "get outlinedSelectedItemHoverTextColor() {\n return brushToString(this.i.h5);\n }", "title": "" }, { "docid": "6ad74976fe49ec088b7fe0f3794340eb", "score": "0.51415634", "text": "[THUMBPRINT_MATERIAL] () {\n return { crv: this.crv, kty: 'EC', x: this.x, y: this.y }\n }", "title": "" }, { "docid": "6ad74976fe49ec088b7fe0f3794340eb", "score": "0.51415634", "text": "[THUMBPRINT_MATERIAL] () {\n return { crv: this.crv, kty: 'EC', x: this.x, y: this.y }\n }", "title": "" }, { "docid": "c12c421601b2d31a70d556809490ea75", "score": "0.5137539", "text": "onHighlightQuestion() {\n this.props.highlight(this.props.qId);\n }", "title": "" }, { "docid": "0bb6902ac466a9dbe89d77431a5b1149", "score": "0.5135826", "text": "function googlify() {\n var selection = DocumentApp.getActiveDocument().getSelection();\n var selectedElements = selection.getSelectedElements();\n for (var i = 0; i < selectedElements.length; ++i) {\n var selectedElement = selectedElements[i];\n var text = selectedElement.getElement();\n var letters = selectedElement.getElement().getText();\n for(var j = 0 ; j< letters.length-1; j++)\n {\n text.setForegroundColor(j, j+1, getGoogleColour(j))\n }\n }\n}", "title": "" }, { "docid": "f85ad4a56aa65490874ef6c6ac944c2d", "score": "0.5135616", "text": "get outlinedSelectedItemHoverBackgroundColor() {\n return brushToString(this.i.h4);\n }", "title": "" }, { "docid": "3ad529c2fcbb8c013dd3a65f4b411058", "score": "0.5135448", "text": "get score(){return this._score;}", "title": "" }, { "docid": "230a91cebb55f4763e68ff47da35975f", "score": "0.5135379", "text": "function displayScore() {\n push();\n fill(255);\n textSize(64);\n textAlign(LEFT,BOTTOM);\n text(\"SCORE:\" + tiger.preyEaten, 0, height);\n pop();\n}", "title": "" }, { "docid": "ce2a717501a07a2481f85c5f2e9c6c3c", "score": "0.51351863", "text": "getRed() {\n\t\treturn this.red;\n\t}", "title": "" }, { "docid": "08be8cc9f5bc5c399041fe805a9e1d39", "score": "0.51351273", "text": "function updateScore(){\n blueScore=0;\n redScore=0;\n for(var i = 0;i<8;i++){\n for(var j = 0;j<8;j++){\n if(grid[i][j]==1){\n blueScore++;\n }\n if(grid[i][j]==2){\n redScore++;\n }\n }\n }\n setText(\"blueScoreBox\",\"\"+blueScore);\n setText(\"redScoreBox\",\"\"+redScore);\n}", "title": "" }, { "docid": "3b406798188b46bf402f7523970a98bd", "score": "0.5135065", "text": "function btnPress() {\n score++;\n scr.edit(score);\n}", "title": "" } ]
f05960d87aecf3c971835191f2eff410
load template from absolute URL
[ { "docid": "e577ceffa270345806c8e0279a1aa69e", "score": "0.70539564", "text": "function loadTemplateFromURL(templateURL, callback, presentationType) {\n var self = this;\n\n evaluateScripts([templateURL], function(success) {\n if (success) {\n var resource = Template.call(self);\n callback.call(self, resource, presentationType);\n } else {\n var message = `There was an error attempting to load the resource '${resource}' with URL: '${templateURL}'. \\n\\n Please try again later.`\n\n removeLoadingIndicator();\n if (kitchenErrorHandler !== undefined) {\n kitchenErrorHandler(message);\n }\n }\n });\n}", "title": "" } ]
[ { "docid": "63b0117ec515626a9725c9a6069a6668", "score": "0.7177681", "text": "function loadTemplate(url) {\n var templateCache = window._templateCache = window._templateCache || {};\n\n if (templateCache[url]) {\n return templateCache[url];\n }\n\n return $.ajax(url, {\n dataType : 'text',\n success : function(tpl) {\n templateCache[url] = tpl;\n }\n });\n}", "title": "" }, { "docid": "63b0117ec515626a9725c9a6069a6668", "score": "0.7177681", "text": "function loadTemplate(url) {\n var templateCache = window._templateCache = window._templateCache || {};\n\n if (templateCache[url]) {\n return templateCache[url];\n }\n\n return $.ajax(url, {\n dataType : 'text',\n success : function(tpl) {\n templateCache[url] = tpl;\n }\n });\n}", "title": "" }, { "docid": "333fafaeac316b1c4aa22652caeb6405", "score": "0.7124487", "text": "function loadTemplate() {\n\t\t\tvar $tpl = /^</.test(settings.template)\n\t\t\t\t? settings.template\n\t\t\t\t: $(\"#\" + settings.template).html();\n\n\t\t\t//Append template to main container\n\t\t\t$el.html(us.template($tpl, settings));\n\t\t}", "title": "" }, { "docid": "1efad3317599d6159da50039ebe727f0", "score": "0.70668143", "text": "function loadTemplate(template) {\r\n return fs.readFileSync(app.set('views') + template+ '.html')+ '';\r\n}", "title": "" }, { "docid": "14e1824467c219a2172f489686a1a5e0", "score": "0.69771254", "text": "loadTemplate(name) { return null; }", "title": "" }, { "docid": "51a643ed648143c5e7a1ae0869ae711d", "score": "0.69241554", "text": "function read_and_render_file(file_url, template) {\n ajax(\"GET\", file_url, {}, function (data) { render(template, data); }, render_error);\n}", "title": "" }, { "docid": "7e1e8a2fdcfea4ce8e68e5ef5e936e19", "score": "0.6913711", "text": "function loadTemplate(url) {\n var templateCache = window._templateCache = window._templateCache || {};\n var dfd = $.Deferred();\n\n if (templateCache[url]) {\n return templateCache[url];\n }\n\n $.ajax(url, {\n dataType : 'text',\n success : function(tpl) {\n templateCache[url] = _.template(tpl);\n dfd.resolve(templateCache[url]);\n }\n });\n\n return dfd.promise();\n}", "title": "" }, { "docid": "45ee001f297a56bb59e07c20ceea5293", "score": "0.6768374", "text": "function dslc_load_template( template ) {\n\n\t\tif ( dslcDebug ) console.log( 'dslc_load_template' );\n\n\t\tvar dslcModule, dslcModuleID;\n\n\t\tjQuery.post(\n\n\t\t\tDSLCAjax.ajaxurl,\n\t\t\t{\n\t\t\t\taction : 'dslc-ajax-load-template',\n\t\t\t\tdslc : 'active',\n\t\t\t\tdslc_template_id : template\n\t\t\t},\n\t\t\tfunction( response ) {\n\t\t\t\t\n\t\t\t\tjQuery('#dslc-main').html( response.output );\n\n\t\t\t\tdslc_carousel();\n\t\t\t\tdslc_module_dragdrop_init();\n\t\t\t\tdslc_option_changed();\n\t\t\t\tdslc_generate_code();\n\n\t\t\t}\n\n\t\t);\n\n\t}", "title": "" }, { "docid": "2b84c015f7859d8d9336cfce2f368548", "score": "0.6754611", "text": "function loadTemplate(templateName){\n $.get( 'templates/'+templateName+'.template.html', function( template ) {\n\t\tvar colorFlag = true;\n\t\tfor (var i in user.routes) {\n\t\t\tif (colorFlag) {\n\t\t\t\tuser.routes[i].colorValue = function () {\n\t\t\t\t\treturn \"mdl-color--white\";\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tuser.routes[i].colorValue = function () {\n\t\t\t\t\treturn \"mdl-color--grey-100\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolorFlag = !colorFlag;\n\t\t}\n //use mustache to bind the template and data\n var html = Mustache.to_html(template, user);\n //insert the resulting html in the element with id=\"page-content\"\n $('#page-content').html(html);\n\n /**\n * Now load the scripts into the scripts div\n */\n $.get( 'templates/'+templateName+'.scripts.html', function( template ) {\n var scripts = Mustache.to_html(template, user);\n $('#scripts').html(scripts);\n })\n .fail(function(){\n console.error(\"Error in call to loadTemplate(): couldn't find \" + templateName+\".scripts.html\");\n $('#scripts').html('');\n });\n });\n}", "title": "" }, { "docid": "12792ceeef01acd6e87f4842ef9c010f", "score": "0.6722925", "text": "function getTemplate() {\n var request = new XMLHttpRequest();\n request.open('GET', options.templateUrl, false);\n request.send(null);\n\n if (request.status !== 200) {\n throw new Error('ngRouteTester: Unable to download template file');\n }\n\n options.template = request.responseText;\n }", "title": "" }, { "docid": "fa4db95b1341ceb7a427fba38ff8f51c", "score": "0.6669112", "text": "function loadTemplate() {\n\t\t\ttemplate = /^</.test(settings.template) ? settings.template : $('#' + settings.template).html();\n\t\t\ttemplate = us.template(template, {uid : uid});\n\n\t\t\tif (settings.prepend) {\n $el.css({overflow: settings.overflow}).prepend(template);\n\t\t\t}\n\t\t\telse {\n $el.css({overflow: settings.overflow}).append(template);\n }\n\t\t}", "title": "" }, { "docid": "aab4bf076683c82e4326028c59b23c0d", "score": "0.65827644", "text": "function loadTemplate(callback) {\n // get request for user controls templates\n $.get('inc/js/templates/controls.mustache', function(data) {\n // here we go the data, this is what we need\n template = data;\n });\n\n // get request for footer template\n $.get('inc/js/templates/footer.mustache', function(data) {\n // here we go the data, this is what we need\n footerTemplate = data;\n });\n\n // callback after all\n callback();\n }", "title": "" }, { "docid": "468995c878ff4de68f5d063f8460cc30", "score": "0.65811384", "text": "function templateLoad(templatePath,dataPath,renderLocation){\n console.log(dataPath);\n console.log(templatePath);\n console.log(renderLocation);\n jQuery.ajax({\n url: dataPath,\n data: '{}',\n type:\"get\",\n dataType:'json',\n success: function (data) {\n jQuery.get(templatePath+\"?v=\"+Math.random(), function(template) {\n var rendered = Handlebars.compile(template);\n var result = rendered(data);\n jQuery(renderLocation).html(result);\n noSessions(); });\n },\n error: function (xhr, status) {\n /*Error*/\n //console.log(\"There is an error\");\n }\n });\n}", "title": "" }, { "docid": "511375cf6aa4f82694365457a86bf246", "score": "0.65400714", "text": "function loadTemplate( templateName , data , entry , callback ){\n\n\t// console.log(templateName, data);\n\n $.ajax({\n\t\turl : \"/hb-template/\" + templateName + \".tpl\" ,\n\t\tdataType: \"text\",\n\t\tsuccess : function (source) {\n \n\t\t\tvar template = Handlebars.compile(source);\n\t\t\tvar html = template(data);\n\t\t\t/* put html string into entry */\n\t\t\tentry.html( html );\t\n\t\t\tif(callback){\n\t\t\t\tcallback();\t\n\t\t\t}\n\t\t\t\n\n }\n });\n \n}", "title": "" }, { "docid": "d365efc53386d87fa803ea047e87b21c", "score": "0.6497668", "text": "function loadTemplate(name, data) {\n /* Check template cache to see if template has been loaded. If so, immediately call displayTemplate() */\n if (templatesCache[name]) {\n displayTemplate(templatesCache[name], data);\n }\n else {\n /* If template is not in cache, use Ajax to fetch template, then store in cache and call displayTemplate() */\n $.get('/views/' + name + '.ejs', function(template) {\n templatesCache[name] = template;\n displayTemplate(template, data);\n });\n }\n }", "title": "" }, { "docid": "c8c45d36c1297e181302495db30c5c86", "score": "0.64277506", "text": "function loadTemplate(template) {\n if (template.href) {\n return $resource(template.href).get().$promise;\n } else {\n return $q.when({\n items: TemplateService.parseToForm($scope.item, template)\n });\n }\n }", "title": "" }, { "docid": "c4bba8c3f9952622e6fc40e367b43b80", "score": "0.634497", "text": "function loadTemplate(page, templateName) {\n let templateUrl = `./resources/views/${page}/${templateName}.handlebars`;\n\n return new Promise(function (resolve, reject) {\n $.ajax({\n url: templateUrl,\n success: function (data) {\n let template = Handlebars.compile(data);\n resolve(template);\n },\n error: function (err) {\n reject(err);\n }\n })\n });\n}", "title": "" }, { "docid": "7913e47b08e03ff43e3ef1b8f98423f7", "score": "0.63246554", "text": "function viewTemplate(templatePath){\n window.open(contextPath + templatePath + \"?static\");\n}", "title": "" }, { "docid": "966ad127019e1fe978cee7a6dba35ae0", "score": "0.630875", "text": "function loadTemplate(some_div){\n\tvar stdCor = \"templates/studentCorrected.html\";\n\tajax(stdCor, \"GET\", function(){\n\t\tif(this.readyState == 4 && this.status == 200){\n\t\t\tsome_div.innerHTML = this.responseText;\n\t\t}\n\t})\n}", "title": "" }, { "docid": "ba9ee757ba6b5a9e9bcf506f0fa40092", "score": "0.62953323", "text": "function load(template) {\n return new Promise(function (resolve, reject) {\n var promise = Benchpress.loader(template, function (templateFunction) {\n resolve(templateFunction);\n });\n\n if (promise && promise.then) {\n promise.then(resolve, reject);\n }\n });\n }", "title": "" }, { "docid": "9af298b8e64253e3cfa29fa3e6847ddf", "score": "0.62635946", "text": "function loadTemplate(name) {\n return new Promise(function (resolve) {\n if (!(name in deferredTemplates)) {\n deferredTemplates[name] = _jquery.Deferred();\n }\n\n deferredTemplates[name].then(function (template) {\n resolve(template);\n });\n\n if (port) {\n port.postMessage({\n type: \"template\",\n message: name\n });\n } else {\n portDeferred.then(function (messagePort) {\n messagePort.postMessage({\n type: \"template\",\n message: name\n });\n });\n }\n });\n }", "title": "" }, { "docid": "1022bfd58da534220a247dd414f95095", "score": "0.6230032", "text": "async function loadTemplates(path) {\r\n\tlet txt = await fetch(path).then((res) => res.text());\r\n\tlet html = new DOMParser().parseFromString(txt, \"text/html\");\r\n\tlet templates = html.querySelectorAll(\"template\");\r\n\r\n\ttemplates.forEach((template) => {\r\n\t\tdocument.head.appendChild(template);\r\n\t});\r\n}", "title": "" }, { "docid": "71a78a64b81c24bda5c4e747b4f4c652", "score": "0.6169882", "text": "function loadTemplate(url, options, callback) {\n var env = new less.tree.parseEnv(less);\n // To reduce property collision, place all browser settings into their own property.\n env.browser = {};\n if (options) {\n env.browser.templateLoaderOptions = options.templateLoaderOptions || {};\n if (options.prependVars) {\n env.browser.prependScript = serializeVars(options.prependVars);\n }\n if (options.appendVars) {\n env.browser.appendScript = serializeVars(options.appendVars);\n }\n }\n\n retrieveResourcesAndCalculateCSS(url, env, function (err, css, absoluteURL) {\n if (err) {\n return callback(describeError(err, absoluteURL));\n } else {\n var render = function(cb) {\n createCSS(absoluteURL, css, function (err, style) {\n if (err) {\n cb(describeError(err, absoluteURL));\n } else {\n cb(null, style, absoluteURL);\n }\n });\n };\n\n callback(null, render);\n }\n });\n}", "title": "" }, { "docid": "2f42689d8035328d85b73c3253bbae0c", "score": "0.615253", "text": "function loadVulcanizedTemplate() {\n let templatePath;\n const dataBaseUrl =\n document.querySelector('body').getAttribute('data-base-url');\n // Jupyter Classic\n if (dataBaseUrl) {\n templatePath = dataBaseUrl + 'nbextensions/tensorflow_model_analysis/';\n }\n // Jupyter Lab\n else if (window['isJupyterLab']) {\n let baseUrl = '/';\n const jupyterConfigData = document.getElementById('jupyter-config-data');\n if (jupyterConfigData) {\n const configData = JSON.parse(jupyterConfigData.textContent || '');\n if (configData) {\n baseUrl = configData['baseUrl'] || '/';\n }\n }\n\n templatePath = baseUrl + 'nbextensions/tensorflow_model_analysis/';\n }\n // Kubeflow\n else {\n templatePath = __webpack_public_path__;\n }\n // templatePath ends with a slash.\n const templateLocation = `${templatePath}vulcanized_tfma.js`;\n\n // If the vulcanizes tempalets are not loaded yet, load it now.\n if (!document.querySelector('script[src=\"' + templateLocation + '\"]')) {\n const script = document.createElement('script');\n script.setAttribute('src', templateLocation);\n document.head.appendChild(script);\n }\n}", "title": "" }, { "docid": "0cc69aa72fe6fc3311cbb433f3085db8", "score": "0.61185664", "text": "async function loadPageTemplate( origin, pageType ) {\n const fdb = await origin.fdb;\n const path = `_templates/page-${pageType}.html`;\n const record = await fdb.read( path );\n if( !record ) {\n return undefined;\n }\n const { page } = record;\n if( !page ) {\n return undefined;\n }\n return page.body;\n}", "title": "" }, { "docid": "f567895c72a53f884d96317f6d7736e1", "score": "0.6055513", "text": "function load(req, res, next, id) {\n Template.get(id)\n .then((template) => {\n req._template = template; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "title": "" }, { "docid": "252fef0eb6270294a9ebb87b133ac70b", "score": "0.60249716", "text": "loadTemplate() {\n const templateData = fs.readFileSync(\n path.resolve(__dirname, `../templates/controllers/controller.js`),\n 'utf-8'\n );\n this.templateData = templateData;\n }", "title": "" }, { "docid": "f561e64fd5d2d5341f878b5669376f26", "score": "0.5979671", "text": "function loadTemplate() {\n\t\t\tvar template = settings.template, $clone;\n\n\t\t\t$tpl = template === 'internal' ? null : (/^</.test(template) ? template : $('#' + template).html());\n\n\t\t\tif (!$tpl) {\n\t\t\t\tif (template === 'none') {\n\t\t\t\t\t//do nothing\n\t\t\t\t}\n\t\t\t\telse if (template === 'empty') {\n\t\t\t\t\t$tpl = '<%= caption %>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//Use HTML which is already appended to the label\n\t\t\t\t\t$clone = $el.clone();\n\n\t\t\t\t\tif ($clone.hasClass('js-caption') || $clone.hasClass('js-button-caption')) {\n\t\t\t\t\t\t$tpl = $clone.text('%caption');\n\t\t\t\t\t}\n\t\t\t\t\telse if ($clone.find('.js-button-caption').length) {\n\t\t\t\t\t\t$tpl = $clone.find('.js-button-caption').text('%caption');\n\t\t\t\t\t}\n\t\t\t\t\telse if ($clone.find('.js-caption').length) {\n\t\t\t\t\t\t$tpl = $clone.find('.js-caption').text('%caption');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (Game.dev) {\n\t\t\t\t\t\t\tthrow 'Please specify \"js-caption\" css class on the node where caption should be placed. Otherwise please use template=\"empty\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//small workaround because jQuery doesn't allow to put <> in the .text()\n\t\t\t\t\t$tpl = $clone.html().toString().replace('%caption', '<%= caption %>');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Append template to main container\n\t\t\tif (template !== 'none') {\n\t\t\t\t$el.html(us.template($tpl, settings));\n\t\t\t}\n\n\t\t\t//Bind events\n\t\t\tbindEvents();\n\t\t}", "title": "" }, { "docid": "46024bd5a24da8f9892d8816f48445f4", "score": "0.5963184", "text": "load(url = this.url) {\n return Promise((resolve, reject) => {\n if (this.html) {\n resolve(this.contents)\n } else {\n request.get(url, (error, response, body) => {\n if (!error && response.statusCode === 200) {\n reject(error)\n } else {\n resolve(body)\n }\n })\n }\n })\n }", "title": "" }, { "docid": "1a18dd541e72f198f22a2eac8dedf607", "score": "0.58973897", "text": "function loadTemplates(templates) {\n $(templates).each(function() {\n var tempObj = $('<script>');\n tempObj.attr('type', 'text/x-handlebars');\n var dataTemplateName = this.substring(0, this.indexOf('.'));\n tempObj.attr('data-template-name', dataTemplateName);\n $.ajax({\n async: false,\n type: 'GET',\n url: 'js/views/' + this,\n success: function(resp) {\n tempObj.html(resp);\n $('body').append(tempObj);\n }\n });\n });\n\n}", "title": "" }, { "docid": "858ca3ea5d9af3c4bdb1137df456c324", "score": "0.5890212", "text": "function loadTemplate(templateName, currentPath, data) {\r\n if (typeof(data) === 'undefined') {\r\n data = {};\r\n }\r\n\r\n data['current'] = currentPath;\r\n\r\n console.log(data['current']);\r\n\r\n var template = Handlebars.compile($(\"#\" + templateName + \"-template\").html());\r\n $(\"#container\").html(template(data));\r\n}", "title": "" }, { "docid": "0c830da38d614264e96d467f788a217e", "score": "0.5885461", "text": "function obtainTemplate_(url, nocache, readmeDoc) {\n // Logger.log(\"obtainTemplate_(%s) called\", url);\n\n // we're actually running within a single script invocation so maybe we should find a more intelligent way to cache within a single session.\n // otherwise this risks not picking up changes\n\n if (url.match(/^http/)) {\n\tif (nocache != true) {\n\t var cache = CacheService.getDocumentCache();\n\t var cached = cache.get(url);\n\t if (cached != null) {\n\t\treturn HtmlService.createTemplate(cached);\n\t }\n\t}\n\n\ttry {\n\t var result = UrlFetchApp.fetch(url, { headers: { \"Accept-Encoding\": \"identity\" } } );\n\t} catch (e) {\n\t Logger.log(\"ERROR: caught error (%s) while fetching %s\", e, url);\n\t}\n\tif (result == undefined) {\n\t try {\t \n\t\tresult = UrlFetchApp.fetch(url, { headers: { \"Accept-Encoding\": \"identity\" } } );\n\t } catch (e) {\n\t\tLogger.log(\"ERROR: caught error (%s) while fetching %s for the second time!\", e, url);\n\t\tthrow (\"during obtainTemplate_(\" + url + \"): \" + e);\n\t }\n\t}\n\t \n\t// by default the good people at Github Pages will gzip compress if we don't explicitly set this\n\n\tvar contents = result.getContentText();\n\n\tif (result.getResponseCode() != 200) {\n\t if (readmeDoc) { readmeDoc.getBody().appendParagraph(\"obtainTemplate(\" + url + \") returned response code \" + result.getResponseCode()); }\n\t result = UrlFetchApp.fetch(url, { headers: { \"Accept-Encoding\": \"identity\" } } );\n\t contents = result.getContentText();\n\t if (readmeDoc) { readmeDoc.getBody().appendParagraph(\"obtainTemplate(\" + url + \") second try returned response code \" + result.getResponseCode()); }\n\t}\n\t\n\tif (! contents || ! contents.length) {\n\t if (readmeDoc) {\n\t\treadmeDoc.getBody().appendParagraph(\"obtainTemplate(\" + url + \") returned no contents\"); \t Logger.log(\"obtainTemplate(\" + url + \") returned no contents\");\n\t\treadmeDoc.getBody().appendParagraph(JSON.stringify(result.getAllHeaders())); Logger.log(\"obtainTemplate(\" + url + \") headers: \" + result.getAllHeaders());\n\t }\n\t throw(\"received zero-length content when fetching \" + url);\n\t}\n\t\n\t// the cache service can only store keys of up to 250 characters and content of up to 100k, so over that, we don't cache.\n\tif (nocache != true && contents.length < 100000 && url.length < 250) {\n\t cache.put(url, contents, 300);\n\t // a run of the google script may take up to 5 minutes, so cache for that time.\n\t // if you're hot and heavy with the updates, set nocache:true in the sourceTemplate properties.\n\t}\n\t// Logger.log(\"obtained template %s, length %s bytes\", url, contents.length);\n\treturn HtmlService.createTemplate(contents);\n }\n else return HtmlService.createTemplateFromFile(url);\n}", "title": "" }, { "docid": "807c2b760f87d026bb3293ec70fce865", "score": "0.586664", "text": "function loadTemplates(templates) {\n $(templates).each(function() {\n var tempObj = $('<script>');\n tempObj.attr('type', 'text/x-handlebars');\n var dataTemplateName = this.substring(0, this.indexOf('.'));\n tempObj.attr('data-template-name', dataTemplateName);\n $.ajax({\n async: false,\n type: 'GET',\n url: '/templates/' + this,\n success: function(resp) {\n tempObj.html(resp);\n $('body').append(tempObj);\n }\n });\n })\n}", "title": "" }, { "docid": "f9b1fc9bac502aeb455fe7270cd0605c", "score": "0.5845005", "text": "function makeTemplate(database) {\n $.get('../inc/booktemplate.html', function(template) {\n var rendered = Mustache.render(template, database);\n $('.book-case').html(rendered);\n });\n}", "title": "" }, { "docid": "2a5e6b647b4829809bf930e224262200", "score": "0.58438283", "text": "function loadURL(path) {\r\n }", "title": "" }, { "docid": "fa8c0fdd055e63e64e7ef7deb2b32dec", "score": "0.58322686", "text": "function LoadPage(pageName) {\n $.get('/' + pageName + '?notemplate=true', function (data) {\n $('#content-outer').html(data);\n });\n}", "title": "" }, { "docid": "9cab7884cc9c0b3d0d97ea5c0098606f", "score": "0.58223087", "text": "function getTemplateAjax(path, callback) {\n var source, template;\n jqueryNoConflict.ajax({\n url: path,\n success: function (data) {\n source = data;\n template = Handlebars.compile(source);\n if (callback) callback(template);\n }\n });\n}", "title": "" }, { "docid": "9cab7884cc9c0b3d0d97ea5c0098606f", "score": "0.58223087", "text": "function getTemplateAjax(path, callback) {\n var source, template;\n jqueryNoConflict.ajax({\n url: path,\n success: function (data) {\n source = data;\n template = Handlebars.compile(source);\n if (callback) callback(template);\n }\n });\n}", "title": "" }, { "docid": "f164aa1972854cb917776a12799bd0ff", "score": "0.5818429", "text": "function getTemplateAjax(path, callback) {\n var source;\n var template;\n\n jqueryNoConflict.ajax({\n url: path,\n success: function(data) {\n source = data;\n template = Handlebars.compile(source);\n if (callback) callback(template);\n }\n });\n }", "title": "" }, { "docid": "bb64566922cf51e2452f583f2b30c6d1", "score": "0.57970595", "text": "getTemplate(templateName, data={}, cb) {\n const validTemplateName = helpers.auditParam(templateName);\n const validDataObj = helpers.auditParam(data, 'object', null);\n\n if (validTemplateName && validDataObj) {\n const templatesDir = path.join(__dirname,'/../templates');\n fs.readFile(`${templatesDir}/${templateName}.html`, 'utf8', (err, htmlString) => {\n const templateContainsNonEmptyString = helpers.auditParam(htmlString);\n if (!err && templateContainsNonEmptyString) {\n // Do interpolation on the string\n const interpolatedString = helpers.interpolate(htmlString, data);\n cb(false, interpolatedString);\n }\n else cb('No template could be found');\n });\n } else cb('A valid template name was not specified');\n }", "title": "" }, { "docid": "8c0a09db96ecb5f49d6cb4f01e287ca9", "score": "0.57851255", "text": "function getTemplate(templateName, callback, source) {\n if (!templates[templateName]) {\n $.get(source + templateName, function(resp) {\n compiled = _.template(resp);\n templates[templateName] = compiled;\n if (_.isFunction(callback)) {\n callback(compiled);\n }\n }, 'html');\n } else {\n callback(templates[templateName]);\n }\n }", "title": "" }, { "docid": "fb841305bf7561affd0242704ee9ca91", "score": "0.5781837", "text": "function template() {\n\t(function() {\n\t\tvar x = document.createElement('script'); x.type = 'text/javascript'; x.async = true;\n\t\tx.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'example.com/script.js';\n\t\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(x, s);\n\t})();\n}", "title": "" }, { "docid": "eec9767611f90bd78ed64c452c886de0", "score": "0.57660764", "text": "function loadTemplate(id) {\n var query = new EntityQuery().from('DraftTemplates').where('Id', '==', id);\n return manager.executeQuery(query).then(function (data) {\n var t = data.results[0];\n template(t);\n });\n }", "title": "" }, { "docid": "bb43c1e405c5b60e6c8f9d298cc903b6", "score": "0.5739064", "text": "function renderTemplate(content, template, callback) {\r\n\tlet request = new XMLHttpRequest() // Same as the previous functions, could technically be moved to its' own function with the callback as a callback\r\n\r\n\trequest.open('GET', template)\r\n\trequest.onreadystatechange = () => {\r\n\t\tif (request.readyState === 4) {\r\n\t\t\tif (request.status === 200 || request.status === 0) {\r\n\t\t\t\tlet parsedTemplate = parseTemplate(content, request.responseText)\r\n\t\t\t\tcallback(parsedTemplate)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\trequest.send()\r\n}", "title": "" }, { "docid": "446626317d19fb743862400646599794", "score": "0.57346046", "text": "function yxStaticLoad(paras,urlfix){\n //alert('静态');\n //$('#'+paras.ra).load('mod/'+paras.dir);\n var sel ='#'+paras.ra;\n App.blockUI($(sel), false);\n $.ajax({\n url:'mod/'+ paras.dir,\n type:'post',\n success:function(t) {\n //alert('123456');\n //本地测试数据用\n //var urlpass = {\"urlll\":urlfix}\n var data = {\"urlfix\":urlfix}\n var newd = {\"data\":data};\n \n //var newd = data; \n //正式用以下一行代码(加data属性)\n //var data = {\"data\":d};\n \n //解析\n var render = template.compile(t);\n var html = render(newd);\n\n //m为2表示新增内容否则为替换内容\n if (paras.m == 2){\n $(sel).append(html);\n } else {\n $(sel).html(html);\n }\n App.unblockUI($(sel));\n //alert('静态解锁了');\n },\n //请求tpl失败处理\n error:function(){\n console.log('tpl获取失败');\n return false;\n }\n });\n}", "title": "" }, { "docid": "f2c0e1987f4615384977e46e31093bbb", "score": "0.5696036", "text": "function get(template) {\n return window.TPL[template];\n}", "title": "" }, { "docid": "1bfadf36f72c33e892c339fd41d55981", "score": "0.5657289", "text": "function _templateRead(template, params) {\n let filename = \"../emailTemplate/\"+template;\n return new Promise(function (resolve, reject) {\n ejs.renderFile(filename, params, function (error, htmlData) {\n if (error) {\n console.log(\"_templateRead err\", error)\n reject(error);\n }\n resolve(htmlData);\n });\n });\n}", "title": "" }, { "docid": "70d2ad4f59ba34695cceb29932c7f3a4", "score": "0.56359774", "text": "static(fullUrl){\n //Extrai o recurso da url\n let pathResource = this.loadPage.resource(fullUrl)\n //Verifica se o resource é um 'caminho' reservado let reserved = this.loadPage.specific(pathResource)\n let reserved = false;\n //Faz a rota\n if(reserved === false){\n //caso típico\n let pathFile = this.loadPage.pathPage(pathResource);\n if( this.loadPage.fileExists(pathFile) ){\n let page = this.loadPage.loadHtml(pathFile)\n return page;\n } else {\n //erro de rota\n let pathFile = this.loadPage.pathPage(\"/index\")\n let page = this.loadPage.loadHtml(pathFile)\n return page;\n }\n } else {\n //caso atípico\n return \"URL RESERVADA\"\n } \n }", "title": "" }, { "docid": "355982a0359b6be087ef74c85e1b0f4a", "score": "0.5613174", "text": "function loadTemplates() {\n try {\n htmlTemplates.STATE = handlebars.compile(fs.readFileSync(stateHtmlTemplate, 'utf-8') || \"NO TEMPLATE LOADED\");\n\n htmlTemplates.HINT = handlebars.compile(fs.readFileSync(hintHtmlTemplate, 'utf-8') || \"NO TEMPLATE LOADED\");\n\n txtTemplates.STATE = handlebars.compile(fs.readFileSync(stateTxtTemplate, 'utf-8') || \"NO TEMPLATE LOADED\");\n\n txtTemplates.HINT = handlebars.compile(fs.readFileSync(hintTxtTemplate, 'utf-8') || \"NO TEMPLATE LOADED\");\n\n subjectTemplates.STATE = handlebars.compile(fs.readFileSync(stateSubjectTemplate, 'utf-8') || \"NO TEMPLATE LOADED\");\n\n subjectTemplates.HINT = handlebars.compile(fs.readFileSync(hintSubjectTemplate, 'utf-8') || \"NO TEMPLATE LOADED\");\n } catch (e) {\n console.log(e);\n }\n}", "title": "" }, { "docid": "1fa65a0599e131d1b1aed24616ec977d", "score": "0.5607587", "text": "function loadByHttpUrl(url) {\n return $q(function(resolve, reject) {\n // Catch HTTP or generic errors not related to incorrect icon IDs.\n var announceAndReject = function(err) {\n var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);\n $log.warn(msg);\n reject(err);\n },\n extractSvg = function(response) {\n if (!svgCache[url]) {\n svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');\n }\n resolve(svgCache[url]);\n };\n\n $templateRequest(url, true).then(extractSvg, announceAndReject);\n });\n }", "title": "" }, { "docid": "1fa65a0599e131d1b1aed24616ec977d", "score": "0.5607587", "text": "function loadByHttpUrl(url) {\n return $q(function(resolve, reject) {\n // Catch HTTP or generic errors not related to incorrect icon IDs.\n var announceAndReject = function(err) {\n var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);\n $log.warn(msg);\n reject(err);\n },\n extractSvg = function(response) {\n if (!svgCache[url]) {\n svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');\n }\n resolve(svgCache[url]);\n };\n\n $templateRequest(url, true).then(extractSvg, announceAndReject);\n });\n }", "title": "" }, { "docid": "1fa65a0599e131d1b1aed24616ec977d", "score": "0.5607587", "text": "function loadByHttpUrl(url) {\n return $q(function(resolve, reject) {\n // Catch HTTP or generic errors not related to incorrect icon IDs.\n var announceAndReject = function(err) {\n var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);\n $log.warn(msg);\n reject(err);\n },\n extractSvg = function(response) {\n if (!svgCache[url]) {\n svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');\n }\n resolve(svgCache[url]);\n };\n\n $templateRequest(url, true).then(extractSvg, announceAndReject);\n });\n }", "title": "" }, { "docid": "1fa65a0599e131d1b1aed24616ec977d", "score": "0.5607587", "text": "function loadByHttpUrl(url) {\n return $q(function(resolve, reject) {\n // Catch HTTP or generic errors not related to incorrect icon IDs.\n var announceAndReject = function(err) {\n var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);\n $log.warn(msg);\n reject(err);\n },\n extractSvg = function(response) {\n if (!svgCache[url]) {\n svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');\n }\n resolve(svgCache[url]);\n };\n\n $templateRequest(url, true).then(extractSvg, announceAndReject);\n });\n }", "title": "" }, { "docid": "2e4a8206e1ddef24b7355536bc63c549", "score": "0.5589914", "text": "function template (options) {\n\t\n\t var variables = [],\n\t url = expand(options.url, options.params, variables);\n\t\n\t variables.forEach(function (key) {\n\t delete options.params[key];\n\t });\n\t\n\t return url;\n\t}", "title": "" }, { "docid": "636c9b06fab0c43f2fc9af5e2c3231af", "score": "0.5586345", "text": "function activateTemplate(id)\n {\n var obj_template = document.querySelector(id);\n return document.importNode(obj_template.content, true);\n }", "title": "" }, { "docid": "6d4f976fc5935de720fc6aa4dd9a4423", "score": "0.5581178", "text": "function JSONLoader(file, template, callback) {\r\n\tlet request = new XMLHttpRequest() // Opens a new XMLHttpRequest\r\n\r\n\trequest.open('GET', file)\r\n\trequest.onreadystatechange = function () {\r\n\t\tif (request.readyState === 4) {\r\n\t\t\t// readyState 4 means that the request has received a response\r\n\t\t\tif (request.status === 200 || request.status === 0) {\r\n\t\t\t\t// HTTP code 200 means that the content was succesfully fetched\r\n\t\t\t\tlet parsedJSON = JSON.parse(request.responseText) // The request receives the JSON as a string, which then is parsed into an object\r\n\t\t\t\tloaded_JSON_files.push(parsedJSON)\r\n\t\t\t\trenderTemplate(parsedJSON, template, callback) // Passes the parsed JSON to a new function that combines the JSON with the template\r\n\t\t\t\t// \"template\" and \"callback\" is \"forwarded\" to this function. See [1] at bottom of file.\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\trequest.send() // Sends the request, important to remember!\r\n}", "title": "" }, { "docid": "ff434bc8a147daaf92a22db5d58ce8f8", "score": "0.557584", "text": "function load( target ) {\n\n var dfd = $.Deferred();\n\n dfd.then(function() { delete _view_loading[target]; }, function() { delete _view_loading[target]; } );\n\n if ( _view_defs[target] ) {\n\n dfd.resolve( _view_defs[target] );\n\n } else {\n\n _view_loading[target] = dfd;\n require( [Fiber.viewPath + target, 'text!' + Fiber.viewPath + target + '.html'], function( view, template ) {\n if ( view === void 0 || template === void 0 ) {\n dfd.reject();\n } else {\n view.prototype.instanceOf = target;\n view.prototype.template = _.template( template );\n _view_defs[target] = view;\n\n dfd.resolve( view );\n }\n },\n function( err ) {\n dfd.reject( err );\n });\n }\n\n return dfd.promise();\n }", "title": "" }, { "docid": "7863b02b76816fedc94180df73b3b076", "score": "0.5570448", "text": "function loadFile(filePath, options, noCache) {\n var config = getConfig(options);\n var template = readFile(filePath);\n try {\n var compiledTemplate = compile(template, config);\n if (!noCache) {\n config.templates.define(config.filename, compiledTemplate);\n }\n return compiledTemplate;\n }\n catch (e) {\n throw EtaErr('Loading file: ' + filePath + ' failed:\\n\\n' + e.message);\n }\n}", "title": "" }, { "docid": "7863b02b76816fedc94180df73b3b076", "score": "0.5570448", "text": "function loadFile(filePath, options, noCache) {\n var config = getConfig(options);\n var template = readFile(filePath);\n try {\n var compiledTemplate = compile(template, config);\n if (!noCache) {\n config.templates.define(config.filename, compiledTemplate);\n }\n return compiledTemplate;\n }\n catch (e) {\n throw EtaErr('Loading file: ' + filePath + ' failed:\\n\\n' + e.message);\n }\n}", "title": "" }, { "docid": "7cca17a214c8c2fb000ee2757b5db891", "score": "0.5561814", "text": "function getTemplate(name){\n var html = _fs.readFileSync('html/' + name + '.html', 'utf-8').toString('utf-8');\n\n // some vars\n html = html.replace('${build.date}', new Date());\n\n return html;\n}", "title": "" }, { "docid": "35ecf41ee437de997c8d781d30888ac6", "score": "0.556173", "text": "function templateUrl(path) {\n if (aerobaticProvider.config.buildType === 'debug')\n return aerobaticProvider.config.cdnUrl + '/' + path;\n else\n return path;\n }", "title": "" }, { "docid": "eebd83a035ce165056909c8ee76887bc", "score": "0.5551894", "text": "function load(url) {\n var req = new XMLHttpRequest();\n req.open('GET', url, false);\n try {\n req.send();\n if (req.status === 0 || req.status === 200) {\n return req.responseText;\n }\n } catch (e) {}\n throw new Error('unable to load url ' + url);\n}", "title": "" }, { "docid": "5dfabe8271338e136fdd0f65d0283c21", "score": "0.55513686", "text": "function fetchModalTemplate(name){\n var url = modalsPath + name;\n return $http.get(url, {cache: $templateCache});\n }", "title": "" }, { "docid": "b2990a94d2cdd01cedaf2da63c10e55c", "score": "0.5541626", "text": "function load (url) {\n\tconsole.debug('m=load, url=%s', url)\n\turl = url.substring(url.lastIndexOf('/'))\n\t$.get('/data' + url).done(function (data) {\n\t\t\t$(\"#content\").html(data);\n\t}).fail(function(res){\n\t\tconsole.error('m=load, status=%d, err=%o', res.status, arguments);\n\t\twrapIframe($(\"#content\").empty(), '<h2>Error at load page \"' + url + '\"</h2>' + res.responseText);\n\t})\n}", "title": "" }, { "docid": "2b7d03cfa9785742060424f9ba9ce395", "score": "0.55398315", "text": "_getTemplateUrl() {\n return cdk.Lazy.uncachedString({ produce: () => this._templateUrl });\n }", "title": "" }, { "docid": "1ea9e467ae4c2c11dec959f813765e66", "score": "0.55374384", "text": "function render(url, data, callback) {\n $.get(url, function (template) {\n cachedHTML = Mustache.render(template, data);\n $('#menu-injection').html(cachedHTML);\n if (callback) { callback(); }\n });\n }", "title": "" }, { "docid": "022228d952631d0b66a46a68083341db", "score": "0.55255765", "text": "function loadContent(url, anchor_id){\n\t\n\tvar mainHtml = new Ajax.Request(url, {\n\t method: 'get',\n\t onLoading: changeLoadingStatus(\"on\"),\n\t onSuccess: function(method_data) {\n\t \tsetMainContent(method_data.responseText);},\n\t onComplete: function(request) {\n\t\t\tchangeLoadingStatus(\"off\");\n\t\t\tnew jumpToAnchor(anchor_id);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "07766c1d15aaeaabeb76632ce442272a", "score": "0.552019", "text": "function template(options) {\n\n var variables = [],url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "c9d39b79b634015e2ef8b3fb5ff62a69", "score": "0.55180097", "text": "static fromUrl(url) {\n return new CloudFormationUrlTemplate(url);\n }", "title": "" }, { "docid": "076c7cc55afd371248266ffa40b22990", "score": "0.55176955", "text": "function getTemplate(templateName)\n{\n var resolved = path.resolve(process.env.LAMBDA_TASK_ROOT, 'lambda/mock/' + templateName + '.hbs');\n\n console.log('[INFO] found resolved: ' + resolved);\n\n try\n {\n var content = fs.readFileSync(resolved, 'utf8');\n console.log('[INFO] found content: ' + content);\n return content;\n }\n catch (error)\n {\n console.log('[ERROR] Failed to load template: ' + resolved, error);\n throw error;\n }\n}", "title": "" }, { "docid": "f571849a01c56de7f9f3ae8ea06b5e15", "score": "0.55149484", "text": "function loadTemplate(name, wrapper, filler) {\n $(wrapper).html(getTemplate(name, filler));\n }", "title": "" }, { "docid": "edaabd4f75a8d133ac9bf6c319ab649f", "score": "0.5509032", "text": "function load (fileName, domNode) {\n var xhr = new XMLHttpRequest()\n xhr.open('GET', '/'+fileName+'.html');\n xhr.onload = function() {\n if (xhr.status === 200) {\n domNode.innerHTML=xhr.responseText\n }\n else {\n console.log('Request failed. Returned status of ' + xhr.status)\n }\n }\n xhr.send()\n }", "title": "" }, { "docid": "783b008e5c7a9167862ee00b2e597e8c", "score": "0.55020225", "text": "function load(url) {\n const req = new XMLHttpRequest();\n req.open('GET', url, false);\n try {\n req.send();\n if (req.status === 0 || req.status === 200) {\n return req.responseText;\n }\n } catch (e) {}\n throw new Error('unable to load url ' + url);\n}", "title": "" }, { "docid": "9b4ce0d29f169335f85a5cd2f5b01ae9", "score": "0.54997045", "text": "function View() {\n var url, _loaded, _ref,\n _this = this;\n View.__super__.constructor.call(this);\n Falcon.View.tick();\n this.template = ko.observable();\n url = this.makeUrl();\n this.isLoaded = ko.observable(false);\n _loaded = function() {\n _this.isLoaded(true);\n defer(function() {\n return _this.trigger(\"load\");\n });\n return Falcon.View.loaded();\n };\n if (isEmpty(url)) {\n _loaded();\n } else if (url in templateCache) {\n this.template(templateCache[url]);\n _loaded();\n } else if (startsWith(url, \"#\")) {\n this.template((_ref = templateCache[url]) != null ? _ref : templateCache[url] = $(url).html());\n _loaded();\n } else {\n $.ajax({\n url: url,\n type: \"GET\",\n cache: false,\n error: function() {\n return console.log(\"ERROR LOADING TEMPLATE \" + url);\n },\n success: function(html) {\n _this.template(templateCache[_this.url] = html);\n return _loaded();\n }\n });\n }\n this.initialize.apply(this, arguments);\n }", "title": "" }, { "docid": "1b259060929bbf4f174ae3ef1d694db7", "score": "0.54953945", "text": "function callback_loadTpl(xmlDoc) {\n //Select the Body and the Template\n var body = document.getElementsByTagName('body')[0];\n var layer = xmlDoc.getElementsByTagName('result').item(0).getElementsByTagName('tpl').item(0).firstChild.data;\n\n\t//Insert\n body.innerHTML = '<div id=\"picsBodyLayerAJAX\">'+body.innerHTML+'</div>'+layer;\n \n\tsetCSS();\n\t\n\t//Display the Background with loading the Image\n displayBackground(\"1\");\n}", "title": "" }, { "docid": "77aa54136335510e75cd12a2d96b8c24", "score": "0.54945606", "text": "get_template(name){\n this.templates = this.templates || {};\n if(this.templates[name]){\n return this.templates[name];\n }\n let template = fs.readFileSync(`${__dirname}/../templates/${name}.template`,\"utf-8\");\n let compiled = _.template(template);\n this.templates[name] = compiled;\n return compiled;\n }", "title": "" }, { "docid": "4ac8d5f661e4e8ad7465c27f0e3d6d62", "score": "0.54931074", "text": "function getAndBindTemplate(data,div) {\n $.ajax({\n url: 'js/templates/sweetCarousel.html',\n cache: true,\n success: function(result) {\n // Bind Data to template\n var template = Handlebars.compile(result);\n $(div).html(template(data));\n },\n dataType: \"text\"\n }).done(function() {\n initCarousel(data);\n\t\t});\n }", "title": "" }, { "docid": "94ac796902fd88865b30b75deebae217", "score": "0.5487741", "text": "async #loadPage(path) {\n const result = searchByExtension(path, this.pages);\n\n if (!result) {\n return;\n }\n\n const [ext, load] = result;\n const fullPath = this.site.src(path);\n\n if (!existsSync(fullPath)) {\n return;\n }\n\n const info = await Deno.stat(fullPath);\n const src = {\n path: path.slice(0, -ext.length),\n lastModified: info.mtime,\n created: info.birthtime,\n ext,\n };\n\n const dest = {\n path: normalizePath(src.path),\n ext,\n };\n\n const subext = extname(src.path);\n\n if (subext && !this.assets.has(ext)) {\n dest.path = dest.path.slice(0, -subext.length);\n dest.ext = subext;\n } else if (!this.assets.has(ext)) {\n dest.ext = \".html\";\n }\n\n const data = await load(fullPath, this);\n\n if (!data.date) {\n data.date = getDate(src, dest);\n } else if (!(data.date instanceof Date)) {\n throw new Error(\n 'Invalid date. Use \"yyyy-mm-dd\" or \"yyy-mm-dd hh:mm:ss\" formats',\n );\n }\n\n const page = new Page(src);\n page.data = data;\n page.dest = dest;\n\n return page;\n }", "title": "" }, { "docid": "e40e713fe96bcb2ab19cea5a9573c933", "score": "0.54854214", "text": "async function loadPage(page, oldPage) {\n const contentDiv = document.getElementById('app');\n contentDiv.innerHTML = await fetchHtmlAsText('assets/templates/' + page + '.html');\n if (document.getElementById('script_' + oldPage)) {\n contentDiv.removeChild('#script_' + oldPage);\n }\n const script = document.createElement('script');\n script.src = 'assets/js/templates/' + page + '.js';\n script.type = 'text/javascript';\n script.id = 'script_' + page;\n contentDiv.appendChild(script);\n}", "title": "" }, { "docid": "be045bf0b3c745884c20d5b86dd61496", "score": "0.5485289", "text": "function getMemberTemplate() {\n\t$.ajax({\n\t\turl: \"tmpl/member.tmpl\",\n\t\tdataType: \"html\",\n\t\tsuccess: function( data ) {\n\t\t\t$( \"head\" ).append( data );\n\t\t\tupdateMemberTable();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "2a5cad0fbe8f7a5b9d85a2cc82ccc454", "score": "0.5482998", "text": "function templateContent () {\n return fs.readFileSync(\n path.resolve(process.cwd(), 'app/wechatNow.html')\n ).toString()\n}", "title": "" }, { "docid": "2113625bb20932140b73d99e57278782", "score": "0.54814106", "text": "function openTemplateFromJSFile(jsFileName, presentationType) {\n mainBundleUrl = App.options.MAIN_BUNDLE_URL\n loadTemplateFromURL(`${mainBundleUrl}${jsFileName}`, openTemplateFromXMLString, presentationType);\n}", "title": "" }, { "docid": "9620e1645abeb663391dee05c2115bbb", "score": "0.54694575", "text": "function load(url, callback){\n\t// Make an HTTP request for the resource at src;\n\tvar x = new XMLHttpRequest();\n\tx.open('GET', url, false);\n\tx.onerror = cb;\n\tx.onload = cb;\n\tx.send();\n\n\tfunction cb(){\n\t\tif(callback){\n\t\t\tcallback(x.responseText);\n\t\t\tcallback=null;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "845328c1f45dfd886e320faf4637a474", "score": "0.5460423", "text": "function template (options) {\n\n var variables = [],\n url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "8c34aafa76df5b72a76d8301d128370e", "score": "0.5448145", "text": "function renderTemplate(template, data) {\n let PATH = '../views/';\n data = data || {};\n try {\n let tmpl = require(PATH + template);\n res.marko(tmpl, data);\n } catch (e) {\n throw new Error(e);\n }\n }", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "a960d00dc4f9076576247de093306585", "score": "0.5420672", "text": "function template (options) {\n\n var variables = [], url = expand(options.url, options.params, variables);\n\n variables.forEach(function (key) {\n delete options.params[key];\n });\n\n return url;\n}", "title": "" }, { "docid": "27894383be666e573d196e4e50b55d5e", "score": "0.54068804", "text": "function loadAndSwitchView(args, li) {\n\t\tshowProgressIndicator(true);\n\t\t\n\t\tfunction handleError(err){\n\t\t\talert(\"Failed to load demo.\");\n\t\t\tshowProgressIndicator(false);\n\t\t\tinTransitionOrLoading = false;\n\t\t}\n\n\t\tfunction initViewAndTransit() {\n\t\t\tshowProgressIndicator(false);\n\t\t\t// TODO: FIX-ME temp work around for the async startup \n\t\t\tsetTimeout(function(){\n\t\t\t\tinitView(args);\n//\t\t\t\t\tli.transitionTo(args.id);\n\t\t\t\ttriggerTransition(li, args.id);\n\t\t\t},0);\n\t\t}\n\n\t\tfunction stopProgress(){\n\t\t}\n\t\t\n\t\tvar xhrArgs = {\n\t\t\t\turl: args.demourl,\n\t\t\t\ttimeout: 30000,\n\t\t\t\thandleAs: \"text\" //only text can work now, xml will result in null responseXML\n\t\t};\n\t\tif (args.jsmodule) {\n\t\t\trequire([args.jsmodule], function(module){\n\t\t\t\tvar deferArray = [];\n\t\t\t\t// 1. load template HTML\n\t\t\t\tvar htmlDefer = new Deferred();\n\t\t\t\txhr.get({\n\t\t\t\t\turl: args.demourl,\n\t\t\t\t timeout: 30000,\n\t\t\t\t handleAs: \"text\",\n\t\t\t\t load: function(data) {\n\t\t\t\t\tcreateViewHTMLLoadedHandler(args, li)(data);\n\t\t\t\t\tif (module.init)\n\t\t\t\t\t\tmodule.init();\n\t\t\t\t\thtmlDefer.resolve(true);\n\t\t\t\t },\n\t\t\t\t error: function(err) {\n\t\t\t\t\thtmlDefer.reject(true);\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\tdeferArray.push(htmlDefer);\n\t\t\t\t\n\t\t\t\t// 2. load JS codes\n\t\t\t\tif (args.jsSrc) {\n\t\t\t\t\tvar jsDefer = new Deferred();\n\t\t\t\t\txhr.get({\n\t\t\t\t\t\turl: args.jsSrc,\n\t\t\t\t\t\ttimeout: 30000,\n\t\t\t\t\t\thandleAs: \"text\",\n\t\t\t\t\t\tload: function(data) {\n\t\t\t\t\t\t\tvar src = highlight.processString(data).result;\n\t\t\t\t\t\t\t//src = src.replace(/\\&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\\"/g, \"&quot;\");\n\t\t\t\t\t\t\tjsDefer.resolve(src);\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(err) {\n\t\t\t\t\t\t\tjsDefer.reject(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tdeferArray.push(jsDefer);\n\t\t\t\t}\n\n\t\t\t\t// put them all in deferred list\n\t\t\t\tvar deferList = new DeferredList(deferArray);\n\t\t\t\tdeferList.then(function(res){\n\t\t\t\t\tif (!res[0][0]){\n\t\t\t\t\t\thandleError();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// load JS codes\n\t\t\t\t\tif (res.length > 1 && res[1][0] && res[1][1]) {\n\t\t\t\t\t\tfillInDemoSource(args.id, \"js\", res[1][1]);\n\t\t\t\t\t}\n\t\t\t\t\tinitViewAndTransit();\n\t\t\t\t});\n\t\t\t});\n\t\t} else {\n\t\t\tvar deferred = xhr.get(xhrArgs);\n\t\t\tdeferred.addCallback(createViewHTMLLoadedHandler(args, li)).addCallback(initViewAndTransit);\n\t\t\tdeferred.addErrback(handleError);\n\t\t}\n\t}", "title": "" }, { "docid": "af174f9fe9e9f917cff631bf10db44dd", "score": "0.54024047", "text": "async getTemplate(name, data){\n let temp_name = name;\n if (!temp_name){\n temp_name = Config.settings.get('newNoteTemplate');\n }\n if (!temp_name) return '';\n temp_name = this.stripTemplateExt(temp_name);\n\n const temp_path = path.join(Config.rootPath, '.unotes', templateDir, `${temp_name}${templateExt}`);\n \n try {\n const d = await vscode.workspace.fs.readFile(vscode.Uri.file(temp_path));\n const decoded = new TextDecoder().decode(d);\n const template = Handlebars.compile(decoded);\n const result = template(data);\n return result;\n \n } catch(e) {\n console.log(e.message);\n await vscode.window.showWarningMessage(e.message);\n }\n return '';\n }", "title": "" }, { "docid": "53b27f9ad6b33d559b1076392170ba6d", "score": "0.5391238", "text": "function fnGetTemplate(strPath, strName) {\n\tif (Handlebars.templates === undefined || Handlebars.templates[strName] === undefined) {\n $.ajax({\n url : strPath + strName + \".hbs\",\n success : function(data) {\n if (Handlebars.templates === undefined) {\n Handlebars.templates = {};\n }\n Handlebars.templates[strName] = Handlebars.compile(data);\n },\n async : false\n });\n\t}\n\treturn Handlebars.templates[strName];\n}", "title": "" }, { "docid": "1954b3c49ddccdc8370ceb128488fad3", "score": "0.5388668", "text": "function newTemplate(){\n\tvar config = require('./config.js'),\n\t\tfileIo = require('./file-io.js'),\n\t\tdestinationPage = config.template.destinationPage,\n\t\tstrictDoctype = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">',\n\t\thtmlOpen = '<html xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\">';\n\t\n\treturn {\n\t\tpage : strictDoctype + htmlOpen + '%s</html>',\n\t\theading : '<h%d>%s</h%d>',\n\t\tparagraph : '<p>%s</p>',\n\t\tlistLink : '<li class=\"%s\"><a href=\"%s\">%s</a></li>',\n\t\tsection : '<div class=\"contentSection\">%s</div>',\n\t\tinnerSection : '<div>%s</div>',\n\t\tnavigationDivId : 'div#navigation',\n\t\ttitleClass : '.title',\n\t\tcontentTextDivId : 'div#contentText',\n\n\t\tpageHtml : \tfunction(){\n\t\t\tvar data = fileIo.readFileSync(destinationPage, 'ascii');\n\t\t\treturn data;\n\t\t},\n\n\t\tbuildNavigationHtml :function(links) {\n\t\t\treturn '<ul>' + links.join('') + '</ul>';\n\t\t}\n\t};\n}", "title": "" }, { "docid": "63526a12bd1496f0c90a49d4a79e500f", "score": "0.53830004", "text": "function loadHTML(url, destination)\n{\n\tvar xhr = new XMLHttpRequest();\n\txhr.onreadystatechange=function() { \n\t\tif(xhr.readyState == 4) {\n\t\t\tdestination.innerHTML = getBody(xhr.responseText);\n\t\t\tvar arr = destination.getElementsByTagName('script');\n\t\t\tdestination.appendChild(arr[3]);\n\t\t\teval(arr[3].innerHTML);\n\t\t}\n\t}; \n\n\txhr.open(\"GET\", url , true);\n\txhr.send(null); \n}", "title": "" }, { "docid": "71920a83d77c5acee01054962ed3429b", "score": "0.5373215", "text": "function evalTemplate( origin, template, context ) {\n // The actual template eval function is stored in the content\n // origin's settings - this allows a content origin to use\n // an alternative templating method, by replacing this function.\n return origin.settings.pageTemplateEval( template, context );\n}", "title": "" }, { "docid": "582f2c3df096fbf74195e9441cb242fe", "score": "0.5370627", "text": "function fetchTemplateFromScriptTag(src, type) {\n\t var compiler;\n\t var scriptEl = document.querySelector(src);\n\t var scriptType = scriptEl.getAttribute('type');\n\t var templateStr = scriptEl.innerHTML;\n\n\t // Try to infer template type from <script type> if type not specified.\n\t if (!type) {\n\t if (!scriptType) {\n\t throw new Error('Must provide `type` attribute for <script> templates (e.g., handlebars, jade, nunjucks, html)');\n\t }\n\t if (scriptType.indexOf('handlebars') !== -1) {\n\t type = HANDLEBARS;\n\t } else if (scriptType.indexOf('jade') !== -1) {\n\t type = JADE;\n\t } else if (scriptType.indexOf('mustache') !== -1) {\n\t type = MUSTACHE;\n\t } else if (scriptType.indexOf('nunjucks') !== -1) {\n\t type = NUNJUCKS;\n\t } else if (scriptType.indexOf('html') !== -1) {\n\t type = HTML;\n\t } else {\n\t error('Template type could not be inferred from the script tag. Please add a type.');\n\t return;\n\t }\n\t }\n\n\t return new Promise(function (resolve) {\n\t compileTemplate(src, type, templateStr).then(function (template) {\n\t resolve(template, type);\n\t });\n\t });\n\t}", "title": "" }, { "docid": "b7cb8d4aa89acbd16c6f8d7d1758845c", "score": "0.53655255", "text": "function loadContent() {\n //get route from browser address bar\n let hash = location.hash.substr(2);\n\n //default route\n if(hash === '') {\n hash = 'home';\n location.hash = '#/' + hash;\n }\n\n //if has content for this route display it\n if(content.hasOwnProperty(hash)) {\n main.html(content[hash]);\n } else {\n //not found content\n main.html('<h2>404 Not Found</h2>');\n }\n }", "title": "" } ]
acd1ee60f3c2a750da833f536bbb09be
Start the REST API server.
[ { "docid": "85ce399290265d41a988cd9b542b7046", "score": "0.0", "text": "function startServer(customConfig, onStarted) {\n const app = express();\n const config = resolveConfig.with(customConfig);\n\n init(app, config);\n run(app, config, onStarted);\n}", "title": "" } ]
[ { "docid": "ab1d81c08fb6100d40b3611225c37f62", "score": "0.7451064", "text": "function startAPI() {\n app.enable('trust proxy');\n\n app.use(cookieParser());\n\n // CORS\n app.use(cors());\n\n // CORS middleware\n app.use((req, res, next) => {\n res.header('Access-Control-Allow-Origin', '*');\n res.header('Access-Control-Allow-Headers', 'Authorization, X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Allow-Request-Method');\n res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, DELETE');\n res.header('Allow', 'GET, POST, OPTIONS, PUT, DELETE');\n next();\n });\n\n SwaggerExpress.create(config, function (err, swaggerExpress) {\n if (err) { console.log(\"errorCreate\", err); }\n\n // install middleware\n swaggerExpress.register(app);\n\n var port = CONFIG.port;\n\n //loading api docs - using reensambled yaml file\n app.use('/api-docs', SwaggerUi.serve, SwaggerUi.setup(swaggerDocumentLoaded));\n app.listen(port, function () {\n console.log(\"API running on port: \" + port);\n });\n // start tasks\n });\n}", "title": "" }, { "docid": "da2fc24837939e77bd839826e77f8ac4", "score": "0.73952985", "text": "start() {\n // loadup the template engine\n // this._template();\n\n // enable the configuration of the server.\n this._configure();\n\n // start the server\n return new Promise((resolve) => {\n const http = this.app.listen(this.config.port || 3000, () => {\n const { port } = http.address();\n\n console.log(`API Running at port: ${port}`);\n });\n });\n }", "title": "" }, { "docid": "41692668781bb42667bfb1b1dd432d94", "score": "0.7070331", "text": "function startRESTServer () {\n restServer = express()\n restServer.use(bodyParser.json({\n inflate: true,\n limit: '100kb',\n type: function (req) { return true } // Callbacks don't come with a media type so we always presume JSON in body\n }))\n\n // The RPC functions we offer Canoe\n restServer.post('/rpc', function (req, res) {\n winston.debug('GET URL', req.url)\n var spec = req.body\n var action = req.body.action\n switch (action) {\n case 'create_server_account':\n return createAccount(spec).then((r) => { res.json(r) })\n case 'canoe_server_status':\n return res.json(canoeServerStatus(spec))\n case 'quota_full':\n return res.json(quotaFull(spec))\n case 'process':\n return processBlock(spec).then((r) => { res.json(r) })\n case 'available_supply':\n return availableSupply(spec).then((r) => { res.json(r) })\n case 'ledger':\n return ledger(spec).then((r) => { res.json(r) })\n case 'chain':\n return chain(spec).then((r) => { res.json(r) })\n case 'accounts_pending':\n return accountsPending(spec).then((r) => { res.json(r) })\n case 'account_history':\n return accountHistory(spec).then((r) => { res.json(r) })\n case 'blocks_info':\n return blocksInfo(spec).then((r) => { res.json(r) })\n case 'work_generate':\n winston.log()\n return workGenerate(spec).then((r) => { res.json(r) })\n default:\n return res.json({error: 'unknown action'})\n }\n })\n\n // The rai_node callback entry point\n restServer.post('/callback', function (req, res) {\n handleRaiCallback(req.body)\n // We can return immediately\n res.json({})\n })\n\n restServer.listen(config.server.port)\n winston.info('Http server started on port ' + config.server.port)\n}", "title": "" }, { "docid": "cd0ef94f0d74b0d95571896ab77de8db", "score": "0.7000259", "text": "function startAPI (port) {\n var app = express();\n app.enable(\"case sensitive routing\");\n\n // middleware\n app.use(express.logger());\n app.use(express.bodyParser());\n\n // security\n var ownIPs = {}\n , ifaces = os.networkInterfaces()\n ;\n for (var k in ifaces) {\n for (var i = 0, n = ifaces[k].length; i < n; i++) {\n ownIPs[ifaces[k][i].address] = true;\n }\n }\n app.use(function (req, res, next) {\n if (conf.security === \"none\") return next();\n if (!ownIPs[req.ip]) {\n return res.send(403, \"You are not allowed to connect to this service. Logged: \" + req.ip);\n }\n next();\n });\n\n // GET /\n // server info\n app.get(\"/version\", function (req, res) {\n res.json({ bevy: version });\n });\n\n // GET /apps\n // lists all the apps\n app.get(\"/apps\", function (req, res) {\n res.json(apps);\n });\n\n // select the app\n function pickApp (req, res, next) {\n var name = req.params.name;\n if (!apps[name]) return res.json(404, { error: \"No app for this name.\" });\n req.bevyApp = apps[name];\n next();\n }\n\n // GET /app/app-name\n // list that app\n app.get(\"/app/:name\", pickApp, function (req, res) {\n res.json(req.bevyApp);\n });\n\n function simpleResponse (res) {\n return function (err) {\n if (err) return res.json(500, { error: err });\n res.json({ ok: true });\n };\n }\n\n // GET /app/app-name/start\n // starts the app\n app.get(\"/app/:name/start\", pickApp, function (req, res) {\n if (req.bevyApp.running) return res.json(418, { error: \"App already running.\" });\n spawnApp(req.bevyApp, simpleResponse(res));\n });\n\n // GET /app/app-name/stop\n // stops the app\n app.get(\"/app/:name/stop\", pickApp, function (req, res) {\n if (!req.bevyApp.running) return res.json(418, { error: \"App already stopped.\" });\n stopApp(req.bevyApp, simpleResponse(res));\n });\n\n function sessionReponse (res) {\n return function (err, session) {\n if (err) return res.json(500, { error: err });\n if (!session) return res.json({ ok: true });\n res.json(202, { session: true, id: session.id, path: \"/session/\" + session.id });\n };\n }\n\n // GET /app/app-name/update\n // causes the source of the app to update from the repo\n app.get(\"/app/:name/update\", pickApp, function (req, res) {\n updateApp(req.bevyApp, sessionReponse(res));\n });\n\n // PUT /app/app-name\n // create or update a new app, with JSON\n // {\n // environment: dev|prod|test\n // , domain: \"foo.bast\"\n // , dependencies: {}\n // , repository: {\n // type: \"git\"\n // , url: \"...\"\n // }\n // , scripts: {\n // start: \"start-script.js\" // default to app.js\n // }\n // , static: true|false\n // }\n app.put(\"/app/:name\", function (req, res) {\n var name = req.params.name\n , desc = req.body;\n if (!/^[a-zA-Z0-9-_]+$/.test(name)) return res.json(400, { error: \"Bad name, rule: /^[a-zA-Z0-9-_]+$/.\" });\n if (!desc) return res.json(400, { error: \"No JSON configuration provided.\" });\n if (!desc.repository) return res.json(400, { error: \"Field 'repository' required.\" });\n if (!desc.domain) return res.json(400, { error: \"Field 'domain' required.\" });\n if (!desc.repository.type) desc.repository.type = \"git\";\n if (!desc.static) {\n if (!desc.dependencies) desc.dependencies = {};\n if (!desc.environment) desc.environment = \"dev\";\n if (!desc.scripts) desc.scripts = {};\n if (!desc.scripts.start) desc.scripts.start = \"app.js\";\n }\n desc.running = apps[name] ? apps[name].running : false;\n apps[name] = desc;\n desc.name = name;\n desc.storePath = pth.join(conf.store, name);\n desc.configPath = pth.join(desc.storePath, \"config.json\");\n desc.runningPath = pth.join(desc.storePath, \"RUNNING\");\n desc.contentPath = (desc.repository.type === \"local\") ? desc.repository.path : pth.join(desc.storePath, \"content\");\n if (!desc.static) desc.startPath = pth.join(desc.contentPath, desc.scripts.start);\n updateApp(desc, sessionReponse(res));\n });\n\n // DELETE /app/app-name\n // stops and deletes the app\n app.del(\"/app/:name\", pickApp, function (req, res) {\n var app = req.bevyApp;\n stopApp(app, function (err) {\n if (err) return res.json(500, { error: \"Failed to stop app, cannot remove: \" + err });\n utile.rimraf(app.storePath, function (err) {\n if (err) return res.json(500, { error: \"Failed to remove app: \" + err });\n delete apps[app.name];\n res.json({ ok: true });\n });\n });\n });\n\n // GET /session/:id\n // returns the last messages of a session for a long-running job (e.g npm)\n // this is meant for polling\n app.get(\"/session/:id\", function (req, res) {\n var id = req.params.id\n , session = sessions[id]\n ;\n if (!session) return res.json(404, { error: \"No such running session.\" });\n if (session === \"done\") return res.json({ done: true });\n res.json({ messages: session.messages() });\n if (session.done) sessions[id] = \"done\";\n });\n\n app.listen(port);\n\n // load existing apps from store\n // the store is created if it doesn't exist\n // inside the store, each directory that contains a \"config.json\" is an app\n // if the app directory contains a \"RUNNING\" file, then it's running\n // the app directory has a content directory that's the app's content and has a name that\n // depends on the repo type\n if (!fs.existsSync(conf.store)) fs.mkdirSync(conf.store);\n fs.readdir(conf.store, function (err, files) {\n if (err) return error(\"Failed to read directory \" + conf.store, err);\n files.forEach(function (name) {\n var dir = pth.join(conf.store, name);\n fs.stat(dir, function (err, stat) {\n if (err) return error(\"Failed to stat directory \" + dir, err);\n if (!stat.isDirectory()) return;\n var configPath = pth.join(dir, \"config.json\")\n , runningPath = pth.join(dir, \"RUNNING\")\n , running = fs.existsSync(runningPath);\n if (!fs.existsSync(configPath)) return;\n fs.readFile(configPath, function (err, data) {\n if (err) return error(\"Could not read app configuration \" + configPath, err);\n var appConfig;\n try {\n appConfig = JSON.parse(data);\n }\n catch (e) {\n return error(\"Failed to parse app configuration\" + configPath, err);\n }\n apps[name] = appConfig;\n if (running) spawnApp(appConfig);\n });\n });\n });\n console.log(\"Bevy up, management API available on port(s) \", conf.ports);\n });\n }", "title": "" }, { "docid": "510c60b8295c01b6b16b03746297a3dc", "score": "0.6953216", "text": "start() {\n this.buildRoutes();\n this.app.listen(this.port, () => console.log(\"Server listening on port \" + this.port + \"!\"));\n }", "title": "" }, { "docid": "0d8962f18fdba14054e0d12ce4e64dfd", "score": "0.6834183", "text": "constructor() {\n\t\tthis.server = Hapi.Server({\n port: 8000,\n host: 'localhost'\n });\n this.initRoutes();\n this.start();\n }", "title": "" }, { "docid": "afdce18ba40e30fa736ee4975d1b7c38", "score": "0.6791024", "text": "started() {\n if (this.settings.middleware) return;\n\n // Process routes\n if (Array.isArray(this.settings.routes)) {\n this.swagger = this.createSwagger(this.settings.routes);\n }\n\n this.server.get(\"/\", (req, res) => {\n res.sendFile('index.html');\n });\n\n this.server.get(\"/yml\", (req, res) => {\n res.type('application/x-yaml');\n res.send(yaml.safeDump(this.settings.swaggerCache, { skipInvalid: true }));\n });\n\n this.server.get(\"/json\", (req, res) => {\n res.send(this.settings.swaggerCache);\n });\n\n this.server.listen(this.settings.port, (err, address) => {\n if (err) throw err;\n this.logger.info(`Swagger listening on ${address}`);\n });\n }", "title": "" }, { "docid": "f7532044903818be989a8b5b0ebc76f9", "score": "0.6771291", "text": "started() {\n\t if (this.settings.middleware) return;\n\t // Process routes\n\t this.swagger = this.createSwagger(\n\t\tthis.settings.routes,\n\t\tthis.settings.schemas,\n\t\tthis.settings.tags,\n\t\tthis.settings.servers\n\t );\n\t this.server.get(\"/\", (req, res) => {\n\t\tres.sendFile(\"index.html\");\n\t });\n \n\t this.server.get(\"/yml\", (req, res) => {\n\t\tres.type(\"application/x-yaml\");\n\t\tres.send(\n\t\t yaml.safeDump(this.settings.swaggerCache, { skipInvalid: true })\n\t\t);\n\t });\n \n\t this.server.get(\"/json\", (req, res) => {\n\t\tres.send(this.settings.swaggerCache);\n\t });\n \n\t this.server.listen(this.settings.port, (err, address) => {\n\t\tif (err) throw err;\n\t\tthis.logger.info(`Swagger listening on ${address}`);\n\t });\n\t}", "title": "" }, { "docid": "a5b0973c0bf5e06cb81f9a8f3d96288e", "score": "0.67583895", "text": "function start() {\n app.listen(PUERTO_SERVIDOR, INTERFAZ_SERVIDOR, function() {\n console.log(\"Configuarando servidor...\");\n\n configurar(app, ClienteMongo);\n\n // print a message when the server starts listening\n console.log(`Iniciando servidor en ${INTERFAZ_SERVIDOR}:${PUERTO_SERVIDOR}`);\n console.log(`$DIR_STATIC=${PATH_STATIC}`);\n console.log(`\\nProbar con:\\n\ncurl -vv http://localhost:${PUERTO_SERVIDOR}/api/v0/product/737628064502.json\\n`);\n });\n}", "title": "" }, { "docid": "a93dedb6fec05c44e727fca72be7a678", "score": "0.6722976", "text": "startServer() {\n this.express.use(express.static(path.join(__dirname, '/..')));\n this.express.use(bodyParser.json());\n\n this.express.get('/', (req, res) => {\n const renderIndex = path.join(__dirname, '/../index.html');\n res.render(renderIndex);\n });\n\n this.configureDependencyInjection();\n this.buildServices();\n this.services.forEach(service => registerService(service, this.express));\n\n this.express.listen(this.port, () => {\n console.log('Server pid', process.pid, 'listening on port', this.port);\n });\n }", "title": "" }, { "docid": "68c212fa46ac60dc0687467949169b75", "score": "0.67166543", "text": "async start() {\n this.logger.info('starting...');\n \n const settings = this.settings;\n const app = this.expressApp;\n \n const ip = settings.get(KEY_IP); \n const port = settings.get(KEY_PORT); \n \n const server = this.server = http.createServer(app);\n const serverListen = bluebird.promisify(server.listen, {context: server});\n \n await serverListen(port, ip);\n \n const addr = this.server.address(); \n this.logger.info(`started. (http://${addr.address}:${addr.port})`);\n }", "title": "" }, { "docid": "618c27336ee0513ba2859b2a2b0c7a70", "score": "0.6670119", "text": "function start() {\n app.listen(8080);\n}", "title": "" }, { "docid": "58fe2e490d3aadd73c385f92025b53c6", "score": "0.6662612", "text": "function runServer() {\n var http = require('http');\n var server = app.listen(nconf.get('http:port') || DEFAULT_PORT);\n }", "title": "" }, { "docid": "a08de2279cdd04097ec251885394e3ff", "score": "0.66582924", "text": "started() {\n this.server = this.app.listen(Number(this.settings.port), err => {\n if (err)\n return this.broker.fatal(err);\n\n this.logger.info(`api server started on port ${this.settings.port}`);\n });\n }", "title": "" }, { "docid": "8ce59e78f28d7185d2a7171b8da8bcc6", "score": "0.66570157", "text": "function start () {\n app.listen(port);\n }", "title": "" }, { "docid": "e0464ca068d1196d8e65eadfad783afe", "score": "0.66278094", "text": "async function startAPI () {\n const swaggerOptions = {\n schemes: ['https'],\n host: 'api.futureflix.space',\n info: {\n title: 'Futureflix API Documentation',\n version: Pkg.version,\n description:\n 'Futureflix comes with a full-fledged API. You can find the documentation on all provided endpoints here.'\n },\n documentationPath: '/docs',\n grouping: 'tags',\n tags: [\n {\n name: 'Movies',\n description: 'Access movie data'\n },\n {\n name: 'TV shows',\n description: 'Access TV show data'\n }\n ]\n }\n\n // register plugins to API instance\n await api.register([\n {\n plugin: require('hapi-dev-errors'),\n options: {\n showErrors: process.env.NODE_ENV !== 'production',\n useYouch: true\n }\n },\n {\n plugin: Laabr.plugin,\n options: {\n colored: true,\n hapiPino: {\n logPayload: false\n }\n }\n },\n Inert,\n Vision,\n {\n plugin: HapiSwagger,\n options: swaggerOptions\n },\n {\n plugin: require('./api/authentication')\n },\n {\n plugin: require('./common/add-user-to-request')\n },\n {\n plugin: require('./api/error-interceptors')\n },\n {\n plugin: require('./api/movies')\n },\n {\n plugin: require('./api/tv-shows')\n },\n {\n plugin: require('./api/users')\n }\n ])\n\n // start the API\n try {\n await api.start()\n } catch (err) {\n console.error(err)\n process.exit(1)\n }\n}", "title": "" }, { "docid": "83bef91f825bfe35bed2ad531459cddb", "score": "0.65905535", "text": "function startServer() {\r\n console.log('Starting app server on port %s', (serverConfig.ports.http || 3001));\r\n return http.createServer(app).listen(parseInt(serverConfig.ports.http, 10) || 3001);\r\n}", "title": "" }, { "docid": "d57a792d3544df61f2415ca7da33314f", "score": "0.6581488", "text": "async function start () {\n try {\n validateTokens()\n await server.start()\n } catch (err) {\n console.error(err)\n process.exit(1)\n }\n\n console.log('=> Server running at: ', server.info.uri)\n}", "title": "" }, { "docid": "2206697c0d8d4095f89a96a5d5e09fec", "score": "0.654499", "text": "startTheServer() {\n this.appConfig();\n const port = process.env.NODE_ENV === 'dev' ? process.env.PORT_DEV : process.env.PORT_PROD || 4000;\n const host = process.env.NODE_ENV === 'dev' ? process.env.NODE_SERVER_LOCAL : process.env.NODE_SERVER_HOST_PROD || '0.0.0.0';\n\n this.http.listen(port, host, () => {\n _logger.info(`Listening on http://${host}:${port}`);\n });\n\n this.includeRoutes();\n }", "title": "" }, { "docid": "7d46b2589e24a6870613357a6de5217a", "score": "0.6523191", "text": "async startExpress () {\n const app = this.getApplication();\n await app.getEventsRegistry()\n .trigger(Application.EVENT_EXPRESS_START_PRE, app);\n\n if (this.getApplication().getExpress().get(\"env\") === \"test\") {\n this.getApplication().log(\"Test environment detected. Exiting.\");\n return;\n }\n\n const port = app.getExpressPort();\n\n app.getExpress()\n .listen(port, async () => {\n app.log(`API started on port ${port}`);\n return await app.getEventsRegistry()\n .trigger(\n Application.EVENT_EXPRESS_START_POST,\n app.getExpress()\n );\n });\n }", "title": "" }, { "docid": "5b848d44c3dead8b1489d0c782c49208", "score": "0.6518915", "text": "function startServer() {\n app.listen(config.port)\n log(\"Server listening on port: \" + config.port + '\\n')\n}", "title": "" }, { "docid": "6c011606a4ff0daf0193822eb9252a25", "score": "0.6518185", "text": "function start() {\n // Start the app on the specific interface (and port).\n server.listen(port, ipaddress, function() {\n console.log('%s: Node server started on %s:%d ...',\n Date(Date.now() ), ipaddress, port);\n });\n }", "title": "" }, { "docid": "b027421c44f53e21e78c9ee18d833bf3", "score": "0.65153074", "text": "function startServer() {\n server.start(function(err) {\n if (err) {\n throw err;\n }\n\n console.log('listening on', server.info.uri);\n });\n}", "title": "" }, { "docid": "e88d8287b09014d63a46e1dfbf5d5561", "score": "0.6508147", "text": "async start() {\r\n await this.server.start();\r\n console.log(`Server running at: ${this.server.info.uri}`);\r\n}", "title": "" }, { "docid": "e5aaaaf92709acc7c9ecb566500635b4", "score": "0.6504815", "text": "async function startService() {\n const {\n config,\n router,\n logger,\n httpServer,\n } = this.assembly;\n\n assert(router, 'expected router');\n assert(logger, 'expected logger');\n assert(httpServer, 'expected httpServer');\n assert(config && config.server && config.server.port, 'expected config.server.port value');\n const serverPort = config.server.port;\n\n await router.registerRoutes();\n await new Promise(resolve => httpServer.listen(serverPort, () => resolve()));\n logger.info(`Service running on http://localhost:${serverPort}`);\n}", "title": "" }, { "docid": "6c6626f140402696466d8bbcb931028d", "score": "0.6498421", "text": "init() {\r\n\t\tthis.express = express();\r\n\t\tthis.express.set('port', this.port);\r\n\t\tthis.express.use(bodyParser.json());\r\n\t\tthis.express.get('/', (req, res) => {\r\n\t\t\tres.status(200).json({\r\n\t\t\t\tmessage: `${this.name} running!`\r\n\t\t\t});\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "ac77bb4586124c0e40748490d992b13c", "score": "0.6468384", "text": "startServer() {\n this.server = http.createServer(this.app);\n\n this.server.listen(this.port, () => LOGGER.log(`Server listen port: ${this.port}`));\n\n this.bindServerError();\n this.bindServerListening();\n }", "title": "" }, { "docid": "e913def9f601c2e3eb875d5e492bf656", "score": "0.6458601", "text": "async function start() {\n await co(parser.init(config.PARSER_OPTIONS, config.LOAD_PARSER));\n const server = http.createServer(app);\n server.listen(app.get('port'), () => {\n logger.info(`Express server listening on port ${app.get('port')} in ${process.env.NODE_ENV} mode`);\n });\n}", "title": "" }, { "docid": "468af3a969cad48bc1187deb2bf55810", "score": "0.6387292", "text": "async function start() {\n\tawait server.startServer();\n\tsetInterval(refresh, 300000); // every 5 minutes (300000)\n\t// TODO set up review apps - these get created when you create a new pull request\n\t// TODO Test sending multiple requests at once to see if the server can handle it.\n}", "title": "" }, { "docid": "6e986ae4fc2ca30f2d57dd2f5ddd06ff", "score": "0.63813496", "text": "async function start() {\n //= ================= [START Node Server] =================//\n const log = LOG;\n\n if (APP_CONFIG.ENABLE_SSL === true) {\n const domain = APP_CONFIG.DOMAIN;\n const host = APP_CONFIG.HOST;\n const port = APP_CONFIG.PORT_HTTPS;\n\n await SERVER.listen(port, host);\n\n log.info('Is Secure => Running Port No. at https://' + domain + ':' + port);\n log.debug('Full path => ' + API_PATH);\n } else {\n const domain = APP_CONFIG.DOMAIN;\n const host = APP_CONFIG.HOST;\n const port = APP_CONFIG.PORT_HTTP;\n\n await SERVER.listen(port, host);\n\n log.info('Is not Secure => Running Port No. at http://' + domain + ':' + port);\n log.debug('Full path => ' + API_PATH);\n }\n //= ================= [END Node Server] =================//\n\n //= ================= [START Init Middleware Controller] =================//\n await new MiddlewareController().setController();\n //= ================= [END Init Middleware Controller] =================//\n\n //= ================= [START Init Controller] =================//\n await new ImageController().setController();\n //= ================= [END Init Controller] =================//\n\n //= ================= [START Public Path] =================//\n if (!FS.existsSync(IMAGES_PATH)) {\n await FS.mkdirSync(IMAGES_PATH);\n }\n\n APP.use('/image', EXPRESS.static(IMAGES_PATH));\n //= ================= [END Public Path] =================//\n}", "title": "" }, { "docid": "7d846949fd3792ae6b937ec0a35dfb56", "score": "0.6371116", "text": "function start(){\n var port = process.env.PORT || config.server.port;\n app.listen(port);\n console.log(\"server pid %s listening on port %s in %s mode\",\n process.pid,\n port,\n app.get('env')\n );\n}", "title": "" }, { "docid": "7d846949fd3792ae6b937ec0a35dfb56", "score": "0.6371116", "text": "function start(){\n var port = process.env.PORT || config.server.port;\n app.listen(port);\n console.log(\"server pid %s listening on port %s in %s mode\",\n process.pid,\n port,\n app.get('env')\n );\n}", "title": "" }, { "docid": "374ca0be70ec682e3835df24f9a0ceb9", "score": "0.63547933", "text": "_startServer(){\n let http = require('http'),\n self = this;\n\n let server = http.createServer(this._core);\n server.listen(this.port);\n server.on('error', (error) => {\n self.onError(error)\n });\n server.on('listening', () => {\n self.onListening(server, self.debug.logger)\n });\n }", "title": "" }, { "docid": "6f4a49ccfe6aca865d90a25d7cd0848e", "score": "0.6326598", "text": "start() {\r\n /* --Enable CORS for all apis */\r\n this._app.use(cors());\r\n // post json passed to plugin post.\r\n const jsonBodyParser = bodyParser.json();\r\n // when we get the plugin nurl, untar the plugin so we can deliver its contents in subsequent requests.\r\n this._app.post(\"/pluginTarSupport\", jsonBodyParser, this._replyToTarSupport.bind(this));\r\n this._app.post(\"/plugin\", jsonBodyParser, this._untarPlugin.bind(this));\r\n this._app.post(\"/versionAvailable\", jsonBodyParser, this._findPackageVersion.bind(this));\r\n this._app.use(express.static(this._resourceRoot));\r\n this._app.use(\"/*\", this._handlePluginResources.bind(this));\r\n this._app.get(\"/signin-*\", (_req, resp) => {\r\n resp.sendFile(path.resolve(this._resourceRoot, \"index.html\"));\r\n });\r\n // Run the server...\r\n this._app.set(\"port\", this._port);\r\n const announce = () => console.log(`***** WebServer listening on http:localHost:${this._app.get(\"port\")}, resource root is ${this._resourceRoot}`);\r\n\r\n // Route ADT calls to adt-instance.\r\n function onProxyReq(proxyReq, req, res) {\r\n proxyReq.removeHeader('Origin');\r\n }\r\n this._app.use(['/query', '/models', '/digitaltwins', '/eventroutes'], createProxyMiddleware({\r\n target: 'https://coffsharbor.api.wus2.digitaltwins.azure.net', changeOrigin: true, headers: {\r\n Connection: 'keep-alive'\r\n },\r\n onProxyReq: onProxyReq\r\n }));\r\n\r\n this._app.listen(this._app.get(\"port\"), announce);\r\n }", "title": "" }, { "docid": "e2469e47b941b7c7c04cb283e118638c", "score": "0.63125926", "text": "start() {\n if (!this.server) {\n logger.error(\"Server.start(): Server not defined!\")\n throw new Error(\"Server not defined!\")\n }\n logger.info(`Server.start(): Start listening: ${this.config.port}`)\n this.server.listen(this.config.port)\n }", "title": "" }, { "docid": "d242dde6bb5adfe1e97c6c0e4b3c1ebd", "score": "0.63113153", "text": "start () {\n if (this.useHttp) {\n this.serverHttp = http.createServer(this._handleRequest.bind(this));\n this.serverHttp.listen(this.port);\n }\n if (this.useHttps) {\n this.serverHttps = https.createServer(this.httpsOptions, this._handleRequest.bind(this));\n this.serverHttps.listen(this.sslPort);\n }\n }", "title": "" }, { "docid": "aa79f6b0fe67700463fb7b80326882f5", "score": "0.6300055", "text": "function start () {\n\t// Create a new application and initialize it with *required* support for\n\t// controllers and views. Move (or remove) these lines at your own peril.\n\tapp = new locomotive.Application();\n\tapp.phase(locomotive.boot.controllers(__dirname + '/app/controllers'));\n\tapp.phase(locomotive.boot.views());\n\n\t// Add phases to configure environments, run initializers, draw routes, and\n\t// start an HTTP server. Additional phases can be inserted as needed, which\n\t// is particularly useful if your application handles upgrades from HTTP to\n\t// other protocols such as WebSocket.\n\tapp.phase(require('bootable-environment')(__dirname + '/config/environments'));\n\tapp.phase(bootable.initializers(__dirname + '/config/initializers'));\n\tapp.phase(locomotive.boot.routes(__dirname + '/config/routes'));\n\t// Use custom modified http sever so app can integrate with Socket.io\n\t//app.phase(locomotive.boot.httpServer(3000, '0.0.0.0'));\n\tapp.phase(httpServer(process.env.PORT));\n\n\t// Boot the application. The phases registered above will be executed\n\t// sequentially, resulting in a fully initialized server that is listening\n\t// for requests.\n\tapp.boot(process.env.NODE_ENV, function (err) {\n\t\tif (err) {\n\t\t\tconsole.error(err.message);\n\t\t\tconsole.error(err.stack);\n\t\t\treturn process.exit(-1);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "848f177a36eb278d3f5ad5ccdee49294", "score": "0.6279067", "text": "run() {\n // Start server listening\n this.server.listen(config_service.port);\n }", "title": "" }, { "docid": "9a4b3f207a52eb50bdddb5882c05c87f", "score": "0.6275362", "text": "function start() {\n \"use strict\";\n\n var port = process.env.PORT || 3031;\n app.listen(port);\n console.log(\"server pid %s listening on port %s in %s mode\", process.pid, port, app.get(\"env\"));\n}", "title": "" }, { "docid": "76f578514010befc2988963d8e87b962", "score": "0.6251018", "text": "function createServer(options) {\n assert.object(options, 'options');\n assert.object(options.log, 'options.log');\n\n\n // Create a server with our logger and custom formatter\n // Note that 'version' means all routes will default to\n // 1.0.0\n var server = restify.createServer({\n /*formatters: {\n 'application/todo; q=0.9': formatTodo\n },*/\n log: options.log,\n name: 'mp',\n version: '1.0.0'\n });\n\n\n // Ensure we don't drop data on uploads\n //server.pre(restify.pre.pause());\n\n // Clean up sloppy paths like //todo//////1//\n server.pre(restify.pre.sanitizePath());\n\n // Handles annoying user agents (curl)\n server.pre(restify.pre.userAgentConnection());\n\n\n\n\n \n // Set a per request bunyan logger (with requestid filled in)\n //server.use(restify.requestLogger());\n\n // Allow 5 requests/second by IP, and burst to 10\n server.use(restify.throttle({\n burst: 100,\n rate: 50,\n ip: true\n }));\n\n\n // Use the common stuff you probably want\n //hard code the upload folder for now\n server.use(restify.bodyParser({uploadDir:__dirname+'/../uploads/'}));\n server.use(restify.acceptParser(server.acceptable));\n server.use(restify.dateParser());\n server.use(restify.authorizationParser());\n server.use(restify.queryParser());\n server.use(restify.gzipResponse());\n\n\n\n \n\n // Now our own handlers for authentication/authorization\n // Here we only use basic auth, but really you should look\n // at https://github.com/joyent/node-http-signature\n server.use(function setup(req, res, next) {\n if (options.user && options.password) {\n req.allow = {\n user: options.user,\n password: options.password\n };\n } \n next();\n });\n //server.use(authenticate);\n\n //server.use(apiUtil.save);\n\n //server api doc\n server.get(/\\/apidoc\\/?.*/, restify.serveStatic({\n \t\tdirectory: './public'\n\t}));\n\n // static files: /, /index.html, /images...\n //var STATIS_FILE_RE = /\\/?\\.css|\\/?\\.js|\\/?\\.png|\\/?\\.jpg|\\/?\\.gif|\\/?\\.jpeg|\\/?\\.less|\\/?\\.eot|\\/?\\.svg|\\/?\\.ttf|\\/?\\.otf|\\/?\\.woff|\\/?\\.pdf|\\/?\\.ico|\\/?\\.json|\\/?\\.wav|\\/?\\.mp3/;\n var STATICS_FILE_RE = /\\.(css|js|jpe?g|png|gif|less|eot|svg|bmp|tiff|ttf|otf|woff|ico|aac|wav|ogg|txt|mp3?)$/i;\n var STATICS_HTML = /\\.(pdf|json|xml|html)$/i;\n server.get(STATICS_FILE_RE, restify.serveStatic({ directory: './public/web', maxAge: sysConfig.maxAge }));\n server.get(STATICS_HTML, restify.serveStatic({ directory: './public/web', maxAge: 0 }));\n\n server.get('/api/sendCallOut/:bizId/code/:code/type/:callOutId',order.sendCallOut);\n server.get('/api/getAudio',order.getAudio);\n server.get('/api/getAccessToken',order.getAccessToken);\n //everyone\n server.get('/api/biz',biz.listBiz);\n server.get('/api/json/:id',biz.getBiz);\n //everyone\n server.get('/api/biz/:bizId', biz.getBiz);\n //biz\n server.get('/api/biz/:bizId/cust',biz.listBizCust);\n //biz\n server.get('/api/biz/:bizId/cust/:custId/act',biz.listBizCustAct);\n //biz\n server.post({path:'/api/biz/:bizId/image',contentType:'multipart/form-data'},roleBase.checkBizManagerToken,biz.uploadImage);\n //biz\n server.post({path:'/api/biz/:userId/avatar',contentType:'multipart/form-data'},roleBase.checkBizWaiterToken,biz.updateBizUserAvatar);\n //biz\n server.post({path:'/api/bizUser',contentType: 'application/json'}, biz.bizUserSignUp);\n //biz\n server.post({path:'/api/bizUser/do/login',contentType: 'application/json'}, biz.bizLogin);\n server.post({path:'/api/bizUser/do/mLogin',contentType: 'application/json'}, biz.bizUserMobileLogin);\n server.post({path:'/api/biz/:bizId/mLoginOut',contentType: 'application/json'}, roleBase.checkBizWaiterToken ,biz.bizUserMobileLogOut);\n server.put({path:'/api/biz/:bizId/mobileSound/:sound',contentType: 'application/json'} ,roleBase.checkBizWaiterToken , biz.updateBizMobileSound);\n //biz token\n server.put({path:'/api/bizUser',contentType: 'application/json'},roleBase.checkBizWaiterToken , biz.updateBizUserInfo);\n //biz\n server.get('/api/bizUser/:userId/active',biz.activeBizUser);\n //biz\n server.post({path:'/api/bizUser/send/activeMail',contentType:'application/json'},biz.sendActiveEmail);\n //biz\n server.post({path:'/api/bizUser/send/passwordMail',contentType:'application/json'},biz.sendResetPasswordEmail);\n //biz\n server.post({path:'/api/bizUser/:userId/changePassword',contentType:'application/json'},roleBase.checkBizWaiterToken , biz.changeBizPassword);\n //biz\n server.post({path:'/api/bizApp',contentType:'application/json'},roleBase.checkBizOwnerToken , biz.addAppForBiz);\n //biz\n server.put({path:'/api/bizApp/:appId',contentType:'application/json'},roleBase.checkBizOwnerToken , biz.updateAppForBiz);\n //biz\n server.get('/api/bizApp',roleBase.checkBizManagerToken , biz.getBizApplication);\n //biz\n server.get('/api/biz/:yelpId/yelpInfo',yelpApi.getYelpBizInfo);\n //biz\n server.get('/api/bizUser/:bizId',roleBase.checkBizOwnerToken , biz.getBizUserInfo);\n server.get('/api/bizUserInfo/:bizId',roleBase.checkBizWaiterToken, biz.getBizUserInfoById);\n\n //biz\n server.get('/api/biz/:bizId/coupon',coupon.listBizCoupon);\n //biz\n server.get('/api/biz/:bizId/coupon/:id',coupon.getBizCoupon);\n //biz\n server.get('/api/biz/:bizId/promo/:promoId/coupon',coupon.listBizPromoCoupon);\n //biz\n server.post('/api/biz/:bizId/coupon/:couponId/redeem',coupon.redeemBizCoupon);\n //biz\n server.post({path:'/api/biz',contentType:'multipart/form-data'},biz.createBusiness);\n //biz\n server.put({path:'/api/biz',contentType:'application/json'},roleBase.checkBizOwnerToken,biz.updateBizBaseInfo);\n //biz\n server.get('/api/biz/:bizId/productCount',roleBase.checkBizManagerToken,prod.getProductCount);\n //biz\n server.get('/api/biz/:bizId/productTypeCount',roleBase.checkBizManagerToken,prod.getProductTypeCount);\n //biz\n server.get('/api/biz/:bizId/customerCount',roleBase.checkBizManagerToken , biz.getCustomerCount);\n //biz\n server.put('/api/biz/:bizId/type/:typeId/order/:displayOrder',roleBase.checkBizManagerToken,prod.updateProdTypeOrder);\n //biz temp\n //TODO it is important api\n server.put({path:'/api/bizHard',contentType: 'application/json'},biz.updateBizHardInfo);\n //biz token\n server.put('/api/biz/:bizId/prod/:prodId/clearImage',roleBase.checkBizManagerToken,prod.clearProdImg);\n //biz token\n server.put({path:'/api/biz/:bizId/cust/:custId/custComment',contentType: 'application/json'},roleBase.checkBizManagerToken , biz.setBizCustRelComment);\n //biz token\n server.get('/api/biz/:bizId/cust/:custId/bizCustRel',roleBase.checkBizOwnerToken , biz.getBizRelCust);\n \n //cust not security\n //server.get('/api/cust/:id',cust.getCust);\n //cust\n server.get('/api/customerInfo',cust.getCustomerInfo);\n //cust\n server.get('/api/cust/:custId/biz',roleBase.checkCustomerToken ,cust.listCustBiz);\n //everyone US\n server.post({path:'/api/cust/us',contentType: 'application/json'}, cust.addUsCust);\n //everyone CN\n server.post({path:'/api/cust/cn',contentType: 'application/json'}, cust.addCnCust);\n //cust\n server.put({path:'/api/cust/:custId',contentType: 'application/json'}, roleBase.checkCustomerToken ,cust.updateCust);\n \n //cust\n server.post({path:'cust/:custId/biz/:bizId/promo/:promoId/coupon',contentType:'multipart/form-data'},roleBase.checkCustomerToken ,coupon.addCoupon);\n //cust\n server.get('/api/cust/from/:custId/coupon',roleBase.checkCustomerToken ,coupon.listFromCustCoupon);\n //cust\n server.get('/api/cust/from/:custId/coupon/:couponId',roleBase.checkCustomerToken ,coupon.getFromCustCoupon);\n //cust\n server.get('/api/cust/to/:custId/coupon',roleBase.checkCustomerToken,coupon.listToCustCoupon);\n //cust\n server.get('/api/cust/to/:custId/coupon/:couponId',roleBase.checkCustomerToken,coupon.getToCustCoupon);\n //cust\n server.get('/api/cust/:custId/couponCount',coupon.getCouponCount);\n //cust\n server.post('/api/cust/:custId/biz/:bizId/checkin',roleBase.checkCustomerToken,cust.checkIn);\n //cust\n server.post({path:'/api/cust/:custId/changepassword',contentType:'application/json'},roleBase.checkCustomerToken ,cust.changePassword);\n //cust\n server.post({path:'/api/cust/do/login',contentType:'application/json'},cust.doLogin);\n //cust\n server.get('/api/cust/:custId/active',cust.activeUser);\n //cust\n server.post({path:'/api/cust/send/activeMail',contentType:'application/json'},cust.sendActiveEmail);\n //cust\n server.post({path:'/api/cust/send/passwordMail',contentType:'application/json'},cust.sendPasswordEmail);\n //cust\n server.post({path:'/api/cust/:phone/password',contentType:'application/json'},cust.resetCustPswd);\n //cust\n server.post({path:'/api/cust/:custId/biz/:bizId/favorite',contentType:'application/json'},roleBase.checkCustomerToken,cust.updateFavoriteBiz);\n //cust\n server.get('/api/cust/:custId/biz/:bizId/favorite',roleBase.checkCustomerToken,cust.getFavoriteBiz);\n //cust\n server.get('/api/cust/:custId/favoriteBiz' ,roleBase.checkCustomerToken,cust.getFavoriteBiz);\n //cust\n server.get('/api/cust/:custId/favoriteProd' ,roleBase.checkCustomerToken,cust.getFavoriteProduct);\n //cust\n server.get('/api/cust/:custId/prod/:productId/favorite' ,roleBase.checkCustomerToken,cust.getFavoriteProduct);\n //cust\n server.post('/api/cust/:custId/prod/:productId/favorite',roleBase.checkCustomerToken,cust.addProdCustRel);\n //cust\n server.del('/api/cust/:custId/prod/:productId/favorite',roleBase.checkCustomerToken,cust.deleteProdCustRel);\n //cust\n server.post({path:'/api/prod/:custId/prod/:productId/comment',contentType:'application/json'},roleBase.checkCustomerToken,prod.addProductComment);\n //cust\n server.get('/api/prod/:custId/custComment' ,roleBase.checkCustomerToken,prod.queryCommentByCust);\n //cust\n server.get('/api/prod/:productId/prodComment' ,prod.queryCommentByProd);\n //cust\n server.get('/api/prod/:productId/ratComment' ,prod.queryProductRating);\n //cust\n server.put({path:'/api/prod/:custId/comment/:id/',contentType:'application/json'},roleBase.checkCustomerToken,prod.updateProductComment);\n //cust\n server.del('/api/prod/:custId/comment/:id/' ,roleBase.checkCustomerToken,prod.deleteProductComment);\n //cust\n server.post({path:'/api/biz/:custId/biz/:bizId/comment',contentType:'application/json'},roleBase.checkCustomerToken , biz.addBizComment);\n //cust\n server.get('/api/biz/:custId/custBizComment' ,roleBase.checkCustomerToken ,biz.queryCommentByCust);\n //cust\n server.get('/api/biz/:bizId/bizComment' ,biz.queryCommentByBiz);\n //cust\n server.get('/api/biz/:bizId/ratBizComment' ,biz.queryBizRating);\n //cust\n server.put({path:'/api/biz/:custId/bizComment/:id/',contentType:'application/json'},roleBase.checkCustomerToken , biz.updateBizComment);\n //cust\n server.del('/api/biz/:custId/bizComment/:id/' , roleBase.checkCustomerToken , biz.deleteBizComment);\n //cust\n server.get('/api/biz/do/bizWithComment' ,biz.searchBizWithComment);\n //cust\n server.get('/api/prod/:bizId/prodWithComment' ,prod.getProductWithComment);\n server.get('/api/prod/:bizId/productWithCommentLabel' ,prod.getProductWithCommentLabel);\n //cust\n server.get('/api/prod/:productId/favoriteCount' ,prod.getProductFavoriteCount);\n //cust\n server.get('/api/biz/:bizId/favoriteCount' ,biz.getFavoriteBizCount);\n //cust\n server.get('/api/cust/do/searchProd' ,search.searchProduct);\n //cust\n server.get('/api/cust/do/searchProdTip' ,search.searchPrefixProduct);\n //cust\n server.get('/api/cust/do/searchBizTip' ,search.searchPrefixBiz);\n //cust\n server.get('/api/cust/do/searchProdLike' ,search.searchLikeProd);\n //cust\n server.get('/api/cust/do/searchBizLike' ,search.searchLikeBiz);\n //cust\n server.get('/api/cust/do/searchBiz' ,search.searchBusiness);\n server.get('/api/cust/do/searchWechatBiz' ,search.searchWechatBusiness);\n //cust\n server.get('/api/cust/do/createBizIndex',roleBase.checkAdminToken,search.createBusinessIndex);\n //server.get('/api/cust/do/createWechatBizIndex',search.createWechatBizIndex);\n //cust\n server.get('/api/cust/do/createProdIndex',roleBase.checkAdminToken,search.createProductIndex);\n //everyone\n server.get('/api/biz/:uniqueName/uniqueName',biz.convertUniqueToBizId);\n //cust\n server.get('/api/biz/:bizId/specialProduct',prod.getSpecialProduct);\n //cust\n server.post('/api/biz/:bizId/prod/:productId/order',prod.addProd2Order);\n //cust\n server.get('/api/cust/do/feedback',cust.qureyFeedback);\n //cust\n server.post({path:'/api/cust/do/feedback',contentType:'application/json'},cust.addFeedback);\n //biz\n server.put({path:'/api/biz/:bizId/specialProduct/:productId',contentType:'application/json'},roleBase.checkBizManagerToken,prod.updateProductSpecial);\n //cust\n server.post('/api/cust/:custId/biz/:bizId/bizCustRel',roleBase.checkCustomerToken,cust.createBizRelByCust);\n //cust\n //server.post('/api/cust/:custId/loginEmail/:newEmail',cust.sendUpdateEmailUrl);\n //cust\n server.put({path:'/api/cust/:custId/loginEmail',contentType:'application/json'},roleBase.checkCustomerToken,cust.updateLoginEmail);\n //biz\n server.post({path:'/api/cust/:custId/avatar',contentType:'multipart/form-data'},roleBase.checkCustomerToken,cust.updateCustAvatar);\n\n //cust\n server.get('/api/cust/do/bizPromo',promo.getAllBizPromo4Cust);\n //cust\n server.get('/api/cust/do/prodPromo',promo.getAllProdPromo4Cust);\n\n //everyone\n server.get('/api/biz/:bizId/prod',prod.listBizProd);\n server.get('/api/allLabel',prod.getAllLabel);\n //everyone\n server.get('/api/biz/:bizId/prodBase',prod.searchBizProdBase);\n server.get('/api/biz/:bizId/prodBase/:menuId',prod.searchBizProdBase);\n //everyone\n server.get('/api/biz/:bizId/prod/:id',prod.getBizProd);\n //biz\n server.post({path:'/api/biz/:bizId/prod',contentType: 'multipart/form-data'}, roleBase.checkBizManagerToken,prod.addBizProd);\n //biz\n server.put({path:'/api/biz/:bizId/prod/:id',contentType: 'application/json'}, roleBase.checkBizManagerToken,prod.updateBizProd);\n //biz\n server.del('/api/biz/:bizId/prod/:id', roleBase.checkBizManagerToken,prod.deleteBizProd);\n //everyone\n server.get('/api/biz/get/topDish',prod.getTopDishes);\n //biz\n server.put({path:'/api/biz/:bizId/prodActive/:prodId',contentType: 'application/json'} ,roleBase.checkBizManagerToken, prod.updateProductActive);\n //biz\n server.get('/api/biz/:bizId/totalCustCount' , roleBase.checkBizManagerToken , biz.getBizTotalCustCount);\n //biz\n server.get('/api/biz/:bizId/totalClickCount' , roleBase.checkBizManagerToken , biz.getBizTotalClickCount);\n //biz\n server.get('/api/biz/:bizId/lastCustCount' , roleBase.checkBizManagerToken , biz.getBizLastCheckIn);\n //biz\n server.get('/api/biz/:bizId/lastClickCount' , roleBase.checkBizManagerToken , biz.getBizLastClickCount);\n //biz token\n // server.get('/api/biz/:bizId/topClickProd/:size' , roleBase.checkBizOwnerToken , biz.getBizTopClickProd);\n server.get('/api/biz/:bizId/topClickProd/:size' , roleBase.checkBizOwnerToken , biz.getBizTopClickProdES);\n server.get('/api/biz/:bizId/topClickProdType/:size' , roleBase.checkBizOwnerToken , biz.getBizTopClickProdTypeES);\n //biz token\n server.get('/api/biz/:bizId/topOrderProd/:size' , roleBase.checkBizOwnerToken ,prod.getBizTopOrderProd);\n //biz token\n server.get('/api/biz/:bizId/topPointCust/:size' , roleBase.checkBizManagerToken , biz.getBizTopPointCust);\n //biz token\n // server.get('/api/biz/:bizId/dayClick/:size' , roleBase.checkBizOwnerToken , biz.getLastDayBizClick);\n server.get('/api/biz/:bizId/dayClick' , roleBase.checkBizOwnerToken , biz.getLastDayBizClickES);\n //biz token\n // server.get('/api/biz/:bizId/weekClick/:size' ,roleBase.checkBizManagerToken , biz.getLastWeekBizClick);\n server.get('/api/biz/:bizId/weekClick' ,roleBase.checkBizManagerToken , biz.getLastWeekBizClickES);\n //biz token\n // server.get('/api/biz/:bizId/monthClick/:size' , roleBase.checkBizManagerToken , biz.getLastMonthBizClick);\n server.get('/api/biz/:bizId/monthClick' , roleBase.checkBizManagerToken , biz.getLastMonthBizClickES);\n\n server.get('/api/biz/:bizId/getBizConsume' , roleBase.checkBizManagerToken , biz.getBizConsumeES);\n //biz token\n server.get('/api/biz/:bizId/dayOrder/:size' , roleBase.checkBizManagerToken ,prod.getDayProdOrderStat);\n //biz token\n server.get('/api/biz/:bizId/weekOrder/:size' , roleBase.checkBizManagerToken ,prod.getWeekProdOrderStat);\n //biz token\n server.get('/api/biz/:bizId/monthOrder/:size' , roleBase.checkBizManagerToken ,prod.getMonthProdOrderStat);\n //biz token\n server.get('/api/biz/:bizId/allProdRel' ,roleBase.checkBizManagerToken ,prod.queryBizAllProdRel);\n //biz token\n server.get('/api/biz/:bizId/allProdComment' , prod.queryBizProdComment);\n //biz token\n server.get('/api/biz/:bizId/allFavorCust' , roleBase.checkBizManagerToken , biz.queryBizFavorCust);\n //biz\n server.get('/api/biz/:bizId/taxRate',biz.getTaxRateByBiz);\n\n //everyone\n server.get('/api/biz/:bizId/promo',promo.listBizPromo);\n //everyone\n server.get('/api/biz/:bizId/prod/:prodId/promo',promo.listBizProdPromo);\n //everyone\n server.get('/api/biz/:bizId/promo/:id',promo.getBizPromo);\n //biz\n server.post({path:'/api/biz/:bizId/promo',contentType: 'application/json'}, roleBase.checkBizManagerToken ,promo.addBizPromo);\n //biz\n server.put({path:'/api/biz/:bizId/promo/:id',contentType: 'application/json'}, roleBase.checkBizManagerToken ,promo.updateBizPromo);\n //biz\n server.del('/api/biz/:bizId/promo/:id', roleBase.checkBizManagerToken ,promo.deleteBizPromo);\n //every\n server.get('/api/biz/:bizId/prodType', prod.getBizProdType);\n server.get('/api/biz/:bizId/prodType/:menuId', prod.getBizProdType);\n server.get('/api/biz/:bizId/prodLabel', prod.getProdLabel);\n //biz\n server.get('/api/biz/:bizId/prodType/:id', prod.getBizProdType);\n //biz\n server.post({path:'/api/biz/:bizId/prodType',contentType: 'application/json'}, roleBase.checkBizManagerToken ,prod.addBizProdType);\n //biz\n server.put({path:'/api/biz/:bizId/prodType/:typeId',contentType: 'application/json'}, roleBase.checkBizManagerToken , prod.updateBizProdType);\n //biz\n server.del('/api/biz/:bizId/prodType/:typeId', roleBase.checkBizManagerToken ,prod.delBizProdType);\n //biz\n server.get('/api/biz/:bizId/promoNow', promo.getBizPromoNow);\n //biz\n server.get('/api/biz/:bizId/bizImg', biz.getBizImage);\n //biz token\n server.post('/api/biz/:bizId/bizImg', roleBase.checkBizManagerToken , biz.addBizImg);\n //biz token\n server.put('/api/biz/:bizId/bizImg/:imgId', roleBase.checkBizManagerToken , biz.updateBizImgFlag);\n //biz token\n server.del('/api/biz/:bizId/bizImg/:imgId', roleBase.checkBizManagerToken , biz.deleteBizImg);\n //biz token\n server.put('/api/biz/:bizId/bizImg/:imgId/update', roleBase.checkBizManagerToken , biz.updateBizImg);\n //biz menu\n server.get('/api/biz/:bizId/getBizMenu' , roleBase.checkBizManagerToken , prod.getBizMenu);\n server.post('/api/biz/:bizId/addBizMenu' , roleBase.checkBizManagerToken , prod.addBizMenu);\n server.put('/api/biz/:bizId/updateBizMenu/:menuId' , roleBase.checkBizManagerToken , prod.updateBizMenu);\n server.del('/api/biz/:bizId/deleteBizMenu/:menuId' , roleBase.checkBizManagerToken , prod.deleteBizMenu);\n\n //everyone\n server.get('/api/point',point.listPoint);\n //everyone\n server.get('/api/point/:id',point.getPoint);\n\n //upload image to mongo db\n server.post({path:'/api/biz/:bizId/prod/:prodId/image',contentType:'multipart/form-data'}, roleBase.checkBizManagerToken ,prod.uploadImg);\n\n //serve image\n server.get({path:'/api/image/:id/:size'},image.serveImg);\n //serve batch job for reset image\n server.get({path:'/api/resetImg'},batchJob.resetAllImage);\n\n //serve menu in pdf\n //server.get('/api/biz/:bizId/pdf',pdf.getBizMenuPdf);\n server.get('/api/biz/:bizId/menupdf',pdf.getBizMenuPdf);\n server.get('/api/biz/:bizId/menupdf/:size',pdf.getBizMenuPdf);\n server.get('/api/biz/:bizId/menupdf_new',pdf.getBizMenuPdfNew);\n server.get('/api/biz/:bizId/menupdf_new/:ver',pdf.getBizMenuPdfNew);\n server.get('/api/export_my_table_as_pdf',pdf.getMyTablePdf);\n\n /**\n * server order module ,all need token autherization\n */\n\n server.post({path:'/api/biz/:bizId/printeOrderAll/:orderId',contentType: 'application/json'}, roleBase.checkBizWaiterToken ,order.printeOrderAll);\n server.post({path:'/api/biz/:bizId/printeOrderUrge',contentType: 'application/json'}, roleBase.checkBizWaiterToken ,order.printeOrderUrge);\n server.post({path:'/api/biz/:bizId/printeOrderSendKitchen',contentType: 'application/json'}, roleBase.checkBizWaiterToken ,order.printeOrderSendKitchen);\n\n // server.post({path:'/api/cust/:custId/order',contentType: 'application/json'},roleBase.checkCustomerToken,order.createOrder);\n server.post({path:'/api/cust/:custId/order',contentType: 'application/json'},roleBase.checkCustomerToken,order.createOrderNew);\n server.post({path:'/api/biz/:bizId/order',contentType: 'application/json'}, roleBase.checkBizWaiterToken ,order.createOrderNoPrice);\n server.post({path:'/api/biz/:bizId/orderPrice',contentType: 'application/json'},order.getOrderPrice);\n server.get('/api/cust/:custId/order', roleBase.checkCustomerToken ,order.getCustOrders);\n server.get('/api/biz/:bizId/order',roleBase.checkBizWaiterToken,order.getBizOrders);\n server.get('/api/biz/:bizId/orderHistory',roleBase.checkBizWaiterToken,order.getBizOrdersHistory);\n server.get('/api/biz/:bizId/order/:orderId',roleBase.checkBizWaiterToken,order.getOrderItemById);\n server.get('/api/cust/:custId/order/:orderId',roleBase.checkCustomerToken,order.getOrderItemById);\n server.put('/api/cust/:custId/order/:orderId/status/:status',roleBase.checkCustomerToken ,order.updateOrderStatus);\n server.put({path:'/api/biz/:bizId/order/:orderId/status/:status',contentType: 'application/json'},roleBase.checkBizWaiterToken ,order.updateOrderStatus);\n server.put('/api/cust/:custId/order/:orderId/item/:itemId/status/:status',roleBase.checkCustomerToken ,order.updateItemStatus);\n server.put('/api/biz/:bizId/order/:orderId/item/:itemId/status/:status',roleBase.checkBizWaiterToken ,order.updateItemStatus);\n //server.put('/api/biz/:bizId/order/:orderId/item/:itemId/cancel',order.cancelItemInOrder);\n //server.put('/api/cust/:custId/order/:orderId/item/:itemId/cancel',order.cancelItemInOrder);\n server.post({path:'/api/biz/:bizId/order/:orderId/addItem',contentType: 'application/json'},roleBase.checkBizWaiterToken ,order.addItemNoPrice);\n server.post({path:'/api/cust/:custId/order/:orderId/addItem',contentType: 'application/json'},roleBase.checkCustomerToken ,order.addItemToOrder);\n server.del({path:'/api/cust/:custId/order/:orderId/item',contentType: 'application/json'},roleBase.checkCustomerToken ,order.deleteOrderItem);\n server.del({path:'/api/biz/:bizId/order/:orderId/item',contentType: 'application/json'},roleBase.checkBizWaiterToken ,order.deleteItemNoPrice);\n server.put({path:'/api/cust/:custId/order/:orderId/resetSize',contentType: 'application/json'},roleBase.checkCustomerToken,order.resetOrderItemSize);\n server.put({path:'/api/biz/:bizId/order/:orderId/resetSize',contentType: 'application/json'},roleBase.checkBizWaiterToken,order.resetOrderItemSize);\n server.put('/api/biz/:bizId/order/:orderId/table/:tableId',roleBase.checkBizWaiterToken,order.updateOrderTable);\n server.get('/api/biz/:bizId/order/:orderId/table/:tableId',roleBase.checkBizWaiterToken,order.getBizTableOrders);\n server.put('/api/biz/:bizId/order/:orderId/orderPrice',roleBase.checkBizWaiterToken,order.reUpdateOrderPrice);\n server.put('/api/biz/:bizId/orderStatus/:orderStatus',roleBase.checkBizWaiterToken,biz.setBizOrderStatus);\n server.get('/api/biz/:bizId/orderCustomer',roleBase.checkBizWaiterToken,order.getBizOrderCustomer);\n server.get('/api/biz/:bizId/order/:orderId/invoice',roleBase.checkBizWaiterToken,order.getOrderForInvoice);\n server.post('/api/biz/:bizId/dayOrderStat',roleBase.checkBizManagerToken,order.finishBizOrder);\n server.get('/api/biz/:bizId/dayOrderStat',roleBase.checkBizManagerToken,order.getBizDayOrderStat);\n server.del({path:'/api/cust/:custId/order/:orderId',contentType: 'application/json'},roleBase.checkCustomerToken , order.deleteOrder );\n server.get('/api/biz/:bizId/order/:orderId/item',roleBase.checkBizWaiterToken,order.getOrderInfoWithItem);\n server.get('/api/cust/:custId/order/:orderId/item',roleBase.checkCustomerToken,order.getOrderInfoWithItem);\n server.put('/api/cust/:custId/order/:orderId/active',roleBase.checkCustomerToken,order.setOrderActive);\n server.get('/api/biz/:bizId/dailyOrder',roleBase.checkBizWaiterToken,order.bizDailyOrder);\n server.get('/api/biz/:bizId/dayOrderPaymentStat',order.getBizOrderStat);\n server.get('/api/biz/:bizId/searchBizOrder',order.searchBizOrder);\n\n server.put('/api/biz/:bizId/parent/:parentId',roleBase.checkBizManagerToken,biz.setBizParent);\n server.get('/api/biz/:bizId/parentProd',prod.getParentProd);\n server.post({path:'/api/cust/:custId/contact',contentType: 'application/json'},roleBase.checkCustomerToken,cust.addCustContact);\n server.put('/api/cust/:custId/contact/:contactId',roleBase.checkCustomerToken,cust.updateCustContact);\n server.get('/api/cust/:custId/contact',roleBase.checkCustomerToken,cust.getCustContact);\n server.del('/api/cust/:custId/contact/:contactId',roleBase.checkCustomerToken,cust.delCustContact);\n server.get('/api/bizCity',biz.getBizDistinctCity)\n server.post('/api/wechat',wechat.wechatMain);\n server.get('/api/wechat',wechat.wechatMain);\n server.get('/api/wechat/menu',wechat.createWechatMenu);\n server.get('/api/wechat/sendMsg',wechat.sendTestMsg);\n server.get('/api/wechat/ticket',wechat.getApiTicket);\n server.get('/api/wechat/user',wechat.getUserInfoByCode);\n server.get('/api/wechat/user/:openId',wechat.getUserInfoByCode);\n server.get('/api/wechat/user/:openId/bizwiseToken',cust.getTokenByWechat);\n server.post({path:'/api/wechat/payment',contentType: 'application/json'},wechat.wechatPayment);\n server.get('/api/wechat/paymentCallback',wechat.wechatPaymentCallback);\n server.post('/api/wechat/paymentCallback',wechat.wechatPaymentCallback);\n server.get('/api/wechat/paymentError',wechat.wechatPaymentCallback);\n server.post('/api/wechat/paymentError',wechat.wechatPaymentCallback);\n\n server.put('/api/wechat/paymentCallback',wechat.wechatPaymentCallback);\n server.get('/api/wechat/:giftCode/receive',wechat.receiveGift);\n\n server.post({path:'/api/payment/bizInvoice',contentType: 'application/json'},payment.addBizInvoice);\n server.put({path:'/api/payment/bizInvoice/:invoiceId',contentType: 'application/json'},payment.updateBizInvoiceStatus);\n server.get('/api/payment/bizInvoice',payment.queryBizInvoice);\n\n\n // callout\n server.get('/api/callout', biz.queryAllCallOut);\n server.get('/api/biz/:bizId/callout', biz.queryBizCallOut);\n server.post({path:'/api/biz/:bizId/callout',contentType: 'application/json'}, biz.addBizCallOut);\n server.del('/api/biz/:bizId/callout/:callOutId',biz.deleteBizCallOut);\n /**\n * server business table management module ,all need token autherization\n */\n server.post({path:'/api/biz/:bizId/table',contentType: 'application/json'},roleBase.checkBizManagerToken,table.addBizTable);\n server.put({path:'/api/biz/:bizId/table/:tableId',contentType: 'application/json'},roleBase.checkBizManagerToken,table.updateBizTableInfo);\n server.put('/api/biz/:bizId/table/:tableId/status/:status',roleBase.checkBizManagerToken,table.updateBizTableStatus);\n server.del('/api/biz/:bizId/table/:tableId',roleBase.checkBizManagerToken,table.deleteBizTable);\n server.get('/api/biz/:bizId/table',table.queryBizTable);\n server.get('/api//biz/:bizId/availableTableQrCodes',roleBase.checkBizManagerToken,table.queryAvailableTableQrCode);\n\n /**\n * server business EXTEND management module ,all need token autherization\n */\n server.post({path:'/api/biz/:bizId/extend',contentType: 'application/json'}, roleBase.checkBizManagerToken , biz.addBizExtend);\n server.put({path:'/api/biz/:bizId/extend/:extendId',contentType: 'application/json'},roleBase.checkBizManagerToken ,biz.updateBizExtend);\n server.del('/api/biz/:bizId/extend/:extendId',roleBase.checkBizManagerToken , biz.delBizExtend);\n server.get('/api/biz/:bizId/extend', roleBase.checkBizWaiterToken , biz.getBizExtend);\n\n\n /**\n * server business PRINTER management module ,all need token autherization\n */\n server.post({path:'/api/biz/:bizId/printer',contentType: 'application/json'}, roleBase.checkBizManagerToken , biz.addBizPrinter);\n server.put({path:'/api/biz/:bizId/printer/:printerId',contentType: 'application/json'},roleBase.checkBizManagerToken ,biz.updateBizPrinter);\n server.del('/api/biz/:bizId/printer/:printerId',roleBase.checkBizManagerToken , biz.delBizPrinter);\n server.get('/api/biz/:bizId/printer', roleBase.checkBizWaiterToken , biz.getBizPrinter);\n\n server.post({path:'/api/biz/:bizId/printer',contentType: 'application/json'},biz.addBizPrinter);\n server.put({path:'/api/biz/:bizId/printer/:printerId',contentType: 'application/json'},biz.updateBizPrinter);\n server.del('/api/biz/:bizId/printer/:printerId',biz.delBizPrinter);\n server.get('/api/biz/:bizId/printer',biz.getBizPrinter);\n server.post({path:'/api/biz/:bizId/printerTest',contentType: 'application/json'},biz.testBizPrinter);\n /**\n * server payment module , all need token autherization\n */\n server.post({path:'/api/cust/:custId/order/:orderId/payment',contentType:'application/x-www-form-urlencoded'},roleBase.checkCTokenForBT ,payment.doPayment);\n server.post({path:'/api/cust/:custId/order/:orderId/paypal',contentType:'application/json'},roleBase.checkCustomerToken,payment.doPaypal);\n server.get('/api/cust/:custId/paymentToken',payment.getPaymentClientToken);\n server.get('/api/cust/:custId/payment',roleBase.checkCustomerToken,payment.queryCustomerPayment);\n server.get('/api/biz/:bizId/payment',payment.queryBizPayment);\n server.get('/api/refund/:transactionId',payment.doRefund);\n server.get('/api/biz/:bizId/transaction/:transactionId',payment.queryTransaction);\n server.get('/api/cust/:custId/transaction/:transactionId',payment.queryTransaction);\n server.get('/api/biz/:bizId/paymentStat',payment.getBizPaymentStat);\n server.post({path:'/api/cust/:custId/order/:orderId/alipay',contentType:'application/json'},roleBase.checkCustomerToken,payment.doAlipay);\n server.post({path:'/api/alipay/notify',contentType:'application/x-www-form-urlencoded'},payment.receiveAlipayNotify);\n server.get('/api/alipay/return',function(req,res,next){\n var orderId = req.params.out_trade_no\n res.redirect('/checkout-order-success?orderId='+orderId,next);\n })\n /**\n 测试接口\n server.get('/api/saveOrder',payment.saveOrder);\n server.get('/api/notify',payment.getNotify);\n server.get('/api/writeLog',payment.writeLog);\n server.get('/api/testnotify',payment.testnotify);\n server.get('/api/testnotifyParameter',payment.testnotifyParameter);\n server.post({path:'/api/cust/alipay/:custId',contentType:'application/json'},roleBase.checkCustomerToken,payment.doAlipay);\n */\n\n /**\n * server business Role Base Control Module ,all need token autherization\n */\n server.post({path:'/api/biz/:bizId/bizUser/:userId/manager',contentType: 'application/json'}, roleBase.checkBizOwnerToken , roleBase.addBizManager);\n server.post({path:'/api/biz/:bizId/bizUser/:userId/waiter',contentType: 'application/json'}, roleBase.checkBizManagerToken , roleBase.addBizWaiter);\n server.put({path:'/api/biz/:bizId/bizUser/:userId/manager',contentType: 'application/json'}, roleBase.checkBizOwnerToken , roleBase.updateBizManager);\n server.put({path:'/api/biz/:bizId/bizUser/:userId/waiter',contentType: 'application/json'}, roleBase.checkBizManagerToken , roleBase.updateBizWaiter);\n server.del('/api/biz/:bizId/bizUser/:userId/manager', roleBase.checkBizOwnerToken , roleBase.removeBizUserRole);\n server.del('/api/biz/:bizId/bizUser/:userId/waiter', roleBase.checkBizWaiterToken , roleBase.removeBizUserRole);\n server.get('/api/biz/:bizId/bizUser', roleBase.checkBizManagerToken , roleBase.getBizEmployee);\n server.get('/api/biz/:bizId/bizUser/:user', roleBase.checkBizManagerToken , roleBase.searchBizUser);\n\n /**\n * server APN\n */\n server.get('/api/biz/:bizId/apn', iosPush.pushAPNTest);\n\n /**\n * Admin Module\n */\n server.get('/api/admin/:adminId' ,roleBase.checkAdminToken,admin.getAdminUserInfo);\n server.post({path:'/api/admin/do/login',contentType: 'application/json'},admin.adminUserLogin);\n server.put({path:'/api/admin/:adminId/password',contentType: 'application/json'} ,roleBase.checkAdminToken,admin.changeAdminPassword);\n server.put({path:'/api/admin/:adminId',contentType: 'application/json'} ,roleBase.checkAdminToken,admin.updateAdminInfo);\n\n /**\n * Sms Module\n */\n server.post({path:'/api/sms/:phone/sign' ,contentType: 'application/json'},sms.sendSignInSms);\n server.post({path:'/api/sms/:phone/password' ,contentType: 'application/json'},sms.sendPasswordSms);\n\n /**\n * Admin Biz & Customer Module\n */\n server.post({path:'/api/admin/:adminId/biz',contentType:'multipart/form-data'},roleBase.checkAdminToken,biz.createBusiness);\n server.get('/api/admin/:adminId/biz/:bizId' ,roleBase.checkAdminToken,biz.getBiz);\n server.get('/api/admin/:adminId/biz' ,roleBase.checkAdminToken,biz.listBiz);\n server.get('/api/admin/:adminId/biz/:bizId/order' ,roleBase.checkAdminToken,order.getBizOrders);\n // server.put({path:'/api/admin/:adminId/biz/:bizId/hardInfo',contentType: 'application/json'},roleBase.checkAdminToken,biz.updateBizHardInfo);\n server.put({path:'/api/admin/:adminId/biz/:bizId/hardInfo',contentType: 'application/json'},biz.updateBizHardInfo);\n server.put({path:'/api/admin/biz/:bizId/active/:active',contentType: 'application/json'}, roleBase.checkAdminToken,biz.updateBizActive);\n\n server.get('/api/admin/:adminId/bizUserRel' ,roleBase.checkAdminToken,biz.getBizUserRel);\n server.put({path:'/api/admin/:adminId/biz/:bizId/bizUser/:userId/bizUserRel',contentType: 'application/json'} ,roleBase.checkAdminToken,biz.updateBizUserRel);\n server.post({path:'/api/admin/:adminId/biz/:bizId/bizUserRel',contentType: 'application/json'} ,roleBase.checkAdminToken,biz.addBizUserRel);\n server.put({path:'/api/admin/:adminId/biz/:bizId/bizUser/:userId/bizUser',contentType: 'application/json'} ,roleBase.checkAdminToken,biz.updateBizUserInfo);\n server.post({path:'/api/admin/:adminId/biz/:bizId/bizUser',contentType: 'application/json'} ,roleBase.checkAdminToken,biz.addBizUser);\n server.del('/api/admin/:adminId/biz/:bizId/bizUser/:userId/bizUserRel' ,roleBase.checkAdminToken,biz.deleteBizUserRel);\n server.get('/api/admin/:adminId/orders' ,roleBase.checkAdminToken,order.queryAllOrder);\n server.get('/api/admin/:adminId/usedQrCodes' ,roleBase.checkAdminToken,table.queryUsedTableQrCode);\n server.get('/api/admin/:adminId/availableQrCodes' ,roleBase.checkAdminToken,table.queryAvailableTableQrCode);\n server.post({path:'/api/admin/:adminId/biz/:bizId/sendBizUserResetPasswordMail',contentType:'application/json'},roleBase.checkAdminToken,biz.adminSendResetPasswordEmailForBizUser);\n\n //liling\n server.post({path:'/api/admin/:adminId/biz/:bizId/importFile',contentType:'multipart/form-data'}, admin.importFile); //add roleBase.checkAdminToken back in the end\n //test\n //server.get('/api/importBizLocation',apiUtil.saveBizLocation);\n //test\n //server.get('/api/bizGeoIndex',search.createBusinessGeoIndex);\n //test\n //server.get('/api/bizGeoSearch',search.searchBizWithGeo);\n\n //test\n server.post({path:'/api/rrkd',contentType: 'application/json'}, rrkd.getRrkdTestData);\n\n\n //weixin\n server.get('/api/getWeiXinAccessToken/code/:code/refreshToken/:refreshToken',WeiXinApi.getWeiXinAccessToken);\n server.post('/api/getWeiXinUser',WeiXinApi.getWeiXinUser);\n server.post('/api/addOperatorUser',WeiXinApi.addOperatorUser);\n server.post('/api/addOperatorHistory',WeiXinApi.addOperatorHistory);\n server.get('/api/getWxSDKAccessToken',WeiXinApi.getWxSDKAccessToken);\n server.get('/api/getWxSDKTicket/accessToken/:accessToken',WeiXinApi.getWxSDKTicket);\n\n server.post('/api/wxPayResource',WeiXinApi.wxPayResource);\n server.get('/api/getWXPayParams',WeiXinApi.getWXPayParams);\n\n\n //消费汇总表\n server.get('/api/biz/:bizId/consumeGroup' , biz.getCousumeGroup);\n\n //biz 结账方式设置\n server.post({path:'/api/biz/:bizId/checkoutInfo',contentType: 'application/json'}, roleBase.checkBizManagerToken , biz.addBizCheckoutInfo);\n server.put({path:'/api/biz/:bizId/checkoutInfo/:id',contentType: 'application/json'},roleBase.checkBizManagerToken ,biz.updateCheckoutInfoById);\n server.del('/api/biz/:bizId/checkoutInfo/:checkoutId/:id',roleBase.checkBizManagerToken , biz.deleteBizCheckoutInfo);\n server.get('/api/biz/:bizId/checkoutInfo', roleBase.checkBizManagerToken , biz.queryBizCheckoutInfo);\n\n server.post({path:'/api/biz/:bizId/orderMoney',contentType: 'application/json'}, roleBase.checkBizManagerToken ,order.addOrderMoney);\n server.get('/api/biz/:bizId/orderMoneyAleardy', roleBase.checkBizManagerToken , order.getOrderMoneyAleardy);\n server.get('/api/biz/:bizId/getOrderMoney' , order.getOrderMoney);\n\n //多人点单\n server.post({path:'/api/biz/:bizId/qr/:qr/addOrderItemTemp',contentType: 'application/json'}, order.addOrderItemTemp);\n server.del('/api/biz/:bizId/qr/:qr/deleteOrderItemTemp',order.deleteOrderItemTemp);\n server.get('/api/biz/:bizId/qr/:qr/openId/:openId/getOrderItemTemp',order.getOrderItemTemp);\n server.get('/api/biz/:bizId/qr/:qr/getOrderParamsNew',order.getOrderParamsNew);\n server.get('/api/biz/:bizId/qr/:qr/getOrderItemTempProdsAll',order.getOrderItemTempProdsAll);\n\n //百度翻译\n server.post('/api/baiduTranslate' , prod.baiduTranslate);\n server.get('/api/getConnectState',cust.getConnectState);\n server.get('/api/order/:orderId/getOrderInfoById' , order.getOrderInfoById);\n server.get('/api/biz/:bizId/getOrderMaxUpdateOn' , order.getOrderMaxUpdateOn);\n // Register a default '/' handler\n\n /*server.get('/api/', function root(req, res, next) {\n var routes = [\n 'GET /',\n 'GET /biz',\n 'GET /biz/:id',\n 'GET /biz/:id/cust',\n 'GET /biz/:id/cust/:id/act',\n 'GET /biz/:bizId/prod',\n 'GET /biz/:bizId/prod/cat',\n 'GET /biz/:bizId/prod/:id',\n 'POST /biz/:bizId/prod',\n 'POST /biz/:bizId/image',\n 'PUT /biz/:bizId/prod/:id',\n 'DELETE /biz/:bizId/prod/:id',\n 'GET /biz/:bizId/promo',\n 'GET /biz/:bizId/promo/:id',\n 'GET /biz/:bizId/prod/:prodId/promo',\n 'POST /biz/:id/promo',\n 'PUT /biz/:id/promo/:id',\n 'DELETE /biz/:id/promo/:id',\n 'GET /biz/:bizId/coupon',\n 'GET /biz/:bizId/promo/:promoId/coupon',\n 'GET /biz/:bizId/coupon/:couponId',\n 'POST /biz/:bizId/coupon/:couponeId/redeem',\n 'GET /cust/:id',\n 'GET /customerInfo',\n 'POST /cust',\n 'PUT /cust/:id',\n 'GET /cust/:id/biz',\n 'POST /cust/:custId/biz/:bizId/promo/:promoId/coupon (contentType:multipart/form-data)',\n 'GET\t /cust/from/:custId/coupon',\n 'GET /cust/from/:custId/coupon/:couponId', \n 'GET\t /cust/to/:custId/coupon',\n 'GET /cust/to/:custId/coupon/:couponId', \n 'POST /cust/:custId/biz/:bizId/checkin', \n 'POST /cust/:custId/changepassword',\n 'POST /cust/to/doLogin',\n 'GET /point',\n 'GET /point/:id',\n 'GET /biz/:id/user',\n 'GET /biz/:id/user/:id',\n 'POST /biz/:id/user',\n 'PUT /biz/:id/user/:id',\n 'DELETE /biz/:id/user/:id',\n 'GET /image/:id/:size'\n ];\n res.send(200, routes);\n next();\n });*/\n\n // Setup an audit logger\n if (!options.noAudit) {\n /*server.on('after', restify.auditLogger({\n body: false,\n log: bunyan.createLogger({\n level: 'info',\n name: 'TrueMenu-App',\n stream: process.stdout\n })\n }));*/\n /*server.on('after',serverLogger(\n {\n body: false,\n log: bunyan.createLogger({\n level: 'info',\n name: 'TrueMenu-App',\n stream: process.stdout\n })\n }\n ));*/\n }\n server.on('NotFound', function (req, res, next) {\n //hack way to put the request protocol in prerender\n // req.isSecure() always return to false even in https\n prerender.protocol=sysConfig.getServerProtocol();\n prerender(req,res,function() {\n res.setHeader('Content-Type', 'text/html');\n res.writeHead(200);\n //console.dir(req);\n var url = req.getUrl();\n var queryString = '';\n if (url.pathname) {\n queryString += \"path=\" + url.pathname;\n }\n if (url.query) {\n queryString += \"&query=\" + encodeURIComponent(url.query);\n }\n //console.log(\"combined url---------------\");\n //console.dir(url);\n //console.log(queryString);\n res.end(\"<html><script>window.location.href='/?\" + queryString + \"'</script></html>\");\n next();\n });\n\n\n\n /* prerender(req, res, function () {\n var host = req.header('Host');\n var proto = req.isSecure() ? 'https://' : 'http://';\n var url = req.getUrl();\n var queryString = '';\n if (url.pathname) {\n queryString += \"path=\" + url.pathname;\n }\n if (url.query) {\n queryString += \"&\" + url.query;\n }\n var page = '/';\n// var BIZ_PAGE = '/business.html';\n// if(path.indexOf(BIZ_PAGE)==0) {\n// path = path.substring(BIZ_PAGE.length);\n// page = BIZ_PAGE;\n// }\n// else {\n// page = '/';\n// }\n //path = (path[0] === '/') ? path.substring(1) : path;\n\n res.setHeader('Content-Type', 'text/html');\n res.setHeader('Location', proto + host + page + '?'+ queryString);\n\n console.log('here======='+queryString);\n\n res.writeHead(301);\n// res.end(\"<html><script>window.location.href='/?path=\"+req.getPath().substring(1)+\"';</script></html>\");\n res.end();\n next();\n\n })*/\n })\n server.on('after', apiUtil.save);\n\n return (server);\n\n}", "title": "" }, { "docid": "1201b3825cca1409db01e067ae8c6dbb", "score": "0.622998", "text": "function startListening() {\n\tapp.listen(8080, function() {\n\t\tconsole.log(\"Sever started at http://localhost:8080 Grab a slice!\");\n\t});\n}", "title": "" }, { "docid": "f0671012c6684ce12092ea439e61ffdf", "score": "0.6216878", "text": "function start(req,res){\n request.get(restPath+\"start\", function (_err, _res, _body) {\n if (!_err) {\n var resultsObj = JSON.parse(_body);\n // Just an example of how to access properties:\n console.log(resultsObj);\n\n res.json({'message': 'start ready'});\n }else{\n res.status(HttpStatus.INTERNAL_SERVER_ERROR);\n res.json({'message': 'start failed'});\n }\n\n\n\n console.info(\"start finished\")\n });\n}", "title": "" }, { "docid": "1157870cc4e09a6a97288433117cbcce", "score": "0.62111366", "text": "function runApp() {\n thePort = 8080;\n\n var app = express();\n configureApp(app);\n console.log(\"Listening on port \" + thePort);\n return app.listen(thePort);\n }", "title": "" }, { "docid": "0acdae7cc6bc1840594f033a62229cca", "score": "0.62089956", "text": "function startServer() {\n\tconst app = express()\n\n\t// To do: Compile the source on the fly\n\tapp.use(express.static(path.resolve(root, 'dist')))\n\tapp.use(express.static(path.resolve(root, 'test')))\n\n\tserver = app.listen()\n}", "title": "" }, { "docid": "955d243af2b705bc85ee11b9627ebe25", "score": "0.6204604", "text": "async function start() {\n let templates;\n try {\n templates = await owl.utils.loadFile('app.xml');\n } catch(e) {\n console.error(`This app requires a static server. If you have python installed, try 'python app.py'`);\n return;\n }\n const env = { qweb: new owl.QWeb({templates})};\n owl.Component.env = env;\n await owl.utils.whenReady();\n app();\n}", "title": "" }, { "docid": "4eacf313a5fd6274b094cde6a0d49ee8", "score": "0.61933494", "text": "function main () {\n const server = new FrameworkServer(8000)\n const myApp = new MyApp()\n\n server.bootstrap(onServerStart)\n\n function onServerStart (err) {\n if (err) throw err\n\n myApp.bootstrap(onAppStart)\n }\n\n function onAppStart (err) {\n if (err) throw err\n\n server.all('/get-user', (req, cb) => {\n myApp.getUser(req, cb)\n })\n server.all('/create-user', (req, cb) => {\n myApp.createUser(req, cb)\n })\n\n console.log('pid', process.pid, process.version)\n console.log('server listening', server.address())\n }\n}", "title": "" }, { "docid": "5e14b9cb36c271840dbb7ba21cb6b6a1", "score": "0.61930525", "text": "function startServer(){\n\t\tvar server = app.listen(9000, function(){\n\t\t\t\tvar port = server.address().port;\n\t\t\t\tconsole.log('A l eccoute du port ' + port);\n\t\t})\n\t}", "title": "" }, { "docid": "3c0a639fba9db5a39927537694b1a0c1", "score": "0.6186122", "text": "function startServer(){\n\tvar server = app.listen(port, function(){\n\t\tvar port = server.address().port;\n\t\tconsole.log('Listening on port ' + port);\n\t})\n}", "title": "" }, { "docid": "e65140c71197ab0c9e44a64bdd442f33", "score": "0.61821586", "text": "startWebserver() {\n this.app.listen(this.port, () => {\n console.log(`Zugriffsverwaltung: Server startet unter: http://localhost:${this.port}`);\n });\n }", "title": "" }, { "docid": "1205711a610dfa35f175992519ec7827", "score": "0.6174461", "text": "async function start () {\n // register plugins to server instance\n await server.register([\n {\n plugin: require('inert')\n },\n {\n plugin: require('vision')\n },\n {\n plugin: require('./web/authentication')\n },\n {\n plugin: require('./web/base')\n },\n {\n plugin: require('./web/movies')\n },\n {\n plugin: require('./web/tv-shows')\n },\n {\n plugin: require('./web/user-profile')\n },\n {\n plugin: require('./web/add-user-to-views')\n }\n ])\n\n // view configuration\n const viewsPath = Path.resolve(__dirname, 'public', 'views')\n\n server.views({\n engines: {\n hbs: Handlebars\n },\n path: viewsPath,\n layoutPath: Path.resolve(viewsPath, 'layouts'),\n layout: 'layout',\n helpersPath: Path.resolve(viewsPath, 'helpers'),\n partialsPath: Path.resolve(viewsPath, 'partials'),\n isCached: process.env.NODE_ENV === 'production',\n context: {\n title: 'Futureflix'\n }\n })\n\n // start your server\n try {\n await server.start()\n console.log(`Server started → ${server.info.uri}`)\n } catch (err) {\n console.error(err)\n process.exit(1)\n }\n}", "title": "" }, { "docid": "c7041b91d3ba5f6930170f7325275dda", "score": "0.6164474", "text": "function runApp() {\n\n game.startPieces();\n thePort = 8989;\n var app = express();\n configureApp(app);\n console.log(\"Listening on port \" + thePort);\n app.listen(thePort);\n }", "title": "" }, { "docid": "b98758d71fc78c8afd932fe5e683df8f", "score": "0.6106292", "text": "async function main() {\n log.header();\n process.chdir(path.join(__dirname, '..'));\n if (options.httpPort && options.httpPort > 0) {\n // @ts-ignore // ignore invalid options\n const server1 = http.createServer(options, httpRequest);\n server1.on('listening', () => log.state('HTTP server listening:', options.httpPort));\n server1.on('error', (err) => log.error('HTTP server:', err.message || err));\n server1.listen(options.httpPort);\n }\n if (options.httpsPort && options.httpsPort > 0) {\n // @ts-ignore // ignore invalid options\n const server2 = http2.createSecureServer(options, httpRequest);\n server2.on('listening', () => log.state('HTTP2 server listening:', options.httpsPort));\n server2.on('error', (err) => log.error('HTTP2 server:', err.message || err));\n server2.listen(options.httpsPort);\n }\n if (config.server.startStreamServer) startStreamServer();\n}", "title": "" }, { "docid": "d96d32cb62846755392c0dbd5abffe52", "score": "0.60819924", "text": "function startServer() {\n var path = join(dirname(options.packagePath), \"controllers.db\");\n // server = proc.spawn(\"node\", [path]);\n if (!server) {\n server = manager(path);\n }\n }", "title": "" }, { "docid": "fe308b4092dd045b47fa7ceae00351af", "score": "0.60664743", "text": "async function start() {\n const app = new Koa()\n app.use(bodyParser());\n //配置跨域请求\n app.use(cors({\n origin: function (ctx) {\n return '*';\n },\n }));\n\n\n // const host = process.env.HOST || '127.0.0.1'\n const port = process.env.PORT || 8001\n app.use(users.routes())\n app.use(articles.routes())\n // app.use(comments.routes())\n\n\n app.listen(port)\n console.log('Server listening on ' + ':' + port) // eslint-disable-line no-console\n}", "title": "" }, { "docid": "57183670c706c6c78671f747a02f9247", "score": "0.60654885", "text": "async function main() {\n await application(server, srvs);\n server.listen(port);\n}", "title": "" }, { "docid": "6065b0472c7d5c47fc6468810381cd56", "score": "0.60608363", "text": "function API(config){\n var portNum;\n var apiStatus = false;\n var startTime;\n var endpoints = {};\n var defaultHeaders = [];\n var that = this;\n\n var endpointsConfig;\n if (util.isArray(config)) {\n endpointsConfig = config;\n } else {\n endpointsConfig = config.endpoints;\n }\n\n // Parse endpointsConfig and create Endpoint object for each path\n endpointsConfig.map(function(endpointSettings, i){\n if(verifyEndpointSettings(endpointSettings, i)){\n endpoints[endpointSettings.path] = new APIData(endpointSettings);\n }\n });\n\n // Set default headers\n if (config.hasOwnProperty('defaultHeaders')) {\n defaultHeaders = config.defaultHeaders;\n }\n\n // Create http server\n var server = http.createServer(function (req, res) {\n if(endpoints[req.url]){\n addHeaders(res, defaultHeaders);\n addHeaders(res, endpoints[req.url].headers);\n res.writeHead(200, {'Content-Type': 'application/json'});\n res.end(endpoints[req.url].getJSONString());\n } else {\n res.writeHead(200, {'Content-Type': 'text/plain'});\n res.end('No Data Specified here');\n }\n });\n\n server.on('error', function(e){\n if (e.code == 'EADDRINUSE') {\n return log.portAlreadyUsed(portNum);\n }\n return log.generalError(e);\n });\n\n function startAPI(port, callback){\n if(apiStatus === true){return log.apiAlreadyRunning(portNum);}\n if(port === undefined){ return log.portNotDefined();}\n if(isNaN(port)){ return log.portNaN(port);}\n portNum = port;\n server.listen(port,null,null,function(){\n apiStatus = true;\n startTime = new Date();\n portNum = server.address().port;\n log.apiServerStarted(portNum);\n if(callback){callback(true);}\n return;\n });\n }\n\n function stopAPI(callback){\n server.close(function(){\n log.apiServerStopped(portNum);\n apiStatus = false;\n startTime = undefined;\n portNum = undefined;\n if(callback){callback(true);}\n return;\n });\n }\n\n function profile(){\n return {\n status : apiStatus,\n port : portNum,\n running_since: startTime,\n path : Object.keys(endpoints)\n };\n }\n\n // public API\n return {\n start: startAPI,\n stop: stopAPI,\n profile : profile,\n };\n}", "title": "" }, { "docid": "e0bdbe209b0672eccebed69a924479df", "score": "0.6054662", "text": "async start() {\n \n this.app.listen(this.port,(error)=>{\n if(error){\n logger.error(error);\n process.exit(1);\n return;\n }\n })\n }", "title": "" }, { "docid": "afd4ab1b4b38fbe90c6b3a6e3d0ee0e9", "score": "0.6041408", "text": "function main() {\n var server = http.createServer(requestHandler);\n server.listen(DEFAULT_PORT);\n\n console.log('Metadata server started at http://localhost:' + DEFAULT_PORT + '/ ...');\n}", "title": "" }, { "docid": "dcb82f9976a284a4deea9aca7c421669", "score": "0.6039606", "text": "function startServer() {\n /**\n * Start Web Server\n */\n app.set('port', process.env.PORT || 7777);\n server.listen(7777, () => {\n console.log(chalk.bold.white.bgBlue(` Phoenix Bot Server Started @ localhost:${server.address().port} `));\n });\n\n /**\n * Start Twitch Bot\n */\n // const twitchHandler = require('./util/twitchHandler');\n // twitchHandler.listen();\n\n /**\n * Start Socket Listener\n */\n const socketHandler = require('./util/socketHandler');\n socketHandler.listen(io);\n}", "title": "" }, { "docid": "3d6a508320877025426efcdac6873dcd", "score": "0.6031583", "text": "function runApp() {\r\n // Start listening for connections, and serve static files.\r\n const server = new MRE.WebHost({\r\n baseDir: path_1.resolve(__dirname, '../public')\r\n });\r\n // Handle new application sessions\r\n server.adapter.onConnection(context => new app_1.default(context));\r\n}", "title": "" }, { "docid": "708b4e16a56193e8fde0cfb2fb3b776f", "score": "0.6029942", "text": "function serverStarten(_port) {\n let server = Http.createServer(); //erstellen eines einfachen Servers\n console.log(\"Server gestartet!\");\n server.listen(_port);\n server.addListener(\"request\", handleRequest);\n }", "title": "" }, { "docid": "73a40414b8f813d7d0145c10ae79abcd", "score": "0.60215586", "text": "async function startServer() {\n const server = new ApolloServer({\n typeDefs,\n resolvers,\n introspection: true,\n playground: true,\n });\n await server.start();\n\n const app = express();\n\n // This middleware should be added before calling `applyMiddleware`.\n app.use(graphqlUploadExpress());\n\n server.applyMiddleware({ app });\n\n await new Promise((r) => app.listen({ port: 4000 }, r));\n\n console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`);\n}", "title": "" }, { "docid": "42e5b1e85be15567d9a1f697868127c3", "score": "0.6018722", "text": "async function main () {\n const port = 80\n await initRouters()\n\n app.listen(port)\n console.log(chalk.green(`[success] Your appication is running in port ${port}.`))\n}", "title": "" }, { "docid": "4d81d4724bdaa425838451e37269efd9", "score": "0.6017804", "text": "function startServer() {\n\tvar app = connect.createServer();\n\tapp.use(connect.static(__dirname + \"/static\"));\n\tapp.use(handler);\n\tvar http = require('http').createServer(app);\n\tvar sockJs = require('sockjs').createServer();\n\n\tsockJs.on('connection', onConnection);\n\tsockJs.installHandlers(http, {\n\t\tsockjs_url: 'http://localhost:8000/res/sockjs-0.3.2.min.js',\n\t\tprefix: '/sockjs',\n\t\tjsessionid: false,\n\t\tlog: sockJsLog,\n\t});\n\thttp.listen(8000);\n}", "title": "" }, { "docid": "f57027984a0a3adca6461c33effb07ea", "score": "0.60176355", "text": "async start () {\n const port = this.config.port || 80\n\n this.server.set('view engine', 'pug')\n this.server.set('views', path.join(__dirname, 'views'))\n this.server.get('/', (req, res) => this.getPage(res))\n\n await this.server.listen(port, () => console.info(`👂 Hue Log Status Page - Listening on port ${port}`))\n }", "title": "" }, { "docid": "b5dacdc1656ca958b715bbb7f8df5dd3", "score": "0.6006726", "text": "function Initialize() {\n let app = new Express(),\n config = JSON.parse(fs.readFileSync(\"config.json\"));\n \n //bind default headers to root path\n app.use('/', _.partial(SetHeaders, config.express.headers));\n \n //register all service routes\n _.each(config.routes, function(r) {\n app.use(r.uri, _.partial(ServeRoute, {path: r.path})); \n });\n\n app.listen(config.express.port);\n console.log(`The service is now listening on port: ${config.express.port}...`);\n}", "title": "" }, { "docid": "1fa239b8692f066d816c4821d8de8e33", "score": "0.59851485", "text": "start() {\n this.app.listen(this.port, () => {\n LOG_INFO(`Receiver::start: started express app on port: ${this.port}`);\n });\n }", "title": "" }, { "docid": "3432b374f1229a6c8272bcec03ccf61a", "score": "0.59688145", "text": "async start () {\n this._wsServer = new WS.Server({ server: this._httpServer });\n this._wsServer.on('connection', this._onConnection.bind(this));\n }", "title": "" }, { "docid": "0c3f00b77d1668b8e38251fb194d28cd", "score": "0.5965459", "text": "function startServer(json_config) {\n var config = JSON.parse(json_config);\n if (config['@image_svc_port'] != null) {\n image_svc_path = path.resolve(config['@image_svc_path']) + '/';\n app.listen(config['@image_svc_port']);\n console.log(\"\");\n console.log('ProjectRazor Image Service Web Server started and listening on:%s', config['@image_svc_port']);\n console.log(\"Image root path: \" + image_svc_path);\n } else {\n console.log(\"There is a problem with your ProjectRazor configuration. Cannot load config.\");\n }\n}", "title": "" }, { "docid": "3458562a5f18e7e839b7f5273e097b9c", "score": "0.59604406", "text": "start(args) {\n this.startGRPCServer(args)\n this.startRoonDiscovery(args)\n }", "title": "" }, { "docid": "403e7facab220ada3b61147aa66147cc", "score": "0.59558845", "text": "start() {\n //Here we have to get the variable from the config and then listen on this port\n //Then execute a function to send a consol log saying all ok!\n this.app.listen(this.app.get('port'), () => {\n console.log('Server on port: ' + this.app.get('port'));\n });\n }", "title": "" }, { "docid": "3895802316bd118710d91de33171ca7a", "score": "0.5949709", "text": "function initiate() {\n app.listen(PORT, () => console.log(`Server started on port ${PORT}`))\n}", "title": "" }, { "docid": "ba5e1a081015f385ebb424854e3ac8cf", "score": "0.5929887", "text": "function startServer() {\n app.listen(PORT, () => {\n console.log(`Server started on ${PORT}`);\n });\n}", "title": "" }, { "docid": "fa6d695c295dcb1d3cbc966ae091ee64", "score": "0.5928349", "text": "function starServer() {\r\n logger.info(\"Iniciando \".concat(pkj.artifactType, \" \", pkj.name));\r\n let app = express();\r\n logger.info(\"Configurando servidor\");\r\n configServer(app);\r\n logger.info(\"Cargando Rutas\");\r\n loadRouters(app);\r\n app.use(catchGenericError);\r\n app.use(catchNotFoundError);\r\n logger.info(\"Configurando puerto \", CONFIG.GENERAL_CONFIG.PORT);\r\n app.listen(CONFIG.GENERAL_CONFIG.PORT);\r\n logger.info(\"\".concat(pkj.artifactType, \" \", pkj.name, \" iniciado\"));\r\n}", "title": "" }, { "docid": "af1f359c144ad2246336285f8648a0fa", "score": "0.59268826", "text": "async start () {\n await this.init();\n return this.listen();\n }", "title": "" }, { "docid": "2a8cc19640234682b30b2881bba32e1f", "score": "0.592432", "text": "function createServer() {\n // Create a server with our logger and custom formatter\n // Note that 'version' means all routes will default to\n // 1.0.0\n var server = restify.createServer({\n name: 'CheckOut',\n version: '1.0.0'\n });\n\n var authUrl=sysConfig.loginModuleUrl.protocol+\"://\"+sysConfig.loginModuleUrl.host+\":\"+sysConfig.loginModuleUrl.port+\"/api/auth/tokens\";\n logger.debug(authUrl);\n\n // Ensure we don't drop data on uploads\n //server.pre(restify.pre.pause());\n\n // Clean up sloppy paths like //todo//////1//\n server.pre(restify.pre.sanitizePath());\n\n // Handles annoying user agents (curl)\n server.pre(restify.pre.userAgentConnection());\n\n // Set a per request bunyan logger (with requestid filled in)\n //server.use(restify.requestLogger());\n\n // Allow 50 requests/second by IP, and burst to 100\n server.use(restify.throttle({\n burst: 100,\n rate: 50,\n ip: true\n }));\n\n restify.CORS.ALLOW_HEADERS.push('auth-token');\n restify.CORS.ALLOW_HEADERS.push('tenant');\n restify.CORS.ALLOW_HEADERS.push('client-id');\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Origin\");\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Credentials\");\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Methods\", \"GET\");\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Methods\", \"POST\");\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Methods\", \"PUT\");\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Methods\", \"DELETE\");\n restify.CORS.ALLOW_HEADERS.push(\"Access-Control-Allow-Headers\", \"accept,api-version, content-length, content-md5,x-requested-with,content-type, date, request-id, response-time\");\n server.use(restify.CORS());\n server.use(restify.acceptParser(server.acceptable));\n server.use(restify.dateParser());\n server.use(restify.authorizationParser());\n server.use(restify.queryParser());\n server.use(restify.gzipResponse());\n server.use(restify.fullResponse());\n server.use(restify.bodyParser({uploadDir: __dirname + '/uploads/'}));\n server.use(authHeaderParser.authHeaderParser({logger:logger,authUrl:authUrl}));\n\n // Now our own handlers for authentication/authorization\n // Here we only use basic auth, but really you should look\n // at https://github.com/joyent/node-http-signature\n\n //server.use(authenticate);\n\n //server.use(apiUtil.save);\n\n var STATICS_FILE_RE = /\\.(css|js|jpe?g|png|gif|less|eot|svg|bmp|tiff|ttf|otf|woff|pdf|ico|json|wav|ogg|mp3?|xml)$/i;\n var STATICS_HTML = /\\.(pdf|json|xml|html)$/i;\n server.get(STATICS_FILE_RE, restify.serveStatic({ directory: './public/web', maxAge: sysConfig.maxAge }));\n server.get(STATICS_HTML, restify.serveStatic({ directory: './public/web', maxAge: 0 }));\n\n server.get(/\\/apidoc\\/?.*/, restify.serveStatic({\n directory: './public'\n }));\n\n /**\n * Order module\n */\n server.post({path:'/api/users/:userId/orders',contentType: 'application/json'},authCheck.authCheck(),order.createUserOrders);\n server.put({path:'/api/users/:userId/orders',contentType: 'application/json'},authCheck.authCheck(),order.updateUserOrders);\n server.del({path:'/api/users/:userId/orders',contentType: 'application/json'},authCheck.authCheck(),order.deleteUserOrders);\n server.get('/api/users/:userId/orders',authCheck.authCheck(),order.queryUserOrders);\n server.post({path:'/api/users/:userId/orders/:orderId/status', contentType: 'application/json'},authCheck.authCheck(),\n order.updateUserOrderStatus);\n server.post({path:'/api/users/:userId/orderitems/:itemId/status', contentType: 'application/json'},authCheck.authCheck(),\n order.updateUserOrderItemStatus);\n\n server.get('/api/users/:userId/orderitems',authCheck.authCheck(),order.queryUserOrderItems);\n server.get('/api/biz/:bizId/orders',authCheck.authCheck(listOfValue.PERMISSION_GETBIZORDERS),order.queryBizOrders);\n server.get('/api/biz/:bizId/orderitems',authCheck.authCheck(listOfValue.PERMISSION_GETBIZORDERS),order.queryBizOrderItems);\n\n //server.post({path:'/api/orders',contentType: 'application/json'},authCheck.authCheck(\"createOrders\"),order.createOrders);\n //server.put({path:'/api/orders',contentType: 'application/json'},authCheck.authCheck(\"updateOrders\"),order.updateOrders);\n //server.del({path:'/api/orders',contentType: 'application/json'},authCheck.authCheck(\"deleteOrders\"),order.deleteOrders);\n server.get('/api/orders',authCheck.authCheck(listOfValue.PERMISSION_GETORDERS),order.queryOrders);\n server.get('/api/orderitems',authCheck.authCheck(listOfValue.PERMISSION_GETORDERS),order.queryOrderItems);\n server.get('/api/changehistories',authCheck.authCheck(listOfValue.PERMISSION_GETCHANGEHISTORIES),history.queryChangeHisotry);\n //update order biz information\n server.post({path:'/api/orders/orderbiz',contentType: 'application/json'},authCheck.authCheck(listOfValue.PERMISSION_UPDATEORDERS),\n order.updateOrdersBiz);\n server.post({path:'/api/orders/status', contentType: 'application/json'},authCheck.authCheck(listOfValue.PERMISSION_UPDATEORDERS),\n order.updateOrdersStatus);\n //change order item status\n server.post({path:'/api/orderitems/status',contentType: 'application/json'},authCheck.authCheck(listOfValue.PERMISSION_UPDATEORDERS),\n order.updateOrderItemsStatus);\n server.post({path:'/api/biz/:bizId/orders/status', contentType: 'application/json'},authCheck.authCheck(listOfValue.PERMISSION_UPDATEBIZORDERS),\n order.updateBizOrdersStatus);\n //change order item status\n server.post({path:'/api/biz/:bizId/orderitems/status',contentType: 'application/json'},authCheck.authCheck(listOfValue.PERMISSION_UPDATEBIZORDERS),\n order.updateBizOrderItemsStatus);\n server.get('/api/orderstatus',order.getOrderStatus);\n server.get('/api/orderItemstatus',order.getOrderItemStatus);\n //update biz order with address and note information\n server.post({path:'/api/biz/:bizId/orders/:orderId/information',contentType: 'application/json'},authCheck.authCheck(listOfValue.PERMISSION_UPDATEBIZORDERS),\n order.updateBizOrderInformation);\n\n /*\n Payments module\n */\n server.get('/api/payments',authCheck.authCheck(listOfValue.PERMISSION_GETPAYMENTS),orderPayment.queryPayments);\n //server.put('/api/payments',authCheck(),order.queryOrderItem);\n server.post('/api/payments',authCheck.authCheck(listOfValue.PERMISSION_CREATEPAYMENTS),orderPayment.createPayments);\n //server.del('/api/payments',authCheck(),order.queryOrderItem);\n\n server.get('/api/users/:userId/addresses',authCheck.authCheck(),address.queryUserAddresses);\n server.put('/api/users/:userId/addresses',authCheck.authCheck(),address.updateUserAddresses);\n server.post('/api/users/:userId/addresses',authCheck.authCheck(),address.createUserAddresses);\n server.del('/api/users/:userId/addresses',authCheck.authCheck(),address.deleteUserAddresses);\n //set primary address\n server.post('/api/users/:userId/addresses/:addressId/primary',authCheck.authCheck(),address.updateUserAddressesPrimaryFlag);\n server.get('/api/getConnectState',orderPayment.getConnectState);\n //server.get('/api/shipAddresses',authCheck(),order.queryOrderItem);\n\n\n //server.get('/api/users/:userId/userBalances',authCheck(),order.queryOrderUserBalance);\n /*server.get('/api/orderStatus',order.getOrderStatus);*/\n //change order status\n\n\n // call tracking service?\n //server.on('after', apiUtil.save);\n return (server);\n}", "title": "" }, { "docid": "9cd463e09ee56c28edd06c8429927ef7", "score": "0.59077406", "text": "function serve() {\n const server = fractal.web.server({\n sync: true,\n });\n server.on('error', err => logger.error(err.message));\n return server.start().then(() => {\n logger.success(`Fractal server is now running at ${server.url}`);\n });\n}", "title": "" }, { "docid": "65e5a6f0c3a5f2ee2436c650f79f60cb", "score": "0.5905475", "text": "start() {\n let self = this;\n this.server.listen(this.port, () => {\n self.print(`Listening to port ${this.port}`);\n });\n }", "title": "" }, { "docid": "1b1497d64874203b9bd760df140033cf", "score": "0.58960915", "text": "serve() {\n // Initiate a new server\n const server = new Server(this, {\n host: this.config.get('server.host'),\n port: this.config.get('server.port'),\n contentBase: path.join(this.cwd(), this.config.get('directories.build')),\n base: this.config.get('server.base'),\n })\n\n this._startServer(server)\n }", "title": "" }, { "docid": "da0a7df05a2a73c2bec4600c5c6babbf", "score": "0.5882289", "text": "function startSingleServerSolution() {\n const server = new Server();\n server.listen(PORT);\n console.error(`Starting server on port ${PORT}`)\n}", "title": "" }, { "docid": "4c17afeac4d249ea6b0519ec40964bcb", "score": "0.58399636", "text": "function startServer() {\n initHazelcast()\n .then(function (hzClient) {\n configureServer(app, hzClient);\n app.listen(port);\n console.log('Magic happens on port ' + port);\n\n });\n}", "title": "" }, { "docid": "a92c0f40bab12e220f7812ec3693d7c2", "score": "0.58392245", "text": "function start(route) {\n\tfunction onRequest(request, response) {\n\t\tvar pathname = url.parse(request.url).pathname\n\t\tconsole.log(\"request for \" + pathname + \" received.\");\n\n\t\troute(pathname);\n\n\t\tresponse.writeHead(200, {\"Content-Type\": \"text/plain\"});\n\t\tresponse.write(\"Hello World\");\n\t\tresponse.end();\n\t}\n\n\thttp.createServer(onRequest).listen(8888);\n\tconsole.log(\"Server started.\");\n}", "title": "" }, { "docid": "4bf0d26fd3a07ecf8ce7a581a16d6533", "score": "0.58320075", "text": "async function init() {\n await server.register(require('inert'));\n\n for (var i = 0; i < files.length; i++) {\n for (var j = 0; j < Object.values(files[i]).length; j++) {\n server.route(Object.values(files[i])[j]);\n }\n }\n\n\n await server.start();\n console.log(`Server running at: ${server.info.uri}`);\n}", "title": "" }, { "docid": "417a748a4830ab61825bed764a58ebd7", "score": "0.5814218", "text": "start(port=80, route=\"/\")\n {\n var app = express();\n app.use(cors());\n app.use(route, this.router);\n app.listen(port, () => console.log(`Listening on port ${port}!`));\n\n this.app = app;\n }", "title": "" }, { "docid": "6fd96682ad026d226eaad9a3ce42b497", "score": "0.57985663", "text": "function start() {\n registerEventListeners();\n runJSONfetching();\n}", "title": "" }, { "docid": "e7c6646a72789887757dd287bb0bc427", "score": "0.5791959", "text": "function start(config) {\n // start jetty http server\n config = config || getConfig();\n var httpConfig = config.httpConfig;\n server.start(httpConfig);\n}", "title": "" }, { "docid": "9d359c1fb322107a123ccfdd2c186454", "score": "0.5788711", "text": "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Spellcheck API listening at http://' + host + ':' + port);\n}", "title": "" }, { "docid": "1066811743310fc2356fd814d18de18d", "score": "0.5781365", "text": "function startExpress() {\n // This method will listen created server and with that port \n // If this method is not there server will be created and but not listen that port \n app.listen(app.get('port'), function() {\n //app.listen(app.get('port'), '0.0.0.0', function() {\n console.log(\"Node app is running at localhost:\" + app.get('port'), app.settings.env)\n });\n}", "title": "" }, { "docid": "3d3e5d83b984d7c1c997a867a75a04fa", "score": "0.5777455", "text": "async function main(){\n try {\n await server.init();\n await server.run(8080);\n console.log(\"Server up and running. Listenning at 8080\");\n }catch(err){\n console.error(\"Error: \"+err.message);\n process.exit(1);\n }\n}", "title": "" }, { "docid": "5bf1d75bd2821e894dc5442a7779688e", "score": "0.5772125", "text": "function startExpressServer() {\n // Set up express\n var express = require('express'),\n app = express(),\n path = require('path');\n\n app.use('/dist', express.static('dist'));\n app.get('*', function(req, res, next) {\n res.sendFile(path.join(__dirname, 'index.html'));\n });\n\n app.listen(port);\n console.log('Server is running on: ' + port);\n}", "title": "" }, { "docid": "2de0ed18195291aa0f23c69d1d600caf", "score": "0.5768271", "text": "function start(host, port) {\n // start server\n const server = app.listen(port || PORT, host || HOST, () => {\n console.log(`npm-gui web-server running at http://${(host || HOST)}:${(port || PORT)}/`);\n // opn(`http://${(host || HOST)}:${(port || PORT)}`);\n });\n\n Console.bind(server, '/api/console');\n\n return server;\n}", "title": "" }, { "docid": "cece4731214bb8e94e98ad9260ea2371", "score": "0.5764943", "text": "function main() {\n return __awaiter(this, void 0, void 0, function* () {\n const app = express();\n const server = http.createServer(app);\n app.use('/httpbin', exports.httpbin);\n const port = yield port_scanner_1.findPort([7777, 7000, 8000, 8080, 8888]);\n server.listen(port);\n server.port = port;\n serverDestroy(server);\n cleankill.onInterrupt((done) => {\n server.destroy();\n server.on('close', done);\n });\n console.log('Server running at http://localhost:' + port + '/httpbin/');\n });\n}", "title": "" }, { "docid": "d57b8a23923e10d3bba6c7a362c4b8b5", "score": "0.57643354", "text": "async function start() {\n try {\n await mongoose.connect(config.get('mongoUri'), {\n useNewUrlParser: true,\n useUnifiedTopology: true,\n useCreateIndex: true\n })\n server.listen(process.env.PORT || PORT, () => console.log(`Lisening on port :${PORT}`));\n } catch (e) {\n console.log('Server Error', e.message)\n process.exit(1)\n }\n}", "title": "" }, { "docid": "af53a3affaa1c8adba9486615a92f547", "score": "0.5761949", "text": "function main(config) {\n\n //Create the server\n var server = express.createServer();\n expressServer(server, config);\n mongooseConf(config);\n\n\n passport(User);\n routes(server, User, userController, jobController, contractorController, auth, translationController, lookupsController);\n\n return server;\n}", "title": "" }, { "docid": "d58e0d46918a221038add476696a4709", "score": "0.5761918", "text": "function initHttpServer() {\n const app = express();\n app.use(bodyParser.json());\n\n app.get(\"/peers\", function (req, res) {\n res.send(nw.getSockets().map(function (s) {\n return s._socket.remoteAddress + ':' + s._socket.remotePort;\n }));\n });\n app.post(\"/stop\", function (req, res) {\n res.send({ \"msg\": \"Stopping server\" });\n process.exit();\n });\n\n app.listen(http_port, function () { console.log(\"Listening http port on: \" + http_port) });\n}", "title": "" }, { "docid": "012c66d9ff580406a8a14613051a5c4d", "score": "0.5760405", "text": "function startServer (options) {\n var stats\n\n if (typeof options === 'number') {\n options = { port: options }\n }\n\n options = Object.assign({\n port: 3000,\n stats: true,\n log: false,\n delay: 0\n }, options)\n\n if (options.stats) {\n stats = new Stats(1000, options.port)\n stats.start()\n }\n\n var server = http.createServer(function (req, res) {\n var status\n var query = url.parse(req.url, true).query || {}\n\n if (options.stats) {\n stats.count()\n }\n if (options.log) {\n console.log(req.url, req.headers, query)\n }\n\n if (/^\\/ping$/.test(req.url)) {\n res.statusCode = 200\n res.end('pong')\n return\n } else if (/^\\/\\d{3}/.test(req.url)) {\n status = req.url.replace(/\\/(\\d{3})/, '$1')\n status = parseInt(status, 10)\n switch (status) {\n case 301:\n case 302:\n case 303: {\n res.statusCode = status\n res.setHeader('Location', (query.location || '/'))\n break\n }\n case 400:\n case 401:\n case 402:\n case 403:\n case 404: {\n res.statusCode = status\n break\n }\n default: {\n res.statusCode = 500\n break\n }\n }\n res.end()\n return\n }\n\n if (options.delay) {\n setTimeout(function () {\n res.end(options.port + ':' + req.url + ' ' + req.method + ' ' + options.delay + '\\n')\n }, options.delay)\n } else {\n res.end(options.port + ':' + req.url + ' ' + req.method + '\\n')\n }\n })\n\n server.start = function (cb) {\n server.listen(options.port, cb)\n }\n\n return server\n}", "title": "" }, { "docid": "f4f1640f9fde6db807ac48d9f0808db6", "score": "0.5760233", "text": "start (next) {\n let self = this\n\n // check if id to create a HTTP or a HTTPS server\n if (self.options.secure === false) {\n let http = require('http')\n self.server = http.createServer((req, res) => { self._handleRequest(req, res) })\n } else {\n let https = require('https')\n self.server = https.createServer(self.api.config.servers.web.serverOptions, (req, res) => {\n self._handleRequest(req, res)\n })\n }\n\n let bootAttempts = 0\n\n self.server.on('error', e => {\n bootAttempts++\n\n if (bootAttempts < self.api.config.servers.web.bootAttempts) {\n self.log(`cannot boot web server; trying again [${String(e)}]`, 'error')\n\n if (bootAttempts === 1) { self._cleanSocket(self.options.bindIP, self.options.port) }\n\n setTimeout(() => {\n self.log('attempting to boot again...')\n self.server.listen(self.options.port, self.options.bindIP)\n }, 1000)\n } else {\n return next(new Error(`Cannot start web server @ ${self.options.bindIP}:${self.options.port} => ${e.message}`))\n }\n })\n\n self.server.listen(self.options.port, self.options.bindIP, () => {\n self.chmodSocket(self.options.bindIP, self.options.port)\n next()\n })\n }", "title": "" }, { "docid": "a9db677adf2d77a4986ae26820376371", "score": "0.5751835", "text": "function startServer(route){\n\tfunction onRequest(request, response){\n\t\tvar path = url.parse(request.url).pathname;\n\n\t\troute(path, response);\n\t}\n\n\thttp.createServer(onRequest).listen(port)\n}", "title": "" }, { "docid": "115e2eb83715757d9dd33c1a0997559c", "score": "0.5746569", "text": "function startServer() {\n\n}", "title": "" }, { "docid": "2ef8e11c7b8fcae1b2e0cb6cbb06011e", "score": "0.57422924", "text": "function startup() {\n\tapp.listen(port, function(){\n\t\t\tconsole.log(\"Working on port \" + port);\n\t});\n}", "title": "" }, { "docid": "cf0a0268fe1f82bc3234cb132ed2bf6a", "score": "0.57420284", "text": "init(server, options) {\n server.route({\n path: '/api/elasticsearch_status/index/{name}',\n method: 'GET',\n handler(req, reply) {\n // more to come here in the next step\n reply(\"Hello World\");\n server.plugins.elasticsearch.callWithRequest(req, 'cluster.state', {\n metric: 'metadata',\n index: req.params.name\n}).\n then(function (response) {\n reply(response.metadata.indices[req.params.name]);\n});\n }\n});\n // Just call the api module that we imported above (the server/routes.js file)\n // and pass the server to it, so it can register several API interfaces at the server.\n api(server);\n }", "title": "" } ]
3382aa42441e02f9fa7a55398ac6f8fe
update slaughter batch record
[ { "docid": "6bc4be3e6f3b0969f559dcb768006743", "score": "0.0", "text": "function update(req, res){\n var json_values = {};\n var json_con = {};\n common.update(table_name, json_values, json_con, res);\n}", "title": "" } ]
[ { "docid": "5929973b452a84bfe149cd4ad9cbb639", "score": "0.66003513", "text": "batchUpdate() {\n throw new Error('Not implemented.');\n }", "title": "" }, { "docid": "32a7a123b387b38f9ab4a363beaa4f95", "score": "0.64139295", "text": "updatesale (sale, cb) {\n const query = updatequery('SALES', Object.assign({}, sale), 'SALE')\n const values = getobjvalues(sale)\n const first = values.shift()\n values.push(first)\n db.run(query, values, (err) => {\n if (err) cb(err)\n })\n }", "title": "" }, { "docid": "03fabd97ccac4bcab5d57eaee542602a", "score": "0.62061137", "text": "static async update(ctx, next) {\n try{\n let updatedRecords = await\n Book.update(ctx.request.body, {\n where: {\n id: ctx.params.id\n }\n });\n\n ctx.status = 200;\n ctx.body = {code: 200,data: updatedRecords};\n }catch(error){\n ctx.status = 500;\n ctx.body = {code: 500,error: error};\n }\n }", "title": "" }, { "docid": "7f4a592efe78fae01bace9a046a63718", "score": "0.6203551", "text": "function updateSet(model){\n model.dbOpsType=\"read\"\n model.schema=emailAndSmsSchema\n model.offset=0\n model.readLimit=1\n model.data={\n \"stage\":model.req.body.stageName\n }\n \n model.callBackFromDataAccess=\"readSet\"\n model.on(model.callBackFromDataAccess,(model)=>{\n model.dbOpsType=\"update\"\n model.schema=emailAndSmsSchema\n model.id=model.status[0]._id\n model.data=model.req.body.newData\n model.callBackFromDataAccess=\"updatedSet\"\n model.on(model.callBackFromDataAccess,(model)=>{\n model.info=\"Updated Set Successfully\"\n model.emit(globalCallBackRouter,model)\n })\n global.emit(globalDataAccessCall,model)\n model.emit(model.dbOpsType,model)\n })\n global.emit(globalDataAccessCall,model)\n model.emit(model.dbOpsType,model)\n \n}", "title": "" }, { "docid": "1e28f4c246fa26a83db84bed51ae977b", "score": "0.61080384", "text": "function onUpdate (update) {\n var value = update[0], ts = update[1], id = update[2]\n insertBatch (id, key, ts, JSON.stringify(value), scuttlebutt)\n }", "title": "" }, { "docid": "1c1d5bc6d5ed76530b4e066503bfc31f", "score": "0.6102932", "text": "function doUpdates(self) {\n //Check each lake name in the data and see if it is already stored.\n // If not generate a new objectId and store it in mongoLakeNames, increment\n // the number of updates required and insert the document.\n lakeData.forEach(function(lake) {\n var match = mongoLakeNames.filter(function(mongoLake) {\n return mongoLake.name === lake.name;\n });\n if (match.length === 0) {\n var newLake = {\n _id: mongojs.ObjectId(),\n name: lake.name,\n capacity: lake.capacity\n };\n numUpdates++;\n mongoLakeNames.push(newLake);\n self.db.lakes.insert(newLake, completedUpdate);\n }\n });\n\n // Add updates for each historical level\n lakeData.forEach(function(lake) {\n numUpdates += lake.historicalLevels.length;\n });\n\n\n\n // Update records\n lakeData.forEach(function(lake) {\n lake.historicalLevels.forEach(function(dataPoint) {\n\n var lakeId = (mongoLakeNames.filter(function(mongoName) {\n return mongoName.name === lake.name;\n }))[0]._id;\n\n self.db.lakes.update({\n lakeId: lakeId,\n level: dataPoint.level,\n date: new Date(dataPoint.date)\n }, {\n lakeId: lakeId,\n level: dataPoint.level,\n date: new Date(dataPoint.date)\n }, {\n upsert: true\n }, function(err, data) {\n if (err) throw new Error(err);\n completedUpdate();\n });\n });\n\n });\n }", "title": "" }, { "docid": "5a8f5d7104bbd0206d333f38badeffe1", "score": "0.60783285", "text": "updateRecord({ commit, dispatch }, payload) {\n api.put(`entry/${payload.Winner._id}`, payload.Winner)\n api.put(`entry/${payload.Loser._id}`, payload.Loser)\n }", "title": "" }, { "docid": "a89fbadfa228c6a5d0db308116ea96c3", "score": "0.60757893", "text": "update(){}", "title": "" }, { "docid": "a89fbadfa228c6a5d0db308116ea96c3", "score": "0.60757893", "text": "update(){}", "title": "" }, { "docid": "7639eb5e4e19452e99b91e15c00f8944", "score": "0.600232", "text": "static async update(ctx, next) {\n try{\n let updatedRecords = await\n Author.update(ctx.request.body, {\n where: {\n id: ctx.params.id\n }\n });\n\n ctx.status = 200;\n ctx.body = {code: 200, data: updatedRecords};\n }catch(error){\n ctx.status = 500;\n ctx.body = {code: 500, error: error};\n }\n }", "title": "" }, { "docid": "6961b31cc60eb19ce7f71c9bb0a97333", "score": "0.59940904", "text": "async function updateRecord(celebHandle,NegativeSentimentRating,PositiveSentimentRating,lastPostDate){\r\n\r\n //let lastPostDate = '2021-04-12'\r\n //let latestSentiment = 10;\r\n await celebRecord.findOneAndUpdate({Handle: celebHandle},{NegativeSentimentRating: NegativeSentimentRating,PositiveSentimentRating: PositiveSentimentRating,LastPost: lastPostDate})\r\n console.log(chalk.green(':::: Udpate successful for: ' + celebHandle))\r\n \r\n}", "title": "" }, { "docid": "225064ee9e2e05a5f0d77cdf9364f084", "score": "0.5932911", "text": "function update(res, req) {\n let body = []\n req.on('data', (chunk) => {\n body.push(chunk)\n }).on('end', () => {\n body = Buffer.concat(body).toString()\n process( JSON.parse(body) )\n res.end()\n })\n \n function process( row ) {\n \n if(debug) console.log(row)\n var query = `\n UPDATE workout \n SET exercise = '${row.exercise}',\n sets = ${row.sets}, \n reps = ${row.reps}\n WHERE\n id = '${row.id}'\n `\n if(debug) console.log(query)\n db.run( \n query,\n function(err) { res.end('workout updated') }\n )\n }\n}", "title": "" }, { "docid": "31ac46ec6db8ac4eedfc794e5313a040", "score": "0.58961046", "text": "function UpdateDatabase(){\nconsole.log(`record found with the id ${deviceid}`);\n\n db.serialize(function() {\n\n let sql = `UPDATE DeviceEvent\n SET Flavors = ?,Enhancements=?,WaterType=?,BottleSavedCount=?\n WHERE DeviceId = ?`;\n\n bottleSavedCount=parseInt(bottleSavedCount)+1;\n console.log('count bottle:'+bottleSavedCount)\n db.run(sql,flavors,enhancements,waterTypes,bottleSavedCount,deviceid,function(err) {\n if (err) {\n return console.error('Update error'+err.message);\n }else{\n console.log(`Row(s) updated: ${this.changes}`);\n console.log('updated db successfully')\n }\n \n \n });\n \n});\n\nDisplayAllRows();\n//DisplayBottleSavedCount();\ndt.format('m/d/Y H:M:S');\nvar filetime=new Date(dt.now());\nvar newdata='\\n'+filetime+'{Flavor:'+flavors+' ,Enhancements: '+enhancements+',WaterTypes: '+waterTypes+',BottleSavedCount: '+bottleSavedCount+'}';\nwritetoafile(newdata);\n//Create DeviceEvents Table\n// db.serialize(function() {\n// db.run(\"CREATE TABLE IF NOT EXISTS DeviceEvents (DeviceId TEXT, Slot1 TEXT,Slot2 TEXT,Slot3 TEXT,Slot4 TEXT,Slot5 TEXT,Slot6 TEXT,Slot7 TEXT,Slot8 TEXT)\");\n// });\n}", "title": "" }, { "docid": "87aff45c00f20f0a8d9864c14bf4dd5f", "score": "0.5890119", "text": "updateEntities(t) {\r\n this.queue.forEach(({ entity }) => {\r\n entity.update(t);\r\n });\r\n }", "title": "" }, { "docid": "67e44bb096c4936544098c31390d4084", "score": "0.58520514", "text": "updateRecord(cheeseId, record) {\n const index = records.findIndex(record => record.CheeseId === cheeseId);\n if (index !== -1) {\n Object.assign(records[index], record);\n }\n }", "title": "" }, { "docid": "b92b74d6465dd4eea61387e019538c5a", "score": "0.58357584", "text": "static update(request, response) {\r\n\r\n lendingsModel.getById(request.body.id)\r\n .then( data => {\r\n if (data.length > 0) {\r\n\r\n //recupera do body os campos que serao atualizados na tabela\r\n const conditions = [\r\n {\r\n field: 'id',\r\n value: request.body.id\r\n },\r\n {\r\n field: 'cliowner',\r\n value: request.body.cliowner\r\n },\r\n {\r\n field: 'clirequester',\r\n value: request.body.clirequester\r\n },\r\n {\r\n field: 'startdate',\r\n value: request.body.startdate\r\n },\r\n {\r\n field: 'enddate',\r\n value: request.body.enddate\r\n },\r\n {\r\n field: 'grntmrg',\r\n value: request.body.grntmrg\r\n },\r\n {\r\n field: 'status',\r\n value: request.body.status\r\n },\r\n ];\r\n\r\n //chama rotina para atualizacao dos dados\r\n lendingsModel.update(conditions) \r\n response.sendStatus(200);\r\n console.log('Lending has been updated. ID: ', request.body.id); \r\n } else {\r\n response.sendStatus(404);\r\n console.log('Lending not found. ID: ', request.body.id);\r\n }\r\n })\r\n .catch(err => {\r\n response.sendStatus(500);\r\n console.log('Error updating lending by ID: ', request.body.id, err);\r\n });\r\n \r\n }", "title": "" }, { "docid": "56cdceed8667c0c339c552b331c27d9c", "score": "0.5833241", "text": "updateBike(Bike, success) {\r\n connection.query(\r\n 'update Bike set status=?, information=? where BikeID=?',\r\n [Bike.Status, Bike.Information, Bike.BikeID],\r\n (error, results) => {\r\n if (error) return console.error(error);\r\n\r\n success();\r\n }\r\n );\r\n }", "title": "" }, { "docid": "b8c4485bbfc51f1d363b4a1a343c3921", "score": "0.58302015", "text": "function update(timestamp) {\n for (let n = 0; n < 5; n+=1) {\n t1d.step();\n pump.step();\n }\n db.collection('t1d').update({}, t1d.state, {upsert: true});\n\n db.collection('pump').update({}, pump.state, {upsert: true});\n\n // TODO: this collection needs to be created somewhere\n db.collection('cgms').update({'id': 'ABCDEF'}, {$set: { 'readDate': new Date(), 'glucose': t1d.glucose }}, {upsert: true});\n db.collection('cgm').insertOne({readDate: new Date(timestamp), glucose: 6.0}, function(err, doc) {\n if (err) {\n console.log(`Failed to insert glucose: ${err}.`);\n }\n sendAPN();\n });\n}", "title": "" }, { "docid": "cdd639ccab00b70d1f11ca8c4c828bf8", "score": "0.5824929", "text": "function update(book, table, data = [], reply, bitmex) {\n // We only want inserts if we're keeping the data.\n if(book.opt('keep_liquidations') && table === \"liquidation\") return \n\n // Loop and update data.ff\n for(let i = 0; i < data.length; i++) {\n const item = data[i]\n const index = find(book, table, item)\n\n // Connected table doesn't send data with its partial or an insert event. Only updates for some reason..\n if(index < 0) insert(book, table, [item])\n\n // Update a row in the book.\n else {\n // Remove empty orders from the book.\n if(item.leavesQty <= 0) book[s.tables][table].splice(index, 1)\n\n // Remove closed positions from the book.\n else if(!book.opt('keep_position') && (item.currentQty <= 0)) book[s.tables][table].splice(index, 1)\n\n // Update entry in book.\n else if(book[s.tables][table][index]) Object.keys(item).forEach(key => book[s.tables][table][index][key] = item[key])\n }\n }\n}", "title": "" }, { "docid": "54a58a8dca386d4b3b92d2f4f065ab0d", "score": "0.58240455", "text": "async update(id, attrs){\n const records = await this.getAll();\n const record = records.find(record => record.id === id);\n\n if(!record){\n throw new Error('Record with id {id} not found');\n }\n\n Object.assign(record, attrs);\n await this.writeAll(records);\n }", "title": "" }, { "docid": "b095588f39ca91d1a7e196c989e06620", "score": "0.581107", "text": "batch_put_table_records(table_name, records, callback) {\n var ops = [],\n db = this.db,\n b64_key, c, l, map_key_batches = {},\n key;\n // Maybe table does not exist locally\n let table = this.model.map_tables[table_name];\n //console.log('table', table);\n // Maybe it's OK when restarting anew because the local system has already copied the core model?\n //throw 'stop';\n if (table) {\n let kp = table.id * 2 + 2;\n each(records, row => {\n row.splice(0, 0, kp);\n if (this.using_prefix_put_alerts) {\n //prefix_put_alerts_batch = [];\n //var map_b64kp_subscription_put_alert_counts = this.map_b64kp_subscription_put_alert_counts;\n b64_key = arr_row[0].toString('hex');\n // Better to use a map and array.\n // Maybe the standard event based system would be fine.\n // Do more work on subscription handling.\n\n for (key in this.map_b64kp_subscription_put_alert_counts) {\n if (b64_key.indexOf(key) === 0) {\n map_key_batches[key] = map_key_batches[key] || [];\n map_key_batches[key].push(arr_row);\n }\n }\n }\n ops.push({\n 'type': 'put',\n 'key': row[0],\n 'value': row[1]\n });\n });\n db.batch(ops, err => {\n if (err) {\n callback(err);\n } else {\n this.raise('db_action', {\n 'type': 'batch_put',\n 'arr': records\n });\n each(map_key_batches, (map_key_batch, key) => {\n //console.log('1) key', key);\n //console.log('map_key_batch', map_key_batch);\n var buf_encoded_batch = Model_Database.encode_model_rows(map_key_batch);\n //console.log('buf_encoded_batch', buf_encoded_batch);\n this.raise('put_kp_batch_' + key, {\n 'type': 'batch_put',\n 'buffer': buf_encoded_batch\n });\n });\n callback(null, true);\n }\n })\n } else {\n callback(new Error('Table ' + table_name + ' does not exist locally'));\n }\n }", "title": "" }, { "docid": "22e2bb740fcbed0d89da7a6e10698516", "score": "0.5798144", "text": "update(req, res) {\n return __awaiter(this, void 0, void 0, function* () {\n const { id } = req.params;\n var HISTORYUP;\n if (req.body.HISTORY) { //Si se enviaron padecimintos\n HISTORYUP = req.body.HISTORY; //Almacenamos el array de enfermedades en una variable\n delete req.body.HISTORY; //Se elimina el array de enefermedades para la primera consulta\n }\n yield database_1.default.query('UPDATE patients set ? WHERE ID_USR = ?', [req.body, id], function (err, result, fields) {\n return __awaiter(this, void 0, void 0, function* () {\n if (err)\n throw err;\n if (result.affectedRows == 1) { //Se se realizó actualización\n if (HISTORYUP) { //Si se enviaron padecimintos\n //Se elimina los registros de la tabla medical_history para volver a insertarlos con la nueva información \n yield database_1.default.query('DELETE FROM medical_history WHERE ID_USR = ?', [id], function (err, result, fields) {\n return __awaiter(this, void 0, void 0, function* () {\n //Consulta para insertar los padecimintos en la tabla de medical_history\n for (var i = 0; i < HISTORYUP.length; i++) {\n yield database_1.default.query(\"INSERT INTO medical_history(ID_USR, ILLNESS) VALUES ('\" + id + \"', '\" + HISTORYUP[i] + \"')\");\n }\n });\n });\n }\n res.json({ message: 'El paciente fue actualizado' });\n }\n else {\n res.status(404).json({ message: 'Paciente no encontrado' });\n }\n });\n });\n });\n }", "title": "" }, { "docid": "7da348dba67569452e9c0761087749cd", "score": "0.57974523", "text": "function l(e,t){T.isBatchingUpdates?void 0:c(\"125\"),g.enqueue(e,t),w=!0}", "title": "" }, { "docid": "c7e95fd07a8fe34ea6aa5eb2358b58c1", "score": "0.5757938", "text": "static update(request, response) {\r\n\r\n lendingItemsModel.getById(request.body.id)\r\n .then( data => {\r\n if (data.length > 0) {\r\n\r\n //recupera do body os campos que serao excluidos da tabela\r\n const conditions = [\r\n {\r\n field: 'id',\r\n value: request.body.id\r\n },\r\n {\r\n field: 'item',\r\n value: request.body.item\r\n },\r\n ];\r\n\r\n //chama rotina para atualizacao dos dados\r\n lendingItemsModel.update(conditions) \r\n response.sendStatus(200);\r\n console.log('Borrowed item has been updated. ID: ', request.body.id,'Item: ', request.body.item); \r\n } else {\r\n response.sendStatus(404);\r\n console.log('Lending not found. ID: ', request.body.id);\r\n }\r\n })\r\n .catch(err => {\r\n response.sendStatus(500);\r\n console.log('Error updating borrowed item by ID: ', request.body.id, err);\r\n });\r\n \r\n }", "title": "" }, { "docid": "bfb92433aa2ebcf8d5c4506f94d5db38", "score": "0.57563406", "text": "function addResolvetagforSnowBots(){\nlogger.info('inside addResolvetagforSnowBots')\nbotModel.update({\"input.name\":\"sysid\"},{\"isResolved\":true},{upsert:true,multi:true},function(err,result){\n if(err){\n logger.error('err at addResolvetagforSnowBots'+JSON.stringify(err))\n }else{\n logger.info('asdResolvetagforSnowBots result'+JSON.stringify(result))\n\n }\n})\n}", "title": "" }, { "docid": "ce52d4e6efc5b8d6e7217592ee05eb77", "score": "0.57555544", "text": "update(t){\n this.checkKeys()\n this.vehicle.update(t)\n this.udpateAllSupplies(t)\n //this.billboard.update(this.nSuppliesDelivered)\n }", "title": "" }, { "docid": "1c355cb76984aedc0223d76596ebbca1", "score": "0.5751655", "text": "function update(rawdata){\r\n //PUT YOUR UPDATE CODE BELOW\r\n\r\n\r\n}", "title": "" }, { "docid": "541566e52bc8a01d1548a21215b5b38b", "score": "0.5737476", "text": "async update ({ params, request, response }) {\n const billsToPay = await BillsToPay.findOrFail(params.id)\n\n const data = request.only([\n 'descripition',\n 'date',\n 'category',\n 'value',\n 'status'\n ])\n\n billsToPay.merge(data)\n \n await billsToPay.save()\n \n return billsToPay\n }", "title": "" }, { "docid": "4926d0853a067f682aee57735d5e702f", "score": "0.57355195", "text": "function _updateEntry() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\t\t\tvar oStatement;\n\t\t\tvar lvQuery = 'UPDATE \"COV_SCH_VAT\".\"COV_VAT_STEPS\" SET \"REF_STEP_ID\" = ?, \"CONDITION\" = ? where \"STEP_SEQ\" = ?';\n\t\t\t//Build the Statement to update the entries\n\t\t\tvar oStatement = oConnection.prepareStatement(lvQuery);\n\n\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t//Reference Step ID\n\t\t\toStatement.setInt(1, parseFloat(oBody.REF_STEP_ID));\n\t\t\t//Condition\n\t\t\tif (oBody.CONDITION) {\n\t\t\t\toStatement.setString(2, oBody.CONDITION.toString());\n\t\t\t} else {\n\t\t\t\toStatement.setInt(2, 0);\n\t\t\t}\n\t\t\t//Step Sequence\n\t\t\toStatement.setInt(3, parseFloat(oBody.STEP_SEQ));\n\n\t\t\toStatement.addBatch();\n\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries updated successfully in Table:\" + gvTableName + \";\";\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem updating entries in the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "title": "" }, { "docid": "010793735491da4b642a52299be30e93", "score": "0.57346994", "text": "function updateRecord() {\r\n\t\tflag = true;\r\n\t}", "title": "" }, { "docid": "1fb3ae8051cacaa379c3ccf487977b48", "score": "0.57175905", "text": "updateRecord(cheeseId, record) {\n setCheeseData(cheeseData => {\n const newRecords = [...cheeseData.records];\n const index = cheeseData.records.findIndex(\n record => record.CheeseId === cheeseId\n );\n if (index !== -1) {\n newRecords[index] = record;\n }\n return { ...cheeseData, records: newRecords };\n });\n }", "title": "" }, { "docid": "5e15f218b5e17a7b627aa1a53c0374fc", "score": "0.571184", "text": "async batch(...records) {}", "title": "" }, { "docid": "b053f228e844959c58cdb914fd98e8d3", "score": "0.56985533", "text": "updateOne(objectColVals,condition,cb){\n orm.updateOne('burgers',objectColVals,condition,(res)=>cb(res))\n }", "title": "" }, { "docid": "9147ae5a9e09f0d669c118cd9255ab1d", "score": "0.5692107", "text": "_updateRecord(label, options, callback) {\n\t\tthis._requestData(label, options, (err, data) => {\n\t\t\tif (err) callback(err, null);\n\t\t\telse {\n\t\t\t\tlet new_record = {\n\t\t\t\t\tlabel: label,\n\t\t\t\t\tdata: data,\n\t\t\t\t\tupdated_at: new Date()\n\t\t\t\t};\n\t\t\t\tLivingBuildingRecord.findAndUpdate({ label: label }, new_record,\n\t\t\t\t\t(err, result) => {\n\t\t\t\t\t\tif (err) callback(err, null);\n\t\t\t\t\t\telse if (result.n == 0) {\n\t\t\t\t\t\t\tLivingBuildingRecord.new(new_record, callback);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse this._retrieveRecord(label, callback);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "2c83f4d5e2ab816c2cd48de14d8bf77e", "score": "0.56844854", "text": "update(table, records) {\n var _this4 = this;\n\n return _asyncToGenerator(function* () {\n const tablePrimaryKey = yield _this4.getTableKey(table);\n const queries = records.map(function (record) {\n const columnNames = Object.keys(record.changes);\n const edits = columnNames.map(function (columnName) {\n return `${columnName} = '${record.changes[columnName]}'`;\n });\n return `\n UPDATE ${table}\n SET ${edits.join(', ')}\n WHERE ${tablePrimaryKey.name} = ${record.rowPrimaryKeyValue};\n `;\n });\n const finalQuery = queries.join('\\n');\n return _this4.driverExecuteQuery({ query: finalQuery }).then(function (res) {\n return res.data;\n });\n })();\n }", "title": "" }, { "docid": "08fb8cd1731d69abc21d8069de100fc3", "score": "0.5680621", "text": "sendBikes(FK_Location, BikeID) {\r\n connection.query('update Bike set FK_Location =? where BikeID=?', [FK_Location, BikeID], (error, results) => {\r\n if (error) return console.error(error);\r\n console.log(FK_Location);\r\n console.log(BikeID);\r\n });\r\n }", "title": "" }, { "docid": "3e200ae95387439bdc0443b73e04be7d", "score": "0.56609225", "text": "handleSave(event) {\n this.isLoading = true;\n this.notifyLoading(this.isLoading);\n \n const updatedFields = event.detail.draftValues;\n const notifyChangeIds = updatedFields.map(row => {\n return {\n \"recordId\": row.Id\n };\n });\n\n updateBoatList({data: updatedFields})\n .then((result) => {\n this.dispatchEvent(new ShowToastEvent({\n title: SUCCESS_TITLE,\n message: MESSAGE_SHIP_IT,\n variant: SUCCESS_VARIANT\n }));\n\n getRecordNotifyChange(notifyChangeIds);\n this.refresh();\n })\n .catch(error => {\n this.dispatchEvent(new ShowToastEvent({\n title: ERROR_TITLE,\n variant: ERROR_VARIANT\n }))\n \n })\n .finally(() => {\n this.isLoading = false;\n this.notifyLoading(this.isLoading);\n this.draftValues = [];\n });\n }", "title": "" }, { "docid": "5340d6bb2be687d4753637fada13a69d", "score": "0.56578916", "text": "update(where,row,auto_commit=true){\n\t\tlet params = { where :where, auto_commit :auto_commit }\n\t\tdocument.dispatchEvent(new CustomEvent(\"before_update\",{ detail:{ name: this.name,row:row,params:params }}));\n\t\twhere = params.where;\n\t\tauto_commit = params.auto_commit;\n\t\tlet updated = 0;\n\t\tlet urow = {};\n\t\tfor( let k in this.rows ){\n\t\t\tif(where===false || table.testWhere(where,this.rows[k])===true){\n\t\t\t\tfor(let cl in row){\n\t\t\t\t\tif(cl in this.rows[k]===true && this.columns[cl]['pk']===false){\n\t\t\t\t\t\tthis.rows[k][cl] = row[cl];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tupdated+=1;\n\t\t\t\t}\n\t\t\t}\n\t\tthis.resetIndex();\n\t\tif(auto_commit===true){\n\t\t\tthis.commit();\n\t\t\t}\n\n\t\tthis.lastIUDEvent = Date.now();\n\t\tdocument.dispatchEvent(new CustomEvent(\"after_update\",{ detail:{ name: this.name,row:row,params:params,updated:updated }}));\n\t\treturn updated;\n\t\t}", "title": "" }, { "docid": "99f3cf04946a55cd8042407d9e4410f2", "score": "0.5644777", "text": "async function updateListing(req, res, next) {\n var lid = req.body.listingId;\n console.log(\"lid: \", lid);\n\n var query = \"UPDATE listing SET is_sold = 1 WHERE id = \" + lid;\n await db.execute(query, (err, result) => {\n if (err) {\n console.log(err);\n }\n next();\n });\n}", "title": "" }, { "docid": "8c92293bb9d5c61720456c0baa1aed8c", "score": "0.5644084", "text": "static updateBookingDetails(res,data){\n Book.updateOne({user_id : data.user_id},{$set :{seat_no :data.seat_no}}).then((resp) =>{\n this.sendMail(data)\n return Responder.success(res,{data : resp , msg: \"Booking details is updated successfully.\"})\n }); \n \n}", "title": "" }, { "docid": "4aa5b3474d4bb1fd97f9e6021703729e", "score": "0.5633498", "text": "updating() {}", "title": "" }, { "docid": "1f8092017339d5bf47e4cddebcac0fc8", "score": "0.5618709", "text": "async update({ request, response, auth }) {\n try {\n let body = request.only(fillable)\n const id = request.params.id\n const data = await MarketingReport.find(id)\n if (!data || data.length === 0) {\n return response.status(400).send(ResponseParser.apiNotFound())\n }\n await data.merge(body)\n await data.save()\n await data.loadMany([\n \"schedulle.marketing\",\n \"schedulle.action\",\n \"schedulle.target.study.studyName\",\n \"schedulle.target.study.university\",\n ])\n const activity = `Update MarketingReport '${data.code}'`\n await ActivityTraits.saveActivity(request, auth, activity)\n await RedisHelper.delete(\"MarketingReport_*\")\n let parsed = ResponseParser.apiUpdated(data.toJSON())\n return response.status(200).send(parsed)\n } catch (e) {\n ErrorLog(request, e)\n return response.status(500).send(ResponseParser.unknownError())\n }\n }", "title": "" }, { "docid": "bca87d69e28604088518bc17baea9cb2", "score": "0.5617796", "text": "function update(task) {\nlet request = db.transaction(['task'], 'readwrite')\n .objectStore('task')\n .put(task);\n console.log (task);\n\nrequest.onsuccess = function (event) {\n console.log('The data has been updated successfully');\n};\n\nrequest.onerror = function (event) {\n console.log('The data has been updated failed');\n}\n}", "title": "" }, { "docid": "818e8cac15b4561cebb1c997f95245b1", "score": "0.5586975", "text": "function saveRecordGather() {\r\n\t\tgrid.stopEditing();\r\n\t\tvar modifyRec = grid.getStore().getModifiedRecords();\r\n\t\t\r\n\t\tif (modifyRec.length > 0 || ids.length > 0) {\r\n\t\t\tif (!confirm(\"确定要保存修改吗?\"))\r\n\t\t\t\treturn;\r\n\t\t\tvar updateData = new Array();\r\n\t\t\tfor (var i = 0; i < modifyRec.length; i++) {\r\n\t\t\t\tvar rec = modifyRec[i];\r\n\t\t\t\t\r\n\t\t\t\tif (rec.get(\"trainDetail.trainingNumber\") == null\r\n\t\t\t\t\t\t|| (rec.get(\"trainDetail.trainingNumber\") == \"\" && rec\r\n\t\t\t\t\t\t\t\t.get(\"trainDetail.trainingNumber\") != \"0\")) {\r\n\r\n\t\t\t\t\tExt.MessageBox.alert('提示', '计划人数不能为空!')\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tif (rec.get(\"trainDetail.trainingLevel\")==2&&rec.get(\"trainDetail.chargeBy\") == null\r\n\t\t\t\t\t\t|| rec.get(\"trainDetail.chargeBy\") == \"\") {\r\n\r\n\t\t\t\t\tExt.MessageBox.alert('提示', '负责人不能为空!')\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tupdateData.push({\r\n\t\t\t\t\t\t\tid : rec.get(\"trainDetail.trainingDetailId\"),\r\n\t\t\t\t\t\t\ttrainingTypeId : rec\r\n\t\t\t\t\t\t\t\t\t.get(\"trainDetail.trainingTypeId\"),\r\n\t\t\t\t\t\t\ttrainingName : rec.get(\"trainDetail.trainingName\"),\r\n\t\t\t\t\t\t\ttrainingNumber : rec\r\n\t\t\t\t\t\t\t\t\t.get(\"trainDetail.trainingNumber\"),\r\n\t\t\t\t\t\t\ttrainingHours:\trec.get(\"trainDetail.trainingHours\"),\r\n\t\t\t\t\t\t\tchargeBy : rec.get(\"trainDetail.chargeBy\")\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tExt.Ajax.request({\r\n\t\t\t\t\t\turl : 'manageplan/updateDeptGatherRecord.action',\r\n\t\t\t\t\t\tmethod : 'post',\r\n\t\t\t\t\t\tparams : {\r\n\t\t\t\t\t\t\tisUpdate : Ext.util.JSON.encode(updateData)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tsuccess : function(result, request) {\r\n\t\t\t\t\t\t\tvar o = eval('(' + result.responseText + ')');\r\n\t\t\t\t\t\t\tExt.MessageBox.alert('提示信息', o.msg);\r\n\t\t\t\t\t\t\tflag = false;\r\n\t\t\t\t\t\t\tstore.rejectChanges();\r\n\t\t\t\t\t\t\tinit();\r\n\t\t\t\t\t\t\tquery();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tfailure : function(result, request) {\r\n\t\t\t\t\t\t\tExt.MessageBox.alert('提示信息', '未知错误!')\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t} else {\r\n\t\t\tExt.MessageBox.alert('提示信息', '没有做任何修改!')\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0a8ee20a0eaf2478465524d487b877b3", "score": "0.55755466", "text": "function updateJob(request, response) {\n let { title, location, summary, url, skill, company, tags } = request.body;\n let SQL3 = `UPDATE ${user.username}_jobs SET title=$1, location=$2, summary=$3, url=$4, skills=$5, company=$6, tags=$7 WHERE id=$8;`;\n let newvalues = [title, location, summary, url, skill, company, tags, request.params.id];\n return client.query(SQL3, newvalues)\n .then(response.redirect('/list'))\n .catch(error => console.error('this is inside the updateJobList', error));\n}", "title": "" }, { "docid": "03cbee7052d4c05d2b2136bf46a02d76", "score": "0.5573904", "text": "function updateRecord() {\r\n //todo: this are temporary to clean old data entered with old schema, doesn'/t validatse..\r\n cleanInput();\r\n crossValidations();\r\n $scope.$broadcast('show-errors-check-validity'); \r\n if ($scope.ecForm.$invalid) {\r\n saveState();\r\n focusError();\r\n return; \r\n } \r\n setCalculatedFields();\r\n saveState();\r\n var jsonData = { 'calEvent' : vm.event};\r\n resetFormValidation(); //again to be removed.. but if you save a record you should surf away\r\n tmpSubmitAPIService.update(vm.userId, vm.pw, APP_NAME, vm.event.recId , jsonData)\r\n .then(function() {\r\n \r\n window.location.reload(true);\r\n });\r\n }", "title": "" }, { "docid": "77d2dd4b4aa7855eaf9737b512d6922d", "score": "0.55732703", "text": "function update(rawdata) {\n //PUT YOUR UPDATE CODE BELOW\n}", "title": "" }, { "docid": "2b93b96fd700f9fc846c8f6e9368225d", "score": "0.55625546", "text": "async function updateAwardScheduled(params) {\n //console.log(\"Trying to update awards.scheduled\");\n\n for(var record=0; record<params.length; record++) {\n //console.log(\"AWARD ID TO UPDATE: \" + params[record].id);\n await updateAwardHelper(params[record].id);\n }\n}", "title": "" }, { "docid": "0e4295183532aef0c01cece4d6ffe4db", "score": "0.5550761", "text": "static postEditJob(req , res){\n let idJob = req.params.id\n let dataJob = req.body\n //jika update akan mengganti tanggal updated\n dataJob.updatedAt = new Date()\n\n //update data job dengan id dan data yang sudah diperbaharui\n Job.update(dataJob , {\n where:{\n id:idJob\n }\n })\n .then(data=>{\n res.redirect('/jobs')\n })\n .catch(err=>{\n res.send(err)\n }) \n }", "title": "" }, { "docid": "068d18e9aca4c3e234a1568a9e6680e6", "score": "0.55446184", "text": "function updateData(array){\n\tfor (i = 0; i < array.length; i++){\n\t\t//all users updated with new province counts and encounter flags reset\n\t\tdb.User.update({\n\t\t\tprovinceCount: array[i].provinceCount,\n\t\t\tencounterCompleted: false,\n\t\t\tencounterGenerated: false\n\t\t}, \n\t\t{where:{id: array[i].id}}).then(function(){\n\t\t});\n\t}\n}", "title": "" }, { "docid": "33c644b88c33e8e4ba36c968eb72416a", "score": "0.553788", "text": "function f_updateList(collectionName, jsonData, documentName){\n var batch = firestore.batch();\n var collectionRef = firestore.collection(collectionName);\n jsonData.forEach(element => {\n batch.set(collectionRef.doc(element.Name), element);\n });\n return batch.commit.then(function() {\n // All batch is complete without error\n });\n}", "title": "" }, { "docid": "08dd94309fa228c38375034b2c9a640c", "score": "0.5527848", "text": "updateCallById(updateObj, room) {\n const i = this._getCallIndexById(updateObj._id, room);\n // console.log(i);\n if (i !== undefined) {\n // this.calls[room][i] = { ...this.calls[room][i], status: updateObj.status };\n this.calls[room][i].status = updateObj.status;\n }\n }", "title": "" }, { "docid": "9d8be13c8888add4194462b54ff45d3c", "score": "0.55237097", "text": "updateAllIsOccupiedFalse() {\n ShowingSeatModel.update({ isOccupied: true }, { isOccupied: false }, { multi: true }, () => {\n console.log('> all occupied seats have been set to non-occupied');\n });\n }", "title": "" }, { "docid": "0704213b2f202c93af96aba1010357fc", "score": "0.5515449", "text": "function updateRecordGather() {\r\n\t\tflag = true;\r\n\t}", "title": "" }, { "docid": "bf8da0dc4a9bb8605183500439e9e9b2", "score": "0.55151176", "text": "function baseUpdate() {\n\tdb.allDocs({\n\t\tinclude_docs: true,\n\t}).then(function (result) {\n\t\tvar i = result.total_rows;\n\t\tif (i > 0) {\n\t\t\tfor (var k = 0 ; k< i; k++) {\n\t\t\t\tvar row = result.rows[k].doc.number,\n\t\t\t\t\tjob = result.rows[k].doc.job,\n\t\t\t\t\tisDone = result.rows[k].doc.isDone;\n\t\t\t\t\tupdateToDo(row,job,isDone);\n\t\t\t\t\tupdateCounter(row);\n\t\t\t}\n\t\t} else console.log('Zakończono update bazy - baza pusta');\n\t});\n}", "title": "" }, { "docid": "41cabfdb3334a73c6f2ea366e5af4a80", "score": "0.5514164", "text": "function updateDoc() {\n\n\t\t\tvar id = {\n\t\t\t\t_id: ObjectID(req.body._id)\n\t\t\t};\n\t\t\t\t\t\n\t\t\tdb.collection('pending_hairpiqs').update(id, { $set: params }, function(err, result) {\n\t\t\t\t\t\t\n\t\t\t\tassert.equal(null, err);\n\t\t\t\tconsole.log('C - Updated document in approved_hairpiqs: ' + id._id);\n\t\t\t\tres.send(JSON.stringify('success'));\n\t\t\t\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "03c7cb8627ef2db2674f91bb88b29835", "score": "0.551288", "text": "async updateStaff(ctx, next) {\n console.log(\"CONTROLLER HIT: StaffController::updateStaff\");\n return new Promise((resolve, reject) => {\n const sm = ctx.request.body;\n chpConnection.query({\n sql:`\n UPDATE Staff\n SET\n fName = ?,\n mName = ?,\n lName = ?,\n suffix = ?,\n dept = ?,\n salary = ?\n WHERE staff_id = ?;`,\n values: [sm.fName, sm.mName, sm.lName, sm.suffix, sm.dept, sm.salary, ctx.params.staff]\n }, (err, res) => {\n if(err){\n reject(`Error querying CHP.Staff: ${err}`);\n }\n resolve();\n });\n }).then(await next)\n .catch(err => {\n ctx.status = 500,\n ctx.body = {\n error: `Internal Server Error: ${err}`,\n status: 500\n };\n });\n }", "title": "" }, { "docid": "6412f07bcb7cb2ac2a0e0cf2c4d6b0a4", "score": "0.55121225", "text": "updateOne(data) {\n return db.one(`\n UPDATE gradebook\n SET\n potty_training = $/potty_training/,\n stay = $/stay/,\n leash_training = $/leash_training/,\n sit = $/sit/,\n quiet = $/quiet/,\n leave_it = $/leave_it/\n WHERE dogs_id = $/dogs_id/\n RETURNING *`, data);\n }", "title": "" }, { "docid": "e451a436a468af50db71170372af342c", "score": "0.55104476", "text": "update() {\n const join = this.join();\n const updates = this._prepUpdate(this.single.update);\n const where = this.where();\n const order = this.order();\n const limit = this.limit();\n return (\n `update ${this.tableName}` +\n (join ? ` ${join}` : '') +\n ' set ' +\n updates.join(', ') +\n (where ? ` ${where}` : '') +\n (order ? ` ${order}` : '') +\n (limit ? ` ${limit}` : '')\n );\n }", "title": "" }, { "docid": "8777d7c65a2d20153e7d0f36e658dfc5", "score": "0.5505479", "text": "function updateAllRecords(){\n for(i=0; i < allRecords.length; i++){\n ref.child(allRecords[i]).update({\n \"editing\": false\n })\n }\n}", "title": "" }, { "docid": "80285f60a9984e261bc1d53566ac9e2e", "score": "0.55024993", "text": "function simpleUpdateTest() {\n\n var result, params;\n\n deleteAllRecords(\"testobject\");\n checkRecordCount(\"testobject\", 0);\n\n // create records\n params = createParams(\"data_record_array\", createBatch(20));\n result = createRecords(\"testobject\", params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 20, \"Create 20 records (data_record_array)\", result);\n checkRecordCount(\"testobject\", 20);\n\n // update records using various methods\n params = updateParamsByIds(\"testobject\", \"data_record_array\", updateOne(), [0,1]);\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (data_record_array)\", result);\n\n params = updateParamsByIds(\"testobject\", \"data_record_object\", updateOne(), [2]);\n result = updateRecords(params);\n checkResult(result.error === null && result.data, \"PATCH 1 record (data_record_object)\", result);\n\n params = updateParamsByIds(\"testobject\", \"data_idlist_array\", updateOne(), [3,4]);\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (data_idlist_array)\", result);\n\n params = updateParamsByIds(\"testobject\", \"data_idlist_string\", updateOne(), [5,6]);\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (data_idlist_string)\", result);\n\n params = updateParamsByIds(\"testobject\", \"param_idlist_string\", updateOne(), [7,8]);\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (param_idlist_string)\", result);\n\n params = updateParamsByIds(\"testobject\", \"url_id\", updateOne(), [9]);\n result = updateRecords(params);\n checkResult(result.error === null && result.data, \"PATCH 1 record (url_id)\", result);\n\n if (serviceData.record[0].storage_type !== \"aws dynamodb\") {\n params = updateParamsByFilter(\"testobject\", \"data_filter\", updateOne(), idFilter(\"testobject\",[10,11]));\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (data_filter)\", result);\n\n params = updateParamsByFilter(\"testobject\", \"param_filter\", updateOne(), idFilter(\"testobject\",[12,13]));\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (param_filter)\", result);\n\n params = updateParamsByFilter(\"testobject\", \"data_filter_replace\", updateOne(), idFilter(\"testobject\",[14,15]));\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PATCH 2 records (data_filter_replace)\", result);\n\n params = updateParamsByFilter(\"testobject\", \"param_filter_replace\", updateOne(), idFilter(\"testobject\",[16,17,18,19]));\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 4, \"PATCH 4 records (param_filter_replace)\", result);\n }\n}", "title": "" }, { "docid": "ef25dc6d931acf1e7fee69de5723e193", "score": "0.5501081", "text": "function updateTaskRecord(record) {\r\n // prepare query\r\n let sql = `UPDATE task SET\r\n task_name = ${mysql.escape(record.TaskName)},\r\n task_number = ${mysql.escape(record.TaskNum)},\r\n user_id = (SELECT user_id FROM user WHERE user_name = ${mysql.escape(\r\n record.AssignedTo\r\n )}),\r\n description = ${mysql.escape(record.TaskDescription)},\r\n date_start = ${mysql.escape(record.StartDate)},\r\n date_end = ${mysql.escape(record.EndDate)}\r\n WHERE\r\n task_id = ${mysql.escape(record.task_id)}`;\r\n\r\n // run query\r\n pool.query(sql, (err) => {\r\n if (err) {\r\n // handle error\r\n console.error(\"Error with query: \" + err.stack);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "956b9ef5b637af17ec6c1082e7080a5a", "score": "0.5488811", "text": "updateBikeLocation(RentalID) {\r\n connection.query(\r\n 'update Bike inner join RentedBikes on RentedBikes.FK_BikeID = Bike.BikeID inner join Rentals on Rentals.RentalID = RentedBikes.RentalID set Bike.FK_Location = Rentals.FK_DropoffID where Rentals.RentalID = ?',\r\n [RentalID],\r\n (error, results) => {\r\n if (error) return console.error(error);\r\n\r\n console.log(results);\r\n }\r\n );\r\n }", "title": "" }, { "docid": "be8bb40f1b1ed83d9f3e8dde7623051d", "score": "0.54827523", "text": "async update() {\n\n const { rows } = await db.query(\n `UPDATE boardgame\n SET name = $2,\n min_age = $3,\n min_players = $4,\n max_players = $5,\n type = $6,\n note = $7,\n duration = $8,\n creator = $9\n WHERE id = $1;`, [this.id, this.name, this.minAge, this.minPlayers, this.maxPlayers, this.type, this.note, this.duration, this.creator]\n );\n\n }", "title": "" }, { "docid": "551be55b50975152f403a6c51599a416", "score": "0.54824543", "text": "update(req, res) {\r\n Comida.update(req.body, {\r\n where: {\r\n id: req.params.id\r\n }\r\n })\r\n .then(function (updatedRecords) {\r\n res.status(200).json(updatedRecords);\r\n })\r\n .catch(function (error){\r\n res.status(500).json(error);\r\n });\r\n }", "title": "" }, { "docid": "ba43138752ace6fa263ccf342835b843", "score": "0.5472144", "text": "function updateData(key, updatedData){\n var meta = {\n name: 'marksheet'\n };\n var filter = {\n index: 'rollnumber',\n data: [key]\n };\n return dataStore.update(meta, filter, updatedData).then(function(){\n $('#console').append('<h3>Updated rollnumber 2\\'s sub3 mark to 90</h3>');\n });\n}", "title": "" }, { "docid": "14c52d53b872f8f1db6f1e89d31ffc5e", "score": "0.54721177", "text": "function UpdateDwellingDetailsSummary () {\n\tvar DBFeaso = Ti.Database.open('QwikFeaso');\n\t\n\tvar res = DBFeaso.execute('select * from UserAddedDwelling');\n\tif(res.isValidRow())\n\t{\n\t\tresultset=DBFeaso.execute('select * from DwellingDetailsSummary');\t\n\t\twhile(resultset.isValidRow())\n\t \t\t\t{\n\t \t\t\t\tvar buildCostRS=DBFeaso.execute('select BuildQuality,BuildDifficulty from DwellingDetailsSummary where DwellingID=?',resultset.fieldByName('DwellingID'));\n\t \t\t\t\t\n\t\t\t\t \t\tDBFeaso.execute('update DwellingDetailsSummary set TotalLivingAreaM2=?,TotalLivingAreaFt2=?,TotalConstructionAreaM2=?,TotalConstructionAreaFt2=?,TotalConstructionCostM2=?,TotalConstructionCostFt2=?,Summary=?,BuildQuality=?,BuildDifficulty=?,IsDeleted=? where DwellingID=?',\n\t\t\t\t \t\tresultset.fieldByName('TotalLivingAreaM2'),resultset.fieldByName('TotalLivingAreaFt2'),resultset.fieldByName('TotalConstructionAreaM2'),\n\t\t\t\t \t\tresultset.fieldByName('TotalConstructionAreaFt2'),resultset.fieldByName('TotalConstructionCostM2'),\n\t\t\t\t \t\tresultset.fieldByName('TotalConstructionCostFt2'),resultset.fieldByName('Summary'),buildCostRS.fieldByName('BuildQuality'),buildCostRS.fieldByName('BuildDifficulty'),resultset.fieldByName('IsDeleted'),resultset.fieldByName('DwellingID'));\n\t \t\t\t\tresultset.next();\n\t \t\t\t}\n\t \t\t\t\tbuildCostRS.close();\n\t \tresultset.close();\t\t\n\t}\n\tres.close();\n DBFeaso.close();\n}", "title": "" }, { "docid": "4c5ff77c05592e7209d1c1d12d0ce8b6", "score": "0.547064", "text": "function _updateEntry() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\t\t\tvar oStatement;\n\t\t\t//Build the Statement to update the entries\n\t\t\tvar oStatement = oConnection.prepareStatement(\n\t\t\t\t\"UPDATE \\\"\" + gvSchemaName + \"\\\".\\\"\" + gvTableName +\n\t\t\t\t\"\\\" SET RULE = ? WHERE IN_TABLE = ? AND IN_FIELD = ? AND OUT_TABLE = ? AND OUT_FIELD = ?\"\n\t\t\t);\n\n\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t//Rule\n\t\t\toStatement.setString(1, oBody.RULE);\n\t\t\t//In Table\n\t\t\toStatement.setString(2, oBody.IN_TABLE);\n\t\t\t//In Field\n\t\t\toStatement.setInt(3, oBody.IN_FIELD);\n\t\t\t//Out Table\n\t\t\toStatement.setInt(4, oBody.OUT_TABLE);\n\t\t\t//Out Field\n\t\t\toStatement.setInt(5, oBody.OUT_FIELD);\n\n\t\t\toStatement.addBatch();\n\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries updated successfully in Table:\" + gvTableName + \";\";\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem updating entries in the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "title": "" }, { "docid": "bd3a864c90cc6ed46b01eb2687128d12", "score": "0.5461962", "text": "function updateDate(callback){\n if(!( _.isEmpty(buffer))){\n for(var key in buffer){\n SensorConfig.update({taskid: key}, {\n $push: {data : {$each: buffer[key]}}\n }, {upsert: true}, function(err){\n if(err){\n console.log(err);\n }\n });\n }\n }\n if(callback) callback();\n}", "title": "" }, { "docid": "86e1f8637de44cb56ff0cf87971cf61a", "score": "0.54617536", "text": "async updateSheet(updates, tableName) {\n const tab = tableName === \"sessionData\" ? 2 : 3;\n for (let update of updates) {\n if (update.newRow) {\n this.addNewRow(update, tab);\n } else {\n update = casing.camelCaseToKebab(update);\n try {\n const response = await this.querySheet(tab, {\n query: `row-id=${update[\"row-id\"]}`\n });\n const row = response[0];\n const updatedRow = updateObj(row, update);\n updatedRow.save();\n } catch (err) {\n throw new Error(err);\n }\n }\n }\n }", "title": "" }, { "docid": "03af0f52bcecaf8c31318a7289ac6b34", "score": "0.54605705", "text": "updateContact() {\n let record = {\n fields: {\n Id: this.recordId,\n Rating__c: this.currentRating\n },\n };\n updateRecord(record)\n // eslint-disable-next-line no-unused-vars\n .then(() => {\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Success',\n message: 'Record Is Updated',\n variant: 'sucess',\n }),\n );\n })\n .catch(error => {\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Error on data save',\n message: error.message.body,\n variant: 'error',\n }),\n );\n });\n }", "title": "" }, { "docid": "cf72e9f54baaf511f748edecee361628", "score": "0.54497516", "text": "updateBulk(body) {\n return this.rest.put(`${this.baseUrl}/bulk`, typeof body === 'object' ? JSON.stringify(body) : body);\n }", "title": "" }, { "docid": "d21d2e2a67d8ea370dfe1873b45b995b", "score": "0.54429424", "text": "async update({params, auth, request, response}) {\n const record = await this.entityModel.find(params.id);\n\n if (!record) {\n return response.status(404).json({data: 'Resource not found'})\n }\n\n //Talvez alguns campos não permite alteração\n //TODO - implementar guardedToUpdate e remover do fillable\n const data = request.only(this.entityModel.fillable)\n\n await record.merge({...data})\n await record.save()\n\n\n if (request.input(this.entityModel.primaryKey)) {\n record._clientId = request.input(this.entityModel.primaryKey)\n }\n return response.status(200).json({\n data: record\n })\n }", "title": "" }, { "docid": "6f99105c5f6c61a1ee6a3951e3d62cbc", "score": "0.5437531", "text": "update(req, res, next) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const id = req.params.id;\n const updatedRule = req.body;\n yield memberRule_1.MemberRule.updateOne({ _id: id }, { $set: updatedRule }).exec()\n .then(result => {\n console.log(result);\n })\n .catch(err => {\n console.log(err);\n });\n });\n }", "title": "" }, { "docid": "73152317ff17517af38743e7073d12a2", "score": "0.543227", "text": "async update({ request, params, response }) {\n /** get inputs */\n let inputs = request.only([\n \"collectionDate\",\n \"verified\",\n \"newGirls\",\n \"newBoys\",\n \"groupId\",\n \"attendedBoys\",\n \"attendedGirls\",\n \"abandonedGirls\",\n \"abandonedBoys\",\n \"prevRegisteredGirls\",\n \"prevRegisteredBoys\",\n \"actualBoys\",\n \"actualGirls\",\n \"latest\",\n \"moisDe\",\n ]);\n\n /** get targeted collection */\n\n const oldcol = await General.query()\n .where(\"group_id\", inputs.groupId)\n .where(\"latest\", true)\n .first();\n if (oldcol) {\n oldcol.merge({ latest: false });\n await oldcol.save();\n }\n\n const collection = await General.query().where(\"id\", params.id).first();\n\n if (collection) {\n try {\n /** update the collection */\n collection.collection_date = inputs.collectionDate;\n collection.new_boys = inputs.newBoys;\n collection.new_girls = inputs.newGirls;\n collection.attended_boys = inputs.attendedBoys;\n collection.attended_girls = inputs.attendedGirls;\n collection.abandoned_boys = inputs.abandonedBoys;\n collection.abandoned_girls = inputs.abandonedGirls;\n collection.prev_registered_boys = inputs.prevRegisteredBoys;\n collection.prev_registered_girls = inputs.prevRegisteredGirls;\n collection.actual_boys = inputs.actualBoys;\n collection.actual_girls = inputs.actualGirls;\n collection.verified = true;\n collection.latest = inputs.latest;\n collection.mois_de = inputs.moisDe;\n collection.group_id = inputs.groupId;\n /** save the updates */\n await collection.save();\n\n return response.status(200).send({\n message: \"collection updated\",\n data: collection,\n });\n } catch (error) {\n return response.status(404).send({\n message: \"failed\",\n error: error,\n });\n }\n } else {\n return response.status(404).send({\n message: \"no collection found\",\n });\n }\n }", "title": "" }, { "docid": "21a2f4bddf0aae537e5a7d3a410d81c0", "score": "0.5424848", "text": "function updateOne() {\n\n var record = {\n \"updated\": true\n };\n return record;\n}", "title": "" }, { "docid": "4c726647b3f8d784b3673f9e504c9de1", "score": "0.5418987", "text": "function saveInventory(error, response, body) {\n var data2 = JSON.parse(body);\n var listings2 = data2.listings;\n for (var j = 0; j < listings2.length; j++) {\n User.update({name: hbsObject.username}, {$push: {inventory: listings2}}, function(err, doc) {\n if (err) {\n console.log('something went wrong updating db\\n', err);\n }\n console.log('db updated\\n');\n });\n }\n }", "title": "" }, { "docid": "d7d52c9605e5b29b1696c9773183bc2a", "score": "0.5418075", "text": "async update(id, item) {\n // change a piece of the data\n // change data where data.id === id\n // [async] write data to file\n // make sure your change is in this.database\n // write this.database to file\n }", "title": "" }, { "docid": "f86e0704b6e177793858cc8c5ba1bd0e", "score": "0.54173696", "text": "function update_stall_status(suds_id, stall_id, status)\n{\n\tfor(var i = 0; i < stalls[suds_id].length; i++)\n\t{\n\t\tif(stalls[suds_id][i]['id'] == stall_id)\n\t\t{\n\t\t\tstalls[suds_id][i]['status'] = status;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "60d0615ef500d04d542a736884efa49d", "score": "0.5415225", "text": "function updateRecord(request, response) {\n let path = getPath(request, response);\n function getQueryInfo() {\n if (path === 'pastor') {\n let pastor = new Pastor(request.body);\n let SQL = `UPDATE pastors SET pastor_first_name=$1, pastor_last_name=$2, spouse=$3, pastor_story=$4, spouse_story=$5, image_url=$6, family_marriage=$7, prayer_needs=$8, church_id=$9 WHERE id=$10;`;\n\n let values = [\n pastor.pastor_first_name,\n pastor.pastor_last_name,\n pastor.spouse,\n pastor.pastor_story,\n pastor.spouse_story,\n pastor.image_url,\n pastor.family_marriage,\n pastor.prayer_needs,\n pastor.church_id,\n request.params.id\n ];\n\n let pastorUpdate = [pastor, SQL, values];\n return pastorUpdate;\n } else if (path === 'church') {\n let church = new Church(request.body);\n let SQL = `UPDATE churches SET name=$1, map_url=$2, longitude=$3, latitude=$4, location=$5, church_members=$6, sunday_school=$7, pre_school=$8, feeding_program=$9, description=$10, community=$11 WHERE id=$12;`;\n\n let values = [\n church.name,\n church.map_url,\n church.longitude,\n church.latitude,\n church.location,\n church.church_members,\n church.sunday_school,\n church.pre_school,\n church.feeding_program,\n church.description,\n church.community,\n request.params.id\n ];\n\n let churchUpdate = [church, SQL, values];\n return churchUpdate;\n }\n }\n let updateInfo = getQueryInfo();\n\n return client\n .query(updateInfo[1], updateInfo[2])\n .then(response.redirect(`/${path}/${request.params.id}`))\n .catch(err => handleError(err, response));\n}", "title": "" }, { "docid": "dc8ac9bb41a409b10a8b46b6bc38ad36", "score": "0.54099804", "text": "async _update () {\n // update this attributes\n this.updatedAt = new Date().toISOString()\n this.latest += 1 // increase latest number by 1\n\n // update v0\n const v0Attrs = this._getAttrValues()\n\n // create a new version\n const newAttrs = this._getAttrs()\n delete newAttrs.latest // only v0 needs to keep track of latest number\n const newItem = {\n urlId: this.id, // same partition key\n varies: this._getVaries(), // increase sort key by 1\n ...newAttrs\n }\n\n const data = await client.transactWrite({\n TransactItems: [{\n Put: {\n TableName,\n Item: newItem\n }\n }, {\n Update: {\n TableName,\n Key: this._getKeys(),\n UpdateExpression: SET_EXP,\n ExpressionAttributeNames: SET_EXP_NAMES,\n ExpressionAttributeValues: v0Attrs,\n ReturnValues: 'UPDATED_NEW'\n }\n }]\n })\n\n debug(data)\n return data\n }", "title": "" }, { "docid": "aca3a8d16176c7dea0eb44a1f29fa598", "score": "0.5400217", "text": "update(modelName, where, data, options, callback) {\n // Result is just an info.\n return this.all(modelName, { where: where }, options).map((res) => {\n const id = this.getIdValue(modelName, res);\n return this.putWithId(modelName, id, Object.assign(res, data), options).return(true).catchReturn(false);\n }).filter(Boolean).reduce((info) => {\n info.count++;\n return info;\n }, { count: 0 }).asCallback(callback);\n }", "title": "" }, { "docid": "01b56b93d54299a8dd034cf64799a1b4", "score": "0.53998137", "text": "handleNext() {\n console.log('Calling next!');\n const { responses, hotseat_index } = this.props;\n Responses.update(responses[hotseat_index]._id, {\n $set: {\n hotseat: true,\n }\n }, (error) => {\n if (error) {\n console.log(error);\n }\n });\n }", "title": "" }, { "docid": "fd9bd076490323ed97637900e42fbfcb", "score": "0.5392625", "text": "async updateMany(filter,modificationObject){}", "title": "" }, { "docid": "5121e27ac64c45387f8f2b47d11b942a", "score": "0.53914565", "text": "updateBulk(body) {\n return this.rest.put(`${this.baseUrl}/api-keys/bulk`, typeof body === 'object' ? JSON.stringify(body) : body);\n }", "title": "" }, { "docid": "5121e27ac64c45387f8f2b47d11b942a", "score": "0.53914565", "text": "updateBulk(body) {\n return this.rest.put(`${this.baseUrl}/api-keys/bulk`, typeof body === 'object' ? JSON.stringify(body) : body);\n }", "title": "" }, { "docid": "31127c4b406c2809f2621786471dfa6b", "score": "0.5385564", "text": "function updateItem(request,response){\n\n let sql=\"UPDATE <tableName> SET <attributeName>=<yourValue>\";\n\n connectionPool.query(sql, (err, result) => {\n if (err) {//Check for errors\n console.error(\"Error executing query: \" + JSON.stringify(err));\n }\n else {\n response.send(\"<Attribute Name> updated\");\n \n }\n });\n\n}", "title": "" }, { "docid": "5a45e5385bda9f4601ccf9f58987f1f0", "score": "0.53852844", "text": "moveBike1(Status, Information, BikeID, success) {\r\n connection.query(\r\n 'UPDATE Bike SET Status = ?, Information = ? WHERE BikeID = ?',\r\n [Status, Information, BikeID],\r\n (error, results) => {\r\n if (error) return console.error(error);\r\n\r\n success();\r\n }\r\n );\r\n }", "title": "" }, { "docid": "11cb6307736ea81c26588b1532017eb3", "score": "0.5384889", "text": "async function changeBooking(booking, seats, email) {\n for (let i in booking.flightDetails) {\n // for changing the seats in the trip database\n await tripDB_.changeSeatAndEmail(\n booking.flightDetails[i]._id,\n booking._id,\n email,\n seats[i]\n );\n }\n booking.seats = seats;\n booking.email = email; //for updating the email as well\n await booking.save();\n}", "title": "" }, { "docid": "c2a068af2452ba1ee84de3e801e7e320", "score": "0.5384195", "text": "update() {\n const top = this.top();\n const withSQL = this.with();\n const updates = this._prepUpdate(this.single.update);\n const join = this.join();\n const where = this.where();\n const order = this.order();\n const { returning } = this.single;\n return {\n sql:\n withSQL +\n `update ${top ? top + ' ' : ''}${this.tableName}` +\n ' set ' +\n updates.join(', ') +\n (returning ? ` ${this._returning('update', returning)}` : '') +\n (join ? ` from ${this.tableName} ${join}` : '') +\n (where ? ` ${where}` : '') +\n (order ? ` ${order}` : '') +\n (!returning ? this._returning('rowcount', '@@rowcount') : ''),\n returning: returning || '@@rowcount',\n };\n }", "title": "" }, { "docid": "b52b3983274263f7a708e9a3716d53e1", "score": "0.53833944", "text": "function updateStock() {\n let updateSql = connection.query(`UPDATE bamazon_DB.products SET stock_quantity = ${howManyOnHand[1]} WHERE (item_id = ${itemId[0]});`, (err, res) => {\n if (err) {\n throw err;\n }else{\n connection.end();\n }\n });\n\n}", "title": "" }, { "docid": "75d717aa3d72b369cf8cbdd4d20b9b5b", "score": "0.5380913", "text": "update () {\n let validData = this.collection.validateSingleData(this.data)\n if (validData.isValid) {\n return this.collection.updateOne({ _id: this.id }, {$set: this.data})\n } else {\n return mongoutils.asyncError(validData.error)\n }\n }", "title": "" }, { "docid": "63ebbc13d6cbdaa4093f3c8a134fc56d", "score": "0.5380619", "text": "function simplePutTest() {\n\n var result, params, saveData;\n\n deleteAllRecords(\"testobject\");\n checkRecordCount(\"testobject\", 0);\n\n // create records\n params = createParams(\"data_record_array\", createBatch(20));\n result = createRecords(\"testobject\", params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 20, \"Create 20 records (data_record_array)\", result);\n checkRecordCount(\"testobject\", 20);\n saveData = result.data;\n checkResult(saveData.record[0].updated === undefined && saveData.record[1].updated === undefined, \"Verify 'updated' field not present\", result);\n\n params = updateParamsByIds(\"testobject\", \"data_record_batch\", batchByIds(saveData, getIdArray(\"testobject\", [0,1])), [0,1]);\n params.put = true;\n result = updateRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 2, \"PUT 2 records (data_record_batch)\", result);\n\n params = getParamsByIds(\"testobject\", \"data_record_array\", [0]);\n result = getRecords(params);\n checkResult(result.error === null && result.data && result.data.record && result.data.record.length === 1, \"Get updated record\", result);\n checkResult(result.data.record[0].updated === 1 || result.data.record[0].updated === true, \"Verify 'updated' field\", result);\n checkResult(result.data.record[0].name === saveData.record[0].name, \"Verify 'name' field\", result);\n checkResult(result.data.record[0].curr === saveData.record[0].curr, \"Verify 'curr' field\", result);\n}", "title": "" }, { "docid": "b8d172418d6ea05b07431782aba65b27", "score": "0.5378354", "text": "async function updateListProducts(list) {\r\n for(var i=0;i< list.length;i++){\r\n await Product.findByIdAndUpdate(list[i].id,{\r\n $inc: { quantity_stock: -list[i].quantity,quantity_sold: list[i].quantity}\r\n });\r\n }\r\n return {message: 'OK'};\r\n}", "title": "" }, { "docid": "06650ee5f7129b910817f6b23463ad72", "score": "0.53782684", "text": "function updateDataInRedis(data) {\n for (let i = 0 ; i < data.length ; i++){\n console.log (\"data[\",i,\"] : \", data[i])\n let a = {\n \"heading\" : data[i][0],\n \"task\" : data[i][1],\n \"group\" : data[i][2],\n \"deadline\" : data[i][3],\n \"taskStatus\" : data[i][4]\n };\n client.hset('workManagementdata', String (data[i][0]), JSON.stringify(a), function(reply , err){\n if(err)\n console.log (\"Error : \" ,err)\n else\n console.log (\"Done for\" , i , \" : \", String(a));\n });\n }\n // Now update the workList too by fetching back from redis. \n fetchFromRedis();\n}", "title": "" }, { "docid": "e4b1ecc41f9695a9055119ecff6ab172", "score": "0.53750265", "text": "function update () {\n var rows = { };\n var parts;\n var date;\n var rowkey;\n\n //key has the structure ISO_DATE | Account\n for (var key in updated) {\n parts = key.split('|');\n date = smoment(parts[0]);\n rowkey = date.hbaseFormatStartRow() + '|' + parts[1];\n rows[rowkey] = self.data[date.format()][parts[1]];\n }\n\n return hbase.putRows({\n table: 'agg_account_payments',\n rows: rows\n });\n }", "title": "" }, { "docid": "8d6a8b0b9d0703997d5ce0915afe3d1c", "score": "0.5364076", "text": "static update(req, res) {\n const { status } = req.body\n return job.findById(req.params.jobId).then( job => {\n job.update({\n status: status\n })\n .then( updatedJob => {\n res.status(200).send({ \n message: 'Updated Successfully',\n })\n })\n .catch(error => {\n res.status(400).send(error)\n })\n .catch(error => {\n res.status(400).send(error)\n });\n })\n }", "title": "" }, { "docid": "3bb011ee434751b6b3462445b5ece333", "score": "0.5363434", "text": "updateEmployee(EmployeeID, Firstname, Surname, success) {\n connection.query(\n 'update Employees set Firstname=?, Surname=? where EmployeeID=?',\n [Firstname, Surname, EmployeeID],\n (error, results) => {\n if (error) return console.error(error);\n\n success();\n }\n );\n }", "title": "" }, { "docid": "b05533f328bbba9b7a4a046d8b9ba76a", "score": "0.53613734", "text": "updateTrain(id, data) {\n // console.log('updateTrain id:', id, data);\n\n if (this.trains[id] === undefined || this.trains[id] === null) {\n this.trains[id] = new Train(id);\n }\n\n for (let [key, value] of Object.entries(data)) {\n this.trains[id][key] = value;\n }\n\n this.trains[id]['updated'] = new Date().getTime();\n }", "title": "" }, { "docid": "02535929b8ba023491a76727fe0efcb6", "score": "0.5361069", "text": "onClickSave() {\n let put = (data) => {\n data.forEach(d => {\n let index = this.data2.findIndex(d2 => d2.id === d.id);\n\n if (index === -1) {\n throw(new Error('can not update non existent record'))\n }\n \n console.log('saved transaction update');\n this.data2[index] = d;\n });\n }\n let post = (data) => {\n data.forEach(d => {\n let index = this.data2.findIndex(d2 => d2.id === d.id);\n\n if (index !== -1) {\n throw(new Error('can not create new record with duplicate id'))\n }\n\n console.log('saved transaction add');\n this.data2.push(d);\n });\n }\n let del = (data) => {\n data.forEach(d => {\n let index = this.data2.findIndex(d2 => d2.id === d.id);\n\n if (index === -1) {\n return;\n }\n \n console.log('saved transaction delete');\n this.data2.splice([index], 1);\n });\n }\n\n this.transactor.saveLatestEdge(put, post, del).then(() => {\n this.transactor.clear();\n this.forceUpdate();\n })\n }", "title": "" }, { "docid": "062bffee95351c4f0b5037d811399504", "score": "0.53529346", "text": "function update(dt, gt) {\n entities.forEach(function (entity, index) {\n entity.update(dt, gt, entity, index);\n });\n}", "title": "" } ]
226ecd76c2bd90cbabcb086653ac1875
Mixin helper which handles policy validation and reserved specification keys when building React classses.
[ { "docid": "d5c67150b18cdf253e93452a106cfcc6", "score": "0.0", "text": "function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n return;\n }\n\n (\"production\" !== process.env.NODE_ENV ? invariant(\n typeof spec !== 'function',\n 'ReactClass: You\\'re attempting to ' +\n 'use a component class as a mixin. Instead, just use a regular object.'\n ) : invariant(typeof spec !== 'function'));\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !ReactElement.isValidElement(spec),\n 'ReactClass: You\\'re attempting to ' +\n 'use a component as a mixin. Instead, just use a regular object.'\n ) : invariant(!ReactElement.isValidElement(spec)));\n\n var proto = Constructor.prototype;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above\n continue;\n }\n\n var property = spec[name];\n validateMethodOverride(proto, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod =\n ReactClassInterface.hasOwnProperty(name);\n var isAlreadyDefined = proto.hasOwnProperty(name);\n var markedDontBind = property && property.__reactDontBind;\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n !markedDontBind;\n\n if (shouldAutoBind) {\n if (!proto.__reactAutoBindMap) {\n proto.__reactAutoBindMap = {};\n }\n proto.__reactAutoBindMap[name] = property;\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride\n (\"production\" !== process.env.NODE_ENV ? invariant(\n isReactClassMethod && (\n (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)\n ),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n ) : invariant(isReactClassMethod && (\n (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)\n )));\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === SpecPolicy.DEFINE_MANY) {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (\"production\" !== process.env.NODE_ENV) {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n}", "title": "" } ]
[ { "docid": "3e51d26e6a05177e7534060de7d82048", "score": "0.54113126", "text": "validateAttributes(objectInformation) {\n let fields = objectInformation.fields\n // Convert the fields to map of lower case with regular casing API name\n let fieldsMap = new Map(Object.keys(fields).map(i => [i.toLowerCase(), i])) \n // Validate if the API name is valid otherwise show and error\n if(this.keyFieldApiName && fieldsMap.has(this.keyFieldApiName.toLowerCase())) {\n // copy proper casing of API name\n this.keyFieldApiName = fieldsMap.get(this.keyFieldApiName.toLowerCase())\n } else {\n this.disabledInput = true\n this.showError(\"Invalid field api name is passed - \" + this.keyFieldApiName)\n }\n if(this.additionalField) {\n // validate the additional field in case its filled in\n if(fieldsMap.has(this.additionalField.toLowerCase())) {\n this.additionalField = fieldsMap.get(this.additionalField.toLowerCase())\n } else {\n this.disabledInput = true\n this.showError(\"Invalid field api name for additional field is passed - \" + this.additionalField)\n }\n }\n }", "title": "" }, { "docid": "e4603beb5a4f79cebd813aa5a8578ccd", "score": "0.5154016", "text": "validateClassName() {\n const schoolClassName = this.state.class_name.value.trim();\n\n if (schoolClassName.length === 0) {\n return { error: true, message: 'Class Name is Required' }\n } else if (schoolClassName.length < 3 || schoolClassName.length > 40) {\n return { error: true, message: 'Class Name must be between 3 and 40 characters' };\n }\n\n return { error: false, message: '' }\n }", "title": "" }, { "docid": "38c0141cae3bd0171f3058c43e767ffb", "score": "0.5118953", "text": "static getRules() {\n return {\n first_name: 'alpha|min:2|max:20',\n last_name: 'alpha|min:2|max:20',\n profession: 'in:developer,designer',\n skill_level: 'in:beginner,intermediate,advanced',\n description: 'string',\n\n dribbble_url: 'string|includes:http|includes:dribbble.com',\n github_url: 'string|includes:http|includes:github.com',\n linkedin_url: 'string|includes:http|includes:linkedin.com',\n portfolio_url: 'string|includes:http'\n }\n }", "title": "" }, { "docid": "2aa15598b329b34f4ac5585da4d4f14b", "score": "0.5112662", "text": "_validate() {\n\t}", "title": "" }, { "docid": "de09514a97c65ec3c5bb75608984832e", "score": "0.50658786", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n }", "title": "" }, { "docid": "7cd943cb272dfc7398e8fbe984689a38", "score": "0.5005257", "text": "function jsxWithValidationStatic(type, props, key) {\n\t return jsxWithValidation(type, props, key, true);\n\t}", "title": "" }, { "docid": "7cd943cb272dfc7398e8fbe984689a38", "score": "0.5005257", "text": "function jsxWithValidationStatic(type, props, key) {\n\t return jsxWithValidation(type, props, key, true);\n\t}", "title": "" }, { "docid": "4639d044d3f6286e871efe1f49c9e16e", "score": "0.49982813", "text": "validateKey(){\r\n\t\t// todo\r\n\t}", "title": "" }, { "docid": "3b27c4ddd10f62b01a69471bb8e567d4", "score": "0.4963574", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "title": "" }, { "docid": "3b27c4ddd10f62b01a69471bb8e567d4", "score": "0.4963574", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "title": "" }, { "docid": "3b27c4ddd10f62b01a69471bb8e567d4", "score": "0.4963574", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "title": "" }, { "docid": "3b27c4ddd10f62b01a69471bb8e567d4", "score": "0.4963574", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "title": "" }, { "docid": "3b27c4ddd10f62b01a69471bb8e567d4", "score": "0.4963574", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "title": "" }, { "docid": "3b27c4ddd10f62b01a69471bb8e567d4", "score": "0.4963574", "text": "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "title": "" }, { "docid": "3118784860e44dc76858076e240e9601", "score": "0.49196696", "text": "assembleFieldValidate(name, value) {\n const { classNames } = this.props;\n const { fields } = this.state;\n // No schema is not to validate\n const schema = schemas[name] && Object.assign(schemas[name], { value });\n const { result, error } = schema ? this.validator.validateByField(schema) : {};\n // Assembly class name\n // Validation success and validation failure Add the appropriate class\n const classNameArray = [\n classNames.static,\n result ? classNames.success : null,\n result === false ? classNames.error : null,\n ];\n // Assemble\n Object.assign(fields[name], {\n value,\n className: classNameArray.filter(item => item).join('\\u{20}'),\n result,\n message: error ? error.message : undefined,\n });\n }", "title": "" }, { "docid": "a1f0c60a3acf0db1630cbe46e9d10a38", "score": "0.4917975", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "5529330a6a1e9e20c9c7dd3ed890c788", "score": "0.49147072", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "5529330a6a1e9e20c9c7dd3ed890c788", "score": "0.49147072", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "5529330a6a1e9e20c9c7dd3ed890c788", "score": "0.49147072", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "5529330a6a1e9e20c9c7dd3ed890c788", "score": "0.49147072", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "5529330a6a1e9e20c9c7dd3ed890c788", "score": "0.49147072", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "a8876659b1e84c5ba6d6559d3711e02e", "score": "0.49104044", "text": "function ValidationUtilities() {\n}", "title": "" }, { "docid": "d2a084ed02bbbb193e0133cd183ceca0", "score": "0.48835632", "text": "validateAllKeyNames() {\n this.validateKeyName('authTokenKeyName')\n this.validateKeyName('gqlServerTokenKeyName', 'warn')\n this.validateKeyName('serverTokenKeyName', 'warn')\n }", "title": "" }, { "docid": "a90544be31bdddfe652c3954653d4ac2", "score": "0.4872382", "text": "constructor(props) { // The only expected props are the HystoriData\n super(props); // Some React thing idk idc\n this.spec = this.props.spec; // Set the properties for Hystori\n this.prefix = this.props.prefix;// CSS prefix\n // Build a state object. We're interested\n var ss = {};\n for (var i = 0; i < this.spec.length; i++)\n ss[this.spec[i].key] = this.spec[i].value || \"\";\n\n this.state = {\n fields: ss\n };\n\n this.handleChange = this.handleChange.bind(this);\n }", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "57f4a376324d9e1c421dc7d170a3ca48", "score": "0.48627192", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n}", "title": "" }, { "docid": "88c2f92fcde87297f8af670c010758d0", "score": "0.48554766", "text": "static init() {\n this.c = {\n ALPHANUMERIC: \" : must be alphanumeric.\",\n AFTER: \" was expected to be chronologically after \",\n AFTER_OR_EQUAL: \" was expected to be chronologically after or chronologically identical to \",\n ARRAY: \" : must be an array\",\n ARRAY_SIZE: \" array must be of length: \",\n ALPHA: \" must be an alpha value [A-Z][a-z]\",\n BOOLEAN: \" : must be of type boolean.\",\n BEFORE: \" was expected to be chronologically before\",\n BEFORE_OR_EQUAL:\" must be chronologically before or chronologically equal to \",\n BETWEEN: \" must be contained in the set \",\n CREDIT_CARD: \" must be a valid credit card.\",\n DATE: \" : must be a valid Javascript Date.\",\n DATE_EQUALS: \" was expected to be chronologically equal to \",\n DATE_FORMAT: \" was expected to be in a moment JS compatible date.\",\n DIFFERENT: \" was expected to be a different value from \",\n DIGITS:\" was expected to be numeric and of the length -> \",\n DISTINCT: \" must not contain any duplicates and must also be of type Array \",\n EMAIL: \" must be a valid email address \",\n FILLED: \" must be present in the request body\",\n INCLUDES: \" is missing one or more of the following value(s): \",\n INTEGER: \" must be of type Integer.\",\n IP: \" is must be a valid IPV4 or IPV6 address \",\n IPV4: \" must be a valid IPV4 address \",\n IPV6: \" must be a valid IPV6 address \",\n JSON: \" is must be a valid JSON \",\n MAX: \" : must not be greater than the specified value: \",\n MIN: \" The key exceeds the minimum length -> \",\n NULLABLE: \"\",\n NUMERIC: \" : must be numerical.\",\n NOT_IN: \" the specified value must NOT be in the set\",\n REQUIRED: \" : must not be undefined\",\n REGEX: \" does not match the given regular expression. \",\n SIZE: \" was expected to be of size: \",\n SAME: \" must match the value for the field: \",\n STRING: \" was expected to be of type String.\"\n }\n }", "title": "" }, { "docid": "e2949d4479e00915106ff46df42f70ff", "score": "0.48437372", "text": "function keyHandleDecorator(matcher) {\n return function (props) {\n var _a = props || {}, keyValue = _a.keyValue, keyCode = _a.keyCode, keyEventName = _a.keyEventName, keyMatches = _a.keyMatches;\n return function (Component) { return ((function (_super) {\n __extends(KeyHandleDecorator, _super);\n //the decorator needs to have the same property interface \n function KeyHandleDecorator() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = { keyValue: null, keyCode: null, modifiers: null };\n _this.handleKey = function (event, ids) {\n //console.log(\"HOC handleKey\");\n if (matcher && matcher(event, _this.state)) {\n _this.setState({ keyValue: null, keyCode: null });\n return;\n }\n var modifiers = KeyModifiersEnum.none;\n if (event.altKey) {\n modifiers |= KeyModifiersEnum.alt;\n }\n if (event.ctrlKey) {\n modifiers |= KeyModifiersEnum.ctrl;\n }\n if (event.shiftKey) {\n modifiers |= KeyModifiersEnum.shift;\n }\n var keyValue = utils_1.eventKey(event);\n var keyCode = event.keyCode;\n if (ids.length > 0) {\n ids.forEach(function (methodName) {\n _this.wrappedInstance[methodName](event, keyValue, keyCode, modifiers);\n });\n }\n else {\n _this.setState({ keyValue: keyValue, keyCode: keyCode, modifiers: modifiers });\n }\n };\n return _this;\n }\n KeyHandleDecorator.prototype.render = function () {\n var _this = this;\n function isKeyMatchesMethodName(toDetermine) {\n return toDetermine.methodName !== undefined;\n }\n var mappedKeyMatches = keyMatches;\n if (keyMatches) {\n if (keyMatches instanceof Array) {\n var testEntry = keyMatches[0];\n if (isKeyMatchesMethodName(testEntry)) {\n var keyMatchesMethodNameArray = keyMatches;\n var allModKeys = [];\n keyMatchesMethodNameArray.forEach(function (keyMatchesMethodName) {\n var methodName = keyMatchesMethodName.methodName;\n var kMatches = keyMatchesMethodName.keyMatches;\n var modKeys;\n if (kMatches instanceof Array) {\n var tEntry = kMatches[0];\n if (typeof tEntry === 'string') {\n var anyKeyModifiers = keyModifiersAny();\n modKeys = kMatches.map(function (kMatch) {\n var modKey = {\n key: kMatch,\n modifiers: anyKeyModifiers\n };\n return modKey;\n });\n }\n else {\n modKeys = kMatches;\n }\n }\n else {\n var modifiers = kMatches.modifiers;\n modKeys = kMatches.keys.map(function (key) {\n var modKey = {\n key: key,\n modifiers: modifiers\n };\n return modKey;\n });\n }\n modKeys.forEach(function (modKey) { return modKey.id = methodName; });\n allModKeys = allModKeys.concat(modKeys);\n });\n mappedKeyMatches = allModKeys;\n }\n }\n }\n return (React.createElement(\"div\", null,\n React.createElement(KeyHandler, { keyValue: keyValue, keyCode: keyCode, keyMatches: mappedKeyMatches, keyEventName: keyEventName, onKeyHandle: this.handleKey }),\n React.createElement(Component, __assign({ ref: function (instance) { _this.wrappedInstance = instance; } }, this.props, this.state))));\n };\n return KeyHandleDecorator;\n }(React.Component))); };\n };\n}", "title": "" }, { "docid": "14e2d84fc192321467cfe12541706172", "score": "0.4819673", "text": "constructor(parent, name, properties) {\n super(parent, name, { type: KeyResource.resourceTypeName, properties });\n cdk.requireProperty(properties, 'keyPolicy', this);\n this.keyArn = this.getAtt('Arn').toString();\n this.keyId = this.ref.toString();\n this.addWarning('DEPRECATION: \"cloudformation.KeyResource\" will be deprecated in a future release in favor of \"CfnKey\" (see https://github.com/awslabs/aws-cdk/issues/878)');\n }", "title": "" }, { "docid": "e11e1b4e7bb4bc37f82c886f820511d2", "score": "0.48110127", "text": "function StoredComponentPrice(){} // skipping class derivation boiler plate", "title": "" }, { "docid": "218990c885fee6efc2509fc64e546240", "score": "0.47808775", "text": "isFieldValid() {\n if (this.props.mainEntity.entityName === 'category' && this.props.name === 'name') {\n return this.customValidationForCategory();\n }\n return super.isFieldValid();\n }", "title": "" }, { "docid": "798fbb14d1fcc76d6e02c334563fe79f", "score": "0.47774395", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "798fbb14d1fcc76d6e02c334563fe79f", "score": "0.47774395", "text": "function jsxWithValidationStatic(type, props, key) {\n return jsxWithValidation(type, props, key, true);\n }", "title": "" }, { "docid": "73727a4d83d0e43778d50932efdcb776", "score": "0.47762427", "text": "allowedAttrs(attrs) {\n let result = {};\n Object.keys(attrs).forEach(attrName => {\n if (!['class', 'style'].includes(attrName)) {\n result[attrName] = attrs[attrName];\n }\n });\n return result;\n }", "title": "" }, { "docid": "c92659d4b92ecb832afc3329130eb6a6", "score": "0.47627372", "text": "schemaValidation() {\n return {\n nameSchema: check('name')\n .notEmpty()\n .isLength({ min: 2, max: 15 })\n .withMessage('name must be between 4 to 15 chars'),\n };\n }", "title": "" }, { "docid": "cdff1d02ed24c866ea3aa9d4c0433571", "score": "0.47605637", "text": "constructor() {\n super();\n\n this.description = '';\n this.validators = {\n description: {\n isRequired\n }\n };\n }", "title": "" }, { "docid": "ee0963b4a7f83558098f756195df92f6", "score": "0.47296664", "text": "setClasses(){\n let layout = this.props.layout ? this.props.layout : 'full';\n return [\n 'component-form__field',\n `component-form__field--${layout}-width`\n ]\n }", "title": "" }, { "docid": "ba6a6f3d6dcb80936a0d8d8e277d9755", "score": "0.47291502", "text": "static ratify(req, resp, next) {\n let e;\n if (req.class[req.url]) {\n const { error } = SchemaValidator.apply(req.body, req.class[req.url]);\n e = error;\n } else {\n e = new Error('Could not find the key to validate schema');\n }\n if (e) { resp.json(response.response(constants.responseFlags.PARAMETER_MISSING, constants.responseMessages.PARAMETER_MISSING, e.message.replace(/[\"]/ig, ''))); }\n }", "title": "" }, { "docid": "ee2f303a4cad485fca070af7e9188697", "score": "0.47254506", "text": "preValidate() {\n }", "title": "" }, { "docid": "2a9ee6cece0fd11e6041cee8a726c785", "score": "0.47223035", "text": "function validateOwnProdActInputs(productKey) {\n\n if (validateEmptyField(productKey, \"Please enter Product Key!\") == false ||\n validateLengthExact8(productKey, \"Product Key should be 8 characters length!\") == false ||\n validateAlphaNum(productKey, \"Accept only alpha or numeric characters without space character!\") == false) {\n document.getElementById(\"productKey\").focus();\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "e6d8851c95eae6b22aeaeb4c3f95aea4", "score": "0.4714659", "text": "function customValidation(input) {}", "title": "" }, { "docid": "e6d8851c95eae6b22aeaeb4c3f95aea4", "score": "0.4714659", "text": "function customValidation(input) {}", "title": "" }, { "docid": "2f8d6ab41da0741edbedd9851a933e7a", "score": "0.47106686", "text": "checkFormDescriptionKeys(formItemValues, formItemName) {\n\n if (this.containsOnlyValidKeys(formItemValues)) {\n\n let invalidKeys = this.getInvalidKeys(formItemValues);\n\n _.forIn(invalidKeys, (val, key) => {\n throw new Error(\"Unrecognized attribute: \" + key + \", in form description: \" + formItemName + \". Use otherState for non-standard state values.\");\n });\n\n }\n }", "title": "" }, { "docid": "79b115c7ad55eef287b2afdedac2b5ce", "score": "0.4682634", "text": "permittedParams() {\n return checkSchema({\n title: {\n isEmpty: false,\n errorMessage: 'Please enter content title',\n trim: true\n },\n alias: {\n optional: true,\n trim: true\n },\n description: {\n isEmpty: false,\n errorMessage: 'Please enter content description',\n trim: true\n },\n shortDescription: {\n isEmpty: false,\n errorMessage: 'Please enter content short description',\n trim: true\n },\n published: {\n toBoolean: true\n },\n contentCategoryId: {\n isEmpty: false,\n errorMessage: 'Please choose content category',\n toInt: true\n },\n thumbnailPath: {\n optional: { options: { nullable: true } }\n }\n })\n }", "title": "" }, { "docid": "f5b3cb938a66c5eb6d08aa63b08592bd", "score": "0.46786028", "text": "static create() {\n const meta = {};\n const mim = {\n str: (name, mandatory, depends) => newProp(name, 'string', mandatory, depends),\n bool: (name, mandatory, depends) => newProp(name, 'boolean', mandatory, depends),\n number: (name, mandatory, depends) => newProp(name, 'number', mandatory, depends),\n validator: () => {\n return createValidator(meta);\n }\n };\n\n function newProp(name, type, mandatory = false, depends = []) {\n meta[name] = { type, mandatory, depends };\n return mim;\n }\n return mim;\n }", "title": "" }, { "docid": "eb65b6a4ef0ea7d82ea9ac5fdf25d04f", "score": "0.46711475", "text": "get _validator() {\n return IronValidatableBehaviorMeta && IronValidatableBehaviorMeta.byKey(this.validator);\n }", "title": "" }, { "docid": "388b32b76071b9e3816c8a582d68213d", "score": "0.46566942", "text": "get rules() {\r\n return {\r\n 'name': ['require'],\r\n 'age': ['int']\r\n }\r\n }", "title": "" }, { "docid": "f380223c2a57c7a8b6786c35f8966137", "score": "0.46534804", "text": "function KtValidator() {\n}", "title": "" }, { "docid": "da42e7d4a053d80969aba285978f8fdc", "score": "0.4652215", "text": "constructor(pmAttributes) { \n super(pmAttributes) // similar to Object.create\n this.gradClassName = pmAttributes.gradClassName;\n this.favInstructor = pmAttributes.favInstructor;\n}", "title": "" }, { "docid": "65c6c96ded7bfa4e957a54d88c3a4f88", "score": "0.46455383", "text": "constructor() {\n // all origin properties of String.prototype are blacklist\n this.stringPrototypeBlacklist = Reflect.ownKeys(String.prototype);\n this.stringPrototypeWhitelist = [\"bold\",\"italics\"];\n this.dirtyMode = false;\n this.props = [];\n\t}", "title": "" }, { "docid": "93532de6b7e22a8f57860bc05403b7b2", "score": "0.4644925", "text": "checkRequirements(value) {\n var validData = {\n minChars: (value!=='') ? value.length >= parseInt(this.state.requiredLength): false,\n mixLetters: (value!=='') ? this.countCapitals(value) >= parseInt(this.state.requiredCapitals) && this.countLower(value) >= parseInt(this.state.requiredLower): false,\n numbers: (value!=='') ? this.countNumbers(value) >= parseInt(this.state.requiredNumbers) : false,\n symbols: (value!=='') ? this.countSymbols(value) >= parseInt(this.state.requiredSymbols) : false\n }\n var allValid = (validData.minChars && validData.mixLetters && validData.numbers && validData.symbols);\n\n this.setState({\n specificRequirements: validData,\n valid: allValid,\n errorMessage: (value !== '') ? this.props.errorMessage : this.props.emptyMessage\n });\n\n if(!allValid && !this.state.checkerVisible){\n this.setState({\n errorVisible: true\n });\n }\n }", "title": "" }, { "docid": "407a78dc0565177d701de089e39e6db3", "score": "0.46336102", "text": "constructor(instructorAttributes) { \n super(instructorAttributes) // similar to Object.create\n this.speciality = instructorAttributes.speciality;\n this.favLanguage = instructorAttributes.favLanguage;\n this.catchPhrase = instructorAttributes.catchPhrase;\n }", "title": "" }, { "docid": "2730e7b26123c49f245bed2bd82c474c", "score": "0.46189848", "text": "function customValidation(input) {\n\n}", "title": "" }, { "docid": "ed244523410401cb55b7f3825b04e345", "score": "0.46177104", "text": "FieldValidation(key, value) {\n switch (key) {\n case 'firstName':\n if (value.length > 15) {\n return 'error';\n }\n break;\n case 'lastName':\n if (value.length > 15) {\n return 'error';\n }\n break;\n case 'email':\n if (!value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)) {\n return 'error';\n }\n break;\n case 'pec':\n if (value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)) {\n return 'error';\n }\n break;\n case 'role':\n if (value.length > 15) {\n return 'error';\n }\n case 'Passwd':\n if (value.length > 15) {\n return 'error';\n }\n break;\n case 'password2':\n if (!value.match(this.state.Passwd)) {\n return 'error';\n } else {\n return true;\n }\n break;\n case 'phoneNumber':\n if (value.length > 10) {\n return 'error';\n }\n break;\n case 'telAz':\n if (value.length > 10) {\n return 'error';\n }\n break;\n case 'nomeAzienda':\n if (value.length > 50) {\n return 'error';\n }\n break;\n case 'subCategoria':\n if (value.length > 30) {\n return 'error';\n }\n break;\n case 'piva':\n if (value.length > 11) {\n return 'error';\n }\n break;\n case 'ateco':\n if (value.length > 8) {\n return 'error';\n }\n break;\n case 'provCCIAA':\n if (value.length > 2) {\n return 'error';\n }\n break;\n case 'numREA':\n if (value.length > 6) {\n return 'error';\n }\n break;\n case 'sedeLegInd':\n if (value.length > 30) {\n return 'error';\n }\n break;\n case 'sedeLegNum':\n if (value.length > 3) {\n return 'error';\n }\n break;\n case 'capLeg':\n if (value.length > 5) {\n return 'error';\n }\n break;\n case 'sedeLegFax':\n if (value.length > 10) {\n return 'error';\n }\n break;\n case 'sedeAmmInd':\n if (value.length > 30) {\n return 'error';\n }\n break;\n case 'sedeAmmNum':\n if (value.length > 3) {\n return 'error';\n }\n break;\n case 'capAmm':\n if (value.length > 5) {\n return 'error';\n }\n break;\n case 'sedeAmmFax':\n if (value.length > 10) {\n return 'error';\n }\n break;\n }\n }", "title": "" }, { "docid": "6314c7003b5307f5b0453597f3a1e725", "score": "0.4613406", "text": "constructor(studentAttributes) { \n super(studentAttributes) // similar to Object.create\n this.previousBackground = studentAttributes.previousBackground;\n this.className = studentAttributes.className;\n this.favSubjects = studentAttributes.favSubjects;\n}", "title": "" }, { "docid": "3b86fc245cf70732d3ffee20cc77564f", "score": "0.45938113", "text": "function handleCssHtmlRestriction() {\n\n // use $.fn.one here to fire the event only once.\n $(':required').one('blur keydown', function () {\n $(this).addClass('touched');\n });\n}", "title": "" }, { "docid": "60bd62f893c145cff929d901fd74dbb9", "score": "0.45882872", "text": "validate() {\n if (!this._id) {\n throw new Error('Missing id');\n }\n\n if (!this._label) {\n throw new Error('Missing label');\n }\n\n if (!this._action) {\n throw new Error('Missing action');\n }\n\n if (this._boundary === undefined) {\n throw new Error('Missing boundary');\n }\n\n if (this._boundary) {\n switch (this._action) {\n case 'create':\n if (this._repo === undefined ||\n this._origRepo !== undefined ||\n this._props !== undefined ||\n this._origProps !== undefined) {\n throw new Error('only repo ' +\n 'must be set on create boundary');\n }\n break;\n case 'update':\n if (this._repo === undefined ||\n (this._origRepo !== undefined && this._origProps !== undefined) ||\n (this._origRepo === undefined && this._origProps === undefined) ||\n this._props !== undefined) {\n throw new Error('repo and one of origRepo or origProps ' +\n 'must be set on update boundary');\n }\n break;\n case 'delete':\n if (this._repo !== undefined ||\n this._origRepo === undefined ||\n this._props !== undefined ||\n this._origProps !== undefined) {\n throw new Error('only origRepo ' +\n 'must be set on delete boundary');\n }\n break;\n case 'reference':\n if (this._repo === undefined ||\n this._origRepo !== undefined ||\n this._props !== undefined ||\n this._origProps !== undefined) {\n throw new Error('only repo ' +\n 'must be set on create reference');\n }\n break;\n default:\n throw new Error('Invalid Action');\n }\n } else {\n switch (this._action) {\n case 'create':\n if (this._repo !== undefined ||\n this._origRepo !== undefined ||\n this._props === undefined ||\n this._origProps !== undefined) {\n throw new Error('only props ' +\n 'must be set on create');\n }\n break;\n case 'update':\n if (this._repo !== undefined ||\n (this._origRepo !== undefined && this._origProps !== undefined) ||\n (this._origRepo === undefined && this._origProps === undefined) ||\n this._props === undefined) {\n throw new Error('props and one of origRepo or origProps ' +\n 'must be set on update');\n }\n break;\n case 'delete':\n if (this._repo !== undefined ||\n this._origRepo !== undefined ||\n this._props !== undefined ||\n this._origProps === undefined) {\n throw new Error('only origProps ' +\n 'must be set on delete');\n }\n break;\n case 'reference':\n throw new Error('reference is only allowed for boundaries');\n default:\n throw new Error('Invalid Action');\n }\n }\n }", "title": "" }, { "docid": "f896cf98db6a01be56e76403baa881f6", "score": "0.45879877", "text": "postProcessgetHaxJSONSchema(schema){let href=\"\",slot=\"Edit\";// if we have values populate them\nif(typeof this.tokenData!==typeof void 0){href=this.tokenData.editEndpoint;slot=this.tokenData.editText;for(var i in this.tokenData.schema){schema.properties[i]=this.tokenData.schema[i]}}schema.properties.__editThis={type:\"string\",component:{name:\"a\",properties:{id:\"cmstokenidtolockonto\",href:href,target:\"_blank\"},slot:slot}};return schema}", "title": "" }, { "docid": "edbfdad7751f44c510fa525b61a0be5c", "score": "0.4585675", "text": "checkInputCheckboxRequired(propertyKeyCapitalized, propertyValue, formInputName, formInputValue) {\n\n }", "title": "" }, { "docid": "e050b18080970c3373f1f0b3627469f1", "score": "0.45843282", "text": "getComponentClassSet() {\n return cx({\n 'checkbox-drop-list': true,\n 'checkbox-drop-list--with-error': this.isFieldInvalid()\n }, this.props.className);\n }", "title": "" }, { "docid": "9aaace3fa142000d6e74565ffc85bad2", "score": "0.45769912", "text": "validate() {\n\n /* eslint complexity: 0 */\n Object.keys(this._schema).forEach(key => {\n const value = this[key];\n\n // TODO: This should probably be in Document, not BaseDocument\n if (value !== null && value !== undefined) {\n if (isEmbeddedDocument(value)) {\n value.validate();\n return;\n } else if (isArray(value) && value.length > 0 && isEmbeddedDocument(value[0])) {\n value.forEach(v => {\n if (v.validate) {\n v.validate();\n }\n });\n return;\n }\n }\n\n if (!isValidType(value, this._schema[key].type)) {\n // TODO: Formatting should probably be done somewhere else\n let typeName = null;\n let valueName = null;\n\n if (Array.isArray(this._schema[key].type) && this._schema[key].type.length > 0) {\n typeName = `[${this._schema[key].type[0].name}]`;\n } else if (Array.isArray(this._schema[key].type) && this._schema[key].type.length === 0) {\n typeName = '[]';\n } else {\n typeName = this._schema[key].type.name;\n }\n\n if (Array.isArray(value)) {\n // TODO: Not descriptive enough! Strings can look like numbers\n valueName = `[${value.toString()}]`;\n } else {\n valueName = typeof value;\n }\n\n throw new ValidationError(`Value assigned to ${this.collectionName()}.${key}\n should be ${typeName}, got ${valueName}`);\n }\n\n if (this._schema[key].required && isEmptyValue(value)) {\n throw new ValidationError(`Key ${this.collectionName()}.${key} is required, but got ${value}`);\n }\n\n if (this._schema[key].match && isString(value) && !this._schema[key].match.test(value)) {\n throw new ValidationError(`Value assigned to ${this.collectionName()}.${key} does not match the \n regex/string ${this._schema[key].match.toString()}. Value was ${value}`);\n }\n\n if (!isInChoices(this._schema[key].choices, value)) {\n throw new ValidationError(`Value assigned to ${this.collectionName()}.${key} should be \n in choices [${this._schema[key].choices.join(', ')}], got ${value}`);\n }\n\n if (isNumber(this._schema[key].min) && value < this._schema[key].min) {\n throw new ValidationError(`Value assigned to ${this.collectionName()}.${key} is less \n than min, ${this._schema[key].min}, got ${value}`);\n }\n\n if (isNumber(this._schema[key].max) && value > this._schema[key].max) {\n throw new ValidationError(`Value assigned to ${this.collectionName()}.${key} is less \n than max, ${this._schema[key].max}, got ${value}`);\n }\n\n if (typeof this._schema[key].validate === 'function' && !this._schema[key].validate(value)) {\n throw new ValidationError(`Value assigned to ${this.collectionName()}.${key} failed custom validator. \n Value was ${value}`);\n }\n });\n }", "title": "" }, { "docid": "aa3e3abe7caa9abecd281bf6dfe22f75", "score": "0.45721036", "text": "validateInput(req, res, next) {\n return new Error('Any subclass needs to implement this method');\n }", "title": "" }, { "docid": "91d113cbb83ba82bd8c31d6d40574492", "score": "0.45709667", "text": "constructor(formSelector, inputSelector, userCode){\n //confirms the selector that this validator is using for output\n console.log('validator has been constructed! for:', formSelector, inputSelector, userCode);\n\n // store a refrence to our DOM element as this.$form\n //this.$form becomes a classwide variable when attached to *this*\n //so we can use it elsewhere inside THIS class (class validator) / instance \n \n this.$form = document.querySelector(formSelector);\n this.$input = document.querySelector(inputSelector);\n this.userCode = 'puppies';\n this.setupListeners();\n\n if (userCode !=undefined){\n this.userCode = userCode.secretCode;\n } \n }", "title": "" }, { "docid": "536d95e6e2e0b7ccc0e703b30f339696", "score": "0.45698404", "text": "figureValidator() {\n return (req, res, next) => {\n if (req.body.name != null && \n (validator.isEmpty(req.body.name) || \n !validator.isAlphanumeric(String(req.body.name).replace(/\\s+/g, '')))) {\n return res.status(400).json({message: \"Invalid arguments\"})\n }\n next()\n }\n }", "title": "" }, { "docid": "3268989150206c28324652247a6805bf", "score": "0.4569587", "text": "handleAttributeExpressions(element,name,strings,options){const prefix=name[0];if(\".\"===prefix){const comitter=new PropertyCommitter(element,name.slice(1),strings);return comitter.parts}if(\"@\"===prefix){return[new EventPart(element,name.slice(1),options.eventContext)]}if(\"?\"===prefix){return[new BooleanAttributePart(element,name.slice(1),strings)]}const comitter=new AttributeCommitter(element,name,strings);return comitter.parts}", "title": "" }, { "docid": "e8153e5dbceafced708566528f3c42f2", "score": "0.45673677", "text": "getInputProps() {\n // TODO Merge with 'attributes' from formfield schema\n return {\n // The extraClass property is defined on both the holder and element\n // for legacy reasons (same behaviour as PHP rendering)\n className: ['form-control', this.props.extraClass].join(' '),\n id: this.props.id,\n name: this.props.name,\n onChange: this.handleChange,\n type: 'text',\n value: this.props.value,\n };\n }", "title": "" }, { "docid": "006927cd230cedacb76c1c538103ca9b", "score": "0.4557309", "text": "create(_nextPolicy, _options) {\n throw new Error(\"Method should be implemented in children classes.\");\n }", "title": "" }, { "docid": "3481ad50f4130613de9fee3253103a8c", "score": "0.45566005", "text": "function validateAttributeValue(className,value,updateFn){var origValue=value;if(!needsInterpolation(value)){switch(className.replace(SUFFIXES,\"\")){case'layout':if(!findIn(value,LAYOUT_OPTIONS)){value=LAYOUT_OPTIONS[0];// 'row';\n\t}break;case'flex':if(!findIn(value,FLEX_OPTIONS)){if(isNaN(value)){value='';}}break;case'flex-offset':case'flex-order':if(!value||isNaN(+value)){value='0';}break;case'layout-align':var axis=extractAlignAxis(value);value=$mdUtil.supplant(\"{main}-{cross}\",axis);break;case'layout-padding':case'layout-margin':case'layout-fill':case'layout-wrap':case'layout-nowrap':case'layout-nowrap':value='';break;}if(value!=origValue){(updateFn||angular.noop)(value);}}return value;}", "title": "" }, { "docid": "6064d122961d3a0a0f5f273ebc9f840a", "score": "0.454176", "text": "function RequiredValidator() {\n}", "title": "" }, { "docid": "96c5a98fcc41f7942b930a45e965dbbf", "score": "0.453848", "text": "function KeyHandleDecorator() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = { keyValue: null, keyCode: null, modifiers: null };\n _this.handleKey = function (event, ids) {\n //console.log(\"HOC handleKey\");\n if (matcher && matcher(event, _this.state)) {\n _this.setState({ keyValue: null, keyCode: null });\n return;\n }\n var modifiers = KeyModifiersEnum.none;\n if (event.altKey) {\n modifiers |= KeyModifiersEnum.alt;\n }\n if (event.ctrlKey) {\n modifiers |= KeyModifiersEnum.ctrl;\n }\n if (event.shiftKey) {\n modifiers |= KeyModifiersEnum.shift;\n }\n var keyValue = utils_1.eventKey(event);\n var keyCode = event.keyCode;\n if (ids.length > 0) {\n ids.forEach(function (methodName) {\n _this.wrappedInstance[methodName](event, keyValue, keyCode, modifiers);\n });\n }\n else {\n _this.setState({ keyValue: keyValue, keyCode: keyCode, modifiers: modifiers });\n }\n };\n return _this;\n }", "title": "" }, { "docid": "ae8032a7fa2d5f7e0b1c45ff60f0eae4", "score": "0.4532288", "text": "constructor(formSelector, inputSelector, userCode){\n //confirms the selector that this validator is using for output\n console.log('validator has been constructed! for:', formSelector, inputSelector);\n\n // store a refrence to our DOM element as this.$form\n //this.$form becomes a classwide variable when attached to *this*\n //so we can use it elsewhere inside THIS class (class validator) / instance \n \n \n \n this.$form= document.querySelector(formSelector);\n this.$input = document.querySelector(inputSelector);\n this.userCode = 'puppies';\n this.backgroundColor = 'orange';\n this.setupListeners();\n \n if (userCode != undefined){\n this.userCode = userCode.secretCode;\n this.backgroundColor = userCode.backgroundColor;\n }\n\n }", "title": "" }, { "docid": "d5c0cd30a6b33a45bd27f08a510369e1", "score": "0.4530396", "text": "function TrValidator()\n{\n // for debugging\n this._class = \"TrValidator\";\n}", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.45303318", "text": "get required() { return this._required; }", "title": "" }, { "docid": "518de37b83e13c0fb5fcd670224de684", "score": "0.45230302", "text": "constructor(scope, id, props) {\n super(scope, id, { type: CfnResiliencyPolicy.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_resiliencehub_CfnResiliencyPolicyProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnResiliencyPolicy);\n }\n throw error;\n }\n cdk.requireProperty(props, 'policy', this);\n cdk.requireProperty(props, 'policyName', this);\n cdk.requireProperty(props, 'tier', this);\n this.attrPolicyArn = cdk.Token.asString(this.getAtt('PolicyArn', cdk.ResolutionTypeHint.STRING));\n this.policy = props.policy;\n this.policyName = props.policyName;\n this.tier = props.tier;\n this.dataLocationConstraint = props.dataLocationConstraint;\n this.policyDescription = props.policyDescription;\n this.tags = new cdk.TagManager(cdk.TagType.MAP, \"AWS::ResilienceHub::ResiliencyPolicy\", props.tags, { tagPropertyName: 'tags' });\n }", "title": "" }, { "docid": "d104eeff161daf3d52b191348980594a", "score": "0.4517844", "text": "static create(spec) {\n let {message, ...rules} = spec;\n\n let vcFuncWrapper = function(func, arg, message, value) {\n if(func(value, arg)) {\n return {pass: true, message: null}\n }\n else {\n return {pass: false, message: _.template(message)({arg})}\n }\n }\n\n let validationChain = _.map(rules, (argument, validatorName) => {\n let vcFunc = _.get(this.validationFunctions, validatorName);\n let vcMessage = _.get(this.validationMessages, validatorName, this.validationMessages._default);\n return _.partial(vcFuncWrapper, vcFunc, argument, vcMessage);\n });\n\n\n return function(value) {\n return _.reduce(validationChain, (result, vcFunc) => {\n let {pass, message} = vcFunc(value);\n let fail = !pass;\n\n if(message) {\n result.errors.push(message);\n }\n\n if(fail && result.status === 'passed') {\n result.status = 'failed';\n }\n return result;\n }, {status: 'passed', errors: []});\n }\n }", "title": "" }, { "docid": "e30e69e36156db9d48fc738ff4818749", "score": "0.45156693", "text": "getAllowedAttributes () {\n\t\treturn {\n\t\t\tstring: ['title', 'text'],\n\t\t\t'array(object)': ['stackTraces']\n\t\t};\n\t}", "title": "" }, { "docid": "8cb014845a45e86168ea655390a08ac3", "score": "0.45140222", "text": "function processCommon(attrs, opts) {\n const options = opts;\n let path;\n let id;\n let value;\n let valueEscaped;\n let isDisabled = false;\n let isInvalid = false;\n\n // process classes for the component helper\n processClass.call(this, attrs, options);\n Object.keys(options.hash).forEach((key) => {\n value = options.hash[key];\n valueEscaped = escapeExpression(value);\n\n switch (key) {\n case 'path':\n path = valueEscaped;\n break;\n\n case 'id':\n id = valueEscaped;\n\n delete options.hash.id;\n break;\n\n case 'disabled':\n isDisabled = valueEscaped;\n\n delete options.hash.disabled;\n break;\n\n case 'invalid':\n isInvalid = valueEscaped;\n\n delete options.hash.invalid;\n break;\n\n case 'name':\n delete options.hash.name;\n break;\n default:\n break;\n }\n });\n\n if (!path || !path.trim()) {\n throw new Error(\"Required attribue 'path' is missing.\");\n }\n\n // process id and name\n attrs.push(`id=\"${id || CommonUtils.getIdFromPath(path)}\"`);\n\n attrs.push(`name=\"${path}\"`);\n\n if (isDisabled === true || isDisabled === 'true') {\n attrs.push('disabled=\"disabled\"');\n attrs.push('aria-disabled=\"true\"');\n }\n\n if (isInvalid === true || isInvalid === 'true') {\n attrs.push('aria-invalid=\"true\"');\n }\n}", "title": "" }, { "docid": "ed5a2558b8f28b070e25d1b0b8344fcd", "score": "0.45037535", "text": "function validate_MandatoryFields(){\r\n\r\n}", "title": "" }, { "docid": "a19a800f3802bdee5fda81352e7d2e89", "score": "0.45002407", "text": "constructor(spec) {\r\n super();\r\n\r\n // should basically be whatever size is specified, with color, and border properties.\r\n // Will have some specific rendering code, default used is SVG rendering.\r\n\r\n // Need good server and client side control over DOM properties and integration with the control's properties.\r\n\r\n // Worth having some HTML examples using DIVs that get sized and shaped?\r\n // May experiment more with mixin properties and functions, though they would be mixed into objects within a class heirachy.\r\n\r\n // Resizable (handles)\r\n // Color palette, that allows the color to be selected\r\n // Properties viewer that allows changes to be made.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "7177fdaa0ebac81c6c482662ac60a0ab", "score": "0.4498998", "text": "function CardFormShared() {\n var FormController = new FormControllerBase();\n\n ta.extend(FormController, {\n VALID_CARD_TYPES: [\"Visa\", \"MasterCard\", \"AmericanExpress\", \"Discover\"]\n , expirationMonth: function() { return ta.getElemVal(FormController.FIELD_CARD_EXPIRY_MONTH); }\n\n , ccnameValidation: (function() {\n var ACTIVE_VALIDATION = [\"Min1\"]\n , VALIDATION_MAP = {\n \"Min1\" : {\n \"regex\" : /^[^\\s].*$/,\n \"errorMsgKey\" : \"cde_pf_error_no_ccname\"\n },\n \"FirstAndLast\" : {\n \"regex\" : /^[^\\s]+\\s[^\\s]+$/,\n \"errorMsgKey\" : \"cde_pf_error_first_and_last\"\n },\n \"OnlyLettersOrWhitespace\" : {\n \"regex\" : /^[a-zA-Z]+[\\sa-zA-Z]*$/,\n \"errorMsgKey\" : \"cde_pf_error_english_characters_only\",\n \"disclaimerMsgKey\" : \"cde_pf_error_english_characters_only\"\n }\n }\n , ALLOW_DISCLAIMERS = false\n , _setValidation = function(validationTypes) {\n var NEW_VALIDATION = [];\n var hasDisclaimer = false;\n for(var i = 0; i < validationTypes.length; i++) {\n var validationType = validationTypes[i];\n var mapEntry = VALIDATION_MAP[validationType];\n var cardholderDisclaimerElmt = ta.elem(\"cardholderNameDisclaimer\");\n var cardholderDisclaimerMessageElmt = ta.elem(\"cardholderNameDisclaimerMessage\");\n\n if(mapEntry) {\n NEW_VALIDATION.push(validationType);\n\n if(ALLOW_DISCLAIMERS && cardholderDisclaimerMessageElmt && mapEntry.disclaimerMsgKey) {\n var disclaimerMessage = ta.langs.localize(mapEntry.disclaimerMsgKey);\n\n if(disclaimerMessage) {\n cardholderDisclaimerMessageElmt.innerHTML = disclaimerMessage;\n hasDisclaimer = true;\n }\n }\n } else {\n ta.log(\"Unexpected cardholder name validationType received: \" + validationType);\n }\n }\n\n //If there is atleast one valid validation, set it as active validation\n if(NEW_VALIDATION.length) {\n ACTIVE_VALIDATION = NEW_VALIDATION;\n\n hasDisclaimer && cardholderDisclaimerElmt ?\n ta.removeElemClass('cardholderNameDisclaimer', 'hidden') :\n ta.addElemClass('cardholderNameDisclaimer', 'hidden');\n }\n }\n , _validate = function() {\n var ccname = FormController.ccname();\n if (ccname != null) {\n for(var i = 0; i < ACTIVE_VALIDATION.length; i++) {\n var validation = VALIDATION_MAP[ACTIVE_VALIDATION[i]];\n var result = validation.regex.test(ccname);\n if (result) {\n result = !ta.cards.passesLuhn(ccname);\n }\n\n if(!result) {\n var cardholderErrorElmt = ta.elem(\"cardholderNameError\");\n if (cardholderErrorElmt) {\n cardholderErrorElmt.innerHTML = ta.langs.localize(validation.errorMsgKey);\n }\n return result;\n }\n }\n }\n\n return true;\n }\n , _allowDisclaimers = function() {\n ALLOW_DISCLAIMERS = true;\n }\n ;\n return {\n validate: _validate,\n setValidation: _setValidation,\n allowDisclaimers: _allowDisclaimers\n };\n })()\n , _validateCvv: function() {\n var cardType = FormController.definiteCardType();\n if (cardType) {\n var cvvRange = \"{\" + cardType.cvvLength[0] + \",\" + cardType.cvvLength[1] + \"}\";\n }\n else {\n cvvRange = \"{3,4}\";\n }\n var validCvvRegex = new RegExp(\"^\\\\d\"+cvvRange+\"$\");\n return validCvvRegex.test(FormController.cvv());\n }\n , _validateExpiryMonth: function() {\n var currentYear = FormController.CURRENT_DATE.getFullYear(),\n expiryYear = parseInt(FormController.expirationYear());\n if (expiryYear === currentYear) {\n var currentMonth = FormController.CURRENT_DATE.getMonth() + 1, //Month starts at 0\n expiryMonth = parseInt(FormController.expirationMonth());\n if (expiryMonth < currentMonth) {\n return false;\n }\n }\n return /^(0[1-9])|(1[0-2])$/.test(ta.getElemVal(FormController.FIELD_CARD_EXPIRY_MONTH));\n }\n , _validateExpiryYear: function() {\n var currentYear = FormController.CURRENT_DATE.getFullYear(),\n expiryYear = parseInt(FormController.expirationYear());\n\n return expiryYear >= currentYear && expiryYear <= (currentYear + FormController._MAX_NUMBER_OF_YEARS_THE_CARD_IS_VALID);\n }\n , _validateExpiryMonthDeadline: function() {\n const currentYear = parseInt(FormController.EXPIRY_DATE_DEADLINE_YEAR);\n const currentMonth = parseInt(FormController.EXPIRY_DATE_DEADLINE_MONTH);\n const expiryYear = parseInt(FormController.expirationYear());\n if (expiryYear === currentYear) {\n const expiryMonth = parseInt(FormController.expirationMonth());\n if (expiryMonth < currentMonth) {\n return false;\n }\n }\n return /^(0[1-9])|(1[0-2])$/.test(ta.getElemVal(FormController.FIELD_CARD_EXPIRY_MONTH));\n }\n , _validateExpiryYearDeadline: function() {\n const currentYear = parseInt(FormController.EXPIRY_DATE_DEADLINE_YEAR);\n const expiryYear = parseInt(FormController.expirationYear());\n\n return expiryYear >= currentYear && expiryYear <= (currentYear + FormController._MAX_NUMBER_OF_YEARS_THE_CARD_IS_VALID);\n }\n , validate: function() {\n return (this._validateCardNumber() &&\n this._validateCvv() &&\n this._validateExpiryMonth() &&\n this._validateExpiryYear() &&\n (!FormController.EXPIRY_DATE_VALIDATE_DEADLINE || (FormController._validateExpiryYearDeadline() && FormController._validateExpiryMonthDeadline())) &&\n this.ccnameValidation.validate());\n }\n\n , _validateCardNumber: function() {\n var cardType = FormController.definiteCardType();\n if (cardType && cardType.name && FormController.VALID_CARD_TYPES.indexOf(cardType.name) < 0) {\n return false;\n }\n return ta.cards.isValidCardNumber(FormController.ccnumber());\n }\n , _showErrorTitle: function(errorElem) {\n var errorElemTitle = errorElem.parentNode.childNodes[1];\n // Make sure we are actually looking at the title\n if (errorElemTitle && errorElemTitle.className.indexOf('formLabel') === -1) {\n // Try one more step up and then give up\n var tempElem = errorElem.parentNode.parentNode.childNodes[1];\n if (tempElem && tempElem.className.indexOf('formLabel') !== -1) {\n errorElemTitle = tempElem;\n }\n }\n if (errorElemTitle) {\n errorElemTitle.className = errorElemTitle.className + \" errorMsg\";\n }\n }\n , _hideErrorTitle: function(errorElem) {\n var errorElemTitle = errorElem.parentNode.childNodes[1];\n // Make sure we are actually looking at the title\n if (errorElemTitle && errorElemTitle.className.indexOf('formLabel') === -1) {\n // Try one more step up and then give up\n var tempElem = errorElem.parentNode.parentNode.childNodes[1];\n if (tempElem && tempElem.className.indexOf('formLabel') !== -1) {\n errorElemTitle = tempElem;\n }\n }\n if (errorElemTitle) {\n ta.removeClassFromElem(errorElemTitle, \"errorMsg\");\n }\n }\n , _hideError: function(errorFieldIdPrefix) {\n ta.removeElemClass(errorFieldIdPrefix + \"ErrorImage\", \"red_form_error\");\n ta.addElemClass(errorFieldIdPrefix + \"ErrorImage\", \"green_form_correct\");\n ta.addElemClass(errorFieldIdPrefix + \"Error\", \"hidden\");\n var errorElem = ta.elem(errorFieldIdPrefix);\n this._hideErrorTitle(errorElem);\n }\n , _showError: function(errorFieldIdPrefix) {\n ta.removeElemClass(errorFieldIdPrefix + \"ErrorImage\", \"green_form_correct\");\n ta.addElemClass(errorFieldIdPrefix + \"ErrorImage\", \"red_form_error\");\n ta.removeElemClass(errorFieldIdPrefix + \"Error\", \"hidden\");\n var errorElem = ta.elem(errorFieldIdPrefix);\n this._showErrorTitle(errorElem);\n }\n , _inputFieldErrors: function(formElementId, validationFunction) {\n if (validationFunction()) {\n FormController._hideError(formElementId);\n ta.removeElemClass(formElementId, \"hasError\");\n } else {\n FormController._showError(formElementId);\n ta.addElemClass(formElementId, \"hasError\");\n }\n }\n , _dropDownFieldErrors: function() {\n if (FormController._validateExpiryYear() && (!FormController.EXPIRY_DATE_VALIDATE_DEADLINE || FormController._validateExpiryYearDeadline())) {\n FormController._hideErrorTitle(ta.elem(FormController.FIELD_CARD_EXPIRY_YEAR));\n } else {\n FormController._showErrorTitle(ta.elem(FormController.FIELD_CARD_EXPIRY_YEAR));\n }\n\n if (FormController._validateExpiryMonth() && (!FormController.EXPIRY_DATE_VALIDATE_DEADLINE ||FormController._validateExpiryMonthDeadline())) {\n FormController._hideErrorTitle(ta.elem(FormController.FIELD_CARD_EXPIRY_MONTH));\n } else {\n FormController._showErrorTitle(ta.elem(FormController.FIELD_CARD_EXPIRY_MONTH));\n }\n }\n , setupOnChangeListeners: function(parentPageCommunicationClient) {\n var onInputFieldChange = function(formElementId, validationFunction) {\n var onChangeCallback = function() {\n FormController._inputFieldErrors(formElementId, validationFunction);\n parentPageCommunicationClient.postChangeMessage(FormController.validate(), \"[input event]: \" + formElementId);\n };\n\n var elem = ta.elem(formElementId);\n\n // Using addEventListener to avoid removing other oninput handler\n if (elem.addEventListener) {\n // Don't need to check for blur once this invocation (the first blur) occurs,\n // as we then attach the validator to any input.\n elem.onblur = \"\";\n elem.addEventListener(\"input\", onChangeCallback);\n }\n onChangeCallback();\n };\n var onMonthDropdownChange = function() {\n FormController._dropDownFieldErrors();\n parentPageCommunicationClient.postChangeMessage(FormController.validate(), \"[expiration dropdown event]\");\n };\n\n var onBlurStartErrorRecording = function(fieldChangeFunction, formElementId, validationFunction) {\n var elem = ta.elem(formElementId);\n elem.onblur = function() {fieldChangeFunction(formElementId, validationFunction)};\n };\n\n onBlurStartErrorRecording(onInputFieldChange, FormController.FIELD_CARD_NUM, FormController._validateCardNumber);\n onBlurStartErrorRecording(onInputFieldChange, FormController.FIELD_CARD_SECURITY_CODE, FormController._validateCvv);\n if(ta.elem(FormController.FIELD_CARD_HOLDER_NAME)) {\n onBlurStartErrorRecording(onInputFieldChange, FormController.FIELD_CARD_HOLDER_NAME, FormController.ccnameValidation.validate);\n }\n // Since month validation depends on the year, validate month when year is changed as well (and vice versa)\n ta.elem(FormController.FIELD_CARD_EXPIRY_YEAR).onchange = onMonthDropdownChange;\n ta.elem(FormController.FIELD_CARD_EXPIRY_MONTH).onchange = onMonthDropdownChange;\n\n // IBX-4354 and CDE-1349: Safari 7 and below on iOS have a bug with input and iframes\n\n // CDE-768: The fix to use focus() to enable input broke IE 9 by wiping out its selection indices.\n // I could not repro the original issue on an iPad running iOS 7.1.1, so we'll not include\n // the iOS workaround for IE 9.\n if (navigator.userAgent.indexOf(\"MSIE 9\") === -1) {\n if(ta.elem(FormController.FIELD_CARD_HOLDER_NAME)) {\n ta.elem(FormController.FIELD_CARD_HOLDER_NAME).onkeydown = ta.elem(FormController.FIELD_CARD_HOLDER_NAME).ontouchend = function () {\n window.focus();\n ta.elem(FormController.FIELD_CARD_HOLDER_NAME).focus();\n };\n }\n ta.elem(FormController.FIELD_CARD_SECURITY_CODE).onkeydown = ta.elem(FormController.FIELD_CARD_SECURITY_CODE).ontouchend = function () {\n window.focus();\n ta.elem(FormController.FIELD_CARD_SECURITY_CODE).focus();\n };\n ta.elem(FormController.FIELD_CARD_NUM).onkeydown = ta.elem(FormController.FIELD_CARD_NUM).ontouchend = function () {\n window.focus();\n ta.elem(FormController.FIELD_CARD_NUM).focus();\n };\n }\n\n var ccNumLength = FormController.ccnumber().length;\n var creditCardReformatter = ta.error.wrap(function(event){\n var unformattedValue = ta.getElemVal(FormController.FIELD_CARD_NUM);\n var currentCursorPos = ta.elem(FormController.FIELD_CARD_NUM).selectionStart;\n var digitIndex = ta.cards.getDigitIndexFromTextStringIndex(unformattedValue, currentCursorPos);\n\n var currentValue = FormController.ccnumber();\n if (currentValue.length - ccNumLength > 1) {\n // If the length increased by more than 1 on this input, assume it is due to autofill.\n parentPageCommunicationClient.postAutofillEvent();\n }\n ccNumLength = currentValue.length;\n\n var formattedValue = ta.cards.formatCreditCardNumber(currentValue, \"-\");\n ta.setElemVal(FormController.FIELD_CARD_NUM, formattedValue);\n\n var cardType = FormController.definiteCardType();\n var actualCursorPos = ta.cards.matchDigitIndexToFormattedStringIndex(digitIndex,\n cardType != null && cardType.name == \"AmericanExpress\");\n\n // See CDE-1151\n if (navigator.userAgent.indexOf(\"Android\") > -1 && navigator.userAgent.indexOf(\"Chrome/\") > -1)\n {\n setTimeout(function() {\n ta.elem(FormController.FIELD_CARD_NUM).setSelectionRange(actualCursorPos, actualCursorPos)\n }, 0);\n }\n else\n {\n ta.elem(FormController.FIELD_CARD_NUM).setSelectionRange(actualCursorPos, actualCursorPos);\n }\n\n FormController.updateCreditCardLogos();\n }, \"card_form.js\", FormController.getLogLevel);\n\n var cvvNumLength = FormController.cvv().length;\n var cvvReformatter = ta.error.wrap(function (event) {\n var unformattedValue = ta.getElemVal(FormController.FIELD_CARD_SECURITY_CODE);\n var currentCursorPos = ta.elem(FormController.FIELD_CARD_SECURITY_CODE).selectionStart;\n var digitIndex = ta.cards.getDigitIndexFromTextStringIndex(unformattedValue, currentCursorPos);\n\n var currentValue = FormController.cvv();\n if (currentValue.length - cvvNumLength > 1) {\n // If the length increased by more than 1 on this input, assume it is due to autofill.\n parentPageCommunicationClient.postAutofillEvent();\n }\n cvvNumLength = currentValue.length;\n\n var formattedValue = ta.cards.formatCVV(currentValue);\n ta.setElemVal(FormController.FIELD_CARD_SECURITY_CODE, formattedValue);\n }, \"card_form.js\", FormController.getLogLevel);\n\n // Old versions of WebKit don't update selection range until after oninput is processed.\n // https://bugs.webkit.org/show_bug.cgi?id=110742\n // This prevents us from doing the right thing with formatting credit card numbers in oninput.\n // onkeyup works, but you can see reformatting happen, so do it only for the one impacted version\n // of WebKit we support.\n if (navigator.userAgent.indexOf(\"AppleWebKit/534.30\") === -1) {\n ta.elem(FormController.FIELD_CARD_NUM).oninput = creditCardReformatter;\n ta.elem(FormController.FIELD_CARD_SECURITY_CODE).oninput = cvvReformatter;\n } else {\n ta.elem(FormController.FIELD_CARD_NUM).onkeyup = creditCardReformatter;\n ta.elem(FormController.FIELD_CARD_SECURITY_CODE).onkeyup = cvvReformatter;\n }\n }\n , highlightErrors: function() {\n FormController._inputFieldErrors(FormController.FIELD_CARD_NUM, FormController._validateCardNumber);\n FormController._inputFieldErrors(FormController.FIELD_CARD_SECURITY_CODE, FormController._validateCvv);\n if(ta.elem(FormController.FIELD_CARD_HOLDER_NAME)) {\n FormController._inputFieldErrors(FormController.FIELD_CARD_HOLDER_NAME, FormController.ccnameValidation.validate);\n }\n FormController._dropDownFieldErrors();\n }\n\n /*\n If validCardTypes is not empty,\n any card types not in its list will be removed\n from the list of supported card types.\n If no list is supplied, then all types supported are allowed.\n */\n , updateValidCardTypes: function(validCardTypes) {\n var index, i, logo;\n if (validCardTypes.length) {\n for (i = 0; i < this.VALID_CARD_TYPES.length; i++) {\n index = validCardTypes.indexOf(this.VALID_CARD_TYPES[i]);\n if (index < 0) {\n logo = ta.elem(this.VALID_CARD_TYPES[i]);\n if (logo){\n logo.parentNode.removeChild(logo);\n }\n delete FormController.VALID_CARD_TYPES[i];\n }\n }\n }\n }\n\n , updateCardholderNameValidation: function(validationType) {\n var elem = ta.elem(FormController.FIELD_CARD_HOLDER_NAME);\n if (!elem) {\n return;\n }\n\n if(Array.isArray(validationType)) {\n this.ccnameValidation.setValidation(validationType);\n } else {\n this.ccnameValidation.setValidation([validationType]);\n }\n }\n\n , updateCardholderName: function(name) {\n var elem = ta.elem(FormController.FIELD_CARD_HOLDER_NAME);\n if (!name && name !== \"\" || !elem) {\n return;\n }\n\n elem.value = name;\n }\n\n /**\n * This is called in response to the parent page indicating that this iframe is being\n * used for a pay at stay room and handles any special treatments for this use case.\n */\n , handlePayAtStay: function() {\n var elem = ta.elem(\"payAtStay\");\n if (!elem) {\n return;\n }\n\n elem.className = elem.className.replace('hidden', '');\n }\n\n /**\n * This is called in response to the parent page indicating that debit cards are allowed.\n */\n , handleDebitCardAllowed: function() {\n var elem = ta.elem(\"ccNumLabel\");\n if (!elem) {\n return;\n }\n\n elem.innerHTML = ta.langs.localize('cde_pf_credit_or_debit');\n }\n\n , handleCardholderDisclaimersAllowed: function() {\n this.ccnameValidation.allowDisclaimers();\n }\n\n /**\n * General handler for setting up any tooltips. This is called when the form is initialized.\n */\n , setupTooltips: function() {\n var cvvExplainerElem = ta.elem(\"cvvExplainer\")\n , cvvTooltipElem = ta.elem(\"cvvTooltipData\")\n , showCvvTooltip = function() {\n ta.removeClassFromElem(cvvTooltipElem, \"hidden\");\n }\n , hideCvvTooltip = function() {\n ta.addClassToElem(cvvTooltipElem, \"hidden\");\n }\n ;\n if (!cvvExplainerElem || !cvvTooltipElem) {\n return;\n }\n\n if (cvvExplainerElem.addEventListener) {\n cvvExplainerElem.removeEventListener(\"mouseover\", showCvvTooltip);\n cvvExplainerElem.removeEventListener(\"mouseout\", hideCvvTooltip);\n cvvExplainerElem.addEventListener(\"mouseover\", showCvvTooltip);\n cvvExplainerElem.addEventListener(\"mouseout\", hideCvvTooltip);\n }\n }\n\n , hideCardTypeIcons: function() {\n var cardTypeIcons = ta.elem(\"creditCardType\");\n if (!cardTypeIcons) {\n return;\n }\n\n cardTypeIcons.style.display = \"none\";\n }\n\n ,\n });\n\n return FormController;\n}", "title": "" } ]
24603907652562bb3709430fec001d6d
02 UZDUOTIS sukurti funkcijas: printName() printLName(), printClass() , kurios atspausdina i konsole pirmos uzduoties kintamuosius
[ { "docid": "817ecca98a9b417e1d2762a17336887d", "score": "0.58475727", "text": "function printName()\n{console.log(vardas);}", "title": "" } ]
[ { "docid": "707adfbc23c2c78915e59810bc011391", "score": "0.6796782", "text": "print(){\n\t\treturn \"a \" + this.nam + \" has \" + this.nos + \" sides.\"\n\t}", "title": "" }, { "docid": "361c213528558643db99bb0058284f79", "score": "0.64521086", "text": "print(){\n console.log(` [${this.getHeureDebut()}:${this.getHeureFin()} - ${this.#coordX}:${this.getEndOfCase()?this.#endOfCase:\"???\"}]`\n + `${this.#coursAlt ? \" - Alternant\" : \"\"}${this.#coursIng ? \" - Ingénieur\" : \"\"}`)\n console.log(` ${this.#titre}${this.#lieu ? \" - \" + this.#lieu : \"\"}${this.#prof ? \" (\" + this.#prof + \")\" : \"\"}`)\n }", "title": "" }, { "docid": "8fb5d9d490f96d34a3995da67b4c0658", "score": "0.63449186", "text": "function print() { \n\t\n\t\n\t\n\t}", "title": "" }, { "docid": "24d4712aa34fe9dea99a92b975f700c2", "score": "0.6311999", "text": "function print()\n{\n\tfor(var g in bases) {\n\t\tpost(\"basis name: \", bases[g].name);\n\t\tpost();\n\t}\n\n}", "title": "" }, { "docid": "63a6fd803bfa99e2462140d1969f15f0", "score": "0.6251826", "text": "printMacronutrients () {\n console.log(`${FoodClass.name} | ${FoodClass.protein} g P :: ${FoodClass.carbs} g C :: ${FoodClass.fat} g F`)\n }", "title": "" }, { "docid": "6d252540c63741bb110ae235fc26816a", "score": "0.6251687", "text": "gabung() {\n console.log(this.useername + 'Telah bergabung kelas' + this.id_class);\n }", "title": "" }, { "docid": "6a0d5774849f4ae0ec2c00471e13c128", "score": "0.62425447", "text": "showTitle() {\n this.log(_consts.SEPARATOR);\n this.log('Create new class:');\n this.log();\n }", "title": "" }, { "docid": "33847f5e71928f7b4517fe0ae7741d6b", "score": "0.6210571", "text": "printName() {\n return this.name;\n }", "title": "" }, { "docid": "8e9ad6a1ee2c7fc3b3d23aa75319dff7", "score": "0.6011194", "text": "namePrint () {\n // this refers to the object itself.\n console.log('object method: ', this.name)\n }", "title": "" }, { "docid": "e820dd097a240c40efb0533e48a061d1", "score": "0.6003049", "text": "printInConsole() {\n super.printInConsole(`${this.name} ${this.lastName}.`);\n }", "title": "" }, { "docid": "b17acb44f5607a5de0a3b283abcc5e40", "score": "0.60003126", "text": "function printName() {\r\n console.log(\"Severus Snape\");\r\n}", "title": "" }, { "docid": "0ca2bdca87df149fba23dcefc2e2afb8", "score": "0.59440076", "text": "function hienthithongtin() {\n console.log(`name: ${this.hoten} - class: ${this.lop}`);\n }", "title": "" }, { "docid": "bff446abf0f0e780d7fc3b3d9ad814bf", "score": "0.5931269", "text": "function printDetailsModified() {\n\t\treturn `${this.name} (${this.type}) - ${this.age}`;\n\t}", "title": "" }, { "docid": "fb6ffcfba90a39c2cd89f5882a51d660", "score": "0.5931198", "text": "function print_STANDARDCIT(object){\n}", "title": "" }, { "docid": "6495ebd8aa5d7549bb21d97f4abdbedd", "score": "0.59298", "text": "function printer_friendly() {\n\n }", "title": "" }, { "docid": "a2aa6ecc4e8919e6378763fd027c91d3", "score": "0.588329", "text": "function print(student) {\n console.log(student, this.groupName);\n }", "title": "" }, { "docid": "30e262dfa31d0ae46bef12c93751247a", "score": "0.5878931", "text": "function persinfo(){\n console.log(\"Personal Inforamtion:\")\n prname(\"\\tStudent Name: \", \"\\tSyed \",\"Shahzaib\");\n prname(\"\\tFahter Name: \", \"\\tSyed \",\"Anwar Ali\");\n pranything(\"\\tD.O.B: \",\"\\t08-11-1994\");\n pranything(\"\\tN.I.C: \",\"\\t42301-4682481-3\");\n}", "title": "" }, { "docid": "3f9bffbb6f713161c323a3d975eb7440", "score": "0.58344895", "text": "static _printTypes () {\n this.types.forEach(type => {\n compose(\n console.log,\n chalk.yellow,\n padLeft(2, ' '),\n bullet\n )(type)\n })\n console.log()\n }", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "474126526db8027b8831d322057e9043", "score": "0.5820135", "text": "function printName() {\n console.log(\"Severus Snape\");\n}", "title": "" }, { "docid": "0e0eeb415d0a4bef9ba5d6df1d1523f9", "score": "0.5815761", "text": "function printName( member ) {\n println( member.name );\n}", "title": "" }, { "docid": "aed7c9ab6b813127d2696ec04fa45093", "score": "0.5791102", "text": "function printName(name){ //Signature of the function: name and the name of it's parameters\r\n console.log(name);\r\n}", "title": "" }, { "docid": "b7a23cd46e416da839a472d9388c7bf1", "score": "0.5788319", "text": "function printName() {\n console.log(vardas);\n}", "title": "" }, { "docid": "0e524f44c8dfd6c5d79151613da675f9", "score": "0.5755445", "text": "verInfo(){\n //SuperLlamada: con el super se manda a llamar el metodo verInfo()de la clase padre\n //return super.verInfo()\n\n return c(\n `${this.constructor.name}\\n`,\n `\\tModelo: ${this.modelo}\\n`,\n `\\tMarca: ${this.marca}\\n`,\n `\\tPuedo llamar: ${this.puedoLlamar}\\n`,\n `\\tTengo cables: ${this.tengoCables}\\n`\n )\n }", "title": "" }, { "docid": "69326117e66f638cfb91c02b8a2594af", "score": "0.5754199", "text": "printName(person){\n\t\treturn `${person.last},${person.first}`;\n\t}", "title": "" }, { "docid": "1bc34b57f1348850778cad117722f13b", "score": "0.5751966", "text": "function print_PATENTCIT(object){\n}", "title": "" }, { "docid": "75b4d651264141c3603b2bdaf23a02d2", "score": "0.57434666", "text": "function print (reiksme) { // \"reiksme\" - laikinas kintamasis , kuris gauna kvietimo metu suteikiama reiksme\n console.log(reiksme);\n}", "title": "" }, { "docid": "c2457e0f6561572287e284ea588eefc4", "score": "0.5720247", "text": "function vorstellen( person ) {\n print( \"Hej, ich bin \" + person.name );\n}", "title": "" }, { "docid": "935b190b1f8d7b4fc7bdbf6606a745b9", "score": "0.56976736", "text": "function printUserInterface() {\n console.log(\"\\n\\r\");\n console.log(figlet.textSync('Clean', {\n font: 'Ghost',\n horizontalLayout: 'default',\n verticalLayout: 'default'\n }));\n console.log(\"\\n\\r\");\n console.log(\" 1.Create action. 4.Remove entity. 0.Exit.\");\n console.log(\" 2.Remove action. 5.Create repository.\");\n console.log(\" 3.Create entity. 6.Remove repository.\");\n console.log(\"\\n\\r\");\n console.log(\"\\n\\r\");\n}", "title": "" }, { "docid": "b958a4bf3d64c1266205fdb2e1e41885", "score": "0.5693416", "text": "function names (){\n console.log('Prashant');\n console.log('Priyanka');\n console.log('Pratik');\n}", "title": "" }, { "docid": "3e16d4a7a10a9008564561c7948b80ec", "score": "0.5690555", "text": "function printName() {\n var spanName = document.getElementById(\"name\");\n spanName.innerHTML = name;\n return verb;\n }", "title": "" }, { "docid": "04474eb67ab116d53b222a8a1b89c540", "score": "0.56774503", "text": "function display(){\r\n console.log(name);\r\n }", "title": "" }, { "docid": "5533725e39dc26d398ac77180ab9ac87", "score": "0.56770295", "text": "function print_OTHERCIT(object){\n}", "title": "" }, { "docid": "deb4fc3cf1b481958ff52fe8b85bff16", "score": "0.5675716", "text": "getMyName(hello){\n // do LTV tu ding nghia\n return ` ${hello} ${this.name}`;\n // this === A (this chinh la class)\n }", "title": "" }, { "docid": "ddd4ca6c672e08384eecc936186d3703", "score": "0.56725854", "text": "function print() {\n console.log(`Account Holder Name: ${accountHolder}`);\n console.log(`Account Holder Number: ${accountNumber}`);\n console.log(`Business Name: ${businessName}`);\n}", "title": "" }, { "docid": "d8f7810605543c744b49cc51c0e3009c", "score": "0.56696963", "text": "function printName(name) {\n console.log(name);\n}", "title": "" }, { "docid": "a1b5c94c47c77eb7a07102a34711f972", "score": "0.5666131", "text": "function printName(name) {\n console.log(name);\n}", "title": "" }, { "docid": "6f15b92fbc04039d46abe7b55ba77979", "score": "0.565854", "text": "function print_EPATHCIT(object){\n}", "title": "" }, { "docid": "fd6b05fb1c534a784993e7328534da9e", "score": "0.56581926", "text": "function sc_class_name( clazz ) {\n\n\n return clazz.sc_name;\n}", "title": "" }, { "docid": "40ff5f79d875604702d452bb983075dd", "score": "0.564863", "text": "function printName(name){\n console.log(name);\n}", "title": "" }, { "docid": "ecbe39b404da5864a51f32022fc53ee6", "score": "0.5644831", "text": "printMyName() {\n console.log(this.name);\n }", "title": "" }, { "docid": "e5ca62907ad76f5599122435f0fac03c", "score": "0.5642312", "text": "function print_BKCIT(object){\n}", "title": "" }, { "docid": "a6a2cca376c906fc4677ef7b7729d344", "score": "0.56297904", "text": "function ClassInfoSocioDemografica(){\n\tpoblacion = \"\";\n\tpea = \"\";\n\tpoblacionFlot = \"\";\n\thogares = \"\";\n\tedadMenor1 = \"\";\n\tedadMenor2 = \"\";\n\tedadMenor3 = \"\";\n\tedadMenor4 = \"\";\n\tedadMenor5 = \"\";\n\tedadMenor6 = \"\";\n\n}", "title": "" }, { "docid": "5d53a21757d08d5f9127ef2e9a2e5bfb", "score": "0.56231636", "text": "print(){\n console.log(this.toString());\n }", "title": "" }, { "docid": "79b93036524fbb1d3bb2e441935c79d1", "score": "0.56094706", "text": "toString(idt = '', name = this.constructor.name) {\n var tree;\n tree = '\\n' + idt + name;\n if (this.soak) {\n tree += '?';\n }\n this.eachChild(function(node) {\n return tree += node.toString(idt + TAB);\n });\n return tree;\n }", "title": "" }, { "docid": "0a237243cedf91f6fc9e4d659823ddfa", "score": "0.56015533", "text": "print() {\n console.log(this.toString());\n }", "title": "" }, { "docid": "11be15e03e92a27f486a4b6760c43384", "score": "0.55999196", "text": "print() {\n console.log(this.toString())\n }", "title": "" }, { "docid": "c3a810feccb9651317b02d088cdba1be", "score": "0.5599723", "text": "function printArturoInfo(firstName, middleName, lastName, secondLastName) {\n console.log(`${firstName} ${middleName} ${lastName} ${secondLastName}`)\n}", "title": "" }, { "docid": "833361817eba9d0138b2cd6fcd8519a9", "score": "0.55912244", "text": "function classes() {\n let coco = new Monkey(\"Coco\", 3);\n coco.age = 10;\n console.log(\"monkey\", coco.toString(), coco.name, coco.age);\n //console.log(\"car\" ,car.toString() );\n}", "title": "" }, { "docid": "db6340fb35b516096283ec25d3bcf6d2", "score": "0.55896944", "text": "function PrintInhaltsverzeichnis()\n{\t\n\tnav.document.writeln\n\t(\"\t<html><head><TITLE>vipsi - manual - table of contents</TITLE>\\\n\t\t<link rel=stylesheet type='text/css' href='nav.css'>\\\n\t</head>\\\n\t<body bgcolor='#CCCCCC' text='#000000' link='#000099' vlink='#003399' alink='#990000'>\\\n\t<h3>vipsi</h3>\");\n\t\n\tPrintKapitel(0);\n\t\n\tnav.document.writeln\n\t(\"</body></html>\");\n}", "title": "" }, { "docid": "8164a3715666b66264a483d44c5d7710", "score": "0.5561698", "text": "print(obj) {\n if (obj == null) {\n this.write(\"nil\");\n } else if (obj instanceof Frame) {\n this.printFrame(obj);\n } else if (typeof obj === 'string') {\n this.write(JSON.stringify(obj));\n } else if (Array.isArray(obj)) {\n this.printArray(obj);\n } else if (obj instanceof QString) {\n this.write(JSON.stringify(obj.text));\n if (obj.qual) {\n this.write(\"@\");\n this.print(obj.qual);\n }\n } else {\n // Number expected.\n this.write(obj.toString());\n }\n }", "title": "" }, { "docid": "9ab5ceca4ba82e7f47c9391ea5f647cc", "score": "0.55600286", "text": "function print(printerName, printParamsXml, labelSetXml)\n {\n printLabel(printerName, printParamsXml, getLabelXml(), labelSetXml);\n }", "title": "" }, { "docid": "665503c3d9019cd421fff756e535d98d", "score": "0.5559864", "text": "function _printHeader(){\n sys.log(sys.product.meta.getHeaderText());\n }", "title": "" }, { "docid": "ca3c1dee8fcacd097fc3825c0a360c16", "score": "0.5550328", "text": "printName(person){\n return `${person.last}, ${person.first}`;\n }", "title": "" }, { "docid": "490c4824ebbe427491a5db3d54595bfe", "score": "0.55482244", "text": "function printInfo(accHolder, accNumber, busName) {\n console.log(`Account Holder Name: ${accHolder}`);\n console.log(`Account Holder Number: ${accNumber}`);\n console.log(`Business Name: ${busName}`);\n}", "title": "" }, { "docid": "9aca7564ad246b52f31002b08b9c8d50", "score": "0.5546161", "text": "function printOderDetail() {\r\n console.log('Order Information Detail : ');\r\n console.log('Họ Tên : ', gSelectedMenuStructure.hoTen);\r\n console.log('Email :', gSelectedMenuStructure.email);\r\n console.log('Số Điện Thoại :', gSelectedMenuStructure.soDienThoai);\r\n console.log('Địa chỉ : ', gSelectedMenuStructure.diaChi);\r\n console.log('Lời Nhắn :', gSelectedMenuStructure.loiNhan);\r\n console.log('Size Pizza : ', gSelectedMenuStructure.kichCo);\r\n console.log('Loại Pizza : ', gSelectedMenuStructure.loaiPizza);\r\n console.log('Giá Chưa Khuyến mại: ', gSelectedMenuStructure.priceCombo);\r\n console.log('% Giảm Giá : ', gSelectedMenuStructure.phanTramGiamGia);\r\n console.log('Phải Thanh Toán : ', gSelectedMenuStructure.thanhTien);\r\n }", "title": "" }, { "docid": "61bf81dc423127d575211d64fbb9608b", "score": "0.55405945", "text": "plantilla_titulares()\n {\n console.log(`Jugadores ${this.base} ${this.Pivot}`) ;\n }", "title": "" }, { "docid": "c2efc5b3e56aea9bf3ce48f6d0ff71ed", "score": "0.55325794", "text": "display() {\n console.log(`This very cute ${this.kind} lives in ${this.hometown}`);\n }", "title": "" }, { "docid": "7a6952fa5441e2fbbbb26e4975c77329", "score": "0.55157566", "text": "function printfullname(a,b,c) { //here (a,b,c is the argument) //printfullname is the function.\r\n return this.firstname + \" \" + this.lastname;\r\n}", "title": "" }, { "docid": "75553453104165a9b6513d89189eaabb", "score": "0.5514786", "text": "constructor(print1, type1, write1, show1) {\n this.print = print1;\n this.type = type1;\n this.write = write1;\n this.show = show1;\n }", "title": "" }, { "docid": "e9788691e84e291d5271733e91f1b8ad", "score": "0.5505189", "text": "function displayType(id, name) {\n console.log(\" tipe data nya berupa : \" + typeof id + ', ' + typeof name);\n console.log(\" result nya berupa : \" + id + ', ' + name);\n}", "title": "" }, { "docid": "0609b485cb0998d8c6d2c749351f5f96", "score": "0.55044544", "text": "function displayName(data) {\n\t\t\tconsole.log(data);\n\t\t\tprintName(data);\n\t\t}", "title": "" }, { "docid": "20d7fbc567afe074504265ff63c1cb3c", "score": "0.54984987", "text": "function printname(name){\n console.log(\"Hello \",name);\n}", "title": "" }, { "docid": "03b1289dfda57d10cccd86fd60ea5400", "score": "0.549216", "text": "function toString () {\n return classes.join(\" \");\n }", "title": "" }, { "docid": "e5837dce525ae1cd1e3aa5c167585b91", "score": "0.5474276", "text": "static display(obj) {\n console.log(`${obj.person} lends ${obj.book.Name}`);\n }", "title": "" }, { "docid": "73dd43824168204a124c3ac90733b429", "score": "0.5471984", "text": "function imprimirMayusculas4 ({ nombre }) { \n console.log(`${nombre.toUpperCase()} funcion 4`)\n}", "title": "" }, { "docid": "10f2071c550e180736a7014d2f309849", "score": "0.5470599", "text": "toString() {\n return this.name + ', scienficically known as ' + this.scientificName;\n }", "title": "" }, { "docid": "1b1da4ab0eabbfbeb73772f6eee1f2dc", "score": "0.5455366", "text": "function printVardasPavardeKlase(name, lname, klase) {\n console.log(\"Harry\", \"Potter\", \"10\");\n}", "title": "" }, { "docid": "9f397da312c0ad43807b833611d4caab", "score": "0.5453485", "text": "function name (writeName) {\n\tconsole.log(writeName);\n}", "title": "" }, { "docid": "939e65c209fd739accb86a89cd3f2179", "score": "0.54501903", "text": "function getName() {return (`This object's name is ${this.name}.`)}", "title": "" }, { "docid": "6fed082e833e80940180fbb4d9aedbd6", "score": "0.5449138", "text": "function printVardasPavardeAmzius() {\n console.log(\"First name: \" + firstName);\n console.log(\"Last name: \" + lastName);\n console.log(\"Age: \" + age);\n console.log(\"--------------------\");\n}", "title": "" }, { "docid": "3b0a97317b08ea544ed8f3ea8c63008a", "score": "0.5445771", "text": "function printName(myName) {\n // what you want the funtion to do\n console.log(myName)\n}", "title": "" }, { "docid": "9abbc4e88f9ef60197a99857c4f2dd1e", "score": "0.54452145", "text": "function printMyName(name) {\n console.log(name);\n}", "title": "" }, { "docid": "aaee5bbbea8c6e02029965db456ff0b4", "score": "0.54433614", "text": "toString(){ \n\t\treturn (`Name of person: ${this.name}`); \n\t}", "title": "" }, { "docid": "02756a24b0565674075cee8892dfab52", "score": "0.54305136", "text": "function listFunctions() {\n\n console.log('help()');\n console.log('roll(numberOfDice,sides)');\n console.log('generateName()');\n console.log('createUnit(unitNameString, /*strength*/ roll(numberOfDice,sides), armorValue, /*gold*/ roll(numberOfDice,sides))');\n console.log('checkUnits()');\n console.log('deathMatch(unitA, unitB)');\n console.log('shop()');\n console.log('buy(itemID)');\n console.log('revive(unit)');\n}", "title": "" }, { "docid": "df8fb1d1a04353f315af73897ce5660e", "score": "0.54232603", "text": "displayInfo() {\n return \"Triangle \" + super.displayInfo();\n }", "title": "" }, { "docid": "5975ef49bb0f5d7ae58f5cfbb68e2b68", "score": "0.54232055", "text": "function printProperties( taffyData, containerLongname )\n{\n var result = \"\";\n var members = taffyData( { memberof: containerLongname, access: {\"!is\": \"private\"} }, [ {kind: \"member\"}, {kind: \"constant\"} ] ).get();\n members.filter( m => m.description ).forEach( function(member) {\n\n if( // Wired, happens on bcdui.something[1] = x;\n member.longname.indexOf(\"[undefined]\") !== -1\n // Skip class and namespaces, they are also show up here as kind:member, but are handled else where. \n // And if the property shows up multiple times (init, assignment etc), it is enough to declare it private once to hide it here\n || taffyData({ longname: member.longname}, [{kind: \"class\"}, {kind: \"namespace\"}, {access: \"private\"}] ).count() > 0\n // If it shows up undocumented but there is a documented version, take that one\n || ( !member.description && taffyData({ longname: member.longname, description: {\"isUndefined\": false} } ).count() > 0 ) )\n return true;\n\n if( member.description ) { \n result += \"/**\" + newLine(0);\n result += \" * \" + member.description + newLine(0);\n result += \" */\" + newLine(0);\n }\n\n var connect = member===\"static\" ? '.' : '.prototype.'; // Member are separated with a # from classname in jsdoc, but her we want to see the dot\n result += member.longname.replace(\"#\",connect);\n if( member.meta.code.type === \"NewExpression\" && member.type )\n result += \" = new \" + member.type.names[0] + \"()\";\n else if( member.meta.code.type === \"Literal\" && member.meta.code.value && member.type && member.type.names[0].toLowerCase() === \"string\" )\n result += \" = \\\"\" + member.meta.code.value + \"\\\"\";\n else if( member.meta.code.type === \"Literal\" && !isNaN(parseFloat(member.meta.code.value) ))\n result += \" = \" + member.meta.code.value;\n else\n result += \" = {}\"; // We need this dummy assignment for Eclipse Mars autosuggestion to work. And if we assign only null, tooltip fails\n result += \";\"+newLine(0);\n });\n \n return result + newLine(0);\n}", "title": "" }, { "docid": "f26338291677998fb01ab31b99336d2e", "score": "0.5411852", "text": "outPrint(obj) {\n console.info(obj || '');\n }", "title": "" }, { "docid": "efb24da0d7b66ca1bae6f2e06de37361", "score": "0.5404863", "text": "print_Info() \n\t{\t\n\t\tconsole.log(`You spent ${this.duration} minute(s) ${this.type} on ${this.month}-${this.date}-${this.year}.`);\n\t}", "title": "" }, { "docid": "c27f787cce497fdc3ef37c93c982fc08", "score": "0.5404235", "text": "function _name_() {}", "title": "" }, { "docid": "6ea8e9f1fd51f37c13a7fa5fd9154ed2", "score": "0.53943425", "text": "function displayName(name) {\n console.log(\"Name: \" + name.toUpperCase());\n console.log(\"\");\n}", "title": "" }, { "docid": "a8012ffb209d4cb5aeedbec2f67350c5", "score": "0.5392835", "text": "function printRegister(reg) {\n if (codeStyle == \"SDK\") {\n var writeFunctions = reg.writeFunctions;\n if (writeFunctions != null) {\n for (var wf=0; wf < writeFunctions.length; wf++) {\n writeFunctions[wf].printFunction(writeFunctions[wf].accessRegisters);\n }\n } \n }\n processRegister(reg, \"print\");\n}", "title": "" }, { "docid": "a4c4bb9b03cda32735abd4a7969caa8c", "score": "0.53925186", "text": "print () {\n console.log(this)\n }", "title": "" }, { "docid": "fa0c10c7c03b6a237366b72c5d7b5301", "score": "0.539187", "text": "function gen_print(r, l){\n \treturn \"print(\" + r + \")\";\n }", "title": "" }, { "docid": "b199810dba375613fdebaea33e8a3864", "score": "0.5369407", "text": "funH() {\n console.log(`name ${this.fristname+this.lastname}`);\n \n }", "title": "" }, { "docid": "dd40d8ee213f6dcf1aefdaaeb000af36", "score": "0.5367586", "text": "static DumpConstructorNames(){\r\n return Object.keys(CJC_DATA.constructors).sort().join('|');\r\n }", "title": "" }, { "docid": "c9d0914f530c1027c8e291d809338609", "score": "0.5362444", "text": "function print_name(name) {\n console.log(name+\" Tampan\") //code here\n}", "title": "" }, { "docid": "f9f52306a91f88873a885f8ada8f867f", "score": "0.536169", "text": "function display(firstname){console.log(\"name= \"+firstname+ \" Singh\")}", "title": "" }, { "docid": "a281895703a4884e319f8ab941ff8b2e", "score": "0.53502524", "text": "getclassname() {\n return \"System\";\n }", "title": "" }, { "docid": "854757d25732dbd1aac0f1a3e09b521d", "score": "0.5337063", "text": "function printVardasPavardeAmzius() {\n console.log( vardas, pavarde, amzius );\n}", "title": "" }, { "docid": "1189540f98c66adade0fe1629d648b1a", "score": "0.5328062", "text": "function printFaris(farisObject){\n console.log(farisObject.name);\n printTree(farisObject, 0);\n}", "title": "" }, { "docid": "1e7ce1b29f784455ed22e7aab0522a9e", "score": "0.5326857", "text": "function myNameTwo(){\n console.log(\"3. \", name); // o/p--> Mr. Mondal\n }", "title": "" }, { "docid": "1b1e351f12f44976497a14ea9c766252", "score": "0.5320177", "text": "function printPerson(person) {\r\n console.log(person.firstName + \" \" + person.lastName);\r\n}", "title": "" }, { "docid": "81999e043b74de06b92d2d99ee3d6b3a", "score": "0.53144723", "text": "printInfo() {\n for (var key in this) {\n console.log(`${key}: ${this[key]}`);\n }\n }", "title": "" }, { "docid": "13f36dc5c6fe79c7b198b86e5322964b", "score": "0.53116584", "text": "function printAvatar(){\n \nconsole.log(\"Avatar: PG-13\");\n\n}", "title": "" } ]
bed72db6f166443b8e28dba76443a44d
Next 2 functions for arrow buttons to scroll through cards
[ { "docid": "9f6b9b906090e2615c0a6f226b74528c", "score": "0.0", "text": "iterateNextCard() {\n const show = this.state.show;\n if (show != null && show < 25) {\n this.setState({ show: show + 1 });\n }\n else if (show == 25) {\n this.setState({ show: 1 });\n }\n }", "title": "" } ]
[ { "docid": "339009478b042ece253a1c103fee7f50", "score": "0.70423436", "text": "function scrollToNextPage() {\n card_scroller.scrollBy(card_item_size, 0);\n }", "title": "" }, { "docid": "339009478b042ece253a1c103fee7f50", "score": "0.70423436", "text": "function scrollToNextPage() {\n card_scroller.scrollBy(card_item_size, 0);\n }", "title": "" }, { "docid": "339009478b042ece253a1c103fee7f50", "score": "0.70423436", "text": "function scrollToNextPage() {\n card_scroller.scrollBy(card_item_size, 0);\n }", "title": "" }, { "docid": "339009478b042ece253a1c103fee7f50", "score": "0.70423436", "text": "function scrollToNextPage() {\n card_scroller.scrollBy(card_item_size, 0);\n }", "title": "" }, { "docid": "2ca892aae699b16f9472848f8a193bef", "score": "0.6933042", "text": "function showCardsCarousel(cardsToAdd) {\n var cards = createCardsCarousel(cardsToAdd);\n\n $(cards).appendTo(\".chats\").show();\n\n\n if (cardsToAdd.length <= 2) {\n $(\".cards_scroller>div.carousel_cards:nth-of-type(\" + i + \")\").fadeIn(3000);\n } else {\n for (var i = 0; i < cardsToAdd.length; i++) {\n $(\".cards_scroller>div.carousel_cards:nth-of-type(\" + i + \")\").fadeIn(3000);\n }\n $(\".cards .arrow.prev\").fadeIn(\"3000\");\n $(\".cards .arrow.next\").fadeIn(\"3000\");\n }\n\n\n scrollToBottomOfResults();\n\n const card = document.querySelector(\"#paginated_cards\");\n const card_scroller = card.querySelector(\".cards_scroller\");\n var card_item_size = 225;\n\n card.querySelector(\".arrow.next\").addEventListener(\"click\", scrollToNextPage);\n card.querySelector(\".arrow.prev\").addEventListener(\"click\", scrollToPrevPage);\n\n\n // For paginated scrolling, simply scroll the card one item in the given\n // direction and let css scroll snaping handle the specific alignment.\n function scrollToNextPage() {\n card_scroller.scrollBy(card_item_size, 0);\n }\n\n function scrollToPrevPage() {\n card_scroller.scrollBy(-card_item_size, 0);\n }\n\n}", "title": "" }, { "docid": "485c6dad96825f10e40019b1297d3a07", "score": "0.6931999", "text": "function scrollCard(direction) {\n var windowc = document.getElementsByTagName(\"main\")[0];\n var scrollLeft = windowc.pageXOffset || windowc.scrollLeft;\n var currentSlot = Math.floor(scrollLeft/scrollJump);\n var lastSlot = (currentSlot-1)*scrollJump;\n var nextSlot = (currentSlot+1)*scrollJump;\n if (direction==\"left\") {\n scrollToX(lastSlot, 1500, 'easeInOutQuint');\n } else {\n scrollToX(nextSlot, 1500, 'easeInOutQuint');\n }\n\n }", "title": "" }, { "docid": "6ac6c5c49fbcb8ebc5eca2d06c9468a5", "score": "0.6790892", "text": "function onDownArrowClick(){ \n$.scrollTo($(\".statementContainer\"),1000);\n//$(\"body\").localScroll($(\".parallaxContainer\"));\n}", "title": "" }, { "docid": "418edfa90f53268b9b6b0f772e90473e", "score": "0.6747517", "text": "function showScrollingCards(card) {\n jQuery(\"#S\"+card).show();\n jQuery(\"#H\"+card).show();\n jQuery(\"#D\"+card).show();\n jQuery(\"#C\"+card).show();\n}", "title": "" }, { "docid": "e8c81b6a9234ea436df2706044df97bc", "score": "0.67319834", "text": "handleScroll() {\n // target the carousel and the nested cards\n const carousel = document.querySelector('.Carousel');\n const cards = carousel.querySelectorAll('.Card');\n\n // retrieve the distance being scrolled and the width of the carousel, to focus on the card placed in the middle of the viewport\n const {scrollLeft: fromLeft, offsetWidth: fromWidth} = carousel;\n\n // add .rotate classes to the cards positioned before and after the center of the screen, minus plus the size of the card\n cards.forEach(card => {\n card.classList.remove('rotate', 'rotate-left', 'rotate-right');\n const {offsetLeft: left, offsetWidth: width } = card;\n // 40 to consider the whitespace around the cards, and to always focus on at least one card\n if(fromLeft + fromWidth / 2 < left - 40) {\n card.classList.add('rotate', 'rotate-left');\n }\n if(fromLeft + fromWidth / 2 > left + width + 40) {\n card.classList.add('rotate', 'rotate-right');\n }\n });\n }", "title": "" }, { "docid": "8a61d43410517fe07bdbd1eda5bd1587", "score": "0.67251617", "text": "scrollNext() {\n if (this.currentX === 2) {\n this.currentY += 1\n this.currentX = 0\n } else {\n this.currentX += 1\n }\n this.viewTile()\n }", "title": "" }, { "docid": "be4d4bd2c3c3100c1d2f27ad7e51f71f", "score": "0.66562355", "text": "_updateScrollButtons() {\n const root = this.nodes.items;\n if (!root.childNodes.length) return;\n this.toggleClass('layer-carousel-start', root.scrollLeft <= root.firstElementChild.offsetLeft);\n\n const lastVisible = this._findLastFullyVisibleItem() || this._findFirstPartiallyVisibleItem();\n const children = this.nodes.items.childNodes;\n this.toggleClass('layer-carousel-end', lastVisible === children[children.length - 1]);\n }", "title": "" }, { "docid": "66efd4230379482dcf3bfaa02b9e0a2f", "score": "0.6620478", "text": "handleClick(type) {\n // get the card's margin-right\n let margin = window.getComputedStyle(document.getElementById(\"card\")).marginRight;\n margin = JSON.parse(margin.replace(/px/i, '')); \n\n const cardWidth = this.state.width; // the card's width\n const cardMargin = margin; // the card's margin\n const cardNumber = CardData().length; // the number of cards\n let currentCard = this.state.currentCard; // the index of the current card\n let position = this.state.position; // the position of the cards\n\n // slide cards\n if(type === 'next' && currentCard < cardNumber-1) {\n currentCard++;\n position -= (cardWidth+cardMargin);\n } else if(type === 'prev' && currentCard > 0) {\n currentCard--;\n position += (cardWidth+cardMargin);\n }\n this.setCard(currentCard, position);\n }", "title": "" }, { "docid": "d6484ac71696579d96e6c577aed41c13", "score": "0.6585979", "text": "scrollToOffset() {\n\n }", "title": "" }, { "docid": "8fc80375f9017095e06ec337ce78be11", "score": "0.6567425", "text": "updateControllerLinks(){ console.log(\"updateControllerLinks\");\n document.querySelectorAll(\".card[data-x]\").forEach((el)=>{el.onclick = null;})\n this.prev = document.querySelectorAll('.card[data-x=\"1\"], .card[data-x=\"2\"]');\n this.next = document.querySelectorAll('.card[data-x=\"-1\"], .card[data-x=\"-2\"]');\n let self = this;\n if(this.prev.length > 0) {\n this.prev.forEach((el)=>{\n if(blackVue.dataImages.length < 5 && el.querySelector(\".image-card\").src == blackVue.onePixelUrl) el.style.zIndex = \"-3\"; // give .card[data-x=\"2\"] more clickable espace\n el.onclick = function(e){\n // check if click was trigged by real click or mouseleave\n console.log(\"click prev\",self.cursorState);\n blackVue.lastScrollDirection.direction = \"left\";\n if(self.cursorState == \"click\" && el.querySelector(\".image-card\").src != blackVue.onePixelUrl) {\n self.target.dispatchEvent(new CustomEvent(\"prev\", {detail: {type: \"keyboard\"}}));\n }\n }\n });\n }\n if(this.next.length > 0) {\n this.next.forEach((el)=>{\n if (blackVue.dataImages.length < 5 && el.querySelector(\".image-card\").src == blackVue.onePixelUrl) el.style.zIndex = \"-3\"; // give .card[data-x=\"2\"] more clickable espace\n el.onclick = function(e){\n // check if click was trigged by real click or mouseleave\n console.log(\"click next\",self.cursorState);\n blackVue.lastScrollDirection.direction = \"right\"\n if(self.cursorState == \"click\" && el.querySelector(\".image-card\").src != blackVue.onePixelUrl) {\n self.target.dispatchEvent(new CustomEvent(\"next\", {detail: {type: \"keyboard\"}}));\n }\n }\n });\n }\n // change zIndex of highlighted card // move card to back in case carousel stack on empty card\n let highlighted = document.querySelector('.card[data-x=\"0\"]');\n if(blackVue.dataImages.length < 5 && highlighted.querySelector(\".image-card\").src == blackVue.onePixelUrl) highlighted.style.zIndex = \"-3\";\n }", "title": "" }, { "docid": "ca3628c1ae94de07b9bfca6a8e60b90b", "score": "0.6558347", "text": "function scrollStep() {\n animateScrollPlane(new AnimateTask(\"scroll-button-clicked\", 50, 0, true, callScroll ))\n}", "title": "" }, { "docid": "52853b39bf8e4127b864a977435037be", "score": "0.65425384", "text": "setupScrollCards(){\n\n const cardLists = document.querySelectorAll(\".content-list\");\n\n cardLists.forEach(list => {\n\n list.parentElement.addEventListener(\"scroll\",(e) => {\n\n this.updateScrollCard(e.target);\n\n });\n\n this.updateScrollCard(list.parentElement);\n\n })\n\n }", "title": "" }, { "docid": "992f0274da0f621fe43123e1d50a3b9a", "score": "0.6520952", "text": "scrollToNext() {\n const scrollPosition = this.scrollContainer.scrollLeft;\n const current = this.scrollStops.findIndex(stop => Math.abs(stop) >= Math.abs(scrollPosition));\n const outOfView = this.scrollStops.findIndex(stop => Math.abs(scrollPosition) + this.width <= Math.abs(stop));\n let nextIndex = current;\n\n if (outOfView > current + 2) {\n nextIndex = outOfView - 2;\n } else if (current < this.scrollStops.length - 2) {\n nextIndex = current + 1;\n }\n\n this.scrollToPosition(this.scrollStops[nextIndex], scrollPosition);\n }", "title": "" }, { "docid": "608ce732b686191c028c88e81b6233e1", "score": "0.6508704", "text": "function adjust() {\n var scrollLeft = windowc.pageXOffset || windowc.scrollLeft;\n // var scrollPercent = scrollLeft/(stackWidth-window.innerWidth) || 0;\n var scrollPercent = scrollLeft/4105 || 0;\n\n stack.style.transform = \"rotate(-13deg) translateY(\"+\n scrollPercent * 900\n + \"px)\";\n\n\n // show info for active card\n var currentSlot = Math.floor(scrollLeft/scrollJump);\n // cards[currentSlot].focus();\n if ((scrollLeft/scrollJump) === Math.floor(scrollLeft/scrollJump)){\n cards[currentSlot].focus();\n }\n\n // console.log(currentSlot);\n\n // stop vertical scrool. super-jittery\n // if (document.body.scrollTop!=0) {\n // document.body.scrollTop = 0;\n // }\n }", "title": "" }, { "docid": "cd62f844ed67c314ca7d892fbe1d2e97", "score": "0.65032035", "text": "checkShowScrollButtons () {\n const cardBody = this.props.container.querySelector('.ant-card-body');\n const maxScroll = cardBody.scrollWidth - cardBody.clientWidth;\n this.setState({\n disableScrollLeft: cardBody.scrollLeft > 0,\n disableScrollRight: cardBody.scrollLeft < maxScroll,\n show: cardBody.scrollWidth > cardBody.clientWidth\n });\n }", "title": "" }, { "docid": "f4605d4ee2d553ee0ef857d3332eb3f0", "score": "0.6453097", "text": "function nextcard()\n {\n \t//checking if the nextslide num that less than total card\n if(next_card<totalcards)\n {\n //getting the amount of the distance to move the slider\n let dis=cards[next_card].style.left;\n //moving the slider\n slider.style.transform=\"translateX(-\"+dis+\")\";\n //setting the prev_card to next_card\n prev_card=next_card;\n if(next_card+num_cards>=totalcards)\n {\n next_button.style.display=\"none\";\n }\n //if not increase the next card by num of card\n else\n {\n next_card+=num_cards;\n }\n //when user press the next button setting the prev button to visible \n prev_button.style.display=\"inline\"; \n }\n }", "title": "" }, { "docid": "f69f6ea336cbcf8ed37bde6b24e430b0", "score": "0.64087516", "text": "function Carousel() {\n let [arr, setArr] = useState(data.cards.filter((e, i) => i >= 0 && i <= 3));\n let [idx, setIdx] = useState(0);\n\n //updates the current array to show next item on next button click\n function onInr(idx) {\n idx = Math.min(idx + 1, data.cards.length - 4);\n setArr(data.cards.filter((e, i) => i >= idx && i <= idx + 3));\n setIdx(idx);\n }\n\n //updates the current array to show prev item on previous button click\n function onDcr(idx) {\n idx = Math.max(idx - 1, 0);\n setArr(data.cards.filter((e, i) => i >= idx && i <= idx + 3));\n setIdx(idx);\n }\n\n return (\n <div className=\"row justify-content-center m-0\">\n {idx === 0 ? null : (\n <div\n onClick={() => onDcr(idx)}\n className=\"align-self-center btn bg-light p-3\"\n >\n <img\n src=\"resources/cards/previous-page.svg\"\n alt=\"Previous Page\"\n />\n </div>\n )}\n {arr.map((card) => (\n <Card name={card.name} url={card.url} key={uuid()} />\n ))}\n {idx === data.cards.length - 4 ? null : (\n <div\n onClick={() => onInr(idx)}\n className=\"align-self-center btn bg-light p-3 ml-4 next-btn-div\"\n >\n <img\n src=\"resources/cards/next-page.svg\"\n alt=\"Next Page\"\n />\n </div>\n )}\n </div>\n );\n}", "title": "" }, { "docid": "286b3fb2486ab46ca81f91a2e5bb7831", "score": "0.63734704", "text": "_onExecuteForward() {\n this.scrollBy(this.getScrollStep());\n }", "title": "" }, { "docid": "92ccab2faec00d252ad647582bedbced", "score": "0.6371993", "text": "scrollPrev() {\n if (this.currentX === 0) {\n this.currentY -= 1\n this.currentX = 2\n } else {\n this.currentX -= 1\n }\n this.viewTile()\n }", "title": "" }, { "docid": "b65b29cd7d91a262be8a65d0bfc8a5a7", "score": "0.63146275", "text": "scroll(){\n\n\t}", "title": "" }, { "docid": "16a0dc46d1e35159e9166b1d942d08a8", "score": "0.62425965", "text": "function carousel(element){\n previous.addEventListener('click', ()=>{\n if(imageIndex !== 1){\n imageIndex--;\n translateX += 680;\n }\n element.style.transform = `translateX(${translateX}px)`\n });\n next.addEventListener('click', ()=>{\n if(imageIndex !== numberOfCards){\n imageIndex++;\n translateX -= 680;\n }\n element.style.transform = `translateX(${translateX}px)`\n });\n}", "title": "" }, { "docid": "f6e4d10b58ce6f8da1288e72e366df90", "score": "0.6207783", "text": "function JumpScroll({ reviewList }) {\n return (\n <div className=\"readReviews\">\n <div onClick={() => scroll.scrollTo(1500)}>\n Read {reviewList.length} Reviews\n </div>\n </div>\n );\n}", "title": "" }, { "docid": "6caa5dfc0f7e494ad230b63dd2a1afae", "score": "0.61965597", "text": "componentDidUpdate() {\n const carousel = document.querySelector('.Carousel');\n carousel.addEventListener('scroll', this.handleScroll);\n // immediately call the handle scroll function to focus on the first card\n this.handleScroll();\n }", "title": "" }, { "docid": "daa3ba5c1d79b0ebc05d0e871ddfdfe3", "score": "0.6195255", "text": "function onCardClick(card, i) {\n\n navcheck =true;\n comeback=true;\n // set the current card\n currentCard = card;\n // add the 'clicked' class to the card, so it animates out\n currentCard.className += 'clicked';\n // animate the card 'cover' after a 500ms delay\n setTimeout(function() {animateCoverUp(currentCard)}, 500);\n // animate out the other cards\n animateOtherCards(currentCard, true);\n // add the open class to the page content\n openContent.className += ' open';\n\n pronum=i;\n\n next.addEventListener('click',function(e){\n if(i>=nCards-1)\n i=0;\n else\n i=i+1;\n\n onNextClick(i);});\n\n prev.addEventListener('click',function(e){\n if(i<=0)\n i=nCards-1;\n else\n i=i-1;\n\n onNextClick(i);});\n\n}", "title": "" }, { "docid": "55ee86c4951ed96cae81d9393b7ebd07", "score": "0.6182086", "text": "handleReviewClick() {\n const section = document.querySelector('#reviews');\n\n if (section) {\n scroll.scrollTo(section.offsetTop - 130, {\n smooth: 'easeInOutQuint'\n });\n }\n }", "title": "" }, { "docid": "1560991f7723f49f74cbc0b1a8c01742", "score": "0.61820674", "text": "function scrollWhenFound() {\n if (!cardInView.changed) {\n return;\n }\n let cardElemId = 'card'+cardInView.value;\n let elem = document.getElementById(cardElemId);\n if (!elem) { // Try again later\n window.setTimeout(scrollWhenFound, 100);\n return;\n }\n elem.scrollIntoView();\n cardInView.done();\n }", "title": "" }, { "docid": "c1bdf47d9d5448bd7b12f1c5bb375255", "score": "0.6124003", "text": "function demonstrateScroll() {\n STORE.demoCompleted = true;\n let width = $('body').outerWidth();\n if (width < 720) {\n setTimeout(() => {\n let bottom = $('main').find('#bottom .cards');\n bottom.animate({\n scrollLeft: bottom.outerWidth() / 2\n }, {\n duration: 800,\n complete: () => {\n bottom.animate({ scrollLeft: 0 }, 800);\n }\n });\n }, 400);\n }\n}", "title": "" }, { "docid": "b2a6a1cdf26c3b00f163419624fc36af", "score": "0.6111551", "text": "function next() {\n console.log('next')\n navigateCarousel(1);\n }", "title": "" }, { "docid": "33b53dc7d3dfb07b46c4a2c519ce4d7d", "score": "0.60876465", "text": "function handleScroll() {\n showBackToTop();\n showSection();\n handleDivider();\n}", "title": "" }, { "docid": "6fbeeb7fc41b63ddc8543c12c678d398", "score": "0.60867304", "text": "function _clickCarousel(direction) {\n currentPosition = _getTranslateX(); // get current translateX value\n switch(direction){\n case 'left':\n\n moveRight.style.opacity = '1';\n moveRight.style.pointerEvents = 'all';\n\n if(currentPosition + cardWidth >= lim.rightLimit) {\n //cuando esta al tope izquierdo oculto el boton de ese mismo lado\n moveLeft.style.opacity = '0';\n moveLeft.style.pointerEvents = 'none';\n }\n\n distancePosition = currentPosition + cardWidth;\n _moveCarousel();\n\n break;\n case 'right':\n\n moveLeft.style.opacity = '1';\n moveLeft.style.pointerEvents = 'all';\n\n if(currentPosition - cardWidth <= lim.leftLimit) {\n //cuando esta al tope derecho oculto el boton de ese mismo lado\n moveRight.style.opacity = '0';\n moveRight.style.pointerEvents = 'none';\n }\n\n distancePosition = currentPosition - cardWidth;\n _moveCarousel();\n\n break;\n }\n }", "title": "" }, { "docid": "7457cbeca7651b0ba9e8093679c43eb3", "score": "0.6069745", "text": "function scrollToNextPage(e) {\n // TODO\n }", "title": "" }, { "docid": "9191f49c948c5f165bcae58dee39c1f8", "score": "0.6063068", "text": "function quickSlide() {\n\t\t\t\t$objectCache.grid.scrollTo('.row-' + activeFrame.row + ' > .col-' + activeFrame.col, 750, {\n\t\t\t\t\teasing: 'easeOutExpo'\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "2a09cb906c40ad8beb2ee4ff084db101", "score": "0.6062591", "text": "_onScroll() {\n this._updateArrowsEnabled();\n }", "title": "" }, { "docid": "ca8f89f9ac10dc93685b91b4add2a1d1", "score": "0.6024898", "text": "handleScroll(e) {\n \n }", "title": "" }, { "docid": "421f430cca1da5b1298f433426431f65", "score": "0.6020953", "text": "function scrollGalleryDown() {\n $('#project-carousel-' + projectId).find('.owl-next').trigger('click');\n if($('#project-carousel-' + projectId + ' .owl-item:last-child').hasClass('active')){\n $('.arrow-gallery-down').hide();\n } else{\n $('.arrow-gallery-down').show();\n }\n if($('#project-carousel-' + projectId + ' .owl-item:not(first-child)').hasClass('active')){\n $('.arrow-gallery-up').show();\n };\n }", "title": "" }, { "docid": "ae1bc4ab6a3e4ee13f786b32b1ade41d", "score": "0.6016022", "text": "function wp_manga_scroll_on_click(){\n\t\tif($('body').hasClass('click-to-scroll')){\n\t\t\t$('.manga-reading-list-style .chapter-type-manga .reading-content').on('click', function(){\n\t\t\t\t$('html, body').animate({scrollTop: $(document).scrollTop() + 500 }, 200);\n\t\t\t});\n\t\t\t\n\t\t\t$('.chapter-type-text .reading-content').on('click', function(){\n\t\t\t\t$('html, body').animate({scrollTop: $(document).scrollTop() + 500 }, 1000);\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "df16d285af11dce5a49fdd7cf9a198f7", "score": "0.6013208", "text": "setEventListeners() {\n document.getElementsByClassName('m-prev-button')[0].addEventListener('click', () => {\n document.getElementsByClassName('artists-section')[0]\n .scrollBy({left: -360, behavior: 'smooth'});\n });\n document.getElementsByClassName('m-next-button')[0].addEventListener('click', () => {\n document.getElementsByClassName('artists-section')[0]\n .scrollBy({left: 360, behavior: 'smooth'});\n });\n }", "title": "" }, { "docid": "b612830ed34887d6b3378edaaff8294c", "score": "0.6011521", "text": "navigateSlide(dir){\n var contentLen = this.props.content.length;\n //return if 3 or less content dislayed\n if(contentLen <= 3 ) { return; }\n var displayable = this.state.displayable;\n var newIndices;\n\n if(dir===\"next\"){\n var lastContentDisplayed = this.checkIfEndOfSlide(displayable);\n newIndices = displayable.map((item, index) => {\n if(lastContentDisplayed > -1){\n //content at end of slide [content.length-1]\n return lastContentDisplayed == item ? 0 : ++item;\n }else{\n return ++item;\n }\n });\n }else if(dir===\"back\"){\n var firstContentDisplayed = this.checkIfStartOfSlide(displayable);\n newIndices = displayable.map((item, index) => {\n if(firstContentDisplayed > -1){\n //content at index 0 of content[] is displayed\n return firstContentDisplayed == item ? contentLen-1 : --item;\n }else{\n return --item;\n }\n });\n }\n this.setState({\n displayable: newIndices\n })\n }", "title": "" }, { "docid": "03892285ff0a7914681ed3d922a48a1e", "score": "0.60010767", "text": "function scroll() {\n slotScroller.scrollTop(top);\n }", "title": "" }, { "docid": "569aa5f132120b6db1452b64214561f3", "score": "0.5999683", "text": "scrollHalfPageDown() {\n var rowCount = Math.floor(this.visibleRowCount() / 2);\n for (let i = 0; i < rowCount; i++) {\n UI.typeKey(KeyboardUtils.keyCodes.downArrow)\n }\n }", "title": "" }, { "docid": "1f34afabee6ec7714fb82d4cf24231f7", "score": "0.59931254", "text": "next() {\n this.slideRef.current.goNext();\n }", "title": "" }, { "docid": "cce49ddf8f639edc2eb81d57c5e2bfa8", "score": "0.59669024", "text": "scrollToObject () {\n\t\t//TODO: implement method\n\t}", "title": "" }, { "docid": "a73b046497773b3ec0840850c93f83b5", "score": "0.5960536", "text": "scrollToExercise(position) {\n this._scroll.scrollTo({y: position});\n }", "title": "" }, { "docid": "540d3030db9d2a1d8edd026ab840dcd8", "score": "0.5955192", "text": "function scrollNext(el) {\n if (body.hasClass('is-mobile')) {\n $('html, body').animate({\n scrollTop: $(el).offset().top - 150\n });\n }\n }", "title": "" }, { "docid": "be37c2602234298ac5e76b02eb491c8d", "score": "0.5916814", "text": "function autoScroll() {\n let current = document.querySelector('.active');\n let next = current.nextElementSibling;\n\n if ( next == null ) {\n let revolver = document.querySelector('.front-sentinel');\n let move = revolver.style.left;\n carousel.style.transform = 'translateX(-' + move + ')';\n current.classList.remove('active')\n revolver.classList.add('active')\n return \n }\n else {\n let move = next.style.left\n carousel.style.transform = 'translateX(-' + move + ')';\n current.classList.remove('active');\n next.classList.add('active');\n }\n}", "title": "" }, { "docid": "305136ba84411dc56ee458eea77dc1a8", "score": "0.59159064", "text": "function nextScroll() {\n jQuery17(\"#prev\").show();\n var last = getLastVisible(jQuery17(\"#article-slider li\")).attr('data-carousel-index');\n if (last === LAST_INDEX) {\n jQuery17(\"#next\").hide();\n }\n\n }", "title": "" }, { "docid": "21a91c602b0b70922e1b872ba06713a7", "score": "0.5905081", "text": "scrollTo() {\n scroller.scrollTo('scroll-to-element', {\n duration: 800,\n delay: 0,\n smooth: 'easeInOutQuart'\n })\n }", "title": "" }, { "docid": "17f57dae6f3376c030d686413fa9328a", "score": "0.589303", "text": "scrollToElement() {\r\n let len = this.$refs.listItem.length;\r\n let al = this.$refs.listItem[len - 1]; //gets all items with the class \"listItem\", specifically the last one\r\n if (al) {\r\n //scroll into the view of that item\r\n al.scrollIntoView(true);\r\n }\r\n }", "title": "" }, { "docid": "b2525bf616767cbc52e24afa20fd24d3", "score": "0.5886694", "text": "createPagination () {\r\n let pagination = this.createDivWithClass('carousel__pagination')\r\n let buttons = []\r\n this.root.appendChild(pagination)\r\n for(let i = 0; i < (this.items.length - 2 * this.offset); i = i + this.options.slidesToScroll){\r\n let button = this.createDivWithClass('carousel__pagination__button')\r\n button.addEventListener('click', () => this.gotoItem(i + this.offset))\r\n pagination.appendChild(button)\r\n buttons.push(button)\r\n\r\n }\r\n this.onMove(index => {\r\n let count = this.items.length - 2 * this.offset\r\n let activeBtn = buttons[Math.floor(((index - this.offset) % count) / this.options.slidesToScroll)]\r\n if(activeBtn){\r\n buttons.forEach(button => button.classList.remove('carousel__pagination__button--active'))\r\n activeBtn.classList.add('carousel__pagination__button--active')\r\n }\r\n })\r\n }", "title": "" }, { "docid": "0eb8c48660ef3ee86fd3506e4d4039dd", "score": "0.58767706", "text": "function carouselMove (num) {\n \n if (num > 0) {\n\n if (posCar > 2) {\n posCar = 2;\n } \n\n if (posCar == 2) {\n nextBtn.style.opacity = '0.5';\n prevBtn.style.opacity = '1';\n } else {\n nextBtn.style.opacity = '1';\n prevBtn.style.opacity = '1';\n }\n\n children[posCar].style.display = 'none';\n children[posCar+3].style.display = 'block';\n posCar +=1 ;\n } \n \n if (num < 0) {\n\n if (posCar < 1) {\n posCar = 1;\n }\n\n if (posCar == 1) {\n prevBtn.style.opacity = '0.5';\n nextBtn.style.opacity = '1';\n } else {\n prevBtn.style.opacity = '1';\n nextBtn.style.opacity = '1';\n }\n\n children[posCar+2].style.display = 'none';\n children[posCar-1].style.display = 'block';\n posCar -=1 ;\n }\n}", "title": "" }, { "docid": "74c2788b09462eb358ff5c9d4a71fe1d", "score": "0.5867436", "text": "function scrollArrow() {\n window.scroll(0, 500);\n}", "title": "" }, { "docid": "5df10d20fb912974fa304ba77c8e10ed", "score": "0.5862998", "text": "function card_area_scroll_right()\n{\n\tvar elmnt = document.getElementById(\"cards_area\");\n\telmnt.scrollLeft += 50;\n}", "title": "" }, { "docid": "03e6c64036c6c22fe7db244d966f6f52", "score": "0.58600324", "text": "function arrowClick(tgt_modal, direction, value) {\n\n // setup a click handler for the \"direction\" given.\n $('.' + direction + '-arrow').on('click', function () {\n\n // close the curent modal.\n $('[modal=\"' + tgt_modal.class + '\"]').hide();\n\n // holds the index of the next modal to open.\n var index = parseInt(tgt_modal.class) + value;\n\n // if at either end of the list go to the other end.\n if (index > 11) {\n index = 0;\n }\n if (index < 0) {\n index = 11;\n }\n\n // while \"index\" is on a hidden card move to the next card.\n while ($('.card-' + index).css('display') === 'none') {\n index += value;\n\n // if at either end of the list go to the other end.\n if (index > 11) {\n index = 0;\n }\n if (index < 0) {\n index = 11;\n }\n }\n\n // display card and update \"tgt_modal.class\"\n $('[modal=\"' + index + '\"]').show();\n tgt_modal.class = index.toString();\n });\n}", "title": "" }, { "docid": "dc6fef7ae467a888ab3a91bb4e32bc0b", "score": "0.5855705", "text": "addButtonClicks(articles, itemCount) {\n this.buttonLeft.addEventListener('click', () => {\n this.itemStart--;\n this.populateCarousel(articles, itemCount);\n });\n this.buttonRight.addEventListener('click', () => {\n this.itemStart++;\n this.populateCarousel(articles, itemCount);\n });\n }", "title": "" }, { "docid": "4e67df5ae440ce180d96fa93cb12e9d2", "score": "0.5851434", "text": "handleScroll (e) {\n }", "title": "" }, { "docid": "050e8e23e6decc0fe4bd7489da0ba114", "score": "0.584618", "text": "scroll (direction = 1) {\n\n }", "title": "" }, { "docid": "effcfdb25c77678af056077b9c12ab04", "score": "0.5838393", "text": "function scrolling() {\n hamburgler();\n scrollingLinkColor();\n}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "3dd6dfcdf5b298564d6e6c19e858ff90", "score": "0.5833652", "text": "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "title": "" }, { "docid": "e944999750d6795b2da1d47d310c50e8", "score": "0.5822662", "text": "function scrollNextPanel(elementClick){\n if($('.panelFromTransfer').length || $('.funds').length){//lo hacemos independiente del script de notificaciones\n var posBottomPanel = $(elementClick).closest('.panel').offset().top;\n var posNextPanel = posBottomPanel + $(elementClick).closest('.panel').outerHeight() - 30;\n $(\"html,body\").animate({scrollTop: posNextPanel});\n }\n }", "title": "" }, { "docid": "da6e8dea8b1b878e594b9e239fe51c8e", "score": "0.58208627", "text": "function nextCard() {\n\tconsole.log('Running nextCard');\n\tif (cardIndex < currentCards.length - 1) {\n\t\tcardIndex++;\n\t\tcardContent.innerText = catIndex.cards[cardIndex];\n\t\tif (cardIndex < 9) {\n\t\t\tfcNum.innerText = '0' + (cardIndex + 1);\n\t\t\tTweenLite.to(cardContent, 1, {\n\t\t\t\tx: 300,\n\t\t\t\topacity: 1\n\t\t\t});\n\t\t} else {\n\t\t\tfcNum.innerText = (cardIndex + 1);\n\t\t\tTweenLite.to(cardContent, 1, {\n\t\t\t\tx: 300,\n\t\t\t\topacity: 1\n\t\t\t});\n\t\t}\n\t} else if (cardIndex === currentCards.length - 1) {\n\t\tcardIndex = 0;\n\t\tcardContent.innerText = catIndex.cards[cardIndex];\n\t\tfcNum.innerText = '0' + (cardIndex + 1);\n\t\tTweenLite.to(cardContent, 1, {\n\t\t\tx: 300,\n\t\t\topacity: 1\n\t\t});\n\t}\n}", "title": "" }, { "docid": "eace1c769bf435e0a3493ef353750452", "score": "0.5816955", "text": "function moveDown() {\n var currentPage = $pages.filter('.active').index();\n moveTo(currentPage+2);\n }", "title": "" }, { "docid": "4c47119eb2ff071001eba403f653e7f5", "score": "0.5811842", "text": "function scrollToAnswer() {\n let width = $('body').outerWidth();\n if (width < 720) {\n let bottom = $('main').find('#bottom .cards');\n\n // selected answer offset\n let selectedOffset = $('main').find('input:checked').closest('.card').offset().left;\n bottom.scrollLeft(selectedOffset - 60);\n\n // correct answer offset\n let correctOffset = $('main').find('.card-correct').offset().left;\n bottom.animate({ scrollLeft: correctOffset - 60 }, 500);\n }\n}", "title": "" }, { "docid": "b6ae8350885c7adab76562135f5960c9", "score": "0.5798391", "text": "function setKeyboardFn(prev, next) {\n document.addEventListener(\"keydown\", (e) => {\n if ((e.which === 37) || (e.which === 39)) {\n const timelinehorizontalOfTop = timelinehorizontal.offsetTop;\n const y = window.pageYOffset;\n if (timelinehorizontalOfTop !== y) {\n window.scrollTo(0, timelinehorizontalOfTop);\n }\n if (e.which === 37) {\n prev.click();\n } else if (e.which === 39) {\n next.click();\n }\n }\n });\n }", "title": "" }, { "docid": "ba86df89e7549170dccacd1c5a8999c2", "score": "0.579423", "text": "function changePage (goodsArr) {\n pagination.addEventListener(\"click\", function clickPagination (event) {\n let target = event.target;\n\n if (target.getAttribute(\"id\") === 'next' && pageIndex < 4) {\n pageIndex++;\n }\n if (target.getAttribute(\"id\") === 'previous' && pageIndex > 1) {\n pageIndex--;\n }\n if (target.getAttribute(\"id\") !== 'previous'\n && target.getAttribute(\"id\") !== 'next') {\n pageIndex = +(target.innerHTML);\n }\n renderCards(goodsArr);\n });\n}", "title": "" }, { "docid": "c9eb469425b6e62ba1841d15899ca537", "score": "0.578575", "text": "function prevcard()\n {\n \n if(prev_card>0)\n {\n next_card=prev_card;\n prev_card-=num_cards;\n //getting the amount of the distance to move the slider\n let dis=cards[prev_card].style.left;\n slider.style.transform=\"translateX(-\"+dis+\")\";\n if(prev_card==0)\n {\n \t//if no prev card is hide the prev button\n \t prev_button.style.display=\"none\";\n }\n next_button.style.display=\"inline\";\n }\n }", "title": "" }, { "docid": "11c800dd37b8bc51fbc0c61008753d82", "score": "0.57826966", "text": "handleScroll() {\n const shuffleBlock = this.shadowRoot.querySelector('.shuffle');\n const shuffleBlockOffset = shuffleBlock.offsetTop + shuffleBlock.clientHeight - 2; // add -2 to trigger slightly before .shuffle ends\n const pageOffset = window.pageYOffset + window.innerHeight;\n\n if (pageOffset > shuffleBlockOffset) {\n // console.log('end of page scroll detected');\n this.loadMoreCards();\n }\n }", "title": "" }, { "docid": "6d90665ae98dae6bbf9b848630402793", "score": "0.57777715", "text": "function onNextButtonClick(objButton) {\n\n\t\tif (g_functions.isButtonDisabled(objButton))\n\t\t\treturn (true);\n\n\t\tif (g_options.strippanel_buttons_role == \"advance_item\")\n\t\t\tg_gallery.nextItem();\n\t\telse\n\t\t\tg_objStrip.scrollForeward();\n\t}", "title": "" }, { "docid": "4007b6afd6e49365e7a2cbefafe15baa", "score": "0.57747674", "text": "executeScrollFunctions() {\r\n const grid = this.$el.querySelector(\".collection-list\");\r\n const height = window.innerHeight;\r\n const domRect = grid.getBoundingClientRect();\r\n const triggerAmount = height - domRect.bottom;\r\n const body = document.body.getBoundingClientRect();\r\n\r\n this.scrollHeight = body.top;\r\n\r\n //show next page of pagination list\r\n this.appendItems(triggerAmount);\r\n }", "title": "" }, { "docid": "714700f991c7145f27cf5e3daab3cb5d", "score": "0.5773445", "text": "function handleNext() {\n let scrollX = sliderScrollX - Math.round(window.innerWidth / 2)\n let listItems = movies.length * 339\n\n if (window.innerWidth - listItems > scrollX) {\n scrollX = window.innerWidth - listItems\n }\n\n setSliderScrollX(scrollX)\n }", "title": "" }, { "docid": "0740b0dbf9bfdfa0c7b7b8db4c212a8f", "score": "0.5768336", "text": "clickArrow(e) {\n switch (e.target.id) {\n case \"arrPrev\":\n this.state.prev();\n break;\n\n case \"arrNext\" :\n this.state.next();\n break;\n\n default:\n return\n }\n }", "title": "" }, { "docid": "7499eeb48c575358f59d185874a9fa34", "score": "0.57655877", "text": "function hideScrollingCards(card) {\n jQuery(\"#S\"+card).hide();\n jQuery(\"#H\"+card).hide();\n jQuery(\"#D\"+card).hide();\n jQuery(\"#C\"+card).hide();\n}", "title": "" }, { "docid": "b4a685591eb3651d03220ff93be190c4", "score": "0.5764507", "text": "static scrollTop() {\n MainApp.scrollBtn.forEach(function (el) {\n el.addEventListener('click', function (e) {\n window.scrollTo({\n top: 0,\n behavior: 'smooth'\n });\n });\n });\n }", "title": "" }, { "docid": "345a0508ef267a614c50a30a34f8b730", "score": "0.5760553", "text": "function cardLerMais (c1,c2,st)\n{\n // $(\".sobre-livro\").hide();\n $(c1).hide();\n var t =\"\";\n\n // $(\".card-ler-mais\").on(\"click\",function()\n $(c2).on(\"click\",function()\n {\n var id = $(this).attr(\"data-target\");\n if(t=='')\n {\n t=id;\n $(id).show();\n $(id).css({float: \"left\"});\n }\n else\n {\n if(t==id)\n {\n $(id).hide();\n t='';\n }\n else\n {\n $(t).hide();\n $(id).show();\n t=id;\n }\n }\n var p = parseInt($(this).position().top);\n setTimeout\n (function()\n {\n $(document).scrollTop(p-st);\n },0\n );\n });\n}", "title": "" }, { "docid": "801b5f40f04476a8fb3d5c3aca4bfeb4", "score": "0.5756875", "text": "goNext() {\n this.onClickAnalytics(`${ARROW_RIGHT}`, '');\n if (this.swiper.current.swiper) this.swiper.current.swiper.slideNext();\n }", "title": "" }, { "docid": "d2e9fa9b42ee31de15129e1771d5595e", "score": "0.57565695", "text": "function setKeyboardFn(prev, next) {\n document.addEventListener(\"keydown\", e => {\n if (e.which === 37 || e.which === 39) {\n const timelineOfTop = timeline.offsetTop;\n const y = window.pageYOffset;\n if (timelineOfTop !== y) {\n window.scrollTo(0, timelineOfTop);\n }\n if (e.which === 37) {\n prev.click();\n } else if (e.which === 39) {\n next.click();\n }\n }\n });\n }", "title": "" }, { "docid": "1d3faf4d07783498cc68511b739ab79f", "score": "0.57561177", "text": "next () {\n this.goTo(this.getCurrentIndex() + 1);\n }", "title": "" }, { "docid": "8afb7436ddbd431ac123b176a2c4e6c6", "score": "0.5755552", "text": "function moveNext(fakeClick, indexNext) {\n for (var i = 0; i < fakeClick; i++) {\n $(\".c-main\").css({\n left: \"-=100%\"\n });\n $(\".c-paginator__month\").css({\n left: \"-=100%\"\n });\n switch (true) {\n case indexNext:\n indexMonth += 1;\n break;\n }\n }\n }", "title": "" }, { "docid": "f274955c41343fbcd38474de836af7ff", "score": "0.57503134", "text": "getStartedFunc() {\n\n let cardDiv = document.getElementsByClassName('cardScrollDiv')[0]\n cardDiv.style.display = 'inherit';\n cardDiv.style.transition = '2s';\n cardDiv.style.opacity = 1;\n\n let dailyCard = document.getElementById('dailyCardDiv');\n dailyCard.style.display = \"none\";\n\n let pickCard = document.getElementById('pickACardDiv');\n let bsRow = document.getElementById('bootStrapRow');\n // bsRow.style.display = \"none\";\n pickCard.style.width = \"100%\";\n pickCard.style.overflowX = \"initial\";\n\n }", "title": "" }, { "docid": "d1eb6bc50fbe3bab209fdc61495cfbc8", "score": "0.57502913", "text": "function arrowDown() {\n $(\".arrow-down\").on(\"click\", function() {\n var banner = $(this).parent().height();\n $(\"html, body\").animate({\n scrollTop: banner\n }, 250);\n return false;\n });\n }", "title": "" }, { "docid": "77a43b013763efb100b9ddc96c74c30d", "score": "0.57464033", "text": "next() {\n if (this.disabled) return;\n const element = this.shadowRoot.querySelector('#container');\n let total = this.total;\n if (this.selected < --total || this.loop) {\n this._setAnimating(true);\n element.selectNext();\n }\n }", "title": "" }, { "docid": "3d5e2ba8a46a84c8369e1574146313ed", "score": "0.5744069", "text": "arrowKeys(e) {\n if (e.keyCode === 39) {\n this.nextSlide();\n } else if (e.keyCode === 37) {\n this.previousSlide();\n }\n }", "title": "" }, { "docid": "c4c3f2555e94d9a8dede926dc4efb520", "score": "0.5741777", "text": "scrollIntoView(item) {\r\n let iv = this.i.c9(item);\r\n return (iv);\r\n }", "title": "" }, { "docid": "c4c3f2555e94d9a8dede926dc4efb520", "score": "0.5741777", "text": "scrollIntoView(item) {\r\n let iv = this.i.c9(item);\r\n return (iv);\r\n }", "title": "" }, { "docid": "4f952d75bf3105062f884f99c825d775", "score": "0.5740587", "text": "handleClick() {\n scrollToComponent(this.className);\n }", "title": "" }, { "docid": "7b7614d9dd1d341615df8c9e572c8367", "score": "0.57396907", "text": "function handleNextPage(){\n setIndex(index + showAmount)\n }", "title": "" }, { "docid": "8c248dea9d77e9ea3de3de600cb699fa", "score": "0.57369626", "text": "function next_card()\n{\n console.log(\"Flip next card.\");\n\n var last_card_index = stock.cards.length - 1;\n var move_card = stock.cards.slice(last_card_index);\n move_card[0].face = \"front\";\n waste.cards = waste.cards.concat(move_card);\n stock.cards = stock.cards.slice(0, last_card_index);\n\n moves++;\n draw_page();\n}", "title": "" }, { "docid": "35169b27ddbdaef5f889d1d685348016", "score": "0.5732905", "text": "function Ascroll(){\n}", "title": "" }, { "docid": "28a24034318dcd956a062da249866fa1", "score": "0.5726876", "text": "function callNext(to, dest, down) {\r\n\t \r\n\t return function() { scrollStep(to, dest, down); };\r\n\t }", "title": "" }, { "docid": "c7ee2bec9c515906a2b359334b5d0330", "score": "0.5723046", "text": "function addModalToggleListeners(index){\n\n //\"next\" button\n const nextButton=document.querySelector('#modal-next');\n nextButton.addEventListener('click', () => {\n const i=getNextIndex(index);\n cards[i].dispatchEvent(new Event(\"click\"));\n\n });\n\n //\"prev\" button\n const prevButton = document.querySelector('#modal-prev');\n prevButton.addEventListener('click', () => {\n const i = getPrevIndex(index);\n cards[i].dispatchEvent(new Event(\"click\")); \n }); \n\n}", "title": "" }, { "docid": "a0b4741aab7ae5a8de72719b5706b1be", "score": "0.5719465", "text": "function arrowUpdater() {\n $('section').each(function (index) {\n\n // Assign height and position variables\n let sectionTop = $(this).position().top;\n let sectionHeight = $(this).outerHeight();\n const scrollPosition = $(document).scrollTop();\n\n // Adjust intro section height\n sectionHeight = (index === 0) ? sectionHeight - sectionViewGap: sectionHeight;\n\n // Adjust about section position and height\n if (index === 1) {\n sectionTop -= sectionViewGap;\n sectionHeight += sectionViewGap;\n }\n\n \n // Condition checks that the element is in view, and assigns new index to arrows\n if(sectionTop <= scrollPosition && (sectionTop + sectionHeight) > scrollPosition) {\n\n const prevIndex = Math.max(0, index - 1);\n const nextIndex = Math.min(index + 1, $('section').get().length - 1);\n\n $('#up-arrow').attr('href','#' + $('section').eq(prevIndex).attr('id'));\n $('#down-arrow').attr('href','#' + $('section').eq(nextIndex).attr('id'));\n\n }\n });\n}", "title": "" } ]
934ac5dc13f58b2129fd37348b974e1a
function to broadcast the back button action
[ { "docid": "474713df9c5057e4cf80983d0656bd42", "score": "0.75606334", "text": "function broadCastHandleBack(){\n\t\t\t$rootScope.$broadcast(\"handleBack\");\n\t\t\t//history.back();\n\t\t}", "title": "" } ]
[ { "docid": "3b094bcee7daddf923e676bbc29053eb", "score": "0.781593", "text": "function handleBackButton(){\n\t\t\tbroadCastHandleBack();\n\t\t}", "title": "" }, { "docid": "500b5d6bbb2c04782ddaa38528c62e02", "score": "0.7485469", "text": "function broadCastHandleBack(){\n\t\t\t$rootScope.$broadcast(\"handleBack\", {'RequestRevisionSK':$stateParams.RequestRevisionSK});\n\t\t\t//history.back();\n\t\t}", "title": "" }, { "docid": "500b5d6bbb2c04782ddaa38528c62e02", "score": "0.7485469", "text": "function broadCastHandleBack(){\n\t\t\t$rootScope.$broadcast(\"handleBack\", {'RequestRevisionSK':$stateParams.RequestRevisionSK});\n\t\t\t//history.back();\n\t\t}", "title": "" }, { "docid": "5e3f3fe2886e26083f7aa7df4932cec2", "score": "0.745978", "text": "function BackButton() { }", "title": "" }, { "docid": "cbc47ff1fa06222e9ef1dbcef8076321", "score": "0.7454153", "text": "function handleBackButton(){\n\t\t\tnewRequestFactory.setRequest($scope.request);\n\t\t\tbroadCastHandleBack();\n\t\t}", "title": "" }, { "docid": "cbc47ff1fa06222e9ef1dbcef8076321", "score": "0.7454153", "text": "function handleBackButton(){\n\t\t\tnewRequestFactory.setRequest($scope.request);\n\t\t\tbroadCastHandleBack();\n\t\t}", "title": "" }, { "docid": "5b374f1efab0e4e818f0cf9135da9695", "score": "0.74454623", "text": "onBack_() {\n this.userActed('go-back');\n }", "title": "" }, { "docid": "a9675794fdcf4fefe07cb42efe34a2b8", "score": "0.743666", "text": "onBack(event) {\n this.$emit(\"back\", event);\n }", "title": "" }, { "docid": "be62c4693c6b2a20c2f3a2b82da66657", "score": "0.74228966", "text": "function bindBackButton() {\n var self = this;\n\n // Overwrite the onpopstate function\n window.onpopstate = function (e) {\n e.preventDefault();\n var top, href = '';\n\n if (self.PUSH_HISTORY.length > 1) {\n top = decodeURIComponent(self.PUSH_HISTORY.pop());\n }\n self.load(href = decodeURIComponent(self.PUSH_HISTORY[self.PUSH_HISTORY.length - 1]), self.lastTop);\n\n window.history.pushState({\n 'url': href\n }, '', href);\n\n return false;\n };\n }", "title": "" }, { "docid": "3c63f490843d01a7b3e107078c31ad5b", "score": "0.7255736", "text": "function back() {\n _navigator.dispatch(NavigationActions.back());\n}", "title": "" }, { "docid": "9d13b971ac53b93897fe38a36b3472b3", "score": "0.7237127", "text": "function onBackButtonTap() {\n console.log(\"back\");\n // topmost().goBack();\n}", "title": "" }, { "docid": "fc4b5f9a61a4f11620a67cd7d8b856f0", "score": "0.71647775", "text": "function handleBackButton(){\t\t\t\n\t\t\tresetFields();\n\t\t\tbroadCastHandleBack();\t\t\t\n\t\t}", "title": "" }, { "docid": "4169ad1cedb6ae0eada56976628dde3d", "score": "0.71531135", "text": "onEulaBackButtonPressed_() {\n this.userActed('back-button');\n }", "title": "" }, { "docid": "0a5ef3e012fd5ce50d1fbee761993822", "score": "0.7149931", "text": "goBackHandler() {\n this.goBack();\n }", "title": "" }, { "docid": "a6e07da3e32e14873c16f84b1ba452a2", "score": "0.7121167", "text": "function handleBackButton(){\n\t\t\tresetFields();\n\t\t\tbroadCastHandleBack();\n\t\t}", "title": "" }, { "docid": "a6e07da3e32e14873c16f84b1ba452a2", "score": "0.7121167", "text": "function handleBackButton(){\n\t\t\tresetFields();\n\t\t\tbroadCastHandleBack();\n\t\t}", "title": "" }, { "docid": "3bc2bcb048b0b33ecb1dbba405cb4f12", "score": "0.70687276", "text": "back() {\n this._lastAction = 'back';\n this._navigate(null, -1);\n }", "title": "" }, { "docid": "9ff71f400a76bb542f5ca76a3d7263d4", "score": "0.70649326", "text": "function btnBack_OnTouch() {web.Back();}", "title": "" }, { "docid": "eb141e7c69e79d1c82f8322fac6de8ab", "score": "0.70468616", "text": "function HandleBackButton() {\n var page = Menu.GetPage();\n // If we're in lists, then pretend user just clicked the back button\n if (page == Menu.Pages.LISTS) {\n $$('#js-lists-back-btn').click();\n }\n // On any other page, just exit the app.\n // Special page behavior should be added above \n else {\n navigator.app.exitApp();\n }\n }", "title": "" }, { "docid": "30cf3809d12ee46685592ea1ecadcdde", "score": "0.7004821", "text": "function backActionOnClick(e) {\n e.preventDefault();\n }", "title": "" }, { "docid": "9e2d95c0663dd2472b9f1647db5ed0dc", "score": "0.6986845", "text": "function onBackKey() {\r\n lanzaLog(\"USGS: onBackKey -----------------------------------------\");\r\n navigator.notification.beep(1);\r\n }", "title": "" }, { "docid": "38b547641230a163b05e263bc9cd29f3", "score": "0.6980558", "text": "function backButtonWasClicked(){\n loadHomePage();\n deleteGame();\n }", "title": "" }, { "docid": "e6fa33ebeedab3144d89b01c2cc5cf6a", "score": "0.69737816", "text": "function onBackKeyDown(){\n /*\n if (typeof(device) != \"undefined\" && device.platform != \"iOS\") //do vibration on android only\n $(\"a\").click(function () { navigator.vibrate(1);});*/\n\n window.scrollTo(0, 0);\n hash = window.location.hash;\n if (isOpenScanner){}\n else if (hash.indexOf(\"ui-state=dialog\") != -1 || hash.indexOf(\"scanNvaID\") != -1) {//scan - back from scaning, ui-state=dialog - back from dialog\n location.assign(\"#\");\n }\n else if (isSlidebarOpen){\n $(\"#sidebar\").panel(\"close\");\n $(\"#panel-left\").panel(\"close\");\n }\n else if(pageInView == 2){\n changePage(1);\n }\n else if(pageInView == 3){\n changePage(2);\n }\n else {\n navigator.notification.confirm(\n putWord(109) + \"\\n\", // message\n closeApp, // callback to invoke with index of button pressed\n putWord(110), // title\n [putWord(111),putWord(112)] // buttonLabels\n );\n }\n}", "title": "" }, { "docid": "7609b1e804edcdf1dd568f2d898148d7", "score": "0.6968587", "text": "onBackClick() {\n this.props.onBackClick();\n }", "title": "" }, { "docid": "d6aa82226a9aca16edf5bb331d4cef6c", "score": "0.6961758", "text": "function onBackButtonTap() {\n topmost().goBack();\n}", "title": "" }, { "docid": "ee8a69646202556d6ea80a0041f41575", "score": "0.69229937", "text": "function redirectOtherPageWhenClickBackButton(href){\n if (window.history && window.history.pushState) {\n window.history.pushState('', null, '');\n $(window).on('popstate', function() {\n window.location = href;\n });\n\n }\n}", "title": "" }, { "docid": "f594b10604a98e94e523aae57b195abb", "score": "0.69145346", "text": "function handleBackButton(){\n\t\t\t$scope.closeRequestActionButtons();\n\t\t\tnewRequestFactory.resetNewRequest();\n\t\t\tquoteDetailFactory.quoteDetailData=undefined;\n\t\t\tquoteDetailFactory.quoteDetailEndUserClicked=undefined;\n\t\t\tquoteDetailFactory.addNoteSendNotificationClicked=undefined;\n\t\t\tlocalStorage.setItem('RequestRevisionSK',null);\n\t\t\tswitch($scope.tabIndex.index){\n\t\t\t\tcase 1:\n\t\t\t\t\tif($scope.quotesDescriptionShown){\n\t\t\t\t\t\thideQuotesDescription();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbroadCastHandleBack();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif($scope.notesDescriptionShown){\n\t\t\t\t\t\t$scope.hideModal('quoteNotesDescriptionHelpModal');\n\t\t\t\t\t\thideNotesDescription();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbroadCastHandleBack();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tbroadCastHandleBack();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tbroadCastHandleBack();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e1bb07f64fb70728016f046b880cf84d", "score": "0.69097483", "text": "function broadCastHandleBack(){\n\t\t\t$rootScope.$broadcast(\"handleBack\");\n\t\t}", "title": "" }, { "docid": "8cc39de77ee2db072eccbf5455ba3af6", "score": "0.68979555", "text": "function broadCastHandleBack(){\n\t\t\t$scope.hideHeaderButton();\n\t\t\t$state.go('quotes');\n\t\t\t//$rootScope.$broadcast(\"handleBack\");\n\t\t}", "title": "" }, { "docid": "338d58c8bb31fa08807c0a8734c7ef89", "score": "0.6893222", "text": "function backButtonHandler(e) {\n // wrap $apply in a defer to ensure that any child scope\n // $digest calls have completed.\n _.defer(function() {\n scope.$apply(function() {\n if (ctrl.history.length === 1 &&\n ctrl.history[0].name !== rootViewName()) {\n pushRootView();\n document.removeEventListener(\"backbutton\", backButtonHandler, false);\n } else {\n popView();\n }\n });\n });\n }", "title": "" }, { "docid": "a4626972ef5ee43ae11f648871d6161c", "score": "0.6887725", "text": "handleBackButtonClick() {\n BackHandler.exitApp();\n return true;\n }", "title": "" }, { "docid": "21162b6956ad01d7c43308ec10e4a987", "score": "0.6881556", "text": "function back() {\n $window.history.back();\n }", "title": "" }, { "docid": "c53e8dfaa24a5124ef8ff4a83a1fa178", "score": "0.68799853", "text": "goBack() {\n this.dispatch(goBack());\n }", "title": "" }, { "docid": "c53e8dfaa24a5124ef8ff4a83a1fa178", "score": "0.68799853", "text": "goBack() {\n this.dispatch(goBack());\n }", "title": "" }, { "docid": "9973c9dffcf3671f4f61d1c3f28a4fe1", "score": "0.6862017", "text": "function back(){\n params = {}\n post(params, 'back')\n\n}", "title": "" }, { "docid": "a9a83c14c49c8ae516608d4ce0602a41", "score": "0.68469614", "text": "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "title": "" }, { "docid": "ff1d9fd503fd95b48ff14791c7ffe18b", "score": "0.68419707", "text": "function goBack(e) {\n window.location = BaseURL + e ;\n}", "title": "" }, { "docid": "7a36d5f4348f2ba2bad4c1dcb070c4a2", "score": "0.683695", "text": "goBack() {\n this.goBackButton.click();\n }", "title": "" }, { "docid": "5183bfba0e988370e642ea9d7a8154bc", "score": "0.68314224", "text": "function handleBackButtonClick() {\n if (onChangePage) {\n onChangePage(page - 1);\n }\n }", "title": "" }, { "docid": "1f2c97b57f03017831eb29a80e1033b8", "score": "0.67941636", "text": "function handleBackButton(){\n\t\t\tif($scope.tabIndex.index == 1){\n\t\t\t\tresetFields();\n\t\t\t\tbroadCastHandleBack();\n\t\t\t} else {\n\t\t\t\tchangeTabContentTo(1);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1f2c97b57f03017831eb29a80e1033b8", "score": "0.67941636", "text": "function handleBackButton(){\n\t\t\tif($scope.tabIndex.index == 1){\n\t\t\t\tresetFields();\n\t\t\t\tbroadCastHandleBack();\n\t\t\t} else {\n\t\t\t\tchangeTabContentTo(1);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "19b7895cf6dd6316e870b3f585de98b1", "score": "0.6778312", "text": "_handleBackButtonPress() {\n\t\t// preserve context\n\t\tconst _this = this;\n\t\tHistory.goBack();\n\t}", "title": "" }, { "docid": "c213318c63c3c74ec3e3044e0e2df00f", "score": "0.6775681", "text": "_onBackClick(e) {\n this.index -= this.index - 1 >= 0 ? 1 : 0;\n this.show();\n }", "title": "" }, { "docid": "c8f32973d848ea826115455572aa8989", "score": "0.67732865", "text": "function Back() {\n // window.location.href = history.back;\n}", "title": "" }, { "docid": "da30f247c5fb0f319431a43a02daa131", "score": "0.67666286", "text": "_handleBackClick(e) {\n if (DEBUG) {\n console.log('[*] ' + _name + ':_handleBackClick ---');\n }\n\n e.preventDefault();\n }", "title": "" }, { "docid": "50ec0eb04e09f45ab09c1ee1a6c78abf", "score": "0.6764242", "text": "function onHardwareBackButton(e) {\n\t var backView = $ionicHistory.backView();\n\t if (backView) {\n\t // there is a back view, go to it\n\t backView.go();\n\t } else {\n\t // there is no back view, so close the app instead\n\t ionic.Platform.exitApp();\n\t }\n\t e.preventDefault();\n\t return false;\n\t }", "title": "" }, { "docid": "b7919ac66fcb3a88f9c6da930e3e0d3b", "score": "0.6762391", "text": "back(){window.history.back();}", "title": "" }, { "docid": "6041ec3458b9044fcb8696b129df177a", "score": "0.67457527", "text": "function UserActions(){\r\n\tdocument.addEventListener(\"backbutton\", function(e){\r\n\t // do stuff here\r\n\t e.preventDefault();\r\n\t //navigator.app.exitApp();\r\n\t navigator.notification.confirm(\r\n\t 'Are You Sure You want to exit?', // message\r\n\t onConfirmExit, // callback to invoke with index of button pressed\r\n\t 'Confirm Exit', // title\r\n\t 'No,Exit' // buttonLabels\r\n\t );\r\n\r\n\t},false);\r\n\r\n\tdocument.addEventListener(\"online\", function(){\r\n\t // do stuff here\r\n\t console.log('online');\r\n\t $('.navbar-header').html('<h5>EABL Stock Monitoring 1.0 (Online)</h5>');\r\n\t},false);\r\n\tdocument.addEventListener(\"offline\", function(){\r\n\t // do stuff here\r\n\t console.log('offline');\r\n\t $('.navbar-header').html('<h5>EABL Stock Monitoring 1.0 (Offline)</h5>');\r\n\r\n\t},false);\r\n}", "title": "" }, { "docid": "aa00b5875587d7d547cce6de95befe14", "score": "0.6733237", "text": "goBack() {\n if (this.props.routeLinks.back) {\n this.props.navigator.popToRoute(this.props.routeLinks.back.getRoute());\n } else {\n this.props.navigator.pop();\n }\n this.onGoBack();\n }", "title": "" }, { "docid": "9346afd3187a0e8a082189c9f7caa96b", "score": "0.6723389", "text": "function onBackKeyDown() {\n\tback(null);\n}", "title": "" }, { "docid": "223d9c4beffdd15e1684e0a0ae5bea3e", "score": "0.66977316", "text": "function preventBack(){window.history.forward();}", "title": "" }, { "docid": "a7e7f96b38abb4d85672df30d8d75a77", "score": "0.668169", "text": "function goBack() {\n\n $window.history.back();\n\n }", "title": "" }, { "docid": "f92a3191840075db35c0d0fa2b3fdb2b", "score": "0.66799563", "text": "function handleBackButtonPress(e) {\n return function (dispatch, getState) {\n var otpState = getState().otp;\n var activeSearchId = otpState.activeSearchId;\n var uiUrlParams = (0, _state.getUiUrlParams)(otpState); // Get new search ID from URL after back button pressed.\n // console.log('back button pressed', e)\n\n var urlParams = _coreUtils.default.query.getUrlParams();\n\n var previousSearchId = urlParams.ui_activeSearch;\n var previousItinIndex = +urlParams.ui_activeItinerary || 0;\n var previousSearch = otpState.searches[previousSearchId];\n\n if (previousSearch) {\n // If back button pressed and active search has changed, set search to\n // previous search ID.\n if (activeSearchId !== previousSearchId) {\n dispatch((0, _form.setActiveSearch)(previousSearchId));\n } else if (uiUrlParams.ui_activeItinerary !== previousItinIndex) {\n // Active itinerary index has changed.\n dispatch((0, _narrative.setActiveItinerary)({\n index: previousItinIndex\n }));\n }\n } else {\n // The back button was pressed, but there was no corresponding search\n // found for the previous search ID. Derive search from URL params.\n if (!previousSearchId && activeSearchId) {\n // There is no search ID. Clear active search and from/to\n dispatch((0, _form.clearActiveSearch)());\n dispatch((0, _map.clearLocation)({\n type: 'from'\n }));\n dispatch((0, _map.clearLocation)({\n type: 'to'\n }));\n } else if (previousSearchId) {\n console.warn(\"No search found in state history for search ID: \".concat(previousSearchId, \". Replanning...\")); // Set query to the params found in the URL and perform routing query\n // for search ID.\n // Also, we don't want to update the URL here because that will funk with\n // the browser history.\n\n dispatch((0, _form.parseUrlQueryString)(urlParams));\n }\n }\n };\n}", "title": "" }, { "docid": "b360eb41b333de5b70e73faf566b6d9b", "score": "0.667139", "text": "function backButtonClick(){\n window.location.href = \"home.html\"\n}", "title": "" }, { "docid": "a049b4cb65528d209e2dfed882a7724a", "score": "0.66705805", "text": "function onBackKeyDown() {\n navigator.notification.confirm(\n '¿Está seguro que desea salir?', // message\n onConfirm, // callback to invoke with index of button pressed\n 'Salir de myApp', // title\n 'No,Sí' // buttonLabels\n );\n}", "title": "" }, { "docid": "cb96eda67fb701b2bd4a6ced58c0f6f6", "score": "0.66570234", "text": "function goBack() {\n $window.history.back();\n }", "title": "" }, { "docid": "7f92479e74f42c43f0b25a219ff150fa", "score": "0.66551673", "text": "handleBackButton() {\n // ToastAndroid.show('Back button is pressed', ToastAndroid.SHORT);\n return true;\n }", "title": "" }, { "docid": "5a1b3f019a57a9a517468381156ab8f0", "score": "0.6653846", "text": "function redirectBack() {\n _callHandler('threesome/navigator/closeCurPage');\n}", "title": "" }, { "docid": "7c3d2540db1bf58e0415482b50c8492f", "score": "0.66435176", "text": "beforePopState(cb){this._bps=cb;}", "title": "" }, { "docid": "43505c1ff204974e5407fe94e722b0b2", "score": "0.66425323", "text": "function effectBackForward() {\n wind.on(\"popstate\", function (e) {\n if (window.location.hash.length) {\n wind.scrollTop(0);\n dsnGrid.scrollTop(window.location.hash, 1, -100);\n return;\n }\n if (document.location.href.indexOf(\"#\") > -1) {\n return;\n }\n setTimeout(function () {\n dsnAjax().backAnimate(document.location);\n }, 100);\n });\n }", "title": "" }, { "docid": "398cbe11f31d31705d9f8a75b9fdf22c", "score": "0.66260296", "text": "function onDeviceReady() \n\t\t {\n\t\t \n\t\t document.addEventListener('backbutton', backButtonCallback, false);\n\t\t }", "title": "" }, { "docid": "e31f320aa342b4fd1bb69f1776ed1eb5", "score": "0.6620079", "text": "onBack(navigator, route) {\n return () => {\n if (route.index > 0) {\n navigator.pop();\n }\n }\n }", "title": "" }, { "docid": "b703e8509283dcd5ac230ef9c4c3a6e7", "score": "0.6610762", "text": "backClick() {\n sessionStorage.setItem('backbutton', 'yes');\n sessionStorage.setItem('step', 'step1');\n this.router.navigate(['services'], { skipLocationChange: true, queryParams: { country: this.pcode, service: 'services' } });\n }", "title": "" }, { "docid": "18d1844f1cf7684def19dc138d3d69e6", "score": "0.6599071", "text": "BackButton (navigator) {\n if (navigator.state.activeGesture === null && navigator.state.pendingGestureProgress === null) {\n navigator.pop()\n }\n }", "title": "" }, { "docid": "247159140f0f6efff9f16b051bdea3f4", "score": "0.659815", "text": "handleBackClick(e) {\n\t\te.preventDefault();\n\t\thistory.push(\"\");\n\t\thistory.push(this.props.id + \"/results\");\n\t}", "title": "" }, { "docid": "500b4a329da3699246cafddc4ccee8f1", "score": "0.6590541", "text": "componentWillMount() {\n BackHandler.addEventListener('hardwareBackPress', this.backPressed);\n }", "title": "" }, { "docid": "4e6dc004bf7ccf058e427a73def1c6f7", "score": "0.65862983", "text": "backToProfile() {\n\t\tthis.$scope.$emit(\"back\");\n\t}", "title": "" }, { "docid": "80e4af0db9db9f481aa404f3090bac07", "score": "0.6575694", "text": "onClickBack() {\n browserHistory.push('/')\n }", "title": "" }, { "docid": "eebcff9eb314ab2ff9ae7623399884ec", "score": "0.65717524", "text": "function effectBackForward() {\n $(window).on('popstate', function (e) {\n $(\"main.root\").load(document.location + ' main.root > *', function () {\n $('title').load(document.location + ' title', '', function (data) {\n document.title = $(this).text();\n });\n\n refreshScript();\n });\n });\n }", "title": "" }, { "docid": "0e05e1b1cb1782b4f41e00c88629d7a6", "score": "0.65661436", "text": "function pressBackButton() {\r\n\tconsole.log('pressBackButton ' + sessvars.bloquearBack);\r\n//\tif(sessvars.bloquearBack == 0) {\r\n\t\t// if panel is not open, then go on\r\n\t\tif (window.localStorage.getItem('panelLeft') === 'closed') {\r\n\t\t\tif ($.mobile.activePage.is('#indexPage')) {\r\n\t\t\t\tnavigator.app.exitApp();\r\n\t\t\t} else {\r\n\t\t\t\twindow.history.back();\r\n\t\t\t}\r\n\t\t// else close panels first, and stop further action\r\n\t\t} else {\r\n\t\t\tif (window.localStorage.getItem('panelLeft') === 'open') {\r\n\t\t\t\tvar divLeftId = '#panelMenu' + window.localStorage.getItem(\"divIdGlobal\");\r\n\t\t\t\t$(divLeftId).panel(\"close\");\r\n\t\t\t} else if (window.localStorage.getItem('panelRight') === 'open') {\r\n\t\t\t\tvar divRightId = '#panelMenuRight' + window.localStorage.getItem(\"divIdGlobal\");\r\n\t\t\t\t$(divRightId).panel(\"close\");\r\n\t\t\t}\r\n\t\t}\r\n//\t}\r\n}", "title": "" }, { "docid": "6e873923faa26b62c11d5a7338eb9355", "score": "0.6561401", "text": "componentDidAppear() {\n BackHandler.addEventListener('hardwareBackPress', this.onBackPress);\n }", "title": "" }, { "docid": "c1e194a24505a34961d934c1d1e69ed4", "score": "0.65588206", "text": "onBackPressed() {\n {Actions.pop()}\n return true;\n }", "title": "" }, { "docid": "c4f5d8e12efbc1637c23ec3180eac4f3", "score": "0.6558811", "text": "function back() {\n returnToParent();\n }", "title": "" }, { "docid": "c85b6026fc082d8283627f56914f64c0", "score": "0.65545005", "text": "function notGoBack(){\n history.pushState(null, null, location.href);\n window.onpopstate = function () {\n history.go(1);\n };\n }", "title": "" }, { "docid": "c5fb08d622c7ecf308f58e74b4a273da", "score": "0.6552949", "text": "static async back() {\n\t\tlet previous = JSON.parse(localStorage.getItem('previous_url'));\n\t\tif (!previous || previous.hash === '' || previous.href === window.location.href) {\n\t\t\tawait Router.go(window.app.name, window.location.href.replace(/#.+/, ''));\n\t\t} else {\n\t\t\tawait Router.go(localStorage.getItem('previous_name'), previous.href);\n\t\t}\n\t}", "title": "" }, { "docid": "d197a233aba1bdca64bed62bdf48c2a1", "score": "0.6551852", "text": "backClick() {\n sessionStorage.setItem('backbutton', 'yes');\n sessionStorage.setItem('step', 'step1');\n //this.location.back();\t\n if (sessionStorage.getItem('radioAction') == 'myself') {\n this.router.navigate(['employeesearch'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n else {\n this.router.navigate(['employeeinfo'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n }", "title": "" }, { "docid": "d197a233aba1bdca64bed62bdf48c2a1", "score": "0.6551852", "text": "backClick() {\n sessionStorage.setItem('backbutton', 'yes');\n sessionStorage.setItem('step', 'step1');\n //this.location.back();\t\n if (sessionStorage.getItem('radioAction') == 'myself') {\n this.router.navigate(['employeesearch'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n else {\n this.router.navigate(['employeeinfo'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n }", "title": "" }, { "docid": "d197a233aba1bdca64bed62bdf48c2a1", "score": "0.6551852", "text": "backClick() {\n sessionStorage.setItem('backbutton', 'yes');\n sessionStorage.setItem('step', 'step1');\n //this.location.back();\t\n if (sessionStorage.getItem('radioAction') == 'myself') {\n this.router.navigate(['employeesearch'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n else {\n this.router.navigate(['employeeinfo'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n }", "title": "" }, { "docid": "7dd6b206f933635fcdad7160383fe083", "score": "0.6551343", "text": "static back() {\n window.history.back()\n }", "title": "" }, { "docid": "c3bf029562df410b52923f8bfc0604f2", "score": "0.65453404", "text": "function backButton() {\n\t\t// decrement current page by one\n\t\tcurrentPage--;\n\t\t// if page count is less then one, set curr page to first page\n\t\tif(currentPage < 1) {\n\t\t\tcurrentPage = 1;\n\t\t}\n\t\trenderPage();\n\t}", "title": "" }, { "docid": "0aad050a2a7e1d45c109678e954d6172", "score": "0.6538816", "text": "handlePopState() {\n this.handleUrlChange(true);\n }", "title": "" }, { "docid": "21decfa8f9c87605234d305b01c08b0f", "score": "0.6531712", "text": "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsSavingInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "title": "" }, { "docid": "d1ff7c7f9ab8d57a8fd5f2715e417f34", "score": "0.65258723", "text": "function goBack() {\n dispatch({ type: \"DISABLE_GIF_COMP\" });\n }", "title": "" }, { "docid": "a08edcab9dd7eedae537e4f57ad5191d", "score": "0.65211713", "text": "function backButton() {\n props.setTicket([false, null, null]);\n props.assign(false);\n }", "title": "" }, { "docid": "db05d70d473cb66134a4a2fcd27012ac", "score": "0.65184474", "text": "handleBack(){\n window.history.back();\n }", "title": "" }, { "docid": "596179cb2c018454c438272f7228e97d", "score": "0.65121937", "text": "function deregisterBackButtonAction() {\n if (backButtonActionCtrl && backButtonActionCtrl.func) {\n backButtonActionCtrl.eventHandler.call(backButtonActionCtrl);\n }\n }", "title": "" }, { "docid": "541789355864a40829990ca1fb6fbfb3", "score": "0.65118587", "text": "_handleBack() {}", "title": "" }, { "docid": "51f285bbc7350fb8892ff6e88aa4261b", "score": "0.6505404", "text": "function back(){\r\n\tlog('> User clicked \"Previous Track\" icon.');\r\n\tindex = (index - 1 + playlist.length) % playlist.length;\r\n\tplayAudio();\r\n}", "title": "" }, { "docid": "4c0b3e7aacbb7b02fd2de6e1c0e1b961", "score": "0.65033394", "text": "function r2oNavBack($rootScope){\n\t\treturn {\n\t\t\trestrict : \"A\", \n\t\t\tlink: function(scope, element, attrs)\n {\n\t\t\t\telement.on('click', function(){\n \t$rootScope.$broadcast(\"handleBack\");\n });\n }\n\t\t};\n\t}", "title": "" }, { "docid": "7e7c185e95b3c7ab9b09293b7ea2fbb8", "score": "0.65010065", "text": "function onBackKeyDown() {\n // Boton atras bloqueado\n}", "title": "" }, { "docid": "7e7c185e95b3c7ab9b09293b7ea2fbb8", "score": "0.65010065", "text": "function onBackKeyDown() {\n // Boton atras bloqueado\n}", "title": "" }, { "docid": "7e7c185e95b3c7ab9b09293b7ea2fbb8", "score": "0.65010065", "text": "function onBackKeyDown() {\n // Boton atras bloqueado\n}", "title": "" }, { "docid": "405e442948a3af1d16974df7feb5ec81", "score": "0.649903", "text": "function goBack(no) {\n W.history.go(no);\n}", "title": "" }, { "docid": "1742583d7dc0d254241bece5b3ab35bb", "score": "0.6491966", "text": "function goBack () {\n window.location='index.html';\n }", "title": "" }, { "docid": "472d86d213ff22ce492a6ff7e5d395d3", "score": "0.64911675", "text": "function navigateBack()\n {\n window.history.back();\n }", "title": "" }, { "docid": "ba6ad81dbb6a8147f0bf00f72d139268", "score": "0.6486647", "text": "async back() {\r\n await dispatch(back());\r\n dispatch(executeSearch(logNavigateBackward()));\r\n }", "title": "" }, { "docid": "136b6b0a7d921d595e282e59d4e0d8d1", "score": "0.6485549", "text": "function handleBackButton(){\n // fetching information\n var searchTerm = localStorage.getItem('search-term');\n var token = localStorage.getItem('user-token');\n var location = \"/search/\" + searchTerm;\n if(token!=null){\n location += '/' + token;\n }\n window.location = location;\n}", "title": "" }, { "docid": "4e3cb805038dff075414ffc5faf216d3", "score": "0.64763784", "text": "backClick(formData) {\n sessionStorage.setItem('backbutton', 'yes');\n sessionStorage.setItem('step', 'step1');\n // this.location.back();\t\n this.create_cache(formData);\n if (sessionStorage.getItem('radioAction') == 'myself') {\n this.router.navigate(['employeesearch'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n else {\n this.router.navigate(['employeeinfo'], { skipLocationChange: true, queryParams: { country: this.pcode, service: this.service } });\n }\n }", "title": "" }, { "docid": "1417480f1f79cf0523332602f40fea3a", "score": "0.647491", "text": "function viewBackFromOther() {\n logInfo('Back change pasword');\n}", "title": "" } ]
7ce0c7e7109785a20a5126bc8608f619
Finds all inputs and passes them to fixDefaultChecked
[ { "docid": "8dd2941bc4960703eba097ee2844da47", "score": "0.6681796", "text": "function findInputs( elem ) {\n\tvar nodeName = ( elem.nodeName || \"\" ).toLowerCase();\n\tif ( nodeName === \"input\" ) {\n\t\tfixDefaultChecked( elem );\n\t// Skip scripts, get other children\n\t} else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\n\t\tjQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n\t}\n}", "title": "" } ]
[ { "docid": "7a1ba25cef889afcd1bb553cc074b775", "score": "0.71482086", "text": "function findInputs( elem ) {\n if ( jQuery.nodeName( elem, \"input\" ) ) {\n fixDefaultChecked( elem );\n } else if ( elem.getElementsByTagName ) {\n jQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n }\n}", "title": "" }, { "docid": "3efe838b53b9090cfe4993e6597d3344", "score": "0.7113611", "text": "function findInputs( elem ) {\n if ( jQuery.nodeName( elem, \"input\" ) ) {\n fixDefaultChecked( elem );\n } else if ( \"getElementsByTagName\" in elem ) {\n jQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n }\n}", "title": "" }, { "docid": "08beeab86881bf614c877d54c148d8dd", "score": "0.7080787", "text": "function findInputs( elem ) {\n\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\t\tfixDefaultChecked( elem );\n\t} else if ( elem.getElementsByTagName ) {\n\t\tjQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n\t}\n}", "title": "" }, { "docid": "87acf22c2540a27727a0b1781e2c24c2", "score": "0.7050305", "text": "function findInputs( elem ) {\n\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\t\tfixDefaultChecked( elem );\n\t} else if ( \"getElementsByTagName\" in elem ) {\n\t\tjQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n\t}\n}", "title": "" }, { "docid": "76bc528fe66967bc78510dc421a864df", "score": "0.66990924", "text": "function findInputs( elem ) {\n\t\tvar nodeName = ( elem.nodeName || \"\" ).toLowerCase();\n\t\tif ( nodeName === \"input\" ) {\n\t\t\tfixDefaultChecked( elem );\n\t\t\t// Skip scripts, get other children\n\t\t} else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\n\t\t\tjQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n\t\t}\n\t}", "title": "" }, { "docid": "0be6711c60f8ec1711cfb0203819678e", "score": "0.6688968", "text": "function findInputs( elem ) {\r\n\tvar nodeName = ( elem.nodeName || \"\" ).toLowerCase();\r\n\tif ( nodeName === \"input\" ) {\r\n\t\tfixDefaultChecked( elem );\r\n\t// Skip scripts, get other children\r\n\t} else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\r\n\t\tjQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\r\n\t}\r\n}", "title": "" }, { "docid": "1ec3de0c573e3c6aaa0d633a710e96c8", "score": "0.66503143", "text": "function findInputs( elem ) {\n var nodeName = ( elem.nodeName || \"\" ).toLowerCase();\n if ( nodeName === \"input\" ) {\n fixDefaultChecked( elem );\n // Skip scripts, get other children\n } else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\n jQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n }\n }", "title": "" }, { "docid": "fc748f490a0fb328b53918689ac22fd6", "score": "0.65524316", "text": "function findInputs( elem ) {\n var nodeName = ( elem.nodeName || \"\" ).toLowerCase();\n if ( nodeName === \"input\" ) {\n fixDefaultChecked( elem );\n // Skip scripts, get other children\n } else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\n jQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n }\n}", "title": "" }, { "docid": "5febb95288fed0064323e770394ec6f9", "score": "0.64664763", "text": "function fixDefaultChecked( elem ) {\n if ( rcheckableType.test( elem.type ) ) {\n elem.defaultChecked = elem.checked;\n }\n}", "title": "" }, { "docid": "7fe13b3d09862df2dda0e1e0ac0aa5e3", "score": "0.64630926", "text": "function fixDefaultChecked(elem) {\n rcheckableType.test(elem.type) && (elem.defaultChecked = elem.checked);\n }", "title": "" }, { "docid": "905e1f3988d15b6ece268bac7ff64b8c", "score": "0.64176226", "text": "function fixDefaultChecked(elem) {\n if (rcheckableType.test(elem.type)) {\n elem.defaultChecked = elem.checked;\n }\n }", "title": "" }, { "docid": "905e1f3988d15b6ece268bac7ff64b8c", "score": "0.64176226", "text": "function fixDefaultChecked(elem) {\n if (rcheckableType.test(elem.type)) {\n elem.defaultChecked = elem.checked;\n }\n }", "title": "" }, { "docid": "905e1f3988d15b6ece268bac7ff64b8c", "score": "0.64176226", "text": "function fixDefaultChecked(elem) {\n if (rcheckableType.test(elem.type)) {\n elem.defaultChecked = elem.checked;\n }\n }", "title": "" }, { "docid": "905e1f3988d15b6ece268bac7ff64b8c", "score": "0.64176226", "text": "function fixDefaultChecked(elem) {\n if (rcheckableType.test(elem.type)) {\n elem.defaultChecked = elem.checked;\n }\n }", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "58bdf0d4ef03e204ce1c73ef466b397a", "score": "0.6378512", "text": "function fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" }, { "docid": "b4adad04c4012de722cd09213507f1c8", "score": "0.63649267", "text": "function fixDefaultChecked( elem ) {\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}", "title": "" } ]
c6ee5dec013db57aa109f94abebab765
read in list. use a counter, on odds add white space, on evens add . Use classes to apply grid to separate sides
[ { "docid": "71a17c603b3f4aba056dcbbdd2a2a234", "score": "0.0", "text": "function searchByCategory() {\n var category = $(\"#catOptions\").val();\n //sending category to model to find recipes\n $.get(\"/search\", { category: category }, function(data) {\n $(\"#ulRecipes\").empty();\n //needed to be a semi-single page application\n document.getElementById(\"allRecipes\").style.display = \"none\";\n document.getElementById(\"mainRecTitle\").style.display = \"none\";\n document.getElementById(\"ulDiv\").style.display = \"inherit\";\n document.getElementById(\"recTitle\").style.display = \"inherit\";\n document.getElementById(\"ulRecipes\").style.display = \"inherit\";\n //display all recipes in the category\n for (var i = 0; i < data.list.length; i++) {\n var recList = data.list[i];\n\n $(\"#ulRecipes\").append(\n `<li onclick=\"getRecipeById(${recList.recipe_id})\">${recList.recipe_name}</li>`\n );\n }\n //button to add new recipe in that category\n $(\"#ulDiv\").append(\n `<a class=\"navButtons\" id =\"addButton\" onclick=\"newRecipe()\">Add Recipe</a>`\n );\n });\n}", "title": "" } ]
[ { "docid": "adcc6815a51201302ecd6db46a7d4b2e", "score": "0.5883171", "text": "function addPhrasetoDisplay(arr) {\n for (let i = 0; i < arr.length; i +=1) {\n const li = document.createElement('li');\n li.textContent = arr[i];\n ul.appendChild(li);\n if ( arr[i] !== ' '){\n li.className = 'letter';\n } else {\n li.className = 'space';\n }\n }\n }", "title": "" }, { "docid": "478e762736ca5ca46acc6e2051e7a7ff", "score": "0.5701886", "text": "function displayNumbers(fluffyKitty) {\n //create a string to hold a class name based on even or odd\n let className = \"even\";\n //create a string that will hold our output\n let templateRows = \"\";\n\n //go through each number in the array and determine if that number is even or odd\n //the '%' modulus operand returns the remainder from division\n //ex. 3 % 2 = 1\n //ex. 100 % 5 = 0\n for (let index = 0; index < fluffyKitty.length; index++) {\n let number = fluffyKitty[index];\n\n if (number % 2 == 0) {\n className = \"even\";\n } else {\n className = \"odd\";\n }\n\n //use string concatenation to create a long string of HTML to display\n templateRows = templateRows + `<tr><td class=\"${className}\">${number}</td></tr>`;\n }\n\n document.getElementById(\"output\").innerHTML = templateRows;\n}", "title": "" }, { "docid": "192c2db2fedafb5a797901348ca54838", "score": "0.5641898", "text": "function renderlist() {\n\n\n // Question 2\n let array = []\n for (let i = 0; i < 30; i++) {\n array.push(i);\n }\n // Question 3 even numbers\n\n for (let i = 0; i < 30; i+=2) {\n array.push(i);\n }\n\n\n return array.map((value) => list(value));\n\n\n\n}", "title": "" }, { "docid": "737dee6169d26ec2c3cda12015dd0a4f", "score": "0.55783224", "text": "function populateGrid(grid) {\r\n // Remove all tokens\r\n $(\".cell\").removeClass(\"token_p1\");\r\n $(\".cell\").removeClass(\"token_p2\");\r\n\r\n // Reset the column counts\r\n colCount = [0, 0, 0, 0, 0, 0, 0];\r\n\r\n // Loop through the array\r\n for (let i = 0; i < 6; i++) {\r\n for (let j = 0; j < 7; j++) {\r\n // Place the appropriate tokens of the appropriate style\r\n if (grid[i][j] === 1) {\r\n colCount[j]++;\r\n $(\".cell[name=cell_\" + i + \"-\" + j + \"]\").addClass(\"token_p1\");\r\n }\r\n else if (grid[i][j] === 2) {\r\n colCount[j]++;\r\n $(\".cell[name=cell_\" + i + \"-\" + j + \"]\").addClass(\"token_p2\");\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "f5d1b26698f7dd569e3abaaa8f1581c8", "score": "0.5575646", "text": "function displayNumbers(numbers) {\n let templateRows = \"\"\n for (let index = 0; index < numbers.length; index++) {\n let number = numbers[index];\n let className = \"even\";\n\n if (number % 2 == 0) {\n className == \"even\";\n } else {\n className = \"odd\";\n }\n templateRows += `<tr><td class=\"${className}\">${number}</td></tr>`; \n\n }\n document.getElementById(\"results\").innerHTML = templateRows;\n}", "title": "" }, { "docid": "886ff8465c349910f06fdfe32e79458e", "score": "0.5554541", "text": "function gODD(i,row) {\r\n\tvar g_odd = (!(i % 2) ? ' g_odd' : '');\r\n\tif (!row) return g_odd;\r\n\tif (row.className.indexOf('g_odd') >= 0) row.className = row.className.replace(\"g_odd\",\"\");\r\n\tif (row.className.length > 0) g_odd = \" \" + g_odd;\r\n\trow.className += g_odd;\r\n}", "title": "" }, { "docid": "4a87b5ea71dabe40c2139390d4cb80e4", "score": "0.5552402", "text": "function startListCount() {\n active = 0;\n previous = active - 1;\n next = active + 1;\n\n s_imageElements[active].classList.add(state.slideShow.active);\n s_imageElements[next].classList.add(state.slideShow.next);\n s_markerElements[active].classList.add(state.markers.active);\n\n lastIndex = s_imageElements.length - 1;\n }", "title": "" }, { "docid": "9d81f1bc86c51b3ecc6a1fb358b340c8", "score": "0.5527277", "text": "function Layout(){\r\n for(let i=0;i<squares.length;i++)\r\n {\r\n let divs = document.createElement(\"div\")\r\n grid.appendChild(divs)\r\n square.push(divs)\r\n if(squares[i]===1) square[i].classList.add(\"wall\")\r\n else if(squares[i]===0) square[i].classList.add(\"pac-dots\")\r\n else if(squares[i]===3) square[i].classList.add(\"power-pellet\")\r\n else if(squares[i]===2) square[i].classList.add(\"ghost-liar\")\r\n }\r\n}", "title": "" }, { "docid": "e8127fb55ffc6233864e3a691abb2da9", "score": "0.5521476", "text": "function displayNumbers(numbers){\n let templateRows= \"\";\n for (let index = 0; index < numbers.length; index++) {\n let className = \"even\";\n let number = numbers[index];\n\n if(number % 2 == 0){\n className = \"even\";\n } else {\n className = \"odd\";\n }\n templateRows += `<tr><td class=\"${className}\">${number}</td></tr>`\n }\n document.getElementById(\"results\").innerHTML = templateRows;\n}", "title": "" }, { "docid": "54a1efdee42c25162202610e33cb1e5a", "score": "0.5516767", "text": "function test_board() {\n var list = ['water','miss','hit','boat']\n for (var r=1;r<11;r++) {\n for (var c=1;c<11;c++) {\n var coord = 'you_c'+c+'r'+r\n var el = document.getElementById(coord)\n var num = (c*10+r)%list.length\n el.className = list[num]\n }\n }\n}", "title": "" }, { "docid": "7d5739c224d6e123e22cdac4d4be93da", "score": "0.5497893", "text": "function updateList(){\n\t\n\t\n\tdataOutput[0] = \n\t\"eyeOS.num.y.o = \" + eyeOS.num.y.o;\n\tdataOutput[1] = \n\t\"eyeOD.num.y.o = \" + eyeOD.num.y.o;\n\tdataOutput[2] = \n\t\"-\";\n\tdataOutput[3] = \n\t\"-\";\n\tdataOutput[4] = \n\t\"-\";\n\tdataOutput[5] = \n\t\"-\";\n\tdataOutput[6] = \n\t\"-\";\n\t\n\tdataOutput[7] = \n\t\"-\";\n\tdataOutput[7+1] = \n\t\"-\";\n\tdataOutput[7+2] = \n\t\"-\";\n\tdataOutput[7+3] = \n\t\"-\";\n\tdataOutput[7+4] = \n\t\"-\";\n\tdataOutput[7+5] = \n\t\"-\";\n\tdataOutput[7+6] = \n\t\"-\";\n\t\n\tdataOutput[14] = \n\t\"-\";\n\tdataOutput[14+1] = \n\t\"-\";\n\tdataOutput[14+2] = \n\t\"-\";\n\tdataOutput[14+3] = \n\t\"-\";\n\tdataOutput[14+4] = \n\t\"-\";\n\tdataOutput[14+5] = \n\t\"-\";\n\tdataOutput[14+6] = \n\t\"-\";\n\t\n\t\n\t\n\t\n\tfor (i = 0; i < 21; i++){\n\t\t$(\"#list\"+i).text(dataOutput[i]);\n\t}\n\t\n\t\n\t\t\n}", "title": "" }, { "docid": "9eedea1e2396fc76d342c641943cec18", "score": "0.5473829", "text": "function createUL() {\n const ul = document.createElement(\"ul\");\n ul.className = \"list-group\";\n document.body.appendChild(ul); // Usually \"query selector\" if not <body> || <head> \n\n let arrNum = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n arrNum.forEach(function (item, index) {\n if (item % 2 === 0) {\n const li = document.createElement(`li`);\n li.className = \"list-group-item\";\n li.appendChild(document.createTextNode(`Index ${index}: \"Item: ${item} square = ${item*item}!\"`));\n document.querySelector(\"ul\").appendChild(li)\n if (item % 4 === 0) {\n li.className = \"list-group-item-warning list-group-item-action tab-pane\"\n } else {\n li.className = \"list-group-item-info\"\n }\n }\n })\n}", "title": "" }, { "docid": "c14d8199be4514c1471eda0bbe1eacaa", "score": "0.5446541", "text": "function countListItems(array) {\n if (array.length >= 1 && array.length <= 9) {\n counter.removeClass('hidden');\n counter.html(`<p>${array.length}</p>`);\n } else if (array.length > 9) {\n counter.html(`<p>9+</p>`);\n } else {\n counter.addClass('hidden');\n }\n}", "title": "" }, { "docid": "88881291e50dbaf249ff8675d80b07f1", "score": "0.5441462", "text": "function createBoard() {//create game board function, based on name chosen\n\tfor(i=0; i<arrGameName.length; i++) {\n\t\tif(arrGameName[i] === \" \") {//check if there is a blank space in array, if so run statement\n\t\t\tletterList = \"<li style='border-bottom:none;margin:0 15px 0 15px' id='\" + i + \"'>\" + arrGameName[i] + \"</li>\";//add <li> and class for blank space with id=i\n\t\t\tdocument.getElementById('game').innerHTML += letterList; \n\t\t} else {//if not black space add <li> with id=i\n\t\t\tletterList = \"<li id='\" + i + \"'></li>\";\n\t\t\tdocument.getElementById('game').innerHTML += letterList;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c93c786cd39ed877208a3c464daa3578", "score": "0.5423771", "text": "function readDisplay() {\n // delete all arr item\n while (theFullDisplay.length > 0) {\n theFullDisplay.pop();\n }\n for (let i = 0; i < dispSize; i++) {\n theFullDisplay.push(\n document.querySelectorAll(\".digit.pos\" + (i + 1) + \" .segment\")\n );\n }\n}", "title": "" }, { "docid": "0c1ee0cf8d1069a526aeb3d117bb77c3", "score": "0.54203403", "text": "function render() {\n myLibrary.forEach(function(e, i){\n var li = document.createElement(\"li\");\n li.classList.add(\"row\");\n \n ul.appendChild(li);\n\n var div = document.createElement(\"div\");\n li.appendChild(div)\n div.classList.add(\"innercols\")\n \n var p = document.createElement(\"p\");\n div.appendChild(p);\n p.innerText = e.title\n \n var p = document.createElement(\"p\");\n div.appendChild(p);\n p.innerText = e.author\n \n var p = document.createElement(\"p\");\n div.appendChild(p);\n p.innerText = e.pages\n \n var p = document.createElement(\"p\"); \n p.classList.add('read');\n p.classList.add(i); //adds to index of the added book to the innercols div as a class. beginning at 0.\n div.appendChild(p);\n p.innerText = e.read\n\n readClicks();\n })\n}", "title": "" }, { "docid": "13b85e386ce02484468ebe57926796d7", "score": "0.5410133", "text": "function cardColor (catCard) {\n for (var c = 0; c < catCard.length; c++) {\n if ([c] % 2 == 0) {\n catCard[c].classList.add(\"odd-blue\");\n } else {\n catCard[c].classList.add(\"even-yellow\");\n };\n }}", "title": "" }, { "docid": "ee11d8d75466867127ac19dfb046ad84", "score": "0.54050374", "text": "generateItems() {\r\n const itemCount = slider.value;\r\n let colors = this.generateColors(itemCount);\r\n while (screenDiv.firstChild) {\r\n screenDiv.removeChild(screenDiv.lastChild);\r\n }\r\n for (let i = 0; i < itemCount; i++) {\r\n let div = document.createElement(\"div\");\r\n div.classList.add(\"item\");\r\n div.style.backgroundColor = colors[i];\r\n this.items.push(new Color(div, i, colors[i]));\r\n }\r\n }", "title": "" }, { "docid": "28b72ac06a4e673de894660180f7f432", "score": "0.53908736", "text": "function onBoardList(item) {\n const container = document.querySelector('.myList');\n\n if(added.length > 5){\n document.querySelector('.myList').style.overflowY= \"scroll\";\n }\n\n container.innerHTML =\n item.map(item => createList(item));\n}", "title": "" }, { "docid": "45ddb0f3e9fa6cb926f1c81e24c4f5d3", "score": "0.5375777", "text": "function upLeft(pHeight, pColorEven, pColorOdd, pSymbol){\nvar rLine =\"\";\nfor (i=1;i<=pHeight;i++){\nrLine +=\"<p>\";\n\nfor (x=1;x<=pHeight-i;x++) {\n\n rLine +=\"<span class='space'>\" + pSymbol +\"</span>\";\n}\n\nfor(j=x;j<=pHeight;j++){\n\n\nif (j%2) \nrLine +=\"<span style='color:\" + pColorEven + \";'>\" + pSymbol +\"</span>\";\nelse\nrLine +=\"<span style='color:\" + pColorOdd + \";'>\" + pSymbol +\"</span>\";\n\n}\nrLine +=\"</p>\";\n\n}\n\ndocument.getElementById(\"upLeft\").innerHTML = rLine;\n}", "title": "" }, { "docid": "cd2e2a46333284cd11dbc9809ad00d4e", "score": "0.5357703", "text": "function liMultiChange() {\n var odd = document.querySelectorAll('.list-group-item:nth-child(odd)');\n var even= document.querySelectorAll('li:nth-child(even)');\n\n for(var i = 0; i < odd.length; i++){\n odd[i].style.backgroundColor = '#f4f4f4';\n odd[i].style.marginRight = '500px';\n even[i].style.backgroundColor = '#ccc';\n even[i].style.marginRight = '500px';\n }\n\n}", "title": "" }, { "docid": "dc617e3cb8927e3ad8d9f6d9b7557605", "score": "0.5330858", "text": "function displayList(items, displayModeOn) {\r\n leftCount = Math.round(items.length / 2);\r\n\r\n if (displayModeOn) {\r\n document.getElementById(\"left-column\").innerHTML = \"\";\r\n document.getElementById(\"right-column\").innerHTML = \"\";\r\n for (i = 0; i < items.length; i++) {\r\n displayItem((i % 2 == 0), items[i]);\r\n }\r\n } else {\r\n document.getElementById(\"left-column-edit\").innerHTML = \"\";\r\n document.getElementById(\"right-column-edit\").innerHTML = \"\";\r\n for (i = 0; i < items.length; i++) {\r\n displayItemEdit(i, items[i]);\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "779f2329333ee4d66f3e0f67248e8e29", "score": "0.53264767", "text": "function checkboard(){\n for (i=0; i<81; i++) {\n if (i % 2 === 0) {\n var div = document.createElement('div')\n document.body.appendChild(div)\n div.style.paddingBottom = '11.1%'\n div.style.width = '11.1%'\n div.style.float = 'left'\n div.style.backgroundColor = 'black'\n } else {\n var div = document.createElement('div')\n document.body.appendChild(div)\n div.style.paddingBottom = '11.1%'\n div.style.width = '11.1%'\n div.style.float = 'left'\n div.style.backgroundColor = 'red'\n }\n }\n}", "title": "" }, { "docid": "65ec22c56ea3ccc1a566922a06f0fddc", "score": "0.53204405", "text": "function NumberList(props) {\n\n var styles = {\n table: {\n margin: \"0 auto\"\n },\n numbers: {\n display: \"inline-block\",\n textAlign: \"center\",\n color: \"#fff\",\n borderRadius: \"50%\",\n marginRight: \"5px\",\n width: \"44px\",\n height: \"44px\",\n fontSize: \"22px\",\n lineHeight: \"44px\",\n backgroundColor: props.backgroundColor\n }\n };\n\n var columns = props.numbers.map(function(item, index) {\n return (\n <td style={ styles.numbers } key={ index }>\n { item }\n </td>\n )\n })\n var lineCount = props.colNumber === 0 ? props.numbers.length : props.numbers.length / 1;\n var columnSize = props.colNumber === 0 ? props.numbers.length : props.colNumber;\n var lines = [];\n\n for (var i = 0; i < lineCount; i++) {\n lines.push(columns.slice(i * columnSize, (i + 1) * columnSize));\n }\n\n\n return (\n <table style={ styles.table }>\n <tbody>\n { lines.map(function(item, index) {\n return <tr key={ index }>\n { item }\n </tr>\n \n }) }\n </tbody>\n </table>\n )\n}", "title": "" }, { "docid": "fde785b0fa3cacbb326d756203c7fbec", "score": "0.5259752", "text": "function countNumbers() {\n clear();\n // To turn the current index value into the next index value (+1)\n index = (index + 1) % listNumbers.length\n document.getElementById(\"display\").inputMode = sevenSergment(listNumbers[index]);\n}", "title": "" }, { "docid": "fce6104e26fbda713b56cd852436fcbc", "score": "0.5249278", "text": "function buildList(val) {\n let liItems = \"\";\n let arrImgInd = [];\n\n //set container style width\n setContainerWidth(val);\n\n //create array with same pair indexes\n createIndForImg(val, arrImgInd);\n\n //shuffle indexes in array\n shuffle(arrImgInd);\n\n for (let i = 0; i < arrImgInd.length; i++) {\n liItems += `\n\t\t\t<li class=\"card-list-container rotateBack\">\n\t\t\t\t<div class=\"card-list-item\">\n\t\t\t\t\t<div class=\"card-list-front rotate-back\">Click me ${i}</div>\n <div class=\"rotate-backside-back\" data-value=${arrImgInd[i]}>\n <img src=\"images/${arrImgInd[i]}.png\">\n </div>\n\t\t\t\t</div>\n\t\t\t</li>`;\n }\n\n ul.innerHTML = liItems;\n }", "title": "" }, { "docid": "54fa7134b6de9f333a9f2474bc1d8b5f", "score": "0.5243263", "text": "function getCount() {\n const allListItems = document.querySelectorAll('#invitedList li');\n\n for (var i = 0; i < allListItems.length; i++) {\n let increment = 1 - `${i / 10}`;\n // console.log(increment);\n if (increment === 0) {\n // console.log(\"It's white!\");\n } else {\n allListItems[i].style.backgroundColor = `rgba(251, 212, 4, ${increment})`;\n }\n }\n\n}", "title": "" }, { "docid": "d470f8b7c3cbe6b4acaafe62f82d930a", "score": "0.52363336", "text": "function drawList(newArray)\r\n{\r\n\t$('.resList').empty();\r\n\r\n\tvar i = 0;\r\n\tfor(i = 0; i < newArray.length; i++)\r\n\t{\r\n\t\tvar width = newArray[i][0];\r\n\t\tvar height = newArray[i][1];\r\n\r\n\t\t//$('body').append('<br>' + width);\r\n\r\n\t\tvar $newRow = $('<li resizeWidth=\"'+width+'\" resizeHeight=\"'+height+'\"><img src=\"application_double.png\" alt=\"\" width=\"16\" height=\"16\" /><a href=\"\">'+width+' x '+height+'</a><input type=\"checkbox\" name=\"list\" id=\"checkbox'+i+'\" /></li>').appendTo('.resList');\r\n\r\n\t\t$newRow.find('a').click(windowResizeClick);\r\n\t\t$newRow.find('img').click(windowResizeClick);\r\n\t}\r\n}", "title": "" }, { "docid": "3952eb1a55123676a15fd4b822337d63", "score": "0.52317417", "text": "function renderList() {\n viewSection.innerHTML = \"\";\n counter.innerText = todoList.length;\n for(const todo of todoList) {\n const todoElement = createTodoElement(todo);\n viewSection.appendChild(todoElement);\n }\n}", "title": "" }, { "docid": "7ec5d9dd35d9357e59e5a98072eb17f3", "score": "0.5221581", "text": "function checkerboard() {\n for (let i = 0; i < selectedRows; i++) {\n for (let x = 0; x < selectedRows; x++) {\n if (i % 2 === 0 && x % 2 === 0) {\n gridRowsList[i].children[x].classList.add(\"odd-squares\");\n } else if (i % 2 === 0 && x % 2 > 0) {\n gridRowsList[i].children[x].classList.add(\"even-squares\");\n } \n }\n for (let x = 0; x < selectedRows; x++) {\n if (i % 2 > 0 && x % 2 > 0) {\n gridRowsList[i].children[x].classList.add(\"odd-squares\");\n } else if (i % 2 > 0 && x % 2 === 0) {\n gridRowsList[i].children[x].classList.add(\"even-squares\");\n }\n }\n }\n}", "title": "" }, { "docid": "32ec6bb7683e1413155a280f88337f5e", "score": "0.52159166", "text": "function addScore() {\n for (let i = 0; i < 199; i += width) {\n const row = Array.from(new Array(width), (a,b) => b + i)\n if (row.every(index => squares[index].classList.contains('taken'))) {\n score += 10\n lines_count += 1\n scoreDisplay.innerHTML = score\n linesDisplay.innerHTML = lines_count\n row.forEach(index => {\n squares[index].classList.remove('taken', 'tetromino')\n squares[index].style.backgroundColor = ''\n })\n const squaresRemoved = squares.splice(i, width)\n squares = squaresRemoved.concat(squares)\n squares.forEach(cell => grid.appendChild(cell))\n }\n }\n }", "title": "" }, { "docid": "9e76c39177ed883bb36f4ae72bd8497c", "score": "0.5214377", "text": "function print(length, width) {\n var holdEven = ''; \n for (let i = 0; i < width; i++) {\n if (i % 2 === 0) {\n holdEven += ' '; \n } else {\n holdEven += '#';\n }\n }\n\n var holdOdd = '';\n for (let j = 0; j < width; j++) {\n if (j % 2 === 0) {\n holdOdd += '#';\n } else {\n holdOdd += ' ';\n }\n }\n \nvar finalPrint = '';\nfor (let l = 0; l < length; l++) {\n if (l === length - 1) {\n if (l % 2 === 0) {\n finalPrint += holdEven;\n } else {\n finalPrint += holdOdd;\n }\n } else if (l % 2 === 0) {\n finalPrint += holdEven + '\\n';\n } else {\n finalPrint += holdOdd + '\\n';\n }\n}\nconsole.log(finalPrint); \n}", "title": "" }, { "docid": "8cf751744126b22c7f570cca1bcf57a0", "score": "0.5205798", "text": "_appendLis () {\n let i = this.currentCount;\n while ((i < this.maxCount + this.currentCount) && (i < this.data.length)) {\n let li = document.createElement('li');\n li.dataset.index = i;\n\n let divWrap = this._addDiv(['wrap']);\n\n let divThumb = this._addDiv(['thumb']);\n let thumbnail = this._addElement('img', this.data[i].thumb_url)();\n divThumb.append(thumbnail);\n\n let divTitle = this._addDiv(['title'], this.data[i].title);\n let divPrice = this._addDiv(['price'], this.data[i].price_formatted);\n\n let divKeywords = this._addDiv(['keywords'], this.data[i].keywords);\n\n divWrap.append(divThumb, divTitle, divPrice);\n li.append(divWrap, divKeywords);\n\n this.ul.append(li);\n\n i++;\n }\n\n this.currentCount = i;\n }", "title": "" }, { "docid": "a3cf5f024db1ab8e5c9b4d9bf617d3ee", "score": "0.52048945", "text": "function displayNotes(){\n\t\tdocument.getElementById(\"yellowL\").innerHTML = \"\";\n\t\tdocument.getElementById(\"redL\").innerHTML=\"\";\n\t\tdocument.getElementById(\"greenL\").innerHTML=\"\";\n\n\t\tfor (var i = 0; i < storage.length; i++){\n\t\t\t//document.getElementById(\"list\").innerHTML += \"<li style='background-color:\"+storage[i].important+\"'>\"+ storage[i].text + \"</li>\";\n\t\t\n\t\tif (storage[i].important == 'red') {\n\t\t\t\tdocument.getElementById(\"redL\").innerHTML += \"<li>\"+storage[i].text+\"</li>\"+ storage[i].time +\"<br>\";\n\t\t} else if (storage[i].important == 'yellow'){\n\t\t\t\tdocument.getElementById(\"yellowL\").innerHTML += \"<li>\"+ storage[i].text + \"</li>\" + storage[i].time + \"<br>\";\n\t\t}else if(storage[i].important == 'green'){\n\t\t\t\tdocument.getElementById(\"greenL\").innerHTML += \"<li>\"+ storage[i].text + \"</li>\" + storage[i].time + \"<br>\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2d996fb29ca0fd799085a1e114700b18", "score": "0.51922756", "text": "function defineGrid(n){\n\t\tvar boardDiv = document.getElementsByClassName(\"boardCls\")[0] ;\n\t\t$(\"#board\").html(\"\")\n\t\tlet cnt=0 ;\n\t\tfor(let i=0;i<n;i++)\n\t\t{\n\t\t\tvar rowDiv = document.createElement(\"div\") ;\n\t\t\trowDiv.classList.add(\"row\") ;\n\t\t\trowDiv.style.height=(580/n)+\"px\";\n\n\t\t\tfor(let j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tvar singleDiv = document.createElement(\"div\") ;\n\t\t\t\tsingleDiv.classList.add(\"block\") ;\n\t\t\t\tsingleDiv.style.width=(580/n)+\"px\" ;\n\t\t\t\tvar para = document.createElement(\"p\") ;\n\t\t\t\tpara.classList.add(\"number\") ;\n\t\t\t\t\n\t\t\t\tsingleDiv.id=\"block-\"+cnt ;\n\t\t\t\tpara.id=\"blk-\"+cnt;\n\t\t\t\tcnt++ ;\n\t\t\t\tsingleDiv.appendChild(para) ;\n\t\t\t\trowDiv.appendChild(singleDiv) ;\n\t\t\t}\n\t\t\tboardDiv.appendChild(rowDiv) ;\n\t\t}\n\t}", "title": "" }, { "docid": "31ae1d2530cdb7704e3313311755c9d2", "score": "0.51886916", "text": "function gridLoad(){\n\n //GENERATE HTML CONTENTS FROM VIRTUAL ARRAY\n document.querySelector(\".collection\").innerHTML = \"\"; //TURN ORDER LIST REWRITING\n grid.forEach((column,colindex) => {\n column.forEach((tile,index) =>{\n tile.field = document.querySelector(`.element.col${colindex}.field${index}`);\n tile.field.innerHTML = \"\";\n tile.buttons = null;\n tile.isWalkable = true;\n tile.field.textContent = \"\";\n tile.field.style.backgroundImage = \"\";\n //OBJECT TYPE GENERATING (BACKGROUND)\n switch(tile.type){\n\n case \"wall\":\n tile.field.style.background = \"black\";\n tile.isWalkable = false;\n break;\n \n case \"water\":\n tile.field.style.background = \"lightblue\"\n break;\n\n case \"tree\":\n tile.field.style.backgroundImage = \"url(Images/Tree.png)\";\n tile.isWalkable = false;\n break;\n\n case \"barrel\":\n tile.field.style.backgroundImage = \"url(Images/Barrel.png)\";\n tile.isWalkable = false;\n break;\n\n case \"empty\":\n tile.field.style.background = \"white\";\n break;\n }\n\n if(tile.content){\n if(tile.content.entity){\n tile.isWalkable = false;\n tile.field.style.color = \"white\";\n\n tile.buttons = new MoveButtons();\n tile.field.appendChild(tile.buttons.up);\n tile.field.appendChild(tile.buttons.right);\n tile.field.appendChild(tile.buttons.down);\n tile.field.appendChild(tile.buttons.left);\n \n if(tile.content.init){\n newItem = document.createElement(\"li\");\n newItem.className = \"list-item\";\n newItem.appendChild(document.createTextNode(`${tile.content.name} \\n init: ${tile.content.init}`));\n document.querySelector(\".collection\").appendChild(newItem);\n }\n\n tile.display = new Display(`${tile.content.name.slice(0,1)}${tile.content.name.slice(-1)}`);\n tile.field.appendChild(tile.display.item);\n tile.display.item.style.background = tile.content.color;\n tile.display.item.addEventListener(\"click\",function(){\n selectedCol = colindex;\n selectedRow = index;\n if(tile.content.init){\n entityInit.value = tile.content.init;\n }\n entityName.value = tile.content.name;\n entitColor.value = tile.content.color;\n entityPopup.style.display = \"block\";\n })\n \n tile.buttons.up.style.fontSize = (tile.field.clientWidth)/3;\n tile.buttons.down.style.fontSize = (tile.field.clientWidth)/3;\n tile.buttons.left.style.fontSize = (tile.field.clientWidth)/3;\n tile.buttons.right.style.fontSize = (tile.field.clientWidth)/3;\n }\n }else{\n tile.field.style.color = \"black\";\n tile.field.textContent = \"\";\n if(tile.buttons){tile.buttons = null}\n }\n });\n });\n \n //ADJUST UI CHANGES\n UiGrid.style.gridTemplateColumns = template;\n UiGrid.style.minWidth = `${width}px`;\n UIbody.style.minWidth = `${width * 1.4}px`;\n \n //BUTTON MOVE HANDLING\n const moveBtns = document.querySelectorAll(\".moveButton\");\n if (moveBtns.length > 0){\n moveBtns.forEach(movebtn =>{\n movebtn.addEventListener(\"click\",function(e){\n\n row = parseInt(e.target.parentNode.className.match(numberPattern)[0]);\n col = parseInt(e.target.parentNode.className.match(numberPattern)[1]);\n let currentField = grid[row][col].content;\n \n //UP\n if(e.target.classList.contains(\"up\")){\n if(col==0){\n alert(\"Can't move there\");\n return;\n }\n \n if(grid[row][col-1].isWalkable === false){\n alert(\"Can't move there\");\n return;\n }\n\n let targetField = grid[row][col-1].content;\n\n if (targetField === null){\n let buffer = targetField;\n grid[row][col-1].content = currentField;\n grid[row][col].content = targetField;\n \n }else{\n alert(\"Can't move there\");\n }\n }\n\n //RIGHT\n if(e.target.classList.contains(\"right\")){\n if(row==grid.length){\n alert(\"Can't move there\");\n return;\n }\n\n if(grid[row+1][col].isWalkable === false){\n alert(\"Can't move there\");\n return;\n }\n\n let targetField = grid[row+1][col].content;\n \n if (targetField === null){\n let buffer = targetField;\n grid[row+1][col].content = currentField;\n grid[row][col].content = targetField;\n \n }else{\n alert(\"Can't move there\");\n }\n \n }\n\n //DOWN\n if(e.target.classList.contains(\"down\")){\n if(col==grid[0].length){\n alert(\"Can't move there\");\n return;\n }\n\n if(grid[row][col+1].isWalkable === false){\n alert(\"Can't move there\");\n return;\n }\n\n let targetField = grid[row][col+1].content;\n \n if (targetField === null){\n let buffer = targetField;\n grid[row][col+1].content = currentField;\n grid[row][col].content = targetField;\n \n }else{\n alert(\"Can't move there\");\n }\n \n }\n\n //LEFT\n if(e.target.classList.contains(\"left\")){\n if(row==0){\n alert(\"Can't move there\");\n return;\n }\n\n if(grid[row-1][col].isWalkable === false){\n alert(\"Can't move there\");\n return;\n }\n\n let targetField = grid[row-1][col].content;\n \n if (targetField === null){\n let buffer = targetField;\n grid[row-1][col].content = currentField;\n grid[row][col].content = targetField;\n \n }else{\n alert(\"Can't move there\");\n }\n \n }\n\n })\n })\n }\n\n sortInit();\n saveList();\n console.log(grid);\n}", "title": "" }, { "docid": "5cfe9a9027fdbfcf2386f6b0c7780afe", "score": "0.5187123", "text": "function addEl(arr) {\n\tlet number = '';\n\tfor(let i = 0; i < arr.length; i += 1){\n\t\tif (i + 1 == arr.length) {\n\t\t\tnumber += '<li>' + arr[i] + '</li>';//for last element of \"display\" array\n\t\t} else {\n\t\t\tnumber += '<li>' + arr[i] + ',' + '</li>';\n\t\t}\n\t}\nreturn number;\n}", "title": "" }, { "docid": "b77aff992f42d3cf9c2d9fe573064a95", "score": "0.5184014", "text": "function createGrid(num, colour){\n $('.wrapper > div').remove();\n for(var i = 0; i < num * num; i++){\n $newdiv = $('<div class=\"square\" />');\n $squareSize = 480 / num\n $('.wrapper').append($newdiv);\n $('.square').css(\"width\", $squareSize);\n $('.square').css(\"height\", $squareSize);\n $('.square').css(\"background-color\", \"#CFCFCF\");\n }\n}", "title": "" }, { "docid": "59df22c1b58367e774576cf46409a1ab", "score": "0.51820993", "text": "renderList() {\n const lineDistance = this.opts.get('lineDistance');\n const itemCount = this.innerHeight / lineDistance;\n\n for (let i = 1; i <= itemCount; i += 1) {\n const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n text.setAttribute('class', 'list-item');\n text.setAttribute('font-size', this.opts.get('listFontSize'));\n text.setAttribute('text-anchor', 'start');\n text.setAttribute('dominant-baseline', 'central');\n text.setAttribute('mask', `url(#${this.id}_clip)`);\n text.setAttribute('x', this.xOffset + lineDistance / 8);\n text.setAttribute('y', lineDistance * i + this.yContentOffset - lineDistance * 0.5);\n text.textContent = this.getListChars(i);\n this.root.appendChild(text);\n }\n }", "title": "" }, { "docid": "1ec15798c085c2350a8c7c34b7ab44c1", "score": "0.5174043", "text": "function initBoard () {\n var boardModel = game.getBoard();\n //boardModel is een array symbolen ['N','N','G','N','R']: 5 velden, 3 neutrale, 1 groene en 1 rode\n var boardView = document.getElementById(\"gameBoard\");\n var rules = document.getElementById(\"rules\");\n var field;\n\n for (var i = 0; i < boardModel.length; i++) {\n field = document.createElement('li');\n\n\n if (boardModel[i] == 'N'){\n field.className='neutraal';\n }\n\n else if (boardModel[i] == 'G') {\n field.className='groen';\n }\n\n else {\n field.className='rood';\n }\n\n fieldWith = Math.floor((window.innerWidth-30) / boardModel.length);\n\n field.width = fieldWith;\n\n //field.width = 82;\n boardView.appendChild(field);\n\n }\n\n rules.value = game.getRules();\n\n }", "title": "" }, { "docid": "ae5f15111f4d4c39fd98d6a62d6986c2", "score": "0.51695734", "text": "function renderRectangles(list,n){\n \n\n ctx.fillStyle = \"white\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n drawText(\"step \"+n);\n ctx.fillStyle = 'rgb(200, 0, 0)';\n \n for(i=0; i<30; i++){\n \n var height=list[i]\n \n ctx.fillRect(10+i*26, 500-height, 26, height);\n ctx.strokeRect(10+i*26, 500-height, 26, height);\n }\n }", "title": "" }, { "docid": "07f76a2ce646b110d405c29c8ed16b25", "score": "0.5167017", "text": "function newarray() {\n cont.innerHTML = \"\";\n for (var i = 0; i < array_size; i++) {\n div_size[i] = Math.floor(Math.random() * 0.5 * (inp_as.max - inp_as.min)) + 10;\n divs[i] = document.createElement(\"div\");\n cont.appendChild(divs[i]);\n divs[i].classList.add(\"mystyle\")\n margin_size = 0.1;\n divs[i].style = \" margin:0% \" + margin_size + \"%; background-color:#66ffff; width:\" + (100 / array_size - (2 * margin_size)) + \"%; height:\" + (div_size[i]) + \"%;\";\n }\n\n}", "title": "" }, { "docid": "a9c1976cf90a52df34c34718aae9eec3", "score": "0.5166199", "text": "function stripes() {\n var trs = document.getElementsByTagName(\"li\"),\n count = 0;\n\n for (var i = 0; i < trs.length; i++) {\n if (!trs[i].classList.contains(\"hidden\") && (count++) % 2 === 0) {\n trs[i].style.background = \"$dark-brand\";\n }\n else if (!trs[i].classList.contains(\"hidden\")) {\n trs[i].style.background = \"$brand\";\n }\n }\n }", "title": "" }, { "docid": "5ae49a2429b37c547f7cc89ed48d71d8", "score": "0.5163656", "text": "function createCards(list, isTop, el) {\n if(!isTop) {\n for(let i = 0; i < list.length; i++) {\n let cardCol = document.createElement('div');\n let animeCard = document.createElement('div');\n let animeImg = document.createElement('img');\n let animeTitle = document.createElement('h4');\n let animeInfo = document.createElement('div');\n let animeBody = document.createElement('p');\n let addBtn = document.createElement('button');\n let moreInfoBtn = document.createElement('button');\n let malURL = document.createElement('a');\n let animeBodyInfo = '<ul><li> Rated: '+ list[i].rated + '</li> <li> Episodes: '+list[i].episodes.toString() + '</li> <li>Score: '+list[i].score.toString() +'</li></ul>';\n $(cardCol).addClass('column my-4');\n $(animeImg).attr('src', list[i].image_url);\n $(animeImg).addClass('anime-img');\n $(malURL).attr('href', list[i].url);\n $(malURL).addClass('mal-url');\n $(malURL).text(list[i].url);\n $(malURL).hide();\n $(animeTitle).text(list[i].title);\n $(animeTitle).addClass('panel-title');\n $(animeCard).addClass('panel id-'+i.toString());\n $(animeCard).css('background-image', 'url('+list[i].image_url+')');\n $(animeCard).append(animeImg);\n $(animeImg).hide();\n //$(animeImg.).addClass('card-img');\n $(animeInfo).addClass('panel-content');\n $(animeBody).addClass('panel-body');\n $(addBtn).addClass('panel-btn');\n $(moreInfoBtn).addClass('panel-btn-info');\n $(addBtn).text('Add to List');\n $(moreInfoBtn).text('More Info');\n $(animeBody).html(animeBodyInfo);\n $(animeInfo).append(animeTitle);\n $(animeInfo).append(animeBody);\n $(animeInfo).append(addBtn);\n $(animeInfo).append(moreInfoBtn);\n $(animeCard).append(animeImg);\n $(animeCard).append(malURL);\n //$(animeCard).append(animeTitle);\n $(animeCard).append(animeInfo);\n $(cardCol).append(animeCard);\n $(el).append(cardCol);\n \n }\n }else {\n for(let i = 0; i < list.length; i++) {\n let cardCol = document.createElement('div');\n let animeCard = document.createElement('div');\n let animeImg = document.createElement('img');\n let animeTitle = document.createElement('h4');\n let animeInfo = document.createElement('div');\n let animeBody = document.createElement('p');\n let addBtn = document.createElement('button');\n let moreInfoBtn = document.createElement('button');\n let malURL = document.createElement('a');\n let animeBodyInfo = '<ul> <li>Episodes: '+list[i].episodes+\n '</li> <li>Rank: '+list[i].rank.toString()+'</li> <li>Score: '+list[i].score.toString()+\n '</li></ul>';\n $(cardCol).addClass('column my-4');\n $(animeImg).attr('src', list[i].image_url);\n $(animeImg).addClass('anime-img');\n $(malURL).attr('href', list[i].url);\n $(malURL).addClass('mal-url');\n $(malURL).text(list[i].url);\n $(malURL).hide();\n $(animeTitle).text(list[i].title);\n $(animeTitle).addClass('panel-title');\n $(animeCard).addClass('panel id-'+i.toString());\n $(animeCard).css('background-image', 'url('+list[i].image_url+')')\n $(animeCard).append(animeImg);\n $(animeImg).hide();\n //$(animeImg).addClass('card-img');\n $(animeInfo).addClass('panel-content');\n $(animeBody).addClass('panel-body');\n $(addBtn).addClass('panel-btn');\n $(moreInfoBtn).addClass('panel-btn-info');\n $(addBtn).text('Add to List');\n $(moreInfoBtn).text('More Info');\n $(animeBody).html(animeBodyInfo);\n $(animeInfo).append(animeTitle);\n $(animeInfo).append(animeBody);\n $(animeInfo).append(addBtn);\n $(animeInfo).append(moreInfoBtn);\n $(animeCard).append(animeImg);\n $(animeCard).append(malURL);\n //$(animeCard).append(animeTitle);\n $(animeCard).append(animeInfo);\n $(cardCol).append(animeCard);\n $(el).append(cardCol);\n }\n }\n}", "title": "" }, { "docid": "91ac60ae1cdfe0f19159ea1670a2b134", "score": "0.51586205", "text": "function addScore(){\r\n for(let i=0;i<199;i+=width){\r\n const row = [i,i+1,i+2,i+3,i+4,i+5,i+6,i+7,i+8,i+9];\r\n if(row.every(index => squares[index].classList.contains('taken'))){\r\n score += 10;\r\n scoreDisplay.innerHTML = score;\r\n row.forEach(index => {\r\n squares[index].classList.remove('taken');\r\n squares[index].classList.remove('tetrimino');\r\n squares[index].style.backgroundColor = '';\r\n });\r\n const squaresRemoved = squares.splice(i,width);\r\n // console.log(squaresRemoved);\r\n squares = squaresRemoved.concat(squares);\r\n squares.forEach(cell => grid.appendChild(cell));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "575cbff599fefd12177f431ce2eab9ba", "score": "0.514825", "text": "function listSpacing(listID, frequency) {\n\tvar list=document.getElementById(listID).childNodes;\t//list is now equal to the array of child nodes\n\tvar listNodeCounter=1;\n\tif(! isDefined(frequency)){\n\t\tfrequency=5;\n\t}\n\tfor (var h = 0; h < list.length; h++) {\n\t\tif(list[h].nodeType ==1){\t\t\t\t\t\t\t//ensure the child node is an actual element, not whitespace or text\n\t\t\tif(listNodeCounter % frequency == 0){\n\t\t\t\tlist[h].className=\"listSpace\";\n\t\t\t}\n\t\t\tlistNodeCounter = listNodeCounter +1;\n\t\t}\n\n\t}\n\treturn;\n}", "title": "" }, { "docid": "737601cd73a885669b3b175cbb28d139", "score": "0.51445186", "text": "function createGrid(size = 4) {\n \n if ( size > 64 || isNaN(size)) return alert('the number has to be less than 64');\n \n for (let i = 0 ; i<size*size; i++){\n const createDivs = document.createElement('div');\n createDivs.style.width = `${(100/size)-0.4}%`;\n createDivs.classList.add('grid');\n main.appendChild(createDivs);\n}\n mouseOver();\n}", "title": "" }, { "docid": "cb83908c46e8ba1f0475eec56cbd3af0", "score": "0.51443565", "text": "function sideClassAdd() {\n for (let itemImg of e.itemListImages) {\n itemImg.classList.add('item-list-image-side')\n };\n for (let itemDiv of e.itemListDiv) {\n itemDiv.classList.add('item-list-side')\n };\n}", "title": "" }, { "docid": "7875eaec98c3fa8212d5aaeceda2dacb", "score": "0.51351804", "text": "function drawAlternateBackground(even, odd) {\n // Even and odd default to what's already in the ul element\n if (typeof even == 'undefined' && typeof odd == 'undefined') {\n var even = feedList.find('li:eq(1)').css('background');\n var odd = feedList.find('li:eq(2)').css('background');\n }\n\n var i = 0;\n feedList.find('li').each(function() {\n if (i % 2 == 0) {\n $(this).css('background', odd);\n } else {\n $(this).css('background', even);\n }\n i++;\n });\n }", "title": "" }, { "docid": "9a8653fb9de1000146d02ea78e556e79", "score": "0.5129561", "text": "function addPhraseToDisplay(array) {\r\n for (let i = 0; i < array.length; i++) {\r\n var arri = array[i];\r\n var liLetter = document.createElement('li');\r\n randomUl.appendChild(liLetter);\r\n liLetter.innerHTML = arri;\r\n\r\n if (arri === ' ') {\r\n liLetter.className = 'space';\r\n } else {\r\n liLetter.className = 'letter';\r\n }\r\n }\r\n}", "title": "" }, { "docid": "d63b183be67bc5836fe711e299509842", "score": "0.51291335", "text": "function setCoversSpines(){\n for(a=1; a<numImages; a++){ \n $(\"#covers\").append(\"<div id='\"+ISBNs[count]+\"' count='\"+count+\"' class='thumbBox'><div class='title'>\"+titles[a]+\"</div><div class='triangle'><span id='rank'> \"+count+\"</span></div><img class='cover' src='img/cover_\" + count + \".jpg' />\");\n spines.push(\"img/spine_\" + count + \".png\");\n covers.push(\"img/cover_\" + count + \".jpg\");\n count++;\n if(count == ISBNs.length){\n count = 1;\n }\n }\n }", "title": "" }, { "docid": "167f285912d8ad92c682b82ff701643f", "score": "0.51266116", "text": "function upRight(pHeight, pColorEven, pColorOdd, pSymbol){\nvar rLine =\"\";\nfor (i=0;i<pHeight;i++){\nrLine +=\"<p>\";\n\nfor(j=0;j<=i;j++){\n\n\nif (j%2) \nrLine +=\"<span style='color:\" + pColorEven + \";'>\" + pSymbol +\"</span>\";\nelse\nrLine +=\"<span style='color:\" + pColorOdd + \";'>\" + pSymbol +\"</span>\";\n\n}\nrLine +=\"</p>\";\n\n}\n\ndocument.getElementById(\"upRight\").innerHTML = rLine;\n}", "title": "" }, { "docid": "06d1d806c421f5e19ae2d7d428aa6409", "score": "0.5120179", "text": "function playersList(){\n\n cards.forEach((card,index)=>{\n//takes only the first one of both cards\n if (index % 2 == 0 ){\n const li = document.createElement(\"li\");\n li.appendChild(document.createTextNode(`${card.dataset.name}`));\n list.appendChild(li);\n }\n\n });\n}", "title": "" }, { "docid": "d7663b0c86aeecc268cdfb882184ecae", "score": "0.5116798", "text": "function downLeft(pHeight, pColorEven, pColorOdd, pSymbol){\nvar rLine =\"\";\nfor (i=pHeight;i > 0;i--){\nrLine +=\"<p>\";\n \n for (x=1;x<=pHeight-i;x++) {\n\n rLine +=\"<span class='space'>\" + pSymbol +\"</span>\";\n}\n \nfor(j=0;j<i;j++){\n\nif (j%2) \nrLine +=\"<span style='color:\" + pColorEven + \";'>\" + pSymbol +\"</span>\";\nelse\nrLine +=\"<span style='color:\" + pColorOdd + \";'>\" + pSymbol +\"</span>\";\n\n}\nrLine +=\"</p>\";\n\n}\n\ndocument.getElementById(\"downLeft\").innerHTML = rLine;\n}", "title": "" }, { "docid": "2f77cd0b7db72ea6ffcc3c6d83d20aa0", "score": "0.5109885", "text": "function addItem (arr) {\n let myArr = [];\n let cols = document.querySelectorAll('.col');\n for (let els of arr) {\n let theHtml = `\n <div class=\"col__img-conatinner\">\n <img src=\"./img/${els.img}\" class=\"img\" alt=\"\">\n <p class=\"author\">Author...</p>\n <img src=\"./img/likeIcon.png\" class=\"love\" alt=\"\">\n <img src=\"./img/shareIcon.png\" class=\"world\" alt=\"\">\n <img src=\"./img/downloadIcon.png\" class=\"download\" alt=\"\">\n </div>\n `; \n myArr.push(theHtml);\n }\n for (let i=0; i<arr.length; i++) {\n let j = i;\n if (i > 2) {\n if (i % 3 === 0) {\n j = 0;\n var a = i;\n }else {\n j = i-a;\n }\n } \n cols[j].insertAdjacentHTML('beforeend', myArr[i]);\n }\n}", "title": "" }, { "docid": "eab3ef2fb6c5770d5a05fd21e3f7a96a", "score": "0.5101135", "text": "function InitBoard() {\n var light = 1;\n var colour;\n var rank;\n var file;\n\n for (i = 1; i <= 8; i++) {\n\n light ^= 1;\n rank = \"rank\" + i;\n for (j = 1; j <= 8; j++) {\n file = \"file\" + j;\n if (light == 0) {\n colour = \"light\";\n } else {\n colour = \"dark\";\n }\n light ^= 1;\n squareString = \"<div class=\\\"square \" + rank + \" \" + file + \" \" + colour + \"\\\"/>\";\n $(\"#board\").append(squareString);\n\n }\n }\n\n var currentSquare = 0;\n for (var i = 0; i < boardData.length; i++) {\n if (boardData[i] != 99) {\n $(\".square:eq(\" + currentSquare + \")\").attr('id', '' + i + '');\n currentSquare++;\n }\n }\n}", "title": "" }, { "docid": "4337061ca5a0e67f7439f691bbbf44e7", "score": "0.5098371", "text": "function createGrid(array2) {\n // I need to get 2 random numbers\n var array = getRandom(array2);\n var item1 = $(\"<div/>\").addClass(\"item1\");\n var divimg1 = $(\"<div/>\").addClass(\"divimg1\");\n var img1 = array[0].img;\n var imgtag1 = $(\"<img/>\").addClass(\"w3-circle\").attr(\"src\", \"cupidimg/\" + img1);\n var divnombre1 = $(\"<div/>\").addClass(\"divnombre1\");\n var ptag1 = $(\"<p/>\").addClass(\"ptag1\");\n var ptag2 = $(\"<p/>\").addClass(\"ptag2\");\n var nombre1 = array[0].nombre;\n var divedad1 = $(\"<div/>\").addClass(\"divedad1\");\n var edad1 = array[0].edad + \" años\";\n $(ptag1).append(nombre1);\n $(divnombre1).append(ptag1);\n $(item1).append(divnombre1);\n $(imgtag1).append(img1);\n $(divimg1).append(imgtag1);\n $(item1).append(divimg1);\n $(ptag2).append(edad1);\n $(divedad1).append(ptag2);\n $(item1).append(divedad1);\n $('.divitem1').append(item1);\n var item2 = $(\"<div/>\").addClass(\"item2\");\n var divimg2 = $(\"<div/>\").addClass(\"divimg2\");\n var img2 = array[1].img;\n var imgtag2 = $(\"<img/>\").addClass(\"w3-circle\").attr(\"src\", \"cupidimg/\" + img2);\n var divnombre2 = $(\"<div/>\").addClass(\"divnombre2\");\n var ptag3 = $(\"<p/>\").addClass(\"ptag3\");\n var ptag4 = $(\"<p/>\").addClass(\"ptag4\");\n var nombre2 = array[1].nombre;\n var divedad2 = $(\"<div/>\").addClass(\"divedad2\");\n var edad2 = array[1].edad + \" años\";\n $(ptag3).append(nombre2);\n $(divnombre2).append(ptag3);\n $(item2).append(divnombre2);\n $(imgtag2).append(img2);\n $(divimg2).append(imgtag2);\n $(item2).append(divimg2);\n $(ptag4).append(edad2);\n $(divedad2).append(ptag4);\n $(item2).append(divedad2);\n $('.divitem2').append(item2);\n var pctval = array[2];\n //console.log(pctval);\n var pcttag = $(\"<p/>\").addClass(\"pcttag\");\n if (pctval > 50) {\n $(pcttag).css('color', 'green');\n }\n else {\n $(pcttag).css('color', 'black');\n }\n var divitemcenter1 = $(\"<div/>\").addClass(\"divitemcenter1\");\n $('#divitemcenter').append(divitemcenter1);\n $(divitemcenter1).append(pcttag);\n $(pcttag).append(pctval + \"%\");\n var divbutton = $(\"<div/>\").addClass(\"divbutton\");\n var button = $(\"<button/>\").addClass(\"button\");\n var pbutton = $(\"<p/>\").addClass(\"pbutton\");\n $('#divitemcenter').append(divbutton);\n $(divbutton).append(button);\n $(button).append(pbutton);\n $(pbutton).append(\"¡Nuevo Ligue!\");\n $(\".divbutton\").click(function () {\n listener(array2);\n });\n}", "title": "" }, { "docid": "f602e689e8f2220918d4f7158fe4860e", "score": "0.50960076", "text": "function createItems() {\n for (var i = 0; i <= 5; i++) {\n gridWrapper.append('<div class=\"gallery_mars__item___hide\"></div>');\n }\n }", "title": "" }, { "docid": "0464b9c6b0056723b2cc04f9ea51bae4", "score": "0.50840044", "text": "function makeLi(array) {\n var ol = document.createElement(\"ol\");\n for (var i = 1; i <= 30; i++) {\n var li = document.createElement (\"li\");\n ol.appendChild (li);\n }\n return ol;\n }", "title": "" }, { "docid": "f464439dbff73c82c83aae99856c5bc9", "score": "0.5080781", "text": "function bestToWorst() {\r\n for (let best = 0; best < allpartys.length; best++) {\r\n var node = document.createElement(\"LI\");\r\n if (allpartys[best].secular == true) {\r\n node.classList.add(\"sectrue\");\r\n } else {\r\n node.classList.add(\"secfalse\");\r\n }\r\n if (allpartys[best].size < 15) {\r\n node.classList.add(\"small\");\r\n } else {\r\n node.classList.add(\"big\");\r\n }\r\n var textnode = document.createTextNode(\r\n allpartys[best].name +\r\n \" \" +\r\n \"size:\" +\r\n allpartys[best].size +\r\n \" \" +\r\n \"secular:\" +\r\n allpartys[best].secular\r\n );\r\n node.appendChild(textnode);\r\n document.getElementById(\"myList\").appendChild(node);\r\n }\r\n}", "title": "" }, { "docid": "6a12105c9043c335a44160f3003649ba", "score": "0.5061546", "text": "function createListHTML(list, container) {\n container.innerHTML = \"\"; //first, clean up any existing LI elements\n for (var i = 0; i < 6; i++) {\n\n container.innerHTML = container.innerHTML + \"<li class=\\\"up\\\" data-index='\" + list[i][\"id\"] + \"'>\" + \"<span>\" + list[i][\"text\"] + \"</span>\" + \"</li>\";\n\n\n //OR shorter version: container.innerHTML += \"<li class=\"upper\" data-index='\" + list[i][\"\"id\"\"] + \"'>\" + list[i][\"text\"] + \"</li>\";\n }\n }", "title": "" }, { "docid": "c7aeba9975d485cae851929e4442ef37", "score": "0.5055182", "text": "function splitTags(){\n \n divTags = document.getElementById(\"tags1\");\n\n for(i=0; i<x; i++){\n \n var addSpan = document.createElement(\"span\");\n divTags.appendChild(addSpan);\n //spanItem must be declared outside of function\n var spanItem;\n \n //alert(i % 5);\n tagList1.sort();\n \n //If the remainder of i % 5 = 4, start a new line\n if(i % 5 === 4){\n //divTags.innerHTML = iconLoc + gameTags[i] + '.jpg\" /><br/>';\n spanItem = document.getElementsByTagName('span').item([i]);\n spanItem.innerHTML = iconLoc + tagList1[i] + '.jpg\" /><br/>';\n } else {\n //divTags.innerHTML = iconLoc + gameTags[i] + '.jpg\" />';\n spanItem = document.getElementsByTagName('span').item([i]);\n spanItem.innerHTML = iconLoc + tagList1[i] + '.jpg\" />';\n }\n }\n}", "title": "" }, { "docid": "b1d8abe14a8fb03a597fd91f185e569b", "score": "0.50515705", "text": "function createBoard() {\r\n // We'll use a for loop to iterate through all the elemtents of the layout array:\r\n for (let i = 0; i < layout.length; i++) {\r\n // For each element we create a square:\r\n const square = document.createElement('div')\r\n // Append the square to our grid:\r\n grid.appendChild(square)\r\n // And push the square to our squares array:\r\n squares.push(square)\r\n\r\n // Now we color each square depending on its number, by adding the corresponding class:\r\n if (layout[i] === 0) {\r\n squares[i].classList.add('pac-dot')\r\n } else if (layout[i] === 1) {\r\n squares[i].classList.add('wall')\r\n } else if (layout[i] === 2) {\r\n squares[i].classList.add('ghost-lair')\r\n } else if (layout[i] === 3) {\r\n squares[i].classList.add('power-pellet')\r\n }\r\n }\r\n}", "title": "" }, { "docid": "cf64d8232c54a458c6a66aba4704d1a4", "score": "0.5051087", "text": "function constructShapesList( shapeType, list, n, style ) {\n for (var i=0; i<n+list.offset; i++){\n\t makeS_inList( shapeType, list.list, style );\n }\n }", "title": "" }, { "docid": "adc735a0d1c79eeb98b217de9c86ec19", "score": "0.5044933", "text": "function initList() {\n allMySights = [];\n for (var j = 0; j < mySights.length; j = j + 3) {\n allMySights.push({nameofsight: mySights[j], visible: true});\n }\n}", "title": "" }, { "docid": "003ea84c2677b47a147ddb100cf2e4d7", "score": "0.50391656", "text": "function addPhraseToDisplay(arr) {\n for (let i = 0; i < arr.length; i += 1) {\n let li = document.createElement('li');\n li.textContent = arr[i];\n if (li.textContent != \" \") {\n li.className = 'letter';\n } else {\n li.className = 'space';\n }\n ul.appendChild(li);\n }\n}", "title": "" }, { "docid": "c39d49eee0d8f833c4a02b27224a646e", "score": "0.5036867", "text": "function colorfulNumbers([num]) {\n let result = \"<ul>\\n\";\n for (let i = 1; i <= num; i++) {\n let color = (i % 2 == 0) ? \"blue\" : \"green\";\n result += `\\t<li><span style='color:${color}'>${i}</span></li>\\n`;\n }\n result += \"</ul>\";\n return result;\n}", "title": "" }, { "docid": "bd8570b7ec3b2b0b66cb8986245eec08", "score": "0.5036263", "text": "function drawThreeColsBox(height) {\n let num = height * 3;\n let arr = [];\n\n for (num; num >= 1; num--) { //push urutan angka kedalam array (bisa aja kondisinya i<height*3) dari nomor terbesar. [max,.....,min]\n\n arr.push(num);\n\n\n }\n\n let str = \"\";\n\n let count = 0;\n for (let i = 0; i < arr.length; i++) { //memasukkan index array kedalam string dengan count sebagai trigger ganti baris\n if (count > 2) {\n count = 0;\n str += `\\n${arr[i]} `;\n count++;\n } else {\n str += `${arr[i]} `;\n count++;\n }\n }\n\n console.log(str);\n // return console.log(num);\n\n}", "title": "" }, { "docid": "1f432f50d55fe2b9159d422a9981ef97", "score": "0.5027777", "text": "function buildList( list ) {\n var listHTML = '<ol>';\n for (var i = 0; i < list.length; i +=1) {\n listHTML += '<li>' + '. ' + list[i] + '</li>';\n }\n listHTML += '</ol>';\n return listHTML;\n }", "title": "" }, { "docid": "a4a058411b714c912514db77968a9e92", "score": "0.50269395", "text": "function addBoxes(wrapper) {\n let container = document.getElementById(wrapper);\n container.innerHTML = \"\";\n let letter = wrapper.slice(wrapper.length -1);\n for (var box = 0; box < 12; box++) {\n // check for column, set text style \n switch(letter.toLowerCase()) {\n case \"a\":\n container.innerHTML = container.innerHTML + \"<div>\" + letter.toLowerCase() + \"0\" + box + \"</div>\";\n break;\n case \"b\":\n container.innerHTML = container.innerHTML + \"<div><b>\" + letter.toLowerCase() + \"0\" + box + \"</b></div>\";\n break;\n case \"c\":\n container.innerHTML = container.innerHTML + \"<div>\" + letter.toLowerCase() + \"0\" + box + \"</div>\";\n }\n }\n }", "title": "" }, { "docid": "26cc956aebbbca937e51cf3f4dc84ad1", "score": "0.5024118", "text": "function printColorfulNums(n){\n let result = '<ul>\\n';\n for (let i = 1; i <= n; i++) {\n if(i % 2 === 0){\n result += `'<li><span style=\"color:blue\">${i}</span></li>\\n'`\n }\n else{\n result += `'<li><span style=\"color:green\">${i}</span></li>\\n'`\n }\n }\n result += '</ul>';\n return result;\n }", "title": "" }, { "docid": "27a0cb50f9c2b1c153d4821ab5953159", "score": "0.5017157", "text": "function numberGrid($grid, time, className, filter) {\n $grid.children.forEach(function($i) {\n if (!filter(+$i.text)) return;\n delay(function() { $i.addClass(className); }, time);\n time += 80;\n });\n}", "title": "" }, { "docid": "9e9299dcd7b70a0a35f85a46c9de2f8c", "score": "0.50167745", "text": "function codeSong() {\n for (let j = 0; j < myFriends.length; j++) {\n var lines;\n var linesleft;\n let div = document.createElement('div')\n let h3 = document.createElement('h3')\n h3.innerText = myFriends[j];\n }\n\n\n }", "title": "" }, { "docid": "b756c6eb0f663f65dfd7c9cc1b8aeb0a", "score": "0.5016772", "text": "function addPhraseToDisplay(arr) {\n for (let i = 0; i < arr.length; i++) {\n const listItem = document.createElement('LI');\n listItem.textContent = arr[i];\n if (arr[i] != \" \") {\n listItem.classList = \"letter\";\n } else {\n listItem.classList = \"space\";\n }\n phrase.appendChild(listItem)\n }\n }", "title": "" }, { "docid": "321a2a2fdcd10523fe86bc21e40ac7ca", "score": "0.5014659", "text": "function load(){\n\tvar count;\n\tvar widthh=0;\n\tvar t=0;\n\tvar l=0;\n\tvar bgx=0;\n\tvar bgy=0;\n\tvar space;\n\n\tfor(let count = 0; count < puzzle.length; count++){\n\t\t$(puzzle[count]).addClass(\"puzzlepiece\");\n\t\tpuzzle[count].style.color=\"blue\";\n\t\tpuzzle[count].style.top=t+\"px\";\n\t\tpuzzle[count].style.left=l+\"px\";\n\t\t$(puzzle[count]).css({'background-position':bgx+'px '+bgy+'px'});\n\t\tbgx-=100;\n\n\t\tl+=100;\n\t\twidthh+=1;\n\t\tif(widthh%4==0){\n\t\t\tt+=100;\n\t\t\tl=0;\n\t\t\tbgy-=100;\n\t\t}\n\n\t}\n}", "title": "" }, { "docid": "5211790210e900709b0c6880d4d52f13", "score": "0.50144786", "text": "function screenView(){\n boardItems.forEach((item, index) =>{\n // this will add the items to web screen view\n $(\"#number-screen\").append(`<div class=\"col-md-4\">\n <div class=\"card screen-card\" style=\"background-color:`+ colors[index]+`\">`+ item +`</div>\n </div>`);\n // this will add the items to mobile screen view\n $(\"#number-screen-mobile\").append(`<div class=\"col-md-4\">\n <div class=\"card board-mobile-card\" style=\"border-left: 10px solid `+ colors[index]+`\">`+ item +`</div>\n </div>`);\n })\n}", "title": "" }, { "docid": "8ba9f8540956aca4a79e2e99040ec6ba", "score": "0.50086117", "text": "constructor(dimN) {\n // strings and functions to set css style\n const {\n container,\n itemHead,\n itemBody,\n } = style;\n\n const zeroToN = [...Array(dimN + 1).keys()];\n\n // this.container :: String -> String\n this.container = (s) => divs.container(s);\n\n // this.items :: Integer -> [String] -> String\n this.items = (n, a) => a.map(divs.item(n)).join('\\n');\n\n // this.itemStyle :: Integer -> ( Integer -> Function )\n const itemStyle = (n) => (n === 0 ? itemHead : itemBody(n));\n\n // Put elements of css grid style together, create itemStyle elements up\n // to dimN elements\n // .style :: String\n this.style = `<style>\n ${container(dimN)}\n ${zeroToN.flatMap(itemStyle).join('\\n')}\n </style>`;\n }", "title": "" }, { "docid": "d20a374d64808607e8c11644818cc60b", "score": "0.50057083", "text": "function list(){\n if($(\"#list\").is(\":hidden\")){\n $(\"#video\").hide(500);\n $(\"#list\").show();\n //奇数行\n // $(\"ul li:odd\").css({ \"background-color\":\"#c3bbb9\"});\t\n //偶数行\n // $(\"ul li:even\").css({\"background-color\":\"#f7f6f6\"});\n }\n else { \n $(\"#list\").hide();\n $(\"#video\").show();}\n}", "title": "" }, { "docid": "b1e6c85c49b2dedcf5c3173ab93fbb19", "score": "0.5005012", "text": "function setEven(value){\n var liss = document.querySelectorAll(\"li\");\n for (var i = 0; i < liss.length; i++) {\n var className = i % 2 ? \"even\" : \"\";\n var li = liss[i];\n li.className = className;\n }\n}", "title": "" }, { "docid": "c9d98dd3c907974f1c1c5bf0f0229068", "score": "0.50026006", "text": "function seperateOddEvenNumbers2(arr){\n let oddArr=[];\n let evenArr=[];\n for(let i in arr){\n (arr[i] %2 == 0) ? evenArr.push ( arr[i] ) : ( arr[i] % 2 === 1 ) ? oddArr.push(arr[i]) : '' ;\n }\n return '[' + oddArr + ']' + '\\n' + '[' + evenArr + ']'\n}", "title": "" }, { "docid": "b15aa642709f2ab02c40c5138381d9b9", "score": "0.5002321", "text": "stats() {\n let mewPara= document.createElement(\"li\");\n let box1= document.getElementById(\"listStat\");\n //innerHTML order matters; must be above appendChild\n box1.innerHTML=\"\"\n box1.appendChild(mewPara);\n\n //create a lot of breaks to seperate lines\n\n let br= document.createElement(\"br\");\n let br2= document.createElement(\"br\");\n let br3= document.createElement(\"br\");\n let br4= document.createElement(\"br\");\n\n\n\n\n let mewsName= document.createTextNode(\"Name: \"+ this.name);\n let mewsHP= document.createTextNode(\"HP: \" + this.hp);\n let mewsAttack = document.createTextNode (\"Attack: \"+\n this.attack);\n let mewsDefense= document.createTextNode (\"Defense: \"+ this.defense);\n let mewsAbility= document.createTextNode (\"Ability: \"+ this.ability);\n mewPara.appendChild(mewsName);\n mewPara.appendChild(br);\n mewPara.appendChild(mewsHP);\n mewPara.appendChild(br2);\n mewPara.appendChild(mewsAttack);\n mewPara.appendChild(br3);\n mewPara.appendChild(mewsDefense);\n mewPara.appendChild(br4);\n mewPara.appendChild(mewsAbility);\n\n }", "title": "" }, { "docid": "90b309a8db277bb67475f66e7fbf9a2f", "score": "0.50018394", "text": "function ledGrid(index, stripLength, numStrips, x, y, ledSpacing, stripSpacing, angle, zigzag) {\n\tvar s = sin(angle + HALF_PI);\n\tvar c = cos(angle + HALF_PI);\n\tfor (var i = 0; i < numStrips; i++) {\n\t\tledStrip(\n\t\t\tindex + stripLength * i,\n\t\t\tstripLength,\n\t\t\tx + (i - (numStrips - 1) / 2.0) * stripSpacing * c,\n\t\t\ty + (i - (numStrips - 1) / 2.0) * stripSpacing * s,\n\t\t\tledSpacing,\n\t\t\tangle,\n\t\t\tzigzag && (i % 2) == 1);\n\t}\n}", "title": "" }, { "docid": "d554c2fc75cee246e5672d16951af675", "score": "0.4994551", "text": "function drawLeds() {\r\n noFill();\r\n stroke(\"black\");\r\n const numRows = 16\r\n for (let i = 21; i < 108; i++) {\r\n for (let j = 0; j <= 15; j++) {\r\n const espace = separation//separation*15\r\n\r\n let x = (espace * j / 15) * b// convertimos los numeros del 0 al 15 a una escala de 0 a 0.2*15=3\r\n rect(i * noteSeparation + offsetHorizontal,\r\n - x * a + offsetVertical,\r\n noteWidth,\r\n -10);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "08f3249dc0864dd3dce9d098eae339d2", "score": "0.49943832", "text": "function addPhraseToDisplay(arr){\n let phrase = document.querySelector('#phrase ul');\n // do stuff any arr that is passed in, and add to `#phrase ul`\n for (let i = 0; i < arr.length; i++) {\n let ul = document.querySelector('#phrase ul');\n let li = document.createElement('li');\n phrase.appendChild(li);\n li.append(arr[i]);\n\n if (arr[i] === ' ') {\n li.classList.add('space');\n } else {\n li.classList.add('letter');\n\n }\n\n\n }\n}", "title": "" }, { "docid": "98b8bd86da35f99c58b821b61ad54550", "score": "0.49936214", "text": "function addPhraseToDisplay(arr) {\n for (i = 0; i < arr.length; i += 1) {\n var li = document.createElement('li');\n li.appendChild(document.createTextNode(arr[i]));\n ul.appendChild(li);\n if (li.textContent != \" \") {\n li.className = 'letter';\n } else {\n li.className = 'space';\n }\n }\n}", "title": "" }, { "docid": "f1a485a9692c75cdf6bafd7943b9a2a5", "score": "0.49918285", "text": "function LoadBoardData(board)\n{\n var table = document.getElementById('table');\n table.innerHTML = \"\";\n for (let i = 0; i < 8; i++) {\n var row = document.createElement(\"tr\");\n\n for (let j = 0; j < 8; j++) {\n var cell = document.createElement(\"td\");\n\n var cellNumber = i*8+j\n var cellData = board[cellNumber];\n if (cellData == null) {\n if ((cellNumber % 2== 0 && i % 2 == 0) || (cellNumber % 2 == 1 && i % 2 == 1)) {\n cell.className = \"noPieceHere\";\n \n }\n \n \n } else{\n if (cellData >= 0 && cellData < 12) {\n var span = document.createElement(\"span\");\n span.className = \"red-piece\";\n span.id = cellData;\n cell.appendChild(span);\n \n }else{\n var span = document.createElement(\"span\");\n span.className = \"blue-piece\";\n span.id = cellData;\n cell.appendChild(span);\n \n }\n }\n \n row.appendChild(cell);\n \n }\n table.appendChild(row);\n \n }\n \n \n}", "title": "" }, { "docid": "247dfe7be1f80867c07ef662a18f20ee", "score": "0.49865708", "text": "function addPhraseToDisplay(arr) {\n\tfor (i = 0; i < arr.length; i++) {\n\t\tconst listItem = document.createElement('li');\n\t\tlistItem.textContent = arr[i];\n\t\tvisbilePhrase.appendChild(listItem);\n\t\tif (arr[i] !== \" \") {\n\t\t\tlistItem.className = 'letter';\n\t\t} else {\n\t\t\tlistItem.className = 'space';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "097e404d66d70967976323266ec0dc2c", "score": "0.49839172", "text": "function addPhraseToDisplay(arr) {\n for (let i = 0; i < arr.length; i++) {\n\n let letter = arr[i];\n let li = document.createElement('li');\n\n li.textContent = letter;\n phrase_container.appendChild(li);\n\n if (li.textContent !== \" \") {\n li.className = \"letter\";\n } else {\n li.className = \"space\";\n }\n }\n}", "title": "" }, { "docid": "353314e78af5c1fe73bb987ab56d446a", "score": "0.49821848", "text": "function drawList() {\n var listCont = document.getElementById(\"list-container\");\n var list = document.createElement(\"ul\");\n for (var i = 0; i < taskList.tasks.length; i++) {\n var d = document.getElementById(\"difficulty\");\n var item = document.createElement(\"li\");\n var item2 = document.createElement(\"li\");\n var item3 = document.createElement(\"li\");\n item.innerHTML = document.querySelector('input[name=\"assignto\"]:checked').value;\n item2.innerHTML = d.options[d.selectedIndex].value;\n item3.innerHTML = \"<b>Task:</b> \" + taskList.tasks[i].description;\n }\n list.appendChild(item).setAttribute(\"class\", \"person\");\n list.appendChild(item2).setAttribute(\"class\", \"task-diff\");\n list.appendChild(item3).setAttribute(\"class\", \"task-descrip\");\n listCont.appendChild(list);\n changeColor();\n\n}", "title": "" }, { "docid": "c8cf0aec023047a7187aa99dd77aa5f7", "score": "0.49810454", "text": "function draw() {\n current.forEach(index => {\n squares[currentPosition + index].classList.add('tetrimino')\n squares [currentPosition + index].style.backgroundColor = colors[random]\n })\n}", "title": "" }, { "docid": "25fdf88c7d2577f6ebed0679637dd148", "score": "0.49805856", "text": "function makeGrid(newNum){\n userInptNum = newNum;\n container.style.gridTemplateRows = userInptNum;\n container.style.gridTemplateColumns = userInptNum;\n\n for (let i = 1; i <= userInptNum; i++){\n for(let j = 1; j <= userInptNum; j++){\n let square = document.createElement('div');\n square.classList.add('square');\n square.style.backgroundColor = \"rgb(250,250,250\";\n square.style.gridRow = i;\n square.style.gridColumn = j;\n container.appendChild(square);\n\n }\n \n }\n getColor();\n \n}", "title": "" }, { "docid": "a54d5b958f48fc14435a9866cfe2fb83", "score": "0.49721", "text": "function draw() {\r\n current.forEach((index) => {\r\n squares[currentPosition + index].classList.add(\"tetrimino\");\r\n squares[currentPosition + index].style.backgroundColor = colors[random];\r\n });\r\n }", "title": "" }, { "docid": "74579379fab7db687ee59cf340bd7727", "score": "0.49703914", "text": "generateGrid(pictures, numberPerRow = 3) {\n\n let photoGrid = []\n for (let i = 0; i < pictures.length; i += numberPerRow) {\n\n let photoRow = []\n\n for (let columnIndex = 0; columnIndex < numberPerRow && i + columnIndex < pictures.length; columnIndex++) {\n // handle margin right\n if (columnIndex < numberPerRow) {\n photoRow.push(this.generatePicture(pictures[i + columnIndex], i + columnIndex, true))\n } else {\n photoRow.push(this.generatePicture(pictures[i + columnIndex], i + columnIndex, false))\n }\n }\n photoGrid.push(\n <div key={i} className=\"photoRowContainer\">\n {photoRow}\n </div>,\n )\n photoRow = []\n }\n return photoGrid\n }", "title": "" }, { "docid": "1bdd9bbc08332481ac09660273c55f91", "score": "0.4959338", "text": "function createGrid() {\n for (let i = 0; i < cellCount; i++) {\n const cell = document.createElement('div')\n // cell.innerText = i\n grid.appendChild(cell)\n cells.push(cell)\n\n // generate borders and map\n if (level === 'beginner') {\n if (i < width || (i % width === 0 && i !== 55) || (i % width === width - 1 && i !== 65) || i + width > width * width - 1 || borderArray.includes(i)) {\n cell.classList.add(borderClass)\n } else if (i === 27) {\n cell.classList.add(fossilClass)\n } else if (i === 20 || i === 100) {\n cell.classList.add(netClass)\n } else if (i === 48 || i === 50) {\n cell.classList.add(fenceClass)\n } else if (!cell.classList.contains(borderClass) && !cell.classList.contains(fossilClass) && !cell.classList.contains(netClass) & !cell.classList.contains(fenceClass) && i !== 59 & i !== 60 & i !== 61) {\n cell.classList.add(foodClass)\n }\n\n grabLives[2].classList.add(hiddenClass)\n\n if (i === 58) {\n centerText = document.createElement('div')\n cell.appendChild(centerText)\n center = document.createElement('p')\n centerText.appendChild(center)\n centerText.classList.add('center-text')\n centerText.classList.add(hiddenClass)\n }\n }\n }\n\n center.innerText = 'Welcome to Animal Crossing, PacMan Edition. \\n Press Start to begin!'\n centerText.classList.remove(hiddenClass)\n center.classList.add('welcome')\n\n addPlayer(playerStartPosition)\n console.log('player added at start')\n addGhost(scorpianStartPosition, scorpianClass)\n addGhost(tarantulaStartPosition, tarantulaClass)\n addGhost(waspStartPosition, waspClass)\n }", "title": "" }, { "docid": "62e5527c499806a986ce4a9d4b8fd3d3", "score": "0.4957395", "text": "function createGrid(num) {\n for(let i = 0; i < num **2; i++) {\n container.appendChild(cellNode.cloneNode(true));\n }\n gridFormat(container, num);\n startColor(color);\n \n \n}", "title": "" }, { "docid": "ceaf1fbf908da0e56193e57f5ce9af9b", "score": "0.4956271", "text": "function addPhraseToDisplay(arr) {\n const ul = phrase.querySelector(\"ul\");\n for (let i = 0; i < arr.length; i++) {\n let item = document.createElement(\"li\");\n ul.appendChild(item);\n item.innerHTML = arr[i];\n if (arr[i] === \" \") {\n item.classList.add(\"space\");\n } else {\n item.classList.add(\"letter\");\n }\n }\n}", "title": "" }, { "docid": "ccab68dd4ba17537b6b2b34a4da2a7f7", "score": "0.49551958", "text": "function showScores(){\n highScoreList.innerHTML = \"\"; \n\n for(var i = 0; i < dataFromStorage.length; i++){\n var listEl = document.createElement(\"li\");\n var paraEl = document.createElement(\"p\");\n paraEl.setAttribute(\"class\", \"highscore\");\n paraEl.textContent = (i + 1) + \". \" + dataFromStorage[i].initials + \"- \" + dataFromStorage[i].score;\n\n listEl.appendChild(paraEl);\n highScoreList.appendChild(listEl);\n\n }\n}", "title": "" }, { "docid": "91322d681bf23e4f05054927477fdec2", "score": "0.49497226", "text": "setArtToNextAndCloak(el){\n const path = el.css('background-image') // from 01-09\n const digit = Number(ITEM_ART_REGEX.exec(path)[1])\n let incr = digit+ITEMS_IN_ROW\n if(incr > ITEM_ART_COUNT){\n incr = (incr % ITEM_ART_COUNT)+1\n if(incr == (ITEMS_IN_ROW+1)){\n incr = 1\n }\n }\n \n const pretty= incr < 10 ? `0${incr}` : incr\n const next = path.replace(ITEM_ART_REGEX, `${pretty}.jpg\")`)\n //console.log(`art: ${digit} -> ${incr}`)\n el.css({\n 'background-image':next, \n 'opacity':0\n })\n return el\n }", "title": "" }, { "docid": "c820c406b426610df770a7dfacf71207", "score": "0.49458265", "text": "function reloadList(){\r\n\tcontainer.innerHTML = '';\r\n\r\n\tfor (const item in list) {\r\n\t let p = document.createElement(\"p\");\r\n\t p.setAttribute(\"id\", item);\r\n\t\tp.innerHTML = item;\r\n\t\tcontainer.appendChild(p);\r\n\r\n\t\tconst id = document.getElementById(item);\r\n\r\n\t\tvar startx;\r\n\t\tvar starty;\r\n\t\tid.addEventListener('touchstart', function(e){\r\n\t\t\tconst touchobj = e.changedTouches[0];\r\n\t\t\tstartx = parseInt(touchobj.clientX);\r\n\t\t\tstarty = parseInt(touchobj.clientY);\r\n\t\t\t\r\n\t\t});\r\n\r\n\r\n\t\t// Move item around\r\n\t\tid.addEventListener('touchmove', function(e){\r\n\t\t\tconst touchobj = e.changedTouches[0];\r\n\t\t\tmovex = parseInt(touchobj.clientX); \r\n\t\t\tmovey = parseInt(touchobj.clientY); \r\n\t\t \tid.style.left = (movex - startx + 20 ) + \"px\";\r\n\t\t\tid.style.top = (movey - 20) + \"px\";\r\n\t\t\tid.style.position = \"fixed\";\r\n\t\t\tif(document.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1])){\r\n\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1]).style.paddingTop = this.clientHeight + \"px\";\r\n\t\t\t}\r\n\r\n\t\t\tif(movex > window.innerWidth - 50){\r\n\t\t\t\tid.style.opacity = \"0.5\";\r\n\t\t\t\tcontainer.style.boxShadow = \"inset -75px 9px 26px -62px white\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tid.style.opacity = \"1\";\r\n\t\t\t\tcontainer.style.boxShadow = \"unset\";\r\n\t\t\t}\r\n\r\n\t\t\tif(movey > starty + this.clientHeight){\r\n\t\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1]).style.paddingTop = \"0px\";\r\n\t\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+2]).style.paddingTop = this.clientHeight + \"px\";\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1]).style.paddingTop = this.clientHeight + \"px\";\r\n\t\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+2]).style.paddingTop = \"0px\";\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// if(movey < starty + this.clientHeight){\r\n\t\t\t// \tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1]).style.paddingTop = \"0px\";\r\n\t\t\t// \tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)-1]).style.paddingBottom = this.clientHeight + \"px\";\r\n\t\t\t// }\r\n\t\t\t// else{\r\n\t\t\t// \tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1]).style.paddingTop = this.clientHeight + \"px\";\r\n\t\t\t// \tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)-1]).style.paddingBottom = \"0px\";\r\n\t\t\t// }\r\n\t\t});\r\n\r\n\t\tid.addEventListener('touchend', function(e){\r\n\r\n\t\t\tid.style.left = \"unset\";\r\n\t\t\tid.style.top = \"unset\";\r\n\t\t\tid.style.position = \"relative\";\r\n\t\t\tif(document.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1])){\r\n\t\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+1]).style.paddingTop = \"0px\";\r\n\t\t\t\tdocument.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)+2]).style.paddingTop = \"0px\";\r\n\t\t\t\t// document.getElementById(Object.keys(list)[Object.keys(list).indexOf(item)-1]).style.paddingBottom = \"0px\";\r\n\t\t\t}\r\n\r\n\t\t\tif(movex > window.innerWidth - 50){\r\n\t\t\t\tdelete list[this.id];\r\n\t\t\t\tcontainer.style.boxShadow = \"unset\";\r\n\t\t\t\treloadList();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "title": "" }, { "docid": "e249c2529965387998dd9a9b8cf2a080", "score": "0.49452305", "text": "colorIn(list) {\r\n list.forEach((item) => {\r\n item.div.style.backgroundColor = item.color;\r\n });\r\n }", "title": "" }, { "docid": "2738ce23b7e20caf8935874992dca648", "score": "0.49404407", "text": "function displayState(tab) {\n $(\".grid\").empty();\n for (let i = 0; i < tab.length; i++) {\n for (let j = 0; j < tab[i].length; j++) {\n const elem = tab[i][j];\n if (elem) {\n const item = $(`<div data-i=\"${i}\" data-j=\"${j}\" class=\"item\" id=\"${elem}\">${elem}</div>`);\n $(\".grid\").append(item);\n } else {\n // if (leftMove == 1) {\n // $(\".grid\").append(`<div class=\"vide\" id = \"caseVide\"\"><img src=\"images/davidou.png\" alt=\"car\" id=\"car\"></div>`);\n // leftMove = 0\n // } else if (rightMove == 1) {\n // $(\".grid\").append(`<div class=\"vide\" id = \"caseVide\"\"><img src=\"images/davidou.png\" alt=\"car\" id=\"car\"></div>`);\n // rightMove = 0\n // } else {\n $(\".grid\").append(`<div class=\"vide\" id = \"caseVide\"\"><img src=\"images/davidou.png\" alt=\"DAVIDOU\" id=\"DAVID\"></div>`);\n\n // }\n }\n\n }\n }\n}", "title": "" } ]
21754df2f66a359e1cfa87753a067c0a
Render targets Setup storage for target texture and bind it to correct framebuffer
[ { "docid": "a31471bd143fceb2e1979eeb93b87b38", "score": "0.7322936", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tvar glInternalFormat = getInternalFormat( glFormat, glType );\n\t\tstate.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( 36160, framebuffer );\n\t\t_gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( 36160, null );\n\n\t}", "title": "" } ]
[ { "docid": "f0aeddd7d62e88839ef68dd677cfa6fa", "score": "0.81887484", "text": "function setupRenderTarget(renderTarget) {\n\n\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\tvar textureProperties = properties.get(renderTarget.texture);\n\n\t\trenderTarget.addEventListener('dispose', onRenderTargetDispose);\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures++;\n\n\t\tvar isCube = renderTarget.isWebGLRenderTargetCube === true;\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo(renderTarget);\n\n\t\t// Setup framebuffer\n\n\t\tif (isCube) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[i] = _gl.createFramebuffer();\n\t\t\t}\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif (isCube) {\n\n\t\t\tstate.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture);\n\t\t\tsetTextureParameters(_gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo);\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\n\t\t\t\tsetupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i);\n\t\t\t}\n\n\t\t\tif (textureNeedsGenerateMipmaps(renderTarget.texture, isTargetPowerOfTwo)) _gl.generateMipmap(_gl.TEXTURE_CUBE_MAP);\n\t\t\tstate.bindTexture(_gl.TEXTURE_CUBE_MAP, null);\n\t\t} else {\n\n\t\t\tstate.bindTexture(_gl.TEXTURE_2D, textureProperties.__webglTexture);\n\t\t\tsetTextureParameters(_gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo);\n\t\t\tsetupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D);\n\n\t\t\tif (textureNeedsGenerateMipmaps(renderTarget.texture, isTargetPowerOfTwo)) _gl.generateMipmap(_gl.TEXTURE_2D);\n\t\t\tstate.bindTexture(_gl.TEXTURE_2D, null);\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif (renderTarget.depthBuffer) {\n\n\t\t\tsetupDepthRenderbuffer(renderTarget);\n\t\t}\n\t}", "title": "" }, { "docid": "d5c0feb2e28d08d0a89f2fc7ed53d060", "score": "0.8185387", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tconst texture = renderTarget.texture;\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\tconst textureProperties = properties.get( texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\tif ( renderTarget.isWebGLMultipleRenderTargets !== true ) {\n\n\t\t\t\tif ( textureProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__version = texture.version;\n\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t}\n\n\t\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\t\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = [];\n\n\t\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\t\tif ( capabilities.drawBuffers ) {\n\n\t\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\tconst attachmentProperties = properties.get( textures[ i ] );\n\n\t\t\t\t\t\t\tif ( attachmentProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\t\t\t\tattachmentProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( ( isWebGL2 && renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t\tconst textures = isMultipleRenderTargets ? texture : [ texture ];\n\n\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = [];\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\t\tconst texture = textures[ i ];\n\t\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer[ i ] = _gl.createRenderbuffer();\n\n\t\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true );\n\t\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, supportsMips );\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP );\n\n\t\t\t\t}\n\n\t\t\t\tstate.unbindTexture();\n\n\t\t\t} else if ( isMultipleRenderTargets ) {\n\n\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst attachment = textures[ i ];\n\t\t\t\t\tconst attachmentProperties = properties.get( attachment );\n\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture );\n\t\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, attachment, supportsMips );\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 );\n\n\t\t\t\t\tif ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {\n\n\t\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tstate.unbindTexture();\n\n\t\t\t} else {\n\n\t\t\t\tlet glTextureType = _gl.TEXTURE_2D;\n\n\t\t\t\tif ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) {\n\n\t\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\t\tglTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.error( 'THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture( glTextureType, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( glTextureType, texture, supportsMips );\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( glTextureType );\n\n\t\t\t\t}\n\n\t\t\t\tstate.unbindTexture();\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "3ce51ea53e566612d86d6d8fd361f038", "score": "0.81636816", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t_infoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "3ce51ea53e566612d86d6d8fd361f038", "score": "0.81636816", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t_infoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "3ce51ea53e566612d86d6d8fd361f038", "score": "0.81636816", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t_infoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "fde1d700afb21e69fdfd4f9a08730a29", "score": "0.8107041", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfo.memory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true );\n\t\tvar supportsMips = isPowerOfTwo( renderTarget ) || capabilities.isWebGL2;\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( 36161, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\t\t\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\t\t\t\tvar glInternalFormat = getInternalFormat( glFormat, glType );\n\t\t\t\t\tvar samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t_gl.bindFramebuffer( 36160, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( 36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_gl.bindFramebuffer( 36160, null );\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( 34067, renderTarget.texture, supportsMips );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, 36064, 34069 + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( 34067, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 34067, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( 3553, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( 3553, renderTarget.texture, supportsMips );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, 36064, 3553 );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( 3553, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 3553, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "5c7e7ab2f5de812ec9a44b128060d214", "score": "0.8106027", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfo.memory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( 34067, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, 36064, 34069 + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) {\n\n\t\t\t\tgenerateMipmap( 34067, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 34067, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( 3553, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( 3553, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, 36064, 3553 );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) {\n\n\t\t\t\tgenerateMipmap( 3553, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 3553, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "1be43b1613962f09560d448dbabe1624", "score": "0.80845314", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "1be43b1613962f09560d448dbabe1624", "score": "0.80845314", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "1be43b1613962f09560d448dbabe1624", "score": "0.80845314", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "1be43b1613962f09560d448dbabe1624", "score": "0.80845314", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfoMemory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "6cfeecf0df0b22485bab36bf228c3897", "score": "0.8075399", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets !== true ) {\n\n\t\t\tif ( textureProperties.__webglTexture === undefined ) {\n\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = [];\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tif ( capabilities.drawBuffers ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst attachmentProperties = properties.get( textures[ i ] );\n\n\t\t\t\t\t\tif ( attachmentProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\t\t\tattachmentProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ( isWebGL2 && renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\tconst textures = isMultipleRenderTargets ? texture : [ texture ];\n\n\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = [];\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tconst texture = textures[ i ];\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer[ i ] = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true );\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, supportsMips );\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t} else if ( isMultipleRenderTargets ) {\n\n\t\t\tconst textures = renderTarget.texture;\n\n\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachment = textures[ i ];\n\t\t\t\tconst attachmentProperties = properties.get( attachment );\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, attachment, supportsMips );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t} else {\n\n\t\t\tlet glTextureType = _gl.TEXTURE_2D;\n\n\t\t\tif ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tglTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( glTextureType, texture, supportsMips );\n\n\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( glTextureType );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "6284dee795ba447e04546b05d388bec0", "score": "0.8074723", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\tinfoMemory.textures ++;\n\n\t\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t\t// Setup framebuffer\n\n\t\t\t\tif ( isCube ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t\t// Setup color buffer\n\n\t\t\t\tif ( isCube ) {\n\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t\t}\n\n\t\t\t\t// Setup depth and stencil buffers\n\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "4a92377a35831cabbc15aa99c402276c", "score": "0.8073512", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t_infoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "4a92377a35831cabbc15aa99c402276c", "score": "0.8073512", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t_infoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "4a92377a35831cabbc15aa99c402276c", "score": "0.8073512", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t_infoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "7ca0582e733b4e4df4768d8c1df2a82f", "score": "0.8071746", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "7ca0582e733b4e4df4768d8c1df2a82f", "score": "0.8071746", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "3c4e25109cdf6e5f73b9820c05a0e8c8", "score": "0.8057975", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfo.memory.textures ++;\n\n\t\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\t\tconst isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true );\n\t\t\tconst supportsMips = isPowerOfTwo( renderTarget ) || isWebGL2;\n\n\t\t\t// Handles WebGL2 RGBFormat fallback - #18858\n\n\t\t\tif ( isWebGL2 && renderTarget.texture.format === RGBFormat && ( renderTarget.texture.type === FloatType || renderTarget.texture.type === HalfFloatType ) ) {\n\n\t\t\t\trenderTarget.texture.format = RGBAFormat;\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.' );\n\n\t\t\t}\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t\tif ( isMultisample ) {\n\n\t\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t\t_gl.bindRenderbuffer( 36161, renderTargetProperties.__webglColorRenderbuffer );\n\n\t\t\t\t\t\tconst glFormat = utils.convert( renderTarget.texture.format );\n\t\t\t\t\t\tconst glType = utils.convert( renderTarget.texture.type );\n\t\t\t\t\t\tconst glInternalFormat = getInternalFormat( renderTarget.texture.internalFormat, glFormat, glType );\n\t\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t\t_gl.bindFramebuffer( 36160, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t\t_gl.framebufferRenderbuffer( 36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t\t\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_gl.bindFramebuffer( 36160, null );\n\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( 34067, renderTarget.texture, supportsMips );\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, 36064, 34069 + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( 34067, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture( 34067, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( 3553, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( 3553, renderTarget.texture, supportsMips );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, 36064, 3553 );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( 3553, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture( 3553, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "32e03578270f805ad9f60438508dc09a", "score": "0.80488575", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfo.memory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true );\n\t\tvar supportsMips = isPowerOfTwo( renderTarget ) || capabilities.isWebGL2;\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\t\t\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\t\t\t\tvar glInternalFormat = getInternalFormat( glFormat, glType );\n\t\t\t\t\tvar samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, supportsMips );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, supportsMips );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "56becc232767b92027b9d23bf91e8d41", "score": "0.8048406", "text": "function setupRenderTarget( renderTarget ) {\n\t\n\t\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\t\n\t\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\t\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\n\t\t\t\t_infoMemory.textures ++;\n\t\n\t\t\t\tvar isCube = ( (renderTarget && renderTarget.isWebGLRenderTargetCube) );\n\t\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\t\n\t\t\t\t// Setup framebuffer\n\t\n\t\t\t\tif ( isCube ) {\n\t\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\t\n\t\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\t\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\t\n\t\t\t\t}\n\t\n\t\t\t\t// Setup color buffer\n\t\n\t\t\t\tif ( isCube ) {\n\t\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\t\n\t\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\t\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\t\n\t\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\t\n\t\t\t\t}\n\t\n\t\t\t\t// Setup depth and stencil buffers\n\t\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\t\n\t\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\t\n\t\t\t\t}\n\t\n\t\t\t}", "title": "" }, { "docid": "ffffb356613bb3d95288134334e66122", "score": "0.8007126", "text": "function setupRenderTarget( renderTarget ) {\r\n\r\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\r\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\r\n\r\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\r\n\r\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\r\n\r\n\t\t\t_infoMemory.textures ++;\r\n\r\n\t\t\tvar isCube = ( renderTarget instanceof THREE.WebGLRenderTargetCube );\r\n\t\t\tvar isTargetPowerOfTwo = THREE.Math.isPowerOfTwo( renderTarget.width ) && THREE.Math.isPowerOfTwo( renderTarget.height );\r\n\r\n\t\t\t// Setup framebuffer\r\n\r\n\t\t\tif ( isCube ) {\r\n\r\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\r\n\r\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\r\n\r\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Setup color buffer\r\n\r\n\t\t\tif ( isCube ) {\r\n\r\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\r\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\r\n\r\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\r\n\r\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\r\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\r\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\r\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\r\n\r\n\t\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\r\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Setup depth and stencil buffers\r\n\r\n\t\t\tif ( renderTarget.depthBuffer ) {\r\n\r\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "eb040124a6cb44be8ecc47b4c6f879ab", "score": "0.80011195", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "eb040124a6cb44be8ecc47b4c6f879ab", "score": "0.80011195", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "eb040124a6cb44be8ecc47b4c6f879ab", "score": "0.80011195", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "eb040124a6cb44be8ecc47b4c6f879ab", "score": "0.80011195", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "eb040124a6cb44be8ecc47b4c6f879ab", "score": "0.80011195", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "eb040124a6cb44be8ecc47b4c6f879ab", "score": "0.80011195", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "7d57b8ba5400edbdf90af78d970e146c", "score": "0.7997383", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfo.memory.textures ++;\n\n\t\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t\t// Setup framebuffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\t// Setup color buffer\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) {\n\n\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) {\n\n\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t\t}\n\n\t\t\t// Setup depth and stencil buffers\n\n\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "03c28c80a7bc3550d573908cf7806405", "score": "0.79790896", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t_infoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget instanceof THREE.WebGLRenderTargetCube );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "cba2578a49452c84d2dcc50804f62d5f", "score": "0.7939831", "text": "function setupRenderTarget( renderTarget ) {\n\n\t \t\tvar renderTargetProperties = properties.get( renderTarget );\n\t \t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t \t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t \t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t \t\t_infoMemory.textures ++;\n\n\t \t\tvar isCube = ( (renderTarget && renderTarget.isWebGLRenderTargetCube) );\n\t \t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t \t\t// Setup framebuffer\n\n\t \t\tif ( isCube ) {\n\n\t \t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t \t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t \t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t \t\t\t}\n\n\t \t\t} else {\n\n\t \t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t \t\t}\n\n\t \t\t// Setup color buffer\n\n\t \t\tif ( isCube ) {\n\n\t \t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t \t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t \t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t \t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t \t\t\t}\n\n\t \t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t \t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t \t\t} else {\n\n\t \t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t \t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t \t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t \t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t \t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t \t\t}\n\n\t \t\t// Setup depth and stencil buffers\n\n\t \t\tif ( renderTarget.depthBuffer ) {\n\n\t \t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t \t\t}\n\n\t \t}", "title": "" }, { "docid": "dbc80c0ffbaa4613f321b7bbc6ff25f2", "score": "0.79195434", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t_infoMemory.textures ++;\n\n\t\tvar isCube = ( renderTarget instanceof THREE.WebGLRenderTargetCube );\n\t\tvar isTargetPowerOfTwo = THREE.Math.isPowerOfTwo( renderTarget.width ) && THREE.Math.isPowerOfTwo( renderTarget.height );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "7bcde6b8a60ff62ef5d91d41a1d8fbff", "score": "0.7913921", "text": "function setupRenderTarget( renderTarget ) {\r\n\r\n\t\tvar renderTargetProperties = properties.get( renderTarget );\r\n\t\tvar textureProperties = properties.get( renderTarget.texture );\r\n\r\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\r\n\r\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\r\n\r\n\t\t_infoMemory.textures ++;\r\n\r\n\t\tvar isCube = ( renderTarget instanceof THREE.WebGLRenderTargetCube );\r\n\t\tvar isTargetPowerOfTwo = THREE.Math.isPowerOfTwo( renderTarget.width ) && THREE.Math.isPowerOfTwo( renderTarget.height );\r\n\r\n\t\t// Setup framebuffer\r\n\r\n\t\tif ( isCube ) {\r\n\r\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\r\n\r\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\r\n\r\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\r\n\r\n\t\t}\r\n\r\n\t\t// Setup color buffer\r\n\r\n\t\tif ( isCube ) {\r\n\r\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\r\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\r\n\r\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\r\n\r\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );\r\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\r\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\r\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\r\n\r\n\t\t\tif ( renderTarget.texture.generateMipmaps && isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );\r\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\r\n\r\n\t\t}\r\n\r\n\t\t// Setup depth and stencil buffers\r\n\r\n\t\tif ( renderTarget.depthBuffer ) {\r\n\r\n\t\t\tsetupDepthRenderbuffer( renderTarget );\r\n\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "9adcc75844b943b8cf26b4c695f3797e", "score": "0.78644174", "text": "function setupRenderTarget( renderTarget ) {\n\n\t\tvar renderTargetProperties = properties.get( renderTarget );\n\t\tvar textureProperties = properties.get( renderTarget.texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\tinfo.memory.textures ++;\n\n\t\tvar isCube = ( renderTarget.isWebGLRenderTargetCube === true );\n\t\tvar isTargetPowerOfTwo = isPowerOfTwo( renderTarget );\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo );\n\n\t\t\tfor ( var i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, null );\n\n\t\t} else {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( renderTarget.texture, isTargetPowerOfTwo ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D, renderTarget.texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_2D, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "1d36c876bdb4b447307c7be07468b242", "score": "0.7857275", "text": "setupRenderTarget(renderTarget) {\n let renderTargetProperties = this.properties.get(renderTarget);\n let textureProperties = this.properties.get(renderTarget.texture);\n renderTarget.addEventListener('dispose', this.onRenderTargetDispose);\n textureProperties.__webglTexture = this._gl.createTexture();\n this.info.memory.textures++;\n let isCube = (renderTarget.isWebGLRenderTargetCube === true);\n let isTargetPowerOfTwo = this.isPowerOfTwo(renderTarget);\n // Setup framebuffer\n if (isCube) {\n renderTargetProperties.__webglFramebuffer = [];\n for (let i = 0; i < 6; i++) {\n renderTargetProperties.__webglFramebuffer[i] = this._gl.createFramebuffer();\n }\n } else {\n renderTargetProperties.__webglFramebuffer = this._gl.createFramebuffer();\n }\n // Setup color buffer\n if (isCube) {\n this.state.bindTexture(this._gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture);\n this.setTextureParameters(this._gl.TEXTURE_CUBE_MAP, renderTarget.texture, isTargetPowerOfTwo);\n for (let i = 0; i < 6; i++) {\n this.setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i], renderTarget, this._gl.COLOR_ATTACHMENT0, this._gl.TEXTURE_CUBE_MAP_POSITIVE_X + i);\n }\n if (this.textureNeedsGenerateMipmaps(renderTarget.texture, isTargetPowerOfTwo)) {\n this.generateMipmap(this._gl.TEXTURE_CUBE_MAP, renderTarget.texture, renderTarget.width, renderTarget.height);\n }\n this.state.bindTexture(this._gl.TEXTURE_CUBE_MAP, null);\n } else {\n this.state.bindTexture(this._gl.TEXTURE_2D, textureProperties.__webglTexture);\n this.setTextureParameters(this._gl.TEXTURE_2D, renderTarget.texture, isTargetPowerOfTwo);\n this.setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, this._gl.COLOR_ATTACHMENT0, this._gl.TEXTURE_2D);\n if (this.textureNeedsGenerateMipmaps(renderTarget.texture, isTargetPowerOfTwo)) {\n this.generateMipmap(this._gl.TEXTURE_2D, renderTarget.texture, renderTarget.width, renderTarget.height);\n }\n this.state.bindTexture(this._gl.TEXTURE_2D, null);\n }\n // Setup depth and stencil buffers\n if (renderTarget.depthBuffer) {\n this.setupDepthRenderbuffer(renderTarget);\n }\n }", "title": "" }, { "docid": "71f6aa1aba5211ebfd20effa2a5b6b16", "score": "0.76794404", "text": "function setupFrameBufferTexture(framebuffer,renderTarget,attachment,textureTarget){var glFormat=paramThreeToGL(renderTarget.texture.format);var glType=paramThreeToGL(renderTarget.texture.type);state.texImage2D(textureTarget,0,glFormat,renderTarget.width,renderTarget.height,0,glFormat,glType,null);_gl.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,attachment,textureTarget,properties.get(renderTarget.texture).__webglTexture,0);_gl.bindFramebuffer(_gl.FRAMEBUFFER,null);}// Setup storage for internal depth/stencil buffers and bind to correct framebuffer", "title": "" }, { "docid": "290f8ffcadae0381a96b46c4ed962cf2", "score": "0.747572", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) {\n\n\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\tconst glType = utils.convert( texture.type );\n\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\t\tif ( ! renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\t\tconst width = Math.max( 1, renderTarget.width >> level );\n\t\t\t\tconst height = Math.max( 1, renderTarget.height >> level );\n\n\t\t\t\tif ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\t\tstate.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) );\n\n\t\t\t} else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level );\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "fd7942d85c8fc48d58a67f542e01a4ec", "score": "0.745459", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) {\n\n\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\tconst glType = utils.convert( texture.type );\n\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tif ( ! renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\tconst width = Math.max( 1, renderTarget.width >> level );\n\t\t\tconst height = Math.max( 1, renderTarget.height >> level );\n\n\t\t\tif ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\tstate.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) );\n\n\t\t} else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753\n\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level );\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "7f63edddf58f7c3be94d1cdae4e14f33", "score": "0.7420771", "text": "function setupFrameBufferTexture(framebuffer, renderTarget, attachment, textureTarget) {\n var glFormat = utils.convert(renderTarget.texture.format);\n var glType = utils.convert(renderTarget.texture.type);\n var glInternalFormat = getInternalFormat(glFormat, glType);\n state.texImage2D(textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null);\n\n _gl.bindFramebuffer(36160, framebuffer);\n\n _gl.framebufferTexture2D(36160, attachment, textureTarget, properties.get(renderTarget.texture).__webglTexture, 0);\n\n _gl.bindFramebuffer(36160, null);\n } // Setup storage for internal depth/stencil buffers and bind to correct framebuffer", "title": "" }, { "docid": "d7fa44b8b13dbd2da42bb54eaf17fff7", "score": "0.74001706", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t \t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t \t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t \t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t \t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t \t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t \t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t \t}", "title": "" }, { "docid": "abb698f1dfe59a355bc3201892d1549d", "score": "0.7364435", "text": "function setupFrameBufferTexture(framebuffer, renderTarget, attachment, textureTarget) {\n const glFormat = utils.convert(renderTarget.texture.format);\n const glType = utils.convert(renderTarget.texture.type);\n const glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n state.texImage2D(textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null);\n\n _gl.bindFramebuffer(36160, framebuffer);\n\n _gl.framebufferTexture2D(36160, attachment, textureTarget, properties.get(renderTarget.texture).__webglTexture, 0);\n\n _gl.bindFramebuffer(36160, null);\n } // Setup storage for internal depth/stencil buffers and bind to correct framebuffer", "title": "" }, { "docid": "871cabd0909f241b42a6d30d7dd211b7", "score": "0.73568594", "text": "function setupFrameBufferTexture ( framebuffer, renderTarget, attachment, textureTarget ) {\r\n\r\n\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\r\n\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\r\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\r\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\r\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\r\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\r\n\r\n\t\t}", "title": "" }, { "docid": "951391a77288aa60b9e8ab8db1884b83", "score": "0.7350001", "text": "function setupFrameBufferTexture ( framebuffer, renderTarget, attachment, textureTarget ) {\r\n\r\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\r\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\r\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\r\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\r\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\r\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\r\n\r\n\t}", "title": "" }, { "docid": "e3bc86a4544787cc8e9ec1b20e20c46c", "score": "0.73199844", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\t\n\t\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\t\n\t\t\t}", "title": "" }, { "docid": "1a8051d2ce7cfb023db4331de2f772cf", "score": "0.73180413", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tconst glFormat = utils.convert( renderTarget.texture.format );\n\t\t\tconst glType = utils.convert( renderTarget.texture.type );\n\t\t\tconst glInternalFormat = getInternalFormat( renderTarget.texture.internalFormat, glFormat, glType );\n\t\t\tstate.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( 36160, framebuffer );\n\t\t\t_gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( 36160, null );\n\n\t\t}", "title": "" }, { "docid": "bae5c437c3506157fadb8988a95e62d5", "score": "0.7315742", "text": "function setupFrameBufferTexture ( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "bae5c437c3506157fadb8988a95e62d5", "score": "0.7315742", "text": "function setupFrameBufferTexture ( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "9bd9ecee2fd3c7f9f3fc89521b997be6", "score": "0.7294825", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "9bd9ecee2fd3c7f9f3fc89521b997be6", "score": "0.7294825", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "9bd9ecee2fd3c7f9f3fc89521b997be6", "score": "0.7294825", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "9bd9ecee2fd3c7f9f3fc89521b997be6", "score": "0.7294825", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "9bd9ecee2fd3c7f9f3fc89521b997be6", "score": "0.7294825", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "8f0a3bdf77e35090e5e55ee0e69163e9", "score": "0.7282111", "text": "setupFrameBufferTexture(framebuffer, renderTarget, attachment, textureTarget) {\n let glFormat = this.utils.convert(renderTarget.texture.format);\n let glType = this.utils.convert(renderTarget.texture.type);\n this.state.texImage2D(textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null);\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, framebuffer);\n this._gl.framebufferTexture2D(this._gl.FRAMEBUFFER, attachment, textureTarget, this.properties.get(renderTarget.texture).__webglTexture, 0);\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null);\n\n }", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "4a327b2afd7f56be7d2f9cb9d4b91e98", "score": "0.72804147", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "c4824285c782ed515ccf87fd6185f410", "score": "0.72561234", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "c4824285c782ed515ccf87fd6185f410", "score": "0.72561234", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "c4824285c782ed515ccf87fd6185f410", "score": "0.72561234", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t}", "title": "" }, { "docid": "31ebc598bc48c8f063b5ecd6d7da4e38", "score": "0.7249603", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\t\t\tvar glFormat = paramThreeToGL( renderTarget.texture.format );\n\t\t\t\tvar glType = paramThreeToGL( renderTarget.texture.type );\n\t\t\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t\t}", "title": "" }, { "docid": "80489b9dab8a0da57cf87745fc75062b", "score": "0.724011", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "80489b9dab8a0da57cf87745fc75062b", "score": "0.724011", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "80489b9dab8a0da57cf87745fc75062b", "score": "0.724011", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "80489b9dab8a0da57cf87745fc75062b", "score": "0.724011", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "80489b9dab8a0da57cf87745fc75062b", "score": "0.724011", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tstate.texImage2D( textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "073b7ec121eaefa6e844f7383aeb5454", "score": "0.7224458", "text": "function setupFrameBufferTexture( framebuffer, renderTarget, attachment, textureTarget ) {\n\n\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\tvar glInternalFormat = getInternalFormat( glFormat, glType );\n\t\tstate.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}", "title": "" }, { "docid": "59ab777b1bfc0aeaff9c3b5e6a7554d2", "score": "0.7143098", "text": "function setupFrameBufferTexture(framebuffer, renderTarget, attachment, textureTarget) {\n\n\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\tvar glType = utils.convert(renderTarget.texture.type);\n\t\tstate.texImage2D(textureTarget, 0, glFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null);\n\t\t_gl.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n\t\t_gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(renderTarget.texture).__webglTexture, 0);\n\t\t_gl.bindFramebuffer(_gl.FRAMEBUFFER, null);\n\t}", "title": "" }, { "docid": "0cb0932c78ce5c77847f645a6f446ad0", "score": "0.71119213", "text": "setupDepthTexture(framebuffer, renderTarget) {\n let isCube = (renderTarget && renderTarget.isWebGLRenderTargetCube);\n if (isCube) throw new Error('Depth Texture with cube render targets is not supported');\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, framebuffer);\n if (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) {\n throw new Error('renderTarget.depthTexture must be an instance of Speed3DEngine.DepthTexture');\n }\n // upload an empty depth texture with framebuffer size\n if (!this.properties.get(renderTarget.depthTexture).__webglTexture ||\n renderTarget.depthTexture.image.width !== renderTarget.width ||\n renderTarget.depthTexture.image.height !== renderTarget.height) {\n renderTarget.depthTexture.image.width = renderTarget.width;\n renderTarget.depthTexture.image.height = renderTarget.height;\n renderTarget.depthTexture.needsUpdate = true;\n }\n this.setTexture2D(renderTarget.depthTexture, 0);\n let webglDepthTexture = this.properties.get(renderTarget.depthTexture).__webglTexture;\n if (renderTarget.depthTexture.format === DepthFormat) {\n this._gl.framebufferTexture2D(this._gl.FRAMEBUFFER, this._gl.DEPTH_ATTACHMENT, this._gl.TEXTURE_2D, webglDepthTexture, 0);\n } else if (renderTarget.depthTexture.format === DepthStencilFormat) {\n this._gl.framebufferTexture2D(this._gl.FRAMEBUFFER, this._gl.DEPTH_STENCIL_ATTACHMENT, this._gl.TEXTURE_2D, webglDepthTexture, 0);\n } else {\n throw new Error('Unknown depthTexture format');\n }\n }", "title": "" }, { "docid": "9a429d398ecfa9ec0ad635c9793a0a19", "score": "0.69212073", "text": "function rebindTextures( renderTarget, colorTexture, depthTexture ) {\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\t\tif ( colorTexture !== undefined ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 );\n\n\t\t\t}\n\n\t\t\tif ( depthTexture !== undefined ) {\n\n\t\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "2dd2b53ae63c20ecce2abd689da87d4a", "score": "0.6842747", "text": "function setupRenderBufferStorage( renderbuffer, renderTarget ) {\n\n\t\t_gl.bindRenderbuffer( 36161, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\t_gl.renderbufferStorage( 36161, 33189, renderTarget.width, renderTarget.height );\n\t\t\t_gl.framebufferRenderbuffer( 36160, 36096, 36161, renderbuffer );\n\n\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\t_gl.renderbufferStorage( 36161, 34041, renderTarget.width, renderTarget.height );\n\t\t\t_gl.framebufferRenderbuffer( 36160, 33306, 36161, renderbuffer );\n\n\t\t} else {\n\n\t\t\t// FIXME: We don't support !depth !stencil\n\t\t\t_gl.renderbufferStorage( 36161, 32854, renderTarget.width, renderTarget.height );\n\n\t\t}\n\n\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t}", "title": "" }, { "docid": "d3b09f4906991b9985a9c5e6e76e7e5c", "score": "0.6838686", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t \t\tvar isCube = ( (renderTarget && renderTarget.isWebGLRenderTargetCube) );\n\t \t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t \t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t \t\tif ( !( (renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture) ) ) {\n\n\t \t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t \t\t}\n\n\t \t\t// upload an empty depth texture with framebuffer size\n\t \t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t \t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t \t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t \t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t \t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t \t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t \t\t}\n\n\t \t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t \t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t \t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t \t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t \t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t \t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t \t\t} else {\n\n\t \t\t\tthrow new Error('Unknown depthTexture format')\n\n\t \t\t}\n\n\t \t}", "title": "" }, { "docid": "42e6776c516f34b16c96ee94577bc85f", "score": "0.6813268", "text": "function rebindTextures( renderTarget, colorTexture, depthTexture ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tif ( colorTexture !== undefined ) {\n\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 );\n\n\t\t}\n\n\t\tif ( depthTexture !== undefined ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "47f6f32f8e604cb17d87bd9e5fc5e5b4", "score": "0.6731937", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\t\n\t\t\t\tvar isCube = ( (renderTarget && renderTarget.isWebGLRenderTargetCube) );\n\t\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\t\n\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\t\n\t\t\t\tif ( !( (renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture) ) ) {\n\t\n\t\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\t\n\t\t\t\t}\n\t\n\t\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t\t}\n\t\n\t\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\t\n\t\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\t\n\t\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\t\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\t\n\t\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\t\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\tthrow new Error('Unknown depthTexture format')\n\t\n\t\t\t\t}\n\t\n\t\t\t}", "title": "" }, { "docid": "2937295cca473565a2e987a665f1929c", "score": "0.6722054", "text": "function setupRenderBufferStorage( renderbuffer, renderTarget ) {\n\n\t \t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer );\n\n\t \t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t \t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_COMPONENT16, renderTarget.width, renderTarget.height );\n\t \t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\n\t \t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t \t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height );\n\t \t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\n\t \t\t} else {\n\n\t \t\t\t// FIXME: We don't support !depth !stencil\n\t \t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.RGBA4, renderTarget.width, renderTarget.height );\n\n\t \t\t}\n\n\t \t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t \t}", "title": "" }, { "docid": "6532f53469a2d5939fe205b0e7147eff", "score": "0.6722028", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tconst isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget );\n\t\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tconst webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t\t}\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "bd830d470d3d192acc8cbcf058f61175", "score": "0.67103046", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tconst isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget );\n\t\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t\t_gl.bindFramebuffer( 36160, framebuffer );\n\n\t\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tconst webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( 36160, 36096, 3553, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( 36160, 33306, 3553, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "5b9bc134a73432149193a1d21dbb5587", "score": "0.67043734", "text": "function RenderTarget()\n {\n var size_;\n var frameBuffer_;\n var texture_;\n var renderBuffer_;\n }", "title": "" }, { "docid": "0f22f55c2c4c4dd167a2e0be97297835", "score": "0.6695737", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t_gl.bindFramebuffer( 36160, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 36096, 3553, webglDepthTexture, 0 );\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 33306, 3553, webglDepthTexture, 0 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "0f22f55c2c4c4dd167a2e0be97297835", "score": "0.6695737", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t_gl.bindFramebuffer( 36160, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 36096, 3553, webglDepthTexture, 0 );\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 33306, 3553, webglDepthTexture, 0 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "bf9eba670c4ebb02d7d22e762b39eb43", "score": "0.66922605", "text": "function setupDepthTexture(framebuffer, renderTarget) {\n\n\t\tvar isCube = renderTarget && renderTarget.isWebGLRenderTargetCube;\n\t\tif (isCube) throw new Error('Depth Texture with cube render targets is not supported');\n\n\t\t_gl.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n\n\t\tif (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) {\n\n\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif (!properties.get(renderTarget.depthTexture).__webglTexture || renderTarget.depthTexture.image.width !== renderTarget.width || renderTarget.depthTexture.image.height !== renderTarget.height) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t}\n\n\t\tsetTexture2D(renderTarget.depthTexture, 0);\n\n\t\tvar webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture;\n\n\t\tif (renderTarget.depthTexture.format === DepthFormat) {\n\n\t\t\t_gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);\n\t\t} else if (renderTarget.depthTexture.format === DepthStencilFormat) {\n\n\t\t\t_gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);\n\t\t} else {\n\n\t\t\tthrow new Error('Unknown depthTexture format');\n\t\t}\n\t}", "title": "" }, { "docid": "5a5dbe892efbf7a719f5288ec09b7001", "score": "0.66766214", "text": "function setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t\t_gl.bindRenderbuffer( 36161, renderbuffer );\n\n\t\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\t\tlet glInternalFormat = 33189;\n\n\t\t\t\tif ( isMultisample ) {\n\n\t\t\t\t\tconst depthTexture = renderTarget.depthTexture;\n\n\t\t\t\t\tif ( depthTexture && depthTexture.isDepthTexture ) {\n\n\t\t\t\t\t\tif ( depthTexture.type === FloatType ) {\n\n\t\t\t\t\t\t\tglInternalFormat = 36012;\n\n\t\t\t\t\t\t} else if ( depthTexture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\t\tglInternalFormat = 33190;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t\t_gl.framebufferRenderbuffer( 36160, 36096, 36161, renderbuffer );\n\n\t\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\t\tif ( isMultisample ) {\n\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, 35056, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorage( 36161, 34041, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\n\t\t\t\t_gl.framebufferRenderbuffer( 36160, 33306, 36161, renderbuffer );\n\n\t\t\t} else {\n\n\t\t\t\tconst glFormat = utils.convert( renderTarget.texture.format );\n\t\t\t\tconst glType = utils.convert( renderTarget.texture.type );\n\t\t\t\tconst glInternalFormat = getInternalFormat( renderTarget.texture.internalFormat, glFormat, glType );\n\n\t\t\t\tif ( isMultisample ) {\n\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t\t}", "title": "" }, { "docid": "e7231dc8231c47cdd61c359b3b25227b", "score": "0.6672805", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "e7231dc8231c47cdd61c359b3b25227b", "score": "0.6672805", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "e7231dc8231c47cdd61c359b3b25227b", "score": "0.6672805", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f88b1d51aa7c9edc914f1d4371c0a8a0", "score": "0.6671391", "text": "function setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t_gl.bindRenderbuffer( 36161, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tvar samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, 33189, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, 33189, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\t_gl.framebufferRenderbuffer( 36160, 36096, 36161, renderbuffer );\n\n\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tvar samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, 34041, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, 34041, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\n\t\t\t_gl.framebufferRenderbuffer( 36160, 33306, 36161, renderbuffer );\n\n\t\t} else {\n\n\t\t\tvar glFormat = utils.convert( renderTarget.texture.format );\n\t\t\tvar glType = utils.convert( renderTarget.texture.type );\n\t\t\tvar glInternalFormat = getInternalFormat( glFormat, glType );\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tvar samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t}", "title": "" }, { "docid": "9b32da4631236d044a8a3b435378698b", "score": "0.6670038", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\t\tif ( !( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t\t\t\t}\n\n\t\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t\t}\n\n\t\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error('Unknown depthTexture format')\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "02f3763ecc62460981611b0dbbf0c497", "score": "0.66643006", "text": "function setupRenderBufferStorage( renderbuffer, renderTarget ) {\n\t\n\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer );\n\t\n\t\t\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\t\n\t\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_COMPONENT16, renderTarget.width, renderTarget.height );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\t\n\t\t\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\t\n\t\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\t// FIXME: We don't support !depth !stencil\n\t\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.RGBA4, renderTarget.width, renderTarget.height );\n\t\n\t\t\t\t}\n\t\n\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\t\n\t\t\t}", "title": "" }, { "docid": "0881adaddd1dd3540d6442a13799fd80", "score": "0.6661354", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( !( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error('Unknown depthTexture format')\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0881adaddd1dd3540d6442a13799fd80", "score": "0.6661354", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( !( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error('Unknown depthTexture format')\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0881adaddd1dd3540d6442a13799fd80", "score": "0.6661354", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( !( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error('Unknown depthTexture format')\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0881adaddd1dd3540d6442a13799fd80", "score": "0.6661354", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( !( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error('Unknown depthTexture format')\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0881adaddd1dd3540d6442a13799fd80", "score": "0.6661354", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\t\tif ( isCube ) throw new Error('Depth Texture with cube render targets is not supported!');\n\n\t\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( !( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\n\t\t\t}\n\n\t\t\t// upload an empty depth texture with framebuffer size\n\t\t\tif ( !properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tthrow new Error('Unknown depthTexture format')\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f0ae17432616f2b8e2535b969dbe490c", "score": "0.6637163", "text": "setupDepthRenderbuffer(renderTarget) {\n let renderTargetProperties = this.properties.get(renderTarget);\n let isCube = (renderTarget.isWebGLRenderTargetCube === true);\n if (renderTarget.depthTexture) {\n if (isCube) throw new Error('target.depthTexture not supported in Cube render targets');\n this.setupDepthTexture(renderTargetProperties.__webglFramebuffer, renderTarget);\n } else {\n if (isCube) {\n renderTargetProperties.__webglDepthbuffer = [];\n for (let i = 0; i < 6; i++) {\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[i]);\n renderTargetProperties.__webglDepthbuffer[i] = this._gl.createRenderbuffer();\n this.setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i], renderTarget);\n }\n } else {\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n renderTargetProperties.__webglDepthbuffer = this._gl.createRenderbuffer();\n this.setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer, renderTarget);\n }\n }\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null);\n }", "title": "" }, { "docid": "8f071228c031a0b75354463477f5d1ec", "score": "0.6614656", "text": "function setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tvar isCube = ( renderTarget && renderTarget.isWebGLRenderTargetCube );\n\t\tif ( isCube ) { throw new Error( 'Depth Texture with cube render targets is not supported' ); }\n\n\t\t_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tvar webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "7a83822e35f24372bd46df5ced4bb41b", "score": "0.66086763", "text": "function _(t){var n=i.get(t),r=!0===t.isWebGLRenderTargetCube;if(t.depthTexture){if(r)throw new Error(\"target.depthTexture not supported in Cube render targets\");!function(t,n){if(n&&n.isWebGLRenderTargetCube)throw new Error(\"Depth Texture with cube render targets is not supported\");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");// upload an empty depth texture with framebuffer size\ni.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),v(n.depthTexture,0);var r=i.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===De)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,r,0);else{if(n.depthTexture.format!==Ue)throw new Error(\"Unknown depthTexture format\");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,r,0)}}(n.__webglFramebuffer,t)}else if(r){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),b(n.__webglDepthbuffer[o],t)}else e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),b(n.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}// Set up GL resources for the render target", "title": "" } ]
cb6c4b9941305ff49572ab224b93869f
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not null/undefined), the rendered element will not trigger updates to the element. Instead, the `value` prop must change in order for the rendered element to be updated. The rendered element will be initialized with an empty value, the prop `defaultValue` if specified, or the children content (deprecated).
[ { "docid": "e32d3d9a0dec68990de3b63cabb16791", "score": "0.0", "text": "function getHostProps$3(element, props) {\n var node = element;\n !(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;\n\n // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: '' + node._wrapperState.initialValue\n });\n\n return hostProps;\n}", "title": "" } ]
[ { "docid": "5d790a125241b67d7f99c7c2b2a0ee8a", "score": "0.66504043", "text": "constructor(value, defaultValue) {\n this.defaultValue = defaultValue;\n this.setValue(value);\n }", "title": "" }, { "docid": "e81027443579192c9c6db5ee7adb649e", "score": "0.6082687", "text": "function value(value) { return new HtmlAttr(\"value\", [\"button\", \"data\", \"input\", \"li\", \"meter\", \"option\", \"progress\", \"param\"], value); }", "title": "" }, { "docid": "0f5775618d15c88d3b325a41c5e7c574", "score": "0.6072354", "text": "set value(val) {\n this._rootDOMNode.value = val;\n this._resizeComponent();\n }", "title": "" }, { "docid": "0794af11de708f2f5d1f903a601e78ca", "score": "0.59779125", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "0794af11de708f2f5d1f903a601e78ca", "score": "0.59779125", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "0794af11de708f2f5d1f903a601e78ca", "score": "0.59779125", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "0f5c1700b57df90b7651e390c95c2543", "score": "0.5952545", "text": "setValue(value) {\n ReactDOM.findDOMNode(this).value = value;\n }", "title": "" }, { "docid": "0f5c1700b57df90b7651e390c95c2543", "score": "0.5952545", "text": "setValue(value) {\n ReactDOM.findDOMNode(this).value = value;\n }", "title": "" }, { "docid": "556ad1b02edd68407e743684827e1bed", "score": "0.5938497", "text": "set value ( value ) {\n // Keep track of previous value in case the new one is bogus, but revalidate it in case geometry has changed\n const prevーvalue = this.constructor.validate ( this.constructor.string ( this.value ) );\n\n // OK, if the browser thinks it's legit, check validity further\n if ( this.elem.checkValidity () ) try {\n const nextーvalue = this.constructor.validate ( value ); // give a chance to throw before assigning to super\n super.value = nextーvalue;\n }\n catch ( e ) { // just in case validate catches an error, do not display the corresponding value, just the error!\n this.elem.value = `${ e }`;\n }\n // otherwise return to previously validated value\n else this.elem.value = prevーvalue;\n this.display ( this.configーdata [ this.configーname ] );\n }", "title": "" }, { "docid": "0528f9a68537259ee83e5c24a0bddfdd", "score": "0.5925902", "text": "constructor(label, defaultValue) {\n this.label = label;\n this.defaultValue = defaultValue;\n this.value = defaultValue;\n }", "title": "" }, { "docid": "668f082370f659a3ab940c76668b678d", "score": "0.5922182", "text": "set value(value) {\n const el = this.element;\n if (el) {\n const tag = el.tagName;\n if (tag === 'INPUT') {\n el.value = value;\n Simulate.change(el);\n return;\n } else {\n console.error(`Cannot set the value of a non-input element. Tried to set ${this.selector} to ${value}.`);\n return;\n }\n }\n console.error(`${this.selector} does not exist and thus cannot be set to ${value}.`);\n }", "title": "" }, { "docid": "13230d93df07fe96533cd41878b7e580", "score": "0.5880415", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "13230d93df07fe96533cd41878b7e580", "score": "0.5880415", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "13230d93df07fe96533cd41878b7e580", "score": "0.5880415", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "5ec35218ca3f003d328444abccf94ba2", "score": "0.58749866", "text": "asElement(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n return value || defaultValue || null;\n }", "title": "" }, { "docid": "5ec35218ca3f003d328444abccf94ba2", "score": "0.58749866", "text": "asElement(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n return value || defaultValue || null;\n }", "title": "" }, { "docid": "bc61bf0ed1047f5f7d5dc3da666222fd", "score": "0.58738995", "text": "getValue() {\n return this.props.value !== undefined ? this.props.value : defaultValue;\n }", "title": "" }, { "docid": "2ba7a63db44900eeaed52782fbbb382b", "score": "0.5773299", "text": "initValue(value) {\n this.value = value;\n }", "title": "" }, { "docid": "ac7fdba185ebb332599b234d9238a4da", "score": "0.57660705", "text": "function Props(val) {\n this._value = val || {};\n}", "title": "" }, { "docid": "f576e140f92acb925725d77f22651ab6", "score": "0.57011986", "text": "function createValue() {\n\t var _ref2 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var schema = _ref2.schema;\n\t var _ref2$value = _ref2.value;\n\t var value = _ref2$value === undefined ? {} : _ref2$value;\n\t var _ref2$onChange = _ref2.onChange;\n\t var onChange = _ref2$onChange === undefined ? _emptyFunction2['default'] : _ref2$onChange;\n\t var _ref2$params = _ref2.params;\n\t var params = _ref2$params === undefined ? {} : _ref2$params;\n\t var _ref2$errorList = _ref2.errorList;\n\t var errorList = _ref2$errorList === undefined ? null : _ref2$errorList;\n\t var _ref2$externalErrorList = _ref2.externalErrorList;\n\t var externalErrorList = _ref2$externalErrorList === undefined ? [] : _ref2$externalErrorList;\n\t\n\t if (errorList === null) {\n\t errorList = validate(schema, value);\n\t }\n\t return new ValueRoot({ schema: schema, value: value, onChange: onChange, params: params, errorList: errorList, externalErrorList: externalErrorList });\n\t}", "title": "" }, { "docid": "fa7de36dbe5786652ab4d42231ea5fa7", "score": "0.567729", "text": "function setValue(el, value) {\n //console.log(\"setValue\", el.nodeName, \"[\"+value+\"]\");\n if (isInputOrTextAreaElement(el)) {\n el.value = value;\n } else {\n el.textContent = value;\n }\n }", "title": "" }, { "docid": "9e37bc17b4b1ec96eebb449114fa1d69", "score": "0.5675974", "text": "initializeDomFieldValue() {\n if (this.initialValueSupplied()) {\n if (this.boundValueSupplied()) {\n this._changeBoundValue(this._initialValue);\n // ?? unsure if we want to trigger change here (with it's validation) BUT I think this boundValue change WILL do this regardless\n }\n else {\n fieldNode.value = this._initialValue;\n // ?? unsure if we want to trigger change here (with it's validation) BUT if we do it must be done explicitly here (?? whatever we decide SHOULD be consistent with bound case - above)\n }\n }\n }", "title": "" }, { "docid": "c396b369fe1fe4efdba6a870612d99e8", "score": "0.5631987", "text": "function ResourcePositionValueView() {\n\txnode.Div.call(this);\n\n\tthis.defaultValueView = new xnode.Div();\n\tthis.defaultValueView.style.position = \"absolute\";\n\tthis.defaultValueView.style.width = \"50%\";\n\tthis.defaultValueView.style.top = \"15px\";\n\n\tthis.appendChild(this.defaultValueView);\n\n\tthis.valueDiv = new xnode.Div();\n\tthis.valueDiv.style.position = \"absolute\";\n\tthis.valueDiv.style.right = \"10px\";\n\tthis.valueDiv.style.top = \"10px\";\n\tthis.valueDiv.style.width = \"50%\";\n\n\tthis.valueDiv.className = \"ui input fluid mini\";\n\tthis.appendChild(this.valueDiv);\n\n\tthis.valueInput = new xnode.Input();\n\tthis.valueInput.type = \"text\";\n\tthis.valueDiv.appendChild(this.valueInput);\n}", "title": "" }, { "docid": "493e57d8396792c3b4dcec42e2a85b13", "score": "0.56155634", "text": "setValue(value, params = {}) {\n this.value = this.initialValue = this.textValue = value;\n this.trigger(\"change\", params);\n this.parent.updateInputs();\n }", "title": "" }, { "docid": "4adb1fba2537e79fd4321f5c787a61ce", "score": "0.5612154", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "title": "" }, { "docid": "202091764f0cfa5d771307d1d1a49523", "score": "0.5595747", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "title": "" }, { "docid": "07712a038e8e677d978dbab6af5d8490", "score": "0.5579506", "text": "constructor(label, defaultValue) {\n this.label = label;\n this.value = String(defaultValue);\n this.defaultValue = String(defaultValue);\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5562626", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "156ed7ae7003cf1cfe0266aee23432b7", "score": "0.55583173", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "d0f14175fe351a9a172a0117ff1a4ec0", "score": "0.55506164", "text": "function ValueControl(id, template, parent) {\n\t\tUi.ValueControl.base.constructor.call(this, id, template, parent);\n\t\tthis.getDataType();\n\t\tthis.parse = this.dataType == Ui.Control.DataTypes.Float ? parseFloat : parseInt;\n\t\tthis.defaultValue = this.template.default || 0;\n\t\tif (this.isNumeric && this.dataType != Ui.Control.DataTypes.Bool) {\n\t\t\tthis.min = this.parse(this.template.min); if (isNaN(this.min)) this.min = 0;\n\t\t\tthis.max = this.parse(this.template.max); if (isNaN(this.max)) this.max = 100;\n\t\t\tthis.step = this.parse(this.template.step); if (isNaN(this.step)) this.step = 1;\n\t\t\t// default min/max validations\n\t\t\tthis.addValidation('value', x => x < this.min, 'Value is less than minimum!', x => this.min);\n\t\t\tthis.addValidation('value', x => x > this.max, 'Value is greater than maximum!', x => this.max);\n\t\t}\n\t\tthis.dataLink = null;\n\t\tthis.fromSource = x => x;\n\t\tthis.toSource = x => x;\n\t\t// this.offset = 0.0;\n\t\tthis.scale = 1.0;\n\t\tthis.value = this.template.value;\n\t\tthis.decimalDigits = this.template['decimal-digits'];\n\t\tthis.dataBind();\n\t}", "title": "" }, { "docid": "70df881f321d1ddb9bc48332d71f3ab7", "score": "0.5546735", "text": "function renderValue(_this, value) {\n\t\tvar _value = value || assembleDate(_this.date),\n\t\t\telement = _this.options.renderValue.call(_this, _this.datePicker,\n\t\t\t\t_this.currentInput, _value),\n\t\t\t_element = element && element.nodeType === 1 ? element : _this.currentInput;\n\n\t\tif (element) {\n\t\t\t_element.value = _value;\n\t\t}\n\t}", "title": "" }, { "docid": "22e76b61da797c9124b368026a5f3ba4", "score": "0.5536473", "text": "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "22e76b61da797c9124b368026a5f3ba4", "score": "0.5536473", "text": "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "1bcb84345f0fcefe7b301f6a3be4312f", "score": "0.5533386", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' && typeof el[key] === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n }\n else if (value == null && typeof el[key] === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n }\n else {\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n Object(_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__[\"warn\"])(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5521221", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "206a7467868e345ef11766b88e8ed71b", "score": "0.5520787", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "title": "" }, { "docid": "dbdd8d9219aed28f49c44ee55453e584", "score": "0.551478", "text": "function setProperty(el, param, value, tagName) {\n tagName = tagName || el.tagName.toLowerCase();\n\n function _setInputProperty() {\n var firstChild = el.querySelector('textarea, input, select, button');\n\n if ( param === 'value' ) {\n if ( tagName === 'gui-radio' || tagName === 'gui-checkbox' ) {\n if ( value ) {\n firstChild.setAttribute('checked', 'checked');\n } else {\n firstChild.removeAttribute('checked');\n }\n }\n\n firstChild.value = value;\n return;\n } else if ( param === 'disabled' ) {\n if ( value ) {\n firstChild.setAttribute('disabled', 'disabled');\n } else {\n firstChild.removeAttribute('disabled');\n }\n return;\n }\n\n firstChild.setAttribute(param, value || '');\n }\n\n function _setElementProperty() {\n if ( typeof value === 'boolean' ) {\n value = value ? 'true' : 'false';\n } else if ( typeof value === 'object' ) {\n try {\n value = JSON.stringify(value);\n } catch ( e ) {}\n }\n el.setAttribute('data-' + param, value);\n }\n\n function _createInputLabel() {\n if ( param === 'label' ) {\n var firstChild = el.querySelector('textarea, input, select');\n el.appendChild(firstChild);\n Utils.$remove(el.querySelector('label'));\n createInputLabel(el, tagName.replace(/^gui\\-/, ''), firstChild, value);\n }\n }\n\n // Generics for input elements\n var firstChild = el.children[0];\n var accept = ['gui-slider', 'gui-text', 'gui-password', 'gui-textarea', 'gui-checkbox', 'gui-radio', 'gui-select', 'gui-select-list', 'gui-button'];\n if ( accept.indexOf(tagName) >= 0 ) {\n _setInputProperty();\n _createInputLabel();\n }\n\n // Other types of elements\n accept = ['gui-image', 'gui-audio', 'gui-video'];\n if ( (['src', 'controls', 'autoplay', 'alt']).indexOf(param) >= 0 && accept.indexOf(tagName) >= 0 ) {\n firstChild[param] = value;\n }\n\n // Normal DOM attributes\n if ( (['_id', '_class', '_style']).indexOf(param) >= 0 ) {\n firstChild.setAttribute(param.replace(/^_/, ''), value);\n return;\n }\n\n // Set the actual root element property value\n if ( param !== 'value' ) {\n _setElementProperty();\n }\n }", "title": "" }, { "docid": "1bda032ca3c8ce24bce05687cf937a0d", "score": "0.5501295", "text": "setPropertyValue(value) {\n this._value = value;\n }", "title": "" }, { "docid": "bf3060dd4de2787ffd8f8bffd2e5b8bf", "score": "0.5494302", "text": "function value(actualValue, defaultValue) {\n return actualValue !== undefined ? actualValue : defaultValue;\n }", "title": "" }, { "docid": "310c9cc1a13ee7384e61db2952528e59", "score": "0.54930544", "text": "get value(): string {\n return this._rootDOMNode.value;\n }", "title": "" }, { "docid": "9aa205927744679d071c2acb16d15841", "score": "0.54901767", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((false)) {}\n }\n}", "title": "" }, { "docid": "705c708262ebd1493f3c4977ed57b182", "score": "0.54834396", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "title": "" }, { "docid": "705c708262ebd1493f3c4977ed57b182", "score": "0.54834396", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472595", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472595", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472595", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "226578b28fc7d47ed420675f651a0848", "score": "0.5470196", "text": "setDisplayValue(value) {\n if (this.#curInstance != null) {\n this.#curInstance.$field.value = this.#curInstance.displayValue(\n this.toString()) || value;\n } else {\n this.#widget.value = this.#model.displayValue || value;\n }\n }", "title": "" }, { "docid": "e87e03dfd94d6302af16e002ed8ad7c9", "score": "0.54669756", "text": "function Element(value) {\n this.value = value;\n}", "title": "" }, { "docid": "198a7fc4b5441c4f793ffb1c1a4a1b09", "score": "0.5466684", "text": "set value(val) {\n super.value = val;\n }", "title": "" }, { "docid": "cfb6dc214c17935f015e48219be70e67", "score": "0.5466548", "text": "set content(value) {\n \t\tthis.innerHTML = value\n \t}", "title": "" }, { "docid": "5eb0dbd0dff1577464248a2440cf216d", "score": "0.54540247", "text": "setValue (value) {\n this.value = this.ensureValidValue(value)\n return this.value\n }", "title": "" }, { "docid": "b26afec9eb07776e305afda06a1175d2", "score": "0.5452829", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "title": "" }, { "docid": "b26afec9eb07776e305afda06a1175d2", "score": "0.5452829", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "title": "" }, { "docid": "b26afec9eb07776e305afda06a1175d2", "score": "0.5452829", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "title": "" }, { "docid": "b26afec9eb07776e305afda06a1175d2", "score": "0.5452829", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "title": "" }, { "docid": "a407f1a84983f1ab11bf7b0773037fa1", "score": "0.5446329", "text": "function ValueShell(value) {\n this.value = value;\n }", "title": "" }, { "docid": "40e47fa5b8767b87de405cda137888f4", "score": "0.5444461", "text": "static async setValue (element, value, o = {}) {\n\t\tdelete _.pending.get(element)?.[o.attribute];\n\n\t\tif ($.type(value) === \"promise\") {\n\t\t\tif (!_.pending.has(element)) {\n\t\t\t\t_.pending.set(element, {});\n\t\t\t}\n\n\t\t\tlet pending = value;\n\t\t\t_.pending.get(element)[o.attribute] = pending;\n\n\t\t\ttry {\n\t\t\t\tvalue = await pending;\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tvalue = e;\n\t\t\t}\n\n\t\t\tif (_.pending.get(element)[o.attribute] !== pending) {\n\t\t\t\t// Value has been superseded\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdelete _.pending.get(element)?.[o.attribute];\n\t\t}\n\n\t\tif (element.nodeType === 1) {\n\t\t\tif (!o.config) {\n\t\t\t\to.config = _.getConfig(element, o.attribute);\n\t\t\t}\n\n\t\t\to.attribute = o.attribute !== undefined? o.attribute : o.config.attribute;\n\t\t\to.datatype = o.datatype !== undefined? o.datatype : o.config.datatype;\n\n\t\t\tif (o.config.setValue && o.attribute == o.config.attribute) {\n\t\t\t\treturn o.config.setValue(element, value, o.attribute);\n\t\t\t}\n\t\t}\n\n\t\tif (value === null && !o.datatype) {\n\t\t\tvalue = \"\";\n\t\t}\n\n\t\tif (o.attribute) {\n\t\t\tif (o.attribute in element && _.useProperty(element, o.attribute) && element[o.attribute] !== value) {\n\t\t\t\t// Setting properties (if they exist) instead of attributes\n\t\t\t\t// is needed for dynamic elements such as checkboxes, sliders etc\n\t\t\t\ttry {\n\t\t\t\t\tvar previousValue = element[o.attribute];\n\t\t\t\t\tvar newValue = element[o.attribute] = value;\n\t\t\t\t}\n\t\t\t\tcatch (e) {}\n\t\t\t}\n\n\t\t\t// Set attribute anyway, even if we set a property because when\n\t\t\t// they're not in sync it gets really fucking confusing.\n\t\t\tif (o.datatype == \"boolean\") {\n\t\t\t\tif (value != element.hasAttribute(o.attribute)) {\n\t\t\t\t\t$.toggleAttribute(element, o.attribute, value, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (element.getAttribute(o.attribute) != value) { // intentionally non-strict, e.g. \"3.\" !== 3\n\t\t\t\telement.setAttribute(o.attribute, value);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tvar presentational = o.presentational ?? _.format(value, o);\n\n\t\t\tif (o.node && !o.config.hasChildren) {\n\t\t\t\t_.setText(element, presentational);\n\t\t\t}\n\t\t\telse {\n\t\t\t\telement.textContent = presentational;\n\t\t\t}\n\n\n\t\t\tif (presentational !== value && element.setAttribute) {\n\t\t\t\telement.setAttribute(\"content\", value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a9affcb1870e6a80980f1ad3781f8cd", "score": "0.5442794", "text": "function ValueLabelComponent(props) {\n const { children, open, value } = props;\n \n return (\n <Tooltip open={open} enterTouchDelay={0} placement=\"top\" title={value}>\n {children}\n </Tooltip>\n );\n }", "title": "" }, { "docid": "c52293a9efcf0167e11a2fa08a6e0b8c", "score": "0.5441445", "text": "set value(value) {\n this.set(value);\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.5431716", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "423f290478c8393706c060bfab958e5d", "score": "0.54237056", "text": "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n if (value == null) {\r\n el.removeAttribute(key);\r\n }\r\n return;\r\n }\r\n if (value === '' || value == null) {\r\n const type = typeof el[key];\r\n if (value === '' && type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n return;\r\n }\r\n else if (value == null && type === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n else if (type === 'number') {\r\n // e.g. <img :width=\"null\">\r\n el[key] = 0;\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n }\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n }\r\n}", "title": "" }, { "docid": "d766bccf0ab4a7fbe5ab32fe386cfca1", "score": "0.54218715", "text": "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n if (value == null) {\r\n el.removeAttribute(key);\r\n }\r\n return;\r\n }\r\n if (value === '' || value == null) {\r\n const type = typeof el[key];\r\n if (value === '' && type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n return;\r\n }\r\n else if (value == null && type === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n else if (type === 'number') {\r\n // e.g. <img :width=\"null\">\r\n el[key] = 0;\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n }\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n if ((false)) {}\r\n }\r\n}", "title": "" }, { "docid": "074e1574cd5100704da7641253238441", "score": "0.54202974", "text": "setInitialValue() {\n this.value = !(this.field.value === undefined || this.field.value === null)\n ? this.field.value\n : ''\n }", "title": "" }, { "docid": "9070d97cd44e70500c51f8b42086a39e", "score": "0.54184544", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "title": "" }, { "docid": "9070d97cd44e70500c51f8b42086a39e", "score": "0.54184544", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "title": "" } ]
4aa83f37b1d8128132f43990c994d3fa
for now, work with hex strings because they're easier in JS
[ { "docid": "e09d6500281a4cfbab650594123e4ca5", "score": "0.0", "text": "function curveFpDecodePointHex(s) {\n switch(parseInt(s.substr(0,2), 16)) { // first byte\n case 0:\n\treturn this.infinity;\n case 2:\n case 3:\n\t// point compression not supported yet\n\treturn null;\n case 4:\n case 6:\n case 7:\n\tvar len = (s.length - 2) / 2;\n\tvar xHex = s.substr(2, len);\n\tvar yHex = s.substr(len+2, len);\n\n\treturn new ECPointFp(this,\n\t\t\t this.fromBigInteger(new BigInteger(xHex, 16)),\n\t\t\t this.fromBigInteger(new BigInteger(yHex, 16)));\n\n default: // unsupported\n\treturn null;\n }\n}", "title": "" } ]
[ { "docid": "aa8372b5cc304ef52a195433eb74b551", "score": "0.7272454", "text": "function fromHex(s){\n\treturn String.fromCharCode(parseInt(s.slice(2), 16));\n}", "title": "" }, { "docid": "00afafe4839d0eb582c8922ec2c0cf60", "score": "0.7151877", "text": "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "title": "" }, { "docid": "eea42a025bef305fba11996efd084bf8", "score": "0.7143062", "text": "function parseHex(string) {\n string = string.replace(/[^A-F0-9]/ig, '');\n if( string.length !== 3 && string.length !== 6 ) return '';\n if( string.length === 3 ) {\n string = string[0] + string[0] + string[1] + string[1] + string[2] + string[2];\n }\n return '#' + string;\n }", "title": "" }, { "docid": "eea42a025bef305fba11996efd084bf8", "score": "0.7143062", "text": "function parseHex(string) {\n string = string.replace(/[^A-F0-9]/ig, '');\n if( string.length !== 3 && string.length !== 6 ) return '';\n if( string.length === 3 ) {\n string = string[0] + string[0] + string[1] + string[1] + string[2] + string[2];\n }\n return '#' + string;\n }", "title": "" }, { "docid": "833031ed2cb44c7d332c0f744fd88c8a", "score": "0.71322554", "text": "function parseHexUtf8(str, start, end) {\n\t var result = '';\n\t while (start < end) {\n\t result += String.fromCharCode(\n\t (hexToInt(str.charCodeAt(start++)) << 4) |\n\t hexToInt(str.charCodeAt(start++)));\n\t }\n\t return result;\n\t}", "title": "" }, { "docid": "dfdbca204516610ca35bace0dcc99625", "score": "0.71099424", "text": "function fisHex(str){\n return str.match(/[a-f]/gi) ? str.match(/[a-f]/gi).reduce(function(a, b){\n return a ^ parseInt(b, 16);\n },0) : 0;\n}", "title": "" }, { "docid": "028d9e5651c79403635ac1fb8a3beab4", "score": "0.70978856", "text": "function hexhash(hex) {return(\"#\"+hex);}", "title": "" }, { "docid": "0360ef50ce3b36ae8d003bc95345bb68", "score": "0.69910806", "text": "function checkHex2bytes(str){\n if(str.length < 2)\n str = '0' + str;\n else\n str = str;\n return str;\n }", "title": "" }, { "docid": "cfff19fbfae705f7f99c8971c1202502", "score": "0.69831556", "text": "function convertToHex(s){\n s=s.split(\",\");\n var st=\"\"\n for(i in s){\n st+=hexify(parseInt(s[i]));\n }\n document.getElementById('hex').value=st;\n}", "title": "" }, { "docid": "448f7ae9eb00ee6e73740e29c663777b", "score": "0.6947909", "text": "function parseHexUtf8(str, start, end) {\n var result = '';\n while (start < end) {\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start++)) << 4) |\n hexToInt(str.charCodeAt(start++)));\n }\n return result;\n}", "title": "" }, { "docid": "448f7ae9eb00ee6e73740e29c663777b", "score": "0.6947909", "text": "function parseHexUtf8(str, start, end) {\n var result = '';\n while (start < end) {\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start++)) << 4) |\n hexToInt(str.charCodeAt(start++)));\n }\n return result;\n}", "title": "" }, { "docid": "448f7ae9eb00ee6e73740e29c663777b", "score": "0.6947909", "text": "function parseHexUtf8(str, start, end) {\n var result = '';\n while (start < end) {\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start++)) << 4) |\n hexToInt(str.charCodeAt(start++)));\n }\n return result;\n}", "title": "" }, { "docid": "448f7ae9eb00ee6e73740e29c663777b", "score": "0.6947909", "text": "function parseHexUtf8(str, start, end) {\n var result = '';\n while (start < end) {\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start++)) << 4) |\n hexToInt(str.charCodeAt(start++)));\n }\n return result;\n}", "title": "" }, { "docid": "448f7ae9eb00ee6e73740e29c663777b", "score": "0.6947909", "text": "function parseHexUtf8(str, start, end) {\n var result = '';\n while (start < end) {\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start++)) << 4) |\n hexToInt(str.charCodeAt(start++)));\n }\n return result;\n}", "title": "" }, { "docid": "b2cc1b609842090734d94b39ff3cc762", "score": "0.6907629", "text": "function isHexStr(str)\r\n{\r\n if (str.search(/[^0-9a-fA-F]/) == -1)\r\n return true\r\n return false\r\n}", "title": "" }, { "docid": "2bb5f95a445b64bab0351ce5a2bc1e99", "score": "0.68906945", "text": "function hexFromString(str){\n\tvar result = \"\";\t\n\twhile(str.length<6)\n\t\tstr +=\"0\";\n\tfor(var i = 0; i<6; i++){\n\t\t//Does not accept hex values above B to avoid very light colors.\n\t\t//the randomly assigned values also only go up to B (11 in decimal).\n\t\tresult += /^[0-9A-Ba-b]+$/.test(str[i]) ? str[i] : Math.floor(Math.random()*11).toString(16);\t\t\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "1722f85a810b2b1da652ed5163ce8f76", "score": "0.6851472", "text": "function cvt_byte(str) {\n // get the first hex digit\n var val1 = str.charCodeAt(0);\n\n // do some error checking\n if (val1 >= 48 && val1 <= 57)\n // have a valid digit 0-9\n val1 -= 48;\n else if (val1 >= 65 && val1 <= 70)\n // have a valid digit A-F\n val1 -= 55;\n else if (val1 >= 97 && val1 <= 102)\n // have a valid digit A-F\n val1 -= 87;\n else {\n // not 0-9 or A-F, complain\n window.alert(str.charAt(1) + \" is not a valid hex digit\");\n return - 1;\n }\n\n // get the second hex digit\n var val2 = str.charCodeAt(1);\n\n // do some error checking\n if (val2 >= 48 && val2 <= 57)\n // have a valid digit 0-9\n val2 -= 48;\n else if (val2 >= 65 && val2 <= 70)\n // have a valid digit A-F\n val2 -= 55;\n else if (val2 >= 97 && val2 <= 102)\n // have a valid digit A-F\n val2 -= 87;\n else {\n // not 0-9 or A-F, complain\n window.alert(str.charAt(2) + \" is not a valid hex digit\");\n return - 1;\n }\n\n // all is ok, return the value\n return val1 * 16 + val2;\n}", "title": "" }, { "docid": "e9c7a28eaf9db22cb244235940e3c3a6", "score": "0.6834976", "text": "function hex2string(hexx) {\n var hex = hexx.toString();\n var str = '';\n for(let i = 0; i < hex.length; i += 2){\n str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)) \n };\n return str\n}", "title": "" }, { "docid": "2710db2644bb95c7334fb128a538a86b", "score": "0.6830982", "text": "parseHex(str) {\n let s = [];\n str.match(/.{2}/g).forEach((e) => s.push(parseInt(e, 16).toString(2).padStart(8, 0)));\n return s;\n }", "title": "" }, { "docid": "394d482fa700156c00cb142c77226b89", "score": "0.68246317", "text": "get hex() {\n let r = this.r.toString(16).padStart(2, \"0\");\n let g = this.g.toString(16).padStart(2, \"0\");\n let b = this.b.toString(16).padStart(2, \"0\");\n let a = this.a !== 255 ? `${this.a}`.toString(16).padStart(2, \"0\") : \"\";\n return `#${r}${g}${b}${a}`;\n }", "title": "" }, { "docid": "ad7c0476caffa894acc8c69faed314b4", "score": "0.6790822", "text": "function hexlify(bytes) {\r\n var res = [];\r\n for (var i = 0; i < bytes.length; i++)\r\n res.push(hex(bytes[i]));\r\n\r\n return res.join('');\r\n}", "title": "" }, { "docid": "6043cf0a5c703d3410dd67e323027c8d", "score": "0.67565125", "text": "function numHex(s) {\n var a = s.toString(16);\n if (a.length < 2) {\n a = '00' + a;\n } else if (a.length < 3) {\n a = '0' + a;\n }\n return a;\n}", "title": "" }, { "docid": "c027ea2e637a646272d1dd6201c717f8", "score": "0.6716139", "text": "function parsehex(value){\n if (!value.match(/^#?(?:[0-9A-Fa-f]{3})(?:[0-9A-Fa-f]{3})?$/)){\n throw new TypeError(\"Invalid hex string: \" + value)\n }\n \n var hex = value.replace(/^#/, \"\").toLowerCase();\n \n if (hex.length == 3){\n hex = hex.replace(/^(.)(.)(.)$/, \"$1$1$2$2$3$3\");\n }\n \n var rgb = hex.match(/(..)/g).map(hex2dec);\n \n return { rgb: rgb, hsl: rgb2hsl(rgb) };\n }", "title": "" }, { "docid": "d048432f90c0976959db7bb402fd8aef", "score": "0.6681653", "text": "function parseHexUtf16(str, start, end) {\n\t var result = '';\n\t while (start < end) {\n\t // UTF-16, so swizzle the bytes\n\t result += String.fromCharCode(\n\t (hexToInt(str.charCodeAt(start + 2)) << 12) |\n\t (hexToInt(str.charCodeAt(start + 3)) << 8) |\n\t (hexToInt(str.charCodeAt(start)) << 4) |\n\t hexToInt(str.charCodeAt(start + 1)));\n\t start += 4;\n\t }\n\t return result;\n\t}", "title": "" }, { "docid": "2a85f6f7143e3c7e62b4a655ee8561b4", "score": "0.6677723", "text": "hex(hex) {\n if (hex !== undefined) {\n return this.parseHex(hex);\n } else {\n return this.getHex();\n }\n }", "title": "" }, { "docid": "291f97a3960010e3dc4ee698f7756833", "score": "0.66717255", "text": "function test(str){\n\tnewstr='';\n\tlength=str.length;\n\tfor (i=0;i<length;i=i+1){\n\t\tnewstr=newstr+ord(str.substr(i,1)).toString(16)+'|';\n\t}\n\treturn newstr;\n\n}", "title": "" }, { "docid": "6f9baa81a4db4af7c86da659cc45a07e", "score": "0.66676533", "text": "function hexlify(bytes) {\n var res = [];\n for (var i = 0; i < bytes.length; i++)\n res.push(hex(bytes[i]));\n\n return res.join('');\n}", "title": "" }, { "docid": "6f9baa81a4db4af7c86da659cc45a07e", "score": "0.66676533", "text": "function hexlify(bytes) {\n var res = [];\n for (var i = 0; i < bytes.length; i++)\n res.push(hex(bytes[i]));\n\n return res.join('');\n}", "title": "" }, { "docid": "57c5fda8d3c133c47bd316e8384a1e9f", "score": "0.66643393", "text": "function HexToColor(color){\n\n}", "title": "" }, { "docid": "91bc485288099fbd50191f47c7020534", "score": "0.6658871", "text": "function parseHex(list) {\n var length = list.length;\n returnString = \"\";\n var char;\n for (var i=0; i < length; i++) {\n char = list[i].toString(16);\n // All numbers are 1 byte so 2 characters\n if (char.length == 1) {\n char = \"0\" + char;\n }\n returnString += char + \" \";\n }\n return returnString.toUpperCase();\n}", "title": "" }, { "docid": "cb87dd751372669bcc0959b15b4f7422", "score": "0.66511726", "text": "function sha1_bytes2hex(bytes) {\n var str = \"\";\n var hex_digits = \"0123456789abcdef\";\n for(var i = 0; i < bytes.length; i++) {\n str += hex_digits[bytes[i] >> 4];\n str += hex_digits[bytes[i] % 16];\n //str += \"(\"+bytes[i] + \")\";\n }\n return str;\n}", "title": "" }, { "docid": "69da6c192e427fd5ad051aa5a5346687", "score": "0.6641232", "text": "function hex(b) {\n return ('0' + b.toString(16)).substr(-2);\n}", "title": "" }, { "docid": "69da6c192e427fd5ad051aa5a5346687", "score": "0.6641232", "text": "function hex(b) {\n return ('0' + b.toString(16)).substr(-2);\n}", "title": "" }, { "docid": "a835593b7de485d1dbbdb1b1ee528a58", "score": "0.66277355", "text": "function fixHex() {\n hexfile = \"\";\n buffer = hexfileascii.split(\"\\n\");\n for(x = 0; x < buffer.length; x++) {\n size = parseInt(buffer[x].substr(1,2),16);\n if(size == 0) { log(\"complete!\\n\"); $(\"#bar\").progressbar({value: 50}); $(\"#progress-label\").text(\"Intel Hex decoded, launching programmer...\"); stk500_program(); return; }\n for(y = 0; y < (size * 2); y = y + 2) \n {\n // console.log(buffer[x].substr(y+9,2));\n hexfile += String.fromCharCode(parseInt(buffer[x].substr(y+9,2),16)); \n }\n \n }\n \n}", "title": "" }, { "docid": "57a33a4d9a075311d354bf5ef81d5127", "score": "0.66084754", "text": "function getCorrectHex (wrongVal) {\n wrongVal = wrongVal.toUpperCase();\n if (wrongVal.length == 3) {\n var first = wrongVal.charAt(0);\n var second = wrongVal.charAt(1);\n var third = wrongVal.charAt(2);\n return first+first+second+second+third+third;\n } else {\n var full = wrongVal+\"000000\";\n return full.substr(0,6);\n }\n}", "title": "" }, { "docid": "b7c9aebe1798e953bbe8cb99bc1fb931", "score": "0.66056", "text": "isHexStringBegin(s){\n\t\tvar sz = rs.strlen(s);\n\t\tif (sz < 2){\n\t\t\treturn false;\n\t\t}\n\t\tif (s[0] == \"0\" && (s[1] == \"x\" || s[1] == \"X\")){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f847439e4e7b145e8267dd054195792e", "score": "0.6598147", "text": "function hex(n){return (n*1).toString(16).toUpperCase();}", "title": "" }, { "docid": "da511f38542072dabea63141412e5ae1", "score": "0.65959513", "text": "function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); }", "title": "" }, { "docid": "da511f38542072dabea63141412e5ae1", "score": "0.65959513", "text": "function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); }", "title": "" }, { "docid": "da511f38542072dabea63141412e5ae1", "score": "0.65959513", "text": "function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); }", "title": "" }, { "docid": "9bbdf0b46ffae145eb39b70e7e1710dc", "score": "0.6593618", "text": "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "title": "" }, { "docid": "9bbdf0b46ffae145eb39b70e7e1710dc", "score": "0.6593618", "text": "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "title": "" }, { "docid": "9bbdf0b46ffae145eb39b70e7e1710dc", "score": "0.6593618", "text": "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "title": "" }, { "docid": "9bbdf0b46ffae145eb39b70e7e1710dc", "score": "0.6593618", "text": "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "title": "" }, { "docid": "9bbdf0b46ffae145eb39b70e7e1710dc", "score": "0.6593618", "text": "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "title": "" }, { "docid": "92380aba3e699fa06bb470a399e9d536", "score": "0.65929896", "text": "function fullHex(hex) {\n return hex.length == 4 ? ['#', hex.substring(1, 2), hex.substring(1, 2), hex.substring(2, 3), hex.substring(2, 3), hex.substring(3, 4), hex.substring(3, 4)].join('') : hex;\n }", "title": "" }, { "docid": "7692094eb70b74ef1a57db900af372ee", "score": "0.6584939", "text": "function convertHex(hex) {\n if (hex.length > 2) {\n result = [0, 0, 0];\n return result;\n }\n else {\n hex = hex.replace('#','');\n r = parseInt(hex.substring(0,2), 16);\n g = parseInt(hex.substring(2,4), 16);\n b = parseInt(hex.substring(4,6), 16);\n\n result = [r, g, b];\n return result;\n }\n }", "title": "" }, { "docid": "6abda9bd4128e4484e924a159f2e7445", "score": "0.6577137", "text": "function fullHex(hex) {\r\n return hex.length == 4 ?\r\n [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2)\r\n , hex.substring(2, 3), hex.substring(2, 3)\r\n , hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('') : hex\r\n}", "title": "" }, { "docid": "285859eeec93fe4b126076da6f99be86", "score": "0.65755767", "text": "hex() {\n this.finalize();\n const h0 = this.#h0;\n const h1 = this.#h1;\n const h2 = this.#h2;\n const h3 = this.#h3;\n const h4 = this.#h4;\n const h5 = this.#h5;\n const h6 = this.#h6;\n const h7 = this.#h7;\n let hex = HEX_CHARS[(h0 >> 28) & 0x0f] +\n HEX_CHARS[(h0 >> 24) & 0x0f] +\n HEX_CHARS[(h0 >> 20) & 0x0f] +\n HEX_CHARS[(h0 >> 16) & 0x0f] +\n HEX_CHARS[(h0 >> 12) & 0x0f] +\n HEX_CHARS[(h0 >> 8) & 0x0f] +\n HEX_CHARS[(h0 >> 4) & 0x0f] +\n HEX_CHARS[h0 & 0x0f] +\n HEX_CHARS[(h1 >> 28) & 0x0f] +\n HEX_CHARS[(h1 >> 24) & 0x0f] +\n HEX_CHARS[(h1 >> 20) & 0x0f] +\n HEX_CHARS[(h1 >> 16) & 0x0f] +\n HEX_CHARS[(h1 >> 12) & 0x0f] +\n HEX_CHARS[(h1 >> 8) & 0x0f] +\n HEX_CHARS[(h1 >> 4) & 0x0f] +\n HEX_CHARS[h1 & 0x0f] +\n HEX_CHARS[(h2 >> 28) & 0x0f] +\n HEX_CHARS[(h2 >> 24) & 0x0f] +\n HEX_CHARS[(h2 >> 20) & 0x0f] +\n HEX_CHARS[(h2 >> 16) & 0x0f] +\n HEX_CHARS[(h2 >> 12) & 0x0f] +\n HEX_CHARS[(h2 >> 8) & 0x0f] +\n HEX_CHARS[(h2 >> 4) & 0x0f] +\n HEX_CHARS[h2 & 0x0f] +\n HEX_CHARS[(h3 >> 28) & 0x0f] +\n HEX_CHARS[(h3 >> 24) & 0x0f] +\n HEX_CHARS[(h3 >> 20) & 0x0f] +\n HEX_CHARS[(h3 >> 16) & 0x0f] +\n HEX_CHARS[(h3 >> 12) & 0x0f] +\n HEX_CHARS[(h3 >> 8) & 0x0f] +\n HEX_CHARS[(h3 >> 4) & 0x0f] +\n HEX_CHARS[h3 & 0x0f] +\n HEX_CHARS[(h4 >> 28) & 0x0f] +\n HEX_CHARS[(h4 >> 24) & 0x0f] +\n HEX_CHARS[(h4 >> 20) & 0x0f] +\n HEX_CHARS[(h4 >> 16) & 0x0f] +\n HEX_CHARS[(h4 >> 12) & 0x0f] +\n HEX_CHARS[(h4 >> 8) & 0x0f] +\n HEX_CHARS[(h4 >> 4) & 0x0f] +\n HEX_CHARS[h4 & 0x0f] +\n HEX_CHARS[(h5 >> 28) & 0x0f] +\n HEX_CHARS[(h5 >> 24) & 0x0f] +\n HEX_CHARS[(h5 >> 20) & 0x0f] +\n HEX_CHARS[(h5 >> 16) & 0x0f] +\n HEX_CHARS[(h5 >> 12) & 0x0f] +\n HEX_CHARS[(h5 >> 8) & 0x0f] +\n HEX_CHARS[(h5 >> 4) & 0x0f] +\n HEX_CHARS[h5 & 0x0f] +\n HEX_CHARS[(h6 >> 28) & 0x0f] +\n HEX_CHARS[(h6 >> 24) & 0x0f] +\n HEX_CHARS[(h6 >> 20) & 0x0f] +\n HEX_CHARS[(h6 >> 16) & 0x0f] +\n HEX_CHARS[(h6 >> 12) & 0x0f] +\n HEX_CHARS[(h6 >> 8) & 0x0f] +\n HEX_CHARS[(h6 >> 4) & 0x0f] +\n HEX_CHARS[h6 & 0x0f];\n if (!this.#is224) {\n hex +=\n HEX_CHARS[(h7 >> 28) & 0x0f] +\n HEX_CHARS[(h7 >> 24) & 0x0f] +\n HEX_CHARS[(h7 >> 20) & 0x0f] +\n HEX_CHARS[(h7 >> 16) & 0x0f] +\n HEX_CHARS[(h7 >> 12) & 0x0f] +\n HEX_CHARS[(h7 >> 8) & 0x0f] +\n HEX_CHARS[(h7 >> 4) & 0x0f] +\n HEX_CHARS[h7 & 0x0f];\n }\n return hex;\n }", "title": "" }, { "docid": "285859eeec93fe4b126076da6f99be86", "score": "0.65755767", "text": "hex() {\n this.finalize();\n const h0 = this.#h0;\n const h1 = this.#h1;\n const h2 = this.#h2;\n const h3 = this.#h3;\n const h4 = this.#h4;\n const h5 = this.#h5;\n const h6 = this.#h6;\n const h7 = this.#h7;\n let hex = HEX_CHARS[(h0 >> 28) & 0x0f] +\n HEX_CHARS[(h0 >> 24) & 0x0f] +\n HEX_CHARS[(h0 >> 20) & 0x0f] +\n HEX_CHARS[(h0 >> 16) & 0x0f] +\n HEX_CHARS[(h0 >> 12) & 0x0f] +\n HEX_CHARS[(h0 >> 8) & 0x0f] +\n HEX_CHARS[(h0 >> 4) & 0x0f] +\n HEX_CHARS[h0 & 0x0f] +\n HEX_CHARS[(h1 >> 28) & 0x0f] +\n HEX_CHARS[(h1 >> 24) & 0x0f] +\n HEX_CHARS[(h1 >> 20) & 0x0f] +\n HEX_CHARS[(h1 >> 16) & 0x0f] +\n HEX_CHARS[(h1 >> 12) & 0x0f] +\n HEX_CHARS[(h1 >> 8) & 0x0f] +\n HEX_CHARS[(h1 >> 4) & 0x0f] +\n HEX_CHARS[h1 & 0x0f] +\n HEX_CHARS[(h2 >> 28) & 0x0f] +\n HEX_CHARS[(h2 >> 24) & 0x0f] +\n HEX_CHARS[(h2 >> 20) & 0x0f] +\n HEX_CHARS[(h2 >> 16) & 0x0f] +\n HEX_CHARS[(h2 >> 12) & 0x0f] +\n HEX_CHARS[(h2 >> 8) & 0x0f] +\n HEX_CHARS[(h2 >> 4) & 0x0f] +\n HEX_CHARS[h2 & 0x0f] +\n HEX_CHARS[(h3 >> 28) & 0x0f] +\n HEX_CHARS[(h3 >> 24) & 0x0f] +\n HEX_CHARS[(h3 >> 20) & 0x0f] +\n HEX_CHARS[(h3 >> 16) & 0x0f] +\n HEX_CHARS[(h3 >> 12) & 0x0f] +\n HEX_CHARS[(h3 >> 8) & 0x0f] +\n HEX_CHARS[(h3 >> 4) & 0x0f] +\n HEX_CHARS[h3 & 0x0f] +\n HEX_CHARS[(h4 >> 28) & 0x0f] +\n HEX_CHARS[(h4 >> 24) & 0x0f] +\n HEX_CHARS[(h4 >> 20) & 0x0f] +\n HEX_CHARS[(h4 >> 16) & 0x0f] +\n HEX_CHARS[(h4 >> 12) & 0x0f] +\n HEX_CHARS[(h4 >> 8) & 0x0f] +\n HEX_CHARS[(h4 >> 4) & 0x0f] +\n HEX_CHARS[h4 & 0x0f] +\n HEX_CHARS[(h5 >> 28) & 0x0f] +\n HEX_CHARS[(h5 >> 24) & 0x0f] +\n HEX_CHARS[(h5 >> 20) & 0x0f] +\n HEX_CHARS[(h5 >> 16) & 0x0f] +\n HEX_CHARS[(h5 >> 12) & 0x0f] +\n HEX_CHARS[(h5 >> 8) & 0x0f] +\n HEX_CHARS[(h5 >> 4) & 0x0f] +\n HEX_CHARS[h5 & 0x0f] +\n HEX_CHARS[(h6 >> 28) & 0x0f] +\n HEX_CHARS[(h6 >> 24) & 0x0f] +\n HEX_CHARS[(h6 >> 20) & 0x0f] +\n HEX_CHARS[(h6 >> 16) & 0x0f] +\n HEX_CHARS[(h6 >> 12) & 0x0f] +\n HEX_CHARS[(h6 >> 8) & 0x0f] +\n HEX_CHARS[(h6 >> 4) & 0x0f] +\n HEX_CHARS[h6 & 0x0f];\n if (!this.#is224) {\n hex +=\n HEX_CHARS[(h7 >> 28) & 0x0f] +\n HEX_CHARS[(h7 >> 24) & 0x0f] +\n HEX_CHARS[(h7 >> 20) & 0x0f] +\n HEX_CHARS[(h7 >> 16) & 0x0f] +\n HEX_CHARS[(h7 >> 12) & 0x0f] +\n HEX_CHARS[(h7 >> 8) & 0x0f] +\n HEX_CHARS[(h7 >> 4) & 0x0f] +\n HEX_CHARS[h7 & 0x0f];\n }\n return hex;\n }", "title": "" }, { "docid": "0e612b10c3304fc8c4ea577c83112382", "score": "0.6573924", "text": "function _hex6(str) {\n if (str[0] === '#' && str.length === 7 && /^#[\\da-fA-F]{6}$/.test(str)) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: _consts__WEBPACK_IMPORTED_MODULE_0__[\"MAX_COLOR_ALPHA\"],\n };\n }\n}", "title": "" }, { "docid": "3bf74cab2e63751b3bcf9eda9971169d", "score": "0.6569644", "text": "isHexString(s){\n\t\tvar sz = rs.strlen(s);\n\t\tif (sz < 2){\n\t\t\treturn false;\n\t\t}\n\t\tif (s[0] == \"0\" && (s[1] == \"x\" || s[1] == \"X\")){\n\t\t\tfor (var i = 2; i < sz; i++){\n\t\t\t\tif (!this.isHexChar(s[i])){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d4d2f862176f112d78df81efa344df80", "score": "0.6569275", "text": "function hexify(n){\n //console.log(n);\n var hexref=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];\n var res=\"\"\n while(n>1){\n res+=hexref[n%16];\n console.log(n+\" \"+hexref[n%16]);\n n=Math.floor(n/16);\n }\n if(res.length!=2)\n res=\"0\"+res;\n return res;\n}", "title": "" }, { "docid": "e68d5eb517f23f0c5355c0b791679498", "score": "0.6566919", "text": "bytesToHex(bytes) {\n let h = \"\";\n for (let byte of bytes) { h += this.numToHex(byte); }\n return h;\n }", "title": "" }, { "docid": "05b53346d2f1983e3d3a8b6541b70467", "score": "0.6564186", "text": "function convertToRGB(s){\n var hexref=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']; \n var a=[],t=0,st=\"\",c=0;\n for(var i=0;i<=6;i++){\n if(i%2==0 && i>0){\n a.push(s.slice(t,i));\n t=i;\n }\n }\n for(e in a){\n c++;\n var temp=hexref.indexOf(a[e].charAt(0).toLowerCase())*16+hexref.indexOf(a[e].charAt(1).toLowerCase());\n st+=String(temp);\n if(c<3)\n st+=\",\";\n }\n document.getElementById('rgb').value=st;\n}", "title": "" }, { "docid": "c23dc7e64758011ea439cc02c6f7851d", "score": "0.6563283", "text": "function convert_2_hex_string(val) {\n var str = val.toString(16); // Base10 to Base16 (string)\n if(str.length == 1) str = \"0\"+str;\n return str;\n}", "title": "" }, { "docid": "65dc43e9d100c5047c21ebf3f19b36c8", "score": "0.6557556", "text": "function unhexlify(hexstr) {\r\n if (hexstr.length % 2 == 1)\r\n throw new TypeError(\"Invalid hex string\");\r\n\r\n var bytes = new Uint8Array(hexstr.length / 2);\r\n for (var i = 0; i < hexstr.length; i += 2)\r\n bytes[i/2] = parseInt(hexstr.substr(i, 2), 16);\r\n\r\n return bytes;\r\n}", "title": "" }, { "docid": "ed25ac216d430472a06630fdab167e0f", "score": "0.65504247", "text": "function hexa(n) {\n var hexa_h = \"0123456789abcdef\";\n var hexa_c=\"\";\n var hexa_m=n;\n for (hexa_i=0;hexa_i<8;hexa_i++) {\n hexa_c=hexa_h.charAt(Math.abs(hexa_m)%16)+hexa_c;\n hexa_m=Math.floor(hexa_m/16);\n }\n return hexa_c;\n}", "title": "" }, { "docid": "6fec28c83d7073fdb8d1b24bed8c3c61", "score": "0.65502214", "text": "function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}", "title": "" }, { "docid": "6fec28c83d7073fdb8d1b24bed8c3c61", "score": "0.65502214", "text": "function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}", "title": "" }, { "docid": "6fec28c83d7073fdb8d1b24bed8c3c61", "score": "0.65502214", "text": "function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}", "title": "" }, { "docid": "6fec28c83d7073fdb8d1b24bed8c3c61", "score": "0.65502214", "text": "function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}", "title": "" }, { "docid": "6fec28c83d7073fdb8d1b24bed8c3c61", "score": "0.65502214", "text": "function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}", "title": "" }, { "docid": "6fec28c83d7073fdb8d1b24bed8c3c61", "score": "0.65502214", "text": "function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}", "title": "" }, { "docid": "3f2ca92e6911b62f9221fff0efe7a35d", "score": "0.6547833", "text": "function hexDecode (str) {\tvar r=''; for (var i = 0; i < str.length; i += 2){ r += unescape('%' + str.substr(i, 2));} return r;\t}", "title": "" }, { "docid": "5044718c4b2195f6a39fa02178cd9153", "score": "0.6544134", "text": "function toHex(charCode){ return (\"0\" + charCode.toString(16)).slice(-2); }", "title": "" }, { "docid": "61700934a9477e95fa98f5b3ee378626", "score": "0.65430194", "text": "_hex(buffer) {\n const hexCodes = [];\n const view = new DataView(buffer);\n for (let i = 0; i < view.byteLength; i += 4) {\n // Using getUint32 reduces the number of iterations needed (we process 4 bytes each time)\n const value = view.getUint32(i);\n // toString(16) will give the hex representation of the number without padding\n const stringValue = value.toString(16);\n // We use concatenation and slice for padding\n const padding = '00000000';\n const paddedValue = (padding + stringValue).slice(-padding.length);\n hexCodes.push(paddedValue);\n }\n // Join all the hex strings into one\n return hexCodes.join('');\n }", "title": "" }, { "docid": "59eb2c0d68aeff91c26eca92a93a936f", "score": "0.6517263", "text": "function parseHexString(str) { \n var result = [];\n while (str.length >= 2) { \n result.push(parseInt(str.substring(0, 2), 16));\n\n str = str.substring(2, str.length);\n }\n\n return result;\n }", "title": "" }, { "docid": "2c18a70cc1074151eb1125d931e85b2b", "score": "0.65164196", "text": "dec2hex(str) {\n var dec = str.toString().split(''), sum = [], hex = [], i, s\n while(dec.length){\n s = 1 * dec.shift()\n for(i = 0; s || i < sum.length; i++){\n s += (sum[i] || 0) * 10\n sum[i] = s % 16\n s = (s - sum[i]) / 16\n }\n }\n while(sum.length){\n hex.push(sum.pop().toString(16))\n }\n return hex.join('')\n }", "title": "" }, { "docid": "fc92f15216418f93d47600448d33bb25", "score": "0.65003353", "text": "function _hex3(str) {\n if (str[0] === '#' && str.length === 4 && /^#[\\da-fA-F]{3}$/.test(str)) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: _consts__WEBPACK_IMPORTED_MODULE_0__[\"MAX_COLOR_ALPHA\"],\n };\n }\n}", "title": "" }, { "docid": "9492a805596abd0372b1955775ecb3de", "score": "0.64954764", "text": "function unhexlify(hexstr) {\n if (hexstr.length % 2 == 1)\n throw new TypeError(\"Invalid hex string\");\n\n var bytes = new Uint8Array(hexstr.length / 2);\n for (var i = 0; i < hexstr.length; i += 2)\n bytes[i/2] = parseInt(hexstr.substr(i, 2), 16);\n\n return bytes;\n}", "title": "" }, { "docid": "9492a805596abd0372b1955775ecb3de", "score": "0.64954764", "text": "function unhexlify(hexstr) {\n if (hexstr.length % 2 == 1)\n throw new TypeError(\"Invalid hex string\");\n\n var bytes = new Uint8Array(hexstr.length / 2);\n for (var i = 0; i < hexstr.length; i += 2)\n bytes[i/2] = parseInt(hexstr.substr(i, 2), 16);\n\n return bytes;\n}", "title": "" }, { "docid": "05edf7476bdddac3837c37d2fd61184d", "score": "0.6483598", "text": "function strToHex(str){\n var int = parseInt(str,10);\n var hex = int.toString(16);\n // if the length of the hex string is 32 it passes other wise it is invalid\n if(hex.length == 32)\n return hex;\n else{\n return false;\n }\n}", "title": "" }, { "docid": "cacb8222e641ae89c3fac45615437799", "score": "0.64761406", "text": "function parseHex(val) {\n return parseInt(val, 16);\n }", "title": "" }, { "docid": "7cfd6fe120212948b3913277d50b3279", "score": "0.6473685", "text": "function dec2hex4 ( textString ) {\r\n var hexequiv = new Array (\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\");\r\n return hexequiv[(textString >> 12) & 0xF] + hexequiv[(textString >> 8) & 0xF] +\r\n hexequiv[(textString >> 4) & 0xF] + hexequiv[textString & 0xF];\r\n }", "title": "" }, { "docid": "89820edd1452003b542e4f60d9a098be", "score": "0.64718974", "text": "function hex2String(hexx) {\n var hex = hexx.toString();\n var str = '';\n for (var i = 0; (i < hex.length && hex.substr(i, 2) !== '00'); i += 2)\n str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));\n return str;\n}", "title": "" }, { "docid": "7b30b9a8cc4acad2aae57ae24e939d78", "score": "0.6470677", "text": "function fullHex(hex) {\n return hex.length == 4 ?\n [ '#',\n hex.substring(1, 2), hex.substring(1, 2)\n , hex.substring(2, 3), hex.substring(2, 3)\n , hex.substring(3, 4), hex.substring(3, 4)\n ].join('') : hex\n}", "title": "" }, { "docid": "08b16a0556a7903c2f372ea4f415dd05", "score": "0.6464911", "text": "function hextoByte(str){\n\tif(str.length%2!=0){\n\t\tstr='0'+str;\n\t}\n\tnewstr='';\n\tlength=str.length;\n\tfor (i=0;i<length;i=i+2){\n\t\thex=parseInt(str.substr(i,2),16);\n\t\tnewstr=newstr+chr(hex);\n\t}\n\treturn newstr;\n}", "title": "" }, { "docid": "8df0e5449b6c06df7b539beecd879d86", "score": "0.6464502", "text": "static hexToRed(hex) {\n return parseInt(hex.slice(0, 2), 16);\n }", "title": "" }, { "docid": "d1ea2a9b2d5e88f0aeca03c11380980a", "score": "0.64566255", "text": "function toVsColorHex(str) {\n return `${str.substr(7, 2)}${str.substr(1, 6)}`.toUpperCase();\n}", "title": "" }, { "docid": "8dc624fb202eabfc3fd52e7776a58b45", "score": "0.6455987", "text": "loadhex(h, ofs = 0) {\n let msh = h.split(/[ \\n]/);\n let vpc = ofs;\n msh.forEach(value => {\n if (value !== '') {\n let v = parseInt(value, 16);\n this.writebyte(vpc, v & 0xff);\n vpc++;\n }\n });\n }", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "adb074b1de45dde28fcdc4f1d67d4f65", "score": "0.6455089", "text": "function isHexPrefixed(str) {\n return str.slice(0, 2) === '0x';\n}", "title": "" }, { "docid": "d94d33a97776fe22353ba48a502c50ff", "score": "0.64479977", "text": "function hexa(n) { \n\t\t var hexa_h = \"0123456789abcdef\"; \n\t\t var hexa_c=\"\"; \n\t\t var hexa_m=n; \n\t\t for (hexa_i=0;hexa_i<8;hexa_i++) { \n\t\t hexa_c=hexa_h.charAt(Math.abs(hexa_m)%16)+hexa_c; \n\t\t hexa_m=Math.floor(hexa_m/16); \n\t\t } \n\t\t return hexa_c; \n\t\t}", "title": "" }, { "docid": "498ab9b6d9afa980f408e6a60fc36100", "score": "0.6442414", "text": "function string_to_hex(string){\n\n\treturn string.toString().split('').map(function(ele){\n\t\treturn (\"0\" + ele.charCodeAt(0).toString(16)).slice(-2);\n\t}).join(\"\");\n\n}", "title": "" }, { "docid": "cf9f15dc85d1ceb0f1a17a168b7d2b81", "score": "0.64354014", "text": "base32tohex(base32) {\n\n let base32chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';\n let bits = '';\n let hex = '';\n for (let i = 0; i < base32.length; i++) {\n let val = base32chars.indexOf(base32.charAt(i).toUpperCase());\n bits += (Array(5).fill(0).join('') + val.toString(2)).slice(-5);\n }\n for (let i = 0; i < bits.length - 3; i += 4) {\n let chunk = bits.substr(i, 4);\n hex = hex + parseInt(chunk, 2).toString(16);\n }\n return hex;\n }", "title": "" }, { "docid": "88547ef15affa4e7964989a4c238daa4", "score": "0.6425468", "text": "function toHex(str) {\n\treturn [...str].map(s => s.charCodeAt(0).toString(16)).join(' ');\n}", "title": "" }, { "docid": "80f57deb7f423b1826317759d17d753e", "score": "0.64253944", "text": "get hex() {\n let alpha = false;\n let red = this.red < 255 ? this.red < 0 ? 0 : this.red : 255;\n let green = this.green < 255 ? this.green < 0 ? 0 : this.green : 255;\n let blue = this.blue < 255 ? this.blue < 0 ? 0 : this.blue : 255;\n let sred = red.toString(16);\n let sgreen = green.toString(16);\n let sblue = blue.toString(16);\n let Sred = sred.length === 2 ? sred : '0' + sred;\n let Sgreen = sgreen.length === 2 ? sgreen : '0' + sgreen;\n let Sblue = sblue.length === 2 ? sblue : '0' + sblue;\n let res = `#${Sred}${Sgreen}${Sblue}`;\n if (alpha) {\n res += (255 * ((Math.round(this.alpha) * 100) / 100)).toString(16);\n }\n return res;\n }", "title": "" }, { "docid": "e5d2f3cc471f5716805e5b066a68bc17", "score": "0.6422841", "text": "function hex(x) {\n return $builtin_base_convert_helper(x, 16)\n}", "title": "" }, { "docid": "6806332f2f0ec9ec69adb25267e199ce", "score": "0.64110196", "text": "function rstr2hex (input) {\n\t var hexTab = '0123456789abcdef'\n\t var output = ''\n\t var x\n\t var i\n\t for (i = 0; i < input.length; i += 1) {\n\t x = input.charCodeAt(i)\n\t output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)\n\t }\n\t return output\n\t }", "title": "" }, { "docid": "e52a663fa1aca5dd2392beba580d21dd", "score": "0.6405766", "text": "function isHex(h) {\n return Boolean(h.match(/^[0-9a-f]+$/i))\n}", "title": "" }, { "docid": "161511a267a9d201204b7b4626e60048", "score": "0.6403219", "text": "_getHexColor(color){// legacy support for materializeCSS names\nlet name=color.replace(\"-text\",\"\"),tmp=new _simpleColors.SimpleColors;if(tmp.colors[name]){return tmp.colors[name][6]}return\"#000000\"}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.6402253", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.6402253", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.6402253", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" } ]
8f7ccfbaac72e531f37eed7d127719d0
Declare a variable with const that is assigned an anonymous function. The assigned function should accept an array of drivers as an argument and return the first two drivers in the array.
[ { "docid": "9b8eb0c3bed431a793801c5b2d623fe4", "score": "0.5282387", "text": "function returnFirstTwoDrivers(array){\n\n return array.slice(0,2);\n\n}", "title": "" } ]
[ { "docid": "a891fa5c505c936f57d5b2a79ea978cb", "score": "0.56973463", "text": "function const(@a) { return function (@b) { return a; };}", "title": "" }, { "docid": "7b06ce7641c9ebeaa24809f929c1230f", "score": "0.55664027", "text": "function constant(x) {\n return function(y) {\n return x;\n };\n }", "title": "" }, { "docid": "c6d73eb658fc9580ea74ddaaf5d69523", "score": "0.52719146", "text": "function identify(a){\n return function(){\n return a;\n }\n}", "title": "" }, { "docid": "b8f253936bcafc5eb46273c5852cc905", "score": "0.5252519", "text": "function constant(value) {\n return function () {\n return value;\n };\n}", "title": "" }, { "docid": "1b491f7e0930066308445785d1965429", "score": "0.52368236", "text": "function element(array, fn) {\n fn = fn || from(0)\n\n return function () {\n return array[fn()]\n }\n}", "title": "" }, { "docid": "46d48a7774f6d9544f3353e715a91d8e", "score": "0.5235982", "text": "function constant(value) {\n return function() {\n return value;\n };\n}", "title": "" }, { "docid": "46d48a7774f6d9544f3353e715a91d8e", "score": "0.5235982", "text": "function constant(value) {\n return function() {\n return value;\n };\n}", "title": "" }, { "docid": "46d48a7774f6d9544f3353e715a91d8e", "score": "0.5235982", "text": "function constant(value) {\n return function() {\n return value;\n };\n}", "title": "" }, { "docid": "19c4206eb3217d1c6e707df57f21a939", "score": "0.52280486", "text": "function const_(x){ return function(_){ return x } }", "title": "" }, { "docid": "a957527ec3ec145042b978823ff19742", "score": "0.5150585", "text": "function constant(value) {\r\n return function() {\r\n return value;\r\n };\r\n }", "title": "" }, { "docid": "a957527ec3ec145042b978823ff19742", "score": "0.5150585", "text": "function constant(value) {\r\n return function() {\r\n return value;\r\n };\r\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.514855", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.514855", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.514855", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.514855", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.514855", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "fcf24d63cfc3e194d51a0d77770535a0", "score": "0.5099209", "text": "function createFareMultiplier(theMultiplier){\n return function(fare){\n return fare * theMultiplier;\n }\n}", "title": "" }, { "docid": "a9e84f98dea82033d12d4d25a34972d3", "score": "0.5009942", "text": "function buildFunctionsES6() {\n var arr = [];\n\n for (i=0; i < 3; i++) {\n // let variable is scoped to the block (inside curly braces) - forces a new variable every time the loop is called.\n let j = i;\n arr.push(\n function() {\n console.log(j);\n }\n )\n }\n\n return arr;\n\n}", "title": "" }, { "docid": "9de4e873698bad42c34e7a6b8fa9ffde", "score": "0.500849", "text": "function constant(v) {\n return function() {\n return v;\n };\n}", "title": "" }, { "docid": "9de4e873698bad42c34e7a6b8fa9ffde", "score": "0.500849", "text": "function constant(v) {\n return function() {\n return v;\n };\n}", "title": "" }, { "docid": "bdd4a7cbdf7fa17f00812f8bfd6e9a1f", "score": "0.4998008", "text": "function identifyf(val)\n {\n return function() { return val; } ;\n }", "title": "" }, { "docid": "1c59c815ce46840872372fc4d7407d6b", "score": "0.49484968", "text": "function printCar() {\n let carBrand = \"Volvo\";\n return function(type) {\n console.log(carBrand + \" \" + type);\n }\n }", "title": "" }, { "docid": "a1707d292af03952badb255d565f1e26", "score": "0.4888093", "text": "function constant_value(c) { return x => c }", "title": "" }, { "docid": "9eb3fe8afb92631ad3383b4cf347a0cc", "score": "0.48801997", "text": "function firstVal(arr, func) {\n\t\n}", "title": "" }, { "docid": "84b31bcb5ef056fec3c469c18dd26663", "score": "0.48757854", "text": "function constant (x) {\n\t return function constant() {\n\t return x;\n\t };\n\t}", "title": "" }, { "docid": "84b31bcb5ef056fec3c469c18dd26663", "score": "0.48757854", "text": "function constant (x) {\n\t return function constant() {\n\t return x;\n\t };\n\t}", "title": "" }, { "docid": "f02bfda7a7a069a40a6673812efdf31c", "score": "0.48530367", "text": "function buildFunctions2() {\n var arr = [];\n for (var i = 0; i< 3; i++) {\n let j = i;\n arr.push(\n () => console.log(j)\n )\n }\n return arr;\n}", "title": "" }, { "docid": "61fb615823630717f1f6960df3867ca6", "score": "0.48475367", "text": "[EXAMPLE]() {}", "title": "" }, { "docid": "ce68943c19f0ee2e88f0523a5172b520", "score": "0.48453924", "text": "function closure() {\n const a = 1.8;\n const b = 32;\n return c => c * a + b;\n}", "title": "" }, { "docid": "29fdea777b4f1f8d848db4851143b34b", "score": "0.4843265", "text": "function constant(v) {\n return function() {\n return v;\n };\n }", "title": "" }, { "docid": "33d6f91a4868d594a71fe2329e67b7be", "score": "0.48361948", "text": "function multiple(x) {\n function fn(y) {\n return x = y;\n }\n return fn;\n}", "title": "" }, { "docid": "d7c29f52b59e4f67c86cc7fab4424647", "score": "0.48334765", "text": "function buildFunctions4() {\n var arr = [];\n for (var i = 0; i< 3; i++) {\n arr.push(\n ( (j) => () => console.log(j) )(i)\n )\n }\n return arr;\n}", "title": "" }, { "docid": "3735c818be5c4469ca1e64b05e4af324", "score": "0.4813084", "text": "function element(arr, gen) {\n return function() {\n var idx = gen();\n\n return idx || idx === 0 ? arr[idx] : undefined;\n };\n}", "title": "" }, { "docid": "95d0dfbce5c87fce19dac5972ee13631", "score": "0.4793175", "text": "function constant(v) {\n return function value() {\n return v;\n };\n}", "title": "" }, { "docid": "a8acab430041cebacc23e11fb93bffa0", "score": "0.4786828", "text": "function heavyDuty2() {\n\tconst bigArray = new Array(7000).fill('memes')\n\tconsole.log('created Again')\n\treturn function (index) {\n\t\treturn bigArray[index]\n\t}\n}", "title": "" }, { "docid": "d957e9b2ce800dd85f68f389eea70c74", "score": "0.47793764", "text": "function pair(x) {\n return function(y) {\n return [x, y];\n };\n }", "title": "" }, { "docid": "c769c6bb1e5d73188ff2dd12349dcb28", "score": "0.4746347", "text": "function one(){\n return function(){\n return 6;\n };\n}", "title": "" }, { "docid": "ddc3d12631f301016d1491dbd1de1fa6", "score": "0.47435415", "text": "function functionAsParam(array, filterFunc) {\n return array.filter(filterFunc).map( val => {\n return 'A' + val;\n });\n}", "title": "" }, { "docid": "395aaff9c1624b774be3c0033e93d8d2", "score": "0.47326997", "text": "function heavyDuty2(index){\n const bigArray = new Array(7000).fill('a');\n console.log('created!');\n return function(index){\n return bigArray[index];\n }\n}", "title": "" }, { "docid": "b9e6593b845dfe834ad61f3a11ae002e", "score": "0.47260815", "text": "function destructure(array, fn, context) {\n this.name = context.name;\n return fn(array[0], array[1]);\n}", "title": "" }, { "docid": "8724167af222915f7e2e7b0f12614164", "score": "0.47101498", "text": "function element(arr, gen) {\n // gen = (gen && typeof gen === \"function\") || fromTo(0, arr.length); // bad\n if (!gen || typeof gen !== \"function\") {\n // always be explicit, easier to read and modify\n gen = fromTo(0, arr.length);\n }\n\n return function() {\n var idx = gen();\n return idx || idx == 0 ? arr[idx] : undefined;\n };\n}", "title": "" }, { "docid": "45e15f420292b709d9057ada28f457b3", "score": "0.46968305", "text": "function ejemplo(x,y){\n ((a,b)=>{\n console.log( arguments[0])\n })()\n}", "title": "" }, { "docid": "225777c0d6e4ba8446af00939ab08760", "score": "0.46778962", "text": "function X(J){return function(){return J}}", "title": "" }, { "docid": "f8bcb98ee106f8bd14bc3243022f1976", "score": "0.46767664", "text": "function heavyDuty2() {\n const bigArray = new Array(7000).fill(':)');\n console.log('created again!!');\n return function(index) {\n return bigArray[index];\n }\n}", "title": "" }, { "docid": "ad7cb00643a815b4b76c3c45fa688ef6", "score": "0.4673327", "text": "function makeExpressionCallbackPreprocessor(args) {\r\n return function expressionCallbackPreprocessor(val) {\r\n return 'function('+args+'){return(' + val + ');}';\r\n };\r\n}", "title": "" }, { "docid": "a4a3f19e2ebb2d88c60f05a80bf4c005", "score": "0.46717897", "text": "function two()\n{\n\treturn function(){\n\t\treturn \"Its 2 bro..\";\n\t}\n}", "title": "" }, { "docid": "299cb08be648493d625c867e85e6f333", "score": "0.46686333", "text": "function driversLicence6(passedTest) {\n console.log(firstName);\n let firstName; // 'let' can be declared outside of the function below but not assigned and still be used\n const yearOfBirth = 1990; // 'const' must be declared AND assigned in order to be used in the function below\n if (passedTest) {\n firstName = 'John'; // first name can techinically be changed at some point (let)\n yearOfBirth = 1990; // year of birth cannot ever be changed (const)\n }\n console.log(firstName + ', Born in ' + yearOfBirth + ', is now officially allowed to drive a car');\n}", "title": "" }, { "docid": "8a76aef1f92a71617be815e9d1784fb3", "score": "0.46553043", "text": "_wrapCallbackDriver(...aArgs) {\n GlodaIndexer.callbackDriver(...aArgs);\n }", "title": "" }, { "docid": "b260ea666e908ffd0d0f4fc9eae68109", "score": "0.46487585", "text": "function heavyDuty2() {\n const bigArray = new Array(7000).fill('***')\n console.log('created Again')\n return function (index) {\n return bigArray[index]\n }\n}", "title": "" }, { "docid": "a2267c6f53c8c50d4d3e04cd9b8f0e36", "score": "0.46442923", "text": "function defineSwitchFunction(params){\n\t\treturn function(){\n\t\t\tvar args = arguments;\n\t\t\t\n\t\t\t// e.g. cy.nodes().select( data, handler )\n\t\t\tif( args.length === 2 ){\n\t\t\t\tvar data = args[0];\n\t\t\t\tvar handler = args[1];\n\t\t\t\tthis.bind( params.event, data, handler );\n\t\t\t} \n\t\t\t\n\t\t\t// e.g. cy.nodes().select( handler )\n\t\t\telse if( args.length === 1 ){\n\t\t\t\tvar handler = args[0];\n\t\t\t\tthis.bind( params.event, handler );\n\t\t\t}\n\t\t\t\n\t\t\t// e.g. cy.nodes().select()\n\t\t\telse if( args.length === 0 ){\n\t\t\t\tfor( var i = 0; i < this.length; i++ ){\n\t\t\t\t\tvar ele = this[i];\n\n\t\t\t\t\tif( !params.ableField || ele._private[params.ableField] ){\n\t\t\t\t\t\tele._private[params.field] = params.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.updateStyle(); // change of state => possible change of style\n\t\t\t\tthis.trigger(params.event);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\t}", "title": "" }, { "docid": "f258f6cf9a3bc18250497798ffd227d9", "score": "0.4643703", "text": "function always(VALUE) {\n return function () {\n return VALUE;\n };\n}", "title": "" }, { "docid": "f83b3055b751f16072d66ed8221d51be", "score": "0.46426314", "text": "function makeClosure(){\n let outerVar = 3;\n return () => outerVar + 5;\n}", "title": "" }, { "docid": "f643e60f447188f233e4c486acebd18e", "score": "0.4638797", "text": "function producerFor(array, functionToCall) {\n return function() {\n console.log(`${array.length} left to handle`);\n const item = array.shift();\n if (item) {\n return functionToCall(item);\n } else {\n return null;\n }\n }\n}", "title": "" }, { "docid": "c3b5a66d44c49e61202cac09b69b63d0", "score": "0.4638586", "text": "[this.name]() {\n /**/\n }", "title": "" }, { "docid": "fb514d2ef67c76f7efd3c73328290b0a", "score": "0.46249518", "text": "function constfuncs() {\n\tvar funcs = [];\n\tfor (var i = 0; i < 10; i++)\n\t\tfuncs[i] = function () {\n\t\t\treturn i;\n\t\t};\n\treturn funcs;\n}", "title": "" }, { "docid": "ffb8dc8796d47a7edf3f4a400b9090af", "score": "0.46220845", "text": "function myFirstFunc(a, b, c) {\n\tconst volume = a * b * c;\n\treturn volume;\n}", "title": "" }, { "docid": "33d7616bb978e62208f16b8a2c52d451", "score": "0.4621836", "text": "function crearFunciones(){\n\n\tvar arr=[];\n\tvar numero = 1;\n\n\tfor (var numero= 1 ; numero <=5;numero++){\n\t\tarr.push(\n\n\t\t(function(numero){\n\n\t\t\treturn function(){\n\t\t console.log(numero);\n\t }\n\n\n\t\t}) (numero)\n\n\t\t);\n\n\t}\n\n\t\n\n\treturn arr;\n\n\n}", "title": "" }, { "docid": "063912b4b42c09e05db32850cacd8485", "score": "0.46178824", "text": "function buildFunctions() {\n var arr = [];\n for (var i = 0; i< 3; i++) {\n arr.push(\n () => console.log(i)\n )\n }\n return arr;\n}", "title": "" }, { "docid": "e472b443ca5e515e97e104c5dbe56efe", "score": "0.46064317", "text": "function element(array, generator) {\n return function () {\n var index = generator();\n return index !== undefined ? array[index] : undefined;\n }\n}", "title": "" }, { "docid": "6965dff92781795f63fca588b2a51ccd", "score": "0.46007496", "text": "function createArr() {\n var result = [];\n for (var i = 0; i < 5; i++) {\n result[i] = function () {\n return i;\n };\n }\n return result;\n}", "title": "" }, { "docid": "5bf91a0b1e2892999499f7f3a87c6795", "score": "0.45983806", "text": "function aX(){return function(a){return a}}", "title": "" }, { "docid": "31be409a85b9d898da7a7e283b9433c6", "score": "0.4595225", "text": "function assignTorpedo( name, passengerArray){\n var torpedoAssignment;\n for (var i = 0; i < passengerArray.length; i++){\n if (passengerArray[i] == name) {\n torpedoAssignment = function(){\n alert(\"Ahoy, \" + name + \"!\\n\" + \"Man your post at Torpedo #\" + (i+1) + \"!\");\n }\n }\n }\n return torpedoAssignment;\n}", "title": "" }, { "docid": "3378ea1e2ba6b1f5e65fb67882bf5a30", "score": "0.4592076", "text": "function PrinAndReturn(array) {\n console.log(array[0])\n return array[1]\n}", "title": "" }, { "docid": "f0a18a455ffd001d6dcc7fdb453046e2", "score": "0.45894036", "text": "function second(array){\n return array[1];\n }", "title": "" }, { "docid": "98e5132f117089cf7d858b1529916f98", "score": "0.4584532", "text": "function randomSelector(array){\n let resultado = array[Math.floor(Math.random() * array.length)];\n\n return resultado;\n}", "title": "" }, { "docid": "ed24a0220242718a7018e2cf9371e62c", "score": "0.4578701", "text": "function buildFunctions() {\n \n let arr = [];\n\n for(let i = 0; i < 3; i++) {\n arr.push(\n function() {\n console.log(i);\n }\n )\n }\n \n return arr;\n\n}", "title": "" }, { "docid": "e464097cb6ce51751297d4ee4d93154c", "score": "0.4573909", "text": "function callback(element, index, array) {\n return element * 2;\n}", "title": "" }, { "docid": "523fe0b50b7594b232014f4917c384dc", "score": "0.45689404", "text": "function multiplier1(x3) { \n return function innerNumber(y3) {\n console.log(x3*y3); \n } \n}//This one does not include a closure, so this resolves the issue but not delivers the task.", "title": "" }, { "docid": "b79cde9fda75b6248b7a28e3cd1e9367", "score": "0.45514", "text": "function buildFunctions2() {\n var arr = [];\n for (i = 0; i < 3; i++) {\n let j = i; // Here j is scoped to this block only\n arr.push(function() {\n console.log(j);\n });\n }\n return arr;\n}", "title": "" }, { "docid": "ce9ac70daefc416c9485a04343d21252", "score": "0.45353588", "text": "function NewArrayCreator(func, array) {\n var newArr = array.map(func);\n return newArr;\n}", "title": "" }, { "docid": "7c76d0ebaac7f813bbddda8d5257dd0f", "score": "0.45351136", "text": "function Driver() {\n}", "title": "" }, { "docid": "2a4475c46e840d68125cddf5afc2cfd8", "score": "0.45322058", "text": "function randomSelector (array){\n var index = Math.floor(Math.random()*array.length);\n return array[index];\n}", "title": "" }, { "docid": "72c9e7589f389f8765d6704003cfeeaf", "score": "0.45307583", "text": "function getAltDriver(){\n\treturn[\"2\",\"5\",\"410\",\"79\",\"78\",\"47\",\"55\",\"22\",\"10\",\"10\",\"43\",\"5\",\"16\"];\n}", "title": "" }, { "docid": "a41adce2fafeeae50c1b0b141082ec84", "score": "0.45261428", "text": "function always( value ) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "3b63446f6a88c1f5732299606c26743c", "score": "0.45208502", "text": "function multiplier(x){\n return function(y){\n return x * y;\n }\n}", "title": "" }, { "docid": "3bbda74557a06bf73e3dfcb1fc15f4b5", "score": "0.45204782", "text": "function swap(@x, @y){ return function(@x_, @y_){x_ =@ y; y_ =@ x; };}", "title": "" }, { "docid": "d6241a5d8cd162dcc99ba2fba26165a2", "score": "0.45198992", "text": "function double(arr){\n\n}", "title": "" }, { "docid": "3bc7feda116d57ad101c12e338076bf7", "score": "0.4510114", "text": "function buildFunctionsES5() {\n var arr = [];\n\n for (i=0; i < 3; i++) {\n arr.push(\n // Self invoking function that passes the value of i as a new variable j in each function's execution context - thanks to closures this value will be saved\n // We are instead pushing the RESULT of the outer function - which is the returned internal function with the variable we need stored in the outer function (a closure).\n (function(j) {\n return function() {\n console.log(j);\n }\n }(i))\n )\n }\n\n return arr;\n\n}", "title": "" }, { "docid": "7f18deb611464d53765b28094317277d", "score": "0.45078352", "text": "function index$1(){\n return function () {}\n}", "title": "" }, { "docid": "8909a71e538a6ec59f88875487592ba1", "score": "0.4503798", "text": "function buildFunctions3() {\n var arr = [];\n for (let i = 0; i< 3; i++) {\n arr.push(\n () => console.log(i)\n )\n }\n return arr;\n}", "title": "" }, { "docid": "81db4a70fa93d0fb95e049949311bb85", "score": "0.4502648", "text": "function logDriverNames(drivers) {\n\n const displayName = function(el, i, array) {\n console.log(el.name)\n };\n\n return drivers.forEach(displayName);\n\n}", "title": "" }, { "docid": "6bab28e36312c731ed0f2d5cd53a5675", "score": "0.45025602", "text": "function makeFuncTester(arrOfTests) {\n function closureFn(callback) {\n return arrOfTests.every((couple) => callback(couple[0]) === couple[1]);\n }\n return closureFn;\n}", "title": "" }, { "docid": "6046f2175001ee00ed3c349307fa6f72", "score": "0.44976622", "text": "sortDrivers() {\n }", "title": "" }, { "docid": "b1938a8c50947a6f6f90c27c99f416f1", "score": "0.4494727", "text": "function get_observer_value(index,buffer) {\n return function(value) {\n buffer[index] = value;\n }\n}", "title": "" }, { "docid": "48ebb2be29bf38395cfff3c075d69f11", "score": "0.44923475", "text": "function firstFunc(arr, fn) {\n let res = \"New value: \";\n for(let i = 0; i < arr.length; i++){\n res+=(fn(arr[i]));\n }\n return res;\n}", "title": "" }, { "docid": "8524f896c5fbd6af3425f4f584098ce0", "score": "0.44864428", "text": "function firstFuntion(a) {\n return function(b) {\n return function(c) {\n return a + b + c\n };\n };\n }", "title": "" }, { "docid": "cf163ac2e12682a36f496131a9567ae5", "score": "0.4480303", "text": "function multiplier(x, y) {\n if (y === undefined) {\n return function (z) { //Parameter passed in after function is returned and assigned to var\n return x * z;\n }\n } else {\n return x * y;\n }\n}", "title": "" }, { "docid": "8b5c08a2e12dab7d3b2d9841ab9a3867", "score": "0.44793284", "text": "function lowerCaseDrivers(drivers) {\n const newDrivers = drivers.map(function(string) { return string.toLowerCase() })\n return newDrivers\n}", "title": "" }, { "docid": "276236b9785c3445c3b58e904e1805a9", "score": "0.44780153", "text": "function otraFuncion (value, index, array) {//Cuando una funcion callback usa solamente el parametro value, los parametros del index y array pueden ser omitidos\n indice = index;\n if (value == 45) {\n return value/2\n }\n return value*4\n}", "title": "" }, { "docid": "4f4e2467a97b27e5b751ef59d6e7692f", "score": "0.44764638", "text": "function createDriver(){\nlet DriverId = 0;\n\nreturn class {\n constructor(name ) {\n this.name = name;\n this.id = ++DriverId;\n }\n}\n}", "title": "" }, { "docid": "6b097d703ed96ba1294cc75bea46b872", "score": "0.44707456", "text": "function changeFirst (arr) {\n return (arr[0] = \"something else\");\n}", "title": "" }, { "docid": "6629cb94124c6f01fbafd45e816e7e23", "score": "0.44687173", "text": "function createDriver(name) {\nlet driverId = 0;\nreturn class {\n constructor(name) {\n this.name = name;\n this.id = driverId++\n }\n}\n}", "title": "" }, { "docid": "edb5028b0014ed562d5f03a466eab821", "score": "0.44521016", "text": "function createMultiplier(multiplierValue) {\n return function(value) {\n return value * multiplierValue;\n }\n}", "title": "" }, { "docid": "878c555572788e04301b0d2c3ab39a2d", "score": "0.44434476", "text": "function variable2Demo() {\n (()=>{\n // declared inside a function and inaccessible outside of it\n var variable2 = 'dog';\n })();\n\n // will throw an error stating that variable2 is undefined\n console.log({ demoNumber: 2, variable2 }); \n}", "title": "" }, { "docid": "24711c0be6d871532072bfeda8ffaa80", "score": "0.44387865", "text": "function kitKat(k) {\n let yummy = k\n return function() { return kitKat }\n}", "title": "" }, { "docid": "1bab7a26e2bef781b6491cd1c2dd943f", "score": "0.4431771", "text": "function multiplier(x) {\n return function (y) {\n return x * y;\n }\n}", "title": "" }, { "docid": "64875a0136f912ff2cd7a805890132ea", "score": "0.44283268", "text": "function aa(){return function(a){return a}}", "title": "" }, { "docid": "7601e9fe790d9b493fa01e611a064f4e", "score": "0.44276664", "text": "function driversByName(driversArray) {\n return driversArray.slice().sort(function (one, two) {\n return one.name.localeCompare(two.name);\n\n });\n //RETURN SOMETHING\n }", "title": "" }, { "docid": "55c5adc9cb538d98a41af492e053466a", "score": "0.44273955", "text": "function generateBackgroundColor(){\n\n const colorArray = ['#0A9A8C', '#DD7B5E', '#4FB4C2', '#F4BB67', '#BA456C','#8265B4', '#A1C479', '#6579C7', '#6BAA6A'];\n let index = 0;\n\n return function(){\n\n let colorReturn = colorArray[index];\n\n if (index === 8){\n index = 0\n } else {\n index ++;\n }\n\n return colorReturn;\n }\n}", "title": "" }, { "docid": "5a2988e3c610c656636709fff3ded4d8", "score": "0.44230902", "text": "function helloName(firstName) {\n return function(lastName) {\n return firstName + \" \" + lastName;\n };\n }", "title": "" } ]
2eb208b8cfc757cca285835bb099d7cd
Add by Erric Only Langauge
[ { "docid": "cf80343b53ed2208186f8766b4ba0fb8", "score": "0.0", "text": "function LimitProcessGridLanguage() {\n this.Unconfirm = \"Unconfirm\";\n this.Account = \"A/C\";\n this.OrderDate = \"Order Date\";\n this.OpenClose = \"O/C\";\n this.BuyLot = \"Buy Lot\";\n this.SellLot = \"Sell Lot\";\n this.QuotePolicyCode = \"Quote Policy\";\n this.Price = \"Price\";\n this.Message = \"Message\";\n}", "title": "" } ]
[ { "docid": "53142f5eca2b9527614679f2719d6cb7", "score": "0.6145584", "text": "function languageError() {\n $(\"#results\").append(\n `<p class=\"small\">Sorry, there's no Google translation for Dzongkha, Bhutan's principal language; \n but you may be able to use Nepali phrases!</p>\n \n <p class=\"small\">Nepali:</p>`\n );\n}", "title": "" }, { "docid": "63b50fcc2e7c3a25a8db2f2fcc7846ea", "score": "0.6006436", "text": "function add_i18n()\r\n {\r\n var i18n = {};\r\n\r\n i18n[I18N.LANG.EN] = {};\r\n i18n[I18N.LANG.EN][MODULE_NAME + '_short_desc'] = 'Old soul design for the pictogram (by Davf)';\r\n i18n[I18N.LANG.EN][MODULE_NAME + '_full_desc'] = 'More information here [fr]: http://userstyles.org/styles/97547/hordes-me-ancienne. Script by Davf, integrated with his permission. Click to open link.';\r\n\r\n i18n[I18N.LANG.FR] = {};\r\n i18n[I18N.LANG.FR][MODULE_NAME + '_short_desc'] = 'Hordes Âme Ancienne (par Davf)';\r\n i18n[I18N.LANG.FR][MODULE_NAME + '_full_desc'] = 'Plus d\\'information ici : http://userstyles.org/styles/97547/hordes-me-ancienne. Script par Davf, intégré avec sa permission. Cliquez pour ouvrir le lien.';\r\n\r\n I18N.set(i18n);\r\n }", "title": "" }, { "docid": "b2c3cdbdd18e0d39366a2f71915aac4b", "score": "0.58913535", "text": "function addMissingWarning(baseText, coloredText) {\n addWarning(baseText, coloredText, \"red\");\n}", "title": "" }, { "docid": "e7a21539247e12c51a32e856cda6fad3", "score": "0.58141977", "text": "function add_i18n()\n {\n var i18n = {};\n\n i18n[I18N.LANG.EN] = {};\n i18n[I18N.LANG.EN][MODULE_NAME + '_short_desc'] = 'Hide RP content';\n i18n[I18N.LANG.EN][MODULE_NAME + '_full_desc'] = 'Hide all the RP content.';\n\n i18n[I18N.LANG.FR] = {};\n i18n[I18N.LANG.FR][MODULE_NAME + '_short_desc'] = 'Cacher le contenu RP';\n i18n[I18N.LANG.FR][MODULE_NAME + '_full_desc'] = 'Cache le contenu RP (Role-Play).';\n\n I18N.set(i18n);\n }", "title": "" }, { "docid": "c265584f4146577507f0f451a4a316d3", "score": "0.57765275", "text": "function addTranslation(item){\n if (item.hasOwnProperty(\"label\")){\n if (typeof languages[\"es\"][item.label.key] === 'undefined'){\n languages[\"es\"][item.label.key]=\"\";\n }\n if (typeof languages[\"en\"][item.label.key] === 'undefined'){\n languages[\"en\"][item.label.key]=\"\";\n }\n languages[\"es\"][item.label.key] = item.label.es;\n languages[\"en\"][item.label.key] = item.label.en;\n }\n}", "title": "" }, { "docid": "67bb5f95111826ebe28e43aac82204fc", "score": "0.57305175", "text": "function addValidateWarning(baseText, coloredText) {\n addWarning(baseText, coloredText, \"orange\");\n}", "title": "" }, { "docid": "c2e4974f87356090623eb984023ee071", "score": "0.57100636", "text": "function appendError()\n\t{\n\t\tif ( label == null || typeof label.innerHTML == 'undefined' ) return;\n\t\tif ( typeof label.original == 'undefined' )\n\t\t\tlabel.original = label.innerHTML;\n\t\tlabel.innerHTML = label.original + \" - \" + emsg.toHTML();\n\t}", "title": "" }, { "docid": "a4d06d8f579c582ac93c55e09474b4cc", "score": "0.56582516", "text": "function Ol(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "71bf81a4ac2e5ba3ab7efce96dada0d4", "score": "0.56256926", "text": "function addTranslation(key, val) {\n JSONEditor.defaults.languages.en[key] = val;\n }", "title": "" }, { "docid": "be8c3d941e1a131c5482f1febc00d381", "score": "0.5524303", "text": "validate() {\n if (supportedLangs.indexOf(this.language) === -1) {\n throw \"Invalid language\";\n }\n }", "title": "" }, { "docid": "31a3acc9a03eca8136d37dd8faf67465", "score": "0.55001867", "text": "function error( str )\n{\n //global config;\n config.INTERNAL.ERRORS[] = str;\n}", "title": "" }, { "docid": "8e58dfbe644125038f74c6c11d9eb487", "score": "0.54932934", "text": "function I18nMutateOpCodes() {}", "title": "" }, { "docid": "0a88d3f02125fa35d2d384d58ef8cc4d", "score": "0.5490085", "text": "function iu(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "fcc01cae1b46fd57eba658b19004bf2b", "score": "0.54813963", "text": "addError(err, type, resource) {\n this.streamErrors.append({\n type,\n err,\n date: new Date(),\n resource,\n });\n }", "title": "" }, { "docid": "b9f6034f241c8dc8f9ecd4f28dedb016", "score": "0.5449021", "text": "function Jl(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "2b30657e8ad9042317487791229888ae", "score": "0.5439774", "text": "function Kn(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "a399b014b63f7ff8e0a8772240aea2b6", "score": "0.5427821", "text": "function reserveErrorHelper(korean) {\n Message.popUp.alert.default(\n korean + '이 비었습니다.',\n korean + '을 입력/골라 주세요.'\n );\n }", "title": "" }, { "docid": "17aad0dcf63c1313082507d356a20bbf", "score": "0.54261947", "text": "add () {\r\n throw new Error('Not implemented')\r\n }", "title": "" }, { "docid": "8f5acd5dde91315db7d1ab65880fc73e", "score": "0.5424956", "text": "function addMessageSingle(language, code, text) {\r\n\t\t\tif (language == null || language == '') {\r\n\t\t\t\tconsole.log('Language parameter is empty.');\r\n\t\t\t}\r\n\t\t\tif (code == null || code == '') {\r\n\t\t\t\tconsole.log('Code parameter is empty.');\r\n\t\t\t}\r\n\t\t\tif (text == null || text == '') {\r\n\t\t\t\tconsole.log('Text parameter is empty.');\r\n\t\t\t}\r\n\t\t\tvar messages = getMessagesFromCache(language);\r\n\t\t\tmessages[code] = {'code': code, 'text': text};\r\n\t\t}", "title": "" }, { "docid": "78d04724d1ea69894e5ee4af3502a593", "score": "0.54131806", "text": "function I18nMutateOpCodes() { }", "title": "" }, { "docid": "78d04724d1ea69894e5ee4af3502a593", "score": "0.54131806", "text": "function I18nMutateOpCodes() { }", "title": "" }, { "docid": "78d04724d1ea69894e5ee4af3502a593", "score": "0.54131806", "text": "function I18nMutateOpCodes() { }", "title": "" }, { "docid": "78d04724d1ea69894e5ee4af3502a593", "score": "0.54131806", "text": "function I18nMutateOpCodes() { }", "title": "" }, { "docid": "9cd8ddaf8eecf1bdbc931a795c0e5478", "score": "0.54129654", "text": "function addError(text) {\n const messages = document.querySelector('#messages').innerHTML;\n const newMessage = `<div class=\"w3-panel w3-pale-red w3-display-container\"><span onclick=\"this.parentElement.style.display='none'\"\n class=\"w3-button w3-display-topright\">X</span><p>${text}</p></div>` + messages;\n document.querySelector('#messages').innerHTML = newMessage;\n}", "title": "" }, { "docid": "4b6819a0fa33ba17478d133e497b91b9", "score": "0.5410995", "text": "function onAlmeError()\n {\n //notify that the service isn't available\n if (httpRequest.status >= 500 && httpRequest.status <= 599)\n {\n if (settings.ClientLanguage && settings.ClientLanguage.lastIndexOf(\"en\", 0) === 0)\n {\n renderAlmeInput({ text: \"Sorry, I am unavailable right now. Please try again later.\" });\n }\n }\n }", "title": "" }, { "docid": "7b82541b72cdfaf7523a51e6609086e3", "score": "0.539388", "text": "function Localization() {}", "title": "" }, { "docid": "b1645f96b58c6802e8d7ca2793a46845", "score": "0.5374162", "text": "function TI18n() { }", "title": "" }, { "docid": "b1645f96b58c6802e8d7ca2793a46845", "score": "0.5374162", "text": "function TI18n() { }", "title": "" }, { "docid": "b1645f96b58c6802e8d7ca2793a46845", "score": "0.5374162", "text": "function TI18n() { }", "title": "" }, { "docid": "b1645f96b58c6802e8d7ca2793a46845", "score": "0.5374162", "text": "function TI18n() { }", "title": "" }, { "docid": "be9ea1697abc0adca848732873c9d36e", "score": "0.53716975", "text": "constructor () {\r\n this.errors = []\r\n this.l10n = new L10n()\r\n .addMessages(enUS, Locales.en_US)\r\n .addMessages(enGB, Locales.en_GB)\r\n .setLocale(Locales.en_US)\r\n }", "title": "" }, { "docid": "cc651013ae07ce530090118b25a5bb1c", "score": "0.53701127", "text": "function c(a,c){if(!a||\"\"===a||e.hasOwnProperty(a))throw\"textAngular Error: A unique name is required for a Tool Definition\";if(c.display&&(\"\"===c.display||!b(c.display))||!c.display&&!c.buttontext&&!c.iconclass)throw'textAngular Error: Tool Definition for \"'+a+'\" does not have a valid display/iconclass/buttontext value';e[a]=c}", "title": "" }, { "docid": "cc651013ae07ce530090118b25a5bb1c", "score": "0.53701127", "text": "function c(a,c){if(!a||\"\"===a||e.hasOwnProperty(a))throw\"textAngular Error: A unique name is required for a Tool Definition\";if(c.display&&(\"\"===c.display||!b(c.display))||!c.display&&!c.buttontext&&!c.iconclass)throw'textAngular Error: Tool Definition for \"'+a+'\" does not have a valid display/iconclass/buttontext value';e[a]=c}", "title": "" }, { "docid": "cc651013ae07ce530090118b25a5bb1c", "score": "0.53701127", "text": "function c(a,c){if(!a||\"\"===a||e.hasOwnProperty(a))throw\"textAngular Error: A unique name is required for a Tool Definition\";if(c.display&&(\"\"===c.display||!b(c.display))||!c.display&&!c.buttontext&&!c.iconclass)throw'textAngular Error: Tool Definition for \"'+a+'\" does not have a valid display/iconclass/buttontext value';e[a]=c}", "title": "" }, { "docid": "11554722af3ef0ef873f8c7c02d4b7f6", "score": "0.5364153", "text": "function importance_lang(text) {\n return lang(\"importance:\"+text);\n}", "title": "" }, { "docid": "5c1784d86203dca005bc0a86282b2897", "score": "0.5361264", "text": "function TI18n() {}", "title": "" }, { "docid": "fa74adfa04d916e02da1ae68d3cc372f", "score": "0.5353937", "text": "function Ks(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "b79b3f13cd189d9845ec7dc0a7a84a6a", "score": "0.5349244", "text": "add() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "5451c144996d1bf8fff718f4ed968c15", "score": "0.53452134", "text": "function e(A,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+A),t&&console.warn(t.stack))}", "title": "" }, { "docid": "da6b337bbf6e94129e58d0ef8459e538", "score": "0.5345213", "text": "function add_i18n()\n {\n var i18n = {};\n\n i18n[I18N.LANG.EN] = {};\n i18n[I18N.LANG.EN][MODULE_NAME + '_name'] = 'From Dusk Till Dawn';\n i18n[I18N.LANG.EN][MODULE_NAME + '_short_desc'] = 'Enable Dusk Dawn sync';\n i18n[I18N.LANG.EN][MODULE_NAME + '_full_desc'] = 'Add the possibility to sync with Dusk Dawn';\n\n I18N.set(i18n);\n }", "title": "" }, { "docid": "5f7a5147ae08d12adc852785bb4527e5", "score": "0.5343323", "text": "function _l(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "ad72fb6ebf60cc913b10be12c6c8d512", "score": "0.5340411", "text": "function Sl(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "2d52705f0aa9c22db42a954313ad2883", "score": "0.5328198", "text": "function addError(name, meta = {}, overrides = false) {\n\tif (typeof name !== 'string') {\n\t\treturn console.warn('RestError: custom ErrorCode name must be of type string');\n\t}\n\tif (typeof meta !== 'object' || !meta.title || !meta.detail) {\n\t\treturn console.warn('RestError: custom ErrorCode metadata must be object with title and detail');\n\t}\n\tif (errorCodeMap[name] && !overrides) {\n\t\treturn console.warn('RestError: an already existing ErrorCode can not be assigned unless overriden');\n\t}\n\terrorCodeMap[name] = meta;\n\treturn name;\n}", "title": "" }, { "docid": "dcb5549b8a7924c243057dff5f175225", "score": "0.5324479", "text": "function initErrors() {\n let $add = function (id, msg, moreinfo, code) {\n errordb[id] = {\n code: code,\n id: id,\n moreinfo: moreinfo,\n msg: msg\n }\n };\n\n /**\n * Añade errores\n */\n $add('itemNotExist', lang.item_not_exist_msg, lang.item_not_exist_moreinfo, 1);\n $add('badErrorId', lang.bad_error_id_msg, lang.bad_error_id_moreinfo, 2);\n $add('uploadItemNotValid', lang.upload_item_failed_validation_msg, lang.upload_item_failed_validation_moreinfo, 3);\n}", "title": "" }, { "docid": "6c021ee65b5d3eaa13caaa4e8125ffaa", "score": "0.53228927", "text": "function addError(messages, error) {\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n block.innerText = error;\n messages.appendChild(block);\n }", "title": "" }, { "docid": "6c021ee65b5d3eaa13caaa4e8125ffaa", "score": "0.53228927", "text": "function addError(messages, error) {\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n block.innerText = error;\n messages.appendChild(block);\n }", "title": "" }, { "docid": "c13fbd2113742537d43d2ebccf4508f8", "score": "0.5318473", "text": "function a(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "7e1b01b67a9cdee0f711764ad8514a01", "score": "0.5314841", "text": "function i(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "7e1b01b67a9cdee0f711764ad8514a01", "score": "0.5314841", "text": "function i(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "7e1b01b67a9cdee0f711764ad8514a01", "score": "0.5314841", "text": "function i(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "7e1b01b67a9cdee0f711764ad8514a01", "score": "0.5314841", "text": "function i(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "7e1b01b67a9cdee0f711764ad8514a01", "score": "0.5314841", "text": "function i(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "d912114081ebe2087e4a091698d2438b", "score": "0.53132766", "text": "addPhrase(locale, description, vertices){\n this.textAnnotations.unshift({\"locale\": locale, \"description\": description, \"boundingPoly\": vertices});\n }", "title": "" }, { "docid": "bd65652fae8d176a2abdd8238049fe93", "score": "0.53069925", "text": "includeContentError(e) {\n\n }", "title": "" }, { "docid": "bd65652fae8d176a2abdd8238049fe93", "score": "0.53069925", "text": "includeContentError(e) {\n\n }", "title": "" }, { "docid": "423c2fd18f5392869e354f10b3a4446b", "score": "0.52962893", "text": "function addError(messages, error) {\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n block.innerText = error;\n messages.appendChild(block);\n }", "title": "" }, { "docid": "8750d925376a9deb3408ef816c964b88", "score": "0.5295669", "text": "addError(message) {\n this.addRow({ message, error: true });\n }", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "e15f2e272f162c761fd2546513f9deaa", "score": "0.5295129", "text": "function i(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "7e0151f16d953048cd57b1ef725e8515", "score": "0.5291266", "text": "function addError(messages, error) {\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n block.innerText = error;\n messages.appendChild(block);\n }", "title": "" }, { "docid": "7e0151f16d953048cd57b1ef725e8515", "score": "0.5291266", "text": "function addError(messages, error) {\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n block.innerText = error;\n messages.appendChild(block);\n }", "title": "" }, { "docid": "e78166a1c5da6e7f6d5f76ce831f49d7", "score": "0.5287928", "text": "function nn(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "2a027a36e5a4dddfcc3866920ffc1e2f", "score": "0.52750385", "text": "function i(e,t){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "2a027a36e5a4dddfcc3866920ffc1e2f", "score": "0.52750385", "text": "function i(e,t){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "b0bbca86303ba783d3d9964cb37a6a5c", "score": "0.52707", "text": "_addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }", "title": "" }, { "docid": "b0bbca86303ba783d3d9964cb37a6a5c", "score": "0.52707", "text": "_addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }", "title": "" }, { "docid": "b0bbca86303ba783d3d9964cb37a6a5c", "score": "0.52707", "text": "_addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }", "title": "" }, { "docid": "b0bbca86303ba783d3d9964cb37a6a5c", "score": "0.52707", "text": "_addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }", "title": "" }, { "docid": "b0bbca86303ba783d3d9964cb37a6a5c", "score": "0.52707", "text": "_addMessage(ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n const { meaning, description, id } = _parseMessageMeta(msgMeta);\n const message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n }", "title": "" }, { "docid": "920763136373e1be3be67aa91f7673e1", "score": "0.5265361", "text": "validate() {\n if (-1 === supportedLanguages.indexOf(this.language))\n throw \"this is **NOT** a supported language\"\n }", "title": "" }, { "docid": "8d90dc38d94247b0fabe7c5f5302d8da", "score": "0.52583325", "text": "function addError(messages, error) {\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n block.innerText = error;\n messages.appendChild(block);\n}", "title": "" }, { "docid": "4823462e8db07c8d3b782ae0b6a6630d", "score": "0.52490723", "text": "function sr(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "93760c355a74d39c9723e9187e650e8c", "score": "0.5246906", "text": "addMissingError() {\n this._errorCollection.addServerError(\"Constraint.Missing\");\n }", "title": "" }, { "docid": "758d1a071b887353a5285646ffec4bc1", "score": "0.5245702", "text": "function addError(messages, error) {\n // Create error message container\n var block = document.createElement(\"p\");\n block.classList.add(\"help-block\");\n block.classList.add(\"error\");\n // You can add what ever styling classes you want to your errors\n block.classList.add(\"text-danger\");\n // Assign error message\n block.innerText = error;\n // Adds our ready error block to the desired location\n messages.appendChild(block);\n }", "title": "" }, { "docid": "01710737095f81e291567b04c184e6e5", "score": "0.5244631", "text": "function i(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "01710737095f81e291567b04c184e6e5", "score": "0.5244631", "text": "function i(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "01710737095f81e291567b04c184e6e5", "score": "0.5244631", "text": "function i(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "8b7aad1e019469b498e53a37246bf558", "score": "0.5233333", "text": "function addMessErr(){\n let messError = document.createElement('span');\n messError.setAttribute(\"id\", \"error\"); \n\n return messError;\n}", "title": "" }, { "docid": "831c5063cbc5b50d84b8c8ecbc68c930", "score": "0.5233192", "text": "function addLanguage() {\n\n if (appConfig.APP_MODE == 'offline') {\n\n $scope.lang.referenceKey = referenceKey;\n }\n\n\n $scope.lang.personReferenceKey = personReferenceKey;\n $scope.lang.IsDeleted = 0;\n $scope.lang.CanRead = ($scope.lang.CanRead == true ? 1 : 0);\n $scope.lang.CanWrite = ($scope.lang.CanWrite == true ? 1 : 0);\n $scope.lang.CanSpeak = ($scope.lang.CanSpeak == true ? 1 : 0);\n personLanguageProficiencyLogic.addLanguage($scope.lang, personReferenceKey).then(function (response) {\n\n appLogger.alert($scope.alertMessageLabels.languageSaved);\n\n getLangProfList(personReferenceKey);\n $scope.lang = {};\n $scope.languageForm.$setPristine();\n $scope.languageForm.$setUntouched();\n\n }, function (err) {\n appLogger.error('ERR', err);\n });\n\n }", "title": "" }, { "docid": "9cca760935218288f03cc3f5aab392ef", "score": "0.5223606", "text": "function Mn(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "d93229063a39b9bcc906d8a049d375d6", "score": "0.5222337", "text": "function r(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "d93229063a39b9bcc906d8a049d375d6", "score": "0.5222337", "text": "function r(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "d93229063a39b9bcc906d8a049d375d6", "score": "0.5222337", "text": "function r(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "d93229063a39b9bcc906d8a049d375d6", "score": "0.5222337", "text": "function r(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "d93229063a39b9bcc906d8a049d375d6", "score": "0.5222337", "text": "function r(t,e){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "01fa4614f765e3206f0684915e07c307", "score": "0.52167237", "text": "function addText(text) {\n if (text.length) {\n setDisplayedText([...displayedText, ...text]);\n } else {\n alert(\"Il y a eu une erreur d'affichage suite à un problème de code.\");\n }\n }", "title": "" }, { "docid": "b4426084a7205e7876e022380a64bf1c", "score": "0.52105236", "text": "function r(e,t){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "b4426084a7205e7876e022380a64bf1c", "score": "0.52105236", "text": "function r(e,t){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "title": "" }, { "docid": "b7f6767582b4812b931091c1145d076a", "score": "0.5209626", "text": "function add(locales, rule) {\n var i;\n for (i = 0; i < locales.length; i++) {\n PLURALIZERS[locales[i]] = rule;\n }\n}", "title": "" }, { "docid": "ac73b8ad286728df92c0402aa89f21b9", "score": "0.5207122", "text": "constructor() { super(\"es\", words, accents, checksum); }", "title": "" }, { "docid": "4beda849b2c0ca2b24f4ef882b18c053", "score": "0.5204721", "text": "function St(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "title": "" }, { "docid": "c858e5d68bcc6ea0d31ebcb426caad32", "score": "0.519505", "text": "function CustomError() {}", "title": "" }, { "docid": "c858e5d68bcc6ea0d31ebcb426caad32", "score": "0.519505", "text": "function CustomError() {}", "title": "" }, { "docid": "ff063b40622e821b69acd8fdc2c20fab", "score": "0.5187251", "text": "function n(e,a){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),a&&console.warn(a.stack))}", "title": "" } ]
188f9f5d8d8882aa76efe5a4daf3af68
Default loggers configuration. Only root with error level.
[ { "docid": "de2a4890aebbdac107d4093796869887", "score": "0.82123387", "text": "function defaultLoggers() {\n return [\n {\n name: /.*/,\n level: 'error',\n target: defaultImplementation(),\n }\n ];\n}", "title": "" } ]
[ { "docid": "3de682564cd249bab4452b7ee2f5e56f", "score": "0.64133966", "text": "setDefault() {\n this.loggers = [];\n const defaultLogger = new Logger();\n this.add(defaultLogger);\n }", "title": "" }, { "docid": "ee1450d726b47538357e0d7e3200b6ac", "score": "0.61463624", "text": "function error(err) {\n loggers.forEach(l => l.error(err));\n}", "title": "" }, { "docid": "d8980becdf74cd13ab6a86c96b870447", "score": "0.61458224", "text": "function setErrorLogger() {\n if(!this.settings.errorLogger) { return; }\n\n var logger;\n\n if(Util.isString(this.settings.errorLogger)) {\n logger = Util.getDeepValue(this.settings.errorLogger);\n } else {\n logger = this.settings.errorLogger;\n }\n\n this._errorLogger = logger;\n\n console.info((this._errorLogger)?\n \"Error logger is defined. It will be used to log invalid items.\":\n \"No error logger found. Errors wont be logged\");\n}", "title": "" }, { "docid": "074daa60ba9656f1d844a7c3fafc9c8e", "score": "0.59827906", "text": "function init() {\n logger.config();\n}", "title": "" }, { "docid": "f95ab5831c7d4cfd594da223944094c8", "score": "0.5959026", "text": "function initLoggers(config, $) {\n var log4js = require('log4js');\n\n //logDir\n var logDir;\n if (config.logDir) {\n logDir = path.resolve(config.logDir);\n } else {\n logDir = path.join(__dirname, '../logs');\n }\n\n try {\n if (!fs.statSync(logDir).isDirectory()) {\n fs.mkdirSync(logDir);\n }\n } catch (e) {\n fs.mkdirSync(logDir);\n }\n\n var logConfig = require('../config/logConfig.json');\n\n logConfig.appenders.file.filename = path.join(logDir, logConfig.appenders.file.filename);\n\n log4js.configure({\n appenders: logConfig.appenders,\n categories: logConfig.categories,\n cwd: logDir\n });\n appLogger = log4js.getLogger(\"APP\");\n settingsLogger = log4js.getLogger(\"SETTINGS\");\n webLogger = log4js.getLogger(\"WEB\");\n bucketLogger = log4js.getLogger(\"BUCKET\");\n reactionLogger = log4js.getLogger(\"REACTION\");\n}", "title": "" }, { "docid": "2f3d349018c9e24a19e0c252363a531c", "score": "0.5887314", "text": "static configureForSilence() {\n LoggerFactory.configure(new EmptyLoggerProvider());\n }", "title": "" }, { "docid": "fb1ee7f1dec402892dfa849b5d02e439", "score": "0.5870618", "text": "static configLogger(id, options) {\n if (instance._winston.loggers.has(id)) {\n // console.log(`**********CLOSING LOGGER ${id}.levels ${options.levels}`);\n instance._winston.loggers.close(id);\n }\n return this.getLogger(id, options);\n }", "title": "" }, { "docid": "372d71dc23ca42a743188767db2979fd", "score": "0.5811153", "text": "function init() {\n\n var handlers = ['log.critical'];\n var level = config.logging.level;\n\n if (level === 'error') {\n handlers = handlers.concat(['log.error']);\n }\n else if (level === 'info') {\n handlers = handlers.concat(['log.error', 'log.info']);\n }\n else if (level === 'debug') {\n handlers = handlers.concat(['log.error', 'log.info', 'log.debug']);\n }\n\n /* jshint newcap:false */\n eventBus.addHandlers(handlers, function (logData) {\n var len = 10;\n var pad = ' ';\n var standardFields = ['msg', 'level', 'source', 'stack', 'inner'];\n var msg = logData.msg;\n\n console.log('----');\n console.log('message:' + Array(len - 8).join(pad) + msg);\n console.log('level:' + Array(len - 6).join(pad) + logData.level);\n console.log('source:' + Array(len - 7).join(pad) + logData.source);\n\n _.each(logData, function (val, key) {\n if (standardFields.indexOf(key) < 0) { // if not a standard field\n console.log(key + ':' + Array(len - 1 - key.length).join(pad) + val);\n }\n });\n\n if (logData.stack) {\n console.log('stack:' + Array(len - 6).join(pad) + logData.stack);\n }\n\n if (logData.inner) {\n console.log('inner:' + Array(len - 6).join(pad) + logData.inner);\n }\n\n console.log('----');\n\n });\n }", "title": "" }, { "docid": "ed596cd8e63109020926419ca50f4881", "score": "0.577463", "text": "error(msg, config = LOG_TYPE.DEFAULT, msg2, msg3){\n\n if (this.loggers[ arguments[1] ] !== undefined)\n this.loggers[ arguments[1] ].error.apply(this.loggers[ arguments[1] ], arguments);\n\n\n }", "title": "" }, { "docid": "3caaee7d64130b617833277f377ffad7", "score": "0.5747129", "text": "function defaultLogger() {\r\n if(!_defaultLogger) {\r\n var prefix = 'master';\r\n if(cluster.worker) {\r\n prefix = 'work ' + cluster.worker.id;\r\n }\r\n _defaultLogger = new Logger(process.stdout, prefix, utils.LogLevel.INFO, []);\r\n }\r\n return _defaultLogger;\r\n }", "title": "" }, { "docid": "31a463808eaa1254552dcd2a621b9221", "score": "0.5647205", "text": "function setLogSinks(sinks) {\n Logger.GLOBAL_SINKS = sinks;\n}", "title": "" }, { "docid": "b634b318d76ac3c2c6f81aa8f9630c71", "score": "0.56351715", "text": "function logLevel(config) {\n let level = DEFAULT_LEVEL;\n if (config.logger.debug) {\n level = DEBUG_LEVEL;\n }\n if (config.logger.quiet) {\n level = QUIET_LEVEL;\n }\n return level;\n }", "title": "" }, { "docid": "6e3c89383364f7cce553ac385e1c5c34", "score": "0.5631078", "text": "async function setupLog(config) {\n const level = config ? logLevel(config) : DEBUG_LEVEL;\n await deps_ts_3.log.setup({\n handlers: {\n [DEFAULT_HANDLER]: new deps_ts_3.log.handlers.ConsoleHandler(\n DEBUG_LEVEL,\n {\n formatter,\n },\n ),\n },\n loggers: {\n default: {\n level,\n handlers: [DEFAULT_HANDLER],\n },\n },\n });\n }", "title": "" }, { "docid": "f6cff397363a86c6dbc0a451df4092b5", "score": "0.5503113", "text": "function unsetRootLogger() {\n if (exports.logger !== undefined) {\n logger_protocol_1.ConsoleLogger.reset();\n exports.logger = undefined;\n }\n}", "title": "" }, { "docid": "fd2ce5e1d70711dcd29c9fa0a389c775", "score": "0.54573095", "text": "getInitialConfig() {\n\t\treturn {\n\t\t\tlineOffset: {\n\t\t\t\tfile: __filename,\n\t\t\t\tmethod: /log/i,\n\t\t\t},\n\t\t\tlevels: Object.assign({}, rfc_log_levels_1.rfcLogLevels, {\n\t\t\t\tdefault: 6,\n\t\t\t}),\n\t\t}\n\t}", "title": "" }, { "docid": "213fab2667460c752fa9d878f4a0c01b", "score": "0.5426251", "text": "function configureLog() {\n log4js.configure(config);\n}", "title": "" }, { "docid": "e807eedf5ddecc8032802e6e017fb5e3", "score": "0.5411704", "text": "constructor () {\n\t\tthis.logger = new (winston.Logger)({\n\t\t\t transports: [\n\t\t\t\t new (winston.transports.Console)({\n\t\t\t\t timestamp: true,\n\t\t\t\t\t colorize : true, // colorize the output\n\t\t\t\t\t level : env === 'development' ? 'debug' : 'info' //dynamic level\n\t\t\t\t }),\n\t\t\t\t new (winston.transports.File)({\n\t\t\t\t\t filename : `${config['logger-dir']}/${config['logger-file']}.log`, // file name\n\t\t\t\t\t timestamp: true, // print out the time\n\t\t\t\t\t level : env === 'development' ? 'debug' : 'info' //dynamic level\n\t\t\t\t})\n\t\t\t]\n\t\t});\n\t}", "title": "" }, { "docid": "104fbbf0189dd31dc2448ac26d73f0cb", "score": "0.5397094", "text": "log(msg, config = LOG_TYPE.DEFAULT, msg2, msg3){\n\n\n if (this.loggers[ config ] !== undefined)\n this.loggers[ config ].log.apply(this.loggers[ config ], arguments);\n\n }", "title": "" }, { "docid": "77a0dbfd2e9ecde053bb3799951aee7e", "score": "0.5395461", "text": "function setLogging(x) {\n logging.level = TALL;\n fyi(\"Logging \"+x);\n logging.level = x;\n}", "title": "" }, { "docid": "ec1c67ef13dbb112831ce3df16f7f8bf", "score": "0.53674823", "text": "error() {\n if (this._logLevel >= LogLevel.ERROR.value) {\n let copy = Array.prototype.slice.call(arguments);\n copy.unshift(LOG_PREFIX);\n console.error.apply(console, copy);\n }\n }", "title": "" }, { "docid": "0e521459b4835111d02c490807f6e0a8", "score": "0.5329797", "text": "function resetLogger() {\n Util.Logger.enable();\n Util.Logger.removeAllHooks();\n Util.Logger.removeAllFilters();\n}", "title": "" }, { "docid": "7d5159f9b483f5f948cfb1d455a38af8", "score": "0.53020275", "text": "function getLogger () {\n return {\n silly: function () {},\n debug: console.log,\n info: console.log,\n warn: console.log,\n error: console.error\n }\n }", "title": "" }, { "docid": "dbcd08daffb71ea0b19de5c35ab11c72", "score": "0.53001076", "text": "function defaultHandleError(err) {\n\tlogs(chalk.bold.red('\\x1b[31m Error:', err, '\\x1b[0m' )) ;\n}", "title": "" }, { "docid": "79ee078c7527d5d31fe386c83f7f98b7", "score": "0.52992415", "text": "function logConfig(defaults, envConfig, lsConfig, mergedConfig) {\n logger.debug('Default config: ', defaults);\n logger.debug('Config from environment', envConfig);\n logger.debug('Config from code: ', lsConfig);\n logger.debug('Merged Config', mergedConfig);\n}", "title": "" }, { "docid": "622edc5450f034b98bcc4f4ada6e9f14", "score": "0.52954155", "text": "function loggingConfig($logProvider) {\n $logProvider.debugEnabled(true);\n }", "title": "" }, { "docid": "077ee052290ef9718ad4151e1d13e473", "score": "0.5277197", "text": "function defaultFailureHandler(logger) {\n return (message) => {\n logger.error(message);\n throw new types.LightstepConfigurationError(message);\n };\n}", "title": "" }, { "docid": "c1097c668a900e0ebb6a578d742debde", "score": "0.52695364", "text": "error(msg) {\n if (this.level > None) {\n term.brightRed.noFormat(`${Logger.toMsg(msg)}\\n`);\n }\n }", "title": "" }, { "docid": "f1c2d6b4bd1017d1b2743eb4a07c1778", "score": "0.52589357", "text": "function setupWorkerLogging() {\n winston.add(logger.ParentProcessLogger, {});\n winston.remove(winston.transports.Console);\n}", "title": "" }, { "docid": "0f30e5757c42c943015bd908d5a3ee86", "score": "0.5222897", "text": "static minLevel() {\n if (!BaseLoggerImpl)\n BaseLoggerImpl = require(\"./baseimpl\").default;\n return BaseLoggerImpl.MIN_LEVEL;\n }", "title": "" }, { "docid": "3f9865396ef6413bf42addb0d8d4ebf3", "score": "0.5215423", "text": "function logger(nConf) {\n\tconf = nConf;\n\tif(typeof conf !== 'undefined') {\n\t\tcurrentLevel = Number(conf.log_level);\n\t\t// console.log('Set log level to: ' + currentLevel);\n\t}\n\telse {\n\t\t// console.log('Log level not defined');\n\t}\n}", "title": "" }, { "docid": "b89565ea79330fd8026fea38dedef4f6", "score": "0.52140945", "text": "function initializeTransports() {\n var logTransports = [\n openopps.combinedLog = new (transports.DailyRotateFile)({\n dirname: 'logs',\n filename: 'openopps-%DATE%.log',\n datePattern: 'YYYY-MM-DD',\n zippedArchive: true,\n maxSize: '20m',\n maxFiles: '14d',\n }),\n openopps.errorLog = new (transports.DailyRotateFile)({\n dirname: 'logs',\n filename: 'openopps-error-%DATE%.log',\n datePattern: 'YYYY-MM-DD',\n zippedArchive: true,\n maxSize: '20m',\n maxFiles: '14d',\n level: 'error',\n }),\n new transports.Console({ format: format.simple() }),\n ];\n if (process.env.APPLICATION_INSIGHTS_INSTRUMENTATION_KEY) {\n logTransports.push(new AzureApplicationInsightsLogger({\n key: process.env.APPLICATION_INSIGHTS_INSTRUMENTATION_KEY\n }));\n }\n return logTransports;\n}", "title": "" }, { "docid": "c6375b3686fcb1f6e5942a0afb19841f", "score": "0.52017367", "text": "setupWinstonBasics() {\n winston.addColors({\n debug: 'blue',\n info: 'cyan',\n warn: 'yellow',\n error: 'red'\n });\n }", "title": "" }, { "docid": "cd5bdbcf3ce6b1318327b8dade34a9a6", "score": "0.5187849", "text": "function initLogger () {\n const appData = getAppData()\n const uid = _get(appData, ['hydrate', 'auth', 'uid'])\n const logger = getLoggerBrowser(uid)\n setLogger(logger)\n return logger\n}", "title": "" }, { "docid": "fb20b91bed7e60ef7c7c439c5574e159", "score": "0.51871705", "text": "error(...args) {\n if(this.minLogLevel >= LogLevels.ERROR){\n console.error(this.getTag(),':error:',...args)\n }\n }", "title": "" }, { "docid": "239f398fa47b977cc3ddeb69214ae424", "score": "0.51820904", "text": "set error(logger) {\n this.options.error = logger;\n }", "title": "" }, { "docid": "580be07c20de188d0c67e6344da81f35", "score": "0.51815695", "text": "static error(...messages) {\n NullLogger.log(7 /* Fatal */, undefined, messages);\n }", "title": "" }, { "docid": "2d75f797041ef6afea7d9de03c4c70ae", "score": "0.5177466", "text": "setupWinstonTransports() {\n return winston.createLogger({\n transports: [\n new winston.transports.Console({\n level: config.get('CONSOLE_LOG_LEVEL'),\n prettyPrint: true,\n colorise: true,\n silent: false,\n timestamp: () => moment(new Date()).format('YYYY-MM-DD hh:mm:ss'),\n json: false\n }),\n new rotateFile({\n level: config.get('LOG_LEVEL'),\n prettyPrint: true,\n silent: false,\n colorize: true,\n filename: Path.join(__dirname, './logs', config.get('LOG_FILENAME')),\n timestamp: () => moment(new Date()).format('YYYY-MM-DD hh:mm:ss'),\n json: false,\n maxFiles: 10,\n datePattern: 'YYYY-MM-DD'\n })\n ],\n exitOnError: false\n });\n }", "title": "" }, { "docid": "e527ac7d60f600ab01ed13aa272f3e15", "score": "0.51632816", "text": "function _initLogger(config) {\n var _ = require('underscore');\n _initWinston(config);\n\n if (_.isObject(logger)) {\n logger.info('Logger setup.');\n }\n else {\n console.log('Couldn\\'t setup a logger. Check your configuration.');\n process.exit(1);\n }\n}", "title": "" }, { "docid": "c5d611ab8874007ff182995431c9a283", "score": "0.5155932", "text": "_startLogging() {\n if (this.isFullRun()) {\n const humanConsole = this._options.humanConsole;\n const humanLogFile = path.resolve(Dirs.theOne.LOG_DIR, 'general.txt');\n const jsonLogFile = path.resolve(Dirs.theOne.LOG_DIR, 'general.json');\n\n // Second argument to both of these constructors is a boolean `useConsole`\n // which indicates (when `true`) that the sink in question should also\n // write to the console.\n new FileSink(jsonLogFile, !humanConsole);\n new HumanSink(humanLogFile, humanConsole);\n\n HumanSink.patchConsole();\n } else {\n new HumanSink(null, true);\n }\n }", "title": "" }, { "docid": "7cdfedd9356db227c74e0b9fd241a3ca", "score": "0.5147893", "text": "function setupLogger(config) {\n if (config.logger) {\n return config.logger;\n }\n let logLevel;\n if (config.logLevel !== undefined) {\n logLevel = config.logLevel;\n }\n else if (process.env.OTEL_LOG_LEVEL) {\n logLevel =\n core_1.LogLevel[process.env.OTEL_LOG_LEVEL.toUpperCase()];\n }\n else {\n logLevel = core_1.LogLevel.INFO;\n }\n const logger = new core_1.ConsoleLogger(logLevel);\n if (logLevel === core_1.LogLevel.DEBUG && !config.logger) {\n config.logger = logger;\n }\n return logger;\n}", "title": "" }, { "docid": "d7a07c629b547a5bf3688d38fa6c4635", "score": "0.5137335", "text": "static configureForConsole() {\n LoggerFactory.configure(new ConsoleLoggerProvider());\n }", "title": "" }, { "docid": "60125705ee061f7447920a8036f02dd4", "score": "0.5119993", "text": "function setupLogger(logDir) {\n // configure logger to use as default error handler\n const tsFormat = () => (new Date()).toLocaleTimeString();\n if (!fs.existsSync(logDir)) { fs.mkdirSync(logDir); }\n winston.remove(winston.transports.Console);\n\n // default transport for console with timestamp and color coding\n winston.add(winston.transports.Console, {\n prettyPrint: true,\n timestamp: tsFormat,\n colorize: true,\n level: 'debug'\n });\n\n // file transport for debug messages\n winston.add(winstonRotate, {\n name: 'debug-transport',\n filename: `${logDir}/debug.log`,\n timestamp: tsFormat,\n level: 'debug'\n });\n\n winston.info('Database debugging initialized.');\n}", "title": "" }, { "docid": "60125705ee061f7447920a8036f02dd4", "score": "0.5119993", "text": "function setupLogger(logDir) {\n // configure logger to use as default error handler\n const tsFormat = () => (new Date()).toLocaleTimeString();\n if (!fs.existsSync(logDir)) { fs.mkdirSync(logDir); }\n winston.remove(winston.transports.Console);\n\n // default transport for console with timestamp and color coding\n winston.add(winston.transports.Console, {\n prettyPrint: true,\n timestamp: tsFormat,\n colorize: true,\n level: 'debug'\n });\n\n // file transport for debug messages\n winston.add(winstonRotate, {\n name: 'debug-transport',\n filename: `${logDir}/debug.log`,\n timestamp: tsFormat,\n level: 'debug'\n });\n\n winston.info('Database debugging initialized.');\n}", "title": "" }, { "docid": "6f1d40248d76bf7acaafc8c42231dd0a", "score": "0.5110245", "text": "error(...messages) {\n NullLogger.log(6 /* Error */, this, messages);\n return this;\n }", "title": "" }, { "docid": "9a75ab737f14411997a508bfba7cd304", "score": "0.5108433", "text": "get log_func() {\n // this might be called before the initialiser, so it's needed to check settings\n return this.settings && this.settings.misc_settings.logger_enabled\n ? (msg) => Logger.log(msg)\n : () => { };\n }", "title": "" }, { "docid": "92c8503231876d44d902a1a3972c0bd1", "score": "0.5100897", "text": "configure({\n transports = this.transports,\n stringify = this.stringify,\n opts = this.opts,\n }) {\n this.transports = transports;\n this.stringify = stringify;\n this.opts = { ...this.opts, ...opts };\n this.opts.levels.forEach(level => {\n this[level] = async (...args) => {\n this._log(level, ...args);\n }\n })\n }", "title": "" }, { "docid": "a73282a5e88ec217a582dd28b87fb040", "score": "0.50980306", "text": "_enableAllLogging() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.layer.setSupportLoggingTypes([...this._loggingTypes]);\r\n this._updateLoggers();\r\n });\r\n }", "title": "" }, { "docid": "8d6c57de39df369282b3872508da0333", "score": "0.5094087", "text": "function log() {\n if (process.env.NODE_ENV !== 'production') {\n var _console;\n\n (_console = console).log.apply(_console, arguments);\n }\n } // catch error", "title": "" }, { "docid": "78e8afacaef66b6b61c3f03221dd1d29", "score": "0.50791967", "text": "function createDefaultLogger({ output = new output_1.StreamOutputStrategy({ colors: colors_1.NO_COLORS, stream: process.stdout }), formatterOptions } = {}) {\n const { weak } = output.colors;\n const prefix = process.argv.includes('--log-timestamps') ? () => `${weak('[' + new Date().toISOString() + ']')}` : '';\n const formatter = logger_1.createTaggedFormatter({ colors: output.colors, prefix, titleize: true, wrap: true, ...formatterOptions });\n const handlers = new Set([new logger_1.StreamHandler({ stream: output.stream, formatter })]);\n return new logger_1.Logger({ handlers });\n}", "title": "" }, { "docid": "ea2fd7e4c2ae81acecf7b29a700a9791", "score": "0.5075168", "text": "function SetupLogger () {\n return new (Winston.Logger)({\n transports: [\n new (Winston.transports.Console)({\n colorize: true,\n timestamp: true\n }),\n new (Winston.transports.File)({\n filename: __dirname + config.log_directory + 'app.log',\n maxsize: 100 * 1024 * 1024,\n maxFiles: 5\n })\n ]\n });\n}", "title": "" }, { "docid": "9e92456492a44f9fd2b91be926593198", "score": "0.5052244", "text": "errorHandler (error) {\n console.log('Global error handler')\n console.error(error)\n }", "title": "" }, { "docid": "e77563d3deb062d28427ad80416a0768", "score": "0.5042255", "text": "log(msg, lvl, depth){\n let p = (new Error).stack.split(\"\\n\")[(depth || 2)];\n let l = p.replace(/\\s+at\\s+/, \"\");\n this.logger.log({\n level: lvl || 'info',\n prev: l.replace(this.config.path.app, \"\"),\n message: msg\n });\n }", "title": "" }, { "docid": "480947dcfa391c2c5b879cb1f56ca8ad", "score": "0.5039273", "text": "function NodeLogger() { }", "title": "" }, { "docid": "480947dcfa391c2c5b879cb1f56ca8ad", "score": "0.5039273", "text": "function NodeLogger() { }", "title": "" }, { "docid": "480947dcfa391c2c5b879cb1f56ca8ad", "score": "0.5039273", "text": "function NodeLogger() { }", "title": "" }, { "docid": "480947dcfa391c2c5b879cb1f56ca8ad", "score": "0.5039273", "text": "function NodeLogger() { }", "title": "" }, { "docid": "766ca26f9f641caae6dab512901bd8d8", "score": "0.5030976", "text": "function generateLogs() {\n logger.info(\"information level log\");\n logger.warn(\"Warning level log\");\n logger.error({\n status: 401,\n message: \"Error level log\",\n description: \"Description of error \",\n });\n logger.fatal({\n status: 500,\n message: \"Fatal level log\",\n description: \"Description of Fatal error \",\n });\n}", "title": "" }, { "docid": "f979833079cfcc915db31ea0df07f4c0", "score": "0.50174963", "text": "internalLog() {\n if(undefined != this.logger) {\n this.logger.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "e2e4c7f9ba8d3d7e3b6ec50988acb367", "score": "0.5011629", "text": "function setdefaultLogger(logger) {\r\n dassert(utils.isValue(logger));\r\n _defaultLogger = logger;\r\n }", "title": "" }, { "docid": "368aa45500459707665242e60222ef06", "score": "0.5003158", "text": "function NodeLogger(){}", "title": "" }, { "docid": "1e6581b0d0a649873c0e329d00339416", "score": "0.49861246", "text": "function enableLogging() {\n logEnabled = true;\n }", "title": "" }, { "docid": "e30e92c68179cb0023e8ea96e7b37a1d", "score": "0.49775854", "text": "getLogger() {\n return atom.config.get('core.debugLSP') ? new _logger.ConsoleLogger(this.name) : new _logger.NullLogger();\n }", "title": "" }, { "docid": "e68d4eb05ddf5415560802f1ce255d55", "score": "0.49603438", "text": "function loggerConfigProvider() {\n /* jshint validthis:true */\n this.config = {\n // These are the properties we need to set\n showToasts: true,\n showLogs: true\n };\n\n this.$get = function () {\n return {\n config: this.config\n };\n };\n }", "title": "" }, { "docid": "4409f14eb9729e582e664720a505dcfc", "score": "0.4960318", "text": "function setupLogging(config, ezConfig) {\n\n var baseLogDirectory = ezConfig.getString('ezbake.log.directory', path.join(__dirname, 'tmp'));\n if(!fs.existsSync(baseLogDirectory)){\n fs.mkdirSync(baseLogDirectory);\n }\n //need to separate base log directory from subdirectory as node does not have a recursive mkdir.\n var logDirectory = path.join(baseLogDirectory, config.log_subdirectory);\n if(!fs.existsSync(logDirectory)){\n fs.mkdirSync(logDirectory);\n }\n var logFile = path.join(logDirectory, config.log_file);\n winston.info('Writing logs to:', logFile);\n\n var winstonLogger = winston.add(winston.transports.File, { filename: logFile, level: config.log_level });\n if(config.hide_console_logs){\n winston.remove(winston.transports.Console);\n }\n\n // Configure the logger to handle sighub for reopening log files\n logger.reopenTransportOnSighup(winstonLogger.transports.file);\n}", "title": "" }, { "docid": "920a4de6f3652b5c6df25d3ce11efe1a", "score": "0.4950952", "text": "function NodeLogger() {}", "title": "" }, { "docid": "920a4de6f3652b5c6df25d3ce11efe1a", "score": "0.4950952", "text": "function NodeLogger() {}", "title": "" }, { "docid": "e38b3ef8b9fb2008f2078a800df9c857", "score": "0.49216565", "text": "function setupLogging() {\n\t\tif ( userId !== null ) {\n\t\t\t// Don't log anons\n\t\t\tmw.eventLog.setDefaults( 'GuidedTour', {\n\t\t\t\tuserId: userId\n\t\t\t} );\n\t\t}\n\t}", "title": "" }, { "docid": "fb80166069875dedb4323c5a950460db", "score": "0.49197024", "text": "error(...messages) {\n if (this._logLevel >= LogLevel.error) {\n this.writeToLog(console.error, ...messages);\n }\n }", "title": "" }, { "docid": "2f796939cdb4a6f04fd727c217f59beb", "score": "0.49040946", "text": "static setupFileLogger() {\n const _config = _.clone(config, true);\n const configFileLogger = _config.log.fileLogger;\n\n if (!_.has(_config, 'log.fileLogger.directoryPath') || !_.has(_config, 'log.fileLogger.fileName')) {\n console.log('unable to find logging file configuration');\n return false;\n }\n\n const logPath = configFileLogger.directoryPath + '/' + configFileLogger.fileName;\n\n // instantiate the file logging transport\n if (!fs.openSync(logPath, 'a+')) {\n throw new Error('unable to instantiate file logging path');\n }\n\n return {\n level: 'debug',\n colorize: false,\n filename: logPath,\n timestamp: true,\n maxsize: configFileLogger.maxsize ? configFileLogger.maxsize : 10485760,\n maxFiles: configFileLogger.maxFiles ? configFileLogger.maxFiles : 2,\n json: (_.has(configFileLogger, 'json')) ? configFileLogger.json : false,\n eol: '\\n',\n tailable: true,\n showLevel: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n };\n }", "title": "" }, { "docid": "60c61af1ed18a438c38013d5031b9600", "score": "0.49007046", "text": "setAppenders(appenders) {\n // The following code has been disabled, since it seems unreasonable to\n // clear the logs just because the appenders will be set for the logger.\n // You should manually call 'logger.clear()' if you want to clear the logs\n // before setting new appenders.\n // -----------------------------------------\n // //clear first all existing appenders\n // for(var i = 0; i < this.appenders.length; i++) {\n // \tthis.appenders[i].doClear();\n // }\n // -----------------------------------------\n this.appenders = appenders;\n }", "title": "" }, { "docid": "260e5487b914c6f8c7af6d6fd6f1923d", "score": "0.4884476", "text": "_updateLoggers() {\r\n this._selectedLoggingTypes = this.layer.logger.getTypes();\r\n this.forceRedraw();\r\n }", "title": "" }, { "docid": "0538cb3a12b6ef1f7e0aea3aa9dabe82", "score": "0.48661855", "text": "checkLoggingOption() {\n if (this.options.logging === true) {\n deprecations.noTrueLogging();\n // eslint-disable-next-line no-console\n this.options.logging = console.log;\n }\n }", "title": "" }, { "docid": "a7d0475029c5c8d84df23054864c2254", "score": "0.48563582", "text": "function Logger(config, class_)\n{\nvar self = this;\n\nvar isNodeJs = (typeof window === \"undefined\" ? true : false);\n\nself.RETURN\t\t= 1;\nvar LOG\t\t\t= \"log\";\nvar DIR\t\t\t= \"dir\";\nvar INFO\t\t= \"info\";\nself.ERROR\t\t= \"error\";\nvar ERROR = self.ERROR;\nvar WARN\t\t= \"warn\";\nself.FORCE\t\t= \"force\";\nvar FORCE = self.FORCE;\nvar STDOUT\t\t= \"stdout\";\n\n\t// Labels -- -- -- -- -- -- -- -- -- -- //\nvar labels = {};\nlabels[LOG]\t\t= \"[i] \";\nlabels[DIR]\t\t= \"[d] \";\nlabels[INFO]\t= \"[i] \";\nlabels[ERROR]\t= \"[e] \";\nlabels[WARN]\t= \"[w] \";\nlabels[FORCE]\t= \"\";\nlabels[STDOUT]\t= \"\";\n\nvar showLabels\t= true;\n\n\t// -- -- -- -- -- -- -- -- -- -- //\nvar enabled = (config ? config : {});\n\n// Local: enabled = true (default), not enabled = false\nenabled[LOG]\t= (typeof enabled[LOG] !== \"undefined\" ? enabled[LOG] : true);\nenabled[DIR]\t= (typeof enabled[DIR] !== \"undefined\" ? enabled[DIR] : true);\nenabled[INFO]\t= (typeof enabled[INFO] !== \"undefined\" ? enabled[INFO] : true);\nenabled[ERROR]\t= (typeof enabled[ERROR] !== \"undefined\" ? enabled[ERROR] : true);\nenabled[WARN]\t= (typeof enabled[WARN] !== \"undefined\" ? enabled[WARN] : true);\nenabled[FORCE]\t= true;\nenabled[STDOUT]\t= true;\n\n\t// -- -- -- -- -- -- -- -- -- -- //\nself.log\t\t= function() { out(LOG, false, arguments); }\nself.dir\t\t= function() { out(DIR, false, arguments); }\nself.info\t\t= function() { out(INFO, false, arguments); }\nself.error\t\t= function() { out(ERROR, false, arguments); }\nself.warn\t\t= function() { out(WARN, false, arguments); }\nself.force\t\t= function() { out(FORCE, false, arguments); }\nself.stdout\t\t= function() { out(STDOUT, true, arguments); }\n\n\t// -- -- -- -- -- -- -- -- -- -- //\n\nvar out = function(type, useStdout)\n\t{\n\tif (!enabled[type] && type != FORCE)\n\t\treturn;\n\n\tvar str = \"\";\n\tvar strs = self.convertArguments(arguments[2]);\n\tvar strp = null;\n\n\tfor (var i = 0; i < strs.length; i++)\t\t\t\t\t\t\t// Concatenate strings passed in the arguments, separate strings with space\n\t\t{\n\t\tstrp = (typeof strs[i] == \"string\" ? strs[i] : JSON.stringify(strs[i]));\n\t\tstr += (str != \"\" && str != \"\\n\" && str != \"\\r\" && str != \"\\r\\n\" ? \" \" : \"\") + strp;\n\t\t}\n\n\tif (type == ERROR)\n\t\t{\n\t\tstr += new Error().stack;\n\t\t}\n\n\tstr = str.replace(/[\\x00-\\x09\\x0b-\\x0c\\x0e-\\x1f]/g, \"\");\t\t// Replace control characters 0-9, 11-12, 14-31\n\n\tif (!useStdout && showLabels)\n\t\t{\n\t\tvar dateString = new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '');\n\n\t\tstr = dateString +\" \"+labels[type]+\"[\"+class_+\"] \"+ str;\n\t\t}\n\n\tif (isNodeJs)\n\t\t{\n\t\tif (!useStdout)\t\t\t\t\t\t\t\t\t\t\t\t// console.log prints new line\n\t\t\tconsole.log(str);\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t// stdout.write doesn't\n\t\t\tprocess.stdout.write(str);\n\t\t}\n\telse\n\t\t{\n\t\tif (type == DIR && console.dir)\n\t\t\tconsole.dir(str);\n\n\t\telse if (type == ERROR && console.error)\n\t\t\tconsole.error(str);\n\n\t\telse if (type == INFO && console.info)\n\t\t\tconsole.info(str);\n\n\t\telse if (type == WARN && console.warn)\n\t\t\tconsole.warn(str);\n\n\t\telse\n\t\t\tconsole.log(str);\n\t\t}\n\t};\n\nself.setOptions = function(options)\n\t{\n\tif (typeof options.enabled !== \"undefined\")\n\t\t{\n\t\tfor (var type in options.enabled)\n\t\t\t{\n\t\t\tenabled[type] = options.enabled[type];\n\t\t\t}\n\t\t}\n\n\tif (typeof options.showLabels !== \"undefined\")\n\t\tshowLabels = options.showLabels;\n\t};\n\nself.clone = function(logger)\n\t{\n\tvar enabled_ = logger.getEnabled();\n\n\tenabled[LOG]\t= enabled_[LOG];\n\tenabled[DIR]\t= enabled_[DIR];\n\tenabled[INFO]\t= enabled_[INFO];\n\tenabled[ERROR]\t= enabled_[ERROR];\n\tenabled[WARN]\t= enabled_[WARN];\n\t};\n\nself.getEnabled = function()\n\t{\n\treturn enabled;\n\t};\n\n/**\n * Clone the values from this instance of the logger to the global base configuration\n * => Other instance of the logger get the same values as this instance\n */\nself.cloneInstanceToBaseConfiguration = function()\n\t{\n\tvar iLogger;\n\tvar globalObj = (typeof(window) === \"undefined\" ? global : window);\n\n\tif (globalObj.speBaseConfig_ && globalObj.speBaseConfig_.logger)\n\t\t{\n\t\tiLogger = globalObj.speBaseConfig_.logger;\n\n\t\tfor (var i in iLogger)\n\t\t\t{\n\t\t\tif (i != class_)\n\t\t\t\t{\n\t\t\t\tiLogger[i][LOG]\t\t= enabled[LOG];\n\t\t\t\tiLogger[i][DIR]\t\t= enabled[DIR];\n\t\t\t\tiLogger[i][INFO]\t= enabled[INFO];\n\t\t\t\tiLogger[i][ERROR]\t= enabled[ERROR];\n\t\t\t\tiLogger[i][WARN]\t= enabled[WARN];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n/**\n * Convert arguments to array and sanitize empty arguments\n */\nself.convertArguments = function()\n\t{\n\tvar args;\n\n\tif (Object.keys(arguments[0]).length == 0)\n\t\t{\n\t\targs = [\"\"];\n\t\t}\n\telse\n\t\t{\n\t\targs = Array.prototype.slice.call(arguments[0]);\n\t\t}\n\n\treturn args;\n\t}\n\n}", "title": "" }, { "docid": "a2060a183108a70ea67d84f912468ab4", "score": "0.48368213", "text": "function setLogLevel(level) {\n Logger.GLOBAL_LEVEL = level;\n}", "title": "" }, { "docid": "44c3554410f9f2c2d1883293a61a1017", "score": "0.4835721", "text": "function _setupLogging(cb) {\n\n\n /*\n * setup logging framework\n */\n log.info('Initializing logging framework');\n\n if (typeof nconf.get().logging !== 'undefined') {\n\n\n // Console transport\n if (typeof nconf.get().logging.console !== 'undefined') {\n log.remove(log.transports.Console);\n\n log.add(log.transports.Console, {\n level: nconf.get().logging.console.level,\n colorize: true\n });\n\n log.info('\\tAdded Console transport');\n }\n\n }\n\n setImmediate(cb);\n }", "title": "" }, { "docid": "9549d04557f9ca3f8c18cfe3bed137f1", "score": "0.48303187", "text": "function DerivedLogger(options) { Logger.call(this, options); }", "title": "" }, { "docid": "6844ff9a8158a973c9e2b725b6dcb376", "score": "0.48215225", "text": "function configureLoggly(log) {\n if (Meteor && Meteor.settings) {\n const { loggly } = Meteor.settings\n if (!loggly || ['token', 'subdomain'].some(x => !(x in loggly))) {\n log.warn('Unable to find Loggly configuration in settings. Loggly is NOT running.')\n return log\n }\n\n const { token, subdomain, level } = loggly\n\n log.add(winston.transports.Loggly, {\n inputToken: token,\n subdomain,\n tags: [`env-${environment}`, release],\n json: true,\n level: level || 'info'\n })\n\n log.info('Loggly configured')\n return log\n }\n}", "title": "" }, { "docid": "4c0211e45c9b2112aea788bed3d27a13", "score": "0.48202607", "text": "function defaultErrorHandler() {\n return function errorHandler(err, req, res, next) {\n if (res.headersSent) {\n return next();\n }\n if (!(err instanceof BaseError)) {\n res.status(500).json({\n message: 'Internal Server Error',\n details: 'Unknown Error Occured',\n });\n } else {\n res.status(err.statusCode).json({\n message: err.message,\n details: err.details,\n errors: err.errors,\n });\n }\n return next();\n };\n}", "title": "" }, { "docid": "0b592fcd4726f6588b287804267a4231", "score": "0.48122033", "text": "function errorLog(error){\n const eLog = chalk.red(error);\n console.log(eLog);\n}", "title": "" }, { "docid": "f67fa0463bac7a8133beb496db826010", "score": "0.48016202", "text": "debug(msg, config = LOG_TYPE.DEFAULT, msg2, msg3){\n\n if (this.loggers[ config ] !== undefined)\n this.loggers[ config ].debug.apply(this.loggers[ config ], arguments);\n\n }", "title": "" }, { "docid": "0f4c548e8d7ff1b67c813901e1f4deaf", "score": "0.47926295", "text": "function log(/* arguments */) {\n if (registrants.log) {\n registrants.log.apply(this, arguments);\n }\n }", "title": "" }, { "docid": "fb3500516a163a039fe1338dd934217d", "score": "0.47924194", "text": "configureErrorHandler() {\n process.on('uncaughtException', (error) => {\n logger.debug('Uncaught Exception', 'An Uncaught Exception was throwed', {\n error\n });\n console.log(error);\n });\n\n this.server.on('restifyError', errorHandler.handle.bind(errorHandler));\n }", "title": "" }, { "docid": "201cfce877978a3c0e9782ebac27e998", "score": "0.47851664", "text": "function transportLog(name, next) {\n var transport = self.transports[name];\n if (transport.log.length <= 2) {\n transport.log({level: level, id: id, message: msg, meta: meta}, done);\n } else if (transport.log.length > 4) {\n transport.log(level, id, msg, meta, done);\n } else {\n transport.log(level, msg, meta, done);\n }\n\n function done(err) {\n if (err) {\n err.transport = transport;\n finish(err);\n return next();\n }\n\n self.emit('logging', {transport: transport, level: level, id: id, message: msg, meta: meta});\n next();\n }\n }", "title": "" }, { "docid": "9bc97b37358405d3e6aebdf5b1698c02", "score": "0.4772978", "text": "static logExpress() {\n if (loggerExpress) {\n return loggerExpress;\n }\n\n loggerExpress = winstonExpress.logger({\n transports: [\n new winston.transports.Console({\n level: 'info',\n json: false,\n colorize: true\n })\n ],\n meta: true,\n expressFormat: true,\n colorize: true\n });\n\n return loggerExpress;\n }", "title": "" }, { "docid": "296136983e03ca76e89fe007fde7d631", "score": "0.4772742", "text": "function onError(error) {\n logger.error(error);\n}", "title": "" }, { "docid": "b78ed95312783bbd5b2054198e1d9e9d", "score": "0.47706392", "text": "checkLoggingOption() {\n if (this.options.logging === true) {\n deprecations.noTrueLogging();\n this.options.logging = console.debug;\n }\n }", "title": "" }, { "docid": "b8d93fac4700ef67528ddce780797b7c", "score": "0.47670338", "text": "registerPinoLogger() {\n this.app.use(PinoLogger(this.config.pino || {}))\n }", "title": "" }, { "docid": "6e99ba8c2e2e34027551d455ea419d75", "score": "0.4759553", "text": "function PTELogger(opts) {\n var winstonLogger = new winston.Logger({\n transports: [\n new (winston.transports.Console)({ colorize: true })\n ]\n }),\n levels = ['debug', 'info', 'warn', 'error'],\n logger = Object.assign({}, winstonLogger);\n\n if (opts.level) {\n if (levels.includes(opts.level)) {\n // why, oh why, does logger.level = opts.level not work?\n winstonLogger.level = opts.level;\n }\n }\n\n levels.forEach(function (method) {\n var func = winstonLogger[method];\n\n logger[method] = (function (context, tag, f) {\n return function () {\n if (arguments.length > 0) {\n var timenow = new Date().toISOString();\n var prefix = '[' + timenow + ' ' + tag + ']: ';\n arguments[0] = prefix + arguments[0];\n }\n\n f.apply(context, arguments);\n };\n }(winstonLogger, opts.prefix, func));\n });\n\n return logger;\n}", "title": "" }, { "docid": "9957d244e5a06affa0f9a5a2b14de563", "score": "0.47516865", "text": "logError(ex) {\n if (MGA.Consts.DEBUG === 0) {\n return;\n }\n\n console.log(ex);\n }", "title": "" }, { "docid": "55b83176b9735c6c1fe266eaaea095e7", "score": "0.47505745", "text": "function setLogLevel(level) {\n __WEBPACK_IMPORTED_MODULE_0__src_logger__[\"c\" /* instances */].forEach(function (inst) {\n inst.logLevel = level;\n });\n}", "title": "" }, { "docid": "4b22aba4b8f5e18eba063ea37faa0bb1", "score": "0.4749031", "text": "function setupErrorGuard() {\n var onError = function(e) {\n global.console.error(\n 'Error: ' +\n '\\n stack: ' + e.stack +\n '\\n line: ' + e.line +\n '\\n message: ' + e.message,\n e\n );\n };\n global.ErrorUtils.setGlobalHandler(onError);\n }", "title": "" }, { "docid": "b81300018a22dab894e9019c20e55ed1", "score": "0.47316295", "text": "static getLogger(moduleName) {\n const level = Logger.getLogLevel();\n\n const logger = winston.createLogger({\n format: combine(\n winston.format((info) => {\n info.level = LEVELS_LOOKUP[info.level] || '???';\n return info;\n })(),\n timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),\n label({ label: moduleName }),\n colorize(),\n logFormat,\n ),\n level,\n levels: Logger.logLevels().levels,\n transports: [new winston.transports.Console()],\n });\n winston.addColors(Logger.logLevels().colors);\n\n if (moduleName === 'plejd-main') {\n logger.log(level, `Log level set to ${level}`);\n }\n\n return logger;\n }", "title": "" }, { "docid": "e9ff6c623f41fd5873896a62f27599f2", "score": "0.47254387", "text": "function all_wkshts_noerror(variant) {\n let configs = [\n FWD_PROMPTING_CONFIG,\n FWD_INTERP_CONFIG,\n FWD_BIO_CONFIG,\n FWD_ACT_CONFIG,\n FWD_AFTER_CONFIG,\n ];\n let logger = new Logger();\n for(let config of configs) {\n console.log('section', config.section);\n wksht_noerror(config, logger);\n console.log('ok\\n\\n');\n }\n}", "title": "" }, { "docid": "187e2ff0002bfe8ef1d0a6432a4019b4", "score": "0.4717603", "text": "function _log () {\n\n var colors = require('colors');\n\n var args = Array.prototype.slice.call(arguments, 0),\n level = args.shift();\n\n if (!~[\"log\", \"error\", \"warn\"].indexOf(level)) {\n args.unshift(level);\n level = \"log\";\n }\n\n if(level == \"log\") {\n args[0] = \"----> \" + args[0];\n } else if(level == \"error\") {\n args[0] = \"....> \" + colors.red(\"ERROR: \") + args[0]\n } else if(level == \"warn\") {\n args[0] = \"....> \" + colors.yellow(\"WARNING: \") + args[0]\n }\n\n console[level].apply(console, args);\n}", "title": "" }, { "docid": "5b8184e0d3253dbd8eba14f8ef6323b6", "score": "0.47173956", "text": "function errorLogger(e) {\n console.log(e?.message)\n}", "title": "" }, { "docid": "a00d1de0ae3ecbcee0d6138db679c425", "score": "0.4716299", "text": "function Logger() {\n this.i = info_logger;\n this.d = debug_logger;\n this.e = error_logger;\n}", "title": "" }, { "docid": "fe31a7a48bcdcc6155118c10b73db24f", "score": "0.47148538", "text": "function addLogSink(sink) {\n Logger.GLOBAL_SINKS.push(sink);\n}", "title": "" }, { "docid": "b9c843762112105c2467b9930d21c8ff", "score": "0.4710526", "text": "function log(err) {\n if (_logger) {\n if (typeof err == 'string') {\n err = {message: err, code: 0};\n }\n _logger(err);\n }\n }", "title": "" }, { "docid": "5f91c6ce26faa13deacb93aeb7ea0fd7", "score": "0.47069016", "text": "bootstrap() {\n console.log = (...args) => this._sendRemote('log', undefined, args);\n\n window.addEventListener('error', (e) => {\n e.preventDefault();\n this._sendRemote('error', undefined, (e.error.stack && e.error.stack.split('\\n')) || 'Uncaught ' + e.error);\n });\n }", "title": "" }, { "docid": "ad171154444c329b84ca3bd0e93039ea", "score": "0.470543", "text": "log() {\n if (this._logLevel >= LogLevel.FULL.value) {\n let copy = Array.prototype.slice.call(arguments);\n copy.unshift(LOG_PREFIX);\n console.log.apply(console, copy);\n }\n }", "title": "" } ]
93f7ee3a1262db6f9a5574996396ebb0
END PLAYER CLASS ITEM CLASS CONSTRUCTOR
[ { "docid": "fabb988e4858e2a36490712e6183cdca", "score": "0.65582746", "text": "function Item(){\n\tthis.title = 'Default Item Title';\n\tthis.description = 'This is the default item description';\n\tthis.attributes = {'creativity' : 1};\n\tthis.img = imgPath+'default-item.png';\n\tthis.price = 1;\n\n\tthis.getItemData = function(){//intial data for the item\n\t\tif(jQuery.urlParam('itemId') == null){\n\t\t\tthis.itemId = 'Default Item Class';\n\t\t}\n\t\telse{\n\t\t\tthis.itemId = jQuery.urlParam('itemId');\n\n\t\t}\n\t\t//ANDY's ITEMS\n\t\tif(this.itemId == 'bluetooth-axe'){\n\t\t\tthis.title = 'Blue Tooth Battle Axe';\n\t\t\tthis.description = 'Comes with a speaker so you can listen to Slayer while you slay. Also has a bottle opener for breaktime. '\n\t\t\tthis.attributes = {'creativity' : 1};\n\t\t\tthis.img = imgPath+'battle-axe.png';\n\t\t}\n\t\telse if(this.itemId == 'mouse-of-nine-heads'){\n\t\t\tthis.title = 'Mouse of Nine Heads';\n\t\t\tthis.description = 'Cat of Nine Tails, look the F out, there is no esc from this. '\n\t\t\tthis.attributes = {'charisma' : 1};\n\t\t\tthis.img = imgPath+'mouse-of-9.png';\n\t\t}\n\t\telse if(this.itemId == 'wifi-shield'){\n\t\t\tthis.title = 'Shield of WiFi';\n\t\t\tthis.description = 'Blocks excess data charges, but leaves you a bit exposed. '\n\t\t\tthis.attributes = {'knowledge' : 1};\n\t\t\tthis.img = imgPath+'wifi-shield.png';\n\t\t}\n\t\telse if(this.itemId == 'sword'){\n\t\t\tthis.title = 'Sword of Calculating';\n\t\t\tthis.description = 'Just add this sword, subtract your enemy\\'s limbs, divide their skull, and multiply the carnage.'\n\t\t\tthis.attributes = {'creativity' : 1};\n\t\t\tthis.img = imgPath+'sword.png';\n\t\t}\n\t\telse if(this.itemId == 'blue-ribbon-potion'){\n\t\t\tthis.title = 'Blue Ribbon Potion';\n\t\t\tthis.description = 'Do you need a frosty sippy-poo of courage? Thish wool totally do-er bud.'\n\t\t\tthis.attributes = {'charisma' : 1};\n\t\t\tthis.img = imgPath+'blue-ribbon-potion.png';\n\t\t}\n\t\telse if(this.itemId == 'lamp'){\n\t\t\tthis.title = 'Lamp of Synergenie';\n\t\t\tthis.description = 'Grants yours bloody wishes, but you’ll have to work together.'\n\t\t\tthis.attributes = {'creativity' : 1};\n\t\t\tthis.img = imgPath+'lamp.png';\n\t\t}\n\t\telse if(this.itemId == 'floppies'){\n\t\t\tthis.title = 'Razor-Sharp Throwing Floppies';\n\t\t\tthis.description = '13,107 of these equals one Gigabyte.'\n\t\t\tthis.attributes = {'knowledge' : 1};\n\t\t\tthis.img = imgPath+'floppies.png';\n\t\t}\n\t\telse if(this.itemId == 'mace'){\n\t\t\tthis.title = 'Mace of Gore Competencies';\n\t\t\tthis.description = 'Take what you’re best at and bash your way into new Monsters/Markets'\n\t\t\tthis.attributes = {'charisma' : 1};\n\t\t\tthis.img = imgPath+'mace.png';\n\t\t}\n\n\t\t//RYAN's ITEMS\n\t\telse if(this.itemId == 'chrome-pendant'){\n\t\t\tthis.title = 'Chrome Pendant of Finding';\n\t\t\tthis.description = 'You are pretty much lost without one.';\n\t\t\tthis.attributes = {'knowledge' : 1};\n\t\t\tthis.img = imgPath+'chrome-pendant.png';\n\t\t}\n\t\telse if(this.itemId == 'crystalline-usb'){\n\t\t\tthis.title = 'Crystalline Universal Spell Book';\n\t\t\tthis.description = 'It\\'s always a good idea to back your spell book up on one of these, just in case.'\n\t\t\tthis.attributes = {'knowledge' : 1};\n\t\t\tthis.img = imgPath+'crystalline-usb.png';\n\t\t}\n\t\telse if(this.itemId == 'fedora'){\n\t\t\tthis.title = 'White Knight\\'s Fedora';\n\t\t\tthis.description = 'Step up your game a notch with this stylish head-piece';\n\t\t\tthis.attributes = {'charisma' : 1};\n\t\t\tthis.img = imgPath+'fedora.png';\n\t\t}\n\t\telse if(this.itemId == 'phishing-rod'){\n\t\t\tthis.title = 'Phishing Rod';\n\t\t\tthis.description = 'Many fish bite if you got good bait.';\n\t\t\tthis.attributes = {'creativity' : 1};\n\t\t\tthis.img = imgPath+'phishing-rod.png';\n\t\t}\n\t\telse if(this.itemId == 'troll-hammer'){\n\t\t\tthis.title = 'Troll Hammer';\n\t\t\tthis.description = 'If you troll, you will be downvoted.';\n\t\t\tthis.attributes = {'charisma' : 1};\n\t\t\tthis.img = imgPath+'troll-hammer.png';\n\t\t}\n\n\t}\n\tthis.addItem = function(){\n\t\tfirebaseRef.child('items').child(this.title).set({\n\n\t\t\t\t'title' : this.title,\n\t\t\t\t'description' : this.description,\n\t\t\t\t'attributes' : this.attributes,\n\t\t\t\t'img' : this.img,\n\t\t\t\t'price' : this.price,\n\n\n\t\t});\t\n\t}\n\tthis.equipped = function(player){\n\t\tvar isEquipped = false;\n\t\t\n\t\tif(typeof player.inventory != 'undefined'){\n\t\t\t\tfor(var equippedItem in player.inventory){\n\t\t\t\t\tif(player.inventory.hasOwnProperty(equippedItem)) {\n\t\t\t\t\t\tif(item.title == equippedItem){\n\t\t\t\t\t\t\tisEquipped = true;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isEquipped;\n\t\t//if its in the player's inventory, return true, else return false.\n\t}\n\tthis.syncData = function(){\n\t\tfirebaseRef.child('items').child(item.title).on('value', function(snapshot){\n\t\t\tvar dataSet = snapshot.val();\n\t\t\tif(typeof AdobeEdge.getComposition('item') != 'undefined'){\n\t\t\t\tvar sym = AdobeEdge.getComposition('item').getStage();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar sym = false;\n\t\t\t\tconsole.log('No symbol to sync data with. You must define a stage in this.syncData first.');\n\t\t\t}\n\n\t for(var key in dataSet){\n\t\tif (dataSet.hasOwnProperty(key)) {\n\t\t\t\tif(key == 'title'){\n\t\t\t\t\tif(sym && typeof sym.$('Item-Title') != 'undefined'){\n\t\t\t\t\t\tsym.$('Item-Title').html( dataSet[key]);//update the title symbol\n\t\t\t\t\t}\n\t\t\t\t\tthis.title = dataSet[key];\n\t\t\t\t}\n\t\t\t\tif(key == 'description'){\n\t\t\t\t\tif(typeof sym.$('Item-Description') != 'undefined'){\n\t\t\t\t\t\tsym.$('Item-Description').html( dataSet[key]); //update the description symbol\n\t\t\t\t\t}\n\t\t\t\t\tthis.description = dataSet[key];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(key == 'img'){ //update the item image \n\t\t\t\t\tif(sym && typeof sym.getSymbol('item-image') != 'undefined' && sym.getSymbol('item-image').$('image').length > 0){\n\t\t\t\t\tsym.getSymbol('item-image').$('image').css('backgroundImage', 'url('+dataSet[key]+')');\n\t\t\t\t\t}\n\t\t\t\t\tthis.img = dataSet[key];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(key == 'attributes'){ //loop through the attributes and display the correct number for each.\n\t\t\t\t\tif(sym && typeof sym.$('Item-Attributes') != 'undefined' ){\n\t\t\t\t\t\tsym.$('AttributesLabel').html('');\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tsym.$('Item-Attributes').html('');\n\t\t\t\t\t\tfor(var attributeKey in dataSet[key]){ \n\t\t\t\t\t\t\tsym.$('AttributesLabel').html('Boosts your '+attributeKey+'.');\n\t\t\t\t\t\t\tfor(var i = 0; i < dataSet[key][attributeKey]; i++){\n\t\t\t\t\t\t\t\tsym.$('Item-Attributes').append('<img class=\"'+attributeKey+'\" src=\"'+imgPath+attributeKey+'.png\" />' );\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\tthis.attributes = dataSet[key];\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t if(key == 'price'){ //show crypto credits on some pages\n\t\t\t\t\t\n\t\t\t\t\tthis.price = dataSet[key];\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t \t \n\t }\n\t \n\t}, function (errorObject) {//fires when firebase fails to read data.\n\t console.log(\"The firebase read failed: \" + errorObject.code);\n\t});\n\t}\n\n}", "title": "" } ]
[ { "docid": "b3cb88f7d1035af30a6024806f9d2f83", "score": "0.753206", "text": "function Sprite_Item() {\n this.initialize.apply(this, arguments);\n }", "title": "" }, { "docid": "f11909e4a6e4508ade175739ff3b084b", "score": "0.7388227", "text": "function Item() {\r\n Outlayer.Item.apply( this, arguments );\r\n}", "title": "" }, { "docid": "f11909e4a6e4508ade175739ff3b084b", "score": "0.7388227", "text": "function Item() {\r\n Outlayer.Item.apply( this, arguments );\r\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "baf6822474cb7f55ad2c83f0738c79eb", "score": "0.7215408", "text": "function Item() {\n Outlayer.Item.apply( this, arguments );\n}", "title": "" }, { "docid": "26ff11c3b047358882aec80950509ce5", "score": "0.7189655", "text": "function Item(){Outlayer.Item.apply(this,arguments)}", "title": "" }, { "docid": "f8b0f30f8c4c47d378f163c84ccf0d2d", "score": "0.7094977", "text": "function Item() {}", "title": "" }, { "docid": "5c523c7959dad761e85a450cb592176b", "score": "0.6836687", "text": "constructor(root, x, y, itemData) { // Namely, 'affects', 'power' and 'duration' to start.\n super(root, x, y);\n this.type = itemData.type;\n this.power = itemData.power;\n this.duration = itemData.duration;\n this.id = `${this.type}-${this.x}-${this.y}`;\n this.domElement.src = `./assets/items/${this.type}.png`;\n this.domElement.id = this.id;\n this.domElement.classList.add('item');\n this.domElement.style.left = `${this.x * BLOCK_WIDTH}px`;\n this.domElement.style.bottom = `${this.y * BLOCK_WIDTH}px`;\n }", "title": "" }, { "docid": "63f7eafd4f0a7ff61bcd077b8f1eb59a", "score": "0.6750173", "text": "function Player() {}", "title": "" }, { "docid": "3be198afb9595d1a40eb40d7c0984712", "score": "0.67101896", "text": "constructor(item) {\n\t\tsuper(item);\n\t}", "title": "" }, { "docid": "3be198afb9595d1a40eb40d7c0984712", "score": "0.67101896", "text": "constructor(item) {\n\t\tsuper(item);\n\t}", "title": "" }, { "docid": "3be198afb9595d1a40eb40d7c0984712", "score": "0.67101896", "text": "constructor(item) {\n\t\tsuper(item);\n\t}", "title": "" }, { "docid": "3be198afb9595d1a40eb40d7c0984712", "score": "0.67101896", "text": "constructor(item) {\n\t\tsuper(item);\n\t}", "title": "" }, { "docid": "3be198afb9595d1a40eb40d7c0984712", "score": "0.67101896", "text": "constructor(item) {\n\t\tsuper(item);\n\t}", "title": "" }, { "docid": "3be198afb9595d1a40eb40d7c0984712", "score": "0.67101896", "text": "constructor(item) {\n\t\tsuper(item);\n\t}", "title": "" }, { "docid": "f84b1445148c5b5a024f42b50c283b49", "score": "0.66684616", "text": "function Item(item){\n\tthis.imagemX = item.imagemX;\n\tthis.imagemY = item.imagemY;\n\tthis.posicaoX = 0;\n\tthis.posicaoY = 0;\n\tthis.Desenhar = function(){\n\t\tcontext.drawImage(sprite,this.imagemX*30,this.imagemY*30,30,30,this.posicaoX*30,this.posicaoY*30,30,30);\n\t}\n\tthis.Usar = item.Usar;\n}", "title": "" }, { "docid": "fdbce559bbd4b693abf2f9ae9b01b196", "score": "0.66221446", "text": "constructor(sprite, x, y) {\n super(sprite, x, y);\n\n //These variables are fixed to certain values when instantiating Player object \n this.level = 1;\n this.score = 0;\n this.gems = 0;\n }", "title": "" }, { "docid": "5c8373dd2dfa5acad8dc6fd08dd9d272", "score": "0.65550387", "text": "function TargetaItem() {\n\n\tthis.init()\n}", "title": "" }, { "docid": "5440efacd630fe6efe879d7dcd569617", "score": "0.648738", "text": "function Item() {\n // Do Nothing\n }", "title": "" }, { "docid": "6ebb41459cfb745e76a96bee0b2ce165", "score": "0.648673", "text": "function Item() {\n\tthis.data = {};\n}", "title": "" }, { "docid": "9c67a6ac319fe6b7eb9f63e827765ec2", "score": "0.6477006", "text": "function Player()\n{\n\tthis.points = 0;\n this.fruitMode = 0;\n}", "title": "" }, { "docid": "b99376283bcfefa1629df09a62bd8bb0", "score": "0.64639956", "text": "constructor() {\n\t\t\n\t\t/*\n\t\tInitializes all the variables for the player. No items, base stats. Also draws the player for the first time.\n\t\t*/\n\t\t\n\t\tthis.inventory = {\n\t\t\t'armor': [],\n\t\t\t'staff': [],\n\t\t\t'ring': [],\n\t\t\t'potion': []\t\t\t\n\t\t};\n\t\t\n\t\tthis.stats = {\n\t\t\t'level': 1,\n\t\t\t'experience': 0,\n\t\t\t\n\t\t\t'combat_stats': {\n\t\t\t\t'health': 10,\n\t\t\t\t'attack': 1,\n\t\t\t\t'defense': 1,\n\t\t\t\t'cursor_width': 5,\n\t\t\t\t'speed': 2\n\t\t\t}, //Stats after delta_stats, for use in combat.\n\t\t\t\n\t\t\t'delta_stats': {\n\t\t\t\t'health': 0,\n\t\t\t\t'attack': 0,\n\t\t\t\t'defense': 0,\n\t\t\t\t'cursor_width': 0,\n\t\t\t\t'speed': 0\n\t\t\t}, //Stores the changes in stats during combat. Most likely negative, indicating a debuff/damage.\n\t\t\t\n\t\t\t'total_stats': {\n\t\t\t\t'health': 10,\n\t\t\t\t'attack': 1,\n\t\t\t\t'defense': 1,\n\t\t\t\t'cursor_width': 5,\n\t\t\t\t'speed': 2\n\t\t\t}, //Total effective stats\n\t\t\t\n\t\t\t'base_stats': {\n\t\t\t\t'health': 10,\n\t\t\t\t'attack': 2,\n\t\t\t\t'defense': 1,\n\t\t\t\t'cursor_width': 5,\n\t\t\t\t'speed': 2\n\t\t\t}, //Stats innate to the player (before equipment/buffs)\n\t\t\t\n\t\t\t'equipment_stats': {\n\t\t\t\t'health': 0,\n\t\t\t\t'attack': 0,\n\t\t\t\t'defense': 0,\n\t\t\t\t'cursor_width': 0,\n\t\t\t\t'speed': 0\n\t\t\t}, //Stats gained from equipment\n\t\t\n\t\t\t'equipped': {\n\t\t\t\t'armor': 0,\n\t\t\t\t'ring': 0,\n\t\t\t\t'staff': 0\n\t\t\t}, //Current items equipped (UIDs)\n\t\t\t\n\t\t\t'bound_attacks': [1,2,3,4]\n\t\t};\n\t\t\n\t\tthis.player_panel = document.querySelector('#player_panel');\n\t\t\n\t\tthis.updateStats();\n\t\tthis.updatePlayerPanel();\n\t\t\n\t}", "title": "" }, { "docid": "2583ebfac3ea8e1949869fce39d48478", "score": "0.64083916", "text": "function Sprite_Weapon() {\n this.initialize.apply(this, arguments);\n}", "title": "" }, { "docid": "71333ac6a99807846761cf4f8e71119d", "score": "0.6395232", "text": "constructor(player, spacer) {\n this.player = player;\n this.spacer = spacer;\n }", "title": "" }, { "docid": "4f9759883986f9b111c6fd75ad2b4cee", "score": "0.63301176", "text": "function Weapon() {\n \n}", "title": "" }, { "docid": "2cdc844e7b1511539696f61805eba416", "score": "0.62781835", "text": "constructor() {\n // Sets the initial score to 0\n // Sets the initial position of the player\n // Sets the initial character\n this.score = 0;\n this.x = 200;\n this.y = 380;\n this.sprite = 'images/char-boy.png';\n }", "title": "" }, { "docid": "987cf0481c279b4e3a408d8e0ec89c66", "score": "0.6269725", "text": "function itemsinit(item, obp, ob) {\n /*injecting the specific values of each element*/\n var Element = function Element(ob) {\n for (var index in ob) {\n this[index] = ob[index];\n }\n };\n /*injecting the attributes by inheritance from the object obp defined in config.json*/\n Element.prototype = Object.create(obp);\n /*render the elements to the canvas with their new frame*/\n Element.prototype.render = function () {\n /* calculate the new frame for this element */\n var frame = Math.floor((game.frame + this.frameind) % this.frames) + 1;\n /* detect the direction for sprite referene*/\n switch (this.direction) {\n case 1:\n var dir = 1;\n break;\n case -1:\n var dir = 2;\n break;\n case 0:\n var dir = 0;\n break;\n }\n\n var sp = frame + \"-\" + dir;\n ctx.drawImage(Resources.get(img), 0, this.sprite[sp], this.width, this.height, this.xpos + this.scale + this.hoffset, this.ypos + frame * this.frameoffset + this.scale + this.voffset, this.width - this.scale * 2, this.height - this.scale * 2);\n };\n /*calculating the elements position\n will be called from automove elements (enemies,logs)\n */\n Element.prototype.move = function (dt) {\n this.xpos = this.xpos + dt * this.speed * game.speed * this.direction;\n /*is bump on for this element?\n if yes test for ouside bounds relocate and turn\n if no relocate\n */\n if (this.bump) {\n if (this.xpos + this.width > game.width) {\n this.direction = -1;\n this.xpos = game.width - this.width - (this.xpos + this.width - game.width);\n }\n if (this.xpos < 0) {\n this.direction = 1;\n this.xpos = 0 - this.xpos;\n }\n } else {\n if (this.xpos > game.width) {\n this.xpos = 0 - this.width;\n }\n if (this.xpos + this.width < 0) {\n this.xpos = game.width - this.width;\n }\n }\n };\n\n /*get the elements bounds for collision detection*/\n Element.prototype.getbounds = function () {\n this.leftb = this.xpos + this.hoffset + this.scale * 2;\n this.rightb = this.xpos + this.width + this.hoffset - this.scale * 2;\n };\n\n /*create the elements with call to the element constructor for parsing in the properties\n * @ ob [object]: object with the specific parameters for this element\n */\n var Enemy = function Enemy(ob) {\n Element.call(this, ob);\n };\n Enemy.prototype = Object.create(Element.prototype);\n Enemy.prototype.constructor = Enemy;\n\n var Item = function Item(ob) {\n Element.call(this, ob);\n };\n Item.prototype = Object.create(Element.prototype);\n Item.prototype.constructor = Item;\n\n\n var Wood = function Wood(ob) {\n Element.call(this, ob);\n };\n Wood.prototype = Object.create(Element.prototype);\n Wood.prototype.constructor = Wood;\n\n var Hero = function Hero(ob) {\n Element.call(this, ob);\n };\n Hero.prototype = Object.create(Element.prototype);\n Hero.prototype.constructor = Hero;\n\n /*function for moving the palyer/hero will be called by keystroke or touch/click\n * @ walkdirection [number]: direction to walk to can be (up, down, left, right)\n */\n Hero.prototype.handleInput = function (walkdirection) {\n\n var currentTime = Date.now();\n /* is paused ?,is player dead ?, is game won ?, is levelover?, last logic preventes keydown from autofire */\n if (gamestate.can(\"die\") && currentTime - this.lastkeypress > game.keyrate) {\n this.oldxpos = this.xpos;\n this.oldypos = this.ypos;\n this.oldrow = this.row;\n this.oldcol = this.col;\n /* wich direction to move, will Hero stay inbounds? */\n if (walkdirection === \"right\" && this.col < game.cols) {\n this.xpos = this.xpos + 101;\n this.direction = 1;\n this.direction = 1;\n this.col++;\n }\n if (walkdirection === \"left\" && this.col > 0) {\n this.xpos = this.xpos - 101;\n this.direction = -1;\n this.col--;\n }\n if (walkdirection === \"up\" && this.row > 0) {\n this.ypos = this.ypos - 83;\n this.row--;\n }\n if (walkdirection === \"down\" && this.row < game.rows) {\n this.ypos = this.ypos + 83;\n this.row++;\n }\n /* sroll to new Hero postion, play Hero moving sound, set timer for preventing \"autofire\" on keydown*/\n scroll(400);\n sounds.play(sound.move);\n this.lastkeypress = currentTime;\n }\n };\n\n /*detect wich kind of elment has to be created when the wrapper function is called*/\n switch (item) {\n case \"enemy\":\n return new Enemy(ob);\n case \"item\":\n return new Item(ob);\n case \"player\":\n return new Hero(ob);\n case \"wood\":\n return new Wood(ob);\n }\n }", "title": "" }, { "docid": "cbffcdd5927b6a446e451aa45facae48", "score": "0.62695265", "text": "function AnimUnit() {\n Item.call(this);\n}", "title": "" }, { "docid": "5eeddcd9277b3ea0937dd358c4a8ee86", "score": "0.62071544", "text": "constructor() {\n\t\tsuper();\n\n\t\t// bind the input handler to this object\n\t\tthis.input_handler = new InputHandler(this);\n\n\t\t// we always want our new players to be at this location\n\t\tthis.position = {\n\t\t\tx: config.canvas_size.width / 2,\n\t\t\ty: config.canvas_size.height - 100\n\t\t};\n\t\t\n\t}", "title": "" }, { "docid": "6b6c2e8da09b74e8ee1eb0af835819ed", "score": "0.62051463", "text": "constructor(name, type) {\n console.log('player', this);\n this.name = name;\n this.type = type;\n }", "title": "" }, { "docid": "495c3fb3864abb3521fcfb41d071c1ed", "score": "0.61924165", "text": "function Sprite_Footprint() { this.initialize.apply(this, arguments);}", "title": "" }, { "docid": "d90eed8868a005263f4ee88ea96c8c49", "score": "0.6191807", "text": "function Player() {\r\n this.node = document.getElementById(\"player\");\r\n this.position = PLAYER_INIT_POS;\r\n this.motion = motionType.NONE;\r\n this.verticalSpeed = 0;\r\n}", "title": "" }, { "docid": "da17ca33caf0f35c83b00569f0f71776", "score": "0.6183083", "text": "constructor() {\n\t\tlet cursor = game.input.keyboard.createCursorKeys();\n\t\t//if (this.pads_supported) {\n\t\t\t//game.input.gamepad.start();\n\t\t//}\n\t\t/**\n\t\t * Action container for players. p[0] is for player one, p[1] - for\n\t\t * player 2, etc. Members contain hash-map with action names as keys\n\t\t * and [Key]{@link Key} objects as values.\n\t\t * @member {list}\n\t\t */\n\t\tthis.p = [{}, {}];\n\t\t// TODO do this when pad is connected\n\t\tthis.restore();\n\t}", "title": "" }, { "docid": "5866e434326a049b762624a8bd76da8b", "score": "0.6173697", "text": "function Player(descr) {\n\n // Common inherited setup logic from Entity\n this.setup(descr);\n\n //this.rememberResets();\n \n // Default sprite, if not otherwise specified\n this.sprite = g_sprites.marioTest;\n\tthis._isAlive = true;\n\t\n\t\n\tthis.animationsD = makePlayerAnimationDruid(this._scale*0.5);\n\tthis.animationsF = makePlayerAnimationFairy(this._scale*0.5);\n\tthis.animationsG = makePlayerAnimationGoat(this._scale);\n\tthis.animations = this.animationsD;\n\tthis.animation = this.animations['idleRight'];\n\tthis.goFairy();\n}", "title": "" }, { "docid": "1dc8fd74f53dcb8487704beeb337f6f9", "score": "0.61632395", "text": "constructor(sprite, x, y){\n\n // Inherited from the base class\n super(sprite, x, y);\n }", "title": "" }, { "docid": "1740a4603ca9719e11809d3c8cfa6221", "score": "0.61608124", "text": "constructor() {\n super();\n\n // initialize\n this.setHP(1);\n this.setDirection(1);\n }", "title": "" }, { "docid": "72f7b7aeb9b9e95c2bcce3ec054bcd62", "score": "0.6158002", "text": "constructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis._layer = 0;\r\n\r\n\t\tthis.sprite = new Image();\r\n\t\tthis.width = 1;\r\n\t\tthis.height = 1;\r\n\t}", "title": "" }, { "docid": "76d5069fec6ea1c232741a2b2b90cb19", "score": "0.61547923", "text": "constructor() {\r\n this.itemTextures = [];\r\n this.shownItems = [];\r\n\r\n this.lastDespawn = Date.now();\r\n this.minSpawnTime = 8000;\r\n this.maxSpawnTime = 20000;\r\n\r\n // 1 in 'spawnChance'\r\n this.spawnChance = 100;\r\n }", "title": "" }, { "docid": "2a543bcecf1e2ed9497d514b9070ec51", "score": "0.6136724", "text": "constructor() {\n\t\tthis._board = new Board();\n\t\tthis._players = [new Player('X'), new Player('O')];\n\t\tthis._currentPlayer = 0;\n\t}", "title": "" }, { "docid": "4d338ddc32ffc9660aece0a41b44d1df", "score": "0.6133187", "text": "function Player() {\n this.node = document.getElementById(\"player\");\n this.position = PLAYER_INIT_POS;\n this.motion = motionType.NONE;\n this.verticalSpeed = 0;\n}", "title": "" }, { "docid": "c79d4e58ba9d57ca327c40d0a909a6ca", "score": "0.6128056", "text": "function Item(position, image, imagesign, sprite, maxsize, dt, onestalk) {\n\n\t// --- attributes ---\n\tthis.position = position;\n\tthis.img = image;\n\tthis.sign = imagesign;\n\tthis.width = 32; //width of the single frame\n\tthis.height = 32; //height of the single frame\n\tthis.offset = 16;\n\t\n\t// - Growth attributes -\n\tthis.maxSize = maxsize;\n\tthis.stalkSPRT = sprite;\n\tthis.steptime = dt;\n\tthis.oneStalk = onestalk;\n\t\n\t// - inventory -\n\tthis.quantity = 0;\n\t\n\t// --- methods ---\n\tthis.sow = function() {\t// semer\n\t\t// must make a small sprout appear\n\t}\n\tthis.setQuantity = function(q) {\n\t\tthis.quantity = q;\n\t}\n\tthis.drawQuantity = function() {\n\t\n\t\tvar i = 0;\n\t\tvar q = this.quantity;\n\t\tvar d;\n\t\t\n\t\tif(q == 0) {\n\t\t\ttry {\n\t\t\t\tctx.drawImage(tinyfont, 0, 0, 8, 8, this.position[0] +6, this.position[1] +38, 8, 8);\n\t\t\t} catch (e) {}\n\t\t}\n\t\telse {\n\t\t\t// get number of digits\n\t\t\twhile(q != 0) {\n\t\t\t\t\n\t\t\t\t// get digit\n\t\t\t\td = q % 10;\n\t\t\t\t\n\t\t\t\t// draw\n\t\t\t\ttry {\n\t\t\t\t\tctx.drawImage(tinyfont, d*8, 0, 8, 8, this.position[0]-i*8 +6, this.position[1] +38, 8, 8);\n\t\t\t\t} catch (e) {}\n\t\t\t\t\n\t\t\t\t// iterate\n\t\t\t\tq = ~~(q/10);\n\t\t\t\t++i;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d1a5e2bb510bd60436dcdaf2bfa93da3", "score": "0.6125477", "text": "function Item() {\r\n this.itemType = null; \r\n //Append to variable dictionary\r\n this._variableDict['itemType'] = 'item_type';\r\n}", "title": "" }, { "docid": "e866e04459cf0da83b65e6b83458044a", "score": "0.6114481", "text": "constructor(x, y, hpMod, damageMod, speedMod) {\n super(x, y, 3, hpMod);\n this.bulletCycleTime = 20;\n this.behavior = this.chase;\n this.behaviorParam = [4];\n this.bulletBehavior = this.explosion;\n this.bulletBehaviorParam = [5, 1, 8000, 5, 32, 20];\n this.radius = 10;\n this.symbol = \"C\";\n this.idleSpeedVector = { x: 0, y: 0 };\n this.goldValue = 1;\n }", "title": "" }, { "docid": "b6e23ff4f6e48b8593c0295ea8c6425d", "score": "0.61008847", "text": "constructor(theRoot, audioInterface) {\n // We need the DOM element every time we create a new enemy so we\n // store a reference to it in a property of the instance.\n this.root = theRoot;\n this.audioBoot = audioInterface;\n // We create our hamburger.\n // Please refer to Player.js for more information about what happens when you create a player\n this.player = undefined;\n // Initially, we have no enemies in the game. The enemies property refers to an array\n // that contains ins tances of the Enemy class\n this.enemies = [];\n this.bullets = [];\n this.tomato_bonus = [];\n this.totalScore = 0;\n this.continue = true;\n // We add the background image to the game\n addBackground(this.root);\n }", "title": "" }, { "docid": "5bc3beedb0d85a9ac6cc481eae7f2c32", "score": "0.60936135", "text": "constructor(position, speed, resetPosition) {\n // constructor contains all variables pertinent to creation of redblocks, although not all are used by all the types of redblocks\n this.position = position; // position, standard for all actors\n this.speed = speed; // speed, for moving blocks\n this.resetPosition = resetPosition; // reset, for dripping blocks\n }", "title": "" }, { "docid": "210bae7b2e717ca3b3810f2d88bd6ec0", "score": "0.60922223", "text": "constructor(type, sprite) {\n super(type);\n this.sprite = sprite;\n }", "title": "" }, { "docid": "ed8591f4a962069bf08be9c8a9039592", "score": "0.608682", "text": "function NewEnemy(name, init, playerID, randomImage) {\n this.name = name;\n this.init = init;\n this.playerID = \"#\" + playerID;\n this.img = randomImage;\n \n}", "title": "" }, { "docid": "14413d6dc405032140cb3a2c32337a8c", "score": "0.6083399", "text": "constructor() {\n // X and Y positions\n this.x = 1;\n this.y = 1;\n // Where the artboard starts on X axe (end of the menu)\n this.artboardStartX = 189;\n // Size\n this.dropSize = 100;\n // X and Y velocities\n this.vy = 1;\n this.vx = 1;\n // Time variable\n this.ty = 1;\n // Colors and opacity\n this.redAndGreen = 1;\n this.alpha = 10;\n // Sound properties\n this.amplitude = new p5.Amplitude();\n this.level = 1;\n }", "title": "" }, { "docid": "f86835f860f4d5a64232196711fee960", "score": "0.60764027", "text": "function Player(x,y,w,h,stats,playerID,sprite) {\r\n\tif(stats===undefined) {\r\n\t\tthis.stats = new Stats();\r\n\t}else {\r\n\t\tthis.stats = stats;\r\n\t}\r\n\tthis.playerId;\r\n\tthis.maxHealth = this.stats.hp;\r\n\tthis.health=this.maxHealth;\r\n\tthis.yvel=0;\r\n\tthis.xvel=0;\r\n\tthis.jumps=0;\r\n\tthis.grounded=false;\r\n\tif (h ===undefined){\r\n\t\tthis.HEIGHT=40;\r\n\t}else {\r\n\t\tthis.HEIGHT=h;\r\n\t}\r\n\tthis.height=this.HEIGHT;\r\n\tif (w ===undefined){\r\n\t\tthis.WIDTH=40;\r\n\t}else {\r\n\t\tthis.WIDTH=w;\r\n\t}\r\n\tthis.width=this.WIDTH;\r\n\tthis.dir = 0;\r\n\tthis.exp=0;\r\n\tthis.coins=0;\r\n\tthis.level=1;\r\n\tthis.levelpoints=0;\r\n\tthis.hit=false;\r\n\tthis.interact=false;\r\n\t\r\n\tif(playerID===undefined) {\r\n\t\tthis.playerId = 1;\r\n\t}else {\r\n\t\tthis.playerId = playerID;\r\n\t}\r\n\tthis.jumpstate=-1;\r\n\t//this.wep = Sword();\r\n\tif(x===undefined) {\r\n\t\tthis.x = width/2;\r\n\t}else {\r\n\t\tthis.x= x;\r\n\t}\r\n\tif (y===undefined){\r\n\t\t\r\n\t\tthis.y=height-this.height;\r\n\t}else {\r\n\t\tthis.y = y;\r\n\t}\r\n\tthis.items = [];\r\n\t//gear\r\n\tthis.helmet = 210; //helm1\r\n\tthis.armor = 200; //armor1\r\n\tthis.wep = 50;\t//sword1\r\n\tthis.bow = 100;\t//arrow1\r\n\t//\r\n\t\r\n\tthis.show = function() {\r\n\t\timageMode(CENTER);\r\n\t\tif(this.playerId==0) {\r\n\t\t\tif(this.attack==true){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.xvel==0){\r\n\t\t\t\tlet X = width/100;\r\n\t\t\t\tif (this.dir ==0) {\r\n\t\t\t\t\tcharacterImg = characterImgStill;\r\n\t\t\t\t\tX = -width/100\r\n\t\t\t\t}else {\r\n\t\t\t\t\tX=width/100;\r\n\t\t\t\t\tcharacterImg = characterImgStillR;\r\n\t\t\t\t}\r\n\t\t\t\timage(characterImg,this.x-X,this.y-15,this.width*2.5*width/1600,this.height*2.5*800/height);\r\n\t\t\t}else if(this.dir ==0) {\r\n\t\t\t\timage(characterImgMoving,this.x+width/100,this.y-height/50,this.width*2.5*width/1600,this.height*2.5*800/height);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\timage(characterImgMovingR,this.x-width/100,this.y-height/50,this.width*2.5*width/1600,this.height*2.5*800/height);\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(sprite===undefined) {\r\n\t\t\t\timage(slimeImg,this.x,this.y,this.width*2,this.height*2);\r\n\t\t\t}else {\r\n\t\t\t\timage(sprite,this.x,this.y,this.width*2,this.height*2);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfill(0);//reset color\r\n\t}\r\n\tthis.displayhealth = function() {\r\n\t\tif(this.playerId==0){\r\n\t\t\tfor (var i=0; i<this.health;i++)\r\n\t\t\t\tellipse(10+i*15,10,10,10);\r\n\t\t\tif (this.health <=0) {//played died\r\n\t\t\t\t//console.log(\"you have died\");\r\n\t\t\t\talert(\"You have died\");\r\n\t\t\t\tp1.health=p1.maxHealth;\r\n\t\t\t\tp1.xvel=0;\r\n\t\t\t\tp1.yvel=0;\r\n\t\t\t\tcurrentLevel=0; \r\n\t\t\t\tinit(currentLevel);\r\n\t\t\t\tlevel=currentLevel;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tfill(255,0,0);\r\n\t\t\trectMode(CORNER);\r\n\t\t\ttext(this.level,this.x-this.width,this.y-this.height-height/50)\r\n\t\t\trect(this.x-this.width,this.y-this.height-height/50,this.WIDTH*2,10);\r\n\t\t\tfill(0,255,0);\r\n\t\t\trect(this.x-this.width,this.y-this.height-height/50,this.WIDTH*2*this.health/5,10);\r\n\t\t\tfill(0);//reset colors\r\n\t\t}\r\n\t}\t\r\n\tthis.displayexp = function () {\r\n\t\ttextSize(width/(1600/20));\r\n\t\trectMode(CORNER);\r\n\t\tlet baseExp = 150;\r\n\t\ttext(\"Level \"+this.level,width-width/(1600/250),30);\r\n\t\ttext(\"Skill points available: \"+this.levelpoints,width-width/(1600/600),30);\r\n\t\ttext(\"\"+this.exp+\"/\"+this.level*baseExp,width-width/(1600/130),50);\r\n\t\trect(width-width/(1600/180),height/80,width/(1600/150),height/40);\r\n\t\tfill(0);\r\n\t\tif(this.exp>=this.level*baseExp) {\r\n\t\t\tthis.exp=0;\r\n\t\t\tthis.level++;\r\n\t\t\tthis.levelpoints++;\r\n\t\t}\r\n\t\tfill(255);\r\n\t\trect(width-width/(1600/180),height/80,this.exp/this.level*width/1600,height/40);\r\n\r\n\t\tfill(0);\r\n\t}\r\n\tthis.displaygold = function() {\r\n\t\ttext(\"Gold: \",width-width/(1600/350),height/(800/30));\r\n\t\ttext(this.coins,width-width/(1600/300),height/(800/30));\r\n\t}\r\n\tthis.displayInv = function() {\r\n\t\tvar invImg = 0; \r\n\t\tlet j = 0;\r\n\t\tfor(let i = 0; i< inv.length;i++) {\r\n\t\t\tif(inv[i].id ==1 ){\r\n\t\t\t\tinvImg =potionImg;\r\n\t\t\t}else{\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif (invImg!=0) {\r\n\t\t\t\timage(invImg,width/40+(j*width/40),height-height/15,width/40,width/40);\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tinvImg=0;\r\n\t\t}\r\n\t}\r\n\tthis.inventory = function() {\r\n\t\tfill(255);\r\n\t\trectMode(CENTER);\r\n\t\trect(width/2,height/2,500,500);\r\n\t\tfill(0);\r\n\t\ttext(\"Inventory:\", width/2-240,height/2-225);\r\n\t\t\r\n\t\tlet i=0;\r\n\t\tfor(let i = 0; i< inv.length;i++) {\r\n\t\t\tif(inv[i].id ==1 ){\r\n\t\t\t\tinvImg =potionImg;\r\n\t\t\t}else if(inv[i].id ==100){\r\n\t\t\t\tinvImg =arrowImg;\r\n\t\t\t}else if(inv[i].id ==101){\r\n\t\t\t\tinvImg =arrowImg;\r\n\t\t\t}\r\n\t\t\timage(invImg,width/2-225+i*width/40,height/2-200,width/40,width/40);\r\n\t\t\tif (width/2-225+i*width/40+width/40 >= mouseX\r\n\t\t\t\t&& width/2-225+i*width/40 <= mouseX\r\n\t\t\t\t&& height/2-200+width/40 >= mouseY\r\n\t\t\t\t&& height/2-200 <= mouseY) {\r\n\t\t\t\t\ttext(itemID(inv[i].id),width/2-225+i*width/40,height/2-200)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}\r\n\tthis.showstats = function() {\r\n\t\tfill(255);\r\n\t\trectMode(CENTER);\r\n\t\trect(width/2+500,height/2,500,500);\r\n\t\tfill(0);\r\n\t\ttext(\"Stats:\", width/2-240+500,height/2-225);\r\n\t\ttext(\"Attack: \"+p1.stats.attack, width/2-240+500,height/2-225+50);\r\n\t\ttext(\"Deffence: \"+p1.stats.defence, width/2-240+500,height/2-225+100);\r\n\t\ttext(\"Speed: \"+p1.stats.speed, width/2-240+500,height/2-225+150);\r\n\t\ttext(\"Special: \"+p1.stats.special, width/2-240+500,height/2-225+200);\r\n\t\ttext(\"HP: \"+p1.stats.hp, width/2-240+500,height/2-225+250);\r\n\t}\r\n\tthis.equip = function() {\r\n\t\tfill(255);\r\n\t\trectMode(CENTER);\r\n\t\trect(width/2-500,height/2,500,500);\r\n\t\tfill(0);\r\n\t\ttext(\"Equipment:\", width/2-240-500,height/2-225);\r\n\t\ttext(\"Helmet: \" + itemID(p1.helmet), width/2-240-500,height/2-225+50);\r\n\t\ttext(\"Armor: \" +itemID(p1.armor), width/2-240-500,height/2-225+100);\r\n\t\ttext(\"Weapon: \" + itemID(p1.wep), width/2-240-500,height/2-225+150);\r\n\t\ttext(\"Arrow: \" + itemID(p1.bow), width/2-240-500,height/2-225+200);\r\n\t}\r\n\tthis.bounds = function() {\r\n \t\tif (this.y > height-this.height) {//grounded\r\n\t\t\tthis.y=height-this.height;\r\n\t\t\tif (this.yvel > 30) {\r\n\t\t\t\tthis.health--;\r\n\t\t\t}\r\n\t\t\tthis.yvel=0;\r\n\t\t\tthis.grounded =true;\r\n \t\tthis.jumps=1;\r\n \t\t}else if (this.y/sc< this.height){//ceiling\r\n\t\t\t//this.y=this.height;\r\n\t\t\t//this.yvel=0;\r\n\t\t\t//this.jumps=0;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthis.jumps=0;\r\n\t\t\tthis.grounded=false;\r\n\t\t}\r\n\t\tif (this.x/2>width-this.width) {//right\r\n\t\t\tthis.x=width*sc-this.width-40;\r\n\t\t\tthis.xvel=0;\r\n\t\t\tif (this.playerId==0){\r\n\t\t\t\t//if(confirm(\"Continue to next area?\")) {\r\n\t\t\t\t\tcurrentLevel++;\r\n\t\t\t\t\tthis.x=this.width;\r\n\t\t\t\t\tthis.y=height-this.height;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t}else if (this.x <this.width){//left\r\n\t\t\tthis.x=this.width;\r\n\t\t\tthis.xvel=0;\r\n\t\t\tif (this.playerId==0){\r\n\t\t\t\t//if(confirm(\"Continue to next area?\")) {\r\n\t\t\t\t\tcurrentLevel--;\r\n\t\t\t\t\tthis.x=width*sc-this.width-40;\r\n\t\t\t\t\tthis.y=height-this.height;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t}\r\n\tthis.update = function() {\r\n\t\tif(this.grounded==true){\r\n\t\t\tthis.jumps=1;\r\n\t\t}\r\n\t\tthis.yvel+=grav;\r\n\t\tthis.x+=this.xvel;\r\n\t\tthis.y+=this.yvel;\r\n\t\tif (this.xvel>0) {\r\n\t\t\tthis.dir=0;\r\n\t\t}\r\n\t\telse if (this.xvel<0) {\r\n\t\t\tthis.dir =1;\r\n\t\t}\r\n\t\tthis.bounds();\r\n\t}\r\n\tthis.jump = function() {\r\n\t\tif(this.jumps>0) {\r\n\t\t\tthis.yvel=-this.stats.jmp;\r\n\t\t\tthis.jumps=0;\r\n\t\t\tthis.grounded=false;\r\n\t\t}\r\n\t}\r\n\tthis.addItem = function(Item) {\r\n\t\tthis.item.push(Item);\r\n\t}\r\n\tthis.attack = function(Sword, Player) {\r\n\t\tSword.swing=true;\r\n\t\tSword.collision(Player);\r\n\t}\r\n\tthis.ai = function(Player,type) {\r\n\t\ttype=this.playerId\r\n\t\tif (type ==1) {//(standard following and walking)\r\n\t\t\tif(dist(Player.x,Player.y,this.x,this.y) < 500 ) {//player detected\r\n\t\t\t\tif(Player.x==this.x){\r\n\t\t\t\t\tthis.xvel=0;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.xvel = this.stats.speed*(Player.x-this.x)/abs(Player.x-this.x);\r\n\t\t\t\t}\r\n\t\t\t\tif (this.y-Player.y > 40 && abs(this.x-Player.x) < 200) {\r\n\t\t\t\t\tthis.jump();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthis.xvel=0;\r\n\t\t\t}\r\n\t\t} else if (type ==2) {//slime jumping\r\n\t\t\tif(dist(Player.x,Player.y,this.x,this.y) < 500 || this.jumpstate!=-1) {//player detected\r\n\t\t\t\tif(this.grounded==true) {\r\n\t\t\t\t\tthis.xvel=0;\r\n\t\t\t\t\tif(this.height>this.HEIGHT-5 && (this.jumpstate==0 || this.jumpstate==-1)){\r\n\t\t\t\t\t\tthis.height-=.4;\r\n\t\t\t\t\t\tthis.jumpstate =0;\r\n\t\t\t\t\t}else if(this.height<this.HEIGHT+5){\r\n\t\t\t\t\t\tthis.height+=1;\r\n\t\t\t\t\t\tthis.jumpstate=1;\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tthis.jumpstate=-1;\r\n\t\t\t\t\t\tthis.height=this.HEIGHT;\r\n\t\t\t\t\t\tthis.jump();\r\n\t\t\t\t\t\tif (Player.x==this.x)\r\n\t\t\t\t\t\t\tthis.xvel=0;\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\tthis.xvel = this.stats.speed*(Player.x-this.x)/abs(Player.x-this.x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tif(this.grounded==true) {\r\n\t\t\t\t\tthis.xvel=0;\r\n\t\t\t\t\tthis.height=this.HEIGHT;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} else if (type <=-1) {//npc\r\n\t\t\tif(dist(Player.x,Player.y,this.x,this.y) < 200 ){\r\n\t\t\t\tif(Player.interact) {\r\n\t\t\t\t\tgameState=3;\r\n\t\t\t\t\tNPC = type;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t}\t\r\n\r\n\t}\r\n\tthis.collision = function(Player) {//enemy collisions\r\n\t\tif (Player.playerId>0) {\r\n\t\t\tif (dist(this.x,this.y,Player.x,Player.y) <this.width+Player.width) {\r\n\t\t\t\tif (this.hit==false) {\r\n\t\t\t\t\tthis.health--;\r\n\t\t\t\t\t//Player.health--;\t\t\t\t\r\n\t\t\t\t\tthis.hit=true;\r\n\t\t\t\t\tsetTimeout(function(Player) {\r\n\t\t\t\t\t\tPlayer.hit=false;\r\n\t\t\t\t\t}, 1000,this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "1f0c01a8d9263286f42e24ca574cc065", "score": "0.6071969", "text": "constructor(x, y, hpMod) {\n super(x, y, 2, hpMod);\n this.bulletCycleTime = 840;\n this.behavior = this.noMovement;\n this.bulletBehavior = this.multiShotAimed;\n this.bulletBehaviorParam = [5, 8, 10000, 7, 1.2, 15];\n this.radius = 10;\n this.symbol = \"s\";\n this.movementCycleTime = 500;\n this.idleSpeedVector = { x: 3, y: 3 };\n this.goldValue = 3;\n }", "title": "" }, { "docid": "3e2c66de1c6d5a8611e8913e6097966a", "score": "0.6071575", "text": "function Player() {\n this.x = 350;\n this.y = 480;\n this.sprite = 'build/images/char-boy.png';\n this.lives = 3;\n this.scores = 0;\n}", "title": "" }, { "docid": "f288a15489ca3cf630329a40d7fa9c4e", "score": "0.6069671", "text": "constructor(position, size, mass, sprite){\n super(position, size, mass, sprite);\n }", "title": "" }, { "docid": "8f853a9f56b3628d158c4138216f11f9", "score": "0.60575587", "text": "function Item(type){\n this.type = type;\n this.height = generateDimension(type);\n this.width = generateDimension(type);\n this.speed = this.generateSpeed();\n this.powerType = this.generatePowerType();\n }", "title": "" }, { "docid": "60a3fe59ef47e8556a46b3d7d16baa0c", "score": "0.6056441", "text": "function Player(name, score, itemClass, player, weapon, damage) {\r\n this.name = name;\r\n this.score = score;\r\n this.itemClass = itemClass;\r\n this.player = player;\r\n this.weapon = weapon;\r\n this.damage = damage;\r\n}", "title": "" }, { "docid": "943a34941fc7116d5afc573e15e346de", "score": "0.60516346", "text": "function Cart(item, amount, price) { // <=== ça, c'est le nom de mon objet\n this.item = item; // <=== ceci est une propriété\n this.amount = amount;\n this.price = price;\n}", "title": "" }, { "docid": "1587b32b306a33803cfbbf40a6199f83", "score": "0.6047477", "text": "constructor() {\n this.maps = [\n new Overworld(),\n new firstDungeon(),\n new secondDungeon(),\n new thirdDungeon(),\n new fourthDungeon(),\n new fifthDungeon(),\n new sixthDungeon(),\n new seventhDungeon(),\n new eighthDungeon(),\n new ninthDungeon(),\n ];\n this.inventory = new inventory();\n this.paused = false;\n this.transition = false;\n this.currentMap = this.maps[0];\n }", "title": "" }, { "docid": "890961f5ef551ca6b92eed03f294168e", "score": "0.6042893", "text": "constructor(x, y, speed) {\n super(x, y, speed);\n this.sprite = 'images/char-boy.png';\n }", "title": "" }, { "docid": "5415ac60b7c776fb209734620582a83f", "score": "0.60420704", "text": "function Player() {\n this.cross = 101;\n this.rise = 83;\n this.startPosX = this.cross * 2;\n this.startPosY = (this.rise * 5) - 20;\n this.x = this.startPosX;\n this.y = this.startPosY;\n this.sprite = 'images/char-boy.png';\n}", "title": "" }, { "docid": "05aa01f2f629e0b4ddb6714b2ce8b423", "score": "0.60408205", "text": "constructor(x, y, hpMod) {\n super(x, y, 5, hpMod);\n this.bulletCycleTime = 1000;\n this.behavior = this.noMovement;\n this.bulletBehavior = this.multiShotAimed;\n this.bulletBehaviorParam = [10, 8, 7000 / 2, 7, 3, 15];\n this.radius = 10;\n this.symbol = \"S\";\n this.idleSpeedVector = { x: 0, y: 0 };\n this.goldValue = 2;\n }", "title": "" }, { "docid": "2f22f447e2e1a46600773406e9841ea6", "score": "0.6037965", "text": "function Player(Name, Image, Pokemon) {\n this.Name = Name;\n this.Image = Image;\n this.Pokemon = Pokemon;\n}", "title": "" }, { "docid": "c3c43e7d784c696b5f7d8eadc4a8415d", "score": "0.60354716", "text": "constructor(x, y){\n this.x = x;\n this.y = y;\n this.playerImg = 'images/char-boy.png';\n this.score = 0;\n this.lives = 3;\n }", "title": "" }, { "docid": "1491a221162a7a8e140362b8cb930d76", "score": "0.6026781", "text": "constructor(x, y) {\n //--------------------------------------------------//\n //x, y(integer): where to initially draw the //\n // object on the coordinate plane //\n //--------------------------------------------------//\n //h, w(integer): height and width of the object //\n // in pixels //\n //lives(integer): how many lives the player has //\n //ammo(integer): starting ammo of the player //\n //sprites(array[Sprite]): sprites for the default //\n // animation of the ship //\n //fire(array[Sprite]): sprites for the firing //\n // animation //\n //death(array[Sprite]): sprites for the death //\n // animation of the ship //\n //colliders(array[array]): objects to test for //\n // collisions //\n //currentAnimation(array[Sprite]): the animation //\n // sequence that is currently being animated //\n //shot(boolean): whether or not the player's ship //\n // has fired //\n //--------------------------------------------------//\n\n super(x, y);\n this.w = 32;\n this.h = 32;\n this.lives = 3;\n this.ammo = 100;\n this.sprites = Sprite.load(0, 0, 32, 32, \"right\", 4);\n this.fire = Sprite.load(0, 32, 32, 32, \"right\", 4);\n this.death = Sprite.load(0, 192, 32, 32, \"right\", 5);\n this.colliders = [enemies, enemyShots];\n this.currentAnimation = this.sprites;\n this.shot = false;\n }", "title": "" }, { "docid": "a187c653dce50e13828df090c6e34635", "score": "0.6025225", "text": "constructor(x, y) {\n super(x, y, \"squirrel\");\n this.spritesheet = AM.getAsset(\"./img/squirrel.png\");\n this.w = 48;\n this.h = 48;\n this.attackSpeed = 1;\n this.scale = 1.5;\n this.color = \"orange\";\n this.defineAnimations();\n this.animation = this.left;\n this.lastReproduceCooldown = 5;\n }", "title": "" }, { "docid": "f0d24390d24df9d0a4eb1da7c0d5edfa", "score": "0.60200185", "text": "function Anim() {\n Item.call(this);\n}", "title": "" }, { "docid": "11551186211750e31bc0976289aaa131", "score": "0.6018997", "text": "constructor() {\n\t\tsuper();\n\t\t//Used as a counter to spawn enemies at consistent times\n\t\tthis.enemyTimer = 0\n\t\t//Used to determine if the player is able to file a projectile\n\t\tthis.projectileReady = false\n\n\t\t// bind the input handler to this object\n\t\tthis.input_handler = new InputHandler(this);\n\n\t\t// we always want our new players to be at this location\n\t\tthis.position = {\n\t\t\tx: config.canvas_size.width / 2,\n\t\t\ty: config.canvas_size.height - 100\n\t\t};\n\n\t\tthis.color = '#90EE90'\n\t\tthis.hit = 0\n\t\t\n\t\t//Gives an array of all enemies and projectiles that are currently\n\t\t//on the board\n\t\tthis.enemies = []\n\t\tthis.projectiles = []\n\t}", "title": "" }, { "docid": "ae10f359ee6ee617478ba92513d31cec", "score": "0.6003821", "text": "constructor(x, y) {\n super(x, y);\n this.sprites = Sprite.load(0, 64, 32, 32, \"right\", 4);\n this.death = Sprite.load(0, 96, 32, 32, \"right\", 4);\n this.colliders = [shots];\n this.currentAnimation = this.sprites;\n }", "title": "" }, { "docid": "1f3cda8b2bdea95edf025fcfe3da698b", "score": "0.5998738", "text": "constructor() {\n super(config.Game.ASSETS.getResult(\"Player\"));\n this.Start();\n }", "title": "" }, { "docid": "3855f4ff1ecd60ee17a8017f27c5fbcb", "score": "0.599725", "text": "function Item(name, price){\n this.name = name;\n this.price = price;\n}", "title": "" }, { "docid": "13fd8b914af9701b9fc24abdefaaf090", "score": "0.5996612", "text": "constructor(x, y, hpMod) {\n super(x, y, 8, hpMod);\n this.bulletCycleTime = 1000;\n this.behavior = this.noMovement;\n this.bulletBehavior = this.multiShotCircular;\n this.bulletBehaviorParam = [5, 3, 7000 / 2, 7, 8];\n this.radius = 15;\n this.symbol = \"Turret\";\n this.idleSpeedVector = { x: 0, y: 0 };\n this.goldValue = 2;\n }", "title": "" }, { "docid": "c72c3e60de8b8a082c2713dbe0b70545", "score": "0.5992232", "text": "constructor(position, speed) {\n // the player constructor create the position and the speed of the player both values that are constantly updated and available at low latency in the form of classes\n this.position = position; // the current position of the player, in the form of a player\n this.speed = speed; // the current speed of the player, both vertical and horizontal\n }", "title": "" }, { "docid": "3c908462d75a933602579d8994f3f549", "score": "0.59907436", "text": "function Item(name) {\n this.name = name;\n}", "title": "" }, { "docid": "9423f7a096e9cfce7e42f0276e8d9d77", "score": "0.5978077", "text": "constructor()\n {\n this.items = [];\n }", "title": "" }, { "docid": "d0d73e38f9ef76b4615305c471f4e365", "score": "0.59777206", "text": "constructor(x, y, speed) {\n super(x, y, speed);\n this.sprite = 'images/enemy-bug.png';\n }", "title": "" }, { "docid": "05f5ef916d46c4490d7e0f2e7c077867", "score": "0.5972662", "text": "construct_player() {\n this.player = new Player(this);\n this.player.x = 800;\n this.player.y = 480;\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 }", "title": "" }, { "docid": "d13c989a97e3621da67fd5d6963df477", "score": "0.59586525", "text": "constructor(x, y, hpMod, damageMod, speedMod) {\n super(x, y, 10, hpMod);\n this.bulletCycleTime = 20;\n this.behavior = this.chase;\n this.behaviorParam = [5];\n this.bulletBehavior = this.superExplosion;\n this.bulletBehaviorParam = [5, 2, 5000, 5, 32, 40, 3];\n this.radius = 10;\n this.symbol = \"sc\";\n this.idleSpeedVector = { x: 0, y: 0 };\n this.goldValue = 3;\n }", "title": "" }, { "docid": "cd9e611db6fc03d0736ccbcf85a3ce60", "score": "0.5953249", "text": "function MenusItems(name,price,description) { \n this.name =name;\n this.price = price;\n this.description = description;\n}", "title": "" }, { "docid": "06126fc84cbc2f6b5e66f8c7d8047cc5", "score": "0.5952627", "text": "constructor(sprite, speed, x, y){\n\n // Inherited from the super class\n super(sprite, x, y);\n\n // The speed of the enemy added to the inherited variables from the base class\n this.speed = speed;\n }", "title": "" }, { "docid": "71b133da6a5a2e60875879e4e0245037", "score": "0.59449345", "text": "function BattleChainSprite() {\r\n this.initialize.apply(this, arguments);\r\n}", "title": "" }, { "docid": "c3cbe688f6be61e6a7ffae6b38b282b6", "score": "0.5944185", "text": "function Player(descr) {\n\n // Common inherited setup logic from Entity\n this.setup(descr);\n\n this.rememberResets();\n\n // Default sprite, if not otherwise specified\n this.sprite = this.sprite || g_sprites.player;\n\n}", "title": "" }, { "docid": "2c06640e84a1705de968f04491c03c3e", "score": "0.5941845", "text": "function Player(){\n\tthis.paddle = new Paddle(175, 580, 50, 10);\n}", "title": "" }, { "docid": "61b381c534144faa1433b6aefac7daf6", "score": "0.5936908", "text": "constructor(playerAccount){\n this._baseStatNum = 10;\n this._stats = {\n str: 0,\n dex: 0,\n int: 0,\n char: 0,\n apt: 0,\n con: 0\n };\n\n this._character = playerAccount.character;\n this._animations = [];\n this._class = new PlayerClass(this._character.archetype);\n this._race = new PlayerRace(this._character.race);\n\n this._items = {\n\n };\n\n /*this should call the account to see what has been saved to his inventory*/\n this.skills = [];/*this should call the account to see what skill IDs the account has available*/\n\n\n this._age = {};\n\n this._model = {};\n\n }", "title": "" }, { "docid": "9c6a22b4ed2aa8b8d52a50793964d4c7", "score": "0.5936157", "text": "constructor(ItemArray=[],size=0){\n\t\t//\tItemArray: Array of Item objects. Will be inserted into the Inventory\n\t\t//\t\tduring construction.\n\t\t//\tsize: Integer. Determines the maximum number of item stacks\n\t\t//\t\tthe Inventory is allowed to hold. If Inventory is full, new items\n\t\t//\t\tcannot be picked up. (see addItem in methods)\n\t\t//\t\tSet <= 0 to create a limitless Inventory.\n\n//\t\tconsole.log(\"constructing Inventory, ItemArray:\"); console.log(ItemArray);\n\t\tif (typeof(ItemArray) === \"object\" && !(ItemArray instanceof Array)) {\n\t\t\t// clone branch\n\t\t\tsuper(0);\n\t\t\tObject.keys(ItemArray).forEach(prop => this[prop] = clone(ItemArray[prop]));\n\t\t} else if (ItemArray instanceof Array) {\n\t\t\t// standard branch\n\t\t\tsuper(0);\n\t\t\tconsole.assert(size <= 0 || ItemArray.length <= size,`ERROR constructing Inventory: ItemArray must not exceed size`);\n\t\t\tItemArray.forEach(function(item){\n\t\t\t\tthis.push(item);\n\t\t\t},this);\n\t\t\tconsole.assert(Number.isInteger(size),`ERROR constructing Inventory: size must be integer`);\n\t\t\tthis.size = size;\n\t\t} else {\n\t\t\t// failsafe, should never execute\n\t\t\tsuper(0);\n\t\t\tconsole.log(`Inventory constructor: something unexpected happened. Echo:`);\n\t\t\tconsole.log(ItemArray);\n\t\t}\n\t}", "title": "" }, { "docid": "fff4a9d0d36b6162b54708923d1c63ed", "score": "0.5935802", "text": "constructor(w, h, ctx, keys) {\n\n //--total canvas sizes--//\n this.canvasW = w;\n this.canvasH = h;\n\n //--basic player image creation--//\n this.ctx = ctx;\n this.keys = keys;\n this.img = new Image();\n this.img.src = \"imgs/player_1-01ani-01.png\";\n\n //--original player position--//\n this.x0 = this.canvasW * 0.45;\n this.y0 = this.canvasH * 0.80;\n\n //--player position--//\n this.x = this.x0\n this.y = this.y0;\n\n //--player animation frames--//\n this.img.frames = 3;\n this.img.frameIndex = 0;\n\n //--player dimensions--//\n this.w = 70;\n this.h = 70;\n\n //--movement velocity--//\n this.vy = 1;\n this.vx = 1;\n\n //--bullets array--//\n this.bullets = [];\n\n //--keyPress array--//\n //this.keyPress = undefined;\n this.keyPress = []\n this.keyCode = [];\n this.freezeFrameUp = false;\n this.freezeFrameDown = false;\n\n }", "title": "" }, { "docid": "7fa29f1b0951084e27fbb54ab984697d", "score": "0.59326106", "text": "function Item(){\n\t// Sort of abstract func\n\tthis.addToDocument = function(){\n\t\tdocument.body.appendChild(this.item);\n\t}\n\tthis.addTo = function(node){\n\t\tnode.item.appendChild(this.item);\n\t}\n}", "title": "" }, { "docid": "0e2a27d8f5c5d39dc7993ab4e1cab94d", "score": "0.59208393", "text": "constructor(x, y, hpMod) {\n super(x, y, 5, hpMod);\n this.bulletCycleTime = 100;\n this.behavior = this.cycle;\n this.behaviorParam = [{\n behaviors: [this.noMovement, this.keepDistance],\n behaviorParams: [[], [5, 30]],\n behaviorCycleTimes: [1500, 1500]\n }];\n this.bulletBehavior = this.multiShotAimed;\n this.bulletBehaviorParam = [1, 10, 100, 4, 5, 10];\n this.radius = 10;\n this.symbol = \"b\";\n this.idleSpeedVector = { x: 2, y: 2 };\n this.goldValue = 4;\n }", "title": "" }, { "docid": "3e26bb8d02f77712513ffc07677bc288", "score": "0.5920108", "text": "function _player_class(attributes) {\n\tthis.name = (attributes.name || \"guest\");\n\tthis.status = \"ACTIVE\"\n\tthis.resources = new Array();\n\n\t/**\n\t * bla bla\n\t *\n\t * @public\n\t * @static\n\t * @function\n\t * @param resource bla bla\n\t */\n\tthis.add_resource = function(resource) {\n\t\tthis.resources[this.resources.length] = jQuery.extend(true, {}, resource);\n\t}\n\n\tthis.kill = function() {\n\t\tthis.status = \"INACTIVE\"\n\t}\n\n\tthis.get_resources = function(type) {\n\t\tvar a = new Array\n\t\tfor(var r in this.resources) {\n\t\t\tif(this.resources[r].type == type) {\n\t\t\t\ta[a.length] = this.resources[r];\n\t\t\t}\n\t\t}\n\t\treturn a\n\t}\n\n\tthis.pop_resource = function() {\n\t\treturn this.resources.splice(0, 1)[0];\n\t}\n\n\tthis.kill_resource = function() {\n\t\treturn this.resources.splice(0, 1)[0];\n\t}\n}", "title": "" }, { "docid": "0a41339f78666094faab00662631417e", "score": "0.59174734", "text": "constructor(x, y, sprite = 'images/enemy-bug.png') {\n super(x, y, sprite);\n this.speed = generateSpeed();\n }", "title": "" } ]
d564fca7cb7c74b7f88515e371f504a6
"Unit House" with height equal to 1
[ { "docid": "202fd9a00514c199540eb432d314add2", "score": "0.0", "text": "constructor(scene, face_text, body_text, wings_text, nose_text, eyes_text, tail_text, legs_text) {\n super(scene);\n \n this.scene = scene;\n this.face_text = face_text;\n this.body_text = body_text;\n this.wings_text = wings_text;\n this.nose_text = nose_text;\n this.eyes_text = eyes_text;\n this.tail_text = tail_text;\n this.legs_text = legs_text;\n\n this.face = new MySemiSphere(scene, 20, 0.6, 5); //scene, slices, radius, stacks\n this.body = new MyPrism(scene, 10, 1, 0.4); //scene, slices, height, radius\n this.wings = new MyBirdWings(scene);\n this.nose = new MyPyramid(scene, 4, 1, 1); //scene, slices, height, radius\n this.eyes = new MyUnitCubeQuad(scene, eyes_text, body_text, body_text);\n this.tail = new MyBirdTail(scene, 4);\n this.legs = new MyBirdLegs(scene, 0.5);\n \n this.branch = undefined;\n\n //Initial position coordinates\n this.init_x = -20;\n this.init_y = 15;\n this.init_z = 10;\n\n //Initial movement parameters\n this.init_speed = 0;\n this.init_y_speed = 0;\n //Speed limits\n this.min_speed = 0; \n this.max_speed = 5;\n\n //Time var's\n this.delta_time = 0;\n this.init_time = 0;\n this.total_time = 0;\n\n //Initial Directional parameter\n this.init_direction_angle = 0;\n //Directional parameters\n this.angle_change = (10*Math.PI) / 180; //6º (degrees)\n \n //Inititalize all variables\n this.init();\n \n //Set all initial textures\n this.setTextures();\n this.counter = 0;\n this.pos = 0;\n }", "title": "" } ]
[ { "docid": "f5f67a93521956440a79e5d17c96af67", "score": "0.6513821", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n }", "title": "" }, { "docid": "f5f67a93521956440a79e5d17c96af67", "score": "0.6513821", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n }", "title": "" }, { "docid": "b3c1884cff38e854980aefbf389707a5", "score": "0.64841795", "text": "function House(numBedrooms) {\n\tthis.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "8ee4801a030f8ecbb87b50c690511035", "score": "0.6425349", "text": "function House(bedrooms, bathrooms, numSqft) { // name of constructor House is capitalized by convention\n this.bedrooms = bedrooms;\n this.bathrooms = bathrooms;\n this. numSqft = numSqft;\n}", "title": "" }, { "docid": "9fbeffb5abcc9747f46269557946ebe5", "score": "0.6396217", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "9fbeffb5abcc9747f46269557946ebe5", "score": "0.6396217", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "9fbeffb5abcc9747f46269557946ebe5", "score": "0.6396217", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "9fbeffb5abcc9747f46269557946ebe5", "score": "0.6396217", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "9fbeffb5abcc9747f46269557946ebe5", "score": "0.6396217", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "9fbeffb5abcc9747f46269557946ebe5", "score": "0.6396217", "text": "function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}", "title": "" }, { "docid": "23b0dc5fee8aa22846b10d3c56b5d96a", "score": "0.6290947", "text": "function House(bedrooms, bathrooms, numSqft) {\n //1. var this = {};\n this.bedrooms = bedrooms;\n this.bathrooms = bathrooms;\n this.numSqft = numSqft;\n //3. return this\n}", "title": "" }, { "docid": "b71a7c8d49cc23a3a48906de7adef547", "score": "0.6030204", "text": "function waterArea(heights) {\n\n}", "title": "" }, { "docid": "6bf3035ddb61b6ae67664883d5362b3b", "score": "0.6018959", "text": "function House (stories, material) {\n this.stories = stories;\n this.material = material;\n}", "title": "" }, { "docid": "eff46aba8fb14f5e1d842c44b279f56a", "score": "0.5961567", "text": "function getHeight() {\n return 2;\n }", "title": "" }, { "docid": "f038681c4a4fe81a42dc2daa2c2e5aab", "score": "0.59340364", "text": "set height(value) {}", "title": "" }, { "docid": "f038681c4a4fe81a42dc2daa2c2e5aab", "score": "0.59340364", "text": "set height(value) {}", "title": "" }, { "docid": "f038681c4a4fe81a42dc2daa2c2e5aab", "score": "0.59340364", "text": "set height(value) {}", "title": "" }, { "docid": "3b0c1d4ce77ab5b79808ce2bdd15e7a8", "score": "0.58127844", "text": "get area() { return this.height * this.width; }", "title": "" }, { "docid": "42be5d69da7994c868f8536ee656ddb3", "score": "0.5811557", "text": "getBottomUnit(){return this.__bottomUnit}", "title": "" }, { "docid": "bfd69f4d2f8eb4565c85e26c1f1e69cf", "score": "0.5791354", "text": "function wierd() {\n\theight = 50;\n\treturn height;\n}", "title": "" }, { "docid": "b990217d081bf83c4b60e29d2ae35064", "score": "0.5774245", "text": "function House(color, address) {\n this.color = color;\n this.address = address;\n}", "title": "" }, { "docid": "34e84499dc8c44eb42adc272651e4bb8", "score": "0.5753264", "text": "function getAreaOfSquare (length,height) {\n const square = length * height;\n return square;\n }", "title": "" }, { "docid": "7fdbf55ceb82200785055936b0bc544b", "score": "0.574341", "text": "function five(width, height) {\n let area = width * height / 2;\n return area;\n}", "title": "" }, { "docid": "2df4e8adb150ee9417b882c1cc447290", "score": "0.5736556", "text": "function house2() {\n circle(width / 2, height, 350);\n for (i = 350; i > 0; i = i - 5) {\n fill(0, 10, i - 60)\n circle(width / 2, height, i);\n }\n fill(0, 15, 20)\n ellipse(width / 2 - 40, height, 100, 180)\n circle(width / 1.5 - 60, height - 70, 50)\n}", "title": "" }, { "docid": "b8b8e2bd02e887dbb9ac73b3be58235a", "score": "0.57312703", "text": "function house() {\n circle(width / 4, height, 250);\n for (i = 250; i > 0; i = i - 5) {\n fill(i - 20, 21, 21)\n circle(width / 4, height, i);\n }\n fill(0, 15, 20)\n ellipse(width / 3, height, 100, 180)\n circle(width / 4 - 40, height - 70, 50)\n}", "title": "" }, { "docid": "287eb39e8286ed308b19cef4b07fba8f", "score": "0.5720769", "text": "function Areaofcrectangel(width,height){\n var A=width*height;\n return A;\n}", "title": "" }, { "docid": "701c4f98d8baa9a68386ea7b0e66185f", "score": "0.57061297", "text": "get height() {}", "title": "" }, { "docid": "701c4f98d8baa9a68386ea7b0e66185f", "score": "0.57061297", "text": "get height() {}", "title": "" }, { "docid": "701c4f98d8baa9a68386ea7b0e66185f", "score": "0.57061297", "text": "get height() {}", "title": "" }, { "docid": "69fe8376b18f4957bc70a2b0554569dc", "score": "0.5705565", "text": "function getSizeBrutal(unit, element) {\n var testDIV = document.createElement('div')\n testDIV.style['height'] = '128' + unit\n element.appendChild(testDIV)\n var size = getPropertyInPX(testDIV, 'height') / 128\n element.removeChild(testDIV)\n return size\n}", "title": "" }, { "docid": "99497d0838a701f224a7bfdf274b5f22", "score": "0.56885254", "text": "function area(h, w) {\n\treturn h > 0 && w > 0 ? h * w : -1;\n}", "title": "" }, { "docid": "15e155fde2499a430c0b218f9567af20", "score": "0.5684923", "text": "function drawSquareSideHouse() {\n moveForward(50);\n turnRight(90);\n}", "title": "" }, { "docid": "a7769cf522de9e7b0407846003f5ebd1", "score": "0.5672739", "text": "get area() {\n return this.h * this.w;\n }", "title": "" }, { "docid": "ddb149e019ba64f0141fce35f6c1a540", "score": "0.5665287", "text": "function drawHouse(x, y, s) {\n\n // Save the previous transformation.\n push();\n\n // Move to the x, y position and scale.\n translate(x, y);\n scale(s, s);\n\n // Draw the wall, roof and door.\n fill(255);\n rect(0, 0, 100, 100);\n fill(red);\n triangle(-60, -50, 60, -50, 0, -110);\n fill(yellow);\n rect(0, 10, 30, 80);\n\n // Draw windows\n drawWindow(-30, -15);\n drawWindow(30, -15);\n drawWindow(0, -15);\n\n // Reset the drawing to where we were before drawing.\n pop();\n}", "title": "" }, { "docid": "45d7c6044f862bb3400ecd9df61d570a", "score": "0.5637044", "text": "constructor(height, weight) {\n this.height = height;\n this.weight = weight;\n\n }", "title": "" }, { "docid": "362575a39265a1c6711ce498006ca37e", "score": "0.5630423", "text": "area() {\n return this.base * this.height;\n }", "title": "" }, { "docid": "16fb1fd1ba4d9a942509fe0be12e7f40", "score": "0.55938107", "text": "function triArea(base, height) {\nreturn base * height;\n}", "title": "" }, { "docid": "228e4073311838e19ae8918997b8e051", "score": "0.5574795", "text": "surfaceArea () {\n\t\tconsole.log(\"I am inside of the cubeMaker\");\n\t\treturn (this.length * this.length)*6;\n\t}", "title": "" }, { "docid": "b8f6f773d0c743c4c79334a54a5d34be", "score": "0.5560816", "text": "function colorHouse(red, green, blue) {\n //random color is assigned so all houses are unique\n penRGB(red, green, blue, 1);\n penWidth(6.5);\n drawSquare();\n}", "title": "" }, { "docid": "5a5d2f806a1869fe3d2463790171b4b3", "score": "0.55517524", "text": "function makeSquare(){\n\telements = $('.js-square');\n\t\n\tif (elements !== null){\n\t\n\t\tArray.prototype.forEach.call(elements, function(el, i){\n\t\t\tel.style.height = el.offsetWidth+'px';\n\t\t});\n\t}\n}", "title": "" }, { "docid": "57890f83763aa89c41c0a2d6e9ebed1d", "score": "0.55339897", "text": "function O_obstycle (w,h) {//class for obstycle\n this.O_x =width;\n this.O_y =height/2;\n this.O_width=w;\n this.O_height=h;\n }", "title": "" }, { "docid": "5064eee910162a2e2ddc7feb572ade7f", "score": "0.5519832", "text": "function drawStructure() {\n //draws one side of the square, four times in a row\n drawSquareSideHouse();\n drawSquareSideHouse();\n drawSquareSideHouse();\n drawSquareSideHouse();\n}", "title": "" }, { "docid": "7f4de8f193c1555e9de7d9ab21501d33", "score": "0.55077964", "text": "function trianguleArea(base, height){\n return (base * height)/2;\n}", "title": "" }, { "docid": "42526966e7f842f1d10ff39e3fd72b1b", "score": "0.55054474", "text": "function calculateArea() {\n return width * height;\n }", "title": "" }, { "docid": "419641f750480c6dc87bb860a467edec", "score": "0.5504089", "text": "function totalHeight(people) {\n}", "title": "" }, { "docid": "6b7694a9dd39ea19b5fd2c313d245642", "score": "0.54897046", "text": "function getHeight() {\n\n\t}", "title": "" }, { "docid": "91c8be4cbbaf6f14e0dcd77505bac0ca", "score": "0.54684347", "text": "constructor(h, w) { \n this.height = h;\n this.width = w;\n }", "title": "" }, { "docid": "e37a0a609c8d827eac5646327fa53bda", "score": "0.54654735", "text": "function triArea(base, height) {\r\n\tlet area = base * height / 2;\r\n console.log(area);\r\n}", "title": "" }, { "docid": "919d91d0c997f68afd66faf968c92ea9", "score": "0.546542", "text": "function MooreNeighbourhood() {}", "title": "" }, { "docid": "b0cc92147ac7803df8e7715c68a419dc", "score": "0.54653865", "text": "getHeight(){ return this.height }", "title": "" }, { "docid": "d03184092dedb0d93739d5f94e7d8bd2", "score": "0.54643315", "text": "areaWallCalc() {\n return this.length * this.height + this.width * this.height;\n }", "title": "" }, { "docid": "92f3de2a1ecd5716b01bf3009802c75f", "score": "0.54614264", "text": "function getArea(width, length, unit) {\n var area = width * length;\n return area + '' + unit;\n}", "title": "" }, { "docid": "bbf367bb4d1014c87ec53088c7801f58", "score": "0.5457235", "text": "function showHouse(house) {\n\n // create new HTML elements that will be needed\n let section = document.createElement('section');\n let heading = document.createElement('p');\n let image = document.createElement('img');\n let area = document.createElement('p');\n let capacity = document.createElement('p');\n let year_built = document.createElement('p');\n\n heading.innerHTML=house.item_name;\n\n // give the <h4> textContent equal to the house \"name\" property\n // added link to floorplan here\n /*heading.innerHTML = \"<a href='\"+house.floor_plan+\"' target='_blank' class='houseName'>\"+house.name+\"</a>\";\n\n // set the src of the <img> element to the ObjectURL, set\n // the alt to the house \"name\" property\n image.src = objectURL;\n image.alt = house.name;\n\n // add contextual information about the house: area, year built, capacity\n area.className = \"areaOfCampus\";\n area.innerHTML = '<span class=\"label\">area: </span>' +house.area;\n\n year_built.className = \"year\";\n year_built.innerHTML = '<span class=\"label\">year built: </span>' +house.year_built;\n\n capacity.className = \"cap\";\n capacity.innerHTML = '<span class=\"label\">capacity: </span>'+house.capacity;*/\n\n //append the elements to the DOM so the house displays\n index = (index + 1)%3\n columns[index].appendChild(section);\n // section.appendChild(image);\n section.appendChild(heading);\n section.append(area);\n section.append(year_built);\n section.append(capacity);\n }", "title": "" }, { "docid": "eb83520e00be02c858e90d19bbd3e28f", "score": "0.54449946", "text": "function Plant () {\n\tthis.height = 0;\n}", "title": "" }, { "docid": "a4073b4985e91ce274ae9b88e785e81c", "score": "0.5438854", "text": "function makeSquare() {\n container.style.width = '350px';\n container.style.height = '350px';\n container.style.borderRadius = '0%';\n title.textContent = 'SQUARE'\n}", "title": "" }, { "docid": "4a462c2aeb98d7d429ce3285807281b6", "score": "0.54384196", "text": "getHeight(){return this.__height}", "title": "" }, { "docid": "95c364dcac0e52a756937b6654389f9e", "score": "0.5421183", "text": "get Height() { return this._height; }", "title": "" }, { "docid": "ef064d705f551ba648deaa96811bd75a", "score": "0.540522", "text": "constructor(height, width){\n\t\tthis.height = height;\n\t\tthis.width = width;\n\t\tthis.board = [];\n\t\tvar h2 = Math.round(height/2);\n\t\tvar w2 = Math.round(width/2);\n\t\tfor(let i=0; i<this.height; ++i){\n\t\t\tlet tmp = [];\n\t\t\tfor(let j=0; j<this.width; ++j){\n\t\t\t\tif(i == (h2-1) && j == (w2-1)){\n\t\t\t\t\ttmp.push(0);\n\t\t\t\t}\n\t\t\t\telse if(i == h2 && j == (w2-1)){\n\t\t\t\t\ttmp.push(1);\n\t\t\t\t}\n\t\t\t\telse if(i == (h2-1) && j == w2){\n\t\t\t\t\ttmp.push(1);\n\t\t\t\t}\n\t\t\t\telse if(i == h2 && j == w2){\n\t\t\t\t\ttmp.push(0);\n\t\t\t\t}else{\n\t\t\t\t\ttmp.push(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.board.push(tmp);\n\t\t}\n\t}", "title": "" }, { "docid": "7b184f2f5caceb77a08c9932dd0d8f60", "score": "0.5390056", "text": "get area() {\n //return this.width * this.height;\n //Another option: \n return this.width * this.units[this.default] * this.height * this.units[this.default];\n }", "title": "" }, { "docid": "47989aee737b0d0e67260960a07f9a05", "score": "0.53811544", "text": "function undistributeHeight(els){els.height(\"\")}", "title": "" }, { "docid": "dd942ca444965eb7fdddae1e06508482", "score": "0.5367578", "text": "constructor(name, height) {\n this.name = name\n this.height = height\n}", "title": "" }, { "docid": "f5845960034c16e4a936a8c8a322396f", "score": "0.5361004", "text": "function CreateHouse(position, scale) {\n scene.add(CreateTexturedCube(position, scale, \"images/bricktexture_2.jpg\"));\n scene.add(CreateDoor(new Vector3(position.x, 10, position.z - scale), new Vector2(10, 20), \"images/doortexture.png\"));\n scene.add(CreateCustomRoof(position, new Vector2(scale, scale), \"images/rooftexture_2.jpg\"));\n}", "title": "" }, { "docid": "402d501cbb240786286cf0411a37bd50", "score": "0.53601104", "text": "function HouseView(){}", "title": "" }, { "docid": "5d34990ff0f9257e8848c78158db35f2", "score": "0.53578556", "text": "function drawHouse(red, green, blue) {\n //revise each function to ONLY draw what it needs to draw (no extra lines)\n drawStructure();\n drawRoof();\n drawDoor();\n drawWindowLeft();\n drawWindowRight();\n drawChimney();\n colorHouse(red, green, blue);\n //faces the turtle upward, ready to draw next house\n turnTo(0);\n}", "title": "" }, { "docid": "9d44c6987f0f94e4d3bb6c8523112c22", "score": "0.53521943", "text": "get height() {\n return this.north.distanceTo(this.south.value, false);\n }", "title": "" }, { "docid": "83b032cd082253697ab4d5ab597c5d76", "score": "0.53356934", "text": "function calcArea(w, h){ //w=30, h=20\n //parenthesis above bins that will contain information- storage containers\n var area = w * h;\n console.log(area);\n}", "title": "" }, { "docid": "5409500065ce8c61316174359f02d7ce", "score": "0.5330191", "text": "function main (params) {\r\n var _d = params.drawer_depth + params.house_tolerance + params.house_thickness;\r\n\r\n var body = createHanger().translate([-10,-_d/2,0]);\r\n\r\n return [body, body.mirroredX().translate([0,0,0])];\r\n\r\n function createHanger() {\r\n var w = params.house_lugShortSideLen;\r\n var ih = params.house_lugInnerHoleLen;\r\n var il = params.house_lugLongSideLen;\r\n var d = _d;\r\n var h = 4;\r\n \r\n var p = polygon([[0,0],[-w,0],[-w,d],[0,d]]);\r\n var hanger = linear_extrude({height:h},p);\r\n\r\n //https://arthursonzogni.com/Diagon\r\n // x \r\n // xOffset = --------------\r\n // / /d\\\\\r\n // sin |atan |-||\r\n // \\ \\m//\r\n // x: the thickness of the first diagonal support\r\n //-----------------------------------------------------------\r\n // x \r\n // yOffset = -------------------\r\n // / /d\\\\\r\n // sin |90 - atan |-||\r\n // \\ \\m//\r\n // x: the thickness of the first diagonal support\r\n var x = 4;\r\n\r\n var xOffset = x/(Math.sin(Math.atan((d-4)/(26-w))));\r\n var yOffset = x/(Math.sin(Math.PI/2 - Math.atan((d-4)/(26-w))));\r\n p = polygon([[-26,4],[-w,d],[-w,d-yOffset],[-26+xOffset,4]]);\r\n hanger = union(hanger,linear_extrude({height:2.6},p));\r\n \r\n xOffset = x/(Math.sin(Math.atan(((d/3)-4)/(26-w))));\r\n yOffset = x/(Math.sin(Math.PI/2 - Math.atan((d/3-4)/(26-w))));\r\n p = polygon([[-26,4],[-w,d/3],[-w,d/3 - yOffset],[-26+xOffset,4]]);\r\n hanger = union(hanger,linear_extrude({height:2.6},p));\r\n\r\n p = square(ih).translate([-ih-(w-ih)/2,il-w+(w-ih)/2]);\r\n hanger = difference(hanger, linear_extrude({height:h},p));\r\n p = square(ih).translate([-ih-(w-ih)/2,d-(w+ih)/2]);\r\n hanger = difference(hanger, linear_extrude({height:h},p));\r\n\r\n //return p;\r\n //return hanger;\r\n return union(hanger, hangerObject());\r\n }\r\n\r\n function hangerObject() { \r\n return union(\r\n // objects: 1\r\n // object #undefined: triangles: 572\r\n polyhedron({ points: [\r\n [0,-1.1102230246251565e-15,4],\r\n [-3,4,4],\r\n [0,4,4],\r\n [-3,-5.551115123125783e-16,4],\r\n [-3,4,4],\r\n [0,-1.1102230246251565e-15,4],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [0,4,9.959693973479841e-16],\r\n [-26,4,4.712057414586355e-15],\r\n [0,0,0],\r\n [0,4,9.959693973479841e-16],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-3.335893392562866,-3.120053008051708e-16,4.018863201141357],\r\n [-3,4,4],\r\n [-3,-5.551115123125783e-16,4],\r\n [-3.335893392562866,4,4.018863201141357],\r\n [-3,4,4],\r\n [-3.335893392562866,-3.120053008051708e-16,4.018863201141357],\r\n [-3.66756272315979,-2.708027065749654e-16,4.075216293334961],\r\n [-3.335893392562866,4,4.018863201141357],\r\n [-3.335893392562866,-3.120053008051708e-16,4.018863201141357],\r\n [-3.66756272315979,4,4.075216293334961],\r\n [-3.335893392562866,4,4.018863201141357],\r\n [-3.66756272315979,-2.708027065749654e-16,4.075216293334961],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [-3.66756272315979,4,4.075216293334961],\r\n [-3.66756272315979,-2.708027065749654e-16,4.075216293334961],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-3.66756272315979,4,4.075216293334961],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [-4.3016510009765625,-2.2045148153503378e-16,4.297093391418457],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [-4.3016510009765625,4,4.297093391418457],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-4.3016510009765625,-2.2045148153503378e-16,4.297093391418457],\r\n [-4.596096038818359,-2.1193606079293928e-16,4.459827423095703],\r\n [-4.3016510009765625,4,4.297093391418457],\r\n [-4.3016510009765625,-2.2045148153503378e-16,4.297093391418457],\r\n [-4.596096038818359,4,4.459827423095703],\r\n [-4.3016510009765625,4,4.297093391418457],\r\n [-4.596096038818359,-2.1193606079293928e-16,4.459827423095703],\r\n [-4.870469570159912,-2.1471710818679157e-16,4.654505729675293],\r\n [-4.596096038818359,4,4.459827423095703],\r\n [-4.596096038818359,-2.1193606079293928e-16,4.459827423095703],\r\n [-4.870469570159912,4,4.654505729675293],\r\n [-4.596096038818359,4,4.459827423095703],\r\n [-4.870469570159912,-2.1471710818679157e-16,4.654505729675293],\r\n [-5.1213202476501465,-2.287596703726266e-16,4.8786797523498535],\r\n [-4.870469570159912,4,4.654505729675293],\r\n [-4.870469570159912,-2.1471710818679157e-16,4.654505729675293],\r\n [-5.1213202476501465,4,4.8786797523498535],\r\n [-4.870469570159912,4,4.654505729675293],\r\n [-5.1213202476501465,-2.287596703726266e-16,4.8786797523498535],\r\n [-5.345494270324707,-2.538871674507214e-16,5.129530429840088],\r\n [-5.1213202476501465,4,4.8786797523498535],\r\n [-5.1213202476501465,-2.287596703726266e-16,4.8786797523498535],\r\n [-5.345494270324707,4,5.129530429840088],\r\n [-5.1213202476501465,4,4.8786797523498535],\r\n [-5.345494270324707,-2.538871674507214e-16,5.129530429840088],\r\n [-5.540172576904297,-2.897835502526318e-16,5.403903961181641],\r\n [-5.345494270324707,4,5.129530429840088],\r\n [-5.345494270324707,-2.538871674507214e-16,5.129530429840088],\r\n [-5.540172576904297,4,5.403903961181641],\r\n [-5.345494270324707,4,5.129530429840088],\r\n [-5.540172576904297,-2.897835502526318e-16,5.403903961181641],\r\n [-5.702906608581543,-3.3599745609658963e-16,5.6983489990234375],\r\n [-5.540172576904297,4,5.403903961181641],\r\n [-5.540172576904297,-2.897835502526318e-16,5.403903961181641],\r\n [-5.702906608581543,4,5.6983489990234375],\r\n [-5.540172576904297,4,5.403903961181641],\r\n [-5.702906608581543,-3.3599745609658963e-16,5.6983489990234375],\r\n [-5.8316497802734375,-3.919476880318804e-16,6.009162902832031],\r\n [-5.702906608581543,4,5.6983489990234375],\r\n [-5.702906608581543,-3.3599745609658963e-16,5.6983489990234375],\r\n [-5.8316497802734375,4,6.009162902832031],\r\n [-5.702906608581543,4,5.6983489990234375],\r\n [-5.8316497802734375,-3.919476880318804e-16,6.009162902832031],\r\n [-5.924783706665039,-4.569306528469114e-16,6.332437038421631],\r\n [-5.8316497802734375,4,6.009162902832031],\r\n [-5.8316497802734375,-3.919476880318804e-16,6.009162902832031],\r\n [-5.924783706665039,4,6.332437038421631],\r\n [-5.8316497802734375,4,6.009162902832031],\r\n [-5.924783706665039,-4.569306528469114e-16,6.332437038421631],\r\n [-5.981136798858643,-5.301291755058191e-16,6.664106369018555],\r\n [-5.924783706665039,4,6.332437038421631],\r\n [-5.924783706665039,-4.569306528469114e-16,6.332437038421631],\r\n [-5.981136798858643,4,6.664106369018555],\r\n [-5.924783706665039,4,6.332437038421631],\r\n [-5.981136798858643,-5.301291755058191e-16,6.664106369018555],\r\n [-6,-5.551115123125783e-16,7],\r\n [-5.981136798858643,4,6.664106369018555],\r\n [-5.981136798858643,-5.301291755058191e-16,6.664106369018555],\r\n [-6,4,7],\r\n [-5.981136798858643,4,6.664106369018555],\r\n [-6,-5.551115123125783e-16,7],\r\n [-6,-5.551115123125783e-16,7],\r\n [-6,4,9.5],\r\n [-6,4,7],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-6,4,9.5],\r\n [-6,-5.551115123125783e-16,7],\r\n [-6.018496036529541,-1.6684463242277103e-15,9.970754623413086],\r\n [-6,4,9.5],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-6.018496036529541,4,9.970754623413086],\r\n [-6,4,9.5],\r\n [-6.018496036529541,-1.6684463242277103e-15,9.970754623413086],\r\n [-6.0738701820373535,-1.7757163766130078e-15,10.438607215881348],\r\n [-6.018496036529541,4,9.970754623413086],\r\n [-6.018496036529541,-1.6684463242277103e-15,9.970754623413086],\r\n [-6.0738701820373535,4,10.438607215881348],\r\n [-6.018496036529541,4,9.970754623413086],\r\n [-6.0738701820373535,-1.7757163766130078e-15,10.438607215881348],\r\n [-6.165780544281006,-1.8754609647784245e-15,10.90067195892334],\r\n [-6.0738701820373535,4,10.438607215881348],\r\n [-6.0738701820373535,-1.7757163766130078e-15,10.438607215881348],\r\n [-6.165780544281006,4,10.90067195892334],\r\n [-6.0738701820373535,4,10.438607215881348],\r\n [-6.165780544281006,-1.8754609647784245e-15,10.90067195892334],\r\n [-6.293661117553711,-1.9670650369251353e-15,11.35410213470459],\r\n [-6.165780544281006,4,10.90067195892334],\r\n [-6.165780544281006,-1.8754609647784245e-15,10.90067195892334],\r\n [-6.293661117553711,4,11.35410213470459],\r\n [-6.165780544281006,4,10.90067195892334],\r\n [-6.293661117553711,-1.9670650369251353e-15,11.35410213470459],\r\n [-6.456722736358643,-2.0499641514729137e-15,11.796100616455078],\r\n [-6.293661117553711,4,11.35410213470459],\r\n [-6.293661117553711,-1.9670650369251353e-15,11.35410213470459],\r\n [-6.456722736358643,4,11.796100616455078],\r\n [-6.293661117553711,4,11.35410213470459],\r\n [-6.456722736358643,-2.0499641514729137e-15,11.796100616455078],\r\n [-6.653960704803467,-2.123646912279855e-15,12.223942756652832],\r\n [-6.456722736358643,4,11.796100616455078],\r\n [-6.456722736358643,-2.0499641514729137e-15,11.796100616455078],\r\n [-6.653960704803467,4,12.223942756652832],\r\n [-6.456722736358643,4,11.796100616455078],\r\n [-6.653960704803467,-2.123646912279855e-15,12.223942756652832],\r\n [-6.884159088134766,-2.1876590979279936e-15,12.634991645812988],\r\n [-6.653960704803467,4,12.223942756652832],\r\n [-6.653960704803467,-2.123646912279855e-15,12.223942756652832],\r\n [-6.884159088134766,4,12.634991645812988],\r\n [-6.653960704803467,4,12.223942756652832],\r\n [-6.884159088134766,-2.1876590979279936e-15,12.634991645812988],\r\n [-7.14589786529541,-2.2416059910639096e-15,13.026711463928223],\r\n [-6.884159088134766,4,12.634991645812988],\r\n [-6.884159088134766,-2.1876590979279936e-15,12.634991645812988],\r\n [-7.14589786529541,4,13.026711463928223],\r\n [-6.884159088134766,4,12.634991645812988],\r\n [-7.14589786529541,-2.2416059910639096e-15,13.026711463928223],\r\n [-7.437564373016357,-2.285155343014042e-15,13.396688461303711],\r\n [-7.14589786529541,4,13.026711463928223],\r\n [-7.14589786529541,-2.2416059910639096e-15,13.026711463928223],\r\n [-7.437564373016357,4,13.396688461303711],\r\n [-7.14589786529541,4,13.026711463928223],\r\n [-7.437564373016357,-2.285155343014042e-15,13.396688461303711],\r\n [-7.757359504699707,-2.318038220817638e-15,13.742640495300293],\r\n [-7.437564373016357,4,13.396688461303711],\r\n [-7.437564373016357,-2.285155343014042e-15,13.396688461303711],\r\n [-7.757359504699707,4,13.742640495300293],\r\n [-7.437564373016357,4,13.396688461303711],\r\n [-7.757359504699707,-2.318038220817638e-15,13.742640495300293],\r\n [-8.103311538696289,-2.340052183600304e-15,14.0624361038208],\r\n [-7.757359504699707,4,13.742640495300293],\r\n [-7.757359504699707,-2.318038220817638e-15,13.742640495300293],\r\n [-8.103311538696289,4,14.0624361038208],\r\n [-7.757359504699707,4,13.742640495300293],\r\n [-8.103311538696289,-2.340052183600304e-15,14.0624361038208],\r\n [-8.473288536071777,-2.3510612825740048e-15,14.35410213470459],\r\n [-8.103311538696289,4,14.0624361038208],\r\n [-8.103311538696289,-2.340052183600304e-15,14.0624361038208],\r\n [-8.473288536071777,4,14.35410213470459],\r\n [-8.103311538696289,4,14.0624361038208],\r\n [-8.473288536071777,-2.3510612825740048e-15,14.35410213470459],\r\n [-8.865008354187012,-2.3509977551029607e-15,14.615840911865234],\r\n [-8.473288536071777,4,14.35410213470459],\r\n [-8.473288536071777,-2.3510612825740048e-15,14.35410213470459],\r\n [-8.865008354187012,4,14.615840911865234],\r\n [-8.473288536071777,4,14.35410213470459],\r\n [-8.865008354187012,-2.3509977551029607e-15,14.615840911865234],\r\n [-9.276057243347168,-2.3398620247036452e-15,14.846038818359375],\r\n [-8.865008354187012,4,14.615840911865234],\r\n [-8.865008354187012,-2.3509977551029607e-15,14.615840911865234],\r\n [-9.276057243347168,4,14.846038818359375],\r\n [-8.865008354187012,4,14.615840911865234],\r\n [-9.276057243347168,-2.3398620247036452e-15,14.846038818359375],\r\n [-9.703899383544922,-2.317722701044786e-15,15.0432767868042],\r\n [-9.276057243347168,4,14.846038818359375],\r\n [-9.276057243347168,-2.3398620247036452e-15,14.846038818359375],\r\n [-9.703899383544922,4,15.0432767868042],\r\n [-9.276057243347168,4,14.846038818359375],\r\n [-9.703899383544922,-2.317722701044786e-15,15.0432767868042],\r\n [-10.14589786529541,-2.2847163681891276e-15,15.206338882446289],\r\n [-9.703899383544922,4,15.0432767868042],\r\n [-9.703899383544922,-2.317722701044786e-15,15.0432767868042],\r\n [-10.14589786529541,4,15.206338882446289],\r\n [-9.703899383544922,4,15.0432767868042],\r\n [-10.14589786529541,-2.2847163681891276e-15,15.206338882446289],\r\n [-10.59932804107666,-2.2410463140440113e-15,15.334219932556152],\r\n [-10.14589786529541,4,15.206338882446289],\r\n [-10.14589786529541,-2.2847163681891276e-15,15.206338882446289],\r\n [-10.59932804107666,4,15.334219932556152],\r\n [-10.14589786529541,4,15.206338882446289],\r\n [-10.59932804107666,-2.2410463140440113e-15,15.334219932556152],\r\n [-11.061392784118652,-2.1869821068449006e-15,15.426130294799805],\r\n [-10.59932804107666,4,15.334219932556152],\r\n [-10.59932804107666,-2.2410463140440113e-15,15.334219932556152],\r\n [-11.061392784118652,4,15.426130294799805],\r\n [-10.59932804107666,4,15.334219932556152],\r\n [-11.061392784118652,-2.1869821068449006e-15,15.426130294799805],\r\n [-11.529245376586914,-2.1228566305400666e-15,15.481504440307617],\r\n [-11.061392784118652,4,15.426130294799805],\r\n [-11.061392784118652,-2.1869821068449006e-15,15.426130294799805],\r\n [-11.529245376586914,4,15.481504440307617],\r\n [-11.061392784118652,4,15.426130294799805],\r\n [-11.529245376586914,-2.1228566305400666e-15,15.481504440307617],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-11.529245376586914,4,15.481504440307617],\r\n [-11.529245376586914,-2.1228566305400666e-15,15.481504440307617],\r\n [-12,4,15.5],\r\n [-11.529245376586914,4,15.481504440307617],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-21.258716583251953,2.1770987146581006e-15,5.867696762084961],\r\n [-15.833142280578613,1.783114680011682e-15,4.3785834312438965],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-16.14780616760254,1.7754942422225904e-15,4.619645595550537],\r\n [-15.833142280578613,1.783114680011682e-15,4.3785834312438965],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-21.51261329650879,2.206244059581937e-15,5.920457363128662],\r\n [-21.258716583251953,2.1770987146581006e-15,5.867696762084961],\r\n [-21.756961822509766,2.225313312323473e-15,6.007298469543457],\r\n [-21.51261329650879,2.206244059581937e-15,5.920457363128662],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-21.98720932006836,2.2339513543195725e-15,6.126603126525879],\r\n [-21.756961822509766,2.225313312323473e-15,6.007298469543457],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-22.199066162109375,2.23199703755202e-15,6.276148319244385],\r\n [-21.98720932006836,2.2339513543195725e-15,6.126603126525879],\r\n [-22.388587951660156,2.2194869961957844e-15,6.45314884185791],\r\n [-22.199066162109375,2.23199703755202e-15,6.276148319244385],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-22.552242279052734,2.196653952553124e-15,6.6543073654174805],\r\n [-22.388587951660156,2.2194869961957844e-15,6.45314884185791],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-22.686981201171875,2.1639235406800336e-15,6.875876426696777],\r\n [-22.552242279052734,2.196653952553124e-15,6.6543073654174805],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-22.686981201171875,2.1639235406800336e-15,6.875876426696777],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-22.79029655456543,2.1219054125403e-15,7.1137285232543945],\r\n [-22.686981201171875,2.1639235406800336e-15,6.875876426696777],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-22.860260009765625,2.071382014818949e-15,7.363433361053467],\r\n [-22.79029655456543,2.1219054125403e-15,7.1137285232543945],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-22.895570755004883,2.013295036395091e-15,7.620339393615723],\r\n [-22.860260009765625,2.071382014818949e-15,7.363433361053467],\r\n [-22.895570755004883,1.9487259265841324e-15,7.879660606384277],\r\n [-22.895570755004883,2.013295036395091e-15,7.620339393615723],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-22.860260009765625,1.8788778956876483e-15,8.136566162109375],\r\n [-22.895570755004883,1.9487259265841324e-15,7.879660606384277],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-22.860260009765625,1.8788778956876483e-15,8.136566162109375],\r\n [-25.981504440307617,1.9891291864099258e-15,9.970754623413086],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-25.926130294799805,1.8634159445102315e-15,10.438607215881348],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.981504440307617,1.9891291864099258e-15,9.970754623413086],\r\n [-25.834218978881836,1.7330590562354524e-15,10.90067195892334],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.926130294799805,1.8634159445102315e-15,10.438607215881348],\r\n [-25.70633888244629,1.5988621440942959e-15,11.35410213470459],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.834218978881836,1.7330590562354524e-15,10.90067195892334],\r\n [-25.543277740478516,1.461652653397111e-15,11.796100616455078],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.70633888244629,1.5988621440942959e-15,11.35410213470459],\r\n [-25.346038818359375,1.3222764524208497e-15,12.223942756652832],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.543277740478516,1.461652653397111e-15,11.796100616455078],\r\n [-25.115840911865234,1.1815928560905014e-15,12.634991645812988],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.346038818359375,1.3222764524208497e-15,12.223942756652832],\r\n [-24.854101181030273,1.0404692261440545e-15,13.026711463928223],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-25.115840911865234,1.1815928560905014e-15,12.634991645812988],\r\n [-24.562435150146484,8.997756771765759e-16,13.396688461303711],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-24.854101181030273,1.0404692261440545e-15,13.026711463928223],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-24.562435150146484,8.997756771765759e-16,13.396688461303711],\r\n [-22.686981201171875,1.7286233564489184e-15,8.624123573303223],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-22.552242279052734,1.651015762601756e-15,8.84569263458252],\r\n [-22.686981201171875,1.7286233564489184e-15,8.624123573303223],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-22.388587951660156,1.5736749841329788e-15,9.04685115814209],\r\n [-22.552242279052734,1.651015762601756e-15,8.84569263458252],\r\n [-22.199066162109375,1.4980416123276294e-15,9.223851203918457],\r\n [-22.388587951660156,1.5736749841329788e-15,9.04685115814209],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-21.98720932006836,1.425524580614347e-15,9.373396873474121],\r\n [-22.199066162109375,1.4980416123276294e-15,9.223851203918457],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-21.756961822509766,1.3574746947857654e-15,9.492701530456543],\r\n [-21.98720932006836,1.425524580614347e-15,9.373396873474121],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-21.756961822509766,1.3574746947857654e-15,9.492701530456543],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-21.51261329650879,1.2951597514056874e-15,9.579543113708496],\r\n [-21.756961822509766,1.3574746947857654e-15,9.492701530456543],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-21.258716583251953,1.2397403973700882e-15,9.632303237915039],\r\n [-21.51261329650879,1.2951597514056874e-15,9.579543113708496],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-21.258716583251953,1.2397403973700882e-15,9.632303237915039],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-23.52671241760254,4.889041878420707e-16,14.35410213470459],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-23.134990692138672,3.584986745821633e-16,14.615840911865234],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-23.52671241760254,4.889041878420707e-16,14.35410213470459],\r\n [-22.72394371032715,2.3272778150249657e-16,14.846038818359375],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-23.134990692138672,3.584986745821633e-16,14.615840911865234],\r\n [-22.296100616455078,1.1236695403139205e-16,15.0432767868042],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-22.72394371032715,2.3272778150249657e-16,14.846038818359375],\r\n [-21.854101181030273,-1.8417703666133664e-18,15.206338882446289],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-22.296100616455078,1.1236695403139205e-16,15.0432767868042],\r\n [-21.400672912597656,-1.0919424654366326e-16,15.334219932556152],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-21.854101181030273,-1.8417703666133664e-18,15.206338882446289],\r\n [-20.93860626220703,-2.090286069665991e-16,15.426130294799805],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-21.400672912597656,-1.0919424654366326e-16,15.334219932556152],\r\n [-20.470754623413086,-3.007293335135255e-16,15.481504440307617],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-20.93860626220703,-2.090286069665991e-16,15.426130294799805],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-20.470754623413086,-3.007293335135255e-16,15.481504440307617],\r\n [-15.833142280578613,1.0420082188347665e-16,11.121416091918945],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-15.496668815612793,-4.009262951754189e-18,11.330965042114258],\r\n [-15.833142280578613,1.0420082188347665e-16,11.121416091918945],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-16.700178146362305,4.498863562806303e-16,10.31297779083252],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-16.43772315979004,3.322142628470171e-16,10.61003303527832],\r\n [-16.700178146362305,4.498863562806303e-16,10.31297779083252],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-16.43772315979004,3.322142628470171e-16,10.61003303527832],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-17.133180618286133,5.551115123125783e-16,9.649999618530273],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-16.932722091674805,5.685420137846833e-16,9.99196720123291],\r\n [-17.133180618286133,5.551115123125783e-16,9.649999618530273],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-16.700178146362305,4.498863562806303e-16,10.31297779083252],\r\n [-16.932722091674805,5.685420137846833e-16,9.99196720123291],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-16.700178146362305,1.7262102654613093e-15,5.187021732330322],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-16.932722091674805,1.6850073006541896e-15,5.50803279876709],\r\n [-16.700178146362305,1.7262102654613093e-15,5.187021732330322],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-17.133180618286133,1.6653345369377348e-15,5.849999904632568],\r\n [-16.932722091674805,1.6850073006541896e-15,5.50803279876709],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-17.133180618286133,5.551115123125783e-16,9.649999618530273],\r\n [-17.133180618286133,1.6653345369377348e-15,5.849999904632568],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-15.141532897949219,-1.0699318510810866e-16,11.50704288482666],\r\n [-15.496668815612793,-4.009262951754189e-18,11.330965042114258],\r\n [-14.771053314208984,-2.0378835822907156e-16,11.648002624511719],\r\n [-15.141532897949219,-1.0699318510810866e-16,11.50704288482666],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-14.388692855834961,-2.93490007611139e-16,11.752527236938477],\r\n [-14.771053314208984,-2.0378835822907156e-16,11.648002624511719],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-14.388692855834961,-2.93490007611139e-16,11.752527236938477],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-13.998025894165039,-3.752596831330926e-16,11.819640159606934],\r\n [-14.388692855834961,-2.93490007611139e-16,11.752527236938477],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-13.602704048156738,-4.483331096136027e-16,11.848713874816895],\r\n [-13.998025894165039,-3.752596831330926e-16,11.819640159606934],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-13.206421852111816,-5.120271814504883e-16,11.839475631713867],\r\n [-13.602704048156738,-4.483331096136027e-16,11.848713874816895],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-13.206421852111816,-5.120271814504883e-16,11.839475631713867],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-11.529245376586914,-2.1228566305400666e-15,15.481504440307617],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-11.061392784118652,-2.1869821068449006e-15,15.426130294799805],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-11.529245376586914,-2.1228566305400666e-15,15.481504440307617],\r\n [-10.59932804107666,-2.2410463140440113e-15,15.334219932556152],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-11.061392784118652,-2.1869821068449006e-15,15.426130294799805],\r\n [-10.14589786529541,-2.2847163681891276e-15,15.206338882446289],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-10.59932804107666,-2.2410463140440113e-15,15.334219932556152],\r\n [-9.703899383544922,-2.317722701044786e-15,15.0432767868042],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-10.14589786529541,-2.2847163681891276e-15,15.206338882446289],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-9.703899383544922,-2.317722701044786e-15,15.0432767868042],\r\n [-9.276057243347168,-2.3398620247036452e-15,14.846038818359375],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-9.703899383544922,-2.317722701044786e-15,15.0432767868042],\r\n [-8.865008354187012,-2.3509977551029607e-15,14.615840911865234],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-9.276057243347168,-2.3398620247036452e-15,14.846038818359375],\r\n [-8.473288536071777,-2.3510612825740048e-15,14.35410213470459],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-8.865008354187012,-2.3509977551029607e-15,14.615840911865234],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-8.473288536071777,-2.3510612825740048e-15,14.35410213470459],\r\n [-8.103311538696289,-2.340052183600304e-15,14.0624361038208],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-8.473288536071777,-2.3510612825740048e-15,14.35410213470459],\r\n [-7.757359504699707,-2.318038220817638e-15,13.742640495300293],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-8.103311538696289,-2.340052183600304e-15,14.0624361038208],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-7.757359504699707,-2.318038220817638e-15,13.742640495300293],\r\n [-7.437564373016357,-2.285155343014042e-15,13.396688461303711],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-7.757359504699707,-2.318038220817638e-15,13.742640495300293],\r\n [-7.14589786529541,-2.2416059910639096e-15,13.026711463928223],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-7.437564373016357,-2.285155343014042e-15,13.396688461303711],\r\n [-11.338640213012695,-6.723261550151149e-16,11.234038352966309],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-7.14589786529541,-2.2416059910639096e-15,13.026711463928223],\r\n [-6.884159088134766,-2.1876590979279936e-15,12.634991645812988],\r\n [-11.338640213012695,-6.723261550151149e-16,11.234038352966309],\r\n [-7.14589786529541,-2.2416059910639096e-15,13.026711463928223],\r\n [-11.012296676635742,-6.70649982691617e-16,11.009037971496582],\r\n [-11.338640213012695,-6.723261550151149e-16,11.234038352966309],\r\n [-6.884159088134766,-2.1876590979279936e-15,12.634991645812988],\r\n [-6.653960704803467,-2.123646912279855e-15,12.223942756652832],\r\n [-11.012296676635742,-6.70649982691617e-16,11.009037971496582],\r\n [-6.884159088134766,-2.1876590979279936e-15,12.634991645812988],\r\n [-10.709206581115723,-6.575165250862023e-16,10.753576278686523],\r\n [-11.012296676635742,-6.70649982691617e-16,11.009037971496582],\r\n [-6.653960704803467,-2.123646912279855e-15,12.223942756652832],\r\n [-6.456722736358643,-2.0499641514729137e-15,11.796100616455078],\r\n [-10.709206581115723,-6.575165250862023e-16,10.753576278686523],\r\n [-6.653960704803467,-2.123646912279855e-15,12.223942756652832],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-10.709206581115723,-6.575165250862023e-16,10.753576278686523],\r\n [-6.456722736358643,-2.0499641514729137e-15,11.796100616455078],\r\n [-6.293661117553711,-1.9670650369251353e-15,11.35410213470459],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-6.456722736358643,-2.0499641514729137e-15,11.796100616455078],\r\n [-6.165780544281006,-1.8754609647784245e-15,10.90067195892334],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-6.293661117553711,-1.9670650369251353e-15,11.35410213470459],\r\n [-10.18387222290039,-5.974745946200812e-16,10.161077499389648],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-6.165780544281006,-1.8754609647784245e-15,10.90067195892334],\r\n [-6.0738701820373535,-1.7757163766130078e-15,10.438607215881348],\r\n [-10.18387222290039,-5.974745946200812e-16,10.161077499389648],\r\n [-6.165780544281006,-1.8754609647784245e-15,10.90067195892334],\r\n [-9.966538429260254,-5.511273869660493e-16,9.82957935333252],\r\n [-10.18387222290039,-5.974745946200812e-16,10.161077499389648],\r\n [-6.0738701820373535,-1.7757163766130078e-15,10.438607215881348],\r\n [-6.018496036529541,-1.6684463242277103e-15,9.970754623413086],\r\n [-9.966538429260254,-5.511273869660493e-16,9.82957935333252],\r\n [-6.0738701820373535,-1.7757163766130078e-15,10.438607215881348],\r\n [-9.782233238220215,-4.944400246084104e-16,9.478643417358398],\r\n [-9.966538429260254,-5.511273869660493e-16,9.82957935333252],\r\n [-6.018496036529541,-1.6684463242277103e-15,9.970754623413086],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-9.782233238220215,-4.944400246084104e-16,9.478643417358398],\r\n [-6.018496036529541,-1.6684463242277103e-15,9.970754623413086],\r\n [-9.63267707824707,-4.279424325347907e-16,9.111549377441406],\r\n [-9.782233238220215,-4.944400246084104e-16,9.478643417358398],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-9.519269943237305,-3.522561211702379e-16,8.731728553771973],\r\n [-9.63267707824707,-4.279424325347907e-16,9.111549377441406],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-9.443071365356445,-2.6808854831416663e-16,8.342732429504395],\r\n [-9.519269943237305,-3.522561211702379e-16,8.731728553771973],\r\n [-6,-5.551115123125783e-16,7],\r\n [-9.443071365356445,-2.6808854831416663e-16,8.342732429504395],\r\n [-6,-1.1102230246251565e-15,9.5],\r\n [-9.404792785644531,-1.7622642228611886e-16,7.948194980621338],\r\n [-9.443071365356445,-2.6808854831416663e-16,8.342732429504395],\r\n [-6,-5.551115123125783e-16,7],\r\n [-9.404792785644531,-7.752841611892878e-17,7.551805019378662],\r\n [-9.404792785644531,-1.7622642228611886e-16,7.948194980621338],\r\n [-6,-5.551115123125783e-16,7],\r\n [-6,-5.551115123125783e-16,7],\r\n [-9.443071365356445,2.7082933848196718e-17,7.157268047332764],\r\n [-9.404792785644531,-7.752841611892878e-17,7.551805019378662],\r\n [-9.519269943237305,1.3662982899368726e-16,6.768270969390869],\r\n [-9.443071365356445,2.7082933848196718e-17,7.157268047332764],\r\n [-6,-5.551115123125783e-16,7],\r\n [-5.981136798858643,-5.301291755058191e-16,6.664106369018555],\r\n [-9.519269943237305,1.3662982899368726e-16,6.768270969390869],\r\n [-6,-5.551115123125783e-16,7],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-9.519269943237305,1.3662982899368726e-16,6.768270969390869],\r\n [-5.981136798858643,-5.301291755058191e-16,6.664106369018555],\r\n [-5.924783706665039,-4.569306528469114e-16,6.332437038421631],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-5.981136798858643,-5.301291755058191e-16,6.664106369018555],\r\n [-5.8316497802734375,-3.919476880318804e-16,6.009162902832031],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-5.924783706665039,-4.569306528469114e-16,6.332437038421631],\r\n [-9.782233238220215,3.663978656202405e-16,6.021356582641602],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-5.8316497802734375,-3.919476880318804e-16,6.009162902832031],\r\n [-5.702906608581543,-3.3599745609658963e-16,5.6983489990234375],\r\n [-9.782233238220215,3.663978656202405e-16,6.021356582641602],\r\n [-5.8316497802734375,-3.919476880318804e-16,6.009162902832031],\r\n [-9.966538429260254,4.844713467917338e-16,5.6704206466674805],\r\n [-9.782233238220215,3.663978656202405e-16,6.021356582641602],\r\n [-5.702906608581543,-3.3599745609658963e-16,5.6983489990234375],\r\n [-5.540172576904297,-2.897835502526318e-16,5.403903961181641],\r\n [-9.966538429260254,4.844713467917338e-16,5.6704206466674805],\r\n [-5.702906608581543,-3.3599745609658963e-16,5.6983489990234375],\r\n [-10.18387222290039,6.03205143085171e-16,5.338922500610352],\r\n [-9.966538429260254,4.844713467917338e-16,5.6704206466674805],\r\n [-5.540172576904297,-2.897835502526318e-16,5.403903961181641],\r\n [-5.345494270324707,-2.538871674507214e-16,5.129530429840088],\r\n [-10.18387222290039,6.03205143085171e-16,5.338922500610352],\r\n [-5.540172576904297,-2.897835502526318e-16,5.403903961181641],\r\n [-10.432201385498047,7.21489376641853e-16,5.029961109161377],\r\n [-10.18387222290039,6.03205143085171e-16,5.338922500610352],\r\n [-5.345494270324707,-2.538871674507214e-16,5.129530429840088],\r\n [-5.1213202476501465,-2.287596703726266e-16,4.8786797523498535],\r\n [-10.432201385498047,7.21489376641853e-16,5.029961109161377],\r\n [-5.345494270324707,-2.538871674507214e-16,5.129530429840088],\r\n [-10.709206581115723,8.382184577073761e-16,4.746423721313477],\r\n [-10.432201385498047,7.21489376641853e-16,5.029961109161377],\r\n [-5.1213202476501465,-2.287596703726266e-16,4.8786797523498535],\r\n [-4.870469570159912,-2.1471710818679157e-16,4.654505729675293],\r\n [-10.709206581115723,8.382184577073761e-16,4.746423721313477],\r\n [-5.1213202476501465,-2.287596703726266e-16,4.8786797523498535],\r\n [-11.012296676635742,9.523013549061175e-16,4.49096155166626],\r\n [-10.709206581115723,8.382184577073761e-16,4.746423721313477],\r\n [-4.870469570159912,-2.1471710818679157e-16,4.654505729675293],\r\n [-4.596096038818359,-2.1193606079293928e-16,4.459827423095703],\r\n [-11.012296676635742,9.523013549061175e-16,4.49096155166626],\r\n [-4.870469570159912,-2.1471710818679157e-16,4.654505729675293],\r\n [-11.338640213012695,1.0626715478783658e-15,4.265961647033691],\r\n [-11.012296676635742,9.523013549061175e-16,4.49096155166626],\r\n [-4.596096038818359,-2.1193606079293928e-16,4.459827423095703],\r\n [-4.3016510009765625,-2.2045148153503378e-16,4.297093391418457],\r\n [-11.338640213012695,1.0626715478783658e-15,4.265961647033691],\r\n [-4.596096038818359,-2.1193606079293928e-16,4.459827423095703],\r\n [-11.685185432434082,1.1682976151921611e-15,4.073527812957764],\r\n [-11.338640213012695,1.0626715478783658e-15,4.265961647033691],\r\n [-4.3016510009765625,-2.2045148153503378e-16,4.297093391418457],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [-11.685185432434082,1.1682976151921611e-15,4.073527812957764],\r\n [-4.3016510009765625,-2.2045148153503378e-16,4.297093391418457],\r\n [-12.048694610595703,1.2681922340683602e-15,3.9154579639434814],\r\n [-11.685185432434082,1.1682976151921611e-15,4.073527812957764],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [0,0,0],\r\n [-12.048694610595703,1.2681922340683602e-15,3.9154579639434814],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [-12.425768852233887,1.3614215506826152e-15,3.7932300567626953],\r\n [-12.048694610595703,1.2681922340683602e-15,3.9154579639434814],\r\n [0,0,0],\r\n [-12.812884330749512,1.4471141798904383e-15,3.70798659324646],\r\n [-12.425768852233887,1.3614215506826152e-15,3.7932300567626953],\r\n [0,0,0],\r\n [0,0,0],\r\n [-13.206421852111816,1.524469146161082e-15,3.6605241298675537],\r\n [-12.812884330749512,1.4471141798904383e-15,3.70798659324646],\r\n [-13.602704048156738,1.592763506874065e-15,3.6512866020202637],\r\n [-13.206421852111816,1.524469146161082e-15,3.6605241298675537],\r\n [0,0,0],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-13.602704048156738,1.592763506874065e-15,3.6512866020202637],\r\n [0,0,0],\r\n [-13.998025894165039,1.651358810945394e-15,3.6803600788116455],\r\n [-13.602704048156738,1.592763506874065e-15,3.6512866020202637],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-14.388692855834961,1.6997073456955511e-15,3.7474727630615234],\r\n [-13.998025894165039,1.651358810945394e-15,3.6803600788116455],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-14.771053314208984,1.737357219047176e-15,3.8519976139068604],\r\n [-14.388692855834961,1.6997073456955511e-15,3.7474727630615234],\r\n [-15.141532897949219,1.7639565946898027e-15,3.992957353591919],\r\n [-14.771053314208984,1.737357219047176e-15,3.8519976139068604],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-15.496668815612793,1.7792566566951756e-15,4.169034481048584],\r\n [-15.141532897949219,1.7639565946898027e-15,3.992957353591919],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-15.833142280578613,1.783114680011682e-15,4.3785834312438965],\r\n [-15.496668815612793,1.7792566566951756e-15,4.169034481048584],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-16.43772315979004,1.756466811732825e-15,4.889967441558838],\r\n [-16.14780616760254,1.7754942422225904e-15,4.619645595550537],\r\n [-16.700178146362305,1.7262102654613093e-15,5.187021732330322],\r\n [-16.43772315979004,1.756466811732825e-15,4.889967441558838],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [0,0,0],\r\n [-3,-5.551115123125783e-16,4],\r\n [0,-1.1102230246251565e-15,4],\r\n [-3.335893392562866,-3.120053008051708e-16,4.018863201141357],\r\n [-3,-5.551115123125783e-16,4],\r\n [0,0,0],\r\n [-3.66756272315979,-2.708027065749654e-16,4.075216293334961],\r\n [-3.335893392562866,-3.120053008051708e-16,4.018863201141357],\r\n [0,0,0],\r\n [0,0,0],\r\n [-3.9908370971679688,-2.401562869196964e-16,4.1683502197265625],\r\n [-3.66756272315979,-2.708027065749654e-16,4.075216293334961],\r\n [-20.470754623413086,-3.007293335135255e-16,15.481504440307617],\r\n [-20,4,15.5],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-20.470754623413086,4,15.481504440307617],\r\n [-20,4,15.5],\r\n [-20.470754623413086,-3.007293335135255e-16,15.481504440307617],\r\n [-20.93860626220703,-2.090286069665991e-16,15.426130294799805],\r\n [-20.470754623413086,4,15.481504440307617],\r\n [-20.470754623413086,-3.007293335135255e-16,15.481504440307617],\r\n [-20.93860626220703,4,15.426130294799805],\r\n [-20.470754623413086,4,15.481504440307617],\r\n [-20.93860626220703,-2.090286069665991e-16,15.426130294799805],\r\n [-21.400672912597656,-1.0919424654366326e-16,15.334219932556152],\r\n [-20.93860626220703,4,15.426130294799805],\r\n [-20.93860626220703,-2.090286069665991e-16,15.426130294799805],\r\n [-21.400672912597656,4,15.334219932556152],\r\n [-20.93860626220703,4,15.426130294799805],\r\n [-21.400672912597656,-1.0919424654366326e-16,15.334219932556152],\r\n [-21.854101181030273,-1.8417703666133664e-18,15.206338882446289],\r\n [-21.400672912597656,4,15.334219932556152],\r\n [-21.400672912597656,-1.0919424654366326e-16,15.334219932556152],\r\n [-21.854101181030273,4,15.206338882446289],\r\n [-21.400672912597656,4,15.334219932556152],\r\n [-21.854101181030273,-1.8417703666133664e-18,15.206338882446289],\r\n [-22.296100616455078,1.1236695403139205e-16,15.0432767868042],\r\n [-21.854101181030273,4,15.206338882446289],\r\n [-21.854101181030273,-1.8417703666133664e-18,15.206338882446289],\r\n [-22.296100616455078,4,15.0432767868042],\r\n [-21.854101181030273,4,15.206338882446289],\r\n [-22.296100616455078,1.1236695403139205e-16,15.0432767868042],\r\n [-22.72394371032715,2.3272778150249657e-16,14.846038818359375],\r\n [-22.296100616455078,4,15.0432767868042],\r\n [-22.296100616455078,1.1236695403139205e-16,15.0432767868042],\r\n [-22.72394371032715,4,14.846038818359375],\r\n [-22.296100616455078,4,15.0432767868042],\r\n [-22.72394371032715,2.3272778150249657e-16,14.846038818359375],\r\n [-23.134990692138672,3.584986745821633e-16,14.615840911865234],\r\n [-22.72394371032715,4,14.846038818359375],\r\n [-22.72394371032715,2.3272778150249657e-16,14.846038818359375],\r\n [-23.134990692138672,4,14.615840911865234],\r\n [-22.72394371032715,4,14.846038818359375],\r\n [-23.134990692138672,3.584986745821633e-16,14.615840911865234],\r\n [-23.52671241760254,4.889041878420707e-16,14.35410213470459],\r\n [-23.134990692138672,4,14.615840911865234],\r\n [-23.134990692138672,3.584986745821633e-16,14.615840911865234],\r\n [-23.52671241760254,4,14.35410213470459],\r\n [-23.134990692138672,4,14.615840911865234],\r\n [-23.52671241760254,4.889041878420707e-16,14.35410213470459],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-23.52671241760254,4,14.35410213470459],\r\n [-23.52671241760254,4.889041878420707e-16,14.35410213470459],\r\n [-23.89668846130371,4,14.0624361038208],\r\n [-23.52671241760254,4,14.35410213470459],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-23.89668846130371,4,14.0624361038208],\r\n [-23.89668846130371,6.231403811361562e-16,14.0624361038208],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-23.89668846130371,4,14.0624361038208],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-24.562435150146484,8.997756771765759e-16,13.396688461303711],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-24.24264144897461,7.603795179864949e-16,13.742640495300293],\r\n [-24.562435150146484,4,13.396688461303711],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-24.562435150146484,8.997756771765759e-16,13.396688461303711],\r\n [-24.854101181030273,1.0404692261440545e-15,13.026711463928223],\r\n [-24.562435150146484,4,13.396688461303711],\r\n [-24.562435150146484,8.997756771765759e-16,13.396688461303711],\r\n [-24.854101181030273,4,13.026711463928223],\r\n [-24.562435150146484,4,13.396688461303711],\r\n [-24.854101181030273,1.0404692261440545e-15,13.026711463928223],\r\n [-25.115840911865234,1.1815928560905014e-15,12.634991645812988],\r\n [-24.854101181030273,4,13.026711463928223],\r\n [-24.854101181030273,1.0404692261440545e-15,13.026711463928223],\r\n [-25.115840911865234,4,12.634991645812988],\r\n [-24.854101181030273,4,13.026711463928223],\r\n [-25.115840911865234,1.1815928560905014e-15,12.634991645812988],\r\n [-25.346038818359375,1.3222764524208497e-15,12.223942756652832],\r\n [-25.115840911865234,4,12.634991645812988],\r\n [-25.115840911865234,1.1815928560905014e-15,12.634991645812988],\r\n [-25.346038818359375,4,12.223942756652832],\r\n [-25.115840911865234,4,12.634991645812988],\r\n [-25.346038818359375,1.3222764524208497e-15,12.223942756652832],\r\n [-25.543277740478516,1.461652653397111e-15,11.796100616455078],\r\n [-25.346038818359375,4,12.223942756652832],\r\n [-25.346038818359375,1.3222764524208497e-15,12.223942756652832],\r\n [-25.543277740478516,4,11.796100616455078],\r\n [-25.346038818359375,4,12.223942756652832],\r\n [-25.543277740478516,1.461652653397111e-15,11.796100616455078],\r\n [-25.70633888244629,1.5988621440942959e-15,11.35410213470459],\r\n [-25.543277740478516,4,11.796100616455078],\r\n [-25.543277740478516,1.461652653397111e-15,11.796100616455078],\r\n [-25.70633888244629,4,11.35410213470459],\r\n [-25.543277740478516,4,11.796100616455078],\r\n [-25.70633888244629,1.5988621440942959e-15,11.35410213470459],\r\n [-25.834218978881836,1.7330590562354524e-15,10.90067195892334],\r\n [-25.70633888244629,4,11.35410213470459],\r\n [-25.70633888244629,1.5988621440942959e-15,11.35410213470459],\r\n [-25.834218978881836,4,10.90067195892334],\r\n [-25.70633888244629,4,11.35410213470459],\r\n [-25.834218978881836,1.7330590562354524e-15,10.90067195892334],\r\n [-25.926130294799805,1.8634159445102315e-15,10.438607215881348],\r\n [-25.834218978881836,4,10.90067195892334],\r\n [-25.834218978881836,1.7330590562354524e-15,10.90067195892334],\r\n [-25.926130294799805,4,10.438607215881348],\r\n [-25.834218978881836,4,10.90067195892334],\r\n [-25.926130294799805,1.8634159445102315e-15,10.438607215881348],\r\n [-25.981504440307617,1.9891291864099258e-15,9.970754623413086],\r\n [-25.926130294799805,4,10.438607215881348],\r\n [-25.926130294799805,1.8634159445102315e-15,10.438607215881348],\r\n [-25.981504440307617,4,9.970754623413086],\r\n [-25.926130294799805,4,10.438607215881348],\r\n [-25.981504440307617,1.9891291864099258e-15,9.970754623413086],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-25.981504440307617,4,9.970754623413086],\r\n [-25.981504440307617,1.9891291864099258e-15,9.970754623413086],\r\n [-26,4,9.5],\r\n [-25.981504440307617,4,9.970754623413086],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-26,4,4.712057414586355e-15],\r\n [-26,4,9.5],\r\n [-26,4.440892098500626e-15,3.7160881231174895e-15],\r\n [-26,4,4.712057414586355e-15],\r\n [-26,2.220446049250313e-15,9.5],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-21,4,9.649999618530273],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-17.93317985534668,5.551115123125783e-16,9.649999618530273],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-21,4,5.849999904632568],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-17.93317985534668,1.6653345369377348e-15,5.849999904632568],\r\n [-21,4,5.849999904632568],\r\n [-21.258716583251953,4,9.632303237915039],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-21,4,9.649999618530273],\r\n [-21.258716583251953,1.2397403973700882e-15,9.632303237915039],\r\n [-21,1.1102230246251565e-15,9.649999618530273],\r\n [-21.258716583251953,4,9.632303237915039],\r\n [-21.51261329650879,1.2951597514056874e-15,9.579543113708496],\r\n [-21.258716583251953,1.2397403973700882e-15,9.632303237915039],\r\n [-21.258716583251953,4,9.632303237915039],\r\n [-21.51261329650879,4,9.579543113708496],\r\n [-21.51261329650879,1.2951597514056874e-15,9.579543113708496],\r\n [-21.258716583251953,4,9.632303237915039],\r\n [-21.756961822509766,1.3574746947857654e-15,9.492701530456543],\r\n [-21.51261329650879,1.2951597514056874e-15,9.579543113708496],\r\n [-21.51261329650879,4,9.579543113708496],\r\n [-21.756961822509766,4,9.492701530456543],\r\n [-21.756961822509766,1.3574746947857654e-15,9.492701530456543],\r\n [-21.51261329650879,4,9.579543113708496],\r\n [-21.98720932006836,1.425524580614347e-15,9.373396873474121],\r\n [-21.756961822509766,1.3574746947857654e-15,9.492701530456543],\r\n [-21.756961822509766,4,9.492701530456543],\r\n [-21.98720932006836,4,9.373396873474121],\r\n [-21.98720932006836,1.425524580614347e-15,9.373396873474121],\r\n [-21.756961822509766,4,9.492701530456543],\r\n [-22.199066162109375,1.4980416123276294e-15,9.223851203918457],\r\n [-21.98720932006836,1.425524580614347e-15,9.373396873474121],\r\n [-21.98720932006836,4,9.373396873474121],\r\n [-22.199066162109375,4,9.223851203918457],\r\n [-22.199066162109375,1.4980416123276294e-15,9.223851203918457],\r\n [-21.98720932006836,4,9.373396873474121],\r\n [-22.388587951660156,1.5736749841329788e-15,9.04685115814209],\r\n [-22.199066162109375,1.4980416123276294e-15,9.223851203918457],\r\n [-22.199066162109375,4,9.223851203918457],\r\n [-22.388587951660156,4,9.04685115814209],\r\n [-22.388587951660156,1.5736749841329788e-15,9.04685115814209],\r\n [-22.199066162109375,4,9.223851203918457],\r\n [-22.552242279052734,1.651015762601756e-15,8.84569263458252],\r\n [-22.388587951660156,1.5736749841329788e-15,9.04685115814209],\r\n [-22.388587951660156,4,9.04685115814209],\r\n [-22.552242279052734,4,8.84569263458252],\r\n [-22.552242279052734,1.651015762601756e-15,8.84569263458252],\r\n [-22.388587951660156,4,9.04685115814209],\r\n [-22.686981201171875,1.7286233564489184e-15,8.624123573303223],\r\n [-22.552242279052734,1.651015762601756e-15,8.84569263458252],\r\n [-22.552242279052734,4,8.84569263458252],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-22.686981201171875,1.7286233564489184e-15,8.624123573303223],\r\n [-22.552242279052734,4,8.84569263458252],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-22.686981201171875,1.7286233564489184e-15,8.624123573303223],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-22.860260009765625,1.8788778956876483e-15,8.136566162109375],\r\n [-22.79029655456543,1.8050519863126212e-15,8.386271476745605],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-22.860260009765625,4,8.136566162109375],\r\n [-22.860260009765625,1.8788778956876483e-15,8.136566162109375],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-22.895570755004883,1.9487259265841324e-15,7.879660606384277],\r\n [-22.860260009765625,1.8788778956876483e-15,8.136566162109375],\r\n [-22.860260009765625,4,8.136566162109375],\r\n [-22.895570755004883,4,7.879660606384277],\r\n [-22.895570755004883,1.9487259265841324e-15,7.879660606384277],\r\n [-22.860260009765625,4,8.136566162109375],\r\n [-22.895570755004883,2.013295036395091e-15,7.620339393615723],\r\n [-22.895570755004883,1.9487259265841324e-15,7.879660606384277],\r\n [-22.895570755004883,4,7.879660606384277],\r\n [-22.895570755004883,4,7.620339393615723],\r\n [-22.895570755004883,2.013295036395091e-15,7.620339393615723],\r\n [-22.895570755004883,4,7.879660606384277],\r\n [-22.860260009765625,2.071382014818949e-15,7.363433361053467],\r\n [-22.895570755004883,2.013295036395091e-15,7.620339393615723],\r\n [-22.895570755004883,4,7.620339393615723],\r\n [-22.860260009765625,4,7.363433361053467],\r\n [-22.860260009765625,2.071382014818949e-15,7.363433361053467],\r\n [-22.895570755004883,4,7.620339393615723],\r\n [-22.79029655456543,2.1219054125403e-15,7.1137285232543945],\r\n [-22.860260009765625,2.071382014818949e-15,7.363433361053467],\r\n [-22.860260009765625,4,7.363433361053467],\r\n [-22.79029655456543,4,7.1137285232543945],\r\n [-22.79029655456543,2.1219054125403e-15,7.1137285232543945],\r\n [-22.860260009765625,4,7.363433361053467],\r\n [-22.686981201171875,2.1639235406800336e-15,6.875876426696777],\r\n [-22.79029655456543,2.1219054125403e-15,7.1137285232543945],\r\n [-22.79029655456543,4,7.1137285232543945],\r\n [-22.686981201171875,4,6.875876426696777],\r\n [-22.686981201171875,2.1639235406800336e-15,6.875876426696777],\r\n [-22.79029655456543,4,7.1137285232543945],\r\n [-22.552242279052734,2.196653952553124e-15,6.6543073654174805],\r\n [-22.686981201171875,2.1639235406800336e-15,6.875876426696777],\r\n [-22.686981201171875,4,6.875876426696777],\r\n [-22.552242279052734,4,6.6543073654174805],\r\n [-22.552242279052734,2.196653952553124e-15,6.6543073654174805],\r\n [-22.686981201171875,4,6.875876426696777],\r\n [-22.388587951660156,2.2194869961957844e-15,6.45314884185791],\r\n [-22.552242279052734,2.196653952553124e-15,6.6543073654174805],\r\n [-22.552242279052734,4,6.6543073654174805],\r\n [-22.388587951660156,4,6.45314884185791],\r\n [-22.388587951660156,2.2194869961957844e-15,6.45314884185791],\r\n [-22.552242279052734,4,6.6543073654174805],\r\n [-22.199066162109375,2.23199703755202e-15,6.276148319244385],\r\n [-22.388587951660156,2.2194869961957844e-15,6.45314884185791],\r\n [-22.388587951660156,4,6.45314884185791],\r\n [-22.199066162109375,4,6.276148319244385],\r\n [-22.199066162109375,2.23199703755202e-15,6.276148319244385],\r\n [-22.388587951660156,4,6.45314884185791],\r\n [-21.98720932006836,2.2339513543195725e-15,6.126603126525879],\r\n [-22.199066162109375,2.23199703755202e-15,6.276148319244385],\r\n [-22.199066162109375,4,6.276148319244385],\r\n [-21.98720932006836,4,6.126603126525879],\r\n [-21.98720932006836,2.2339513543195725e-15,6.126603126525879],\r\n [-22.199066162109375,4,6.276148319244385],\r\n [-21.756961822509766,2.225313312323473e-15,6.007298469543457],\r\n [-21.98720932006836,2.2339513543195725e-15,6.126603126525879],\r\n [-21.98720932006836,4,6.126603126525879],\r\n [-21.756961822509766,4,6.007298469543457],\r\n [-21.756961822509766,2.225313312323473e-15,6.007298469543457],\r\n [-21.98720932006836,4,6.126603126525879],\r\n [-21.51261329650879,2.206244059581937e-15,5.920457363128662],\r\n [-21.756961822509766,2.225313312323473e-15,6.007298469543457],\r\n [-21.756961822509766,4,6.007298469543457],\r\n [-21.51261329650879,4,5.920457363128662],\r\n [-21.51261329650879,2.206244059581937e-15,5.920457363128662],\r\n [-21.756961822509766,4,6.007298469543457],\r\n [-21.258716583251953,2.1770987146581006e-15,5.867696762084961],\r\n [-21.51261329650879,2.206244059581937e-15,5.920457363128662],\r\n [-21.51261329650879,4,5.920457363128662],\r\n [-21.258716583251953,4,5.867696762084961],\r\n [-21.258716583251953,2.1770987146581006e-15,5.867696762084961],\r\n [-21.51261329650879,4,5.920457363128662],\r\n [-21,4,5.849999904632568],\r\n [-21.258716583251953,2.1770987146581006e-15,5.867696762084961],\r\n [-21.258716583251953,4,5.867696762084961],\r\n [-21,2.220446049250313e-15,5.849999904632568],\r\n [-21.258716583251953,2.1770987146581006e-15,5.867696762084961],\r\n [-21,4,5.849999904632568],\r\n [-16.932722091674805,4,5.50803279876709],\r\n [-17.133180618286133,1.6653345369377348e-15,5.849999904632568],\r\n [-17.133180618286133,4,5.849999904632568],\r\n [-16.932722091674805,1.6850073006541896e-15,5.50803279876709],\r\n [-17.133180618286133,1.6653345369377348e-15,5.849999904632568],\r\n [-16.932722091674805,4,5.50803279876709],\r\n [-16.700178146362305,4,5.187021732330322],\r\n [-16.932722091674805,1.6850073006541896e-15,5.50803279876709],\r\n [-16.932722091674805,4,5.50803279876709],\r\n [-16.700178146362305,1.7262102654613093e-15,5.187021732330322],\r\n [-16.932722091674805,1.6850073006541896e-15,5.50803279876709],\r\n [-16.700178146362305,4,5.187021732330322],\r\n [-16.43772315979004,4,4.889967441558838],\r\n [-16.700178146362305,1.7262102654613093e-15,5.187021732330322],\r\n [-16.700178146362305,4,5.187021732330322],\r\n [-16.43772315979004,1.756466811732825e-15,4.889967441558838],\r\n [-16.700178146362305,1.7262102654613093e-15,5.187021732330322],\r\n [-16.43772315979004,4,4.889967441558838],\r\n [-16.14780616760254,4,4.619645595550537],\r\n [-16.43772315979004,1.756466811732825e-15,4.889967441558838],\r\n [-16.43772315979004,4,4.889967441558838],\r\n [-16.14780616760254,1.7754942422225904e-15,4.619645595550537],\r\n [-16.43772315979004,1.756466811732825e-15,4.889967441558838],\r\n [-16.14780616760254,4,4.619645595550537],\r\n [-15.833142280578613,4,4.3785834312438965],\r\n [-16.14780616760254,1.7754942422225904e-15,4.619645595550537],\r\n [-16.14780616760254,4,4.619645595550537],\r\n [-15.833142280578613,1.783114680011682e-15,4.3785834312438965],\r\n [-16.14780616760254,1.7754942422225904e-15,4.619645595550537],\r\n [-15.833142280578613,4,4.3785834312438965],\r\n [-15.496668815612793,4,4.169034481048584],\r\n [-15.833142280578613,1.783114680011682e-15,4.3785834312438965],\r\n [-15.833142280578613,4,4.3785834312438965],\r\n [-15.496668815612793,1.7792566566951756e-15,4.169034481048584],\r\n [-15.833142280578613,1.783114680011682e-15,4.3785834312438965],\r\n [-15.496668815612793,4,4.169034481048584],\r\n [-15.141532897949219,4,3.992957353591919],\r\n [-15.496668815612793,1.7792566566951756e-15,4.169034481048584],\r\n [-15.496668815612793,4,4.169034481048584],\r\n [-15.141532897949219,1.7639565946898027e-15,3.992957353591919],\r\n [-15.496668815612793,1.7792566566951756e-15,4.169034481048584],\r\n [-15.141532897949219,4,3.992957353591919],\r\n [-14.771053314208984,4,3.8519976139068604],\r\n [-15.141532897949219,1.7639565946898027e-15,3.992957353591919],\r\n [-15.141532897949219,4,3.992957353591919],\r\n [-14.771053314208984,1.737357219047176e-15,3.8519976139068604],\r\n [-15.141532897949219,1.7639565946898027e-15,3.992957353591919],\r\n [-14.771053314208984,4,3.8519976139068604],\r\n [-14.388692855834961,4,3.7474727630615234],\r\n [-14.771053314208984,1.737357219047176e-15,3.8519976139068604],\r\n [-14.771053314208984,4,3.8519976139068604],\r\n [-14.388692855834961,1.6997073456955511e-15,3.7474727630615234],\r\n [-14.771053314208984,1.737357219047176e-15,3.8519976139068604],\r\n [-14.388692855834961,4,3.7474727630615234],\r\n [-13.998025894165039,4,3.6803600788116455],\r\n [-14.388692855834961,1.6997073456955511e-15,3.7474727630615234],\r\n [-14.388692855834961,4,3.7474727630615234],\r\n [-13.998025894165039,1.651358810945394e-15,3.6803600788116455],\r\n [-14.388692855834961,1.6997073456955511e-15,3.7474727630615234],\r\n [-13.998025894165039,4,3.6803600788116455],\r\n [-13.602704048156738,4,3.6512866020202637],\r\n [-13.998025894165039,1.651358810945394e-15,3.6803600788116455],\r\n [-13.998025894165039,4,3.6803600788116455],\r\n [-13.602704048156738,1.592763506874065e-15,3.6512866020202637],\r\n [-13.998025894165039,1.651358810945394e-15,3.6803600788116455],\r\n [-13.602704048156738,4,3.6512866020202637],\r\n [-13.206421852111816,4,3.6605241298675537],\r\n [-13.602704048156738,1.592763506874065e-15,3.6512866020202637],\r\n [-13.602704048156738,4,3.6512866020202637],\r\n [-13.206421852111816,1.524469146161082e-15,3.6605241298675537],\r\n [-13.602704048156738,1.592763506874065e-15,3.6512866020202637],\r\n [-13.206421852111816,4,3.6605241298675537],\r\n [-12.812884330749512,4,3.70798659324646],\r\n [-13.206421852111816,1.524469146161082e-15,3.6605241298675537],\r\n [-13.206421852111816,4,3.6605241298675537],\r\n [-12.812884330749512,1.4471141798904383e-15,3.70798659324646],\r\n [-13.206421852111816,1.524469146161082e-15,3.6605241298675537],\r\n [-12.812884330749512,4,3.70798659324646],\r\n [-12.425768852233887,4,3.7932300567626953],\r\n [-12.812884330749512,1.4471141798904383e-15,3.70798659324646],\r\n [-12.812884330749512,4,3.70798659324646],\r\n [-12.425768852233887,1.3614215506826152e-15,3.7932300567626953],\r\n [-12.812884330749512,1.4471141798904383e-15,3.70798659324646],\r\n [-12.425768852233887,4,3.7932300567626953],\r\n [-12.048694610595703,4,3.9154579639434814],\r\n [-12.425768852233887,1.3614215506826152e-15,3.7932300567626953],\r\n [-12.425768852233887,4,3.7932300567626953],\r\n [-12.048694610595703,1.2681922340683602e-15,3.9154579639434814],\r\n [-12.425768852233887,1.3614215506826152e-15,3.7932300567626953],\r\n [-12.048694610595703,4,3.9154579639434814],\r\n [-11.685185432434082,4,4.073527812957764],\r\n [-12.048694610595703,1.2681922340683602e-15,3.9154579639434814],\r\n [-12.048694610595703,4,3.9154579639434814],\r\n [-11.685185432434082,1.1682976151921611e-15,4.073527812957764],\r\n [-12.048694610595703,1.2681922340683602e-15,3.9154579639434814],\r\n [-11.685185432434082,4,4.073527812957764],\r\n [-11.338640213012695,4,4.265961647033691],\r\n [-11.685185432434082,1.1682976151921611e-15,4.073527812957764],\r\n [-11.685185432434082,4,4.073527812957764],\r\n [-11.338640213012695,1.0626715478783658e-15,4.265961647033691],\r\n [-11.685185432434082,1.1682976151921611e-15,4.073527812957764],\r\n [-11.338640213012695,4,4.265961647033691],\r\n [-11.012296676635742,4,4.49096155166626],\r\n [-11.338640213012695,1.0626715478783658e-15,4.265961647033691],\r\n [-11.338640213012695,4,4.265961647033691],\r\n [-11.012296676635742,9.523013549061175e-16,4.49096155166626],\r\n [-11.338640213012695,1.0626715478783658e-15,4.265961647033691],\r\n [-11.012296676635742,4,4.49096155166626],\r\n [-10.709206581115723,4,4.746423721313477],\r\n [-11.012296676635742,9.523013549061175e-16,4.49096155166626],\r\n [-11.012296676635742,4,4.49096155166626],\r\n [-10.709206581115723,8.382184577073761e-16,4.746423721313477],\r\n [-11.012296676635742,9.523013549061175e-16,4.49096155166626],\r\n [-10.709206581115723,4,4.746423721313477],\r\n [-10.432201385498047,4,5.029961109161377],\r\n [-10.709206581115723,8.382184577073761e-16,4.746423721313477],\r\n [-10.709206581115723,4,4.746423721313477],\r\n [-10.432201385498047,7.21489376641853e-16,5.029961109161377],\r\n [-10.709206581115723,8.382184577073761e-16,4.746423721313477],\r\n [-10.432201385498047,4,5.029961109161377],\r\n [-10.18387222290039,4,5.338922500610352],\r\n [-10.432201385498047,7.21489376641853e-16,5.029961109161377],\r\n [-10.432201385498047,4,5.029961109161377],\r\n [-10.18387222290039,6.03205143085171e-16,5.338922500610352],\r\n [-10.432201385498047,7.21489376641853e-16,5.029961109161377],\r\n [-10.18387222290039,4,5.338922500610352],\r\n [-9.966538429260254,4,5.6704206466674805],\r\n [-10.18387222290039,6.03205143085171e-16,5.338922500610352],\r\n [-10.18387222290039,4,5.338922500610352],\r\n [-9.966538429260254,4.844713467917338e-16,5.6704206466674805],\r\n [-10.18387222290039,6.03205143085171e-16,5.338922500610352],\r\n [-9.966538429260254,4,5.6704206466674805],\r\n [-9.782233238220215,4,6.021356582641602],\r\n [-9.966538429260254,4.844713467917338e-16,5.6704206466674805],\r\n [-9.966538429260254,4,5.6704206466674805],\r\n [-9.782233238220215,3.663978656202405e-16,6.021356582641602],\r\n [-9.966538429260254,4.844713467917338e-16,5.6704206466674805],\r\n [-9.782233238220215,4,6.021356582641602],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-9.782233238220215,3.663978656202405e-16,6.021356582641602],\r\n [-9.782233238220215,4,6.021356582641602],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-9.782233238220215,3.663978656202405e-16,6.021356582641602],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-9.519269943237305,4,6.768270969390869],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-9.519269943237305,1.3662982899368726e-16,6.768270969390869],\r\n [-9.63267707824707,2.500883040916247e-16,6.388450622558594],\r\n [-9.519269943237305,4,6.768270969390869],\r\n [-9.443071365356445,4,7.157268047332764],\r\n [-9.519269943237305,1.3662982899368726e-16,6.768270969390869],\r\n [-9.519269943237305,4,6.768270969390869],\r\n [-9.443071365356445,2.7082933848196718e-17,7.157268047332764],\r\n [-9.519269943237305,1.3662982899368726e-16,6.768270969390869],\r\n [-9.443071365356445,4,7.157268047332764],\r\n [-9.404792785644531,4,7.551805019378662],\r\n [-9.443071365356445,2.7082933848196718e-17,7.157268047332764],\r\n [-9.443071365356445,4,7.157268047332764],\r\n [-9.404792785644531,-7.752841611892878e-17,7.551805019378662],\r\n [-9.443071365356445,2.7082933848196718e-17,7.157268047332764],\r\n [-9.404792785644531,4,7.551805019378662],\r\n [-9.404792785644531,4,7.948194980621338],\r\n [-9.404792785644531,-7.752841611892878e-17,7.551805019378662],\r\n [-9.404792785644531,4,7.551805019378662],\r\n [-9.404792785644531,-1.7622642228611886e-16,7.948194980621338],\r\n [-9.404792785644531,-7.752841611892878e-17,7.551805019378662],\r\n [-9.404792785644531,4,7.948194980621338],\r\n [-9.443071365356445,4,8.342732429504395],\r\n [-9.404792785644531,-1.7622642228611886e-16,7.948194980621338],\r\n [-9.404792785644531,4,7.948194980621338],\r\n [-9.443071365356445,-2.6808854831416663e-16,8.342732429504395],\r\n [-9.404792785644531,-1.7622642228611886e-16,7.948194980621338],\r\n [-9.443071365356445,4,8.342732429504395],\r\n [-9.519269943237305,4,8.731728553771973],\r\n [-9.443071365356445,-2.6808854831416663e-16,8.342732429504395],\r\n [-9.443071365356445,4,8.342732429504395],\r\n [-9.519269943237305,-3.522561211702379e-16,8.731728553771973],\r\n [-9.443071365356445,-2.6808854831416663e-16,8.342732429504395],\r\n [-9.519269943237305,4,8.731728553771973],\r\n [-9.63267707824707,4,9.111549377441406],\r\n [-9.519269943237305,-3.522561211702379e-16,8.731728553771973],\r\n [-9.519269943237305,4,8.731728553771973],\r\n [-9.63267707824707,-4.279424325347907e-16,9.111549377441406],\r\n [-9.519269943237305,-3.522561211702379e-16,8.731728553771973],\r\n [-9.63267707824707,4,9.111549377441406],\r\n [-9.782233238220215,4,9.478643417358398],\r\n [-9.63267707824707,-4.279424325347907e-16,9.111549377441406],\r\n [-9.63267707824707,4,9.111549377441406],\r\n [-9.782233238220215,-4.944400246084104e-16,9.478643417358398],\r\n [-9.63267707824707,-4.279424325347907e-16,9.111549377441406],\r\n [-9.782233238220215,4,9.478643417358398],\r\n [-9.966538429260254,4,9.82957935333252],\r\n [-9.782233238220215,-4.944400246084104e-16,9.478643417358398],\r\n [-9.782233238220215,4,9.478643417358398],\r\n [-9.966538429260254,-5.511273869660493e-16,9.82957935333252],\r\n [-9.782233238220215,-4.944400246084104e-16,9.478643417358398],\r\n [-9.966538429260254,4,9.82957935333252],\r\n [-10.18387222290039,4,10.161077499389648],\r\n [-9.966538429260254,-5.511273869660493e-16,9.82957935333252],\r\n [-9.966538429260254,4,9.82957935333252],\r\n [-10.18387222290039,-5.974745946200812e-16,10.161077499389648],\r\n [-9.966538429260254,-5.511273869660493e-16,9.82957935333252],\r\n [-10.18387222290039,4,10.161077499389648],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-10.18387222290039,-5.974745946200812e-16,10.161077499389648],\r\n [-10.18387222290039,4,10.161077499389648],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-10.18387222290039,-5.974745946200812e-16,10.161077499389648],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-10.709206581115723,4,10.753576278686523],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-10.709206581115723,-6.575165250862023e-16,10.753576278686523],\r\n [-10.432201385498047,-6.330484960971041e-16,10.470039367675781],\r\n [-10.709206581115723,4,10.753576278686523],\r\n [-11.012296676635742,4,11.009037971496582],\r\n [-10.709206581115723,-6.575165250862023e-16,10.753576278686523],\r\n [-10.709206581115723,4,10.753576278686523],\r\n [-11.012296676635742,-6.70649982691617e-16,11.009037971496582],\r\n [-10.709206581115723,-6.575165250862023e-16,10.753576278686523],\r\n [-11.012296676635742,4,11.009037971496582],\r\n [-11.338640213012695,4,11.234038352966309],\r\n [-11.012296676635742,-6.70649982691617e-16,11.009037971496582],\r\n [-11.012296676635742,4,11.009037971496582],\r\n [-11.338640213012695,-6.723261550151149e-16,11.234038352966309],\r\n [-11.012296676635742,-6.70649982691617e-16,11.009037971496582],\r\n [-11.338640213012695,4,11.234038352966309],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-11.338640213012695,-6.723261550151149e-16,11.234038352966309],\r\n [-11.338640213012695,4,11.234038352966309],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-11.338640213012695,-6.723261550151149e-16,11.234038352966309],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-11.685185432434082,-6.625293190076125e-16,11.426472663879395],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-12.048694610595703,-6.413510601065316e-16,11.584542274475098],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-12.425768852233887,-6.089893193237338e-16,11.706769943237305],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-13.206421852111816,4,11.839475631713867],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-13.206421852111816,-5.120271814504883e-16,11.839475631713867],\r\n [-12.812884330749512,-5.657466462400665e-16,11.792013168334961],\r\n [-13.206421852111816,4,11.839475631713867],\r\n [-13.602704048156738,4,11.848713874816895],\r\n [-13.206421852111816,-5.120271814504883e-16,11.839475631713867],\r\n [-13.206421852111816,4,11.839475631713867],\r\n [-13.602704048156738,-4.483331096136027e-16,11.848713874816895],\r\n [-13.206421852111816,-5.120271814504883e-16,11.839475631713867],\r\n [-13.602704048156738,4,11.848713874816895],\r\n [-13.998025894165039,4,11.819640159606934],\r\n [-13.602704048156738,-4.483331096136027e-16,11.848713874816895],\r\n [-13.602704048156738,4,11.848713874816895],\r\n [-13.998025894165039,-3.752596831330926e-16,11.819640159606934],\r\n [-13.602704048156738,-4.483331096136027e-16,11.848713874816895],\r\n [-13.998025894165039,4,11.819640159606934],\r\n [-14.388692855834961,4,11.752527236938477],\r\n [-13.998025894165039,-3.752596831330926e-16,11.819640159606934],\r\n [-13.998025894165039,4,11.819640159606934],\r\n [-14.388692855834961,-2.93490007611139e-16,11.752527236938477],\r\n [-13.998025894165039,-3.752596831330926e-16,11.819640159606934],\r\n [-14.388692855834961,4,11.752527236938477],\r\n [-14.771053314208984,4,11.648002624511719],\r\n [-14.388692855834961,-2.93490007611139e-16,11.752527236938477],\r\n [-14.388692855834961,4,11.752527236938477],\r\n [-14.771053314208984,-2.0378835822907156e-16,11.648002624511719],\r\n [-14.388692855834961,-2.93490007611139e-16,11.752527236938477],\r\n [-14.771053314208984,4,11.648002624511719],\r\n [-15.141532897949219,4,11.50704288482666],\r\n [-14.771053314208984,-2.0378835822907156e-16,11.648002624511719],\r\n [-14.771053314208984,4,11.648002624511719],\r\n [-15.141532897949219,-1.0699318510810866e-16,11.50704288482666],\r\n [-14.771053314208984,-2.0378835822907156e-16,11.648002624511719],\r\n [-15.141532897949219,4,11.50704288482666],\r\n [-15.496668815612793,4,11.330965042114258],\r\n [-15.141532897949219,-1.0699318510810866e-16,11.50704288482666],\r\n [-15.141532897949219,4,11.50704288482666],\r\n [-15.496668815612793,-4.009262951754189e-18,11.330965042114258],\r\n [-15.141532897949219,-1.0699318510810866e-16,11.50704288482666],\r\n [-15.496668815612793,4,11.330965042114258],\r\n [-15.833142280578613,4,11.121416091918945],\r\n [-15.496668815612793,-4.009262951754189e-18,11.330965042114258],\r\n [-15.496668815612793,4,11.330965042114258],\r\n [-15.833142280578613,1.0420082188347665e-16,11.121416091918945],\r\n [-15.496668815612793,-4.009262951754189e-18,11.330965042114258],\r\n [-15.833142280578613,4,11.121416091918945],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-15.833142280578613,1.0420082188347665e-16,11.121416091918945],\r\n [-15.833142280578613,4,11.121416091918945],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-15.833142280578613,1.0420082188347665e-16,11.121416091918945],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-16.43772315979004,4,10.61003303527832],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-16.43772315979004,3.322142628470171e-16,10.61003303527832],\r\n [-16.14780616760254,2.1662561900074332e-16,10.880354881286621],\r\n [-16.43772315979004,4,10.61003303527832],\r\n [-16.700178146362305,4,10.31297779083252],\r\n [-16.43772315979004,3.322142628470171e-16,10.61003303527832],\r\n [-16.43772315979004,4,10.61003303527832],\r\n [-16.700178146362305,4.498863562806303e-16,10.31297779083252],\r\n [-16.43772315979004,3.322142628470171e-16,10.61003303527832],\r\n [-16.700178146362305,4,10.31297779083252],\r\n [-16.932722091674805,4,9.99196720123291],\r\n [-16.700178146362305,4.498863562806303e-16,10.31297779083252],\r\n [-16.700178146362305,4,10.31297779083252],\r\n [-16.932722091674805,5.685420137846833e-16,9.99196720123291],\r\n [-16.700178146362305,4.498863562806303e-16,10.31297779083252],\r\n [-16.932722091674805,4,9.99196720123291],\r\n [-17.133180618286133,4,9.649999618530273],\r\n [-16.932722091674805,5.685420137846833e-16,9.99196720123291],\r\n [-16.932722091674805,4,9.99196720123291],\r\n [-17.133180618286133,5.551115123125783e-16,9.649999618530273],\r\n [-16.932722091674805,5.685420137846833e-16,9.99196720123291],\r\n [-17.133180618286133,4,9.649999618530273],\r\n [-17.133180618286133,4,9.649999618530273],\r\n [-17.133180618286133,1.6653345369377348e-15,5.849999904632568],\r\n [-17.133180618286133,5.551115123125783e-16,9.649999618530273],\r\n [-17.133180618286133,4,5.849999904632568],\r\n [-17.133180618286133,1.6653345369377348e-15,5.849999904632568],\r\n [-17.133180618286133,4,9.649999618530273],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-20,4,15.5],\r\n [-12,4,15.5],\r\n [-20,-5.551115123125783e-16,15.5],\r\n [-20,4,15.5],\r\n [-12,-1.6653345369377348e-15,15.5],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-17.133180618286133,4,5.849999904632568],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-16.932722091674805,4,5.50803279876709],\r\n [-17.133180618286133,4,5.849999904632568],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-16.700178146362305,4,5.187021732330322],\r\n [-16.932722091674805,4,5.50803279876709],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-16.700178146362305,4,10.31297779083252],\r\n [-21,4,9.649999618530273],\r\n [-16.932722091674805,4,9.99196720123291],\r\n [-16.700178146362305,4,10.31297779083252],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-17.133180618286133,4,9.649999618530273],\r\n [-16.932722091674805,4,9.99196720123291],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-21,4,9.649999618530273],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-21.258716583251953,4,9.632303237915039],\r\n [-23.89668846130371,4,14.0624361038208],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-21,4,9.649999618530273],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-23.89668846130371,4,14.0624361038208],\r\n [-21,4,9.649999618530273],\r\n [-23.52671241760254,4,14.35410213470459],\r\n [-23.89668846130371,4,14.0624361038208],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-23.134990692138672,4,14.615840911865234],\r\n [-23.52671241760254,4,14.35410213470459],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-21.51261329650879,4,9.579543113708496],\r\n [-21.258716583251953,4,9.632303237915039],\r\n [-21.756961822509766,4,9.492701530456543],\r\n [-21.51261329650879,4,9.579543113708496],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-21.98720932006836,4,9.373396873474121],\r\n [-21.756961822509766,4,9.492701530456543],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-22.199066162109375,4,9.223851203918457],\r\n [-21.98720932006836,4,9.373396873474121],\r\n [-22.388587951660156,4,9.04685115814209],\r\n [-22.199066162109375,4,9.223851203918457],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-22.552242279052734,4,8.84569263458252],\r\n [-22.388587951660156,4,9.04685115814209],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-22.552242279052734,4,8.84569263458252],\r\n [-24.562435150146484,4,13.396688461303711],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-24.24264144897461,4,13.742640495300293],\r\n [-24.854101181030273,4,13.026711463928223],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-24.562435150146484,4,13.396688461303711],\r\n [-25.115840911865234,4,12.634991645812988],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-24.854101181030273,4,13.026711463928223],\r\n [-25.346038818359375,4,12.223942756652832],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-25.115840911865234,4,12.634991645812988],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-22.686981201171875,4,8.624123573303223],\r\n [-25.346038818359375,4,12.223942756652832],\r\n [-25.543277740478516,4,11.796100616455078],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-25.346038818359375,4,12.223942756652832],\r\n [-25.70633888244629,4,11.35410213470459],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-25.543277740478516,4,11.796100616455078],\r\n [-25.834218978881836,4,10.90067195892334],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-25.70633888244629,4,11.35410213470459],\r\n [-25.926130294799805,4,10.438607215881348],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-25.834218978881836,4,10.90067195892334],\r\n [-25.981504440307617,4,9.970754623413086],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-25.926130294799805,4,10.438607215881348],\r\n [-26,4,9.5],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-25.981504440307617,4,9.970754623413086],\r\n [-22.860260009765625,4,8.136566162109375],\r\n [-22.79029655456543,4,8.386271476745605],\r\n [-26,4,9.5],\r\n [-22.895570755004883,4,7.879660606384277],\r\n [-22.860260009765625,4,8.136566162109375],\r\n [-26,4,9.5],\r\n [-26,4,9.5],\r\n [-22.895570755004883,4,7.620339393615723],\r\n [-22.895570755004883,4,7.879660606384277],\r\n [-22.860260009765625,4,7.363433361053467],\r\n [-22.895570755004883,4,7.620339393615723],\r\n [-26,4,9.5],\r\n [-22.79029655456543,4,7.1137285232543945],\r\n [-22.860260009765625,4,7.363433361053467],\r\n [-26,4,9.5],\r\n [-26,4,9.5],\r\n [-22.686981201171875,4,6.875876426696777],\r\n [-22.79029655456543,4,7.1137285232543945],\r\n [-26,4,4.712057414586355e-15],\r\n [-22.686981201171875,4,6.875876426696777],\r\n [-26,4,9.5],\r\n [-22.552242279052734,4,6.6543073654174805],\r\n [-22.686981201171875,4,6.875876426696777],\r\n [-26,4,4.712057414586355e-15],\r\n [-22.388587951660156,4,6.45314884185791],\r\n [-22.552242279052734,4,6.6543073654174805],\r\n [-26,4,4.712057414586355e-15],\r\n [-26,4,4.712057414586355e-15],\r\n [-22.199066162109375,4,6.276148319244385],\r\n [-22.388587951660156,4,6.45314884185791],\r\n [-21.98720932006836,4,6.126603126525879],\r\n [-22.199066162109375,4,6.276148319244385],\r\n [-26,4,4.712057414586355e-15],\r\n [-21.756961822509766,4,6.007298469543457],\r\n [-21.98720932006836,4,6.126603126525879],\r\n [-26,4,4.712057414586355e-15],\r\n [-26,4,4.712057414586355e-15],\r\n [-21.51261329650879,4,5.920457363128662],\r\n [-21.756961822509766,4,6.007298469543457],\r\n [-21.258716583251953,4,5.867696762084961],\r\n [-21.51261329650879,4,5.920457363128662],\r\n [-26,4,4.712057414586355e-15],\r\n [-21,4,5.849999904632568],\r\n [-21.258716583251953,4,5.867696762084961],\r\n [-26,4,4.712057414586355e-15],\r\n [-21,4,5.849999904632568],\r\n [-16.700178146362305,4,5.187021732330322],\r\n [-17.93317985534668,4,5.849999904632568],\r\n [-16.43772315979004,4,4.889967441558838],\r\n [-16.700178146362305,4,5.187021732330322],\r\n [-21,4,5.849999904632568],\r\n [-16.14780616760254,4,4.619645595550537],\r\n [-16.43772315979004,4,4.889967441558838],\r\n [-21,4,5.849999904632568],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-22.72394371032715,4,14.846038818359375],\r\n [-23.134990692138672,4,14.615840911865234],\r\n [-22.296100616455078,4,15.0432767868042],\r\n [-22.72394371032715,4,14.846038818359375],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-21.854101181030273,4,15.206338882446289],\r\n [-22.296100616455078,4,15.0432767868042],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-21.400672912597656,4,15.334219932556152],\r\n [-21.854101181030273,4,15.206338882446289],\r\n [-20.93860626220703,4,15.426130294799805],\r\n [-21.400672912597656,4,15.334219932556152],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-20.470754623413086,4,15.481504440307617],\r\n [-20.93860626220703,4,15.426130294799805],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-20,4,15.5],\r\n [-20.470754623413086,4,15.481504440307617],\r\n [-15.833142280578613,4,11.121416091918945],\r\n [-20,4,15.5],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-15.496668815612793,4,11.330965042114258],\r\n [-20,4,15.5],\r\n [-15.833142280578613,4,11.121416091918945],\r\n [-15.141532897949219,4,11.50704288482666],\r\n [-20,4,15.5],\r\n [-15.496668815612793,4,11.330965042114258],\r\n [-14.771053314208984,4,11.648002624511719],\r\n [-20,4,15.5],\r\n [-15.141532897949219,4,11.50704288482666],\r\n [-14.388692855834961,4,11.752527236938477],\r\n [-20,4,15.5],\r\n [-14.771053314208984,4,11.648002624511719],\r\n [-12,4,15.5],\r\n [-20,4,15.5],\r\n [-14.388692855834961,4,11.752527236938477],\r\n [-13.998025894165039,4,11.819640159606934],\r\n [-12,4,15.5],\r\n [-14.388692855834961,4,11.752527236938477],\r\n [-13.602704048156738,4,11.848713874816895],\r\n [-12,4,15.5],\r\n [-13.998025894165039,4,11.819640159606934],\r\n [-13.206421852111816,4,11.839475631713867],\r\n [-12,4,15.5],\r\n [-13.602704048156738,4,11.848713874816895],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-12,4,15.5],\r\n [-13.206421852111816,4,11.839475631713867],\r\n [-11.529245376586914,4,15.481504440307617],\r\n [-12,4,15.5],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-11.061392784118652,4,15.426130294799805],\r\n [-11.529245376586914,4,15.481504440307617],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-10.59932804107666,4,15.334219932556152],\r\n [-11.061392784118652,4,15.426130294799805],\r\n [-10.14589786529541,4,15.206338882446289],\r\n [-10.59932804107666,4,15.334219932556152],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-9.703899383544922,4,15.0432767868042],\r\n [-10.14589786529541,4,15.206338882446289],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-9.703899383544922,4,15.0432767868042],\r\n [-12.812884330749512,4,11.792013168334961],\r\n [-9.276057243347168,4,14.846038818359375],\r\n [-9.703899383544922,4,15.0432767868042],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-8.865008354187012,4,14.615840911865234],\r\n [-9.276057243347168,4,14.846038818359375],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-8.473288536071777,4,14.35410213470459],\r\n [-8.865008354187012,4,14.615840911865234],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-8.473288536071777,4,14.35410213470459],\r\n [-12.425768852233887,4,11.706769943237305],\r\n [-8.103311538696289,4,14.0624361038208],\r\n [-8.473288536071777,4,14.35410213470459],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-7.757359504699707,4,13.742640495300293],\r\n [-8.103311538696289,4,14.0624361038208],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-7.757359504699707,4,13.742640495300293],\r\n [-12.048694610595703,4,11.584542274475098],\r\n [-7.437564373016357,4,13.396688461303711],\r\n [-7.757359504699707,4,13.742640495300293],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-7.14589786529541,4,13.026711463928223],\r\n [-7.437564373016357,4,13.396688461303711],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-11.338640213012695,4,11.234038352966309],\r\n [-7.14589786529541,4,13.026711463928223],\r\n [-11.685185432434082,4,11.426472663879395],\r\n [-6.884159088134766,4,12.634991645812988],\r\n [-7.14589786529541,4,13.026711463928223],\r\n [-11.338640213012695,4,11.234038352966309],\r\n [-11.012296676635742,4,11.009037971496582],\r\n [-6.884159088134766,4,12.634991645812988],\r\n [-11.338640213012695,4,11.234038352966309],\r\n [-6.653960704803467,4,12.223942756652832],\r\n [-6.884159088134766,4,12.634991645812988],\r\n [-11.012296676635742,4,11.009037971496582],\r\n [-10.709206581115723,4,10.753576278686523],\r\n [-6.653960704803467,4,12.223942756652832],\r\n [-11.012296676635742,4,11.009037971496582],\r\n [-6.456722736358643,4,11.796100616455078],\r\n [-6.653960704803467,4,12.223942756652832],\r\n [-10.709206581115723,4,10.753576278686523],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-6.456722736358643,4,11.796100616455078],\r\n [-10.709206581115723,4,10.753576278686523],\r\n [-6.293661117553711,4,11.35410213470459],\r\n [-6.456722736358643,4,11.796100616455078],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-6.165780544281006,4,10.90067195892334],\r\n [-6.293661117553711,4,11.35410213470459],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-10.18387222290039,4,10.161077499389648],\r\n [-6.165780544281006,4,10.90067195892334],\r\n [-10.432201385498047,4,10.470039367675781],\r\n [-6.0738701820373535,4,10.438607215881348],\r\n [-6.165780544281006,4,10.90067195892334],\r\n [-10.18387222290039,4,10.161077499389648],\r\n [-9.966538429260254,4,9.82957935333252],\r\n [-6.0738701820373535,4,10.438607215881348],\r\n [-10.18387222290039,4,10.161077499389648],\r\n [-6.018496036529541,4,9.970754623413086],\r\n [-6.0738701820373535,4,10.438607215881348],\r\n [-9.966538429260254,4,9.82957935333252],\r\n [-9.782233238220215,4,9.478643417358398],\r\n [-6.018496036529541,4,9.970754623413086],\r\n [-9.966538429260254,4,9.82957935333252],\r\n [-6,4,9.5],\r\n [-6.018496036529541,4,9.970754623413086],\r\n [-9.782233238220215,4,9.478643417358398],\r\n [-9.63267707824707,4,9.111549377441406],\r\n [-6,4,9.5],\r\n [-9.782233238220215,4,9.478643417358398],\r\n [-9.519269943237305,4,8.731728553771973],\r\n [-6,4,9.5],\r\n [-9.63267707824707,4,9.111549377441406],\r\n [-9.443071365356445,4,8.342732429504395],\r\n [-6,4,9.5],\r\n [-9.519269943237305,4,8.731728553771973],\r\n [-6,4,7],\r\n [-6,4,9.5],\r\n [-9.443071365356445,4,8.342732429504395],\r\n [-9.404792785644531,4,7.948194980621338],\r\n [-6,4,7],\r\n [-9.443071365356445,4,8.342732429504395],\r\n [-9.404792785644531,4,7.551805019378662],\r\n [-6,4,7],\r\n [-9.404792785644531,4,7.948194980621338],\r\n [-9.443071365356445,4,7.157268047332764],\r\n [-6,4,7],\r\n [-9.404792785644531,4,7.551805019378662],\r\n [-9.519269943237305,4,6.768270969390869],\r\n [-6,4,7],\r\n [-9.443071365356445,4,7.157268047332764],\r\n [-5.981136798858643,4,6.664106369018555],\r\n [-6,4,7],\r\n [-9.519269943237305,4,6.768270969390869],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-5.981136798858643,4,6.664106369018555],\r\n [-9.519269943237305,4,6.768270969390869],\r\n [-5.924783706665039,4,6.332437038421631],\r\n [-5.981136798858643,4,6.664106369018555],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-5.8316497802734375,4,6.009162902832031],\r\n [-5.924783706665039,4,6.332437038421631],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-9.782233238220215,4,6.021356582641602],\r\n [-5.8316497802734375,4,6.009162902832031],\r\n [-9.63267707824707,4,6.388450622558594],\r\n [-5.702906608581543,4,5.6983489990234375],\r\n [-5.8316497802734375,4,6.009162902832031],\r\n [-9.782233238220215,4,6.021356582641602],\r\n [-9.966538429260254,4,5.6704206466674805],\r\n [-5.702906608581543,4,5.6983489990234375],\r\n [-9.782233238220215,4,6.021356582641602],\r\n [-5.540172576904297,4,5.403903961181641],\r\n [-5.702906608581543,4,5.6983489990234375],\r\n [-9.966538429260254,4,5.6704206466674805],\r\n [-10.18387222290039,4,5.338922500610352],\r\n [-5.540172576904297,4,5.403903961181641],\r\n [-9.966538429260254,4,5.6704206466674805],\r\n [-5.345494270324707,4,5.129530429840088],\r\n [-5.540172576904297,4,5.403903961181641],\r\n [-10.18387222290039,4,5.338922500610352],\r\n [-10.432201385498047,4,5.029961109161377],\r\n [-5.345494270324707,4,5.129530429840088],\r\n [-10.18387222290039,4,5.338922500610352],\r\n [-5.1213202476501465,4,4.8786797523498535],\r\n [-5.345494270324707,4,5.129530429840088],\r\n [-10.432201385498047,4,5.029961109161377],\r\n [-10.709206581115723,4,4.746423721313477],\r\n [-5.1213202476501465,4,4.8786797523498535],\r\n [-10.432201385498047,4,5.029961109161377],\r\n [-4.870469570159912,4,4.654505729675293],\r\n [-5.1213202476501465,4,4.8786797523498535],\r\n [-10.709206581115723,4,4.746423721313477],\r\n [-11.012296676635742,4,4.49096155166626],\r\n [-4.870469570159912,4,4.654505729675293],\r\n [-10.709206581115723,4,4.746423721313477],\r\n [-4.596096038818359,4,4.459827423095703],\r\n [-4.870469570159912,4,4.654505729675293],\r\n [-11.012296676635742,4,4.49096155166626],\r\n [-11.338640213012695,4,4.265961647033691],\r\n [-4.596096038818359,4,4.459827423095703],\r\n [-11.012296676635742,4,4.49096155166626],\r\n [-4.3016510009765625,4,4.297093391418457],\r\n [-4.596096038818359,4,4.459827423095703],\r\n [-11.338640213012695,4,4.265961647033691],\r\n [-11.685185432434082,4,4.073527812957764],\r\n [-4.3016510009765625,4,4.297093391418457],\r\n [-11.338640213012695,4,4.265961647033691],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-4.3016510009765625,4,4.297093391418457],\r\n [-11.685185432434082,4,4.073527812957764],\r\n [-12.048694610595703,4,3.9154579639434814],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-11.685185432434082,4,4.073527812957764],\r\n [0,4,9.959693973479841e-16],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-12.048694610595703,4,3.9154579639434814],\r\n [-12.425768852233887,4,3.7932300567626953],\r\n [0,4,9.959693973479841e-16],\r\n [-12.048694610595703,4,3.9154579639434814],\r\n [-12.812884330749512,4,3.70798659324646],\r\n [0,4,9.959693973479841e-16],\r\n [-12.425768852233887,4,3.7932300567626953],\r\n [-13.206421852111816,4,3.6605241298675537],\r\n [0,4,9.959693973479841e-16],\r\n [-12.812884330749512,4,3.70798659324646],\r\n [-13.602704048156738,4,3.6512866020202637],\r\n [0,4,9.959693973479841e-16],\r\n [-13.206421852111816,4,3.6605241298675537],\r\n [-26,4,4.712057414586355e-15],\r\n [0,4,9.959693973479841e-16],\r\n [-13.602704048156738,4,3.6512866020202637],\r\n [-13.998025894165039,4,3.6803600788116455],\r\n [-26,4,4.712057414586355e-15],\r\n [-13.602704048156738,4,3.6512866020202637],\r\n [-14.388692855834961,4,3.7474727630615234],\r\n [-26,4,4.712057414586355e-15],\r\n [-13.998025894165039,4,3.6803600788116455],\r\n [-14.771053314208984,4,3.8519976139068604],\r\n [-26,4,4.712057414586355e-15],\r\n [-14.388692855834961,4,3.7474727630615234],\r\n [-15.141532897949219,4,3.992957353591919],\r\n [-26,4,4.712057414586355e-15],\r\n [-14.771053314208984,4,3.8519976139068604],\r\n [-15.496668815612793,4,4.169034481048584],\r\n [-26,4,4.712057414586355e-15],\r\n [-15.141532897949219,4,3.992957353591919],\r\n [-15.833142280578613,4,4.3785834312438965],\r\n [-26,4,4.712057414586355e-15],\r\n [-15.496668815612793,4,4.169034481048584],\r\n [-21,4,5.849999904632568],\r\n [-26,4,4.712057414586355e-15],\r\n [-15.833142280578613,4,4.3785834312438965],\r\n [-16.14780616760254,4,4.619645595550537],\r\n [-21,4,5.849999904632568],\r\n [-15.833142280578613,4,4.3785834312438965],\r\n [0,4,9.959693973479841e-16],\r\n [-3.66756272315979,4,4.075216293334961],\r\n [-3.9908370971679688,4,4.1683502197265625],\r\n [-3.335893392562866,4,4.018863201141357],\r\n [-3.66756272315979,4,4.075216293334961],\r\n [0,4,9.959693973479841e-16],\r\n [-3,4,4],\r\n [-3.335893392562866,4,4.018863201141357],\r\n [0,4,9.959693973479841e-16],\r\n [0,4,9.959693973479841e-16],\r\n [0,4,4],\r\n [-3,4,4],\r\n [-17.93317985534668,4,9.649999618530273],\r\n [-17.133180618286133,4,5.849999904632568],\r\n [-17.133180618286133,4,9.649999618530273],\r\n [-21,4,9.649999618530273],\r\n [-16.43772315979004,4,10.61003303527832],\r\n [-16.14780616760254,4,10.880354881286621],\r\n [-16.700178146362305,4,10.31297779083252],\r\n [-16.43772315979004,4,10.61003303527832],\r\n [-21,4,9.649999618530273],\r\n [0,0,0],\r\n [0,4,4],\r\n [0,4,9.959693973479841e-16],\r\n [0,-1.1102230246251565e-15,4],\r\n [0,4,4],\r\n [0,0,0]],\r\n polygons: [\r\n [0,1,2],\r\n [3,4,5],\r\n [6,7,8],\r\n [9,10,11],\r\n [12,13,14],\r\n [15,16,17],\r\n [18,19,20],\r\n [21,22,23],\r\n [24,25,26],\r\n [27,28,29],\r\n [30,31,32],\r\n [33,34,35],\r\n [36,37,38],\r\n [39,40,41],\r\n [42,43,44],\r\n [45,46,47],\r\n [48,49,50],\r\n [51,52,53],\r\n [54,55,56],\r\n [57,58,59],\r\n [60,61,62],\r\n [63,64,65],\r\n [66,67,68],\r\n [69,70,71],\r\n [72,73,74],\r\n [75,76,77],\r\n [78,79,80],\r\n [81,82,83],\r\n [84,85,86],\r\n [87,88,89],\r\n [90,91,92],\r\n [93,94,95],\r\n [96,97,98],\r\n [99,100,101],\r\n [102,103,104],\r\n [105,106,107],\r\n [108,109,110],\r\n [111,112,113],\r\n [114,115,116],\r\n [117,118,119],\r\n [120,121,122],\r\n [123,124,125],\r\n [126,127,128],\r\n [129,130,131],\r\n [132,133,134],\r\n [135,136,137],\r\n [138,139,140],\r\n [141,142,143],\r\n [144,145,146],\r\n [147,148,149],\r\n [150,151,152],\r\n [153,154,155],\r\n [156,157,158],\r\n [159,160,161],\r\n [162,163,164],\r\n [165,166,167],\r\n [168,169,170],\r\n [171,172,173],\r\n [174,175,176],\r\n [177,178,179],\r\n [180,181,182],\r\n [183,184,185],\r\n [186,187,188],\r\n [189,190,191],\r\n [192,193,194],\r\n [195,196,197],\r\n [198,199,200],\r\n [201,202,203],\r\n [204,205,206],\r\n [207,208,209],\r\n [210,211,212],\r\n [213,214,215],\r\n [216,217,218],\r\n [219,220,221],\r\n [222,223,224],\r\n [225,226,227],\r\n [228,229,230],\r\n [231,232,233],\r\n [234,235,236],\r\n [237,238,239],\r\n [240,241,242],\r\n [243,244,245],\r\n [246,247,248],\r\n [249,250,251],\r\n [252,253,254],\r\n [255,256,257],\r\n [258,259,260],\r\n [261,262,263],\r\n [264,265,266],\r\n [267,268,269],\r\n [270,271,272],\r\n [273,274,275],\r\n [276,277,278],\r\n [279,280,281],\r\n [282,283,284],\r\n [285,286,287],\r\n [288,289,290],\r\n [291,292,293],\r\n [294,295,296],\r\n [297,298,299],\r\n [300,301,302],\r\n [303,304,305],\r\n [306,307,308],\r\n [309,310,311],\r\n [312,313,314],\r\n [315,316,317],\r\n [318,319,320],\r\n [321,322,323],\r\n [324,325,326],\r\n [327,328,329],\r\n [330,331,332],\r\n [333,334,335],\r\n [336,337,338],\r\n [339,340,341],\r\n [342,343,344],\r\n [345,346,347],\r\n [348,349,350],\r\n [351,352,353],\r\n [354,355,356],\r\n [357,358,359],\r\n [360,361,362],\r\n [363,364,365],\r\n [366,367,368],\r\n [369,370,371],\r\n [372,373,374],\r\n [375,376,377],\r\n [378,379,380],\r\n [381,382,383],\r\n [384,385,386],\r\n [387,388,389],\r\n [390,391,392],\r\n [393,394,395],\r\n [396,397,398],\r\n [399,400,401],\r\n [402,403,404],\r\n [405,406,407],\r\n [408,409,410],\r\n [411,412,413],\r\n [414,415,416],\r\n [417,418,419],\r\n [420,421,422],\r\n [423,424,425],\r\n [426,427,428],\r\n [429,430,431],\r\n [432,433,434],\r\n [435,436,437],\r\n [438,439,440],\r\n [441,442,443],\r\n [444,445,446],\r\n [447,448,449],\r\n [450,451,452],\r\n [453,454,455],\r\n [456,457,458],\r\n [459,460,461],\r\n [462,463,464],\r\n [465,466,467],\r\n [468,469,470],\r\n [471,472,473],\r\n [474,475,476],\r\n [477,478,479],\r\n [480,481,482],\r\n [483,484,485],\r\n [486,487,488],\r\n [489,490,491],\r\n [492,493,494],\r\n [495,496,497],\r\n [498,499,500],\r\n [501,502,503],\r\n [504,505,506],\r\n [507,508,509],\r\n [510,511,512],\r\n [513,514,515],\r\n [516,517,518],\r\n [519,520,521],\r\n [522,523,524],\r\n [525,526,527],\r\n [528,529,530],\r\n [531,532,533],\r\n [534,535,536],\r\n [537,538,539],\r\n [540,541,542],\r\n [543,544,545],\r\n [546,547,548],\r\n [549,550,551],\r\n [552,553,554],\r\n [555,556,557],\r\n [558,559,560],\r\n [561,562,563],\r\n [564,565,566],\r\n [567,568,569],\r\n [570,571,572],\r\n [573,574,575],\r\n [576,577,578],\r\n [579,580,581],\r\n [582,583,584],\r\n [585,586,587],\r\n [588,589,590],\r\n [591,592,593],\r\n [594,595,596],\r\n [597,598,599],\r\n [600,601,602],\r\n [603,604,605],\r\n [606,607,608],\r\n [609,610,611],\r\n [612,613,614],\r\n [615,616,617],\r\n [618,619,620],\r\n [621,622,623],\r\n [624,625,626],\r\n [627,628,629],\r\n [630,631,632],\r\n [633,634,635],\r\n [636,637,638],\r\n [639,640,641],\r\n [642,643,644],\r\n [645,646,647],\r\n [648,649,650],\r\n [651,652,653],\r\n [654,655,656],\r\n [657,658,659],\r\n [660,661,662],\r\n [663,664,665],\r\n [666,667,668],\r\n [669,670,671],\r\n [672,673,674],\r\n [675,676,677],\r\n [678,679,680],\r\n [681,682,683],\r\n [684,685,686],\r\n [687,688,689],\r\n [690,691,692],\r\n [693,694,695],\r\n [696,697,698],\r\n [699,700,701],\r\n [702,703,704],\r\n [705,706,707],\r\n [708,709,710],\r\n [711,712,713],\r\n [714,715,716],\r\n [717,718,719],\r\n [720,721,722],\r\n [723,724,725],\r\n [726,727,728],\r\n [729,730,731],\r\n [732,733,734],\r\n [735,736,737],\r\n [738,739,740],\r\n [741,742,743],\r\n [744,745,746],\r\n [747,748,749],\r\n [750,751,752],\r\n [753,754,755],\r\n [756,757,758],\r\n [759,760,761],\r\n [762,763,764],\r\n [765,766,767],\r\n [768,769,770],\r\n [771,772,773],\r\n [774,775,776],\r\n [777,778,779],\r\n [780,781,782],\r\n [783,784,785],\r\n [786,787,788],\r\n [789,790,791],\r\n [792,793,794],\r\n [795,796,797],\r\n [798,799,800],\r\n [801,802,803],\r\n [804,805,806],\r\n [807,808,809],\r\n [810,811,812],\r\n [813,814,815],\r\n [816,817,818],\r\n [819,820,821],\r\n [822,823,824],\r\n [825,826,827],\r\n [828,829,830],\r\n [831,832,833],\r\n [834,835,836],\r\n [837,838,839],\r\n [840,841,842],\r\n [843,844,845],\r\n [846,847,848],\r\n [849,850,851],\r\n [852,853,854],\r\n [855,856,857],\r\n [858,859,860],\r\n [861,862,863],\r\n [864,865,866],\r\n [867,868,869],\r\n [870,871,872],\r\n [873,874,875],\r\n [876,877,878],\r\n [879,880,881],\r\n [882,883,884],\r\n [885,886,887],\r\n [888,889,890],\r\n [891,892,893],\r\n [894,895,896],\r\n [897,898,899],\r\n [900,901,902],\r\n [903,904,905],\r\n [906,907,908],\r\n [909,910,911],\r\n [912,913,914],\r\n [915,916,917],\r\n [918,919,920],\r\n [921,922,923],\r\n [924,925,926],\r\n [927,928,929],\r\n [930,931,932],\r\n [933,934,935],\r\n [936,937,938],\r\n [939,940,941],\r\n [942,943,944],\r\n [945,946,947],\r\n [948,949,950],\r\n [951,952,953],\r\n [954,955,956],\r\n [957,958,959],\r\n [960,961,962],\r\n [963,964,965],\r\n [966,967,968],\r\n [969,970,971],\r\n [972,973,974],\r\n [975,976,977],\r\n [978,979,980],\r\n [981,982,983],\r\n [984,985,986],\r\n [987,988,989],\r\n [990,991,992],\r\n [993,994,995],\r\n [996,997,998],\r\n [999,1000,1001],\r\n [1002,1003,1004],\r\n [1005,1006,1007],\r\n [1008,1009,1010],\r\n [1011,1012,1013],\r\n [1014,1015,1016],\r\n [1017,1018,1019],\r\n [1020,1021,1022],\r\n [1023,1024,1025],\r\n [1026,1027,1028],\r\n [1029,1030,1031],\r\n [1032,1033,1034],\r\n [1035,1036,1037],\r\n [1038,1039,1040],\r\n [1041,1042,1043],\r\n [1044,1045,1046],\r\n [1047,1048,1049],\r\n [1050,1051,1052],\r\n [1053,1054,1055],\r\n [1056,1057,1058],\r\n [1059,1060,1061],\r\n [1062,1063,1064],\r\n [1065,1066,1067],\r\n [1068,1069,1070],\r\n [1071,1072,1073],\r\n [1074,1075,1076],\r\n [1077,1078,1079],\r\n [1080,1081,1082],\r\n [1083,1084,1085],\r\n [1086,1087,1088],\r\n [1089,1090,1091],\r\n [1092,1093,1094],\r\n [1095,1096,1097],\r\n [1098,1099,1100],\r\n [1101,1102,1103],\r\n [1104,1105,1106],\r\n [1107,1108,1109],\r\n [1110,1111,1112],\r\n [1113,1114,1115],\r\n [1116,1117,1118],\r\n [1119,1120,1121],\r\n [1122,1123,1124],\r\n [1125,1126,1127],\r\n [1128,1129,1130],\r\n [1131,1132,1133],\r\n [1134,1135,1136],\r\n [1137,1138,1139],\r\n [1140,1141,1142],\r\n [1143,1144,1145],\r\n [1146,1147,1148],\r\n [1149,1150,1151],\r\n [1152,1153,1154],\r\n [1155,1156,1157],\r\n [1158,1159,1160],\r\n [1161,1162,1163],\r\n [1164,1165,1166],\r\n [1167,1168,1169],\r\n [1170,1171,1172],\r\n [1173,1174,1175],\r\n [1176,1177,1178],\r\n [1179,1180,1181],\r\n [1182,1183,1184],\r\n [1185,1186,1187],\r\n [1188,1189,1190],\r\n [1191,1192,1193],\r\n [1194,1195,1196],\r\n [1197,1198,1199],\r\n [1200,1201,1202],\r\n [1203,1204,1205],\r\n [1206,1207,1208],\r\n [1209,1210,1211],\r\n [1212,1213,1214],\r\n [1215,1216,1217],\r\n [1218,1219,1220],\r\n [1221,1222,1223],\r\n [1224,1225,1226],\r\n [1227,1228,1229],\r\n [1230,1231,1232],\r\n [1233,1234,1235],\r\n [1236,1237,1238],\r\n [1239,1240,1241],\r\n [1242,1243,1244],\r\n [1245,1246,1247],\r\n [1248,1249,1250],\r\n [1251,1252,1253],\r\n [1254,1255,1256],\r\n [1257,1258,1259],\r\n [1260,1261,1262],\r\n [1263,1264,1265],\r\n [1266,1267,1268],\r\n [1269,1270,1271],\r\n [1272,1273,1274],\r\n [1275,1276,1277],\r\n [1278,1279,1280],\r\n [1281,1282,1283],\r\n [1284,1285,1286],\r\n [1287,1288,1289],\r\n [1290,1291,1292],\r\n [1293,1294,1295],\r\n [1296,1297,1298],\r\n [1299,1300,1301],\r\n [1302,1303,1304],\r\n [1305,1306,1307],\r\n [1308,1309,1310],\r\n [1311,1312,1313],\r\n [1314,1315,1316],\r\n [1317,1318,1319],\r\n [1320,1321,1322],\r\n [1323,1324,1325],\r\n [1326,1327,1328],\r\n [1329,1330,1331],\r\n [1332,1333,1334],\r\n [1335,1336,1337],\r\n [1338,1339,1340],\r\n [1341,1342,1343],\r\n [1344,1345,1346],\r\n [1347,1348,1349],\r\n [1350,1351,1352],\r\n [1353,1354,1355],\r\n [1356,1357,1358],\r\n [1359,1360,1361],\r\n [1362,1363,1364],\r\n [1365,1366,1367],\r\n [1368,1369,1370],\r\n [1371,1372,1373],\r\n [1374,1375,1376],\r\n [1377,1378,1379],\r\n [1380,1381,1382],\r\n [1383,1384,1385],\r\n [1386,1387,1388],\r\n [1389,1390,1391],\r\n [1392,1393,1394],\r\n [1395,1396,1397],\r\n [1398,1399,1400],\r\n [1401,1402,1403],\r\n [1404,1405,1406],\r\n [1407,1408,1409],\r\n [1410,1411,1412],\r\n [1413,1414,1415],\r\n [1416,1417,1418],\r\n [1419,1420,1421],\r\n [1422,1423,1424],\r\n [1425,1426,1427],\r\n [1428,1429,1430],\r\n [1431,1432,1433],\r\n [1434,1435,1436],\r\n [1437,1438,1439],\r\n [1440,1441,1442],\r\n [1443,1444,1445],\r\n [1446,1447,1448],\r\n [1449,1450,1451],\r\n [1452,1453,1454],\r\n [1455,1456,1457],\r\n [1458,1459,1460],\r\n [1461,1462,1463],\r\n [1464,1465,1466],\r\n [1467,1468,1469],\r\n [1470,1471,1472],\r\n [1473,1474,1475],\r\n [1476,1477,1478],\r\n [1479,1480,1481],\r\n [1482,1483,1484],\r\n [1485,1486,1487],\r\n [1488,1489,1490],\r\n [1491,1492,1493],\r\n [1494,1495,1496],\r\n [1497,1498,1499],\r\n [1500,1501,1502],\r\n [1503,1504,1505],\r\n [1506,1507,1508],\r\n [1509,1510,1511],\r\n [1512,1513,1514],\r\n [1515,1516,1517],\r\n [1518,1519,1520],\r\n [1521,1522,1523],\r\n [1524,1525,1526],\r\n [1527,1528,1529],\r\n [1530,1531,1532],\r\n [1533,1534,1535],\r\n [1536,1537,1538],\r\n [1539,1540,1541],\r\n [1542,1543,1544],\r\n [1545,1546,1547],\r\n [1548,1549,1550],\r\n [1551,1552,1553],\r\n [1554,1555,1556],\r\n [1557,1558,1559],\r\n [1560,1561,1562],\r\n [1563,1564,1565],\r\n [1566,1567,1568],\r\n [1569,1570,1571],\r\n [1572,1573,1574],\r\n [1575,1576,1577],\r\n [1578,1579,1580],\r\n [1581,1582,1583],\r\n [1584,1585,1586],\r\n [1587,1588,1589],\r\n [1590,1591,1592],\r\n [1593,1594,1595],\r\n [1596,1597,1598],\r\n [1599,1600,1601],\r\n [1602,1603,1604],\r\n [1605,1606,1607],\r\n [1608,1609,1610],\r\n [1611,1612,1613],\r\n [1614,1615,1616],\r\n [1617,1618,1619],\r\n [1620,1621,1622],\r\n [1623,1624,1625],\r\n [1626,1627,1628],\r\n [1629,1630,1631],\r\n [1632,1633,1634],\r\n [1635,1636,1637],\r\n [1638,1639,1640],\r\n [1641,1642,1643],\r\n [1644,1645,1646],\r\n [1647,1648,1649],\r\n [1650,1651,1652],\r\n [1653,1654,1655],\r\n [1656,1657,1658],\r\n [1659,1660,1661],\r\n [1662,1663,1664],\r\n [1665,1666,1667],\r\n [1668,1669,1670],\r\n [1671,1672,1673],\r\n [1674,1675,1676],\r\n [1677,1678,1679],\r\n [1680,1681,1682],\r\n [1683,1684,1685],\r\n [1686,1687,1688],\r\n [1689,1690,1691],\r\n [1692,1693,1694],\r\n [1695,1696,1697],\r\n [1698,1699,1700],\r\n [1701,1702,1703],\r\n [1704,1705,1706],\r\n [1707,1708,1709],\r\n [1710,1711,1712],\r\n [1713,1714,1715]] })\r\n ); \r\n }\r\n \r\n}", "title": "" }, { "docid": "4942d688ac89ead8b376a5b130731a5f", "score": "0.5323407", "text": "function area(height, width){\n if(!width){\n return Math.PI*height*height\n }\n return height*width\n}", "title": "" }, { "docid": "f08c672e2c889d08fe83484af7e897c2", "score": "0.53214276", "text": "get height() {\n return this.i.e0;\n }", "title": "" }, { "docid": "d842d66ce6d756fc56dbe34ea978a0e6", "score": "0.5309777", "text": "height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }", "title": "" }, { "docid": "a05eb58cf3dada57b6bae57e2a1a61b4", "score": "0.5301304", "text": "displaySize() {\n this.w = this.mxn * 100;\n this.h = this.mxn * 40;\n }", "title": "" }, { "docid": "db319033ca13fb76141bf7ca619c116a", "score": "0.5300615", "text": "function triArea(b, h) {\n //Area = 1/2 * base * height\n var area = .5 * b * h;\n return area;\n}", "title": "" }, { "docid": "b42ef7e471daacc1757d0b664ffa41b5", "score": "0.5297209", "text": "function area(w=4, h=2) {\n var area = w * h;\n document.write(area);\n}", "title": "" }, { "docid": "076a0164b8d3dc887ddfc9e4a1b9946d", "score": "0.52926344", "text": "get estimatedHeight() { return -1; }", "title": "" }, { "docid": "076a0164b8d3dc887ddfc9e4a1b9946d", "score": "0.52926344", "text": "get estimatedHeight() { return -1; }", "title": "" }, { "docid": "7ef8ed506bdfef29a0482cd178813c11", "score": "0.5292117", "text": "function squareArea( side ) {\n return side * side;\n}", "title": "" }, { "docid": "cabf600b0906f05864755666ce162c0c", "score": "0.5288812", "text": "function boil() { \n var waterH = 1; //sets water height to 1 (it would already be 1 from above increase function)\n \n //repeatedly...\n var decrease = Scene.scheduleRepeating(function() {\n water.setHeight(waterH); //set water height to the variable \"waterH\"\n waterH-=0.01; //decrease value of \"waterH\"\n \n //if water height reaches 0...\n if (waterH === 0) {\n decrease.dispose(); //stop decreasing height\n }\n }, 0);\n }", "title": "" }, { "docid": "81497f90ea26895af604b821c5e0e844", "score": "0.5286886", "text": "function isTallEnough(height) {\n\treturn height >= 50;\n}", "title": "" }, { "docid": "4ca7bac7c087571e9112f9f05b7e667d", "score": "0.5285154", "text": "function howHigh(height) {\n return (height + \" feet high!\");\n}", "title": "" }, { "docid": "b039d157148903a751ab6f1babf4fc47", "score": "0.5283597", "text": "getMinHeightUnit(){return this.__minHeightUnit}", "title": "" }, { "docid": "9d7f50a9f52f9146b25842d2fd8854dd", "score": "0.52813166", "text": "function calculateTitleSize(){\n remainder = floor_length % floor_width;\n while (remainder >= 0) {\n tile_length = tile_width;\n tile_width = remainder;\n remainder = tile_length % tile_width;\n }\n tile_width = tile_length;\n}", "title": "" }, { "docid": "da5cb8afef6f31cbd09630d793774a91", "score": "0.52786577", "text": "wareHouse() {\r\n\r\n // boxes group of bottom shelf\r\n var boxGroupOne = new MyPalette(10,5,0.5,10,5,1);\r\n boxGroupOne.translateY(5.5);\r\n boxGroupOne.rotateZ(0.2);\r\n var box2GroupOne = new MyPalette(10,5,0.5,10,5,1);\r\n box2GroupOne.translateX(10.5);\r\n box2GroupOne.translateY(7.5);\r\n box2GroupOne.rotateZ(0.2);\r\n\r\n // boxes group for middle shelf\r\n var boxGroupTwo = new MyPalette(10,5,0.5,10,5,1);\r\n boxGroupTwo.translateX(5);\r\n boxGroupTwo.translateY(17.5);\r\n boxGroupTwo.rotateZ(0.2);\r\n var box2GroupTwo = new MyPalette(10,5,0.5,10,5,1);\r\n box2GroupTwo.translateX(15.5);\r\n box2GroupTwo.translateY(19.5);\r\n box2GroupTwo.rotateZ(0.2);\r\n\r\n // boxes group for upper shelf\r\n var boxGroupThree = new MyPalette(10,5,0.5,10,5,1);\r\n boxGroupThree.translateX(11.5);\r\n boxGroupThree.translateY(31.5);\r\n boxGroupThree.rotateZ(-0.1);\r\n var box2GroupThree = new MyPalette(10,5,0.5,10,5,1);\r\n box2GroupThree.translateX(22);\r\n box2GroupThree.translateY(30.5);\r\n box2GroupThree.rotateZ(-0.1);\r\n\r\n // shelfs\r\n // bottom shelf\r\n var shelf = new MyShelf(32,0.5,5);\r\n shelf.translateY(5.5);\r\n shelf.rotateZ(0.2);\r\n\r\n // middle shelf\r\n var shelf2 = new MyShelf(32,0.5,5);\r\n shelf2.translateX(0);\r\n shelf2.translateY(16.5);\r\n shelf2.translateZ(0);\r\n shelf2.rotateZ(0.2);\r\n\r\n // upper shelf\r\n var shelf3 = new MyShelf(32,0.5,5);\r\n shelf3.translateX(0);\r\n shelf3.translateY(32.5);\r\n shelf3.translateZ(0);\r\n shelf3.rotateZ(-0.1);\r\n\r\n // shelf legs\r\n var shelfLegs = new MyShelfLegs(1, 37, 0.3);\r\n\r\n\r\n // add the objects\r\n this.add(boxGroupOne);\r\n this.add(box2GroupOne);\r\n\r\n this.add(boxGroupTwo);\r\n this.add(box2GroupTwo);\r\n\r\n this.add(boxGroupThree);\r\n this.add(box2GroupThree);\r\n\r\n this.add(shelf);\r\n this.add(shelf2);\r\n this.add(shelf3);\r\n\r\n this.add(shelfLegs);\r\n }", "title": "" }, { "docid": "3d6837574e13658b63cff003fee87f43", "score": "0.52631843", "text": "function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}", "title": "" }, { "docid": "2e4c6fe4093ca7d3ea73b2c636eb37f0", "score": "0.5261332", "text": "function buildHouse(number){\n let currentHousesOnProperty = gameState[number].houses\n gameState[number].houses += 1\n\n \n // If there are 3 or less houses, let us build a house.\n // If there are 4 houses, sell the houses and build a hotel.\n if (currentHousesOnProperty < 4){\n availableHouses--\n } else if (currentHousesOnProperty === 4){\n availableHouses += 4\n availableHotels--\n document.querySelector('.house-building-panel[position=\"' + number + '\"] .button-panel .build-house-button').classList.add('disabled-button')\n document.querySelector('.house-building-panel[position=\"' + number + '\"] .button-panel .sell-house-button').classList.remove('disabled-button')\n }\n \n payMoney({debtorID: gameState[number].ownerID, creditorID: 'bank', amount: spaces[number].houseCost})\n //players[spaces[number].owner.id - 1].money -= spaces[number].houseCost\n //updatePlayerDetails()\n \n // Update visual display to show new higher number of houses\n document.querySelector('.house-building-panel[position=\"' + number + '\"] .house-visual-display').setAttribute('houses', gameState[number].houses)\n \n // Find the item in the feedDetails array and update the number\n feedDetails.forEach(function(property){\n if (property.name === spaces[number].name){\n property.newBuildings++\n }\n })\n\n updateHouseDisplay(number)\n toggleHouseBuildButtons(spaces[number].group)\n updateBank()\n\n playSound('construction')\n }", "title": "" }, { "docid": "0c2cb7bd10780b49a4240aaa1f599cec", "score": "0.5255517", "text": "function Size(width, height) {\r\n var _self = this;\r\n\r\n this.width = width || 0;\r\n this.height = height || 0;\r\n\r\n //returns the square area\r\n this.area = function () {\r\n return _self.width * _self.height;\r\n }\r\n}", "title": "" }, { "docid": "42504e8a177a8e3eacfb17754f39f52d", "score": "0.5253994", "text": "steallife(life){\r\n var vida = (life.width*20)/100;\r\n return life.width-vida;\r\n }", "title": "" }, { "docid": "05467c4334f27cba1b4d839493a883ee", "score": "0.5250033", "text": "function displayUnitGrid() {\n for (let x = 0; x < columns; x++) {\n for (let y = 0; y < rows; y++) {\n if (unitMap[x][y] === 2) {\n if (showUnitMap === true) {\n tint(255, 255);\n image(britainUnit, x *blockWidth, y * blockHeight, blockWidth, blockHeight);\n }\n else {\n tint(255, 67);\n image(britainUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n }\n else if (unitMap[x][y] === 3) {\n if (showUnitMap === true) {\n tint(255, 255);\n image(spainUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n else {\n tint(255, 67);\n image(spainUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n }\n else if (unitMap[x][y] === 4) {\n if (showUnitMap === true) {\n tint(255, 255);\n image(franceUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n else {\n tint(255, 67);\n image(franceUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n }\n else if (unitMap[x][y] === 5) {\n if (showUnitMap === true) {\n tint(255, 255);\n image(portugalUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n else {\n tint(255, 67);\n image(portugalUnit, x * blockWidth, y *blockHeight, blockWidth, blockHeight);\n }\n }\n\n //actually makes the grid\n fill(255, 0);\n rect(x * blockWidth, y * blockHeight, blockWidth, blockHeight);\n }\n }\n}", "title": "" }, { "docid": "8a399174579109b23b9a8ceb6baf376e", "score": "0.52488774", "text": "function _drawHouses() {\n let template = ''\n let houses = store.State.houses\n\n houses.forEach((house, index) => template += house.getTemplate(index))\n document.getElementById(\"houses\").innerHTML = template\n}", "title": "" }, { "docid": "f34bd68c5be55b4d9c1ba91a4dbd1ecb", "score": "0.52446187", "text": "constructor(height, weight) {\n //Instances Variables\n this.height = height;\n this.weight = weight;\n }", "title": "" }, { "docid": "2eb73815189dc8ca80cf6d167fb6dc3f", "score": "0.52430916", "text": "get Height()\r\n\t{\r\n\t\treturn Math.abs(this._bottom - this._top);\r\n\t}", "title": "" }, { "docid": "c12523ca4cc18403c27ee60060be17ee", "score": "0.52407724", "text": "getHeight()\n {\n return this.h;\n }", "title": "" }, { "docid": "c3edacc108082b13cef4e3f969cbbbc4", "score": "0.5239414", "text": "function squareArea(side){\n return side * side\n}", "title": "" }, { "docid": "8402e8261d605d5a5414542d687d967e", "score": "0.5238466", "text": "constructor(n, w, h) {\n \n }", "title": "" }, { "docid": "05ba1aef8ba34d9db5503f710031acf1", "score": "0.5225215", "text": "function height$1 (height) {\r\n let b = this.bbox();\r\n return height == null ? b.height : this.size(b.width, height)\r\n}", "title": "" }, { "docid": "0927416dd30060e50e01bb058d44394f", "score": "0.52179307", "text": "constructor (width, height) {\n this.width = width;\n this.height = height;\n }", "title": "" }, { "docid": "53821ce59425d02788dc1a3c6e48cb8d", "score": "0.5217014", "text": "get height() { return this._height; }", "title": "" }, { "docid": "c0fa78a054482b50c2625908fc583c2b", "score": "0.52110565", "text": "static get HEIGHT_MULT() {return .72727272}", "title": "" }, { "docid": "4cdec02b89cb64d3c1b8bbbfc81d7933", "score": "0.5210789", "text": "function Bombing(matrixWithBunnies, bunniesWithBombs, length, height) {\n let totalDmg = 0\n let totalKillingSpree = 0\n\n for (let hopper of bunniesWithBombs) {\n let y = hopper[0]\n let x = hopper[1]\n let currentHopperCell = matrixWithBunnies[y][x]\n\n if (currentHopperCell <= 0) {\n continue\n }\n totalDmg += currentHopperCell\n totalKillingSpree++\n\n // up\n if (y < height && y > 0 && x >= 0 && x < length) {\n matrixWithBunnies[y - 1][x] -= currentHopperCell\n }\n // diagonal up right\n if (y < height && y > 0 && x >= 0 && x < length - 1) {\n matrixWithBunnies[y - 1][x + 1] -= currentHopperCell\n }\n // right\n if (y >= 0 && y < height && x >= 0 && x < length - 1) {\n matrixWithBunnies[y][x + 1] -= currentHopperCell\n }\n //diagonal right bot\n if (y >= 0 && y < height - 1 && x >= 0 && x < length - 1) {\n matrixWithBunnies[y + 1][x + 1] -= currentHopperCell\n }\n // bot\n if (y >= 0 && y < height - 1 && x >= 0 && x < length) {\n matrixWithBunnies[y + 1][x] -= currentHopperCell\n }\n // diagonala bot left\n if (y >= 0 && y < height - 1 && x > 0 && x < length) {\n matrixWithBunnies[y + 1][x - 1] -= currentHopperCell\n }\n // left\n if (y >= 0 && y < height && x > 0 && x < length) {\n matrixWithBunnies[y][x - 1] -= currentHopperCell\n }\n // diagonal left top\n if (y > 0 && y < height && x > 0 && x < length) {\n matrixWithBunnies[y - 1][x - 1] -= currentHopperCell\n }\n matrixWithBunnies[y][x] = 0\n }\n \n for (let i = 0; i < height; i++) {\n for (let j = 0; j < length; j++) {\n if (matrixWithBunnies[i][j] > 0) {\n totalKillingSpree++\n totalDmg += matrixWithBunnies[i][j]\n }\n }\n }\n console.log(totalDmg)\n console.log(totalKillingSpree)\n }", "title": "" }, { "docid": "8a1c31f6230503a7e11db000326ecc0b", "score": "0.5209215", "text": "findArea()\n\t{\n\t\treturn this.length*this.breadth;\n\t}", "title": "" }, { "docid": "47c65ed6761924f2507c9c757b192a32", "score": "0.52066714", "text": "function getArea(width, lenght, units) {\n var area = width * lenght;\n return area + ' ' + units;\n}", "title": "" }, { "docid": "97675f0e69b53fb7ea66b787873d5306", "score": "0.5206055", "text": "constructor(height, weight){\n //create local instances of variables\n this.height = height;\n this.weight = weight;\n }", "title": "" } ]
09194651f06e6c7e1a6c7c12994d237b
Provide a clean event with standardized offset values.
[ { "docid": "03a8fb2b19e042ab59ad3a12c8a426b0", "score": "0.53207916", "text": "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "title": "" } ]
[ { "docid": "b8ad82c498bb616dba7ba3bfc1faf2cd", "score": "0.5787094", "text": "clearEvents() {\n this.eventsOffset = this.events.length;\n }", "title": "" }, { "docid": "d37c1894ac8e831b11945855294f6716", "score": "0.5785293", "text": "function fixEvent ( e, pageOffset ) {\n\t\n\t\t\t\t// Prevent scrolling and panning on touch events, while\n\t\t\t\t// attempting to slide. The tap event also depends on this.\n\t\t\t\te.preventDefault();\n\t\n\t\t\t\t// Filter the event to register the type, which can be\n\t\t\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t\t\t// made on an event specific basis.\n\t\t\t\tvar touch = e.type.indexOf('touch') === 0,\n\t\t\t\t\tmouse = e.type.indexOf('mouse') === 0,\n\t\t\t\t\tpointer = e.type.indexOf('pointer') === 0,\n\t\t\t\t\tx,y, event = e;\n\t\n\t\t\t\t// IE10 implemented pointer events with a prefix;\n\t\t\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\t\t\tpointer = true;\n\t\t\t\t}\n\t\n\t\t\t\tif ( touch ) {\n\t\t\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t\t\t// so we can select the first 'changedTouch'.\n\t\t\t\t\tx = e.changedTouches[0].pageX;\n\t\t\t\t\ty = e.changedTouches[0].pageY;\n\t\t\t\t}\n\t\n\t\t\t\tpageOffset = pageOffset || getPageOffset();\n\t\n\t\t\t\tif ( mouse || pointer ) {\n\t\t\t\t\tx = e.clientX + pageOffset.x;\n\t\t\t\t\ty = e.clientY + pageOffset.y;\n\t\t\t\t}\n\t\n\t\t\t\tevent.pageOffset = pageOffset;\n\t\t\t\tevent.points = [x, y];\n\t\t\t\tevent.cursor = mouse || pointer; // Fix #435\n\t\n\t\t\t\treturn event;\n\t\t\t}", "title": "" }, { "docid": "4190b265e170a044e11fbf2a2ffd49ac", "score": "0.57567394", "text": "function fixEvent ( e, pageOffset ) {\n\n\t\t// Prevent scrolling and panning on touch events, while\n\t\t// attempting to slide. The tap event also depends on this.\n\t\te.preventDefault();\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0,\n\t\t\tmouse = e.type.indexOf('mouse') === 0,\n\t\t\tpointer = e.type.indexOf('pointer') === 0,\n\t\t\tx,y, event = e;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\tif ( touch ) {\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset();\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\tevent.pageOffset = pageOffset;\n\t\tevent.points = [x, y];\n\t\tevent.cursor = mouse || pointer; // Fix #435\n\n\t\treturn event;\n\t}", "title": "" }, { "docid": "0f9132c53726d5c6d8569f3b5f7d7933", "score": "0.5708023", "text": "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}", "title": "" }, { "docid": "0f9132c53726d5c6d8569f3b5f7d7933", "score": "0.5708023", "text": "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}", "title": "" }, { "docid": "0f9132c53726d5c6d8569f3b5f7d7933", "score": "0.5708023", "text": "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}", "title": "" }, { "docid": "ebd324520fc409115d4ce8d2b1b516af", "score": "0.57038367", "text": "function fixEvent ( e, pageOffset ) {\r\n\r\n\t\t\t// Prevent scrolling and panning on touch events, while\r\n\t\t\t// attempting to slide. The tap event also depends on this.\r\n\t\t\te.preventDefault();\r\n\r\n\t\t\t// Filter the event to register the type, which can be\r\n\t\t\t// touch, mouse or pointer. Offset changes need to be\r\n\t\t\t// made on an event specific basis.\r\n\t\t\tvar touch = e.type.indexOf('touch') === 0,\r\n\t\t\t\tmouse = e.type.indexOf('mouse') === 0,\r\n\t\t\t\tpointer = e.type.indexOf('pointer') === 0,\r\n\t\t\t\tx,y, event = e;\r\n\r\n\t\t\t// IE10 implemented pointer events with a prefix;\r\n\t\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\r\n\t\t\t\tpointer = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ( touch ) {\r\n\t\t\t\t// noUiSlider supports one movement at a time,\r\n\t\t\t\t// so we can select the first 'changedTouch'.\r\n\t\t\t\tx = e.changedTouches[0].pageX;\r\n\t\t\t\ty = e.changedTouches[0].pageY;\r\n\t\t\t}\r\n\r\n\t\t\tpageOffset = pageOffset || getPageOffset();\r\n\r\n\t\t\tif ( mouse || pointer ) {\r\n\t\t\t\tx = e.clientX + pageOffset.x;\r\n\t\t\t\ty = e.clientY + pageOffset.y;\r\n\t\t\t}\r\n\r\n\t\t\tevent.pageOffset = pageOffset;\r\n\t\t\tevent.points = [x, y];\r\n\t\t\tevent.cursor = mouse || pointer; // Fix #435\r\n\r\n\t\t\treturn event;\r\n\t\t}", "title": "" }, { "docid": "c2d790badbb7f1b91b8b29616a54bd4c", "score": "0.5674969", "text": "function fixEvent(e, pageOffset) {\n // Prevent scrolling and panning on touch events, while\n // attempting to slide. The tap event also depends on this.\n e.preventDefault();\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf('touch') === 0,\n mouse = e.type.indexOf('mouse') === 0,\n pointer = e.type.indexOf('pointer') === 0,\n x, y, event = e;\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf('MSPointer') === 0) {\n pointer = true;\n }\n if (touch) {\n // noUiSlider supports one movement at a time,\n // so we can select the first 'changedTouch'.\n x = e.changedTouches[0].pageX;\n y = e.changedTouches[0].pageY;\n }\n pageOffset = pageOffset || getPageOffset();\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n event.pageOffset = pageOffset;\n event.points = [x, y];\n event.cursor = mouse || pointer; // Fix #435\n return event;\n }", "title": "" }, { "docid": "978b35a8071ea90902c4fbbffcc774d2", "score": "0.5467146", "text": "function fixEvent ( e, pageOffset ) {\n\n\t\t// Prevent scrolling and panning on touch events, while\n\t\t// attempting to slide. The tap event also depends on this.\n\t\te.preventDefault();\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\tif ( touch ) {\n\n\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\n\t\t\t// It's useful when you have two or more sliders on one page,\n\t\t\t// that can be touched simultaneously.\n\t\t\t// #649, #663, #668\n\t\t\tif ( e.touches.length > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset();\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "title": "" }, { "docid": "c18bc8e5f66f1cb80825b45a60d9ef2c", "score": "0.54113054", "text": "function fixEvent ( e, pageOffset ) {\n\n // Prevent scrolling and panning on touch events, while\n // attempting to slide. The tap event also depends on this.\n e.preventDefault();\n\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf('touch') === 0;\n var mouse = e.type.indexOf('mouse') === 0;\n var pointer = e.type.indexOf('pointer') === 0;\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if ( e.type.indexOf('MSPointer') === 0 ) {\n pointer = true;\n }\n\n if ( touch ) {\n\n // Fix bug when user touches with two or more fingers on mobile devices.\n // It's useful when you have two or more sliders on one page,\n // that can be touched simultaneously.\n // #649, #663, #668\n if ( e.touches.length > 1 ) {\n return false;\n }\n\n // noUiSlider supports one movement at a time,\n // so we can select the first 'changedTouch'.\n x = e.changedTouches[0].pageX;\n y = e.changedTouches[0].pageY;\n }\n\n pageOffset = pageOffset || getPageOffset();\n\n if ( mouse || pointer ) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "title": "" }, { "docid": "d8ee4794e7b9053315a90fc816818678", "score": "0.5378552", "text": "function getOffset(event) {\n return {\n offsetX: event.offsetX === undefined ? event.layerX : event.offsetX,\n offsetY: event.offsetY === undefined ? event.layerY : event.offsetY\n };\n }", "title": "" }, { "docid": "f7d1b377305a91a863aead6eba1933e1", "score": "0.5376492", "text": "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n var x;\n var y;\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function (checkTouch) {\n return (checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget)));\n };\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n }\n else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n pageOffset = pageOffset || getPageOffset(scope_Document);\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n return e;\n }", "title": "" }, { "docid": "714c77759810da3c56c7ba1482fb3a4a", "score": "0.53749126", "text": "function fixEvent ( e, pageOffset ) {\r\n\r\n\t\t// Prevent scrolling and panning on touch events, while\r\n\t\t// attempting to slide. The tap event also depends on this.\r\n\t\te.preventDefault();\r\n\r\n\t\t// Filter the event to register the type, which can be\r\n\t\t// touch, mouse or pointer. Offset changes need to be\r\n\t\t// made on an event specific basis.\r\n\t\tvar touch = e.type.indexOf('touch') === 0;\r\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\r\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\r\n\t\tvar x;\r\n\t\tvar y;\r\n\r\n\t\t// IE10 implemented pointer events with a prefix;\r\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\r\n\t\t\tpointer = true;\r\n\t\t}\r\n\r\n\t\tif ( touch ) {\r\n\r\n\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\r\n\t\t\t// It's useful when you have two or more sliders on one page,\r\n\t\t\t// that can be touched simultaneously.\r\n\t\t\t// #649, #663, #668\r\n\t\t\tif ( e.touches.length > 1 ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// noUiSlider supports one movement at a time,\r\n\t\t\t// so we can select the first 'changedTouch'.\r\n\t\t\tx = e.changedTouches[0].pageX;\r\n\t\t\ty = e.changedTouches[0].pageY;\r\n\t\t}\r\n\r\n\t\tpageOffset = pageOffset || getPageOffset();\r\n\r\n\t\tif ( mouse || pointer ) {\r\n\t\t\tx = e.clientX + pageOffset.x;\r\n\t\t\ty = e.clientY + pageOffset.y;\r\n\t\t}\r\n\r\n\t\te.pageOffset = pageOffset;\r\n\t\te.points = [x, y];\r\n\t\te.cursor = mouse || pointer; // Fix #435\r\n\r\n\t\treturn e;\r\n\t}", "title": "" }, { "docid": "d793661d83c6bf082ea5f5ca151cc217", "score": "0.5371347", "text": "function fixEvent(e, pageOffset, eventTarget) {\n\t\t\t// Filter the event to register the type, which can be\n\t\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t\t// made on an event specific basis.\n\t\t\tvar touch = e.type.indexOf(\"touch\") === 0;\n\t\t\tvar mouse = e.type.indexOf(\"mouse\") === 0;\n\t\t\tvar pointer = e.type.indexOf(\"pointer\") === 0;\n\n\t\t\tvar x;\n\t\t\tvar y;\n\n\t\t\t// IE10 implemented pointer events with a prefix;\n\t\t\tif (e.type.indexOf(\"MSPointer\") === 0) {\n\t\t\t\tpointer = true;\n\t\t\t}\n\n\t\t\t// Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n\t\t\t// the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n\t\t\t// events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n\t\t\tif (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// The only thing one handle should be concerned about is the touches that originated on top of it.\n\t\t\tif (touch) {\n\t\t\t\t// Returns true if a touch originated on the target.\n\t\t\t\tvar isTouchOnTarget = function (checkTouch) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tcheckTouch.target === eventTarget ||\n\t\t\t\t\t\teventTarget.contains(checkTouch.target) ||\n\t\t\t\t\t\t(checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t\t// touch on the target so we look amongst all touches.\n\t\t\t\tif (e.type === \"touchstart\") {\n\t\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n\t\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\t\tif (targetTouches.length > 1) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\t\ty = targetTouches[0].pageY;\n\t\t\t\t} else {\n\t\t\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n\t\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\t\tif (!targetTouch) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tx = targetTouch.pageX;\n\t\t\t\t\ty = targetTouch.pageY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\t\tif (mouse || pointer) {\n\t\t\t\tx = e.clientX + pageOffset.x;\n\t\t\t\ty = e.clientY + pageOffset.y;\n\t\t\t}\n\n\t\t\te.pageOffset = pageOffset;\n\t\t\te.points = [x, y];\n\t\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\t\treturn e;\n\t\t}", "title": "" }, { "docid": "70bb4a90b136f67c97509c660a85f58f", "score": "0.5350418", "text": "function correctOffset(e) {\n var b = (e.type === \"DOMNodeRemoved\");\n \n for(var i = $canvases.length - 1; i >= 0; i--) {\n var canvas = $canvases[i];\n if (b === false && canvas.isFullScreen) {\n canvas.setLocation(0, 0);\n canvas.setSize(window.innerWidth, window.innerHeight);\n }\n\n canvas.recalcOffset();\n if (b && e.target == canvas.canvas) {\n $canvases.splice(i, 1);\n }\n }\n }", "title": "" }, { "docid": "d09d3bf7b0950b3a25ccaafab994d6f4", "score": "0.5338645", "text": "function fixEvent(e, pageOffset, eventTarget) {\r\n // Filter the event to register the type, which can be\r\n // touch, mouse or pointer. Offset changes need to be\r\n // made on an event specific basis.\r\n var touch = e.type.indexOf(\"touch\") === 0;\r\n var mouse = e.type.indexOf(\"mouse\") === 0;\r\n var pointer = e.type.indexOf(\"pointer\") === 0;\r\n\r\n var x;\r\n var y;\r\n\r\n // IE10 implemented pointer events with a prefix;\r\n if (e.type.indexOf(\"MSPointer\") === 0) {\r\n pointer = true;\r\n }\r\n\r\n // The only thing one handle should be concerned about is the touches that originated on top of it.\r\n if (touch) {\r\n // Returns true if a touch originated on the target.\r\n var isTouchOnTarget = function(checkTouch) {\r\n return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\r\n };\r\n\r\n // In the case of touchstart events, we need to make sure there is still no more than one\r\n // touch on the target so we look amongst all touches.\r\n if (e.type === \"touchstart\") {\r\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\r\n\r\n // Do not support more than one touch per handle.\r\n if (targetTouches.length > 1) {\r\n return false;\r\n }\r\n\r\n x = targetTouches[0].pageX;\r\n y = targetTouches[0].pageY;\r\n } else {\r\n // In the other cases, find on changedTouches is enough.\r\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\r\n\r\n // Cancel if the target touch has not moved.\r\n if (!targetTouch) {\r\n return false;\r\n }\r\n\r\n x = targetTouch.pageX;\r\n y = targetTouch.pageY;\r\n }\r\n }\r\n\r\n pageOffset = pageOffset || getPageOffset(scope_Document);\r\n\r\n if (mouse || pointer) {\r\n x = e.clientX + pageOffset.x;\r\n y = e.clientY + pageOffset.y;\r\n }\r\n\r\n e.pageOffset = pageOffset;\r\n e.points = [x, y];\r\n e.cursor = mouse || pointer; // Fix #435\r\n\r\n return e;\r\n }", "title": "" }, { "docid": "3ebac910715192923560ccccb5132d97", "score": "0.5320259", "text": "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return (\n checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n );\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "title": "" }, { "docid": "3ebac910715192923560ccccb5132d97", "score": "0.5320259", "text": "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return (\n checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n );\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "title": "" }, { "docid": "4105a347f7109c18ca3cc5215193f5d7", "score": "0.52342707", "text": "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n var x;\n var y;\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n if (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n return false;\n }\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function (checkTouch) {\n return (checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget)));\n };\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n }\n else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n pageOffset = pageOffset || getPageOffset(scope_Document);\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n return e;\n }", "title": "" }, { "docid": "0e277fc4a43e06b3772b0a8a8a1c742a", "score": "0.52157545", "text": "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n } else {\n this.offset = offset;\n }\n }", "title": "" }, { "docid": "167401f8f69e7c4598b9f3a8ee9f2c36", "score": "0.5158266", "text": "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "title": "" }, { "docid": "167401f8f69e7c4598b9f3a8ee9f2c36", "score": "0.5158266", "text": "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "title": "" }, { "docid": "167401f8f69e7c4598b9f3a8ee9f2c36", "score": "0.5158266", "text": "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "title": "" }, { "docid": "890e8278d67b1883c7f7b0ca6853a9f7", "score": "0.506628", "text": "_updateOffsets() {\n if (this._isDestroyed) return;\n\n const item = this._item;\n const migrate = item._migrate;\n const release = item._release;\n\n this._offsetLeft = release._isActive\n ? release._containerDiffX\n : migrate._isActive\n ? migrate._containerDiffX\n : 0;\n\n this._offsetTop = release._isActive\n ? release._containerDiffY\n : migrate._isActive\n ? migrate._containerDiffY\n : 0;\n }", "title": "" }, { "docid": "c852c0cd19cc23652326db1ff74ca2e4", "score": "0.5065523", "text": "mouseMoveCalc (event) {\n let offset = {\n x: event.clientX - this.prevMouseMoveEvent.clientX,\n y: event.clientY - this.prevMouseMoveEvent.clientY\n }\n if (isMobile === true) {\n offset = {\n x:\n event.touches[0].clientX -\n this.prevMouseMoveEvent.touches[0].clientX,\n y:\n event.touches[0].clientY -\n this.prevMouseMoveEvent.touches[0].clientY\n }\n }\n let targetOffset = this.correctOffsetInContainer(offset)\n this.setCurPos(targetOffset)\n // save the previous event to calculate position next time\n this.prevMouseMoveEvent = event\n }", "title": "" }, { "docid": "6106e5f45366384b6ddde3cb1545aec7", "score": "0.50536656", "text": "function fixEvent ( e, pageOffset, eventTarget ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch ) {\n\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (checkTouch) {\n\t\t\t\treturn checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n\t\t\t};\n\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\n\t\t\t} else {\n\n\t\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "title": "" }, { "docid": "6106e5f45366384b6ddde3cb1545aec7", "score": "0.50536656", "text": "function fixEvent ( e, pageOffset, eventTarget ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch ) {\n\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (checkTouch) {\n\t\t\t\treturn checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n\t\t\t};\n\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\n\t\t\t} else {\n\n\t\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "title": "" }, { "docid": "f940a4da1054f19784320eb83b359fb9", "score": "0.5039425", "text": "splitMarkerAtOffset() {\n let blankEdit = { added: [], removed: [] };\n return blankEdit;\n }", "title": "" }, { "docid": "0531634e92f4ed30c8c51dee04e05729", "score": "0.5035762", "text": "function getNormalizedEventCoords(evt, pageOffset, clientRect) {\n if (!evt) {\n return { x: 0, y: 0 };\n }\n var x = pageOffset.x, y = pageOffset.y;\n var documentX = x + clientRect.left;\n var documentY = y + clientRect.top;\n var normalizedX;\n var normalizedY;\n // Determine touch point relative to the ripple container.\n if (evt.type === 'touchstart') {\n var touchEvent = evt;\n normalizedX = touchEvent.changedTouches[0].pageX - documentX;\n normalizedY = touchEvent.changedTouches[0].pageY - documentY;\n }\n else {\n var mouseEvent = evt;\n normalizedX = mouseEvent.pageX - documentX;\n normalizedY = mouseEvent.pageY - documentY;\n }\n return { x: normalizedX, y: normalizedY };\n}", "title": "" }, { "docid": "a4270cd9aa135772cfe957814f5a5d89", "score": "0.50274235", "text": "function getSetOffset(input,keepLocalTime){\nvar offset=this._offset||0,\nlocalAdjust;\nif(!this.isValid()){\nreturn input!=null?this:NaN;}\n\nif(input!=null){\nif(typeof input==='string'){\ninput=offsetFromString(matchShortOffset,input);}else \nif(Math.abs(input)<16){\ninput=input*60;}\n\nif(!this._isUTC&&keepLocalTime){\nlocalAdjust=getDateOffset(this);}\n\nthis._offset=input;\nthis._isUTC=true;\nif(localAdjust!=null){\nthis.add(localAdjust,'m');}\n\nif(offset!==input){\nif(!keepLocalTime||this._changeInProgress){\nadd_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else \nif(!this._changeInProgress){\nthis._changeInProgress=true;\nutils_hooks__hooks.updateOffset(this,true);\nthis._changeInProgress=null;}}\n\n\nreturn this;}else \n{\nreturn this._isUTC?offset:getDateOffset(this);}}", "title": "" }, { "docid": "b9c632f13a4716c0b00d34ac128424d1", "score": "0.5022093", "text": "cloneEvent (event) {\n return {\n da: event.da,\n latLng: event.latLng,\n pixel: event.pixel\n };\n }", "title": "" }, { "docid": "7f2a65eecf06e9a9be901fcfcafedc22", "score": "0.50114554", "text": "function fixEvent ( e ) {\n\n\t\t// Prevent scrolling and panning on touch events, while\n\t\t// attempting to slide. The tap event also depends on this.\n\t\te.preventDefault();\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0\n\t\t\t,mouse = e.type.indexOf('mouse') === 0\n\t\t\t,pointer = e.type.indexOf('pointer') === 0\n\t\t\t,x,y, event = e;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\t// Get the originalEvent, if the event has been wrapped\n\t\t// by jQuery. Zepto doesn't wrap the event.\n\t\tif ( e.originalEvent ) {\n\t\t\te = e.originalEvent;\n\t\t}\n\n\t\tif ( touch ) {\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tif ( mouse || pointer ) {\n\n\t\t\t// Polyfill the pageXOffset and pageYOffset\n\t\t\t// variables for IE7 and IE8;\n\t\t\tif( !pointer && window.pageXOffset === undefined ){\n\t\t\t\twindow.pageXOffset = document.documentElement.scrollLeft;\n\t\t\t\twindow.pageYOffset = document.documentElement.scrollTop;\n\t\t\t}\n\n\t\t\tx = e.clientX + window.pageXOffset;\n\t\t\ty = e.clientY + window.pageYOffset;\n\t\t}\n\n\t\tevent.points = [x, y];\n\t\tevent.cursor = mouse;\n\n\t\treturn event;\n\t}", "title": "" }, { "docid": "d492c4669e9f8ade5768d431e57d570c", "score": "0.50113165", "text": "function fixEvent ( e, pageOffset, eventTarget ) {\r\n\r\n\t\t// Filter the event to register the type, which can be\r\n\t\t// touch, mouse or pointer. Offset changes need to be\r\n\t\t// made on an event specific basis.\r\n\t\tvar touch = e.type.indexOf('touch') === 0;\r\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\r\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\r\n\r\n\t\tvar x;\r\n\t\tvar y;\r\n\r\n\t\t// IE10 implemented pointer events with a prefix;\r\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\r\n\t\t\tpointer = true;\r\n\t\t}\r\n\r\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\r\n\t\t// about is the touches that originated on top of it.\r\n\t\tif ( touch ) {\r\n\r\n\t\t\t// Returns true if a touch originated on the target.\r\n\t\t\tvar isTouchOnTarget = function (checkTouch) {\r\n\t\t\t\treturn checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\r\n\t\t\t};\r\n\r\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\r\n\t\t\t// touch on the target so we look amongst all touches.\r\n\t\t\tif (e.type === 'touchstart') {\r\n\r\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\r\n\r\n\t\t\t\t// Do not support more than one touch per handle.\r\n\t\t\t\tif ( targetTouches.length > 1 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tx = targetTouches[0].pageX;\r\n\t\t\t\ty = targetTouches[0].pageY;\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// In the other cases, find on changedTouches is enough.\r\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\r\n\r\n\t\t\t\t// Cancel if the target touch has not moved.\r\n\t\t\t\tif ( !targetTouch ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tx = targetTouch.pageX;\r\n\t\t\t\ty = targetTouch.pageY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\r\n\r\n\t\tif ( mouse || pointer ) {\r\n\t\t\tx = e.clientX + pageOffset.x;\r\n\t\t\ty = e.clientY + pageOffset.y;\r\n\t\t}\r\n\r\n\t\te.pageOffset = pageOffset;\r\n\t\te.points = [x, y];\r\n\t\te.cursor = mouse || pointer; // Fix #435\r\n\r\n\t\treturn e;\r\n\t}", "title": "" }, { "docid": "71dd7b860eda4a7c28eb953c5884e5d8", "score": "0.50097245", "text": "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)}}", "title": "" }, { "docid": "035b095cee2544203a5d9b448454cd03", "score": "0.5001086", "text": "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);}}", "title": "" }, { "docid": "af275c33fc1e38468f6a28043076a53b", "score": "0.49926788", "text": "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);}}", "title": "" }, { "docid": "af275c33fc1e38468f6a28043076a53b", "score": "0.49926788", "text": "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);}}", "title": "" }, { "docid": "af275c33fc1e38468f6a28043076a53b", "score": "0.49926788", "text": "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);}}", "title": "" }, { "docid": "af275c33fc1e38468f6a28043076a53b", "score": "0.49926788", "text": "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);}}", "title": "" }, { "docid": "26f1bddfed39691c295b0a20952e1215", "score": "0.49850836", "text": "function calcOffset(evt) {\n var x = (evt.clientX || evt.changedTouches[0].clientX),\n y = (evt.clientY || evt.changedTouches[0].clientY);\n return {\n x: x - bounds.left,\n y: y - bounds.top\n }\n }", "title": "" }, { "docid": "c19a5c9b96f65118dea8632c6cd066f3", "score": "0.4978441", "text": "function fixEvent ( e ) {\n\n // Prevent scrolling and panning on touch events, while\n // attempting to slide. The tap event also depends on this.\n e.preventDefault();\n\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf('touch') === 0\n ,mouse = e.type.indexOf('mouse') === 0\n ,pointer = e.type.indexOf('pointer') === 0\n ,x,y, event = e;\n\n // IE10 implemented pointer events with a prefix;\n if ( e.type.indexOf('MSPointer') === 0 ) {\n pointer = true;\n }\n\n // Get the originalEvent, if the event has been wrapped\n // by jQuery. Zepto doesn't wrap the event.\n if ( e.originalEvent ) {\n e = e.originalEvent;\n }\n\n if ( touch ) {\n // noUiSlider supports one movement at a time,\n // so we can select the first 'changedTouch'.\n x = e.changedTouches[0].pageX;\n y = e.changedTouches[0].pageY;\n }\n if ( mouse || pointer ) {\n\n // Polyfill the pageXOffset and pageYOffset\n // variables for IE7 and IE8;\n if( !pointer && window.pageXOffset === undefined ){\n window.pageXOffset = document.documentElement.scrollLeft;\n window.pageYOffset = document.documentElement.scrollTop;\n }\n\n x = e.clientX + window.pageXOffset;\n y = e.clientY + window.pageYOffset;\n }\n\n return $.extend( event, {\n 'pointX': x\n ,'pointY': y\n ,cursor: mouse\n });\n }", "title": "" }, { "docid": "d03e4918efee5bf985d6e0dbf1f94a10", "score": "0.49603888", "text": "_onInput(e) {\n this._inputEvent = e;\n this._abortUpdateCursor();\n\n // fix strange IE behavior\n if (!this._selection) return this.updateValue();\n const details = new ActionDetails({\n // new state\n value: this.el.value,\n cursorPos: this.cursorPos,\n // old state\n oldValue: this.displayValue,\n oldSelection: this._selection\n });\n const oldRawValue = this.masked.rawInputValue;\n const offset = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection, {\n input: true,\n raw: true\n }).offset;\n\n // force align in remove direction only if no input chars were removed\n // otherwise we still need to align with NONE (to get out from fixed symbols for instance)\n const removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;\n let cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection);\n if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);\n this.updateControl();\n this.updateCursor(cursorPos);\n delete this._inputEvent;\n }", "title": "" }, { "docid": "2ac9629862fe98760f6538e4d54bea0e", "score": "0.49537218", "text": "function fixEvent ( e ) {\n\n // Prevent scrolling and panning on touch events, while\n // attempting to slide. The tap event also depends on this.\n e.preventDefault();\n\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf('touch') === 0\n ,mouse = e.type.indexOf('mouse') === 0\n ,pointer = e.type.indexOf('pointer') === 0\n ,x,y, event = e;\n\n // IE10 implemented pointer events with a prefix;\n if ( e.type.indexOf('MSPointer') === 0 ) {\n pointer = true;\n }\n\n // Get the originalEvent, if the event has been wrapped\n // by jQuery. Zepto doesn't wrap the event.\n if ( e.originalEvent ) {\n e = e.originalEvent;\n }\n\n if ( touch ) {\n // noUiSlider supports one movement at a time,\n // so we can select the first 'changedTouch'.\n x = e.changedTouches[0].pageX;\n y = e.changedTouches[0].pageY;\n }\n\n if ( mouse || pointer ) {\n\n // Polyfill the pageXOffset and pageYOffset\n // variables for IE7 and IE8;\n if( !pointer && window.pageXOffset === undefined ){\n window.pageXOffset = document.documentElement.scrollLeft;\n window.pageYOffset = document.documentElement.scrollTop;\n }\n\n x = e.clientX + window.pageXOffset;\n y = e.clientY + window.pageYOffset;\n }\n\n event.points = [x, y];\n event.cursor = mouse;\n\n return event;\n }", "title": "" }, { "docid": "a6d0f692d22ca92b7f653da42ce4a3c0", "score": "0.49528077", "text": "set offset(val) {\n this._offset = val;\n }", "title": "" }, { "docid": "33af486355b47293f8695f85aa626dc1", "score": "0.49499637", "text": "function addOffset(element, event) {\n event.offsetX = Math.round((event.pageX - element.offset().left));\n event.offsetY = Math.round((event.pageY - element.offset().top));\n return event;\n}", "title": "" }, { "docid": "f5ec539c1d8516ae7cb4cc48a5f953ae", "score": "0.4946419", "text": "processFirstCoord(ev) {\n let origPoint = { left: ev.pageX, top: ev.pageY };\n let adjustedPoint = origPoint;\n let subjectEl = ev.subjectEl;\n let subjectRect;\n if (subjectEl instanceof HTMLElement) { // i.e. not a Document/ShadowRoot\n subjectRect = internal.computeRect(subjectEl);\n adjustedPoint = internal.constrainPoint(adjustedPoint, subjectRect);\n }\n let initialHit = this.initialHit = this.queryHitForOffset(adjustedPoint.left, adjustedPoint.top);\n if (initialHit) {\n if (this.useSubjectCenter && subjectRect) {\n let slicedSubjectRect = internal.intersectRects(subjectRect, initialHit.rect);\n if (slicedSubjectRect) {\n adjustedPoint = internal.getRectCenter(slicedSubjectRect);\n }\n }\n this.coordAdjust = internal.diffPoints(adjustedPoint, origPoint);\n }\n else {\n this.coordAdjust = { left: 0, top: 0 };\n }\n }", "title": "" }, { "docid": "ea2267169fea7760857ae584f5fbbaf7", "score": "0.49448594", "text": "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\r\n var leftovers = {};\r\n var def = pluckNonDateProps(raw, calendar, leftovers);\r\n def.defId = String(uid++);\r\n def.sourceId = sourceId;\r\n def.allDay = allDay;\r\n def.hasEnd = hasEnd;\r\n def.extendedProps = object_1.assignTo(leftovers, def.extendedProps || {});\r\n // help out EventApi from having user modify props\r\n Object.freeze(def.classNames);\r\n Object.freeze(def.extendedProps);\r\n return def;\r\n}", "title": "" }, { "docid": "785adb63c7627a5766e7281032977edc", "score": "0.4936485", "text": "function normalizeEventRangeTimes(range) {\n\t\tif (range.allDay == null) {\n\t\t\trange.allDay = !(range.start.hasTime() || (range.end && range.end.hasTime()));\n\t\t}\n\n\t\tif (range.allDay) {\n\t\t\trange.start.stripTime();\n\t\t\tif (range.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\trange.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!range.start.hasTime()) {\n\t\t\t\trange.start = t.rezoneDate(range.start); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (range.end && !range.end.hasTime()) {\n\t\t\t\trange.end = t.rezoneDate(range.end); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "785adb63c7627a5766e7281032977edc", "score": "0.4936485", "text": "function normalizeEventRangeTimes(range) {\n\t\tif (range.allDay == null) {\n\t\t\trange.allDay = !(range.start.hasTime() || (range.end && range.end.hasTime()));\n\t\t}\n\n\t\tif (range.allDay) {\n\t\t\trange.start.stripTime();\n\t\t\tif (range.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\trange.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!range.start.hasTime()) {\n\t\t\t\trange.start = t.rezoneDate(range.start); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (range.end && !range.end.hasTime()) {\n\t\t\t\trange.end = t.rezoneDate(range.end); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "785adb63c7627a5766e7281032977edc", "score": "0.4936485", "text": "function normalizeEventRangeTimes(range) {\n\t\tif (range.allDay == null) {\n\t\t\trange.allDay = !(range.start.hasTime() || (range.end && range.end.hasTime()));\n\t\t}\n\n\t\tif (range.allDay) {\n\t\t\trange.start.stripTime();\n\t\t\tif (range.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\trange.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!range.start.hasTime()) {\n\t\t\t\trange.start = t.rezoneDate(range.start); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (range.end && !range.end.hasTime()) {\n\t\t\t\trange.end = t.rezoneDate(range.end); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6cd21ec18e974fb227f440b8062da6d3", "score": "0.493441", "text": "function fakeUpdate(event){\n return null;\n}", "title": "" }, { "docid": "7de703efc60e9bfb6abfa3b040a3bb3f", "score": "0.4917508", "text": "function normalizeEvents(on){/* istanbul ignore if */if(isDef(on[RANGE_TOKEN])){// IE input[type=range] only supports `change` event\nvar event=isIE?'change':'input';on[event]=[].concat(on[RANGE_TOKEN],on[event]||[]);delete on[RANGE_TOKEN];}// This was originally intended to fix #4521 but no longer necessary\n// after 2.5. Keeping it for backwards compat with generated code from < 2.4\n/* istanbul ignore if */if(isDef(on[CHECKBOX_RADIO_TOKEN])){on.change=[].concat(on[CHECKBOX_RADIO_TOKEN],on.change||[]);delete on[CHECKBOX_RADIO_TOKEN];}}", "title": "" }, { "docid": "15f61cc69ffcb5af44dc5b7523da98fa", "score": "0.4882683", "text": "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 normalizeEventDates(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 normalizeEventDates(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 }", "title": "" }, { "docid": "9597f603f15a336a6f498f1a3a94d2a8", "score": "0.48769537", "text": "function undoResize() {\n\n\tvar htmlCollection = document.getElementsByClassName(\"hiddenEventId\");\n\tif ((htmlCollection != undefined) && (htmlCollection.length>0)) {\n\n\t\tvar eventId = htmlCollection[0].getAttribute('id');\n\t\tvar oldStart = document.getElementById(\"oldHoursMinutesStart\");\n\t\tvar oldEnd = document.getElementById(\"oldHoursMinutesEnd\");\n\t\tif ((eventId != undefined) && (oldStart != undefined) && (oldEnd != undefined)){\n\t\t\tvar dp = APP.dp;\n\t\t\tif (dp != undefined){\n\t\t\t\tif (dp.find(eventId.toString())) {\n\t\t\t\t\t// event found\n\t\t\t\t\tvar event = dp.events.get(eventId.toString());\n\t\t\t\t\tevent.data.start = new DayPilot.Date(oldStart.innerHTML);\n\t\t\t\t\tevent.data.end = new DayPilot.Date(oldEnd.innerHTML)\n\t\t\t\t\tif (event != undefined) {\n\t\t\t\t\t\tdp.events.update(event);\n\t\t\t\t\t\tdp.update();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "072578e403ddce736adf8f15081f9f0c", "score": "0.48766452", "text": "_setupConversionUsingOffset() {\n\t\tconst conversion = this.editor.conversion;\n\t\tconst locale = this.editor.locale;\n\t\tconst marginProperty = locale.contentLanguageDirection === 'rtl' ? 'margin-right' : 'margin-left';\n\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tstyles: {\n\t\t\t\t\t[ marginProperty ]: /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'blockIndent',\n\t\t\t\tvalue: viewElement => viewElement.getStyle( marginProperty )\n\t\t\t}\n\t\t} );\n\n\t\tconversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\tmodel: 'blockIndent',\n\t\t\tview: modelAttributeValue => {\n\t\t\t\treturn {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\t[ marginProperty ]: modelAttributeValue\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\t}", "title": "" }, { "docid": "3c318d217a0edd3d825040461950b4e0", "score": "0.48739606", "text": "function getSetOffset(input,keepLocalTime){var offset=this._offset || 0,localAdjust;if(input != null){if(typeof input === 'string'){input = offsetFromString(input);}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);}}", "title": "" }, { "docid": "6cfb59b7a4f66f4af89210d1b28e1cc3", "score": "0.48317415", "text": "function eventInfo_reset() {\r\n}", "title": "" }, { "docid": "6365c265ce3e90fdcff8effd7651f7dd", "score": "0.4827035", "text": "function hanldeTzOffset(data, tzOffset) {\n let retVal,\n shifted;\n if(tzOffset === 0) {\n retVal = data;\n } else {\n shifted = data.splice((tzOffset*-1));\n retVal = shifted.concat(data)\n }\n return retVal\n}", "title": "" }, { "docid": "f24b81524812a27d0f05f53013682252", "score": "0.48246086", "text": "renderNewEvent() {\n if (this.state.mouseDownStart == null) {\n return '';\n }\n let start = this.state.mouseDownStart;\n let end = this.state.mouseDownCurr;\n let event = Map({\n start: moment(Math.min(start, end)),\n end: moment(Math.max(start, end))\n });\n return <CalEvent event={event} noDrag={true} />;\n }", "title": "" }, { "docid": "369237c98e442710206d7d68edac92aa", "score": "0.4819112", "text": "function getNewPos(e) {\n var originalEvent = e.originalEvent || e,\n pageX = originalEvent.changedTouches ? originalEvent.changedTouches[0].pageX : e.pageX,\n pageY = originalEvent.changedTouches ? originalEvent.changedTouches[0].pageY : e.pageY,\n series = dragPoint.series,\n draggableX = series.options.draggableX && dragPoint.draggableX !== false,\n draggableY = series.options.draggableY && dragPoint.draggableY !== false,\n dragSensitivity = pick(series.options.dragSensitivity, 1),\n deltaX = draggableX ? dragX - pageX : 0,\n deltaY = draggableY ? dragY - pageY : 0,\n newPlotX = dragPlotX - deltaX,\n newPlotY = dragPlotY - deltaY,\n newX = dragX === undefined ? dragPoint.x : series.xAxis.toValue(newPlotX, true),\n newY = dragY === undefined ? dragPoint.y : series.yAxis.toValue(newPlotY, true),\n ret;\n\n newX = filterRange(newX, series, 'X');\n newY = filterRange(newY, series, 'Y');\n if (dragPoint.low) {\n var newPlotHigh = dragPlotHigh - deltaY,\n newPlotLow = dragPlotLow - deltaY;\n newHigh = dragY === undefined ? dragPoint.high : series.yAxis.toValue(newPlotHigh, true);\n newLow = dragY === undefined ? dragPoint.low : series.yAxis.toValue(newPlotLow, true);\n newHigh = filterRange(newHigh, series, 'Y');\n newLow = filterRange(newLow, series, 'Y');\n }\n if (Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)) > dragSensitivity) {\n return {\n x: draggableX ? newX : dragPoint.x,\n y: draggableY ? newY : dragPoint.y,\n high: (draggableY && !changeLow) ? newHigh : dragPoint.high,\n low: (draggableY && changeLow) ? newLow : dragPoint.low,\n dragStart: dragStart,\n originalEvent: e\n };\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "67757ec504ac7e9b37a05967d6eb1ec4", "score": "0.48180845", "text": "function extractCoordinateFromMouseEvent () {\n return 0;\n }", "title": "" }, { "docid": "5ec641922119e89f273565292d7cbf10", "score": "0.4816989", "text": "function parsePopperOffset(offset) {\n return {\n top: Math.floor(offset.top || 0),\n left: Math.floor(offset.left || 0)\n };\n}", "title": "" }, { "docid": "0d47237e85aa4877ac51410553ac8af2", "score": "0.48164386", "text": "function calcOffset(offset) {\n return {\n left: _.isFunction(offset.left) ? offset.left() : offset.left,\n top: _.isFunction(offset.top) ? offset.top() : offset.top\n }\n}", "title": "" }, { "docid": "07c5206660393c902a08be26f01f7340", "score": "0.4802197", "text": "timestampOffsetForSegment_() {\n return null;\n }", "title": "" }, { "docid": "6ec087e0b87e1b7230f502c7404f7094", "score": "0.4798893", "text": "function onRemoveOffsetInput(order,innerIndexOfArrayToBeRemoved) {\n \n props.changeInputState(props.inputState.slice(0,order)\n .concat([props.inputState[order].slice(0,innerIndexOfArrayToBeRemoved)\n .concat(props.inputState[order].slice(innerIndexOfArrayToBeRemoved+1))])\n .concat(props.inputState.slice(order+1)))\n }", "title": "" }, { "docid": "b3823b676fd541ae37767ba0a46e3cf9", "score": "0.47967902", "text": "function __getEventClickOffset(event){\n if(this.offsetX !== undefined) return {x:event.offsetX,y:event.offsetY};\n else return {\n x: event.clientX - event.target.offsetLeft,\n y: event.clientY - event.target.offsetTop,\n }\n}", "title": "" }, { "docid": "a4a96ea49eb95d9498fa8be28a7529da", "score": "0.47892797", "text": "_getLocalCursorPosition(canvas, event) {\n var rect = canvas.getBoundingClientRect();\n var x = event.offsetX * canvas.width / rect.width;\n var y = event.offsetY * canvas.height / rect.height;\n return { x:x, y:y };\n }", "title": "" }, { "docid": "f80622a023bb3df6d65bda97e40c228b", "score": "0.47837615", "text": "static offset()\n {\n var result =\n {\n length : 3,\n msgType : 5,\n srcEcu : 6,\n dstEcu : 7\n };\n return result;\n }", "title": "" }, { "docid": "677e6e72397dd606d32581ac9f972bbd", "score": "0.47815675", "text": "function mutateEvents(events, clearEnd, forceAllDay, dateDelta, durationDelta) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldAllDay = event._allDay;\n\t\t\tvar oldStart = event._start;\n\t\t\tvar oldEnd = event._end;\n\t\t\tvar newAllDay = forceAllDay != null ? forceAllDay : oldAllDay;\n\t\t\tvar newStart = oldStart.clone();\n\t\t\tvar newEnd = (!clearEnd && oldEnd) ? oldEnd.clone() : null;\n\n\t\t\t// NOTE: this function is responsible for transforming `newStart` and `newEnd`,\n\t\t\t// which were initialized to the OLD values first. `newEnd` may be null.\n\n\t\t\t// normlize newStart/newEnd to be consistent with newAllDay\n\t\t\tif (newAllDay) {\n\t\t\t\tnewStart.stripTime();\n\t\t\t\tif (newEnd) {\n\t\t\t\t\tnewEnd.stripTime();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!newStart.hasTime()) {\n\t\t\t\t\tnewStart = t.rezoneDate(newStart);\n\t\t\t\t}\n\t\t\t\tif (newEnd && !newEnd.hasTime()) {\n\t\t\t\t\tnewEnd = t.rezoneDate(newEnd);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure we have an end date if necessary\n\t\t\tif (!newEnd && (options.forceEventDuration || +durationDelta)) {\n\t\t\t\tnewEnd = t.getDefaultEventEnd(newAllDay, newStart);\n\t\t\t}\n\n\t\t\t// translate the dates\n\t\t\tnewStart.add(dateDelta);\n\t\t\tif (newEnd) {\n\t\t\t\tnewEnd.add(dateDelta).add(durationDelta);\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 (isAmbigTimezone) {\n\t\t\t\tif (+dateDelta || +durationDelta) {\n\t\t\t\t\tnewStart.stripZone();\n\t\t\t\t\tif (newEnd) {\n\t\t\t\t\t\tnewEnd.stripZone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tevent.allDay = newAllDay;\n\t\t\tevent.start = newStart;\n\t\t\tevent.end = newEnd;\n\t\t\tbackupEventDates(event);\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\tevent.allDay = oldAllDay;\n\t\t\t\tevent.start = oldStart;\n\t\t\t\tevent.end = oldEnd;\n\t\t\t\tbackupEventDates(event);\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}", "title": "" }, { "docid": "677e6e72397dd606d32581ac9f972bbd", "score": "0.47815675", "text": "function mutateEvents(events, clearEnd, forceAllDay, dateDelta, durationDelta) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldAllDay = event._allDay;\n\t\t\tvar oldStart = event._start;\n\t\t\tvar oldEnd = event._end;\n\t\t\tvar newAllDay = forceAllDay != null ? forceAllDay : oldAllDay;\n\t\t\tvar newStart = oldStart.clone();\n\t\t\tvar newEnd = (!clearEnd && oldEnd) ? oldEnd.clone() : null;\n\n\t\t\t// NOTE: this function is responsible for transforming `newStart` and `newEnd`,\n\t\t\t// which were initialized to the OLD values first. `newEnd` may be null.\n\n\t\t\t// normlize newStart/newEnd to be consistent with newAllDay\n\t\t\tif (newAllDay) {\n\t\t\t\tnewStart.stripTime();\n\t\t\t\tif (newEnd) {\n\t\t\t\t\tnewEnd.stripTime();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!newStart.hasTime()) {\n\t\t\t\t\tnewStart = t.rezoneDate(newStart);\n\t\t\t\t}\n\t\t\t\tif (newEnd && !newEnd.hasTime()) {\n\t\t\t\t\tnewEnd = t.rezoneDate(newEnd);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure we have an end date if necessary\n\t\t\tif (!newEnd && (options.forceEventDuration || +durationDelta)) {\n\t\t\t\tnewEnd = t.getDefaultEventEnd(newAllDay, newStart);\n\t\t\t}\n\n\t\t\t// translate the dates\n\t\t\tnewStart.add(dateDelta);\n\t\t\tif (newEnd) {\n\t\t\t\tnewEnd.add(dateDelta).add(durationDelta);\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 (isAmbigTimezone) {\n\t\t\t\tif (+dateDelta || +durationDelta) {\n\t\t\t\t\tnewStart.stripZone();\n\t\t\t\t\tif (newEnd) {\n\t\t\t\t\t\tnewEnd.stripZone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tevent.allDay = newAllDay;\n\t\t\tevent.start = newStart;\n\t\t\tevent.end = newEnd;\n\t\t\tbackupEventDates(event);\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\tevent.allDay = oldAllDay;\n\t\t\t\tevent.start = oldStart;\n\t\t\t\tevent.end = oldEnd;\n\t\t\t\tbackupEventDates(event);\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}", "title": "" }, { "docid": "677e6e72397dd606d32581ac9f972bbd", "score": "0.47815675", "text": "function mutateEvents(events, clearEnd, forceAllDay, dateDelta, durationDelta) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldAllDay = event._allDay;\n\t\t\tvar oldStart = event._start;\n\t\t\tvar oldEnd = event._end;\n\t\t\tvar newAllDay = forceAllDay != null ? forceAllDay : oldAllDay;\n\t\t\tvar newStart = oldStart.clone();\n\t\t\tvar newEnd = (!clearEnd && oldEnd) ? oldEnd.clone() : null;\n\n\t\t\t// NOTE: this function is responsible for transforming `newStart` and `newEnd`,\n\t\t\t// which were initialized to the OLD values first. `newEnd` may be null.\n\n\t\t\t// normlize newStart/newEnd to be consistent with newAllDay\n\t\t\tif (newAllDay) {\n\t\t\t\tnewStart.stripTime();\n\t\t\t\tif (newEnd) {\n\t\t\t\t\tnewEnd.stripTime();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!newStart.hasTime()) {\n\t\t\t\t\tnewStart = t.rezoneDate(newStart);\n\t\t\t\t}\n\t\t\t\tif (newEnd && !newEnd.hasTime()) {\n\t\t\t\t\tnewEnd = t.rezoneDate(newEnd);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure we have an end date if necessary\n\t\t\tif (!newEnd && (options.forceEventDuration || +durationDelta)) {\n\t\t\t\tnewEnd = t.getDefaultEventEnd(newAllDay, newStart);\n\t\t\t}\n\n\t\t\t// translate the dates\n\t\t\tnewStart.add(dateDelta);\n\t\t\tif (newEnd) {\n\t\t\t\tnewEnd.add(dateDelta).add(durationDelta);\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 (isAmbigTimezone) {\n\t\t\t\tif (+dateDelta || +durationDelta) {\n\t\t\t\t\tnewStart.stripZone();\n\t\t\t\t\tif (newEnd) {\n\t\t\t\t\t\tnewEnd.stripZone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tevent.allDay = newAllDay;\n\t\t\tevent.start = newStart;\n\t\t\tevent.end = newEnd;\n\t\t\tbackupEventDates(event);\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\tevent.allDay = oldAllDay;\n\t\t\t\tevent.start = oldStart;\n\t\t\t\tevent.end = oldEnd;\n\t\t\t\tbackupEventDates(event);\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}", "title": "" }, { "docid": "d5c9d626c3efc4e05a2ad1a653cc5e18", "score": "0.47802034", "text": "offset(value) {\n if (value == null || value.isRawInstance || value instanceof Builder) {\n // Builder for backward compatibility\n this._single.offset = value;\n } else {\n const val = parseInt(value, 10);\n if (isNaN(val)) {\n this.client.logger.warn('A valid integer must be provided to offset');\n } else if (val < 0) {\n throw new Error(`A non-negative integer must be provided to offset.`);\n } else {\n this._single.offset = val;\n }\n }\n return this;\n }", "title": "" }, { "docid": "eacb27050829ac09041df7900c074426", "score": "0.4778624", "text": "reOffset() {\r\n var BB=canvas.getBoundingClientRect();\r\n this.offsetX=BB.left;\r\n this.offsetY=BB.top;\r\n }", "title": "" }, { "docid": "de934dd7fecd38d73755b85745ce1678", "score": "0.47775882", "text": "function extractCoordinateFromMouseEvent () {\n\t\t return 0;\n\t\t }", "title": "" }, { "docid": "4c5cda9e50fa9c5cbce2bdfaccb2fe85", "score": "0.47734165", "text": "function fixNotiOffset() {\n var boxes = _slice\n .call($$('.notification'))\n .filter(function (item) {\n return !item.classList.contains('disappearing');\n })\n if (arguments.length) {\n _slice.call(arguments).forEach(function (item) {\n boxes.splice(boxes.indexOf(item), 1);\n })\n }\n\n var temp = STANDARDUNIT;\n boxes.forEach(function (box, index) {\n if (index !== 0) {\n temp += getOffset(box).height + STANDARDUNIT;\n }\n\n if (getOffset(box).top !== temp) {\n box.style.top = temp + 'px';\n }\n });\n}", "title": "" }, { "docid": "0007c7546df748856d43b71eaa670101", "score": "0.47678322", "text": "clean(){\n this.events = [];\n }", "title": "" }, { "docid": "81da93f07712fa2983a22a9e2305d0cb", "score": "0.47678322", "text": "function mutateEvents(events, clearEnd, forceAllDay, dateDelta, durationDelta) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldAllDay = event._allDay;\n\t\t\tvar oldStart = event._start;\n\t\t\tvar oldEnd = event._end;\n\t\t\tvar newAllDay = forceAllDay != null ? forceAllDay : oldAllDay;\n\t\t\tvar newStart = oldStart.clone();\n\t\t\tvar newEnd = (!clearEnd && oldEnd) ? oldEnd.clone() : null;\n\n\t\t\t// NOTE: this function is responsible for transforming `newStart` and `newEnd`,\n\t\t\t// which were initialized to the OLD values first. `newEnd` may be null.\n\n\t\t\t// normlize newStart/newEnd to be consistent with newAllDay\n\t\t\tif (newAllDay) {\n\t\t\t\tnewStart.stripTime();\n\t\t\t\tif (newEnd) {\n\t\t\t\t\tnewEnd.stripTime();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!newStart.hasTime()) {\n\t\t\t\t\tnewStart = t.rezoneDate(newStart);\n\t\t\t\t}\n\t\t\t\tif (newEnd && !newEnd.hasTime()) {\n\t\t\t\t\tnewEnd = t.rezoneDate(newEnd);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure we have an end date if necessary\n\t\t\tif (!newEnd && (options.forceEventDuration || +durationDelta)) {\n\t\t\t\tnewEnd = t.getDefaultEventEnd(newAllDay, newStart);\n\t\t\t}\n\n\t\t\t// translate the dates\n\t\t\tnewStart.add(dateDelta);\n\t\t\tif (newEnd) {\n\t\t\t\tnewEnd.add(dateDelta).add(durationDelta);\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 (isAmbigTimezone) {\n\t\t\t\tif (+dateDelta) {\n\t\t\t\t\tnewStart.stripZone();\n\t\t\t\t}\n\t\t\t\tif (newEnd && (+dateDelta || +durationDelta)) {\n\t\t\t\t\tnewEnd.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tevent.allDay = newAllDay;\n\t\t\tevent.start = newStart;\n\t\t\tevent.end = newEnd;\n\t\t\tbackupEventDates(event);\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\tevent.allDay = oldAllDay;\n\t\t\t\tevent.start = oldStart;\n\t\t\t\tevent.end = oldEnd;\n\t\t\t\tbackupEventDates(event);\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}", "title": "" }, { "docid": "0f015a90ef310884028daa7d18deb2e6", "score": "0.47670862", "text": "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n var isAmbigTimezone = t.getIsAmbigTimezone();\n var undoFunctions = [];\n\n // normalize zero-length deltas to be null\n if (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n if (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n $.each(events, function(i, event) {\n var oldProps;\n var newProps;\n\n // build an object holding all the old values, both date-related and misc.\n // for the undo function.\n oldProps = {\n start: event.start.clone(),\n end: event.end ? event.end.clone() : null,\n allDay: event.allDay\n };\n $.each(miscProps, function(name) {\n oldProps[name] = event[name];\n });\n\n // new date-related properties. work off the original date snapshot.\n // ok to use references because they will be thrown away when backupEventDates is called.\n newProps = {\n start: event._start,\n end: event._end,\n allDay: allDay // normalize the dates in the same regard as the new properties\n };\n normalizeEventDates(newProps); // massages start/end/allDay\n\n // strip or ensure the end date\n if (clearEnd) {\n newProps.end = null;\n }\n else if (durationDelta && !newProps.end) { // the duration translation requires an end date\n newProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n }\n\n if (dateDelta) {\n newProps.start.add(dateDelta);\n if (newProps.end) {\n newProps.end.add(dateDelta);\n }\n }\n\n if (durationDelta) {\n newProps.end.add(durationDelta); // end already ensured above\n }\n\n // if the dates have changed, and we know it is impossible to recompute the\n // timezone offsets, strip the zone.\n if (\n isAmbigTimezone &&\n !newProps.allDay &&\n (dateDelta || durationDelta)\n ) {\n newProps.start.stripZone();\n if (newProps.end) {\n newProps.end.stripZone();\n }\n }\n\n $.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n backupEventDates(event); // regenerate internal _start/_end/_allDay\n\n undoFunctions.push(function() {\n $.extend(event, oldProps);\n backupEventDates(event); // regenerate internal _start/_end/_allDay\n });\n });\n\n return function() {\n for (var i = 0; i < undoFunctions.length; i++) {\n undoFunctions[i]();\n }\n };\n }", "title": "" }, { "docid": "c436912956c96852c8ae19072300ebf8", "score": "0.47657895", "text": "function mapTo(elem, ev) {\n return toPoint(ev.clientX, ev.clientY) - absOffset(elem);\n}", "title": "" }, { "docid": "a084640814bad0973f1099f914ddbe8c", "score": "0.47628656", "text": "function normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "title": "" }, { "docid": "a434cbe54401ad8da490d848132a2676", "score": "0.47615293", "text": "function getEntityOffset(config) {\n const {\n viewOffset,\n scale,\n } = config;\n\n\n return {\n x: viewOffset.x * scale,\n y: viewOffset.y * scale,\n };\n}", "title": "" }, { "docid": "03f2b1e2842545bde121989c0caa346f", "score": "0.47599402", "text": "function normalizeEvents (on$$1) {\n /* istanbul ignore if */\n if (isDef(on$$1[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on$$1[event] = [].concat(on$$1[RANGE_TOKEN], on$$1[event] || []);\n delete on$$1[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on$$1[CHECKBOX_RADIO_TOKEN])) {\n on$$1.change = [].concat(on$$1[CHECKBOX_RADIO_TOKEN], on$$1.change || []);\n delete on$$1[CHECKBOX_RADIO_TOKEN];\n }\n }", "title": "" }, { "docid": "03f2b1e2842545bde121989c0caa346f", "score": "0.47599402", "text": "function normalizeEvents (on$$1) {\n /* istanbul ignore if */\n if (isDef(on$$1[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on$$1[event] = [].concat(on$$1[RANGE_TOKEN], on$$1[event] || []);\n delete on$$1[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on$$1[CHECKBOX_RADIO_TOKEN])) {\n on$$1.change = [].concat(on$$1[CHECKBOX_RADIO_TOKEN], on$$1.change || []);\n delete on$$1[CHECKBOX_RADIO_TOKEN];\n }\n }", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "2581772f788464806f679ae331a03d53", "score": "0.47546068", "text": "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", "title": "" }, { "docid": "6a52550eeb6b089db7f9fcb9ac2bed22", "score": "0.47502273", "text": "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}", "title": "" }, { "docid": "6a52550eeb6b089db7f9fcb9ac2bed22", "score": "0.47502273", "text": "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}", "title": "" }, { "docid": "6a52550eeb6b089db7f9fcb9ac2bed22", "score": "0.47502273", "text": "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}", "title": "" }, { "docid": "29b79ab879039a86fc5532b91e00ac0f", "score": "0.47468606", "text": "calculateMMDeltas( event ){\n\t\tvar self = this;\n\t\treturn {\n\t\t\tx:self.basePos.x - event.x,\n\t\t\ty:self.basePos.y - event.y\n\t\t}\n\t}", "title": "" }, { "docid": "755bc22b9582fbd67c669eb5e50f1ed3", "score": "0.47428074", "text": "function normalizeEvents(on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "title": "" }, { "docid": "755bc22b9582fbd67c669eb5e50f1ed3", "score": "0.47428074", "text": "function normalizeEvents(on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "title": "" }, { "docid": "d10529e6981c6c42bcbb9481f6f3260d", "score": "0.47283903", "text": "function invalidateEvents() {\n return {\n type: INVALIDATE_EVENTS,\n }\n}", "title": "" }, { "docid": "41c8a78758aa70ac8aa8033025429734", "score": "0.47265863", "text": "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", "title": "" }, { "docid": "6d2281f04779b2d066fff14372e5f668", "score": "0.47227344", "text": "function normalizeEventTimes(eventProps) {\n if (eventProps.allDay == null) {\n eventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n }\n\n if (eventProps.allDay) {\n eventProps.start.stripTime();\n if (eventProps.end) {\n // TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n eventProps.end.stripTime();\n }\n }\n else {\n if (!eventProps.start.hasTime()) {\n eventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n }\n if (eventProps.end && !eventProps.end.hasTime()) {\n eventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n }\n }\n }", "title": "" } ]
7fde54c56f8e88ee6862a809b2f12726
Rule for validating required fields.
[ { "docid": "f2ec4cea55982ad98cc200aa795dc4bb", "score": "0.7353736", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {\n errors.push(format(options.messages.required, rule.fullField));\n }\n}", "title": "" } ]
[ { "docid": "c0d8014f5a10a503aab6df7779ed66af", "score": "0.77019566", "text": "function required(rule,value,source,errors,options,type){if(rule.required&&(!source.hasOwnProperty(rule.field)||isEmptyValue(value,type||rule.type))){errors.push(format(options.messages.required,rule.fullField));}}", "title": "" }, { "docid": "618b0ecd9800bae6753f1d0120d5b538", "score": "0.75110954", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "618b0ecd9800bae6753f1d0120d5b538", "score": "0.75110954", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "618b0ecd9800bae6753f1d0120d5b538", "score": "0.75110954", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "fb9e40818dbde92a6eed8b7d50a9dc0a", "score": "0.74362403", "text": "function required(rule, value, source, errors, options, type) {\n\t if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n\t errors.push(util.format(options.messages.required, rule.fullField));\n\t }\n\t}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "effaec8f2191d3bb71fcc237883ac501", "score": "0.7420913", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "841d46358079a3368184cd7c945bd650", "score": "0.74083006", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"f\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "1955bb84b84d4da6d3e7cef47dde6788", "score": "0.73949313", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__[\"f\" /* isEmptyValue */](value, type || rule.type))) {\n errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"e\" /* format */](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "5a9ec9215b148427f7cf16c743a80851", "score": "0.73610336", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__[\"isEmptyValue\"](value, type || rule.type))) {\n errors.push(_util__WEBPACK_IMPORTED_MODULE_0__[\"format\"](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "5a9ec9215b148427f7cf16c743a80851", "score": "0.73610336", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__[\"isEmptyValue\"](value, type || rule.type))) {\n errors.push(_util__WEBPACK_IMPORTED_MODULE_0__[\"format\"](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "5a9ec9215b148427f7cf16c743a80851", "score": "0.73610336", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__[\"isEmptyValue\"](value, type || rule.type))) {\n errors.push(_util__WEBPACK_IMPORTED_MODULE_0__[\"format\"](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "5a9ec9215b148427f7cf16c743a80851", "score": "0.73610336", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__[\"isEmptyValue\"](value, type || rule.type))) {\n errors.push(_util__WEBPACK_IMPORTED_MODULE_0__[\"format\"](options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "6a6c13732eb5d594dba78f2cee40f023", "score": "0.7357544", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__.isEmptyValue(value, type || rule.type))) {\n errors.push(_util__WEBPACK_IMPORTED_MODULE_0__.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "6a6c13732eb5d594dba78f2cee40f023", "score": "0.7357544", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__.isEmptyValue(value, type || rule.type))) {\n errors.push(_util__WEBPACK_IMPORTED_MODULE_0__.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "de656ebae51db130de7fe220e9e0a9f0", "score": "0.731558", "text": "function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}", "title": "" }, { "docid": "52aa26ca9d576e81e5884e51307f0bce", "score": "0.70707", "text": "function required(rule, value, errors, options) {\n if (value === undefined || value === null || value === '' || value.length === 0) {\n errors.push(util.format(options.messages.required, rule.field));\n }\n}", "title": "" }, { "docid": "b843d8efcd24125d3e3f7dd8188e2d26", "score": "0.67869025", "text": "static get constraints() {\n return ['required'];\n }", "title": "" }, { "docid": "01a40bf7d38e9ff3c836abbf0189793b", "score": "0.6609489", "text": "function required(model, prop, errObj) {\n if (model[prop] == null || model[prop] == undefined) {\n errObj[prop] = \"required\";\n }\n }", "title": "" }, { "docid": "8f9d3a41fdd3fd8b289ef401d4720e97", "score": "0.6563312", "text": "function validateRequired (input) {\n \t\tif (input.required && input.value === \"\") {\n \t\treturn false;\n \t\t}\n \t\telse {\n \t\treturn true;\n \t\t}\n\t}", "title": "" }, { "docid": "676ee65c53da5702eaf50466490fb28d", "score": "0.644417", "text": "static get required() {\n return this.requiredRule;\n }", "title": "" }, { "docid": "47a601410d8af2953cf8feb71d70bc7c", "score": "0.64112246", "text": "isRequired(fieldName) {\n return this.isFieldNonNull(fieldName);\n }", "title": "" }, { "docid": "cbdcb19c92095f8f5d1abc089e8ac24d", "score": "0.639842", "text": "function RequiredField() {\n}", "title": "" }, { "docid": "ab842370f946fe83d9e879e795ddc4d4", "score": "0.6386456", "text": "function validate(args, required) {\n var result = {\n error: false,\n message: 'No errors'\n }\n // ensure required properties were passed in the arguments hash\n if (required) {\n var keys = _.keys(args);\n required.forEach(function(field) {\n if(!_.contains(keys, field)) {\n result.error = true;\n result.message = 'The following values must be passed: ' + required.join(', ');\n }\n })\n }\n return result;\n }", "title": "" }, { "docid": "f6b287d96298a5896d4790ac881fa948", "score": "0.6368167", "text": "function requiredValidator(x) {\n if (x == null) {\n return new ValidationResult('required but missing');\n }\n return exports.VALIDATION_SUCCESS;\n}", "title": "" }, { "docid": "f6e51d2faae601866d0db2d2ca7727f6", "score": "0.6324085", "text": "function checkRequiredFields(data, fields, errors){\n\tvar obj = {};\n\tvar keys = [];\n\tif(fields instanceof Array){\n\t\tfor(var i = 0; i < fields.length; i++){\n\t\t\tvar field = fields[i];\n\t\t\tobj[field] = field;\n\t\t\tkeys.push(field);\n\t\t}\n\t}else{\n\t\tobj = fields;\n\t\tkeys = Object.keys(obj);\n\t}\n\t\n\tfor(var i = 0; i < keys.length; i++){\n\t\tvar key = keys[i];\n\t\t\n\t\tif(typeof data === 'undefined' || typeof data[key] === 'undefined'){\n\t\t\terrors.push('ERROR: ' + obj[key] + ' is required');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "79b2f4e48f2553001eb91b288406904a", "score": "0.62808657", "text": "checkRequired() {\n if(!Validator.required(this.attribute.validation)) {\n this.progressBar.increment(this.attributeName);\n }\n }", "title": "" }, { "docid": "d7adadf1201fd239bd5e2690a5b214f4", "score": "0.62771016", "text": "function requiredFieldValidator(value) {\n if (value <=10 && value >=0) {\n return {valid: true, msg: null};\n } else {\n return {valid: false, msg: msgprint(\"This is a required field\") };\n }\n }", "title": "" }, { "docid": "6840004a510f391bcf6c98b06e776e66", "score": "0.6273546", "text": "function setupRequired() {\n var short = $attrs['checkRequired'];\n var shorts = short ? short.split('|') : [];\n var message = nls._(shorts[0] || $attrs['checkRequiredMessage'] || 'message_required');\n\n field.checks.required = {\n message: message,\n active: true\n };\n var condition = shorts[1] || $attrs['checkRequiredIf'];\n if (condition) {\n $scope.$parent.$watch(condition, function(value){\n field.checks.required.active = value;\n });\n }\n }", "title": "" }, { "docid": "45dfa76fcdb94428b7342dc73bd8b92e", "score": "0.62696356", "text": "isRequired () {\n\t\tconst definition = this.definition;\n\t\treturn ('required' in definition) && definition.required === true;\n\t}", "title": "" }, { "docid": "caf908a6238963a670d2de5318a4ffff", "score": "0.626142", "text": "function validate(req) {\n req.checkBody('firstName', 'Invalid firstName').notEmpty();\n req.checkBody('lastName', 'Invalid lastName').notEmpty();\n req.checkBody('dob', 'Date of birth must be in the past').isBefore();\n req.checkBody('password', 'Invalid password').notEmpty();\n req.checkBody('passwordRepeat', 'Invalid password').notEmpty();\n req.checkBody('gender', 'Invalid password').notEmpty();\n}", "title": "" }, { "docid": "8cd3510e1a6162e70a3f15e38bd4b462", "score": "0.6259858", "text": "function checkRequiredField(name, field) {\t\n\t\tif (!defined(field)) {\n\t\t\talert(name + \" is a required field.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "85640b3597b5931695d187d698a884ad", "score": "0.6246996", "text": "requiredFieldsFilled() {\n const { firstName, lastName, DOB, email, password } = this.state;\n return (\n firstName.length > 0 &&\n lastName.length > 0 &&\n DOB.length === undefined &&\n email.length > 0 &&\n password.length > 0\n );\n }", "title": "" }, { "docid": "9b4b5f386f470f11c39f01177850a017", "score": "0.62459636", "text": "function validateRequiredFieldForAdd(){\n\t\t\tvar lotnumber= $(\"#dialogAddPi\").find(\"#lotnumber\").val();\n\t\t\tif(lotnumber.trim() === '' || lotnumber == null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tvar piestshipdate= $(\"#dialogAddPi\").find(\"#piestshipdate\").val();\n\t\t\tif(piestshipdate.trim() === '' || piestshipdate == null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tvar customer1 = $(\"#dialogAddPi\").find(\"#customer1\").val();\n\t\t\tif(customer1 == \"none\" || customer1 == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar brandname = $(\"#dialogAddPi\").find(\"#brandcode\").val();\n\t\t\tif(brandname == \"none\" || brandname == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar factory = $(\"#dialogAddPi\").find(\"#factorycode\").val();\n\t\t\tif(factory == \"none\" || factory == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar country = $(\"#dialogAddPi\").find(\"#country\").val();\n\t\t\tif(country == \"none\" || country == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "b1ec0090891ad95fbaa461ccf1ea0c87", "score": "0.62300956", "text": "requiredButIgnoreEmpty () {\n if (this.value.toString().trim().length > 0) {\n return this.required()\n } else {\n // no-op\n }\n }", "title": "" }, { "docid": "71dc4e554805faef13b47f2451d88b7c", "score": "0.6224169", "text": "function validateRequired(input){\n let val = input.value.trim();\n spanErrorRemove(input.id);\n removeRed(input.id);\n\n if(val === \"\"){\n spanErrorDisplay(input.id);\n turnFieldRed(input.id);\n return false;\n }\n return true\n}", "title": "" }, { "docid": "114bb4e2e5ed9e756391673f640eaf60", "score": "0.6203289", "text": "function requiredFields() {\n $(\".win-sponsor :required\").each(function(index) {\n\n var field = $(this).val();\n\n if ($(this).data('validation') === 'name') {\n\n valid[index] = nameReg.test(field);\n\n } else if ($(this).data('validation') === 'phone') {\n\n valid[index] = numberReg.test(field);\n\n } else if ($(this).data('validation') === 'email') {\n\n valid[index] = emailReg.test(field);\n\n } else if ($(this).data('validation') === 'post-code') {\n\n valid[index] = postCodeReg.test(field);\n\n } else {\n\n if (field.length === 0) {\n valid[index] = false;\n } else {\n valid[index] = true;\n }\n\n }\n\n if (valid) {\n $(this).removeClass(\"error\");\n } else {\n $(this).addClass(\"error\");\n }\n });\n\n return valid.every(Boolean);\n }", "title": "" }, { "docid": "107f9591d0d6609583cd7e02557a6bdf", "score": "0.61586094", "text": "function validateRequired(a, b, c) {\n\t\t\t\t\t//Checking if field is empty\n\t\t\t\t\tif ($(a).val() == \"\") {\n\t\t\t\t\t\t$(b).text(\"Field is required. Cannot be left empty\")\n\t\t\t\t\t\t\t.attr(\"class\", \"invalid\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\t$(b).text(\"valid\").attr(\"class\", \"valid\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "72bf5a163614e4dfe1ed4d3cb5a27150", "score": "0.6152741", "text": "function has_required_fields(req) {\n\treturn (req.body.data_source \n\t\t&& req.body.solnbr\n\t\t&& req.body.listing_url\n\t\t&& req.body.title\n\t\t&& req.body.close_dt \n\t);\n\n}", "title": "" }, { "docid": "b088ef600bfa1758fade97d0952c1a51", "score": "0.61217207", "text": "requiredFieldsFilled() {\n const { title, description, community } = this.state;\n return (\n title.length > 0 &&\n description.length > 0 &&\n community.length > 0 &&\n community !== \"Communities\"\n );\n }", "title": "" }, { "docid": "c490fc3b39078e173b45135fc71f02c8", "score": "0.60974216", "text": "function requiredValidator(control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}", "title": "" }, { "docid": "c490fc3b39078e173b45135fc71f02c8", "score": "0.60974216", "text": "function requiredValidator(control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}", "title": "" }, { "docid": "c490fc3b39078e173b45135fc71f02c8", "score": "0.60974216", "text": "function requiredValidator(control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}", "title": "" }, { "docid": "f65a24f4b7e8cdcbccc795423110afe2", "score": "0.60417765", "text": "function checkRequired(inputArr) {\n // use forEach to check each input value\n inputArr.forEach(function (input) {\n // .trim() trims whitespace off\n if (input.value.trim() === '') {\n showError(input, `${getFieldName(input)} is required`);\n } else {\n showSuccess(input);\n }\n });\n}", "title": "" }, { "docid": "2988207caad050167236dac7236f208d", "score": "0.59949815", "text": "function requiredFieldIsValid(str, fieldname) {\n str = String(str);\n str = str.trim(); // trim white spaces\n console.log(fieldname + \":\" + str);\n if (!(str.length > 0 && str.length <= 255 && str != 'null')) {\n showToast('Please check the field ' + fieldname, 'error');\n }\n return (str.length > 0 && str.length <= 255 && str != 'null');\n}", "title": "" }, { "docid": "5a3d8fe2310cc24ef353c59e40b15c9d", "score": "0.5994657", "text": "function validatorForRequired(source, args) {\n var parentId = source.ValidatorCallbackBehavior._callbackControlID;\n var rangeFromId = parentId + GlobalConst.ChildControlIdPrefix + \"0\";\n var rangeToId = parentId + GlobalConst.ChildControlIdPrefix + \"1\";\n var rangeFrom = AccelaCompositeControl.getChildControlValue(rangeFromId);\n var rangeTo = AccelaCompositeControl.getChildControlValue(rangeToId);\n\n var validChildIds = new Array();\n var invalidChildIds = new Array();\n\n if (!isNullOrEmpty(rangeFrom) || !isNullOrEmpty(rangeTo)) {\n validChildIds = [rangeFromId, rangeToId];\n } else {\n invalidChildIds = [rangeFromId, rangeToId];\n }\n\n source.isCompositeControl = true;\n source.validateType = 'required';\n source.validChildIds = validChildIds;\n source.invalidChildIds = invalidChildIds;\n\n args.IsValid = (invalidChildIds.length == 0);\n return args.IsValid;\n }", "title": "" }, { "docid": "c83398a94889dd0293bdce916ccf2843", "score": "0.5970067", "text": "validateRequiredInput(item, data, callback) {\n const value = this.getInputFromData(data);\n let result;\n if (value === null) {\n result = false;\n }\n else {\n result = (typeof value === 'string' && value.length\n || typeof value === 'object' && (typeof value.first === 'string' && value.first.length\n || typeof value.last === 'string' && value.last.length)\n || (item.get(this.paths.full)\n || item.get(this.paths.first)\n || item.get(this.paths.last)) && (value === undefined\n || (value.first === undefined\n && value.last === undefined))) ? true : false;\n }\n utils.defer(callback, result);\n }", "title": "" }, { "docid": "733e97697d3ec708da0e1854f47f168a", "score": "0.5956082", "text": "function checkRequiredFields() {\n\tglobalFilled = true;\n\tfor (pt in attributesHash) {\n\t\tif (!exclusion(pt)) { \n\t\t\ttry {\n\t\t\t\tglobalFilled = checkField(pt, true) && globalFilled;\n\t\t\t} catch (err) { alert(\"error: \" + err.description);}\n\t\t}\n\t}\n\t// should add check for errorMessageLength, because some of the exclusion() fields adds messages, but return true\n\treturn globalFilled && (document.getElementById(\"errorMessage\").innerHTML == '');\n}", "title": "" }, { "docid": "58f8ce7174000aebd10b27ba9b5a5e21", "score": "0.59553504", "text": "set required(required) {\n super.required = required;\n\n this.timeField.required = this.dateField.required = required;\n }", "title": "" }, { "docid": "c7a56e994bfc2fbf03e0bb3229daaf09", "score": "0.5943143", "text": "function ValidateRequired(trg) {\n var value = ($(trg).data('mask') !== undefined) ? $(trg).cleanVal() : $(trg).val();\n var valid = value != '';\n toggleErrorAndTooltip(valid, $(trg), isRequiredMessage);\n\n return valid;\n }", "title": "" }, { "docid": "85dc0a445f74ae9d8f837318a11338a9", "score": "0.5940806", "text": "function checkRequired(){\n\t//Check if required fields are filled\n\tvar counter = 0;\n\tjQuery(\"input.required, select.required\").each(function(index) {\n\t\tcontentField = jQuery(this).val();\n\t\t//Check if empty\n\t\tif(contentField == '' || contentField == null || contentField == '0'){\n\t\t\t//Change BG style\n\t\t\tjQuery(this).css({'background-color':'#a94442'});\n\t\t\t//Take the cursor to the first field\n\t\t\tif(counter == 0){\n\t\t\t\tjQuery(this).focus();\n\t\t\t}\n\t\t\tcounter++;\n\t\t}else{\n\t\t\t//Reset style\n\t\t\tjQuery(this).css({'background-color':'#fff'});\n\t\t}\n\t});\n\n\t//If any field is \"not valid\"\n\tif(counter > 0){\n\t\t//Set this message\n\t\talert('Los campos de E-mail y Nombre no pueden estar vacios');\n\t\treturn false;\n\t}else{\n\t\t//Reset the error message\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "4dfdf2cb7c77fa5086061d529561e188", "score": "0.59401846", "text": "get required() { return this._required; }", "title": "" }, { "docid": "898805cf9ab5e00eefb63eeb0f4dfae3", "score": "0.5932647", "text": "function isRequired(_ref) {\n var validate = _ref.validate,\n required = _ref.required;\n\n return required || validate && validate.some(function (item) {\n return item.trigger !== \"submit\" && item.required;\n });\n}", "title": "" }, { "docid": "a7cebaa72dad08ec3d65a01c61e2f6b2", "score": "0.5921183", "text": "hasRequiredFields(required, params){\n return required.every(entry => find(params, param => Object.keys(param)[0] == entry.name) !== undefined );\n }", "title": "" }, { "docid": "8655842d9c355f9e8488d410a3bde320", "score": "0.59095484", "text": "function _checkRequired(action, name, prop) {\n if (_isNullOrUndefined(prop)) {\n return _reject(action, `${name} is required`);\n }\n}", "title": "" }, { "docid": "c474ca8f5d2e6d66a55d9fc2dbd7338e", "score": "0.59027153", "text": "function checkRequired(inputArr) {\n inputArr.forEach(function(input) {\n if (input.value === \"\") {\n showError(input, `${getFieldName(input)} is required`);\n } else {\n showSuccess(input);\n }\n });\n}", "title": "" }, { "docid": "859f9aa795ff885769db144e449153ff", "score": "0.58864933", "text": "set required(value) {\n this._required = value;\n }", "title": "" }, { "docid": "e598b359391ee9cfa44b4c1dca4ffa4c", "score": "0.5871347", "text": "function checkRequired(inputArr) {\n // for each element of the array, check the function with the input as parameter\n inputArr.forEach(function (input) {\n //if the input is empty show that the field name is required to be filled\n if (input.value.trim() === '') {\n showError(input, `${getFieldName(input)} is required`);\n } else {\n showSuccess(input);\n }\n });\n}", "title": "" }, { "docid": "238b62b879e6e216c97d4235dfac78fb", "score": "0.58281374", "text": "function ValidateRequiredFields() {\n\t\n\tvar firstName = document.forms[\"tiForm\"][\"firstname\"].value;\n\tvar lastName = document.forms[\"tiForm\"][\"lastname\"].value;\n\tvar eMail = document.forms[\"tiForm\"][\"email\"].value;\n\tvar Message = document.forms[\"tiForm\"][\"message\"].value;\n\t\n\tif( firstName == \"\") { \n\t\talert(\"Please fill in the mandatory field 'First Name'\");\n\t\treturn false;\n\t}\n\tif( lastName == \"\") { \n\t\talert(\"Please fill in the mandatory field 'Last Name'\");\n\t\treturn false;\n\t}\n\tif( eMail == \"\") { \n\t\talert(\"Please fill in the mandatory field 'E-mail Address'\");\n\t\treturn false;\n\t}\n\tif( Message == \"\") { \n\t\talert(\"Please fill in the mandatory field 'Message'\");\n\t\treturn false;\n\t}\n\telse {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "cb26f32be477ac91a5ed6d39cb2c66bd", "score": "0.5822954", "text": "function Schema(required, rules) {\n this._required = required;\n this._rules = rules;\n }", "title": "" }, { "docid": "caeea4ca3e21b8d95c7f07bfdef2f647", "score": "0.58172375", "text": "inputIsValid(data, required, item) {\n const value = this.getValueFromData(data);\n if (value === undefined && item && (item.get(this.path) || item.get(this.path) === 0)) {\n return true;\n }\n if (value !== undefined && value !== '') {\n const newValue = utils.number(value);\n return (!isNaN(newValue));\n }\n else {\n return (required) ? false : true;\n }\n }", "title": "" }, { "docid": "b2ff8ba7dac3a9ce8182b6f8d9301293", "score": "0.5815973", "text": "function validate(values, requires=[]) {\n const errors = {};\n requires.forEach(function (name) {\n if (values[name] === undefined) {\n errors[name] =\n\t`A value for '${FIELDS_INFO[name].friendlyName}' must be provided`;\n }\n });\n for (const name of Object.keys(values)) {\n const fieldInfo = FIELDS_INFO[name];\n const value = values[name];\n if (fieldInfo.regex && !value.match(fieldInfo.regex)) {\n errors[name] = fieldInfo.error;\n }\n }\n return Object.keys(errors).length > 0 && errors;\n}", "title": "" } ]
f3ddee88dcd0061c117586894089b3a4
it allows the user to have the letters he or she presses pull similar questions from the database
[ { "docid": "33b5498d02ddbf51f114299805c34ff3", "score": "0.0", "text": "function search_ajax()\n{\nvar questions_var = document.getElementById(\"searchajax\").value;\nvar xhr;\n if (window.XMLHttpRequest) { // Mozilla, Safari, ...\n xhr = new XMLHttpRequest();\n} else if (window.ActiveXObject) { // IE 8 and older\n xhr = new ActiveXObject(\"Microsoft.XMLHTTP\");\n}\nvar data = \"Question=\" + questions_var;\n xhr.open(\"POST\", \"model/question_suggestion.php\", true); \n xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\"); \n xhr.send(data);\n\t xhr.onreadystatechange = display_data;\n\tfunction display_data() {\n\t if (xhr.readyState == 4) {\n if (xhr.status == 200) {\n //alert(xhr.responseText);\t \n\t document.getElementById(\"suggestion\").innerHTML = xhr.responseText;\n } else {\n alert('There was a problem with the request.');\n }\n }\n\t}\n}", "title": "" } ]
[ { "docid": "ddccee3202901344fa14f350c5069383", "score": "0.6038073", "text": "function showQuestions() {\n for (i = 0; i < question.length; i++){\n if ($(\".question\").html() === question[i]){\n $(\".question\").html(question[i+1]);\n return;\n }\n }\n }", "title": "" }, { "docid": "931835b22e4518172e0d6ee3aa0a5004", "score": "0.6024998", "text": "function initialPrompt() {\n let firstQuestion = input.question(`Let's play some scrabble! \n\n Enter a word to score: `).toLowerCase();//the test will check the word and newPointStructure keys as matching in lower case.-Carl\n // console.log(scrabbleScore(firstQuestion));\n return firstQuestion;\n}", "title": "" }, { "docid": "5eeb7ff2b7539b657e0211dfff734fb6", "score": "0.5963664", "text": "handleInteraction() {\n //when a letter is clicked, check if it matches anything in the phrase\n}", "title": "" }, { "docid": "731dabac82f9ca3e83ff8abc34d45f4f", "score": "0.59338295", "text": "async function insert_suggestions(clear_other_suggestions){\n const searchbar = document.getElementById('duplicate-manager-searchbar');\n const searchterm = searchbar.value.toLowerCase();\n\n // if it's a question url, use that as the dupe target\n const host = document.location.hostname;\n if (searchterm.includes(host)){\n insert_original_selection(searchterm);\n return;\n }\n\n // clear the suggestion list\n const list_elem = document.getElementById('originals-list');\n while (list_elem.firstChild){\n list_elem.removeChild(list_elem.firstChild);\n }\n\n // search for related questions\n const originals = await get_originals_list();\n const search_terms = new Set(searchterm.split(/\\s+/));\n\n const is_question_page = !window.location.href.includes('/originals/');\n\n var question_text = \"\";\n if (is_question_page){\n question_text = page.question.extract_text().toLowerCase();\n }\n\n function rate_original(original){\n function compare(term, word, weight){\n var score = 0.0;\n\n word = word.toLowerCase();\n term = term.toLowerCase();\n\n if (word.includes(term)){\n score += term.length * weight;\n\n if (term == word){\n score *= 1.5;\n }\n }\n\n return score;\n }\n\n // if the current question doesn't have a single tag in common with the\n // suggested question, it's out. This is to prevent questions about\n // language X from showing up on questions about language Y.\n if (is_question_page){\n var ok = false;\n for (const tag of original.tags){\n if (page.question.tags.includes(tag)\n || search_terms.has(tag.toLowerCase())){\n ok = true;\n break;\n }\n }\n if (!ok && !original.tags.includes('language-agnostic')){\n return -1;\n }\n }\n\n var score = 0;\n\n for (const term of search_terms){\n // check if any keywords match the search terms\n for (var kword of original.keywords){\n score += compare(term, kword, 5);\n }\n\n // check if any tags match the search terms\n for (var tag of original.tags){\n score += compare(term, tag, 4);\n }\n\n // check if the question title contains this search term\n score += compare(term, original.title, 3);\n\n // check if the question text contains this search term\n score += compare(term, original.text, 1);\n }\n\n // check how many of the original's keywords the question contains\n for (const keyword of original.keywords){\n if (question_text.includes(keyword.toLowerCase())){\n score += 1;\n }\n }\n\n return score;\n }\n\n // rate each suggestion\n var suggestions = originals.map(q => [rate_original(q), q]);\n // remove the junk\n suggestions = suggestions.filter(pair => pair[0] >= 0);\n // sort in descending order\n suggestions = suggestions.sort((a, b) => b[0] - a[0]);\n // take the best few candidates\n suggestions = suggestions.slice(0, 8);\n // remove the rating we used for the sort\n suggestions = suggestions.map(pair => pair[1]);\n\n for (const original of suggestions){\n add_original_suggestion(original);\n }\n }", "title": "" }, { "docid": "dc6adc0cffcd04adf302441a295fe9da", "score": "0.5921591", "text": "function suggestions(){\n var twelfth_choice = prompt(\"Have you completed your twelft or equivalent? (1.yes 2.No): \")\n switch(twelfth_choice) {\n case \"1\":\n var op=prompt(\"select 1-5 (1.MPC, 2.BiPC, 3.CEC, 4.HEC, 5.Persuing Diploma )\",\"1\");\n text = \"1.MPC 2.BiPC 3.CEC 4.HEC 5.Persuing Diploma\"\n switch(op){\n case \"1\":\n n= \"For MPC, you an prefer courses like:<br>1. Basics of Programming<br>2. Basics of Electronics<br>3. Intro to Designing<br>4. Basics of Web development\";\n return n;\n break;\n case \"2\":\n n=\"For BiPC, you can prefer courses like:<br>1. Know about Anatomy<br>2. Intro to Bio Chemistry<br>3. Agriculture Development<br>4. Intro to Botany\";\n return n;\n break;\n case \"3\":\n n=\"For CEC, you can prefer courses like:<br>1. Public policy analysis<br>2. Society and media<br>3. Numerical analysis<br>4. Corporate law\";\n return n;\n break;\n case \"4\":\n n=\"For HEC, you can prefer courses like:<br>1. Applied business analytics<br>2. Enterpreneur strategies<br>3. Business model innovations<br>4. Strategic management of innovations\";\n return n;\n break;\n case \"5\":\n n=\"For Diploma, you can prefer courses like:<br>1. Programming basics<br>2. Foundations of data structures<br>3. Basic electronics<br>4. Analog circuits\";\n return n;\n break;\n default :\n n=\"Please choose from 1-5 only...\";\n return n;\n }\n \n case \"2\": //Courses for twelfth not completed students\n text = \"We have some courses for tenth completed students too....<br> 1. Basic English skills<br> 2. Trignometry<br> 3. Indian history<br> 4. Harappan civilization<br>\"\n return text;\n default :\n n=\"Please choose from 1-2 only...\";\n return n;\n }\n}", "title": "" }, { "docid": "367f1536e2ae92729eb8caabd0305b45", "score": "0.5917901", "text": "function getAnswer() {\r\ncleanInput = yourAnswer.value.toUpperCase();\r\nanswers.push(cleanInput);\r\nyourAnswer.value=\"\";\r\ncontinueStory(answers.length - 1);\r\n}", "title": "" }, { "docid": "47c22726575e003dd0e5d6e084164d98", "score": "0.5902729", "text": "function nextCharacter() {\n let nextCharacter = randomCharacter();\n\n //Check if there are more words in list\n if(records.length > 1){\n let tempQuery = query + nextCharacter;\n\n //Test if any words match new query\n let remainingWords = false;\n \n //Check if any words match new query\n for (var i = 0; i < records.length; i++) {\n if (records[i][1].substring(0, tempQuery.length).toUpperCase() === tempQuery.toUpperCase()) {\n remainingWords = true;\n }\n }\n\n //Set to new query\n if (remainingWords) {\n query = tempQuery;\n R = random(0, 255);\n G = random(0, 255);\n B = random(0, 255);\n }\n else {\n failedAttempts++;\n }\n }\n\n //Filter out words that don't match\n filterWordsRecords();\n}", "title": "" }, { "docid": "478c6f53ea555065bafac0d1dccf2907", "score": "0.58872324", "text": "function q1(){\n var quest1 = 'Q1: Do you think that I love watching Soccer?';\n yesNoQuestionsMaker(quest1, 'no');\n}", "title": "" }, { "docid": "7a8e051e97457215b4fb1dc25f9a4eaa", "score": "0.5874546", "text": "function askQuestions(question,desiredAnswer,index)\n{\n // var userAnswer = readlineSync.question(question);\n console.log(chalk.blue(question))\n \n console.log(chalk.green(\"a. \"+ questions[i].op1))\n console.log(chalk.green(\"b. \"+ questions[i].op2))\n console.log(chalk.green(\"c. \"+ questions[i].op3))\n\n var userAnswer = readlineSync.question();\n if(userAnswer === desiredAnswer)\n {\n score++;\n }\n\n console.log(\"\")\n\n\n}", "title": "" }, { "docid": "713eacd7ba1b809f5d05b345b5158225", "score": "0.5874395", "text": "function inquiry() {\n inquirer.prompt(questions).then(function (answers) {\n answers.guess = new Letter(answers.guess);\n answers.guess.checkCorrect();\n answers.guess.checkEnd();\n });\n}", "title": "" }, { "docid": "20432171805983a247bccfbb2042db14", "score": "0.58714986", "text": "function question(text) {\n clicked = true;\n const textAndBot = document.querySelector(\"#wordMeaning\");\n const reply = document.querySelector('.word-meaning__text');\n let meaning = null;\n for (const words in dictionaryRet){\n if (dictionaryRet[words].name === text){\n meaning = dictionaryRet[words].meaning;\n break;\n }\n }\n reply.innerHTML = meaning;\n let x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; // Get the horizontal coordinate\n let y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop;\n setBot(x,y);\n textAndBot.classList.remove('inactive');\n}", "title": "" }, { "docid": "6c37642d2a4ece042d0afd84c2a9975f", "score": "0.5855677", "text": "function generateQuestions() {\r\n var questionsAndAnswers = [\r\n { question: \"What is the capital of Ferelden?\",\r\n answer: [ \"Ostagar\", \"Jaundice\", \"Honnleath\", \"Denerim\", \"Gwaren\" ],\r\n rightAnswer: 3 },\r\n\r\n { question: \"Which term is used to refer to mages who have had their magical abilities severed?\",\r\n answer: [ \"Abomination\", \"Tranquil\", \"Eluvian\", \"Orzammar\" ],\r\n rightAnswer: 1 },\r\n\r\n { question: \"What class is Aveline Vallen, one of Hawke's companions in Dragon Age 2?\",\r\n answer: [ \"Warrior\", \"Rogue\", \"Darkspawn\", \"Mage\" ],\r\n rightAnswer: 0 },\r\n\r\n { question: \"The magical ritual that recruits must undergo in order to become members of the legendary group of heroes known as the Grey Wardens is called:\",\r\n answer: [ \"Val Royeaux\", \"The Harrowing\", \"Tal-Vashoth\", \"The Joining\" ],\r\n rightAnswer: 3 },\r\n\r\n { question: \"In which Dragon Age novel did Cole appear before he became a companion in Dragon Age: Inquisition?\",\r\n answer: [ \"<i>Last Flight</i>\", \"<i>The Stolen Throne</i>\", \"<i>The Calling</i>\", \"<i>Asunder</i>\" ],\r\n rightAnswer: 3 },\r\n\r\n { question: \"What is the name of the guild of assassins that Zevran Aranai worked for in Dragon Age: Origins?\",\r\n answer: [ \"The Orlesian Fins\", \"The Ferelden Hounds\", \"The Antivan Crows\", \"The Free Marchers\" ],\r\n rightAnswer: 2 },\r\n\r\n { question: \"What is Bianca?\",\r\n answer: [ \"A dwarven woman\", \"A crossbow\", \"A ship\", \"A and C\", \"A and B\" ],\r\n rightAnswer: 4 },\r\n\r\n { question: \"What are Hawke's siblings' names?\",\r\n answer: [ \"Alistair and Isabela\", \"Bethany and Carver\", \"Samson and Sera\", \"Bethany and Alistair\" ],\r\n rightAnswer: 1 },\r\n\r\n { question: \"Morrigan is the daughter of ___________, an ancient, powerful witch.\",\r\n answer: [ \"Merrill\", \"Flemeth\", \"Vivienne\", \"Solas\" ],\r\n rightAnswer: 1 },\r\n\r\n { question: \"Put these royal Ferelden ranks in order from most to least powerful:\",\r\n answer: [ \"Arl, teyrn, bann\", \"Teyrn, arl, bann\", \"Teyrn, bann, arl\", \"Bann, teyrn, arl\" ],\r\n rightAnswer: 1 } ];\r\n\r\n return questionsAndAnswers;\r\n}", "title": "" }, { "docid": "f1998328eec742d58bec878a3f71b260", "score": "0.5839463", "text": "function getUserQandA(){\n\n randomQuestion();\n userQuestion.innerHTML = allQandA[stupidIndex].q;\n answer1El.innerHTML = allQandA[stupidIndex].a[0];\n answer2El.innerHTML = allQandA[stupidIndex].a[1];\n answer3El.innerHTML = allQandA[stupidIndex].a[2];\n}", "title": "" }, { "docid": "587349166eb0c5cd33a35ea2df33c0ed", "score": "0.5837677", "text": "function reply(){\n //I defince variable called question and I put inside this variable the value (input from user)\n let question = document.getElementById('input').value;\n //I used if statement to check the input and give the outpot\n if(object.input.includes(question)){\n //here we define variable called i, inside this variable i checked the index of the input based on the location in array\n let i= object.input.indexOf(question);\n //last step is to give the output location based on the input location in the array\n document.getElementById('output').textContent = object.output[i];\n\n }\n else{\n document.getElementById('output').textContent = \"I don't understand that command. Please enter another\";\n\n }\n }", "title": "" }, { "docid": "fc693421a1219bbd39a036067fe5d906", "score": "0.58357686", "text": "queryUser() {\n let guess = prompt(\"Enter a guess: \")\n //if the user gives up, return null\n if(guess == null) {\n return null;\n }\n\n guess = guess.toLowerCase();\n //if the user inputed '*', shuffle the available letters\n if(guess == '*') {\n alert(`Shuffling root word...`);\n shuffle(this.availableLetters);\n }\n //if the guess is too short or too long, let the player know\n else if(guess.length < Min_Length) alert(`Guess is too short!`);\n else if(guess.length > Root_Word_Length) alert(`Guess is too long!`);\n //otherwise, check if it is a solution\n else if(this.listOfWords.has(guess)) {\n if(this.foundWords.has(guess)) {\n //We already guessed this word, so inform the player\n alert(`Already guessed ${guess}!`);\n }\n else {\n //this was a correct guess, so update foundWords\n this.foundWords.add(guess);\n //give a message that the guess was correct\n alert(`Correct! ${guess}`);\n }\n \n }\n else {\n //If we didn't find the word\n alert(`${guess} is not a word!`);\n }\n \n return true;\n }", "title": "" }, { "docid": "4c5946a1b329f4e4a0d110d207b9c559", "score": "0.5834839", "text": "function showAnswerToText() {\n // (3) Get the input text\n var inputText = $('#txtAreaEntry').val();\n // (3) Check if there's something there that is interesting. \n //(3) If nothing is caught, it will display the default message I put in the html, saying the person is boring.\n //(3) There will also be pop ups opening depending on what the message written is about.\n\n //(3) building word banks on variables to verify in the next step if something interesting has been found.\n var money = /money|bitcoin|cash|rich|bill|capital|fund|pay|payment|paycheck|salary|wage|wealth|bank|bucks/i;\n var animals = /animal|dog|cat|bird|fish|goat|sheep|pig|chicken|chick|donkey|guinea|duck|buffalo|zebra|lion|tiger|lizard|gecko|goose|lama|owl|rabbit|koi|canary|mice|mouse|rat|fox|hedgehog|guppy|monkey/i;\n var food = /food|eat|taste|chocolate|cream|sugar|sweet|spicy|digest|cook|raw|hungry|hunger|famine|chew|swallow|boil|fry|roast|bake|oven|pot|kitchen|dish|bowl|sauce|fork|breakfast|lunch|meal|dinner|supper|bread|flour|meat|sausage|soup|vegetables|beans|potato|fruit|brunch|olive|oil|salt|honey|milk|cheese|butter|egg/i;\n var videoGames = /game|video|stream|controller|console|pc|computer|nintendo|nes|64|gamecube|wii|switch|esport|e-sport|e sport|playstation|play station|xbox|sega|atari|pong|donkeykong|mario|peach|yoshi|link|zelda|smash|fortnite|battle royale|war|call of duty/i;\n\n//(3) looking if there is something interesting about money.\nif(money.test(inputText)){\n //(3) if so, change the text of #pResultTxtEntry to fit the answer.\n $(\"#pResultTxtEntry\").html('So, you are interested about money! That is very clever in our amazing capitalist society. You should check out cryptocurrencies, they are without a doubt the money of the future!');\n //(3)Now, we are changing the variable 'txtResultChanged' to true, so we know the text has been updates. For the next group of words, instead of replacing the text, we are going to add some.\n txtResultChanged = true;\n window.open(\"https://bitcoin.org/en\", \"PopUp6\", \"width = 400, height = 400, top = 350, left = 350\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"https://bitcoin.org/en\");\n}\n\n//(3) looking if there is something interesting about animals.\nif(animals.test(inputText)){\n //(3) if the if is true, we will look of the var txtResultChanged is true. if it is, it means there is already some good text in it, so we are going to add text after what is already there. \n if(txtResultChanged === true){\n $(\"#pResultTxtEntry\").after('<p>Also, you have something for our animal friends. Of course... how can you not love them?! Some of them can even be kept at home. You should look at whats available in your nearest petshop!</p>');\n window.open(\"https://www.google.ca/search?q=pet+shop+nearby&spell=1&sa=X&ved=0ahUKEwjh2aPdt7DaAhUumeAKHdNUALwQBQglKAA&biw=1244&bih=622\", \"PopUp7\", \"width = 400, height = 400, top = 150, left = 1150\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"https://www.google.ca/search?q=pet+shop+nearby&spell=1&sa=X&ved=0ahUKEwjh2aPdt7DaAhUumeAKHdNUALwQBQglKAA&biw=1244&bih=622\");\n }\n //(3) if the variable is not true, it means there is no text yet in the #pResultTxtEntry, so we are going to replace it by our good answer (because we found a good match, meaning there is something interesting that we want to point out to the user).\n else{ \n $(\"#pResultTxtEntry\").html('Animals can be so adorable! some of them can even be kept at home. You should look at whats available in your nearest petshop!');\n txtResultChanged = true;\n window.open(\"https://www.google.ca/search?q=pet+shop+nearby&spell=1&sa=X&ved=0ahUKEwjh2aPdt7DaAhUumeAKHdNUALwQBQglKAA&biw=1244&bih=622\", \"PopUp8\", \"width = 400, height = 400, top = 150, left = 1150\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"https://www.google.ca/search?q=pet+shop+nearby&spell=1&sa=X&ved=0ahUKEwjh2aPdt7DaAhUumeAKHdNUALwQBQglKAA&biw=1244&bih=622\");\n }\n}\n\n//(3) looking if there is something interesting about food. The code is well explained in the first examples above (the ones about money and animals)\nif(food.test(inputText)){\n if(txtResultChanged === true){\n $(\"#pResultTxtEntry\").after('<p>Food is also important for you. It is a honorable thing to be a (food) consumer in our present world. But nobody have time to cook, and it is understandable! Now take your car and go buy a juicy burger!</p>');\n window.open(\"https://www.ricardocuisine.com/en\", \"PopUp9\", \"width = 400, height = 400, top = 100, left = 50\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"https://www.ricardocuisine.com/en\");\n }\n else{ \n $(\"#pResultTxtEntry\").html('Animals can be so adorable! some of them can even be kept at home. You should look at whats available in your nearest petshop!');\n txtResultChanged = true;\n window.open(\"https://www.ricardocuisine.com/en\", \"PopUp10\", \"width = 400, height = 400, top = 100, left = 50\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"https://www.ricardocuisine.com/en\");\n }\n}\n\n//(3) looking if there is something interesting about video games. The code is well explained in the first examples above (the ones about money and animals)\nif(videoGames.test(inputText)){\n if(txtResultChanged === true){\n $(\"#pResultTxtEntry\").after('<p>And of course, you are a video games lover. Awesome! There are great steam sales at the moment, go check them out!</p>');\n window.open(\"http://store.steampowered.com/\", \"PopUp11\", \"width = 400, height = 400, top = 650, left = 850\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"http://store.steampowered.com/\");\n }\n else{ \n $(\"#pResultTxtEntry\").html('You are a video games lover. Awesome! There are great steam sales at the moment, go check them out!');\n txtResultChanged = true;\n window.open(\"http://store.steampowered.com/\", \"PopUp12\", \"width = 400, height = 400, top = 650, left = 850\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"http://store.steampowered.com/\");\n }\n}\n\n if(txtResultChanged === false){\n window.open(\"https://www.wikihow.com/Be-a-Less-Boring-Person\", \"PopUp13\", \"width = 400, height = 400, top=300, left = 800\", \"_blank\");\n //(4) adding the website to the pool in the array for the end.\n linksArrayEnd.push(\"https://www.wikihow.com/Be-a-Less-Boring-Person\");\n }\n\n}", "title": "" }, { "docid": "d1fe256962ba4e73c9934b68ae392dbf", "score": "0.5823538", "text": "function userkey(e) { \n \n if (phrase.indexOf(e) > -1) {\n \n for (var i = 0; i < correctGuesses.length; i++) {\n \n if (correctGuesses[i] === e && phraseLetters[i] === \"_\") {\n \n phraseLetters[i] = e;\n numberOfBlanks--; \n document.getElementById('phraseToGuess').innerHTML = phraseLetters.join(' ');\n \n } \n } \n \n } else {\n\n incorrectGuesses.push(e);\n guessAmount--;\n document.getElementById('guesses-left').innerHTML = guessAmount;\n document.getElementById('wrong-guess').innerHTML = incorrectGuesses.join(' ');\n \n }\n}", "title": "" }, { "docid": "96c07e75a0e579cdcfec5035ad80db9f", "score": "0.580653", "text": "function check(answer, userAnswer)\n{\n let result = \"\";\n //The user must enter full name\n if (answer == userAnswer)\n {\n\n if (moviesSubmited.includes(answer))\n {\n result = \"Correct but you already submit that movie/person !\".fontcolor(\"orange\");\n \n }\n else\n {\n moviesSubmited.push(answer);\n result = \"Well done, it is correct !\".fontcolor(\"green\");\n\n //Authorize to pass to the next question\n document.getElementById(\"next\").disabled = false;\n //or could be repleace direclty by :\n //Next();\n }\n }//Could me improuve, juste an idea. Only working for director close guess for now\n else if (answer.includes(userAnswer)) \n {\n result = \"Close, continue guessing\".fontcolor(\"red\");\n } \n else \n {\n //If the answer is wrong display a message in red near the submit button\n result = \"Wrong answer ! Please try again\".fontcolor(\"red\");\n\n }\n return result;\n}", "title": "" }, { "docid": "51f01359d31bef1f91008ec210e82a42", "score": "0.58031833", "text": "function getQuestion(){\n return qusetions[getrandomQuestionNumber ()]\n}", "title": "" }, { "docid": "d6a02c7a4dc183b543a46c7bf0c878f6", "score": "0.5799342", "text": "function selectword()\n{\n\tindex=Math.floor(Math.random()*selword.length);\n\tguessword=selword[index].split(\"\");\n\tdash=new Array();//this fixes a bug hopefully\n\tfor(i=0;i<guessword.length;i++)\n\t{\n\t\tdash[i]='_';\n\t}\n\tshowhintbutton();//shows the hint button, updates the hint text and hides it\n\tdocument.getElementById('word').innerHTML=dash.join(\" \");\n\tdocument.getElementById(\"exactscore\").innerHTML=selword.length;\n}", "title": "" }, { "docid": "3f98dc8f5a8e466b0268d5282bbb8e06", "score": "0.5793019", "text": "updateAnsDisplay(char) {\n console.log(\"char: =>\" + char + \"<- word: \" + this.answer);\n \n for (let i = 0; i < this.answer.length; i++) {\n if (this.answer.charAt(i).toLowerCase() === char) {\n this.ansDisplay[i] = this.answer[i];\n console.log(\"got \" + char + \" word: \" + this.ansDisplay);\n }\n }\n \n return this.ansDisplay;\n }", "title": "" }, { "docid": "d3963dae2dff7e10430bbaea4ddadb3b", "score": "0.5772219", "text": "function handleQuestionMarks(query) {\n var arr = [];\n \n for (var i = 0; i < query; i++) {\n arr.push(\"?\");\n }\n \n return arr.toString();\n }", "title": "" }, { "docid": "6f60a77907334b916c12c27e0c19bbf4", "score": "0.57712895", "text": "getSimilarWordsWithPhonemes() {\n\n }", "title": "" }, { "docid": "386dc4b17b9bd969a4359ad5d0d61271", "score": "0.5767608", "text": "function check_magic(raw_input, correct_answer) {\n // in case of card with same front creates list of possible answers\n var possible_answers = correct_answer.split(\", \");\n var dist;\n // for multiple answer question, if user enters one of possibilities\n for (let answer of possible_answers) {\n dist = levenshtein_distance(raw_input, answer);\n if (dist[0]) {\n return [true, dist[1]];\n }\n }\n // if user tries to answer with all answers\n dist = levenshtein_distance(raw_input, correct_answer);\n if (dist[0]) {\n return [true, dist[1]]\n }\n return [false, dist[1]];\n}", "title": "" }, { "docid": "9fb3b758d375b0aa602bc205e1938b55", "score": "0.57629514", "text": "function getQuestion() {\n readQuestion(shuffledQuestions[questionIndex])\n}", "title": "" }, { "docid": "dda4c9ad9079916a9920fa495eef6f57", "score": "0.5762176", "text": "function getPrompt() {\n rl.question('word ', (answer) => {\n console.log( pigLatin(answer) );\n getPrompt();\n });\n}", "title": "" }, { "docid": "6964df32884158228ed875d9ac17e120", "score": "0.57590985", "text": "updateAnsDisplay(char) {\n console.log(\"char: =>\" + char + \"<- word: \" + this.answer);\n\n for (let i = 0; i < this.answer.length; i++) {\n if (this.answer.charAt(i).toLowerCase() === char) {\n this.ansDisplay[i] = this.answer[i];\n console.log(\"got \" + char + \" word: \" + this.ansDisplay);\n }\n }\n\n return this.ansDisplay;\n }", "title": "" }, { "docid": "d2f51ce68787c2f28112a808cc8ec3c2", "score": "0.5748195", "text": "function ifCharachterExsits() {\n // randomizedFruitLists();\n // console.log(word);\n let firstChar = document.getElementById(\"get-char\").value.toLowerCase();\n // console.log(firstChar + ':user input');\n\n for (let i = 0; i < word.length; i++) {\n if (word.length !== null)\n if (word.charAt(i) === firstChar) {\n answer = \"Yes\";\n // console.log(word);\n break;\n } else {\n // console.log(word);\n answer = \"No\";\n }\n }\n\n console.log(answer);\n const str = word;\n let newLenght;\n let foundIndiceArray = [];\n let count = 0;\n let position = str.length;\n // console.log(position + ' position')\n for (let i = 0; i < position; i++) {\n if (firstChar === word[i]) {\n newLenght = foundIndiceArray.push(i);\n count++;\n }\n }\n document.getElementById(\"answer\").innerText = answer.toUpperCase();\n\n document.getElementById(\"randomizedWord\").innerText = word;\n document.getElementById(\"charaters-hit\").innerText = foundIndiceArray;\n\n document.getElementById(\"characters-count\").innerText =\n foundIndiceArray.length;\n}", "title": "" }, { "docid": "0ec74a085dc205487fd5d127ed07d184", "score": "0.5742279", "text": "function Qus7(qus7_b) {\n\n for (let i = 0; i < 6; i++) {\n qus7_b = prompt('who is the main character in attack on titan', 'You can Google it or Eren Good Luck').toLowerCase();\n while (!qus7_b) {\n alert('Please Enter a valid Text')\n qus7_b = prompt('Who is the main character in attack on titan', 'You can Google it or Eren Good Luck').toLowerCase();\n }\n switch (qus7_b) {\n case multiple[0]:\n case multiple[1]:\n case multiple[2]:\n alert('you are right, here are all possible answer ' + multiple[0] + ' ' + multiple[1] + ' ' + multiple[2],)\n break;\n\n default:\n alert('try again')\n break;\n }\n if (qus7_b == multiple[0] || qus7_b == multiple[1] || qus7_b == multiple[2]) {\n score++;\n scoreA[arr_index++] = 'your guess was right the answer was ' + qus7_b + ' here are all possible answer ' + multiple[0] + ' ' + multiple[1] + ' ' + multiple[2];\n break;\n } else if (i == 5) {\n scoreA[arr_index++] = 'All of your answer was WRONG, the right answers was ' + multiple[0] + ' ' + multiple[1] + ' ' + multiple[2];\n alert('All of your answer was WRONG, the right answers was ' + multiple[0] + ' ' + multiple[1] + ' ' + multiple[2]);\n }\n }\n}", "title": "" }, { "docid": "83c75b70bb9125b664b730119d65c7e4", "score": "0.5736077", "text": "showMatchedLetter(guess) {\r\n let $matchLetter = $('#phrase ul .' + guess);\r\n $matchLetter.removeClass('hide');\r\n $matchLetter.addClass('show');\r\n }", "title": "" }, { "docid": "e0df72d9a8651b4e1ec9ce15c0566108", "score": "0.57314026", "text": "function getQuestionList() {\n\n var questions = [\n// PCO training questions\n\n// problems 101-106 were used in exp 6\n \nnew Question( 101, \"PCO\", \"meals\", \"friends\", \"meal\", \"friend\",\n // as of exp 7, changed \"person\" to \"friend\" in sentences 2-3\n \"<p>A group of friends is eating at a restaurant. Each friend chooses a meal from the menu. (It is possible for multiple friends to choose the same meal.)</p><p>In how many different ways can the friends choose their meals, if there are {0} {1} and {2} {3}?</p>\" ), \n\nnew Question( 102, \"PCO\", \"pizza brands\", \"consumers\", \"pizza brand\", \"consumer\",\n \"<p>A marketing research company conducts a taste test survey. Several consumers are each asked to choose their favorite from among several pizza brands. (It is possible for multiple consumers to choose the same brand.)</p><p>How many different results of the survey are possible, if there are {0} {1} and {2} {3}?</p>\" ), \n\nnew Question( 103, \"PCO\", \"majors\", \"students\", \"major\", \"student\",\n \"<p>Several college freshmen are discussing what they want to study in college. Each of them has to choose a major from a list of available majors. (Of course, it is possible for more than one to choose the same major.)</p><p>In how many different ways can the students choose their majors, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 104, \"PCO\", \"types of toy\", \"children\", \"toy\", \"child\",\n \"<p>During playtime at a kindergarten, the teacher offers the children a number of different types of toy. Each child has to choose one type of toy. (There are enough toys of each type that more than one child, or even all of them, can choose the same type.)</p><p>In how many different ways can the children choose their toys, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 105, \"PCO\", \"stocks\", \"bankers\", \"stock\", \"banker\",\n \"<p>Amy has decided to invest in one of several stocks. She asks several bankers for their advice, and each banker chooses one of the stocks to advise her to buy. (It is possible for more than one banker to choose the same stock.)</p><p>In how many different ways can the bankers choose stocks, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 106, \"PCO\", \"trails\", \"hikers\", \"trail\", \"hiker\",\n // changed \"choose the same\" to \"hike on the same\" in the parenthetical expression\n \"<p>Several hikers go hiking at a national park that has numerous hiking trails. Each hiker chooses one of the trails to hike on. (It is possible for more than one hiker to hike on the same trail.)</p><p>In how many different ways can the hikers choose trails, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 107, \"PCO\", \"horses\", \"gamblers\", \"horse\", \"gambler\",\n \"<p>Several gamblers are watching a horse race. Each of them bets on one of the horses to win. (More than one gambler can bet on the same horse.)</p><p>In how many different ways can the gamblers place their bets, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 108, \"PCO\", \"signs\", \"fans\", \"sign\", \"fan\",\n \"<p>Fans attending the basketball game are given a sign with admission to the game. Each fan chooses from several different signs offered, such as \\\"D-fense,\\\" \\\"play hard,\\\" \\\"get loud,\\\" etc. (The same sign can be chosen by more than one fan.)</p><p>In how many different ways can the fans choose their signs, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 109, \"PCO\", \"songs\", \"singers\", \"song\", \"singer\",\n \"<p>At an audition for singers, several singers receive a list of songs, and each one has to pick one of the songs to sing. (It is possible for more than one singer to choose the same song.)</p><p>In how many different ways can the singers pick their songs, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 110, \"PCO\", \"spa packages\", \"vacationers\", \"package\", \"vacationer\",\n \"<p>A group of vacationers go to their resort spa, where various spa packages are offered. Each person chooses a spa package. (It is possible for multiple people to choose the same spa package.)</p><p>In how many different ways can the vacationers pick their spa packages, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 111, \"PCO\", \"types of bat\", \"players\", \"bat\", \"player\",\n \"<p>During batting practice for a baseball team, the coach offers the players a variety of different bats to use, e.g. wood, aluminum, hybrid, etc. Each player picks out one of these. (There are enough bats of each type that more than one player, or even all of them, can choose the same type.)</p><p>In how many different ways can the baseball team pick their bat, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 112, \"PCO\", \"essays\", \"judges\", \"essay\", \"judge\",\n \"<p>A local organization is holding an essay competition. To determine which essay will qualify for the next round, the judges of the competition must each vote for their favorite essay. (It is possible for a single essay to receive more than one vote, but each judge has only one vote.)</p><p>In how many ways can the judges cast their votes, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 113, \"PCO\", \"parts available\", \"actors trying out\", \"part\", \"actor\",\n \"<p>Several actors come to try out for a play, and there are several parts available. However, a given actor can only try out for one part. (It is possible for more than one actor to try out for the same part.)</p><p>In how many different ways can the actors try out for parts, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 114, \"PCO\", \"star ratings\", \"critics\", \"star\", \"critic\",\n \"<p>Several restaurant critics all rate the same restaurant using a star rating system, i.e. from one star to the maximum number of stars. Each critic rates the restaurant separately (but it is possible that more than one critic might give the same rating).</p><p>In how many different ways can the critics rate the restaurant, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 115, \"PCO\", \"issues\", \"candidates\", \"issue\", \"candidate\",\n \"<p>In a primary election for a political party, there are several hot political issues, such as reducing crime, improving education, reining in the deficit, and so on. Each candidate in the primary decides to focus on one of these issues as the center of their campaign. (More than one candidate might focus on the same issue.)</p><p>In how many different ways can the issues be selected by the candidates, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 116, \"PCO\", \"textbooks\", \"history teachers\", \"textbook\", \"teacher\",\n \"<p>In a certain high school, there are several different textbooks used for a world history course. Each history teacher can use whichever textbook he or she prefers. (The same textbook can be used by more than one teacher.)</p><p>In how many different ways can textbooks be selected by the history teachers, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 117, \"PCO\", \"crimes\", \"journalists\", \"crime\", \"journalist\",\n \"<p>In a certain city, several major crimes occurred in the past week. The crime journalists working at the city's newspapers each must decide which of these crimes to report on. (The journalists work at different newspapers, so more than one could report on the same crime.)</p><p>In how many different ways can the journalists report on the crimes, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 118, \"PCO\", \"presentations occurring at the same time\", \"professors\", \"presentation\", \"professor\",\n \"<p>Several professors from the same university are attending a conference. There are several presentations occurring at the same time, so each professor can only attend one of them. (However, more than one professor can attend the same presentation.)</p><p>In how many different ways can the professors attend the presentations, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 119, \"PCO\", \"topics\", \"contestants\", \"topic\", \"contestant\",\n \"<p>On a TV game show, during each round, each contestant must answer a trivia question correctly in order to move on to the next round. The contestants can pick the topic of the question they will answer from the topics available. (The same topic can be chosen by more than one contestant.)</p><p>In a given round, in how many different ways can the contestants pick their topics, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 120, \"PCO\", \"famous buildings\", \"painters\", \"building\", \"painter\",\n \"<p>Several painters visit a city famous for its beautiful architecture. Each painter paints one of the famous buildings in the city. (More than one of them might paint the same building.)</p><p>In how many different ways can the painters select which buildings to paint, if there are {0} {1} and {2} {3}?</p>\" ), \n \n// OSS training questions\n\nnew Question( 201, \"OSS\", \"hotels that she likes\", \"trips to Berlin\", \"hotel\", \"trip\",\n \"<p>Sheila goes to Berlin on business several times each year, and each time she goes, she stays at one of several hotels that she likes. (There might be more than one time when she stays at the same hotel.)</p><p>In how many different ways could she plan her hotel stays this year, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 202, \"OSS\", \"plot elements\", \"scenes in a script\", \"element\", \"scene\",\n \"<p>ScriptWriter Pro is a software that helps script writers come up with movie scripts by randomly generating script outlines. A script outline contains a certain number of scenes, with each scene containing a single plot element, such as \\\"exposition,\\\" \\\"action,\\\" \\\"suspense,\\\" and so on. (The same plot element could be used more than once in a script outline.)</p><p>How many different script outlines are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 203, \"OSS\", \"moves that she has learned\", \"moves in one message\", \"move\", \"position\",\n \"<p>Felicia is learning flag semaphore, a system for sending messages by making different moves with flags held in each hand. She can send different messages by making different moves in different sequences. (It is possible to make the same move more than once in a message.)</p><p>How many different messages can Felicia send, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 204, \"OSS\", \"games on his phone\", \"hours to kill\", \"game\", \"hour\",\n \"<p>Suppose Jose has several hours to kill. He spends each hour playing one of the games on his phone. (He might play the same game on more than one hour.)</p><p>In how many different ways can he kill the time, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 205, \"OSS\", \"distinct hieroglyphs\", \"hieroglyphs in each sentence\", \"hieroglyph\", \"sentence position\",\n \"<p>Archaeologists discover records of an ancient language whose writing system was based on hieroglyphs. Strangely, each sentence in the language contained the same number of hieroglyphs (and a given hieroglyph could be repeated multiple times within a sentence).</p><p>How many different sentences were possible in this language, if there were {0} {1} and {2} {3}?</p>\" ),\n \n// problems 206-212 were used in exp 6\n \nnew Question( 206, \"OSS\", \"shops in the shopping center\", \"pages in a booklet\", \"shop\", \"page\",\n \"<p>A clerk at a shopping center passes out coupon booklets to shoppers. Each page of the booklets contains a coupon for one of the shops in the center, selected randomly. (It is possible for more than one page to contain coupons for the same shop.)</p><p>How many different coupon booklets are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 207, \"OSS\", \"keys in the set\", \"notes in each melody\", \"key\", \"note\",\n \"<p>A piano student, when bored, plays random melodies on the piano. Each melody is the same number of notes long, and uses only keys from a fixed set of keys. (It is possible to play the same key more than once in a sequence.)</p><p>How many different melodies are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 208, \"OSS\", \"allowable letters\", \"letters in each password\", \"letter\", \"position\",\n \"<p>A website generates user passwords by selecting a certain number of letters randomly from a set of allowable letters. (It is possible to use the same letter more than once in a password.)</p><p>How many different passwords are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 209, \"OSS\", \"buttons\", \"flashes per sequence\", \"button\", \"flash\", \n \"<p>The game Simon uses a disk with several different-colored buttons. The buttons flash in sequence and then the player has to push the buttons in the same sequence - otherwise they get a shock. (It is possible for the same button to flash more than once in a sequence.)</p><p>How many different sequences are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 210, \"OSS\", \"permissible numbers\", \"numbers on each ticket\", \"number\", \"position\",\n \"<p>In a certain city, municipal lottery tickets are printed using series of numbers chosen randomly from a list of permissible numbers. (It is possible for the same number to appear at more than one position in a series.)</p><p>How many different lottery tickets are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 211, \"OSS\", \"answers for each question\", \"questions on the exam\", \"answer\", \"question\",\n \"<p>A student is taking a multiple choice exam. Each question has the same number of answers and the student just chooses an answer randomly. (It is possible for him to choose the same answer for more than one question.)</p><p>In how many different ways can he fill out the exam, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 212, \"OSS\", \"dresses\", \"days with dances\", \"dress\", \"day\",\n \"<p>Elizabeth is going to attend a dance every day for the next several days. Each day, she chooses a dress to wear to the dance. (It is possible for her to choose the same dress on more than one day.)</p><p>In how many different ways can she choose her dresses, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 213, \"OSS\", \"modes of transport\", \"legs of the trip\", \"mode\", \"leg\",\n \"<p>Tonia is taking a trip from Chicago to Los Angeles, passing through several cities on the way. On each leg of the trip, she can use any of several modes of transport, such as bus, train, or airplane. (There might be more than one leg of the trip for which she uses the same mode of transport.)</p><p>In how many different ways can she travel from Chicago to Los Angeles, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 214, \"OSS\", \"controller buttons\", \"button presses per combination\", \"controller button\", \"button press\",\n \"<p>In a video game about martial arts fighting, you can make a character do cool moves by pressing several buttons on the controller in a certain order, such as \\\"up-left-down-...\\\". Each combination consists of the same number of button presses. (The same button might need to be pressed more than once in a given combination.)</p><p>How many different combinations are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 215, \"OSS\", \"possible hand gestures\", \"gestures in a handshake\", \"possible movement\", \"movement position\",\n \"<p>The Gamma Gamma Gamma fraternity wants to invent a special handshake for fraternity brothers. The handshake will involve a series of hand gestures such as bumping fists, high five, or thumbs-up. (It is possible to repeat the same gesture more than once during the handshake.)</p><p>How many different handshakes are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 216, \"OSS\", \"different words\", \"words per line\", \"word\", \"position\",\n \"<p>Suppose Phil owns a \\\"magnetic poetry\\\" set which can be used to create lines of poetry by sticking magnetic words onto the refrigerator. Suppose he creates different lines which all contain the same number of words. (He has an unlimited supply of each word, so he can use the same word more than once in a single line.)</p><p>How many different lines of poetry can Phil create if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 217, \"OSS\", \"bead materials\", \"beads on each bracelet\", \"material\", \"bead\",\n \"<p>A jeweler makes bracelets by stringing together beads made of different materials, such as gold, silver, titanium, etc. Each bracelet has the same number of beads on it. (It is possible for the same bead material to be repeated more than once on a single bracelet.)</p><p>How many different bracelets are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 218, \"OSS\", \"flavors\", \"layers in each cake\", \"flavor\", \"layer\",\n \"<p>A baker is making layer cakes by selecting various flavors of cakes to stack in layers. He chooses the layer flavors randomly from the selection of flavors he has in his store, such as chocolate, vanilla, red velvet, etc. (It is possible to use the same flavor more than once in a cake.)</p><p>How many different layer cakes are possible if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 219, \"OSS\", \"breeds of flower\", \"flowers per row\", \"breed\", \"flower\",\n \"<p>A large mansion grows many breeds of flower, like roses, pansies, and irises, which are used to decorate the mansion. The housekeeper places a row of flowers on each window sill, using the same number of flowers in each row, but varying the specific breeds and their order. (The same breed can be used more than once in a row.)</p><p>How many different rows of flowers are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 220, \"OSS\", \"cellphone models\", \"phones in each row\", \"model\", \"position\",\n \"<p>Each display case in a cellphone store contains a row of cellphones selected from the models currently on sale. The cases are all the same size, so there are the same number of phones in each row. (A given cellphone model might appear multiple times in a single row, for example if it is a very popular phone.)</p><p>How many different ways are there to fill a display case, if there are {0} {1} and {2} {3}?</p>\" ),\n\n// TFR training questions\n\nnew Question( 301, \"TFR\", \"fonts\", \"document styles\", \"font\", \"document style\",\n \"<p>In Microsoft Word, different document styles are used to format text in different parts of the document, such as \\\"title,\\\" \\\"chapter heading,\\\" \\\"sub-section heading,\\\" etc. A font must be assigned to each document style. (It is possible to assign the same font to more than one document style.)</p><p>In how many ways can fonts be assigned to document styles, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 302, \"TFR\", \"ring tones\", \"types of ring\", \"ring tone\", \"type of ring\",\n \"<p>A smartphone comes pre-loaded with various ring tones. For each type of ring, such as \\\"incoming call,\\\" \\\"alarm,\\\" \\\"new mail,\\\" etc., you can set any of the ring tones. (It is possible to set the same ring tone for multiple types of ring.)</p><p>In how many different ways can types of ring be set with ring tones, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 303, \"TFR\", \"icons\", \"triggers\", \"icon\", \"trigger\",\n \"<p>Suppose the settings on a computer allow one to set what kind of icon is used for the mouse pointer, e.g. an arrow, a hand, a vertical line, etc. Icons can be set separately for a variety of \\\"triggers,\\\" like \\\"clicking something,\\\" \\\"hovering over a link,\\\" \\\"waiting for something,\\\" and so on. (The same icon could be set for more than one trigger.)</p><p>In how many different ways can icons be set for triggers, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 304, \"TFR\", \"devices\", \"activities\", \"device\", \"activity\",\n \"<p>Sharon owns many different electronic devices, like a desktop computer, laptop computer, smartphone, etc., which she uses for activities like homework, surfing the net, and email. For a given activity, she always uses the same device. (She might use the same device for more than one activity.)</p><p>In how many different ways can she choose devices for activities, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 305, \"TFR\", \"shapes\", \"occasions\", \"shape\", \"occasion\",\n \"<p>Tanisha the baker makes cakes for all occasions, like birthdays, weddings, and anniversaries. She likes to make cakes in different shapes, e.g. round, square, or oval, but for any given occasion, she always uses the same shape. (However, there might be more than one occasion for which she uses the same shape.)</p><p>In how many different ways could she assign shapes of cake to occasions, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 306, \"TFR\", \"screen savers\", \"types of software\", \"screen saver\", \"software\",\n \"<p>Alma's new computer comes with multiple different screen savers. The screen saver can be set separately depending on what kind of software is open on the computer, so that, for example, Alma could set one screen saver to activate when using Office software, another for internet browsers, another for games, and so on. (It is also possible to set the same screen saver for more than one type of software.)</p><p>In how many different ways can the screen savers be set up, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 307, \"TFR\", \"types of bark\", \"kinds of truffle\", \"bark\", \"truffle\",\n \"<p>Darren is training his dog to hunt truffles. He trains it to bark differently depending on what kind of truffle it finds: for example, a sharp yip for white truffles, a loud bark for black truffles, a growl for burgundy truffles, and so on. (However, he might train the dog to make the same bark for more than one kind of truffle.)</p><p>In how many different ways can Darren train his dog, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 308, \"TFR\", \"weapons\", \"enemies\", \"weapon\", \"enemy\",\n \"<p>Brandi plays an Orc Barbarian in World of Warcraft. She has many weapons, like axe, sword, and spear, but she always uses the same weapon for a particular kind of enemy, such as humans, elves, and dwarves. (There might be more than one kind of enemy for which she uses the same weapon.)</p><p>In how many different ways can Brandi choose weapons for different enemies, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 309, \"TFR\", \"pairs of sneakers\", \"sports that he plays\", \"pair of sneakers\", \"sport\",\n \"<p>Virgil owns many pairs of sneakers and decides which one to wear depending on what sport he is going to play. For example, he might wear one pair for jogging, another for basketball, another for tennis, and so on. (There might be more than one sport for which he wears the same pair of sneakers.)</p><p>In how many different ways could he match sneakers with sports, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 310, \"TFR\", \"sets of china\", \"types of guest\", \"set\", \"guest\",\n \"<p>A rich family has several sets of china to use for meals. For each type of guest, there is a particular set of china they use, e.g. one set of china for family, one for friends, and one for business acquaintances. (There might be more than one type of guest for which they use the same set of china.)</p><p>In how many different ways could sets of china be matched to types of guests, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 311, \"TFR\", \"paper grades\", \"document categories\", \"grade\", \"category\",\n \"<p>A print shop has several different grades of paper, and uses a particular grade of paper for each category of document that it prints, e.g. glossy paper for posters, book paper for business documents, bond paper for resumes, etc. (The same paper grade could be used for more than one document category.)</p><p>In how many different ways could paper grades be matched to document categories, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 312, \"TFR\", \"knives\", \"different foods\", \"knife\", \"food\",\n \"<p>Russell has a few different knives in his kitchen, such as a chef's knife, a paring knife, a cleaver, etc. For a given food, like vegetables, bread, or meat, he always cuts it with the same knife (but he might use the same knife for more than one food).</p><p>In how many different ways could Russell use knives for food, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 313, \"TFR\", \"fragrances\", \"product variants\", \"fragrance\", \"variant\",\n \"<p>A company that makes personal care products is launching a new line of soap that includes several product variants, e.g. anti-perspirant soap, soap for sensitive skin, refreshing soap, and so on. The product designer must give each product variant a fragrance, like lemon, lavender, or mint. (More than one product variant could get the same fragrance.)</p><p>How many ways are there to pair fragrances with product variants, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 314, \"TFR\", \"types of symbol\", \"types of building\", \"symbol\", \"building\",\n \"<p>Suppose you are designing a map and you have several types of symbol which can be used to represent different types of building. For example, red hearts could represent hospitals, yellow rectangles could represent schools, and so on. (The same type of symbol could represent more than one type of building, since you might not need to distinguish between some types of building.)</p><p>In how many ways could symbols be matched to buildings, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 315, \"TFR\", \"bags\", \"types of outing\", \"bag\", \"outing\",\n \"<p>Milton owns several different bags, like a backpack, a suitcase, a duffel bag, and so on. For a given type of outing, like going to school, going camping, or traveling, he always takes the same bag. (However, there might be more than one type of outing for which he takes the same bag.)</p><p>In how many different ways could Milton match up bags with types of outing, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 316, \"TFR\", \"kinds of chart\", \"data sets\", \"chart\", \"data set\",\n \"<p>Suppose you are preparing a report about the population of a certain city, which will include various data sets about things like sex, age, and income. Each data set should be displayed using one of several kinds of chart, such as pie chart, bar chart, or line graph. (Of course, more than one data set can be displayed using the same kind of chart.)</p><p>In how many different ways could data sets be matched up with kinds of chart, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 317, \"TFR\", \"destinations\", \"holidays\", \"destination\", \"holiday\",\n \"<p>A travel agency holds a promotion during several holidays during the year, like Thanksgiving, Christmas, Spring Break, etc. For each holiday, they offer discounted travel to one out of of several possible travel destinations. (They might give discounts to the same destination for more than one holiday.)</p><p>In how many different ways could the agency match destinations to holidays, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 318, \"TFR\", \"competing companies\", \"development projects\", \"company\", \"project\",\n \"<p>A city government is planning several urban development projects, including a new bridge, a library, and a park. For each project, the government will contract with one of several construction companies to carry it out. (They might contract with the same company for more than one project.)</p><p>In how many different ways could the government assign contracts for the projects, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 319, \"TFR\", \"email addresses\", \"kinds of website\", \"address\", \"website\",\n \"<p>Brandon has several email addresses. When he enters his email address in a website, he always uses the same address for a given type of website, so he could use one address for social networks, a different one for online banking, and so on. (However, he could use the same address for more than one kind of website.)</p><p>In how many different ways could Brandon pair up addresses with kinds of website, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 320, \"TFR\", \"kinds of diagram\", \"concepts\", \"diagram\", \"concept\",\n \"<p>A teacher is presenting a lesson involving many difficult concepts, so she illustrates each concept with a diagram, e.g. a Venn diagram, a tree diagram, a flowchart, etc. (She could illustrate more than one concept with the same kind of diagram.)</p><p>In how many different ways could she assign diagrams to concepts, if there are {0} {1} and {2} {3}?</p>\" ),\n\n// test set 1\n\n// all of these problems were used in exp 6\n\nnew Question( 421, \"OAPlc\", \"colors\", \"rooms\", \"color\", \"room\",\n \"<p>A homeowner is going to repaint several rooms in her house. She chooses one color of paint for the living room, one for the dining room, one for the family room, and so on. (It is possible for multiple rooms to be painted the same color.)</p><p>In how many different ways can she paint the rooms, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 422, \"CAE\", \"categories\", \"paranormal events\", \"category\", \"event\",\n \"<p>An FBI agent is investigating several paranormal events. She must write a report classifying each event into a category such as Possession, Haunting, Werewolf, and so on.</p><p>In how many different ways can she write her report, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 423, \"OAPpl\", \"employees\", \"prizes\", \"employee\", \"prize\",\n \"<p>A prize drawing is held at a small office party, and each of several prizes is awarded to one of the employees. (It is possible for multiple prizes to be awarded to the same employee.)</p><p>In how many different ways can the prizes be awarded, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 424, \"PCO\", \"fishing spots\", \"fishermen\", \"spot\", \"fisherman\",\n \"<p>Several fishermen go fishing in the same lake, and each of them chooses one of several spots at which to fish. (It is possible for more than one fisherman to choose the same spot.)</p><p>In how many different ways can the fishermen choose their spots, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 425, \"OSS\", \"types of wine\", \"courses in the meal\", \"type of wine\", \"course\",\n \"<p>A gourmet chef is preparing a fancy several-course meal. There are several types of wine available, and the chef needs to choose one wine to serve with each course. (It is possible for the same wine to be served with more than one course.)</p><p>In how many different ways can the wines be chosen, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 426, \"OAPpl\", \"sons\", \"houses\", \"son\", \"house\",\n \"<p>A wealthy old woman is writing her will. She owns several houses, and wishes to leave each house to one of her sons. (It is possible for her to leave more than one house to the same son.)</p><p>In how many different ways can she write this part of her will, if there are {0} {1} and {2} {3}?</p>\" ),\n\n// test set 2\n\n// all of these problems were used in exp 6\n\nnew Question( 527, \"OAPlc\", \"crops\", \"fields\", \"crop\", \"field\",\n \"<p>A farmer is planning what crops he will plant this year. He chooses one crop for each of several fields. (It is possible for multiple fields to receive the same crop.)</p><p>In how many different ways can the farmer plant his crops, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 528, \"CAE\", \"categories\", \"weather events\", \"category\", \"event\", \n \"<p>A meteorologist must write a report classifying each extreme weather event which occurred in the past year into a category such as Hurricane, Tropical Storm, etc.</p><p>In how many different ways can he write his report, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 529, \"OAPpl\", \"children\", \"provinces\", \"child\", \"province\",\n \"<p>An aging king plans to divide his lands among his heirs. Each province of the kingdom will be assigned to one of his many children. (It is possible for multiple provinces to be assigned to the same child.)</p><p>In how many different ways can the provinces be assigned, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 530, \"PCO\", \"treatments\", \"doctors\", \"treatment\", \"doctor\",\n \"<p>There are several possible treatments for a certain rare disease. A patient with this disease consults several doctors, and each doctor recommends one of the possible treatments. (It is possible for more than one doctor to recommend the same treatment.)</p><p>In how many different ways can the doctors make their recommendations, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 531, \"OSS\", \"colognes to choose from\", \"dates\", \"cologne\", \"date\", \n \"<p>Don Juan has one date with each of a merchant's daughters. For each date, he puts on a cologne he thinks that daughter will like. (It is possible for him to choose the same cologne for more than one date.)</p><p>In how many different ways can he choose colognes for his dates, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 532, \"OAPpl\", \"detectives\", \"cases\", \"detective\", \"case\", \n \"<p>A police department receives several new cases in one day. Each new case is assigned to one of the detectives. (It is possible for multiple cases to be assigned to the same detective.)</p><p>In how many different ways can the cases be assigned, if there are {0} {1} and {2} {3}?</p>\" )\n \n ];\n \n return questions;\n\n}", "title": "" }, { "docid": "484498e57e7e47009ed4b8fee1828c15", "score": "0.5731107", "text": "function suggest() {\n\t\t\tvar q_word = (Vars.is_suggest) ? ($(Elem.combo_input).val()).replace(/(^\\s+)|(\\s+$)/g, '') : '';\n\t\t\tif (q_word.length < 1 && Vars.is_suggest) {\n\t\t\t\thideResults();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tq_word = q_word.split(/[\\s ]+/);\n\n\t\t\tabortAjax(); //Ajax通信をキャンセル\n\t\t\tsetLoading(); //ローディング表示\n\n\t\t\t//ここで、本来は真偽値が格納される変数に数値を格納している。\n\t\t\tif (Vars.is_paging) {\n\t\t\t\tvar obj = getCurrentLine();\n\t\t\t\tVars.is_paging = (obj) ? $(Elem.results).children('li').index(obj) : -1;\n\t\t\t} else if (!Vars.is_suggest) {\n\t\t\t\tVars.is_paging = 0;\n\t\t\t}\n\t\t\tvar which_page_num = (Vars.is_suggest) ? Vars.page_suggest : Vars.page_all;\n\n\t\t\t//データ取得\n\t\t\t(typeof Opt.source == 'object') && searchForJSON(q_word, which_page_num);\n\t\t}", "title": "" }, { "docid": "6271fdbc3cb0003dc824acc3a4be0774", "score": "0.57298076", "text": "function showCorrectAnswers(event) {\n console.log('showCorrectAnswers() has been used.');\n if (event && event.target.className.indexOf('disabled') != -1) {\n return;\n }\n if (!properties['quiz_answers_help_button']) {\n console.log('showCorrectAnswers() is disabled.');\n return;\n }\n console.log('Help event has been used.');\n var type = questions.used[challenge].params.type;\n if (type == 'single' || type == 'multiple') {\n for (var answer in questions.used[challenge].answers.choices) {\n if (questions.used[challenge].answers.choices[answer].type == 'correct') {\n document.querySelector('label[for=\"q'+(challenge+1)+'a'+answer+'\"]').className += ' marked-correct';\n document.querySelector('#q'+(challenge+1)+'a'+answer).className = 'custom-control-input is-valid';\n } else {\n document.querySelector('label[for=\"q'+(challenge+1)+'a'+answer+'\"]').className += ' marked-wrong';\n document.querySelector('#q'+(challenge+1)+'a'+answer).className = 'custom-control-input is-invalid';\n }\n }\n }\n if (type == 'matching') {\n for (var chc in questions.used[challenge].answers.choices) {\n var [answer, option] = questions.used[challenge].answers.choices[chc].name.split('==');\n var selected = $('#q'+(challenge+1)+'a'+chc+' option:selected').val();\n if (slugify(option.trim()) == selected) {\n document.querySelector('#q'+(challenge+1)+'a'+chc+'').className = 'custom-select is-valid';\n } else {\n document.querySelector('#q'+(challenge+1)+'a'+chc+'').className = 'custom-select is-invalid';\n }\n }\n }\n if (type == 'input') {\n for (var chc in questions.used[challenge].answers.choices) {\n var answer = questions.used[challenge].answers.choices[chc].name;\n console.log('#q'+(challenge+1)+'a'+chc+'');\n var written = document.querySelector('#q'+(challenge+1)+'a'+chc+'').value;\n if (slugify(answer.trim()) == slugify(written.trim())) {\n document.querySelector('#q'+(challenge+1)+'a'+chc+'').className = 'form-control is-valid';\n } else {\n console.log('potencial errors');\n }\n }\n }\n // errors[challenge].push('Correct answers:' + questions.used[challenge].answers.choices[chc].some(function(el) { return el.name; }).join(', ') + '.');\n}", "title": "" }, { "docid": "d4f17151df3a95d2f7715365725c59d9", "score": "0.5720844", "text": "function showHint() {\n // Pick a letter randomly for hint\n var hintKeyIndex = Math.floor(Math.random() * randWord.length);\n var hintKey = randWord[hintKeyIndex];\n console.log(\"Word: \" + randWord);\n console.log(\"Hint Key \" + hintKey);\n // Check If the hint key appears only once. Do not want to give away more than 1 key as hint\n if (randWord.indexOf(hintKey) === randWord.lastIndexOf(hintKey)) {\n console.log(\"Inside 1\");\n $(\"#footer\").text(\"Isn't it easy-peasy now?\");\n guessCount--;\n updateCounters();\n correctGuessKey(hintKey);\n guessChars.push(hintKey);\n hintFlag = true;\n } else {\n // Call the function again to generate random hint key\n console.log(\"Inside 2\");\n showHint();\n }\n }", "title": "" }, { "docid": "0eb7ad73c19b8ba60ce2b312edfdcec2", "score": "0.5717717", "text": "function showResults() {\r\n\t\r\n\tvar message = \"You have answered the following questions: \";\r\n\tfor(var i = 0; i < answers.length; i++) {\r\n\t\tswitch (answers[i]) {\r\n\t\t\r\n\t\t\tcase \"0\":\r\n\t\t\t\ti = i+1;\r\n\t\t\t\tmessage = message + \"Question \"+ i + \" - A) / \";\r\n\t\t\t\ti = i-1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"1\":\r\n\t\t\t\ti = i+1;\r\n\t\t\t\tmessage = message + \"Question \"+ i + \" - B) / \";\r\n\t\t\t\ti = i-1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"2\":\r\n\t\t\t\ti = i+1;\r\n\t\t\t\tmessage = message + \"Question \"+ i + \" - C) / \";\r\n\t\t\t\ti = i-1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"3\":\r\n\t\t\t\ti = i+1;\r\n\t\t\t\tmessage = message + \"Question \"+ i + \" - D) / \";\r\n\t\t\t\ti = i-1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase undefined:\r\n\t\t\t\ti = i+1;\r\n\t\t\t\tmessage = message + \"Question \"+ i + \" - unanswered / \";\r\n\t\t\t\ti = i-1;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}\r\n\tdocument.getElementById(\"textField\").innerHTML = message;\r\n\t\r\n}", "title": "" }, { "docid": "449a43af76be3f732bd9779af2d1a225", "score": "0.5708853", "text": "function showNextQA() {\n log(\"showNextQA\");\n alreadyAnswered = false;\n \n // update the prompt with a random prompt\n correctQAIdx = genRandomNotIn(correctQAIdxs,data.length-1);\n var curQA = data[correctQAIdx];\n $(\"#prompt\").text(curQA.prompt);\n\n var wrongQAIdx = genRandomNotIn([correctQAIdx],data.length-1);\n var randomizedQAs = shuffle([correctQAIdx, wrongQAIdx]);\n \n // TODO: more generic N number of questions\n $(\"#answerNumber0\").text(data[randomizedQAs[0]].answer);\n $(\"#answerNumber1\").text(data[randomizedQAs[1]].answer);\n}", "title": "" }, { "docid": "aa6dee2716fc8a06cad3db0b3674ac15", "score": "0.5707246", "text": "function askQuestion(){\n var answer=\"\";\n for(var i=0;i<finalQuestions.length;i++){\n if(finalQuestions[i].status==0){\n answer=prompt(\"Con la '\"+finalQuestions[i].letter+\"', \" +finalQuestions[i].question).toLocaleLowerCase().trim();\n if(answer==finalQuestions[i].answer){\n alert(\"Acertaste\");\n finalQuestions[i].status=1;\n }else if(answer!=\"pasapalabra\"){\n alert(\"Fallaste, la respuesta era \"+finalQuestions[i].answer);\n finalQuestions[i].status=2;\n }\n }\n }\n}", "title": "" }, { "docid": "f9e9fd03de98719c861732515420e3c0", "score": "0.5706538", "text": "function ShowWord()\n{\n buttonContainer.style.display = \"none\";\n questionContainer.style.display = \"flex\";\n\n checkBtn.style.display = \"block\";\n nextBtn.style.display = \"none\";\n\n guess.style.display = \"block\";\n guess.focus();\n\n newWord = createNewWords();\n\n randomWord = scrambleWords(newWord.split(\"\"));\n\n displayQuestion(randomWord);\n}", "title": "" }, { "docid": "b73f0416830405ee78ef15b87f1f9333", "score": "0.57004845", "text": "function setQuestion() {\n var q; // index of the question we will eventually ask the user\n for (q in values[0].data) {\n if (values[1].data.indexOf(values[0].data[q]._id) == -1) {\n /* the user has NOT answered this question yet -> so we can ask him now! */\n $scope.title = values[0].data[q].description;\n $scope.questionToAsk = values[0].data[q];\n return;\n }\n }\n $scope.title = 'None';\n $scope.questionToAsk = 'None';\n }", "title": "" }, { "docid": "1ac8601bf02ad530543feec6fb847421", "score": "0.5684252", "text": "function checkAnswer(isWord){\n \n}", "title": "" }, { "docid": "d3b494f6f97e39dc7b85ad9433fa5190", "score": "0.5682561", "text": "function matchwords() {\n\n\tif (typing.value === demsg.innerHTML) {\n\n\t\tmessage.innerHTML = \"Correct\";\n\t\timg1.style.display = \"block\";\n\t\timg2.style.display = \"none\";\n\t\treturn true;\n\t}\n\t\telse{\n\t\t\tmessage.innerHTML = \"\";\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5cdf0cad30bc16af260229add6941728", "score": "0.5682027", "text": "function showAnswers() {\n for (x = 0; x < answerBulk.length; x++){\n if(answerBulk[x+1] == undefined){\n return;\n }\n if($(\".answer1\").html() === answerBulk[x][0]){\n $(\".answer1\").html(answerBulk[x+1][0]);\n $(\".answer2\").html(answerBulk[x+1][1]);\n $(\".answer3\").html(answerBulk[x+1][2]);\n $(\".answer4\").html(answerBulk[x+1][3]);\n return;\n }\n }\n }", "title": "" }, { "docid": "5dce011a1b6ad206646c0022ef4066bf", "score": "0.5680417", "text": "function gameLogic(keyPress) {\n for (i = 0; i < randomWord.length; i++) {\n if (randomWord[i] == keyPress && keyPress.match(/[a-z]/) && correctWord.indexOf(keyPress) == -1) {\n \n thatbox = document.getElementsByClassName('class_' + keyPress);\n for (p = 0; p < thatbox.length; p++) {\n thatbox[p].innerHTML = keyPress;\n victory ++;\n }\n correctWord.push(keyPress);\n \n } else if (keyPress.match(/[a-z]/) && incorrectGuess.indexOf(keyPress) == -1) {\n incorrectGuess.push(keyPress);\n }\n }\n filter();\n winCondition();\n userGuess.textContent = lastArray.join(' ');\n}", "title": "" }, { "docid": "572048dd0566775be856b4d7c6dbb1fb", "score": "0.5679992", "text": "function select_original_suggestion(original){\n // insert it into the text box\n insert_original_selection(document.location.origin + '/questions/' + original.id);\n }", "title": "" }, { "docid": "4617248d5c3dfa72170e39bad77a1cfd", "score": "0.56792355", "text": "function checkAnswer() {\n console.log($(this).text());\n if ($(this).text() === answer[count]) {\n showCorrectPage();\n } else {\n console.log(\"Incorrect!\")\n showIncorrectPage();\n }\n }", "title": "" }, { "docid": "a243cf509e63ea8ef880a123b4cdeb37", "score": "0.56788576", "text": "function clicklery () {\n $(\".multchoi\").on(\"click\", function(){\nguess = this.getAttribute(\"datapass\")\nif (guess == questionArray[question].answer ) {alert (\"That is correct\"); question++; $ (\".container\").empty();theQuestions();theMultChoi();} else {\nalert(\"Go Home\")\n}\n})\n}", "title": "" }, { "docid": "abd4ad90a37f8204e821359e06f1bc59", "score": "0.5672037", "text": "function searchItem(){\r\n\t\tlet transLang=trans_select.value;\r\n\t\tlet transItem=trans_input_before.value;\r\n\t\tlet data=searchDatabase(transItem);\r\n\t\tif(transLang==\"Bolinao\"){\r\n\t\t\tif(data){\r\n\t\t\t\tfor(var x=0;x<data.rel.length;x++){\r\n\t\t\t\t\tif(data.rel[x] ==\"found exact word\"){\r\n\t\t\t\t\t\ttrans_input_after.innerText=data.bol[0];\t\t\t\t\t\t\t\r\n\t\t\t\t\t}else if(data.rel[x] ==\"related word\"){\r\n\t\t\t\t\t\ttrans_input_after.innerText=\"Please be specific with your word\";\r\n\t\t\t\t\t}else{trans_input_after.innerText=sentences.T_noDataFound[0];close_modal.innerText=sentences.T_noDataFound[1]}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{alert(sentences.T_noDataFound[2]);}\r\n\t\t}else if(transLang==\"Tagalog\"){\r\n\t\t\tif(data){\r\n\t\t\t\tfor(var x=0;x<data.rel.length;x++){\r\n\t\t\t\t\tif(data.rel[x] ==\"found exact word\"){\r\n\t\t\t\t\t\ttrans_input_after.innerText=data.tag[0];\r\n\t\t\t\t\t\t}else if(data.rel[x] ==\"related word\"){\r\n\t\t\t\t\t\ttrans_input_after.innerText=\"Please be specific with your word\";\r\n\t\t\t\t\t}else{trans_input_after.innerText=sentences.T_noDataFound[0];close_modal.innerText=sentences.T_noDataFound[1]}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{alert(sentences.T_noDataFound[2]);}\r\n\t\t}else if(transLang==\"English\"){\r\n\t\t\tif(data){\r\n\t\t\t\tfor(var x=0;x<data.rel.length;x++){\r\n\t\t\t\t\tif(data.rel[x] ==\"found exact word\"){\r\n\t\t\t\t\t\ttrans_input_after.innerText=data.eng[0];\t\t\t\t\t\t\t\r\n\t\t\t\t\t}else if(data.rel[x] ==\"related word\"){\r\n\t\t\t\t\t\ttrans_input_after.innerText=\"Please be specific with your word\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{trans_input_after.innerText=sentences.T_noDataFound[0];close_modal.innerText=sentences.T_noDataFound[1]}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{alert(sentences.T_noDataFound[2]);}\r\n\t\t}else{\r\n\t\t\ttrans_input_after.innerText = \"Please specify the language.\";}}", "title": "" }, { "docid": "253288404e96db4482ce25e6c5ff9a76", "score": "0.56689763", "text": "function answerQuestion() {\n\n\t}", "title": "" }, { "docid": "b3cef861bdfda33fabf38fa276d51f27", "score": "0.56687593", "text": "function userInputLetter() {\n let inputUser = document.getElementById('letter').value.toLowerCase() ; // id of the divs \n // let clearInput = document.getElementById('letter');\n console.log(inputUser);\n let makeItVisible = document.getElementsByClassName('show');\n console.log(makeItVisible);\n let indexOfTheLetter = chosenWord.indexOf(inputUser) // getting the index of the element instead manipl.the string(returns index)\n if (indexOfTheLetter >= 0){ // insted of a for loop checking only if it is in the array(index of it );\n for ( let j= 0; j < makeItVisible.length; j++ ) {\n if( chosenWord[j] === inputUser){\n makeItVisible[j].style.visibility = \"visible\";\n }\n \n }\n // alert(inputUser);\n // userInput[i] = inputValue;\n }else{\n console.log('wrong')\n // let showTheLetters = document.getElementById('showLetters').innerHTML;\n let wrongWord = document.getElementById(`box${counter}`); // get the text from the box 0-5 the wrong choice\n wrongWord.innerText = \"X\";// this is the div that holds the x for wrong answer\n console.log(inputUser);\n document.querySelector('.showLetters').innerHTML += inputUser ;\n counter++;\n }\n // }\n // userInput ++;\n // document.getElementsByClassName('header').innerHTML = wordWithText.join(\"\");\n }", "title": "" }, { "docid": "08ce2193a10ad6c056e3f5a73eb9c2cc", "score": "0.5662915", "text": "function reletterAnswers()\r\n {\r\n const questionRows = parsed_mcq.getElementsByClassName('question');\r\n const letters = ['A', 'B', 'C', 'D', 'E'];\r\n\r\n for (let row of questionRows)\r\n {\r\n let letterIndex = 0;\r\n\r\n function reletterAnswer(row, letterIndex)\r\n {\r\n let nextRow = row.nextElementSibling;\r\n if (nextRow.classList.contains('answer')&&letterIndex<=4)\r\n {\r\n row.nextElementSibling.children[0].textContent = letters[letterIndex]; //letters[0] is 'A', letters[1] is 'B' etc\r\n letterIndex++;\r\n reletterAnswer(nextRow, letterIndex)\r\n }\r\n }\r\n reletterAnswer(row, letterIndex);\r\n }\r\n }", "title": "" }, { "docid": "2951909fd2a4300c87438f3fa05bbfbb", "score": "0.56568336", "text": "function Triviaquestion(question, choice1,choice2,choice3,choice4) {\n\n\t\tdocument.getElementById(\"questions\").innerHTML = question;\n//\t\t\n//\n//\n\n\n//make the trivia restart with all counters at 0 and back to first question in array\n\n\n\t}", "title": "" }, { "docid": "c22a8a6c526aaa4b2feee7dc49ff37af", "score": "0.5652672", "text": "function listenForAnswer() {\n $(\".js-main\").on('click',\".answer\", event => {\n \n // hide the answers\n $('#qanda').hide();\n \n // if the index of the amswer matches the correct answer, then increase score\n \n if ($(event.currentTarget).text() == datasource[questionNum].correctAnswer) {\n score += 1;\n // make correctAnswer visible and continue button visible\n $('#correctAnswer').show();\n $('.continue').show();\n $('.score').html('SCORE: '+score+'/10');\n }\n // if the index of the answer doesn't match the correct answer, then 0 point\n else {\n $('#incorrectAnswer').show();\n $('.continue').show();\n // make incorrectAnswer and continue button visible\n }\n // if there is another question to be asked, loop and use the next key/value pair\n });\n}", "title": "" }, { "docid": "34b951a46608d11529475724fa1ab547", "score": "0.56450623", "text": "function displayFN(){\n\t// for each letter in the currentWord, \n\tvar letter = document.getElementById(\"input\").value\n\tguessedArray.push(letter)\t\n\tdocument.getElementById('alreadyGuessed').innerHTML = guessedArray\n\tfor (var i = 0; i < currentWord.length; i++){\n\t\t// if the word contains a letter that matches whats typed in then...\n\t\tif (currentWord[i] === letter){\n\t\t\t// put that letter into the answersArray in place of the underscore\n\t\t\tanswersArray[i] = letter\n\t\t\t// and display the letter to the answers array\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tdocument.getElementById(\"wordDisplay\").innerHTML = answersArray.join(\"\")\n\t\t\tdocument.querySelector(\"#input\").value = \"\"\t\n\t\t\tdocument.getElementById(\"input\").focus()\t\n\t\t} else {\n\t\t\t\n\t\t\tdocument.querySelector(\"#input\").value = \"\"\t\n\t\t\tdocument.getElementById(\"input\").focus()\n\t\t}\n\t}\n\tconsole.log(answersArray)\n\t// if the answers array changes to match the current word then...\n\tif (answersArray.join(\"\") == currentWord){\n\t\t// display to alert pop up that they won the game\n\t\talert(\"You won!\")\n\t}\n\t\n\n}", "title": "" }, { "docid": "c93811750f7c3cc965c0855fa81d8408", "score": "0.5644569", "text": "function prepare_test(words_list) // initial function. Determining the 4 words and the asked word using random generation\n{\n var maara = words_list.length; // number of words\n var fin = [];\n var eng = [];\n\n for(var i = 0; i < maara; i++) {\n // if(userID==words_list[i].fields.user) {\n // console.log(words_list[i].fields.fi);\n fin.push(words_list[i].fields.fi);\n eng.push(words_list[i].fields.en);\n // }\n }\n // if(fin.length >= 4) !!!!!!!!!!!!!!!!!!!!!!!!\n maara = fin.length; // in case we take into account only OWN words we need to assign maara once again \n var numbers = [];\n for (var i = 0; i < 4; i++) { // create array numbers[] and populate it with 4 random numbers\n numbers[i] = Math.floor(Math.random( ) * (maara)); // generate these random numbers, each less than 'maara'\n for (var j = i; j > 0; j--) { // check for repetitive numbers in the array\n if (numbers[i] == numbers[j-1]) { // if same number found --->\n numbers[i] = Math.floor(Math.random( ) * (maara)); // ----> generate a new one\n i--;\n break;\n }\n }\n }\n var rand = Math.floor(Math.random( ) * 4); // the generated number (0..3) defines which word --->\n document.getElementById('asked-word').value = eng[numbers[rand]]; // ---> is going to be asked among the 4 chosen previously\n right_answer = fin[numbers[rand]]; // text variable\n ids = [document.getElementById('choice_1'), document.getElementById('choice_2'), \n document.getElementById('choice_3'), document.getElementById('choice_4')];\n // for (var i = numbers.length - 1; i > 0; i--) { // shuffling the numbers-array\n // var j = Math.floor(Math.random() * (i + 1));\n // var temp = numbers[i];\n // numbers[i] = numbers[j];\n // numbers[j] = temp;\n // }\n \n if(testType == 'comic') { // --- comic\n $(\"#asked-word\").show(300);\n $(\"#choices\").show(300);\n }\n else if(testType == 'classic') { // --- classic\n $(\"#choices\").css('visibility', 'visible');\n $(\"#asked-word\").fadeIn(600);\n $(\"#choices\").fadeIn(600);\n }\n else { // --- no animation\n $(\"#asked-word\").show(0);\n $(\"#choices\").show(0);\n }\n\n for (var i = 0; i < 4; i++) {\n ids[i].innerHTML = fin[numbers[i]]; // assigning corresponding words to inputs in \"choices\"-section\n }\n // $(\"#asked-word\").show(300);\n // $(\"#choices\").show(300);\n \n}", "title": "" }, { "docid": "9dd1ae05603da0a3d29fa5eb22e69362", "score": "0.56395984", "text": "function generateQuestion(ask,type, answers ){\n\tconsole.log(\"adding a question\")\n\taddQuestion(type, ask, answers.split(/[ ]*,[ ]*/));\n\tgenHTML();\n}", "title": "" }, { "docid": "cfa522a039c5d4223dae1bf6d3eb0425", "score": "0.5639386", "text": "function firstQ() {\n let qu1 = prompt(\"Am I 26 years old?\");\n switch (qu1.toLowerCase()) {\n case 'yes':\n case 'y':\n console.log(qu1.toLowerCase());\n alert(\"You are correct \" + userName);\n score++;\n break;\n case 'no':\n case 'n':\n console.log(qu1.toLowerCase());\n alert(\"You are wrong \" + userName);\n break;\n default:\n console.log(qu1.toLowerCase());\n alert(\"please \" + userName + \" answer with yes OR no only\");\n break;\n }\n}", "title": "" }, { "docid": "0209c22e4b3b6063f364d42588643156", "score": "0.563627", "text": "function createQuestions() {\n return [\n {\n letter: 'a',\n status: 0,\n questions: [\n {\n question:\n 'CON LA A. Dicho de una supuesta criatura extraterrestre: Apoderarse de alguien.',\n answer: 'abducir',\n },\n {\n question: \"CON LA A. Legítimo Rey de Gondor en 'El señor de los anillos'.\",\n answer: 'aragorn',\n },\n {\n question:\n 'CON LA A. Persona que se encarga del cumplimiento de las reglas en algunos deportes.',\n answer: 'arbitro',\n },\n ],\n },\n {\n letter: 'b',\n status: 0,\n questions: [\n {\n question:\n \"CON LA B. Juego que ha sacado de quicio a todos los 'Skylabers' en las sesiones de precurso.\",\n answer: 'bingo',\n },\n {\n question:\n 'CON LA B. Diosa egipcia de la protección, amor y armonía. Su cabeza tiene forma de gato.',\n answer: 'bastet',\n },\n {\n question: 'CON LA B. Mamífero acuático de gran tamaño.',\n answer: 'ballena',\n },\n ],\n },\n {\n letter: 'c',\n status: 0,\n questions: [\n { question: 'CON LA C. Niño, crío, bebé.', answer: 'churumbel' },\n {\n question: \"CON LA C. De las novelas 'Cancion de hielo y fuego', 'Las lluvias de ...'.\",\n answer: 'castamere',\n },\n {\n question:\n 'CON LA C. Automóvil destinado al transporte de personas y con capacidad no superior a siete plazas.',\n answer: 'coche',\n },\n ],\n },\n {\n letter: 'd',\n status: 0,\n questions: [\n {\n question:\n 'CON LA D. Anormalidad en la función del aparato digestivo caracterizada por frecuentes evacuaciones y su consistencia líquida.',\n answer: 'diarrea',\n },\n {\n question:\n 'CON LA D. Tipo de animal grande y extinto que asombró a la generación de los 90.',\n answer: 'dinosaurio',\n },\n {\n question: 'CON LA D. Romper, hacer añicos.',\n answer: 'destrozar',\n },\n ],\n },\n {\n letter: 'e',\n status: 0,\n questions: [\n {\n question:\n 'CON LA E. Gelatinoso y se encuentra debajo de la membrana plasmática. Los cazafantasmas medían su radiación.',\n answer: 'ectoplasma',\n },\n {\n question: 'CON LA E. Idioma universal artificial creado por el polaco L. L. Zamenhof.',\n answer: 'esperanto',\n },\n {\n question: 'CON LA E. Dirigente femenina de un imperio.',\n answer: 'emperatriz',\n },\n ],\n },\n\n {\n letter: 'f',\n status: 0,\n questions: [\n {\n question: 'CON LA F. Que no requiere gran esfuerzo, capacidad o dificultad.',\n answer: 'facil',\n },\n {\n question: 'CON LA F. Genero literario donde aparecen caballeros, dragones y magia.',\n answer: 'fantasia',\n },\n {\n question: 'CON LA F. Dirigente masculino en el antíguo Egipto.',\n answer: 'faraon',\n },\n ],\n },\n {\n letter: 'g',\n status: 0,\n questions: [\n {\n question:\n 'CON LA G. Conjunto enorme de estrellas, polvo interestelar, gases y partículas.',\n answer: 'galaxia',\n },\n {\n question:\n \"CON LA G. Título original en España de la aclamada película de ciencia ficción. 'La guerra de las ...'.\",\n answer: 'galaxias',\n },\n {\n question: 'CON LA G. Educado, de buenas maneras.',\n answer: 'gentil',\n },\n ],\n },\n {\n letter: 'h',\n status: 0,\n questions: [\n {\n question: 'CON LA H. Suicidio ritual japonés por desentrañamiento.',\n answer: 'harakiri',\n },\n {\n question:\n 'CON LA H. Palabra japonesa utilizada para comenzar en artes marciales como Karate o Judo.',\n answer: 'hajime',\n },\n {\n question: 'CON LA H. Agua en estado sólido.',\n answer: 'hielo',\n },\n ],\n },\n {\n letter: 'i',\n status: 0,\n questions: [\n {\n question: 'CON LA I. Templo cristiano.',\n answer: 'iglesia',\n },\n {\n question: \"CON LA I. Pais-Ciudad controlada por Saruman en 'El señor de los anillos'.\",\n answer: 'isengard',\n },\n {\n question:\n 'CON LA I. Cambiar, sustituyéndolos por sus contrarios, la posición, el orden o el sentido de las cosas.',\n answer: 'invertir',\n },\n ],\n },\n {\n letter: 'j',\n status: 0,\n questions: [\n {\n question:\n \"CON LA J. Variedad salvaje del cerdo que sale en la película 'El Rey León', de nombre Pumba.\",\n answer: 'jabali',\n },\n\n {\n question: 'CON LA J. Preparado farmacéutico líquido que se administra por la boca.',\n answer: 'jarabe',\n },\n {\n question: 'CONTIENE LA J. Actividad intensa que implica movimientos incesantes.',\n answer: 'ajetreo',\n },\n ],\n },\n {\n letter: 'k',\n status: 0,\n questions: [\n {\n question: 'CON LA K. Persona que se juega la vida realizando una acción temeraria.',\n answer: 'kamikaze',\n },\n {\n question: 'CON LA K. Espada japonesa portada por los samurais.',\n answer: 'katana',\n },\n {\n question: 'CON LA K. Unidad de medida de distancia.',\n answer: 'kilometro',\n },\n ],\n },\n\n {\n letter: 'l',\n status: 0,\n questions: [\n {\n question: 'CON LA L. Único satélite natural de la Tierra.',\n answer: 'luna',\n },\n {\n question:\n 'CON LA L. Persona que, según la tradición popular, se convierte en lobo las noches de plenilunio.',\n answer: 'licantropo',\n },\n {\n question: 'CON LA L. Que ha perdido la razón.',\n answer: 'loco',\n },\n ],\n },\n\n {\n letter: 'm',\n status: 0,\n questions: [\n {\n question:\n 'CON LA M. Persona que huye del trato con otras personas o siente gran aversión hacia ellas.',\n answer: 'misantropo',\n },\n {\n question:\n 'CON LA M. Figura decorativa tallada en madera situada en la proa de antiguos buques.',\n answer: 'mascaron',\n },\n {\n question:\n 'CON LA M. Parte del día comprendida entre el amanecer y el mediodía, o la hora de comer o almorzar.',\n answer: 'mañana',\n },\n ],\n },\n {\n letter: 'n',\n status: 0,\n questions: [\n {\n question: 'CON LA N. Demostración de poca inteligencia.',\n answer: 'necedad',\n },\n {\n question: 'CON LA N. Mago especializado en magia negra y resucitar muertos.',\n answer: 'nigromante',\n },\n {\n question:\n 'CON LA N. Sustancia blanca formada por la precipitación de agua a bajas temperaturas.',\n answer: 'nieve',\n },\n ],\n },\n {\n letter: 'ñ',\n status: 0,\n questions: [\n {\n question:\n 'CONTIENE LA Ñ. Indicio que permite deducir algo de lo que no se tiene un conocimiento directo.',\n answer: 'señal',\n },\n {\n question: 'CON LA Ñ. Antílope sudafricano.',\n answer: 'ñu',\n },\n {\n question: 'CONTIENE LA Ñ: Golpe que se da con el puño de la mano.',\n answer: 'puñetazo',\n },\n ],\n },\n {\n letter: 'o',\n status: 0,\n questions: [\n {\n question:\n 'CON LA O. Humanoide fantástico de apariencia terrible y bestial, piel de color verde creada por el escritor Tolkien.',\n answer: 'orco',\n },\n\n {\n question: 'CON LA O. Onda de gran amplitud que se forma en la superficie de las aguas.',\n answer: 'ola',\n },\n {\n question: 'CON LA O. Adorno, compostura, atavío que hace vistosa una cosa.',\n answer: 'ornamento',\n },\n ],\n },\n {\n letter: 'p',\n status: 0,\n questions: [\n {\n question:\n 'CON LA P. Raza ancestral tecnológicamente avanzada que se caracteriza por sus grandes poderes psíonicos del videojuego StarCraft.',\n answer: 'protoss',\n },\n {\n question: 'CON LA P: Que se repite con frecuencia a intervalos determinados.',\n answer: 'periodico',\n },\n {\n question:\n 'CON LA P. Utensilio de hierro en forma de rejilla para poner al fuego lo que se ha de asar o tostar.',\n answer: 'parrilla',\n },\n ],\n },\n {\n letter: 'q',\n status: 0,\n questions: [\n {\n question: 'CON LA Q. Producto obtenido por la maduración de la cuajada de la leche',\n answer: 'queso',\n },\n {\n question:\n 'CON LA Q. Piezas bucales presentes en un subfilo de artrópodos como los arácnidos.',\n answer: 'queliceros',\n },\n { question: 'CON LA Q. Destruir algo o a alguien con fuego.', answer: 'quemar' },\n ],\n },\n {\n letter: 'r',\n status: 0,\n questions: [\n {\n question: \"CON LA R. Ciudad Elfica gobernada por Elrond en 'El señor de los anillos'.\",\n answer: 'rivendel',\n },\n {\n question:\n 'CON LA R. Mamífero roedor de pequeño tamaño, de hocico puntiagudo y cola larga, de pelaje corto.',\n answer: 'raton',\n },\n {\n question:\n 'CON LA R. Corriente de agua continua y más o menos caudalosa que va a desembocar en otra, en un lago o en el mar.',\n answer: 'rio',\n },\n ],\n },\n {\n letter: 's',\n status: 0,\n questions: [\n {\n question: 'CON LA S. Comunidad salvadora de todo desarrollador informático.',\n answer: 'stackoverflow',\n },\n\n {\n question: 'CON LA S. Baile típico de brasil.',\n answer: 'samba',\n },\n {\n question: 'CON LA S. Representarse en la fantasía imágenes o sucesos mientras se duerme.',\n answer: 'soñar',\n },\n ],\n },\n {\n letter: 't',\n status: 0,\n questions: [\n {\n question:\n 'CON LA T. Película del director James Cameron que consolidó a Arnold Schwarzenegger como actor en 1984.',\n answer: 'terminator',\n },\n {\n question:\n 'CON LA T. Alimento preparado con huevo batido, cuajado con aceite en la sartén y de forma redonda o alargada, al que a veces se añaden otros ingredientes.',\n answer: 'tortilla',\n },\n {\n question:\n 'CON LA T. Grave dolor físico o psicológico infligido a alguien, con métodos y utensilios diversos, con el fin de obtener de él una confesión, o como medio de castigo.',\n answer: 'tortura',\n },\n ],\n },\n {\n letter: 'u',\n status: 0,\n questions: [\n {\n question:\n \"CON LA U. Escritor y filósofo español de la generación del 98 autor del libro 'Niebla' en 1914.\",\n answer: 'unamuno',\n },\n {\n question: 'CON LA U. Instrumento de cuerda similar a la guitarra pero más pequeño.',\n answer: 'ukelele',\n },\n {\n question: 'CON LA U. Objeto fabricado que se destina a un uso manual y doméstico.',\n answer: 'utensilio',\n },\n ],\n },\n {\n letter: 'v',\n status: 0,\n questions: [\n {\n question:\n 'CON LA V. Nombre dado a los miembros de los pueblos nórdicos originarios de Escandinavia, famosos por sus incursiones y pillajes en Europa.',\n answer: 'vikingos',\n },\n {\n question:\n 'CON LA V. Traspasar a alguien por el precio convenido la propiedad de lo que se posee.',\n answer: 'vender',\n },\n {\n question: 'CON LA V. Hortaliza, especialmente la de hojas verdes.',\n answer: 'verdura',\n },\n ],\n },\n {\n letter: 'w',\n status: 0,\n questions: [\n {\n question:\n 'CONTIENE LA W. Emparedado hecho con dos rebanadas de pan entre las cuales se coloca jamón y queso.',\n answer: 'sandwich',\n },\n {\n question: 'CON LA W. Nombre de la bruja escarlata en el universo Marvel.',\n answer: 'wanda',\n },\n {\n question:\n 'CON LA W. Deporte que consiste en deslizarse por el agua sobre una tabla especial provista de una vela.',\n answer: 'windsurf',\n },\n ],\n },\n {\n letter: 'x',\n status: 0,\n questions: [\n {\n question: 'CONTIENE LA X. Toxina bacteriana utilizada en cirujía estética.',\n answer: 'botox',\n },\n {\n question:\n 'CON LA X. Instrumento musical de percusión con láminas afinadas cada una a un tono específico.',\n answer: 'xilofono',\n },\n {\n question: 'CON LA X. Fobia a los extranjeros.',\n answer: 'xenofobia',\n },\n ],\n },\n {\n letter: 'y',\n status: 0,\n questions: [\n {\n question:\n 'CONTIENE LA Y. Pequeño cáctus conocido por sus alcaloides psicoactivos utilizado de forma ritual y medicinal por indígenas americanos.',\n answer: 'peyote',\n },\n {\n question:\n 'CONTIENE LA Y. Abominable hombre de las nieves. Supuesto gigante antropomorfo, del cual se dice que vive en el Himalaya.',\n answer: 'yeti',\n },\n {\n question:\n 'CONTIENE LA Y. Pieza de la armadura antigua que resguardaba la cabeza y el rostro, y se componía de morrión, visera y babera.',\n answer: 'yelmo',\n },\n ],\n },\n {\n letter: 'z',\n status: 0,\n questions: [\n {\n question:\n 'CON LA Z. Escuela de budismo que busca la experiencia de la sabiduría más allá del discurso racional.',\n answer: 'zen',\n },\n {\n question:\n 'CON LA Z. Vulpes vulpes, mamífero de la familia cánidos, depredador de conejos y gallinas entre otros.',\n answer: 'zorro',\n },\n {\n question:\n 'CON LA Z. Calzado que no pasa del tobillo, con la parte inferior de suela y lo demás de piel, fieltro, paño u otro tejido, más o menos escotado por el empeine.',\n answer: 'zangano',\n },\n ],\n },\n ];\n}", "title": "" }, { "docid": "dd7356826fb60caf5f92b1794480f3dc", "score": "0.5632984", "text": "function showQuestion(question) {\n selectNextJoueur();\n fullCorrectAnswer = \"\";\n questionElement.innerText = question.question\n $('#answers').css('display', 'none');\n $('#display-buttons').show(250);\n var answersArray = [];\n //Push a random correct answer\n correctAnswer = question.correctAnswers[Math.floor(Math.random()*question.correctAnswers.length)];\n answersArray.push(correctAnswer)\n //If we have several correct answers, we need them all for Cash\n if (question.correctAnswers.length > 1){\n fullCorrectAnswer = question.correctAnswers[0].text;\n for (i = 1; i < question.correctAnswers.length; ++i){\n fullCorrectAnswer += \" // \" + question.correctAnswers[i].text;\n }\n }\n //Shuffle wrong answers, then pick 3 at a random index\n shuffledWrongAnswers = question.wrongAnswers.sort(() => Math.random() - .5)\n randomIndex = Math.floor(Math.random()*question.wrongAnswers.length)\n for(i=0;i<3;++i){answersArray.push(shuffledWrongAnswers[i%shuffledWrongAnswers.length])}\n //Shuffle answers\n answersArray = answersArray.sort(() => Math.random() - 0.5);\n //Build buttons\n answersArray.forEach(answer => {\n const button = document.createElement('button')\n button.innerText = answer.text\n button.classList.add('btn')\n button.classList.add('reponse')\n //button.classList.add('hidden')\n if (answer.text == correctAnswer.text) {\n button.dataset.correct = \"correct\"\n } else {\n button.classList.add('volatile')\n }\n button.addEventListener('click', selectAnswer)\n answersElement.appendChild(button)\n })\n}", "title": "" }, { "docid": "247fb8cb5d8a8e1356cb9f5bd6b4d93a", "score": "0.56287754", "text": "function submitSearch() {\n\t/* If the user has already generated the SQL */\n\tif ($(\"#thequery\").html().length > 1) {\n\t\t$(\"#q\").val(encodeURIComponent($(\"#thequery\").html()));\n\t\t$(\"#qdata\").val(musicSearch.allSearchTags.join(\"[|]\"));\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\t\n\t}\n}", "title": "" }, { "docid": "ff28279ea5d1392fb9c562c7bfacaacb", "score": "0.56272817", "text": "function getInputUser(){\n var input = document.getElementById('field').value.toLowerCase();\n let cardValue;\n let results;\n let newArrayOfKeywords = [];\n //fetching Cards from Firebase\n var card = firebase.database().ref('cards');\n card.on('value', function (data){\n keywordsArray = [];\n cardValue = data.val();\n for(var i = 0; i< cardValue.length; i++){\n for(var j = 0; j < cardValue[i].cardkeywords.length; j++){\n // test.push(cardValue[i].cardkeywords[j]);\n var eachKeyword = cardValue[i].cardkeywords[j];\n\n newArrayOfKeywords.push(eachKeyword);\n //selecting the correct card if includes the keyword given\n if(cardValue[i].cardkeywords[j].includes(input)){\n keywordsArray.push(cardValue[i]);\n cardKey = Object.keys(cardValue)[i]\n };\n };\n };\n var index = newArrayOfKeywords.indexOf(input);\n if(index !== -1){\n console.log('que si');\n console.log(newArrayOfKeywords);\n askedCard();\n }else{\n console.log('que no');\n openThirdModal()\n }\n })\n}", "title": "" }, { "docid": "0976e4ec9f226ba7db0c6a79f421a096", "score": "0.56229883", "text": "function get_suggestions(e){\n\t\t\n\t\tif (e.keyCode != 38 && e.keyCode != 40)\n\t\t{\n\t\t\tvar input_value = $(this).val();\n\t\t\tif (input_value)\n\t\t\t{\n\t\t\t\tresults = new Array();\n\t\t\t\tvar length = input_value.length;\n\t\t\t\t\n\t\t\t\t$.each(abbrs, function(key, value) {\n\t\t\t\t\tif(value.substr(0, length) == input_value && results.length < 15) {\n\t\t\t\t\t\tresults[results.length] = value;\n\t\t\t\t\t}\t\n\t\t\t\t});\t \n\t\t\t\t\n\t\t\t\tif (results[0]){\n\t\t\t\t\tprint_suggestions(results);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\thide_suggestions();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thide_suggestions();\n\t\t\t}\t\t\t\t\t \n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "42afaba9d4fc499efd93bbc7874571f3", "score": "0.5621557", "text": "function selectWords() {\r\n const index = Math.floor(Math.random() * questionWords.length);\r\n return questionWords[index];\r\n}", "title": "" }, { "docid": "f28130f906a68558df61ff7b886f9bd9", "score": "0.5620752", "text": "function showAnswer() {\n werd.push(currentWord.split(\"\").join(\" \"));\n}", "title": "" }, { "docid": "13667ba765a2ee69b6789161a9ba2233", "score": "0.5618467", "text": "function getSuggestions(letters, e, filter) {\r\n\t//alert(e.keyCode);\r\n\ttheItem = letters.name;\r\n\tswitch(e.keyCode){\r\n\t\tcase 40:\r\n\t\t\t// THE DOWN ARROW WAS PRESSED\r\n\t\t\tif(listCount < (count - 1)){\r\n\t\t\t\tlistCount++;\r\n\t\t\t\ttheE = \"results\" + listCount + \"bg\";\r\n\t\t\t\tfor(x = 0; x < count; x++)\r\n\t\t\t\t\tdocument.getElementById(\"results\" + x + \"bg\").style.backgroundColor = thisBGColor;\r\n\t\t\t\tdocument.getElementById(theE).style.background = \"#BCCCF3\";\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 38:\r\n\t\t\t// THE UP ARROW WAS PRESSED\r\n\t\t\tif(listCount > 0){\r\n\t\t\t\tlistCount--;\r\n\t\t\t\ttheE = \"results\" + listCount + \"bg\";\r\n\t\t\t\tfor(x = 0; x < count; x++)\r\n\t\t\t\t\tdocument.getElementById(\"results\" + x + \"bg\").style.backgroundColor = thisBGColor;\r\n\t\t\t\tdocument.getElementById(theE).style.background = \"#BCCCF3\";\r\n\t\t\t}else{\r\n\t\t\t\tfor(x = 0; x < count; x++)\r\n\t\t\t\t\tdocument.getElementById(\"results\" + x + \"bg\").style.backgroundColor = thisBGColor;\r\n\t\t\t\tlistCount = -1;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\t// THE ENTER KEY WAS PRESSED\r\n\t\t\tif(listCount > -1){\r\n\t\t\t\tvar tmpSWord;\r\n\t\t\t\ttmpSWord = results[listCount].split(\"~|~\");\r\n\t\t\t\taddArticle(tmpSWord[2],tmpSWord[0]);\r\n\t\t\t\t\r\n\t\t\t\t//document.getElementById(theItem).focus();\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// IF YOU WANT TO SUBMIT WHEN THE ENTER KEY IS PRESSES, PUT IT HERE\r\n\t\t\t\t// document.form.submit();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// ANYTHING BESIDES UP, DOWN, OR ENTER WAS PRESSED\r\n\t\t\tif(letters.value.length < 1){\r\n\t\t\t\tdocument.getElementById(theDiv).style.visibility = \"hidden\";\r\n\t\t\t} else {\r\n\t\t\t\tdocument.getElementById(theDiv).style.visibility = \"visible\";\r\n\t\t\t\thttp.open(\"GET\", \"/common/modules/contentmanager/pageSuggest.cfm?l=\" + letters.value + \"&e=\" + getResults(), true);\r\n\t\t\t\thttp.onreadystatechange = handleHttpResponse;\r\n\t\t\t\thttp.send(null);\r\n\t\t\t}\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "9dea672d3412f784bbeed888e802cf0e", "score": "0.56155", "text": "function askAndCollect(arr) {\n for (let i = 0; i < questions.length; i++) {\n let question = questions[i][0];\n let answer = questions[i][1];\n let response = prompt(question);\n\n if (response === null || response === undefined || response === \"\") {\n console.log(\n \"ERROR:\",\n \"User skipped this question: \" +\n question +\n \" Refresh page to try again.\"\n );\n if (response !== answer) {\n incorrect.push(question);\n }\n continue;\n }\n if (typeof answer === typeof 1) {\n response = parseInt(response);\n if (response === answer) {\n correct.push(question);\n continue;\n } else {\n incorrect.push(question);\n continue;\n }\n }\n if (typeof answer === \"string\") {\n response = response.toLowerCase();\n }\n if (response === answer + \" \") {\n response = response.trimRight();\n }\n if (response === answer) {\n // correctCount += 1;\n correct.push(question);\n } else if (response.trimRight() === \"what i’ve done\") {\n correct.push(question);\n } else {\n incorrect.push(question);\n }\n }\n}", "title": "" }, { "docid": "8cb7891a52cea96863027c4b940f56fb", "score": "0.5602973", "text": "function nextQuestion() {\r\n //called from the extractAnswers function\r\n displayQuestions(returnRandomNumber());\r\n }", "title": "" }, { "docid": "0956ea0f0466121b57b3205572702fab", "score": "0.5598973", "text": "function askQuestions(question)\n{\n let myQuestions = ['What branch of the military did I serve in?',\n 'What martial art have I studied?',\n 'What is my favorite movie?',\n 'What is my favorite book?',\n 'What is my favorite video game?'];\n \n let userAnswer = prompt(`${ myQuestions[question] }`);\n\n console.log(`Question: ${ myQuestions[question] }`);\n console.log(`User Answer: ${ userAnswer }`)\n\n verifyAnswer(myQuestions[question], userAnswer);\n}", "title": "" }, { "docid": "4c14f6bb7e82433d00e6c93e5dc9602b", "score": "0.5595023", "text": "function usedLetters () {\n var lettersNotinUse = currentWordLetters.join('')\n $('#guesses').text(guesses)\n }", "title": "" }, { "docid": "0dabd9172d433ef8ff5f2a24b737ea78", "score": "0.5590014", "text": "function checkMCQInput(){\n // get answer from textbox and remove spaces before the first non-space character and remove spaces after last non-space cahracters\n let message = (input.value).trim();\n // set found as false\n let found = false;\n\n // for loop to check if message is in possibleAnswersMCQ\n for (let i=0; i < possibleAnswersMCQ.length; i++){\n // if message is found to be in possibleAnswers\n if (possibleAnswersMCQ[i].includes(message.toLowerCase())) {\n found = true;\n break;\n }\n }\n\n // set submit.onclick appropriately based on found\n if (found) {\n errorText.innerHTML = \"\";\n addMessage();\n } else {\n errorText.innerHTML = \"\";\n errorText.style.visibility = \"visible\";\n errorText.innerHTML = \"Please enter a number from (1 to \" + (currentQuestionObject.restrictions.choices.length) + \") or enter the option word(s)\";\n submit.onclick = null;\n }\n}", "title": "" }, { "docid": "ca2f968eec1fc880f9ce78bbdc8688c6", "score": "0.5589856", "text": "function selectQuestion() {\n \n let newQuestion = false;\n let questionEntry = 0;\n ansResult.innerText = \"\";\n while (!newQuestion) {\n\n if (questions.length === questionsAsked.length) {\n newQuestion = true; // no new questions\n setState(statesQuiz.FINAL);// set state to end test\n }\n\n questionEntry = Math.floor(Math.random() * questions.length);\n\n if ((questionsAsked.length === 0 ) || questionsAsked.indexOf(questionEntry) < 0) {\n // new question found, use it\n QuestionIdx = questionEntry; // use this to access all elements of the question\n newQuestion = true; // to exit the loop\n\n questionsAsked.push(QuestionIdx);\n\n // fill up question and answers\n qStrArea.innerText = questions[QuestionIdx][0];\n ans1StrArea.innerText = questions[QuestionIdx][1];\n ans2StrArea.innerText = questions[QuestionIdx][2];\n ans3StrArea.innerText = questions[QuestionIdx][3];\n ans4StrArea.innerText = questions[QuestionIdx][4];\n }\n }\n return questionEntry; // -1 if no more questions. just in case i need it in the future, questionIdx will do for now.\n}", "title": "" }, { "docid": "eb554d5638afc53abc4724aabf2d5f58", "score": "0.5588075", "text": "function gatherAnswers() {\n return getUserGuess()\n .then(function(guess) {\n // listOfGuesses.letters.push(guess);\n hasCorrectLetter(guess);\n console.log( chosenWord.getWord() );\n \n return getUserGuess();\n }).then(function() {\n // return listOfGuesses;\n });\n}", "title": "" }, { "docid": "df512c6d5514df459c49f357efca5dd0", "score": "0.55878717", "text": "function getPrompt() {\n prompt.get(['word'], function (error, result) {\n if (result['word'].toLowerCase() != \"q\"){\n console.log( pigLatin(result['word']) );\n getPrompt();\n }\n else {\n prompt.get(['Do you want to quit? (y/n)'], function(error, result) {\n if (result['Do you want to quit? (y/n)'].toLowerCase() != \"y\"){\n getPrompt();\n }\n })\n }\n });\n}", "title": "" }, { "docid": "7f008287a3b2dce77f6c31172e95cbe1", "score": "0.55876684", "text": "function showMultipleChoiceOthers(questionObject) {\n\n // reset possibleAnswersMCQ back to an empty array\n possibleAnswersMCQ = [];\n // initialise othersAnswers\n othersAnswers = [];\n\n // for loop to add possible answer string for each MCQ option\n for (let i=0; i < questionObject.restrictions.choices.length-1; i++) {\n possibleAnswersMCQ.push([]); // add empty array to store answer strings for choice i\n possibleAnswersMCQ[i].push((i+1).toString()); // MCQ option number\n possibleAnswersMCQ[i].push(i+1 + \".\"); // MCQ option number + .\n possibleAnswersMCQ[i].push(questionObject.restrictions.choices[i].toLowerCase()); // MCQ option word\n // MCQ option number + . + MCQ option word (no space before and after .)\n possibleAnswersMCQ[i].push((i+1) + \".\" + questionObject.restrictions.choices[i].toLowerCase());\n // MCQ option number + . + MCQ option word (with space after . only)\n possibleAnswersMCQ[i].push((i+1) + \". \" + questionObject.restrictions.choices[i].toLowerCase());\n }\n\n // add possible answer string for each others option\n othersAnswers.push((questionObject.restrictions.choices.length).toString());// MCQ option number\n othersAnswers.push(questionObject.restrictions.choices.length + \".\"); // MCQ option number + .\n othersAnswers.push(questionObject.restrictions.choices[questionObject.restrictions.choices.length-1].toLowerCase()); // MCQ option word\n // MCQ option number + . + MCQ option word (no space before and after .)\n othersAnswers.push(questionObject.restrictions.choices.length + \".\" + questionObject.restrictions.choices[questionObject.restrictions.choices.length-1].toLowerCase());\n // MCQ option number + . + MCQ option word (with space after . only)\n othersAnswers.push(questionObject.restrictions.choices.length + \". \" + questionObject.restrictions.choices[questionObject.restrictions.choices.length-1].toLowerCase());\n\n input.onkeyup = () => {\n // set submit.onclick appropriately based on found\n submit.disabled = false;\n submit.onclick = checkMCQInputOthers;\n }\n\n // allow users to use textbox\n enableTextInput();\n\n let question = questionObject.question;\n let choices = questionObject.restrictions.choices;\n\n showMessageSender(question);\n showOptions(choices, true);\n}", "title": "" }, { "docid": "0449bb3031715af890b21d63517f3625", "score": "0.5577071", "text": "function ask12() {\n let question = prompt('What about trying to guess the name of one my three wives?');\n const wives = ['Geraldine', 'Bastille', 'Nancy'];\n\n for(let i = 0; i <= 3; i++){\n if(wives.includes(question)){\n alert('WOW, you\\'re Correct ' + qSix + ' The names of my wives are: ' + wives);\n affirmative ++;\n break;\n }else\n alert('No Way, Take another guess...');\n question = prompt('What is one of my wives names?');\n }\n}", "title": "" }, { "docid": "aca90ee8bed7aa772876dd678090c172", "score": "0.5574292", "text": "function result (){\n\tvar value = $('#text').val(); // Almacenar el valor introducido.\n\tfor(i= 0; i < arrayLetter.length; i++){\n\t\tif(arrayLetter[i] === value){ // Si la letra corresponde a la letra introducida, el guión se convierte en letra.\n\t\t\tarrayDash[i] = arrayLetter[i];\n\t\t\t$('#word').text(arrayDash.join(\" \"));\n\t\t\tconsole.log(\"You are right\");\n\t\t} else {\n\t\t\tconsole.log(\"You are wrong\");\n\t\t};\n\t};\n}", "title": "" }, { "docid": "d051b44daaf38307c264000207f06821", "score": "0.5570744", "text": "function answerQuestion(){\n \t\t// Inside the on-click event...\n \t\tif(numQues <= question.length){\n\t\t\t\t$(\"#question1\").html(question[numQues]);\n \t\t\t$('label[for=answer1]').html(answer1[numQues]);\n \t\t\t$('label[for=answer2]').html(answer2[numQues]);\n \t\t\t$('label[for=answer3]').html(answer3[numQues]);\n \t\t\t$('label[for=answer4]').html(answer4[numQues]);\n \t\t\tnumQues++\n \t\t};\n \t\t}", "title": "" }, { "docid": "0c49cbb64c938f86f35f57f264714c9b", "score": "0.5569847", "text": "function checkAnswer(){\n // use getElementsByName because we have an array which it will loop through\n choices = document.getElementsByName(\"choices\");\n for(var i=0; i<choices.length; i++){ //traverses through the choice array\n if(choices[i].checked){ //using a control structure\n choice = choices[i].value;\n }\n }\n // checks if answer matches the correct choice\n if(choice == questions[pos].answer){\n //each time there is a correct answer this value increases\n correct++;\n }\n // changes position of which character user is on\n pos++;\n // then the loadQuestion function runs again to go to next question\n loadQuestion();\n}", "title": "" }, { "docid": "3e42c48d616eb5fa29d86f92361be5d2", "score": "0.55624795", "text": "function compare() {\n \tfor (var i = 0; i < 10) {\n\n\n \tif (userGuess === wordLetters) {\n \t\tdocument.getElementById (\"rightGuesses\")\n \t}\n\n else i++;\n\n \n\n\n }", "title": "" }, { "docid": "0ee96022b61385bfa175207dde212304", "score": "0.55613136", "text": "function questions() {\n var answer1 = prompt(questData [i][0]).toUpperCase();\n if (answer1 === questData[i][1] || answer1 === questData[i][2]){\n console.log(user + \" replied \" + answer1);\n questData[i][7].textContent = questData[i][3]\n questData[i][7].className = \"wrong\";\n } else if (answer1 === questData[i][4]|| answer1 === questData[i][5]) {\n console.log(user + \" replied \" + answer1);\n questData[i][7].textContent = questData[i][6];\n questData[i][7].className = \"correct\";\n counter += 1;\n } else {\n alert(\"That's not an acceptable answer lets move on to the next question\");\n }\n}", "title": "" }, { "docid": "926ae917f9cdbab951b4e01baf413a81", "score": "0.55598366", "text": "function autocomplete(input, dictionary){\n const wordLength = input.length;\n const result = [];\n dictionary.map(function(x) {\n if (x.replace(/[0-9][&\\/\\\\#,+()$~%.'\":*?<>{}]/g, '').substring(0, wordLength) == input) { \n result.push(x);\n }\n });\n if (result.length > 5) {\n \treturn result.slice(0, 5)\n } else {\n \t return result;\n }\n}", "title": "" }, { "docid": "abfd35ed1ee2295cfde7eb6d3bceb96d", "score": "0.55592036", "text": "function getResults(input) {\n\n var counter = 0; // count correctly guessed characters, return true if counter===4\n var htmlStr = '<div class=\"row\"><span class=\"col-md-6\">' + input +\n '</span><div class=\"col-md-6\">';\n\n for(var i = 0; i<4; i++) {\n if (answer[i] == input[i]) {\n htmlStr += '<span class=\"glyphicon glyphicon-ok\"></span>'; // the ok icon\n counter++;\n } else if (answer.indexOf(input[i]) >= 0) {\n htmlStr += '<span class=\"glyphicon glyphicon-transfer\"></span>'; // icon\n } else {\n htmlStr += '<span class=\"glyphicon glyphicon-remove\"></span>'; // the x icon\n }\n }\n htmlStr += '</div></div>'; // close divs; advance to next line on page\n results.innerHTML += htmlStr;\n\n return counter === 4;\n\n} // end function", "title": "" }, { "docid": "641eae3b656d83c7ff4c59707c25f6f9", "score": "0.555878", "text": "function questions() {\n\t\t$(\"#Ans\").hide();\n\t\t$(\"#Qs\").show();\n\t\tanswered = true;\n\t\t// Prints Question from Array\n\t\t$(\".question\").html(triviaQuestions[currentQ].question);\n\n\t\t// -----------------------------------------\n\t\t//Loops through possible choices and appends\n\t\t// -----------------------------------------\n\t\tfor (var i = 0; i <= 5; i++) {\n\t\t\tvar list = $(\"<div>\");\n\t\t\tlist.text(triviaQuestions[currentQ].choices[i]);\n\t\t\tlist.attr({\"data-index\": i });\n\t\t\tlist.addClass(\"thisChoice\");\n\t\t\t$(\".choices\").append(list);\n\t\t}\n\n\t\t//Calls Timer\n\t\tcountdown();\n\n\t\t// USERCLICK\n\t\t$(\".thisChoice\").on(\"click\",function(){\n\t\t\tuserChoice = $(this).data(\"index\");\n\t\t\tclearInterval(time);\n\t\t\tshoAnswer();\n\t\t});\n\t}", "title": "" }, { "docid": "7fcdc404ca1b629d1d2c2d0c77edfdd4", "score": "0.55557764", "text": "function confirmWord() {\n modal.style.display = \"none\";\n if (userInput.value.length > 1) {\n userHiddenWord = userInput.value;\n [...userHiddenWord].forEach((hiddenLetter) => {\n lettersHiddenWordArray.push(hiddenLetter);\n });\n displayHiddenUserWord(userHiddenWord);\n } else {\n pickCategory();\n chosenCategory = selectedOption;\n checkCategory(chosenCategory);\n }\n userInput.value = \"\";\n console.log(hangedMan);\n}", "title": "" }, { "docid": "db7b6be959b056b9a8f9513b35d0a152", "score": "0.5551908", "text": "function q1(){\nlet question1 = prompt('do you know me(y/n)?')\nlet answer1 = question1.toLowerCase();\n\nswitch (answer1) {\n case ('yes'):\n case ('y'):\n alert('nice ' + userName);\n score +=1;\n break;\n case ('no'):\n case ('n'):\n alert('i will be happy to know you ' + userName);\n break;\n default:\n alert('Your Answer Should Be Yes or No Y/N,please')\n break; \n }\n \n\n}", "title": "" }, { "docid": "37e74aa6283d527644e039f2a93b4b08", "score": "0.5551183", "text": "function getWord() {\n $(document).on(\"keypress\", function(e) {\n e.preventDefault();\n wordArr = [];\n if (e.keyCode === 13 && gotWord === false) {\n selectWord = wordList[Math.floor(Math.random() * wordList.length)];\n wordGuess = selectWord.split(\"\");\n // console.log(split);\n // console.log(selectWord);\n for (i = 0; i < selectWord.length; i++) {\n wordArr.push(\"_\");\n gotWord = true;\n }\n // console.log(wordArr);\n $(\"#comp-word\").text(wordArr.join(\" \"));\n $(\"#user-guess\").html(\"Pick a letter\");\n playGame();\n }\n });\n }", "title": "" }, { "docid": "0b804231c45789e7d7bcbda870ec98ac", "score": "0.5550532", "text": "function getQuestions(n)\n\t {\n\t \tvar questions = [\n\t \t\t{question: \"What is the capital of the India?\", choices: [\"Chennai\", \"New Delhi\", \"Bangalore\", \"Kolkata\"], correct:1, user_answer:\"\"},\n\t \t\t{question: \"What is the capital of the United States Of America?\", choices: [\"Boston\", \"New York\", \"Washington D.C\",\"California\"], correct:2, user_answer:\"\"},\n\t \t\t{question: \"What is the capital of the Germany?\", choices: [\"Deustcheland\", \"Munich\",\"Hamburg\", \"Frankfurt\"], correct:3, user_answer:\"\"},\n\t {question: \"What is the capital of the Thailand?\", choices: [\"Bangkok\", \"Chai Nuk\", \"Pattaya\",\"Rangoon\"], correct:0, user_answer:\"\"},\n {question: \"What is the capital of the South Africa?\", choices: [\"Cape Town\", \"Johannesburg\", \"Port Elizabeth\",\"Durban\"], correct:1, user_answer:\"\"}\n ];\n \n return questions[n];\n\t }", "title": "" }, { "docid": "e337ac25aceebb9285606516194015e9", "score": "0.5550198", "text": "function keyPress(key) {\n if (randomWord.includes(key)) {\n console.log(key);\n for (var i = 0; i < randomWord.length; i++) {\n if (randomWord[i] === key) {\n console.log(key);\n underscoreArray[i] = key;\n if (!correctLetters.includes(key)) {\n correctLetters.push(key);\n }\n }\n }\n } else if (!incorrectlyGuessedLetters.includes(key)) {\n incorrectlyGuessedLetters.push(key);\n maxTries--;\n }\n $(\"#word\").html(underscoreArray);\n $(\"#lettersGuessed\").html(incorrectlyGuessedLetters);\n $(\"#guessesLeft\").html(maxTries);\n\n}", "title": "" }, { "docid": "770291c9bbc4e5b506b850d05e2df010", "score": "0.5550102", "text": "function listenUserConfirmChoice() {\n $('.submit-users-choice').on('click', function(event) {\n const endpoint = 'https://favqs.com/api/quotes/?filter=';\n query = chooseWord(usersChoice);\n const FAVQs_URL= endpoint+query;\n \n getDataFromFAVQsApi(FAVQs_URL, displayQuote);\n });\n}", "title": "" }, { "docid": "f060287f027cad122103f9d5a70f1075", "score": "0.55499095", "text": "function render() {\n alph = 'abcdefghijklmnopqrstuvwxyz'\n let col = 1\n chosenTopics.forEach(function(topic){\n cat = questions[topic]\n let row = 0\n for (const [key, value] of Object.entries(cat)) {\n var qav = value[Math.floor(Math.random() * value.length)];\n document.querySelector('#'+alph[row]+col + ' .answer').textContent = qav.a;\n document.querySelector('#'+alph[row]+col + ' .question').textContent = qav.q;\n row += 1\n }\n col += 1\n })\n}", "title": "" }, { "docid": "0e532f006695aecbe4d500a6e17b357d", "score": "0.5549563", "text": "function nextQuestion() {\n console.clear();\n\n currentState = STATE.ASKING;\n\n setTimeBar(100);\n time = 100 * maxTime;\n\n var wordSet = pickNextTermSet();\n currentTerm = getRandom(wordSet[1]);\n currentTermType = wordSet[0];\n\n var question = new Question(currentTerm);\n question.modify(currentTermType);\n correctAnswers = ([question.word, question.hiragana]).filter(filterFalse);\n\n questionField.html(currentTerm.render());\n definitionField.html(currentTerm.definition());\n grammarTypeField.text(wordSet[2]);\n $('#mods .mod').remove();\n answerTextBox.val('');\n renameMe.data('mods', question.modifiers.map(listCopy));\n\n setTimeout(function() { fadeInMods(question.modifiers); }, 400);\n}", "title": "" }, { "docid": "743fe510af11aeb820ba782fdc00fb94", "score": "0.55425984", "text": "function questionLoad (qANum) {//THis is contained within a function so it creates the Question objects each time its called, otherwise it won't load new db changes.\n const questionArray = [[//An array containing the questions to be asked from each menu option\n new Question(\"input\", \"empFName\", \"First Name:\"),\n new Question(\"input\", \"empLName\", \"Last Name:\"),\n new Question(\"list\", \"empRole\", \"Role:\", roleList),\n new Question(\"list\", \"empMan\", \"Manager Name:\", nameList),\n ], [\n new Question(\"list\", \"remEMP\", \"Employee Name:\", nameList),\n new Question(\"confirm\", \"conf\", \"Are you sure?\")\n ], [\n new Question(\"list\", \"empId\", \"Employee Name:\", nameList),\n new Question(\"list\", \"roleId\", \"Role:\", roleList)\n ], [\n new Question(\"list\", \"empId\", \"Employee Name:\", nameList),\n new Question(\"list\", \"manId\", \"Manager Name:\", nameList)\n ], [\n new Question(\"input\", \"depName\", \"Name:\")\n ], [\n new Question(\"list\", \"oldId\", \"Department:\", depList),\n new Question(\"input\", \"depName\", \"Department New Name:\")\n ], [\n new Question(\"list\", \"remDep\", \"Department:\", depList),\n new Question(\"confirm\", \"conf\", \"Are you sure?\")\n ], [\n new Question(\"input\", \"roleName\", \"Title:\"),\n new Question(\"input\", \"roleSal\", \"Salary:\"),\n new Question(\"list\", \"roleDep\", \"Department:\", depList)\n ], [\n new Question(\"list\", \"remRole\", \"Role:\", roleList),\n new Question(\"confirm\", \"conf\", \"Are you sure?\")\n ], [\n new Question(\"list\", \"roleDep\", \"Department:\", depList)\n ]];\n //let answers = questionArray[qANum];\n return questionArray[qANum];\n}", "title": "" }, { "docid": "449fc3ac448e5d15775ae551e9188220", "score": "0.55407745", "text": "handleInteraction(letter){\n if (phrase === letter) {\n alert(\"please enter the matching letter\");\n } else {\n alert (\"incorrect, try again\");\n }\n }", "title": "" }, { "docid": "097b212f685cf9d45a23986851e55759", "score": "0.55407304", "text": "function askForAnswer() {\n candidateAnswer = input.question(\"Who was the first American woman in space? \");\n}", "title": "" }, { "docid": "d784854fd4f731cdf12072c9cc7cb457", "score": "0.55403733", "text": "function compare() {\n\t//change the winning word & the user guess to lowercase\n\tword = word.toLowerCase();\n\t// If the letter is in the word, display the letter\t\n\tif (word.indexOf(userGuess) !== -1) {\n\t\t\tcorrect();\n\t\t\tprint();\n\t\t} else { // If the letter is not in the word, add the word to the missed array & decrease gussesLeft.\n\t\t\tguessesLeft--;\n\t\t\tmissedArray.push(userGuess);\n\t\t\tprint();\n\t\t}\n\t}", "title": "" }, { "docid": "b589f7aa91072dfa12192099dd4813bb", "score": "0.5537825", "text": "function myAnswer() {\n var myResult = ''; // creates a place to storage value of selected items\n \n var iId = this.getAttribute(\"data-id\");\n \n myObj[page].mySel = iId;// adds another class to save into \n \n //this.classList.toggle('selAnswer');\n //console.dir(this.innerText);\n \n //this.classList.toggle('selAnswer'); test class toogle ok\n \n if (this.innerText == crtAnswer) {\n myResult = \"correct\";}\n else {\n myResult = \"incorrect\";\n }\n\n myQueRep[page] = iId;\n\n \n //loop over the content bAnswer\n for (var x = 0; x < bAnswer.length; x++){\n \n if (iId == x)\n {bAnswer[x].classList.add(\"selAnswer\");\n } //add a class into the selector\n else{bAnswer[x].classList.remove(\"selAnswer\");\n }\n \n //console.dir(bAnswer[x]);\n // };\n \n \n console.log(myQueRep);\n\n console.log(crtAnswer);\n\n console.log(myResult);\n \n \n }\n\n \n }", "title": "" }, { "docid": "31936cee64006c56a164a1b0faf491e2", "score": "0.5537557", "text": "function intialSetupForDisplayWord (wrd){\n\tvar cword='';\n\tfor (i=0,i<wrd.length;i++){\n\t\tcword=cword + '_';\n\t}\n\treturn cword\n\n}\n\n//prompts the user for input\nfunction promptUser(c,w){\n\tvar totalChances= w.length;\n\tvar chancesLeft= totalChances-c;\n\tvar l= prompt(\"So far you have: \" + displayWord + \n\t\t\". Guess a letter please. You have \" +chancesLeft+ \n\t\t\" chances left.\" );\n\treturn l\n}\n\nfunction rebuildDisplayWord (index,wrd,dispwrd){\n\tvar letter=wrd[index];\n\tdispwrd=dispwrd.split('');\n\tdispwrd[index]=letter;\n\tdispwrd=dispwrd.join('');\n\treturn dispwrd;\n}\n \n//Establishes a list of words for the user to guess\nvar wordBank = ['ghost','candy','costume',\n'vampire','witch','monster']\n\n//Divides the word up by its individual characters to be checked against by user input\nword=wordSelector\nlettersInside=word.split('');\ndisplayWord=intialSetupForDisplayWord(word);\ntotalChances=word.length;\n\nwhile (displayWord != word){\n\tvar guess= promptUser(chancesUsed, word);\n\n\tbreak;\n}\n\nwhile (guess.length > 1 ){\n\talert(\"Choose a letter\");\n\tvar guess= promptUser(chancesUsed,word);\n}\n//Informs the user they lost if they exceed the number of guesses\nif (chancesUsed==(word.length)){\n\talert(\"Game Over\");\n\tbreak;\n}\n\nvar i=lettersOfWord.indexOf(guess);\nif (i !== =1){\n\tlettersOfWord.splice(i,1);\n\tdisplayWord=rebuildDisplayWord \n\t(word.indexOf(guess),word,displayWord);\n\tcorrect++;\n}else{\n\tchancesUsed++;\n}\n\nif (correct==word.length){\n\tcontinuePlay==true\n}\n//Informs user whether they won or lost\nif (continueplay== true){\n\tif (correct== word.length){\n\t\talert(\"You Win!\");\n\t\tvar playAgain = confirm(\"Play Again?\");\n\t}else{\n\t\talert(\"You Lost!\");\n\t\tvar playAgain = confirm(\"Play Again?\");\n\t}\n\tif (playAgain){\n\t\tlocation.reload();\n\t}\n}", "title": "" }, { "docid": "70bfd53c1a14e4124230a11748b934f6", "score": "0.55313164", "text": "function reset() {\r\nvar checkReset = 1;\r\nscore=0;\r\nlives=10;\r\ncheckWord=0;\r\n\r\nfor(var i = 0; i<word.length;i++) //browse word length\r\n {\r\n answerArray[i]=\"\"; //write underlines exact position\r\n }\r\nfor(var g=0;g<26;g++) \r\n {\r\n document.getElementById(alphabet[g]).style.visibility = \"visible\"; //hide letter after click\r\n }\r\ndocument.getElementById('lives').innerHTML = \"Lives: \"+lives;\r\n imgMistake.src=\"img/mistakes/mistake0.png\";\r\n if(gameDiff==0) //if was choosen difficulty easy\r\n { document.getElementById(\"difshowdurgam\").innerHTML=\"Difficulty: Easy\"\r\n if(gameCat==0) //if was choosen category animals\r\n {\r\n random = Math.floor(Math.random()*easyAnimals.length); //generate random word from field easyAnimals\r\n word = easyAnimals[random]; //save random word from field easyAnimals to var word\r\n console.log(word);\r\n document.getElementById(\"catshowdurgam\").innerHTML=\"Category: Animals\";\r\n }else if(gameCat==1) //if was choosen category cities\r\n {\r\n random = Math.floor(Math.random()*easyCities.length); //generate random word from field easyCities \r\n word = easyCities[random]; //save random word from field easyCities to var word\r\n console.log(word);\r\n document.getElementById(\"catshowdurgam\").innerHTML=\"Category: Cities\";\r\n }\r\n \r\n }else if(gameDiff==1) //if was choosen difficulty hard\r\n {document.getElementById(\"difshowdurgam\").innerHTML=\"Difficulty: Hard\"\r\n if(gameCat==0) //if was choosen category animals\r\n {document.getElementById(\"catshowdurgam\").innerHTML=\"Category: Animals\";\r\n random = Math.floor(Math.random()*hardAnimals.length); //generate random word from field hardAnimals \r\n word = hardAnimals[random]; //save random word from field hardAnimals to var word\r\n console.log(word);\r\n document.getElementById('lives').innerHTML = \"Lives: \"+lives; //print lives\r\n }else if(gameCat==1) //if was choosen category cities\r\n {document.getElementById(\"catshowdurgam\").innerHTML=\"Category: Cities\";\r\n random = Math.floor(Math.random()*hardCities.length); //generate random word from field hardCities \r\n word = hardCities[random]; //save random word from field easyCities to var word\r\n console.log(word);\r\n document.getElementById('lives').innerHTML = \"Lives: \"+lives; //print lives\r\n }\r\n } \r\n document.getElementById('score').innerHTML = \"Score: \"+score; // print score\r\n document.getElementById(\"lives\").innerHTML=\"Lives: \"+lives; //print lives\r\n document.getElementById(\"gWord\").innerHTML= s;\r\n \r\n for(var i = 0; i<word.length;i++) //browse word length\r\n {\r\n answerArray[i]=\"<span style='color:#cd6a02;'>_</span>\"; //write underlines exact position\r\n }\r\n var s=answerArray.join(\" \"); //insert between underlines space\r\n document.getElementById(\"gWord\").innerHTML= s; //write on screen underlines\r\n \r\n document.getElementById('btnHint').style.display = \"block\"; //show hint button\r\n \r\n document.getElementById('hintSentence').style.display = \"none\"; //hide previously hintSentence\r\n \r\n}", "title": "" }, { "docid": "c02d5ce6095415ddd91648d5f0f53eef", "score": "0.55297333", "text": "function theAnswers(){\n if (convertedUserInput === 'yes' || convertedUserInput === 'y') {\n //console.log('Great, keep going :)\\nPlease click OK for the next question:');\n alert('Great, keep going :).\\nYou got ' + ++correctAnswerCounter + ' points\\nPlease click OK for the next question:');\n // correctAnswerCounter++;\n index++;\n } else if (convertedUserInput === 'no' || convertedUserInput === 'n') {\n //console.log('You should try harder to know Ahmad well\\nPlease click OK for the next question:');\n alert('You should try harder to know Ahmad well\\nPlease click OK for the next question:');\n index++;\n } else if (wrongeAnswerCounter == 3) {\n alert('You wrote 3 wrong answers!, No hell you have knew Ahmad before\\nYou can Try again');\n wrongeAnswerCounter = 0;\n }\n}", "title": "" }, { "docid": "da8dafc2ec1b9aa0ca0aa5552cc84f40", "score": "0.55272204", "text": "function questions() {\n\n\t\t$(\"#Ans\").hide();\n\n\t\t$(\"#Qs\").show();\n\n\t\tanswered = true;\n\n\t\t// Prints Question from Array\n\n\t\t$(\".question\").html(triviaQuestions[currentQ].question);\n\n\n\n\t\t// -----------------------------------------\n\n\t\t//Loops through possible choices and appends\n\n\t\t// -----------------------------------------\n\n\t\tfor (var i = 0; i <= 7; i++) {\n\n\t\t\tvar list = $(\"<div>\");\n\n\t\t\tlist.text(triviaQuestions[currentQ].choices[i]);\n\n\t\t\tlist.attr({\"data-index\": i });\n\n\t\t\tlist.addClass(\"thisChoice\");\n\n\t\t\t$(\".choices\").append(list);\n\n\t\t}\n\n\n\n\t\t//Calls Timer\n\n\t\tcountdown();\n\n\n\n\t\t// USERCLICK\n\n\t\t$(\".thisChoice\").on(\"click\",function(){\n\n\t\t\tuserChoice = $(this).data(\"index\");\n\n\t\t\tclearInterval(time);\n\n\t\t\tshoAnswer();\n\n\t\t});\n\n\t}", "title": "" }, { "docid": "9ca530bcc867eee5a5bd0f7e45bd23e0", "score": "0.5524552", "text": "function Qus1(Qus1_b) {\n if (Qus1_b.toLowerCase() === 'yes' || Qus1_b.toLowerCase() === 'y') {\n alert('you are correct');\n score++\n scoreA[arr_index++] = 'your answer was correct'\n } else if (Qus1_b.toLowerCase() === 'no' || Qus1_b.toLowerCase() === 'n') {\n alert('wrong answer, I do like it')\n scoreA[arr_index++] = 'your answer was Wrong'\n }\n\n}", "title": "" }, { "docid": "b0af3a6f3ed764132a7ad43ad81ecd2d", "score": "0.55241156", "text": "function whatQuestions() {\n questions = questionsSet[Math.floor(Math.random() * questionsSet.length)];\n if (setsPlayed.includes(questions)) {\n whatQuestions();\n } else {\n setsPlayed.push(questions);\n game();\n }\n}", "title": "" } ]
426081d70e1bd796e42fa3e91f3d02c8
returns true if obj is a Date object.
[ { "docid": "91ba1aefddd8432ef5155e87c4d71568", "score": "0.8969327", "text": "function isDate(obj) {\n return (obj instanceof Date);\n }", "title": "" } ]
[ { "docid": "6dbd12af09242e058a8a86d2d17b37c6", "score": "0.88137907", "text": "function isDate(obj) {\n return obj instanceof Date;\n}", "title": "" }, { "docid": "b01b5dee851cf0dd23446cea777619d0", "score": "0.8628407", "text": "function isDate(obj) {\n return Object.prototype.toString.call(obj) === '[object Date]';\n}", "title": "" }, { "docid": "44dac2b845d7339037f82b6c1271a361", "score": "0.78045017", "text": "function isDate(d) {\n return isObjectLike(d) && Object.prototype.toString.call(d) === '[object Date]';\n}", "title": "" }, { "docid": "df311d254a3bc6e130dc1a887d42f537", "score": "0.7803407", "text": "function isDate(value) {\n return isObject(value) && instanceOf(value, Date);\n}", "title": "" }, { "docid": "6336a8bfb474db47b9cb5346fd3dfb60", "score": "0.777213", "text": "static isDate(value) { return value instanceof Date; }", "title": "" }, { "docid": "6336a8bfb474db47b9cb5346fd3dfb60", "score": "0.777213", "text": "static isDate(value) { return value instanceof Date; }", "title": "" }, { "docid": "5eb40d54b3d7ee91a3e6fe2db0c901d4", "score": "0.7646531", "text": "function isDate$1(d) {\n return _typeof(d) === 'object' && Object.prototype.toString.call(d) === '[object Date]';\n}", "title": "" }, { "docid": "0f144f1d5a735e2ecbd71567814630d6", "score": "0.7550074", "text": "function checkValidDate(dateObj) {\n if (Object.prototype.toString.call(dateObj) === \"[object Date]\") {\n // it is a date\n if (isNaN(dateObj.getTime())) {\n return false;\n }\n else {\n return true;\n }\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "3c5d23181e376ba13fb6c77d89f491af", "score": "0.75296646", "text": "function isPrimativeOrDate(obj) {\n return obj === null || obj === undefined || obj.constructor === String || obj.constructor === Number || obj.constructor === Boolean || obj instanceof Date;\n }", "title": "" }, { "docid": "8e81772b14c10305482a930046499cce", "score": "0.7444433", "text": "function isDate (value) {\n // return toString(value) === '[object Date]';\n return value instanceof Date;\n}", "title": "" }, { "docid": "25b6ef49982109717cc3c58bd788ea96", "score": "0.7425644", "text": "function isDate(value) {\n return toString.call(value) === '[object Date]';\n}", "title": "" }, { "docid": "2c72f775411d8c54e2ac8de66798085d", "score": "0.74111867", "text": "function isDate(value) {\r\n return getType(value) === \"[object Date]\";\r\n}", "title": "" }, { "docid": "2c72f775411d8c54e2ac8de66798085d", "score": "0.74111867", "text": "function isDate(value) {\r\n return getType(value) === \"[object Date]\";\r\n}", "title": "" }, { "docid": "83294f4fa7ef1311a8e4cf569688b475", "score": "0.7378961", "text": "function isDate(d) { return Object.prototype.toString.call(d) === '[object Date]' && !isNaN(d.valueOf()) }", "title": "" }, { "docid": "60c213f98fdc04bda60804ec3d6c0a42", "score": "0.7357091", "text": "function isDate(date) {\n\treturn Object.prototype.toString.call(date) === \"[object Date]\";\n}", "title": "" }, { "docid": "60c213f98fdc04bda60804ec3d6c0a42", "score": "0.7357091", "text": "function isDate(date) {\n\treturn Object.prototype.toString.call(date) === \"[object Date]\";\n}", "title": "" }, { "docid": "60c213f98fdc04bda60804ec3d6c0a42", "score": "0.7357091", "text": "function isDate(date) {\n\treturn Object.prototype.toString.call(date) === \"[object Date]\";\n}", "title": "" }, { "docid": "258acdf34b8b4a78f0d86ecdb5c68e1e", "score": "0.72693986", "text": "function isDate(date) {\n return Object.prototype.toString.call(date) === \"[object Date]\";\n}", "title": "" }, { "docid": "d5f6a6b9252a62ecdbadcd3d118b5d7d", "score": "0.7242078", "text": "function isValidDateObj(d) {\n return (d instanceof Date) && !!(d.getTime) && !isNaN(d.getTime());\n }", "title": "" }, { "docid": "fd8b2bbedbef16a57a48ef7d1e6e9f22", "score": "0.7201274", "text": "function date (data) {\n try {\n return instance(data, Date) && integer(data.getTime());\n } catch (error) {\n return false;\n }\n }", "title": "" }, { "docid": "fd8b2bbedbef16a57a48ef7d1e6e9f22", "score": "0.7201274", "text": "function date (data) {\n try {\n return instance(data, Date) && integer(data.getTime());\n } catch (error) {\n return false;\n }\n }", "title": "" }, { "docid": "c2c9c76af17d8a21054a63712213cc50", "score": "0.71100074", "text": "function isDate(value) {\n return value instanceof Date && !isNaN(value.getTime());\n }", "title": "" }, { "docid": "a167b5c4445768924ccb6380a6758350", "score": "0.70548064", "text": "function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}", "title": "" }, { "docid": "a167b5c4445768924ccb6380a6758350", "score": "0.70548064", "text": "function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}", "title": "" }, { "docid": "a167b5c4445768924ccb6380a6758350", "score": "0.70548064", "text": "function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}", "title": "" }, { "docid": "6487e2779e72033681d0542b9ba27822", "score": "0.6821221", "text": "static date(value)\n {\n return value instanceof Date;\n }", "title": "" }, { "docid": "0459c1e903765f52cf0a89034ea50dc2", "score": "0.6779064", "text": "function isDate(n) {\n return moment(n, moment.ISO_8601).isValid();\n }", "title": "" }, { "docid": "0c5863bc0948e5c60f0c7b189e495abd", "score": "0.67584455", "text": "function exports(val) {\n\t return objToStr(val) === '[object Date]';\n\t }", "title": "" }, { "docid": "f49c97709f1d05f5f16bd7eb797def0b", "score": "0.67457545", "text": "function isDate(vInput) {\n let bIsDate = false;\n \n if (Object.prototype.toString.call(vInput) === '[object Date]') {\n bIsDate = true;\n } // end if\n \n return bIsDate;\n}", "title": "" }, { "docid": "f49c97709f1d05f5f16bd7eb797def0b", "score": "0.67457545", "text": "function isDate(vInput) {\n let bIsDate = false;\n \n if (Object.prototype.toString.call(vInput) === '[object Date]') {\n bIsDate = true;\n } // end if\n \n return bIsDate;\n}", "title": "" }, { "docid": "cd8deb70f0329c074db0664e1cd755f9", "score": "0.67052585", "text": "function canFormat(value) {\n var result = value instanceof Date;\n return result;\n }", "title": "" }, { "docid": "c04b657d35d666f18b90c37775294da7", "score": "0.6643844", "text": "function isDate(d) {\n if (Object.prototype.toString.call(d) === \"[object Date]\") {\n // it is a date\n if (isNaN(d.getTime())) { // d.valueOf() could also work\n // date is not valid\n return 0;\n }\n else {\n // date is valid\n return 1;\n }\n }\n else {\n // not a date\n return 0;\n }\n}", "title": "" }, { "docid": "1bc14eb5a94c01457ecddfe793652854", "score": "0.65990543", "text": "function isDate(str) {\n return /^\\d\\d\\d\\d-\\d\\d-\\d\\d$/.test(str);\n}", "title": "" }, { "docid": "78152fef9fe205b0f8a9aa97d0b434b7", "score": "0.6573978", "text": "function isDate(str) {\r\n if (str == null || str.length == 0) {\r\n return true;\r\n }\r\n return validateFormat(REG_DATE_STRICT, str);\r\n}", "title": "" }, { "docid": "7cf9b9aced6ef8a9ba132177efc6d0d7", "score": "0.6559741", "text": "function date (data) {\n\t return builtIn(data, Date) && ! isNaN(data.getTime());\n\t }", "title": "" }, { "docid": "5d73eebfe650b1eeccbc486d0f30de0a", "score": "0.65512604", "text": "function is_date(value) {\n var val = parseFloat(value);\n // complicated logic but evaluates to true if NOT number format.\n // In this case that means we have a date.\n return !(!isNaN(value) && (val | 0) === val);\n}", "title": "" }, { "docid": "22311e06d7368594bf4cddee9021c00c", "score": "0.651229", "text": "function isDate(value) {\n if (value instanceof Date) {\n return true;\n } else if (isString(value)) {\n // test whether this string contains a date\n var match = ASPDateRegex.exec(value);\n\n if (match) {\n return true;\n } else if (!isNaN(Date.parse(value))) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4674b35adc2371d2913d048ee3566e0d", "score": "0.6479562", "text": "_isDataOfTypeDate(data) {\n let dateTypes = [\"date\", \"datetime\", \"datetime-local\", \"timestamp\"];\n let type = this._getType(data);\n return dateTypes.indexOf(type) > -1;\n }", "title": "" }, { "docid": "e975306854a9b3afb5c9ed1c193397ce", "score": "0.6478652", "text": "function datifyObject(obj) {\n for (const field in obj) {\n\t// apparently '!' has higher precedence than instanceof, so extra parens are needed\n if ((typeof obj[field] === \"object\") && (! (obj[field] instanceof Date))) {\n\t datifyObject(obj[field]);\n\t} else if ((typeof obj[field] === \"string\") &&\n\t\t ((field.startsWith(\"date\") || field.startsWith(\"time\") ||\n\t\t field.endsWith(\"Date\") || field.endsWith(\"Time\"))))\n\t{\n\t if (Date.parse(obj[field])) { // valid date string (o/w returns NaN, which evaluates false)\n\t\tobj[field] = new Date(obj[field]);\n\t }\n\t} // else do nothing\n }\n}", "title": "" }, { "docid": "775803eb6c996327bbb31653c1240137", "score": "0.64336383", "text": "function isDate(value) {\n if (value instanceof Date) {\n return true;\n }\n else if (isString(value)) {\n // test whether this string contains a date\n const match = ASPDateRegex.exec(value);\n if (match) {\n return true;\n }\n else if (!isNaN(Date.parse(value))) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8c260ab42f8c6ead9a223c5b7272872c", "score": "0.64265066", "text": "function date(value) {\n return moment(value).isValid() || value instanceof Date;\n}", "title": "" }, { "docid": "6e9d2b411a9aca4a74d5cc18a770087f", "score": "0.6413887", "text": "function isDate(val,format) {\n\tvar date=getDateFromFormat(val,format);\n\tif (date==0) { return false; }\n\treturn true;\n\t}", "title": "" }, { "docid": "05a8935a386691f4e159cb15d3d2c93a", "score": "0.6393618", "text": "function isDate(val,format) {\n\tvar date=getDateFromFormat(val,format);\n\tif (date==0) { return false; }\n\treturn true;\n}", "title": "" }, { "docid": "75baee080e5f17c82424248a12de25de", "score": "0.62720984", "text": "function isDate(val, format) {\r\n\tvar date = getDateFromFormat(val, format);\r\n\tif (date == 0) { return false; }\r\n\treturn true;\r\n}", "title": "" }, { "docid": "2af422cca746b86f8a5af72a9e8490c6", "score": "0.6220351", "text": "function isObject(value) {\n // YOUR CODE BELOW HERE //\n \n if(typeof value === \"object\" && Array.isArray(value) !== true && value !== null && value instanceof Date !== true){\n return true\n } else {\n return false}\n \n \n // YOUR CODE ABOVE HERE //\n}", "title": "" }, { "docid": "5de98644fbcb86217ec66e5753b00c01", "score": "0.6213774", "text": "function isValidDate(d) {\n \tif ( Object.prototype.toString.call(d) !== \"[object Date]\" )\n \treturn false;\n \treturn !isNaN(d.getTime());\n }", "title": "" }, { "docid": "6ba1a49d4f3b9b1d089044688156025f", "score": "0.6123683", "text": "function IsDate(strDate) {\n\tvar partOfDate = strDate.split(\"/\")\n\tvar d = partOfDate[0]\n\tvar m = partOfDate[1] - 1\t\n\tvar y = partOfDate[2]\n\tvar objDate = new Date(y, m, d)\n\tif (d != objDate.getDate() || m != objDate.getMonth() || y != objDate.getFullYear()) return false\n\telse {\n\t\tif (objDate.getFullYear() > 1850 && objDate.getFullYear() < 2079) return true\n\t\telse return false\n\t}\n}", "title": "" }, { "docid": "7395c40b96a8fd68979e22ca6b9a493c", "score": "0.6112867", "text": "isDate(date) {\n return /([\\d]{2})[ /-]([\\d]{2})[ /-]([\\d]{4})/.test(date);\n }", "title": "" }, { "docid": "c49683f602a6168cff7a94bb97d423f3", "score": "0.61004555", "text": "function isDate(strYear,strMonth,strDay){\r\n\tif (typeof(strYear)!='string' || typeof(strMonth)!='string' || typeof(strDay)!='string'){\r\n\t\treportError(L_errFuncParaTypeMissMatch_ErrMsg,\"isDate\")\r\n\t\treturn false;\r\n\t}\r\n\tvar iYear = strYear * 1\r\n\tvar iMonth = strMonth * 1\r\n\tvar iDay = strDay * 1\r\n\tif (isNaN(iYear) || isNaN(iMonth) || isNaN(iDay)){\r\n\t\treturn false;\r\n\t}\r\n\tif (iYear<1000 || iYear>9999)\r\n\t\treturn false;\r\n\tif (iMonth<1 || iMonth>12)\r\n\t\treturn false;\r\n\tif (iDay<1 || iDay>31)\r\n\t\treturn false;\r\n\tvar strDate = iMonth+\"/\"+iDay+\"/\"+iYear\r\n\tvar objDate = new Date(strDate)\r\n\tiYear = objDate.getFullYear()\r\n\tiMonth = objDate.getMonth()+1\r\n\tiDay = objDate.getDate()\r\n\tif (strDate!=(iMonth+\"/\"+iDay+\"/\"+iYear))\r\n\t\treturn false;\r\n\treturn true;\t\r\n}", "title": "" }, { "docid": "bce4866cd7b0dfc96282cd5b2361afae", "score": "0.6097144", "text": "getValidDateOrNull(obj) {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }", "title": "" }, { "docid": "bce4866cd7b0dfc96282cd5b2361afae", "score": "0.6097144", "text": "getValidDateOrNull(obj) {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }", "title": "" }, { "docid": "bce4866cd7b0dfc96282cd5b2361afae", "score": "0.6097144", "text": "getValidDateOrNull(obj) {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }", "title": "" }, { "docid": "bce4866cd7b0dfc96282cd5b2361afae", "score": "0.6097144", "text": "getValidDateOrNull(obj) {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }", "title": "" }, { "docid": "bce4866cd7b0dfc96282cd5b2361afae", "score": "0.6097144", "text": "getValidDateOrNull(obj) {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }", "title": "" }, { "docid": "2e60c48244a1b3f75a4c3ea1332d0da1", "score": "0.6037295", "text": "function isValidDate(d) {\n return d instanceof Date && !isNaN(d);\n}", "title": "" }, { "docid": "2e60c48244a1b3f75a4c3ea1332d0da1", "score": "0.6037295", "text": "function isValidDate(d) {\n return d instanceof Date && !isNaN(d);\n}", "title": "" }, { "docid": "003b6135560c1f5fcce225de6a90b4aa", "score": "0.6002709", "text": "function isDate(date_string,format_string) {\n\tvar date=getDateFromFormat(date_string,format_string);\n\tif (date==0) { return false; }\n\treturn true;\n}", "title": "" }, { "docid": "c2b02eea0c79206acba324c4b92e7ff1", "score": "0.59837604", "text": "function isValidDate(d) {\n if ( Object.prototype.toString.call(d) !== \"[object Date]\" )\n return false;\n return !isNaN(d.getTime());\n}", "title": "" }, { "docid": "494107bd93c2ebef7bb6ccd7658383d1", "score": "0.5968567", "text": "function checkDate(value) {\n\n if (value === null ||\n value.trim() === \"\") {\n return false;\n }\n\n if (value.trim().length !== 10) {\n return false;\n }\n\n const day = parseInt(value.substring(0, 2));\n const month = parseInt(value.substring(3, 5)) - 1;\n const year = parseInt(value.substring(6, 10));\n\n const date = new Date(year, month, day);\n\n if (date.getDate() === day && \n date.getMonth() === month &&\n date.getFullYear() === year) {\n return true;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f365f37d6ac6c34e4eb254300b57e2b6", "score": "0.5915514", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "7ad49264e77f6ac020f184a2a0030310", "score": "0.59136456", "text": "function is( obj, type ) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "f0c68a8c85b349b63fa0ce3036cebd83", "score": "0.59108275", "text": "function isDate(txtDate){\n\t var currVal = txtDate;\n\t if(currVal == '')\n\t return false;\n\t \n\t //Declare Regex \n\t var rxDatePattern = /^(\\d{1,2})(\\/|-)(\\d{1,2})(\\/|-)(\\d{4})$/; \n\t var dtArray = currVal.match(rxDatePattern); // is format OK?\n\n\t if (dtArray == null)\n\t return false;\n\t \n\t //Checks for mm/dd/yyyy format.\n\t dtMonth = dtArray[1];\n\t dtDay= dtArray[3];\n\t dtYear = dtArray[5];\n\n\t if (dtMonth < 1 || dtMonth > 12)\n\t return false;\n\t else if (dtDay < 1 || dtDay> 31)\n\t return false;\n\t else if ((dtMonth==4 || dtMonth==6 || dtMonth==9 || dtMonth==11) && dtDay ==31)\n\t return false;\n\t else if (dtMonth == 2)\n\t {\n\t var isleap = (dtYear % 4 == 0 && (dtYear % 100 != 0 || dtYear % 400 == 0));\n\t if (dtDay> 29 || (dtDay ==29 && !isleap))\n\t return false;\n\t }\n\t return true;\n\t}", "title": "" }, { "docid": "8bf160c31f1f5378cb3c07a02266ec9f", "score": "0.5891935", "text": "function is(obj, type) {\n return typeof obj === type;\n }", "title": "" }, { "docid": "8c2a158debdaaada2a45e009ab0cd34d", "score": "0.5860482", "text": "function isDate(strValue) \r\n{\r\n var part = strValue.split('-');\r\n if (part.length != 3) return false;\r\n var y = parseInt(part[0]);\r\n var m = parseInt(part[1]);\r\n var d = parseInt(part[2]);\r\n var validDate = m + '/' + d + '/' + y;\r\n \r\n return (Date.parse(validDate) > 0); \r\n}", "title": "" }, { "docid": "51cb5bbe900ea07dfb6f932c081fa7e7", "score": "0.58521146", "text": "function dataTypeIsDate(type) {\n return specif.dataTypes.some(function (entry) {\n if (entry.id === type && entry.type === \"xs:dateTime\")return true\n })\n }", "title": "" }, { "docid": "85a9119b7aa8c6fbc989ae90a895da79", "score": "0.58410627", "text": "checkIfDateIsValid(d) {\n if (Object.prototype.toString.call(d) === \"[object Date]\") {\n // it is a date\n if (isNaN(d.getTime())) { // d.valueOf() could also work\n // date is not valid\n return ('Datum ist nicht im Format TT. MM. YYYY!')\n } else {\n // date is valid\n return true\n }\n } else {\n if (Object.prototype.toString.call(d) === \"[object Date]\" || Object.prototype.toString.call(d) === \"[object String]\") {\n // date is valid\n return true\n } else {\n // It is not a date\n return ('Datum fehlt!')\n }\n }\n }", "title": "" }, { "docid": "545bf3be4142ae2c9bf6569caa13ef80", "score": "0.58393073", "text": "function isDate(str) {\n\tif (isEmpty(str))\n\t\treturn false;\n\n\tif(str.length == 8) {\n\t\treturn isDateYMD(str.substr(0,4), str.substr(4,2), str.substr(6,2));\n\t}\n\telse {\n\t\tvar arr = new Array();\n\t\tif(str.indexOf(\"-\") > 0) {\n\t\t\tarr = str.toString().split(\"-\");\n\t\t}\n\t\telse if(str.indexOf(\"/\") > 0) {\n\t\t\tarr = str.toString().split(\"/\");\n\t\t}\n\t\telse if(str.indexOf(\".\") > 0) {\n\t\t\tarr = str.toString().split(\".\");\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(arr.length == 3) {\n\t\t\tif(arr[0].length == 4) {\n\t\t\t\treturn isDateYMD(arr[0], arr[1], arr[2]);\n\t\t\t}\n\t\t\tif(arr[2].length == 4) {\n\t\t\t\treturn isDateYMD(arr[2], arr[0], arr[1]);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "1f99525a8e6a025bb4a8bb42a8f72775", "score": "0.5838023", "text": "function isValid(date) {\r\n return typeof date !== 'undefined' && date !== null && date.getTime && !isNaN(date.getTime());\r\n}", "title": "" }, { "docid": "14159fe0d16fc2a9ce7d1b6fd3069c85", "score": "0.5791029", "text": "function isValidDate(date) {\n return typeof(date.getDate) == 'function' &&\n typeof(date.getMonth) == 'function' &&\n typeof(date.getFullYear) == 'function' &&\n typeof(date.getDate()) == 'number' &&\n typeof(date.getMonth()) == 'number' &&\n typeof(date.getFullYear()) == 'number' &&\n !isNaN(date.getDate()) &&\n !isNaN(date.getMonth()) &&\n !isNaN(date.getFullYear())\n }", "title": "" }, { "docid": "c4aaec4a23b0c65bb0c9d48439fe754d", "score": "0.57799023", "text": "function isDatumConvertableToDate(datum) {\r\n\t\treturn !isNaN((new Date(datum)).getTime());\r\n\t}", "title": "" }, { "docid": "f33bbdc34f878083ffbc674a39f5c96e", "score": "0.5765157", "text": "function instanceOfDate() {\n var unixTimestampMsDelegate = number_1.finiteNumber();\n return function (name, mixed) {\n if (!(mixed instanceof Date)) {\n throw error_util_1.makeMappingError({\n message: name + \" must be instance of Date; received \" + type_util_1.toTypeStr(mixed),\n inputName: name,\n actualValue: mixed,\n expected: \"Date\",\n expectedMeta: {\n errorCode: error_code_1.ErrorCode.EXPECTED_TYPE,\n },\n });\n }\n var unixTimestampMs = mixed.getTime();\n unixTimestampMsDelegate(name + \".getTime()\", unixTimestampMs);\n return mixed;\n };\n}", "title": "" }, { "docid": "310a71c79b88b1d3e6f431896ab79125", "score": "0.5763118", "text": "function ew_CheckDate(object_value) {\n\treturn ew_CheckDateEx(object_value, \"std\", EW_DATE_SEPARATOR);\n}", "title": "" }, { "docid": "310a71c79b88b1d3e6f431896ab79125", "score": "0.5763118", "text": "function ew_CheckDate(object_value) {\n\treturn ew_CheckDateEx(object_value, \"std\", EW_DATE_SEPARATOR);\n}", "title": "" }, { "docid": "310a71c79b88b1d3e6f431896ab79125", "score": "0.5763118", "text": "function ew_CheckDate(object_value) {\n\treturn ew_CheckDateEx(object_value, \"std\", EW_DATE_SEPARATOR);\n}", "title": "" }, { "docid": "586fabde340f4d0c759c276c101ec5b3", "score": "0.574983", "text": "function isDate(str){\n var re = /^(\\d{1,2})[\\s\\.\\/-](\\d{1,2})[\\s\\.\\/-](\\d{4})$/\n if (!re.test(str)) return false;\n var result = str.match(re);\n var m = parseInt(result[1]);\n var d = parseInt(result[2]);\n var y = parseInt(result[3]);\n if(m < 1 || m > 12 || y < 1900 || y > 2100) return false;\n if(m == 2){\n var days = ((y % 4) == 0) ? 29 : 28;\n }else if(m == 4 || m == 6 || m == 9 || m == 11){\n var days = 30;\n }else{\n var days = 31;\n }\n return (d >= 1 && d <= days);\n}", "title": "" }, { "docid": "8f59f758c7451a79cae93876585c107c", "score": "0.57430506", "text": "function isObject(obj) {\n return typeof obj === 'object';\n }", "title": "" }, { "docid": "376ec0c492d5fc472566548dfec991cc", "score": "0.5735573", "text": "function isObj(obj) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n}", "title": "" }, { "docid": "a1e06ef5f5d1ef4f1b0d56b0cec1e912", "score": "0.57243115", "text": "function isDate(str){\r\r\n //var re = /^(\\d{1,2})[\\s\\.\\/-](\\d{1,2})[\\s\\.\\/-](\\d{4})$/\r\r\n var re = /^(\\d{4})[-\\s\\.\\/](\\d{1,2})[-\\s\\.\\/](\\d{1,2})$/\r\r\n if (!re.test(str)) return false;\r\r\n var result = str.match(re);\r\r\n var y = parseInt(result[1]);\r\r\n var m = parseInt(result[2]);\r\r\n var d = parseInt(result[3]);\r\r\n if(m < 1 || m > 12 || y < 1900 || y > 2100) return false;\r\r\n if(m == 2){\r\r\n var days = ((y % 4) == 0) ? 29 : 28;\r\r\n }else if(m == 4 || m == 6 || m == 9 || m == 11){\r\r\n var days = 30;\r\r\n }else{\r\r\n var days = 31;\r\r\n }\r\r\n return (d >= 1 && d <= days);\r\r\n}", "title": "" }, { "docid": "c6c220b4858707d55c45d8009e07c881", "score": "0.56873345", "text": "function isObject(obj) {\n return (typeof obj === \"object\");\n }", "title": "" }, { "docid": "b593ee0f6690fd8ef49276cdf7b6fd29", "score": "0.56845784", "text": "function csv_FormatDate(obj)\r\n{\r\n thisdate = parseDate2(obj);\r\n\r\n if (!thisdate)\r\n return csv_Clear('Date is not valid or is empty',obj);\r\n\r\n return true;\r\n}", "title": "" }, { "docid": "ccc9e660a21483dbd00fb7defde01c05", "score": "0.56829727", "text": "function isObject( obj ) {\n return 'object' === typeof( obj );\n }", "title": "" }, { "docid": "82bc1a6383fa27c8eb45c08bdb264850", "score": "0.56587684", "text": "function isObject(obj) {\n return obj instanceof Object;\n }", "title": "" } ]
5861fa860ca5e57c393a3cf64cbe3443
Remove transition animations for the given element
[ { "docid": "f84f90751e804caa7ea046cbfb54c0ab", "score": "0.777688", "text": "function removeAnimation(element){\n return element.addClass('fp-notransition');\n }", "title": "" } ]
[ { "docid": "38a4aaf4aec7cf320c8d665ec4f4ed43", "score": "0.7839921", "text": "function removeAnimation(element){\n return element.addClass(NO_TRANSITION);\n }", "title": "" }, { "docid": "91219a7124c5fe9dce67effc60f2b9eb", "score": "0.7763061", "text": "function removeAnimation(element){\r\n return element.addClass(NO_TRANSITION);\r\n }", "title": "" }, { "docid": "91219a7124c5fe9dce67effc60f2b9eb", "score": "0.7763061", "text": "function removeAnimation(element){\r\n return element.addClass(NO_TRANSITION);\r\n }", "title": "" }, { "docid": "91219a7124c5fe9dce67effc60f2b9eb", "score": "0.7763061", "text": "function removeAnimation(element){\r\n return element.addClass(NO_TRANSITION);\r\n }", "title": "" }, { "docid": "91219a7124c5fe9dce67effc60f2b9eb", "score": "0.7763061", "text": "function removeAnimation(element){\r\n return element.addClass(NO_TRANSITION);\r\n }", "title": "" }, { "docid": "bacd2aa6d53eb66507bde489a634a8fb", "score": "0.75784427", "text": "function removeTransition(e) {\n\tif (e.propertyName !== 'transform') return;\n\te.target.classList.remove('playing');\n}", "title": "" }, { "docid": "674d46cb4181f5a705d058484c14bf1c", "score": "0.7517969", "text": "function removeTransition(e) {\n if (e.propertyName !== \"transform\") return;\n this.classList.remove(\"playing\");\n}", "title": "" }, { "docid": "b89dd8fba6e1f9f50d19bf7a3bf82461", "score": "0.7508461", "text": "function removeTransition(e) {\n if (e.propertyName !== \"transform\") return;\n this.classList.remove(\"oprime\");\n}", "title": "" }, { "docid": "192b6f0877b9c252c5a0b8b54cd29ae0", "score": "0.7463027", "text": "function removeAnimation(element){\n return addClass(element, NO_TRANSITION);\n }", "title": "" }, { "docid": "ae1151c55a25b07c037974ef81883538", "score": "0.7334381", "text": "function removeTransition(e){\r\n e.target.classList.remove('playing')\r\n }", "title": "" }, { "docid": "086661f6e3b0ca24db415221f7d312d1", "score": "0.7310005", "text": "function removeTransition(event){\n if (event.propertyName !== 'transform') return;\n event.target.classList.remove('playing');\n}", "title": "" }, { "docid": "4ac34fbe39e063699d343761ebe39406", "score": "0.7309481", "text": "function removeTransition(e)\n{ if(e.propertyName !== 'transform') return ; //Stop if its not transform\nthis.classList.remove('playing');\n}", "title": "" }, { "docid": "c494e09ed2527f0e3eb3d28a52cd35d7", "score": "0.72902644", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "c494e09ed2527f0e3eb3d28a52cd35d7", "score": "0.72902644", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "c494e09ed2527f0e3eb3d28a52cd35d7", "score": "0.72902644", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "c494e09ed2527f0e3eb3d28a52cd35d7", "score": "0.72902644", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "0fec95478c37d3ec6c9ee4e04c5ff699", "score": "0.72839963", "text": "function removeTransition(e) {\n if (e.propertyName !== 'transform') return;\n e.target.classList.remove('playing'); //this removes the the .playing from the class\n}", "title": "" }, { "docid": "ddf8e13274138265559cb9f720707f2d", "score": "0.727875", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(`${initClass} ${activeClass} ${animation}`);\n }", "title": "" }, { "docid": "4e2b776da71ff3273dacb8ba0089e40f", "score": "0.724787", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "4e2b776da71ff3273dacb8ba0089e40f", "score": "0.724787", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "4e2b776da71ff3273dacb8ba0089e40f", "score": "0.724787", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "4e2b776da71ff3273dacb8ba0089e40f", "score": "0.724787", "text": "function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }", "title": "" }, { "docid": "2e1456cf10ea5f53b64b82337c5e393b", "score": "0.72398514", "text": "function removeTransition(event) {\n if (event.propertyName !== \"transform\") return; // skip if it isn't transform\n this.classList.remove(\"playing\");\n }", "title": "" }, { "docid": "8252d3e03e8059c7add6fd075b53b98e", "score": "0.72227323", "text": "function removeTransition(event) {\r\n\tif (event.propertyName !== 'transform') return; //skip it if it's not a transform\r\n\tthis.classList.remove('playing');\r\n}", "title": "" }, { "docid": "a36bebf6be68eb5d32f7baf9b7255c3d", "score": "0.71830845", "text": "function removeTransition(event) {\n if (event.propertyName !== \"transform\") return; //skips, if not a transform\n this.classList.remove(\"playing\");\n}", "title": "" }, { "docid": "30e318d7917e8196a8463194af5b3ab0", "score": "0.7131275", "text": "function removeAnimation(){\n corn.removeClass('smooth-transition');\n currentClicked.removeClass('animated bounce');\n}", "title": "" }, { "docid": "a53a6ef8161a19f5273dd6d3825e0978", "score": "0.7051952", "text": "function removeTransition(e) {\n if (e.propertyName !== 'transform') return //ends function if the key is not transformed\n this.classList.remove('playing') //'this' specifies the object we are targeting within the function. Same as coding e.target.classList.remove('playing')\n}", "title": "" }, { "docid": "ae794a6e62a4d3b217dd55301fba5e3b", "score": "0.7001042", "text": "function removeTransition(event) {\n if (event.propertyName !== 'transform') return; //skip if its not a transform property\n this.classList.remove('active'); \n \n}", "title": "" }, { "docid": "9ba885174b29d730d28c4671c7a1691d", "score": "0.6908432", "text": "function removetransition(e) {\n key.classList.remove('playing');\n }", "title": "" }, { "docid": "4fb1765491088a2f736a9da8f1c1f797", "score": "0.69056475", "text": "function remove_animation (firefly_object_ref) {\n firefly_object_ref.style.animationName = null;\n firefly_object_ref.style.animationIterationCount = null;\n firefly_object_ref.style.animationDuration = null;\n }", "title": "" }, { "docid": "6a2025af3b2108ec6b710b8164cf94d7", "score": "0.6900903", "text": "function removeTransition(e) {\r\n \r\n // look only for the key that has transform property, if it has not skip it\r\n if( e.propertyName !== \"transform\") return;\r\n\r\n // remove the class playing\r\n this.classList.remove('playing');\r\n }", "title": "" }, { "docid": "29b1aee90c4108ea27787e2f5c902425", "score": "0.68605524", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: '_md-leave'}).start();\n }", "title": "" }, { "docid": "29b1aee90c4108ea27787e2f5c902425", "score": "0.68605524", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: '_md-leave'}).start();\n }", "title": "" }, { "docid": "c760b0ee1f5ee54e7f49be5ff454c7a6", "score": "0.6843442", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "c760b0ee1f5ee54e7f49be5ff454c7a6", "score": "0.6843442", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "c760b0ee1f5ee54e7f49be5ff454c7a6", "score": "0.6843442", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "c760b0ee1f5ee54e7f49be5ff454c7a6", "score": "0.6843442", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "c760b0ee1f5ee54e7f49be5ff454c7a6", "score": "0.6843442", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "c760b0ee1f5ee54e7f49be5ff454c7a6", "score": "0.6843442", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "f6b682dbf5ec129ac1bf6dc5ae299ec9", "score": "0.67644846", "text": "function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }", "title": "" }, { "docid": "9d8c110e530e25d29830bb5825393fe4", "score": "0.6762295", "text": "function onTransitionEnd( event ) {\n\n\tconst element = event.target;\n\telement.remove();\n\n}", "title": "" }, { "docid": "67153943572b6fcb8bab7c213097a0e0", "score": "0.675225", "text": "function animateRemoval() {\r\n return $animateCss(element, {addClass: 'md-leave'}).start();\r\n }", "title": "" }, { "docid": "67153943572b6fcb8bab7c213097a0e0", "score": "0.675225", "text": "function animateRemoval() {\r\n return $animateCss(element, {addClass: 'md-leave'}).start();\r\n }", "title": "" }, { "docid": "da2bce227140da53dfafe3a2ff465d53", "score": "0.6724306", "text": "function removeHighlight(e) {\n console.log(e);\n // if this isn't the transform transition, then quit\n if (e.propertyName !== 'transform') {\n return;\n } else { // it IS the transform transition! do stuff!!\n e.target.classList.remove('playing'); // take the highlight back off\n }\n }", "title": "" }, { "docid": "e9ac8ef301f96ace22fb0e482ef5c853", "score": "0.67213804", "text": "function clearAnimation(){\r\n\t\t$('.anim-style').empty();\r\n\t}", "title": "" }, { "docid": "2e6c0ddd772c16f7e042e6826ad316c1", "score": "0.66912335", "text": "function animateRemoval() {\n animationRunner = $animateCss(element, {addClass: 'md-leave'});\n return animationRunner.start();\n }", "title": "" }, { "docid": "f27834c2b1250910d16f66519c34e7a0", "score": "0.66789544", "text": "function removeAnimation (e) {\n berichtInvoerID.classList.remove('animate__animated', 'animate__headShake', 'animate__pulse');\n}", "title": "" }, { "docid": "1fb198736def8f3a44ac7c09fbc14968", "score": "0.66668963", "text": "function callback() {\n $el.off('transitionend webkitTransitionEnd', callback);\n $el.css('transition', '');\n }", "title": "" }, { "docid": "d474201636ce92347ff3090828baeb96", "score": "0.66516715", "text": "function clearTransitionWithDelay(name) {\n setTimeout(() => {\n delete transitions[name];\n }, 100);\n}", "title": "" }, { "docid": "c1bfde2cb976440184469a4e79cbdfc0", "score": "0.66216886", "text": "exitElements() {\n this.itemg.exit().transition(this.transition).style(\"opacity\", 0).remove();\n }", "title": "" }, { "docid": "c1bfde2cb976440184469a4e79cbdfc0", "score": "0.66216886", "text": "exitElements() {\n this.itemg.exit().transition(this.transition).style(\"opacity\", 0).remove();\n }", "title": "" }, { "docid": "c1bfde2cb976440184469a4e79cbdfc0", "score": "0.66216886", "text": "exitElements() {\n this.itemg.exit().transition(this.transition).style(\"opacity\", 0).remove();\n }", "title": "" }, { "docid": "c287144ae78dadc3af34fa38d1250ba4", "score": "0.66176236", "text": "function animateRemoval() {\n\t return $animateCss(element, {addClass: 'md-leave'}).start();\n\t }", "title": "" }, { "docid": "c287144ae78dadc3af34fa38d1250ba4", "score": "0.66176236", "text": "function animateRemoval() {\n\t return $animateCss(element, {addClass: 'md-leave'}).start();\n\t }", "title": "" }, { "docid": "63ea15946a41d482f69e00ee0e41b490", "score": "0.6529804", "text": "function removeTransition(event){ //fonction appellée quand la transition a finie\r\n this.classList.remove('playing');\r\n let key = document.querySelector(`.key[data-key=\"${event.srcElement.dataset.key}\"]`);//selectionne par class avec le \".\"\r\n key.classList.remove('playing');\r\n}", "title": "" }, { "docid": "e6d45be7e705a70fe84a36827f71048a", "score": "0.65028006", "text": "_disableTransition() {\n qx.bom.element.Style.set(\n this._getTransitionTarget().getContentElement(),\n \"transition\",\n null\n );\n }", "title": "" }, { "docid": "3393e9ee85d0df6e90964174c51ceb2f", "score": "0.6487574", "text": "clear() {\n\t\t// SVG\n\t\tthis.svg.selectAll(\"g\")\n\t\t\t.transition()\n\t\t\t.duration(100)\n\t\t\t.style(\"opacity\", 0).remove();\n\t\t// TOOLTIP\n\t\tthis.tooltip.transition()\n\t\t\t.duration(200)\n\t\t\t.style(\"opacity\", 0).remove();\n\t}", "title": "" }, { "docid": "31122dbe16036a4bf2190ee23ed2c755", "score": "0.6486565", "text": "function clearAnimation(element, string) {\n\tvar classes = element.classList,\n\t\ttoRemove = findClassByString(classes, string);\n\t\n\tif (toRemove.length > 0) {\n\t\telement.addEventListener('animationstart', function() {\n\t\t\telement.classList.remove(toRemove.join());\n\t\t\tconsole.log(element.classList);\t\n\t\t})\n\t}\t\n}", "title": "" }, { "docid": "0c365ea2000f0a5ad902e80521d2351a", "score": "0.6481914", "text": "function finish(){if(!isIn)element.hide();reset();if(cb)cb.apply(element);}// Resets transitions and removes motion-specific classes", "title": "" }, { "docid": "3eb517db0fc3a79f76184309de88a278", "score": "0.6466362", "text": "function resetAnimation(el) {\n el.style.animation = 'none';\n el.offsetHeight; /* trigger reflow */\n el.style.animation = null;\n}", "title": "" }, { "docid": "87cb90ff695ea3b3aaa617f6a13ad554", "score": "0.64232093", "text": "stop() { if (this.animation) { this.animation.stop(); } this.clear(); }", "title": "" }, { "docid": "03b86cc8a0f921da9d3cad1af9994629", "score": "0.6407864", "text": "function clearAnimation(targetDiv) {\n for (var i=0; i<animations.length; i++){\n targetDiv.removeClass(animations[i]);\n }\n}", "title": "" }, { "docid": "31380553886a6743ea7bbd6647cdc6f3", "score": "0.63988656", "text": "function removeTransitionEffect(e) {\n if (e.propertyName === \"box-shadow\" && e.elapsedTime === 0.15) {\n this.classList.remove(\"btn-hover\");\n }\n}", "title": "" }, { "docid": "47ee6436a99c85bf102d1de217b5d4f1", "score": "0.63930035", "text": "function removeNoTransition() {\n\t\t\tif(listElNodesObj[currentPosition]){\n\t\t\t\t\n\t\t\t\tif(useOverlays) {\n\t\t\t\t\tleftObj.classList.remove('no-transition');\n\t\t\t\t\trightObj.classList.remove('no-transition');\n\t\t\t\t\ttopObj.classList.remove('no-transition');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlistElNodesObj[currentPosition].classList.remove('no-transition');\n\t\t\t\tlistElNodesObj[currentPosition].style.zIndex = 6;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "47ee6436a99c85bf102d1de217b5d4f1", "score": "0.63930035", "text": "function removeNoTransition() {\n\t\t\tif(listElNodesObj[currentPosition]){\n\t\t\t\t\n\t\t\t\tif(useOverlays) {\n\t\t\t\t\tleftObj.classList.remove('no-transition');\n\t\t\t\t\trightObj.classList.remove('no-transition');\n\t\t\t\t\ttopObj.classList.remove('no-transition');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlistElNodesObj[currentPosition].classList.remove('no-transition');\n\t\t\t\tlistElNodesObj[currentPosition].style.zIndex = 6;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "47ee6436a99c85bf102d1de217b5d4f1", "score": "0.63930035", "text": "function removeNoTransition() {\n\t\t\tif(listElNodesObj[currentPosition]){\n\t\t\t\t\n\t\t\t\tif(useOverlays) {\n\t\t\t\t\tleftObj.classList.remove('no-transition');\n\t\t\t\t\trightObj.classList.remove('no-transition');\n\t\t\t\t\ttopObj.classList.remove('no-transition');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlistElNodesObj[currentPosition].classList.remove('no-transition');\n\t\t\t\tlistElNodesObj[currentPosition].style.zIndex = 6;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "4636b1be9a9e40b495914128f12df2db", "score": "0.63833064", "text": "function eraseAnimation() {\n gsap.to('.hobby', {\n x: '100%',\n opacity: 0\n })\n}", "title": "" }, { "docid": "3bf8f37ea8dee032d62e5241baa03f47", "score": "0.63514787", "text": "function onTransitionOutComplete(el) {\n var idx = getObjIndexByID(el.getAttribute('id')),\n boxObj = _children[idx];\n\n boxObj.streams.forEach(function (stream) {\n stream.dispose();\n });\n\n Draggable.get('#' + boxObj.id).disable();\n\n _mountPoint.removeChild(el);\n\n _children[idx] = null;\n _children.splice(idx, 1);\n\n checkModalStatus();\n }", "title": "" }, { "docid": "594963cb49ba1f6fb659cf193a7d6f39", "score": "0.63501424", "text": "function removeFadeOut(el, speed) {\n var seconds = speed / 1000;\n el.style.transition = \"opacity \" + seconds + \"s ease\";\n\n el.style.opacity = 0;\n setTimeout(function() {\n el.parentNode.removeChild(el);\n }, speed);\n }", "title": "" }, { "docid": "e1d15ea373e58b35d222c6c2ccf372d0", "score": "0.6341561", "text": "function removeTranstion(e) {\r\n if (e.propertyName !== \"transform\") return; //\r\n this.classList.remove(\"playing\");\r\n}", "title": "" }, { "docid": "234bfa7bbf7ff46707e5d9945aa42ddb", "score": "0.6338459", "text": "clear () {\r\n this.selection.selectAll('*')\r\n .transition()\r\n .duration(200)\r\n .remove()\r\n }", "title": "" }, { "docid": "5f286dbd93acb35b8d6ccfc56e2c1945", "score": "0.63341707", "text": "function clear_existing_animation(_obj,_type){\n _obj.animations.forEach(function(animate,i){ \n if(animate.type===_type){\n _obj.animations.splice(i,1);\n }\n }); \n}", "title": "" }, { "docid": "d844dff8ad27b09428121a5a58433ab4", "score": "0.6329159", "text": "function animationEnd(ev) {\n ev.target.style.animation = '';\n}", "title": "" }, { "docid": "c4c5bf566fc04f00f42e20fdcd61393d", "score": "0.6295063", "text": "async element(element) {\n element.removeAttribute(\"style\")\n }", "title": "" }, { "docid": "288bd3c1d8b79b75f0d2d5a640d57baf", "score": "0.6293185", "text": "fadeout(element) {\n element.classList.add('fading-out');\n var cb = null;\n var end = () => {\n if (!end)\n return; // use a random variable as flag ;)\n end = null;\n element.removeEventListener('transitionend', onTransitionend);\n element.classList.remove('fading-out');\n element.remove();\n cb && cb();\n };\n var onTransitionend = function (e) {\n if (e.eventPhase === Event.AT_TARGET)\n end();\n };\n element.addEventListener('transitionend', onTransitionend);\n setTimeout(end, 350); // failsafe\n return {\n get finished() { return !end; },\n onFinished(callback) {\n if (!end)\n callback();\n else\n cb = callback;\n },\n cancel() { end === null || end === void 0 ? void 0 : end(); }\n };\n }", "title": "" }, { "docid": "98d584d7b89073c8c9d0c075a47150dd", "score": "0.6291224", "text": "exitElements() {\n this.wordgroup.exit().transition(this.transition).style(\"opacity\", 0).remove();\n }", "title": "" }, { "docid": "4f231733e9f72fc3b7511685a71eab32", "score": "0.6275436", "text": "function scaleUpAndRemoveAnim(element) {\n Object.assign(element.style, { animation: \"pulsatescaled 2s linear infinite\" });\n}", "title": "" }, { "docid": "3a4d3114934fd32970e16f4c24988e16", "score": "0.62633914", "text": "function bigImageRemoveAnimate()\n {\n var big_image = document.getElementById(\"big-image\");\n\n if (big_image) {\n big_image.removeClass(\"animate\");\n }\n }", "title": "" }, { "docid": "23a77bdc8ec87c6f3787c36dc56e83cb", "score": "0.62577987", "text": "_removeDeadElements() {\n this.activeAnimatables.filter((thing) => thing.isDead()).forEach((thing) => thing.removeDomElement());\n this.activeAnimatables = this.activeAnimatables.filter((thing) => !thing.isDead());\n }", "title": "" }, { "docid": "be8aca80ab7e96a7336cb2403b6bb3c9", "score": "0.6255826", "text": "cancelAnimation() {\n if (this.currentAnimation) {\n this.event.dispatchEvent(new CustomEvent(`${this.currentAnimation}.finished`));\n switch (this.currentAnimation) {\n case 'enter':\n this.enterAnimation.stopAnimation();\n break;\n case 'select':\n this.selectAnimation.stopAnimation();\n break;\n case 'deselect':\n this.deselectAnimation.stopAnimation();\n break;\n default:\n }\n this.currentAnimation = null;\n }\n }", "title": "" }, { "docid": "91da42dde41491199cc9510a5c798428", "score": "0.6254704", "text": "function fadeElementOut(element) {\n element.style.opacity = 1;\n\n element.setAttribute('data-test-transitioning', 'true');\n\n (function fade() {\n if ((element.style.opacity -= .1) < 0.01) {\n\n if (originPaddingTop !== undefined) {\n var bodyDOMElement = document.querySelector('body');\n bodyDOMElement.style.paddingTop = originPaddingTop;\n }\n\n document.body.removeChild(element);\n } else {\n setTimeout(fade, 40);\n }\n })();\n }", "title": "" }, { "docid": "fef797380247cbf8e4eca11addcfae67", "score": "0.62408537", "text": "function removeAnimationPreparations() {\n\tcontent.removeAttribute('style');\n\tfooter.removeAttribute('style');\n\theader.removeAttribute('style');\n\tmegaMenu.removeAttribute('style');\n}", "title": "" }, { "docid": "a8b5c200f4bc19481ea002b73003d3aa", "score": "0.6231861", "text": "off() {\n if (this.currentAnimation) {\n this.event.removeEventListener(`${this.currentAnimation}.finished`, this.callback);\n }\n }", "title": "" }, { "docid": "cc43a2f58820df859e2532f0fb797058", "score": "0.62161696", "text": "function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n } // Resets transitions and removes motion-specific classes", "title": "" }, { "docid": "cc43a2f58820df859e2532f0fb797058", "score": "0.62161696", "text": "function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n } // Resets transitions and removes motion-specific classes", "title": "" }, { "docid": "44bb74fb747e483dd1764b43ed35296d", "score": "0.62139875", "text": "function removeElementWithAnimation(e) {//funcion de borrado con animacion\n var aBorrar = $(event.target);\n var elemento = aBorrar.parent().next().next();\n console.log(elemento)\n\n aBorrar.parent().parent().fadeOut(1000, function () {//animacion de fadeOut\n aBorrar.parent().parent().remove();// remueve el elemento del DOM \n })\n }", "title": "" }, { "docid": "bb69ce71dfe8c0c0d9a50bb767ffb8ba", "score": "0.6195173", "text": "function removeElementWithAnimation(id) {\n $('#' + id).fadeOut(1000, function () {\n //obtener el elemento usando selector de jquery con el id provisto en la funcion usando kquery fadeOut or slideUp, remover el elemento\n $(`#${id}`).remove()\n })\n }", "title": "" }, { "docid": "ce87f0140875a2d5344ea25ab99cf30f", "score": "0.6192", "text": "function hideWithTransition() {\n var that = this\n , timeout = setTimeout(function () {\n that.$element.off($.support.transition.end)\n hideModal.call(that)\n }, 500)\n\n this.$element.one($.support.transition.end, function () {\n clearTimeout(timeout)\n hideModal.call(that)\n })\n }", "title": "" }, { "docid": "ce87f0140875a2d5344ea25ab99cf30f", "score": "0.6192", "text": "function hideWithTransition() {\n var that = this\n , timeout = setTimeout(function () {\n that.$element.off($.support.transition.end)\n hideModal.call(that)\n }, 500)\n\n this.$element.one($.support.transition.end, function () {\n clearTimeout(timeout)\n hideModal.call(that)\n })\n }", "title": "" }, { "docid": "ce87f0140875a2d5344ea25ab99cf30f", "score": "0.6192", "text": "function hideWithTransition() {\n var that = this\n , timeout = setTimeout(function () {\n that.$element.off($.support.transition.end)\n hideModal.call(that)\n }, 500)\n\n this.$element.one($.support.transition.end, function () {\n clearTimeout(timeout)\n hideModal.call(that)\n })\n }", "title": "" }, { "docid": "ce87f0140875a2d5344ea25ab99cf30f", "score": "0.6192", "text": "function hideWithTransition() {\n var that = this\n , timeout = setTimeout(function () {\n that.$element.off($.support.transition.end)\n hideModal.call(that)\n }, 500)\n\n this.$element.one($.support.transition.end, function () {\n clearTimeout(timeout)\n hideModal.call(that)\n })\n }", "title": "" }, { "docid": "ce87f0140875a2d5344ea25ab99cf30f", "score": "0.6192", "text": "function hideWithTransition() {\n var that = this\n , timeout = setTimeout(function () {\n that.$element.off($.support.transition.end)\n hideModal.call(that)\n }, 500)\n\n this.$element.one($.support.transition.end, function () {\n clearTimeout(timeout)\n hideModal.call(that)\n })\n }", "title": "" }, { "docid": "92bdf7db2a531ab5c0205f9c9fa207e7", "score": "0.61857337", "text": "function deselect() {\n if (!_selected || _element === undefined || !_visible || _animating) {\n return;\n }\n _selected = false;\n\n if (_fancyEffects) {\n TweenLite.to(_element, 0.5, {\n rotationY: 0,\n scale: 1,\n ease: Back.easeOut\n });\n TweenLite.to(_imageEl, 0.5, {\n alpha: _imageAlphaTarget,\n scale: 1,\n ease: Circ.easeOut\n });\n } else {\n TweenLite.to(_element, 0.5, {scale: 1, ease: Back.easeOut});\n TweenLite.to(_imageEl, 0.5, {\n alpha: _imageAlphaTarget,\n scale: 1,\n ease: Circ.easeOut\n });\n }\n\n }", "title": "" }, { "docid": "d99c9579740b758834dbb02c2cb09e6f", "score": "0.61816657", "text": "function hideWithTransition() {\n }", "title": "" }, { "docid": "484aef2867fb122e50f8f1cf20ea5659", "score": "0.6166444", "text": "function deleteItem(elem) {\n let id = elem.parentNode.parentNode.id;\n elem.parentNode.classList.add('animate');\n elem.parentNode.addEventListener('transitionend',function(){del(elem);},false);\n function del(elem){\n if (id == 'mvpBox') {\n elem.parentNode.remove();\n saveMvpCards();\n }else if (id == 'instBox') {\n elem.parentNode.remove();\n saveInstCards();\n }\n }\n}", "title": "" }, { "docid": "fc14db7f41cce1f7cf169942a4fb9367", "score": "0.6156597", "text": "preventAnimation() {\n this.$element.classList.add('no-transition');\n setTimeout(() => {\n this.$element.classList.remove('no-transition');\n }, 500);\n return this;\n }", "title": "" }, { "docid": "2ee24f8e66777dae39abd2440be8dcb6", "score": "0.614336", "text": "function removeAlert(alertElem) {\n setTimeout((() => {\n alertElem.classList.remove(\"open\");\n alertElem.addEventListener(\n \"transitionend\", \n (e) => { \n alertElem.remove()\n });\n }), 4000);\n}", "title": "" }, { "docid": "1d0751696737351d54dfd48dc89c138c", "score": "0.6142204", "text": "remove() {\n this.unobserveAllElements();\n }", "title": "" }, { "docid": "d1043ab6ee7dab4bbb664dd3ccb7b176", "score": "0.6133286", "text": "done() {\n this._view.removeAttribute(attr('data-transition'))\n reflow(this._view)\n }", "title": "" }, { "docid": "78d335f2e7d6d9e85731473435838005", "score": "0.6121784", "text": "function removeAnim() {\n removeLine();\n if (trailPath){\n planePath.setMap(null);\n\t}\n window.cancelAnimationFrame(animLoop);\n animIndex = 0;\n}", "title": "" } ]
30945e7e066df8e2bc45bc4363e4c701
infomous_ready() is the main API call.
[ { "docid": "f1a78d7ab4e0973433a329e6a631593f", "score": "0.6254978", "text": "function infomous_ready(myCloud) {\r\n\r\n\t// \"cloud\" is the cloud object\r\n var cloud = myCloud.clouds.get();\r\n cloud.on(\"menu_added\", myCallback);\r\n\r\n cloud.make_request(); // Need to call cloud.make_request() for the variables to take effect\r\n\r\n}", "title": "" } ]
[ { "docid": "9c94ad0d8a08ce53777b482b11e2bffc", "score": "0.718863", "text": "ready() {\n this._ready = true;\n this._private._resolveReady(true);\n }", "title": "" }, { "docid": "7d657dc36d066a81279b5177163c3d12", "score": "0.71140236", "text": "ready() {}", "title": "" }, { "docid": "7d657dc36d066a81279b5177163c3d12", "score": "0.71140236", "text": "ready() {}", "title": "" }, { "docid": "7d657dc36d066a81279b5177163c3d12", "score": "0.71140236", "text": "ready() {}", "title": "" }, { "docid": "7d657dc36d066a81279b5177163c3d12", "score": "0.71140236", "text": "ready() {}", "title": "" }, { "docid": "7d657dc36d066a81279b5177163c3d12", "score": "0.71140236", "text": "ready() {}", "title": "" }, { "docid": "7d657dc36d066a81279b5177163c3d12", "score": "0.71140236", "text": "ready() {}", "title": "" }, { "docid": "2a36dbd88c26d4ab61b0b8eaffeba2b4", "score": "0.696503", "text": "function isReady() { janrain.ready = true; }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "1a909ecfa2a9a2abffed01cc463719ec", "score": "0.69582474", "text": "ready() { }", "title": "" }, { "docid": "490b538971b324d5b0971d402c75bb05", "score": "0.69320065", "text": "async onReady() {\n this.setState('info.connection', false, true);\n\n await this.initialization();\n await this.create_state();\n this.getInfos();\n }", "title": "" }, { "docid": "4253d90a0017a691c576e576f2256560", "score": "0.69316965", "text": "function markReady() {\n logger.info('jackalope app instance ready');\n pending.resolve();\n }", "title": "" }, { "docid": "0b9b64afbc55efee8163443235f43d22", "score": "0.6922104", "text": "whenReady() {\n //\n }", "title": "" }, { "docid": "f8b9d012dd7f1e59e58158d4b103e03b", "score": "0.68599457", "text": "readyOnce() {}", "title": "" }, { "docid": "51ed346400da5881f69855c48cad75ae", "score": "0.6686224", "text": "function ready(){\n /* \n * We fetch the unread contents as a pull request from probinder. this represents\n * the monitoring of a static resource, even though probinder is not static.\n * Incorporating a webcrawler on a real static resource would have increased\n * the complexity greatly and it also isn't the core of this usability study\n */\n console.log('Fetching eventual new contents');\n pb.getUnreadContents({\n success: processContentArray,\n error: function(error, response, body) {\n console.log('Unable to fetch unread contents: ' + error.message);\n }\n });\n \n /*\n * Fetch unread contents every 20 seconds\n */\n setTimeout(ready, 20000);\n // pb.getBinderTabContents({\n // tabid: '16420',\n // success: processContentArray,\n // error: function(error, response, body) {\n // console.log('Unable to fetch binder tab contents: ' + error.message);\n // }\n // });\n}", "title": "" }, { "docid": "2e6160b140fa22b2b18f2833ee6afc4f", "score": "0.66652185", "text": "function ready() {\n\tprocess.send({ cmd: 'ready' });\n}", "title": "" }, { "docid": "bbabfb0be12d1d714ad275aa587318a7", "score": "0.66069436", "text": "function isReady() {\n postMessage({\n type: 'STATUS',\n data: 'READY'\n });\n}", "title": "" }, { "docid": "38194255a803177e8133b8fa8e1b6945", "score": "0.65608054", "text": "function ready() {\n\n if (!readyFired) {\n\n // this must be set to true before we start calling callbacks\n readyFired = true;\n var result = null;\n var i = i || 0;\n\n var handleEvent = function (i, readyList) {\n\n if ( readyList[i] ) {\n\n if (readyList[i].name == 'gina') {\n\n var scheduler = window.setInterval(function (i, readyList) {\n try {\n\n readyList[i].ctx = window.gina;\n result = readyList[i].fn.call(window, readyList[i].ctx);\n\n // clear\n if (result) {\n window.clearInterval(scheduler);\n ++i;\n handleEvent(i, readyList)\n }\n } catch (err) {\n window.clearInterval(scheduler);\n throw err\n }\n\n }, 50, i, readyList);\n\n\n } else {\n readyList[i].fn.call(window, readyList[i].ctx);\n ++i;\n handleEvent(i, readyList)\n }\n\n } else { // end\n // allow any closures held by these functions to free\n readyList = [];\n }\n }\n\n handleEvent(i, readyList)\n }\n}", "title": "" }, { "docid": "a57a2f886906ae8e1e23f1b05bd57f3d", "score": "0.65340745", "text": "get ready() {\n return Promise.resolve(undefined);\n }", "title": "" }, { "docid": "c07f95e0faefd54c462ad88fe0865b79", "score": "0.6522989", "text": "function ready() {\n\t\t\tif (!readyFired) {\n\t\t\t\t// this must be set to true before we start calling callbacks\n\t\t\t\treadyFired = true;\n\t\t\t\tfor (var i = 0; i < readyList.length; i++) {\n\t\t\t\t\treadyList[i].fn.call(window, readyList[i].ctx);\n\t\t\t\t} // allow any closures held by these functions to free\n\t\t\t\treadyList = [];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "83d340c0469790b14800a0e268550fed", "score": "0.6503446", "text": "function ready() {\n\t if (!readyFired) {\n\t // this must be set to true before we start calling callbacks\n\t readyFired = true;\n\t for (var i = 0; i < readyList.length; i++) {\n\t readyList[i].fn.call(window, readyList[i].ctx);\n\t }\n\t // allow any closures held by these functions to free\n\t readyList = [];\n\t }\n\t }", "title": "" }, { "docid": "83d340c0469790b14800a0e268550fed", "score": "0.6503446", "text": "function ready() {\n\t if (!readyFired) {\n\t // this must be set to true before we start calling callbacks\n\t readyFired = true;\n\t for (var i = 0; i < readyList.length; i++) {\n\t readyList[i].fn.call(window, readyList[i].ctx);\n\t }\n\t // allow any closures held by these functions to free\n\t readyList = [];\n\t }\n\t }", "title": "" }, { "docid": "651ad3593ef735121ec381d954cfa852", "score": "0.6453652", "text": "async function onReady()\r\n {\r\n console.log(\"Ready!\");\r\n client.user.setActivity(\"Konvict Gaming\");\r\n reloadAllModules();\r\n }", "title": "" }, { "docid": "b64667ae4c291cbd7ae736bbf13789a2", "score": "0.6434294", "text": "isReady() \n {\n return true;\n }", "title": "" }, { "docid": "a0d9b3dbdb6e46ba8a164fc9e9c03b65", "score": "0.6422545", "text": "function ready(){this._isAttached=true;this._isReady=true;this._callHook('ready');}", "title": "" }, { "docid": "1376d1d2c8bb7e1c43817921527fb9d1", "score": "0.6382756", "text": "async onReady() {\n\t\tthis.initObjects()\n\t\t\t.then(() => this.checkSettings()\n\t\t\t\t.then(() => this.saveKnownDeviceIDs()\n\t\t\t\t\t.then(() => \n\t\t\t\t\t{\n\t\t\t\t\t\tthis.connectToCloud();\n\t\t\t\t\t\tthis.subscribeStates(\"devices.*.control.*\"); // only subsribe to states changes under \"devices.X.control.\"\n\t\t\t\t\t})\n\t\t\t\t)\t\n\t\t\t)\n\t\t\t.catch(err => this.log.error(err));\n\t}", "title": "" }, { "docid": "8a7c1cfe8aa77277e4ff18aaabf7f76f", "score": "0.6377716", "text": "function ready(){this._isAttached=true;this._isReady=true;this._callHook('ready')}", "title": "" }, { "docid": "9d36e04fd5709968aadc7323fab683b8", "score": "0.63700634", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "55991e48b9dd40c235db31be79b42d0a", "score": "0.6360538", "text": "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "title": "" }, { "docid": "54e03d6b5a8ab27ac7b5b9258668b5ac", "score": "0.63287944", "text": "function ready () {\n this._isAttached = true\n this._isReady = true\n this._callHook('ready')\n}", "title": "" }, { "docid": "62e1a59b0082804dda3382fecd762db6", "score": "0.63138336", "text": "onReady() { }", "title": "" }, { "docid": "fd3e5248be005322e22e9ed41c4f6bc7", "score": "0.6299309", "text": "function notifyReady() {\n if ((declare_method_count === 0) && (gadget_ready === true)) {\n embedded_channel.notify({method: \"ready\"});\n }\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "f25b6eefb13258bcd324cb10a18c4977", "score": "0.62982255", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "927eac67ad3e4fb0da3d0df132cebf8d", "score": "0.6297311", "text": "isReady(): boolean {\n return this.ready;\n }", "title": "" }, { "docid": "cac83b286f4b10276847b38e4e1b252a", "score": "0.6292161", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "cac83b286f4b10276847b38e4e1b252a", "score": "0.6292161", "text": "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "title": "" }, { "docid": "5c6fdca9ab97037806247df020c9b32c", "score": "0.6289477", "text": "async onReady() {\n try {\n // Init Helper\n Helper = new global_helper_1.GlobalHelper(this);\n // Create button for updates\n await this.setObjectNotExistsAsync(\"updatepicturelist\", {\n type: \"state\",\n common: {\n name: \"updatepicturelist\",\n type: \"boolean\",\n role: \"button\",\n read: true,\n write: true,\n desc: \"Update picture list\",\n def: false\n },\n native: {},\n });\n await this.setStateAsync(\"updatepicturelist\", false, true);\n this.subscribeStates(\"updatepicturelist\");\n // Starting updatePictureStoreTimer action\n await this.updatePictureStoreTimer();\n }\n catch (err) {\n Helper.ReportingError(err, MsgErrUnknown, \"onReady\");\n }\n }", "title": "" }, { "docid": "a2ce5cba2071137f17f5af95f0549bb1", "score": "0.62755495", "text": "_onReady() {\n this.log('NOTICE', '=== BotClient Ready! ===');\n this.botClient.ready = true;\n\n /* Bind handlers to events */\n this.eventManager.bindHandlers();\n\n /* Initialise status. Default AxonCore status or use custom one */\n this.initStatus();\n this.log('NOTICE', '=== **Ready!** ===');\n }", "title": "" }, { "docid": "c77d35ab58e91a5e7e783624f019dad0", "score": "0.6228492", "text": "ready() {\n // It is important that `super.ready()` is not called here as it\n // immediately turns on accessors. Instead, we wait until `readyClients`\n // to enable accessors to provide a guarantee that clients are ready\n // before processing any accessors side effects.\n this._flushProperties();\n // If no data was pending, `_flushProperties` will not `flushClients`\n // so ensure this is done.\n if (!this.__dataClientsReady) {\n this._flushClients();\n }\n // Before ready, client notifications do not trigger _flushProperties.\n // Therefore a flush is necessary here if data has been set.\n if (this.__dataPending) {\n this._flushProperties();\n }\n }", "title": "" }, { "docid": "e98a6c1aab9fd551c87705c7bfebd3a9", "score": "0.6219288", "text": "ready() {\n this.__dataReady = true;\n // Run normal flush\n this._flushProperties();\n }", "title": "" }, { "docid": "af1a9ccb9f24a478c84f28e3e82b47a2", "score": "0.61905193", "text": "function checkAPIReady() {\n if ( window._V_ ) {\n _V_ = window._V_;\n while ( apiReadyCallbacks.length ) {\n ( apiReadyCallbacks.shift() )();\n }\n return;\n }\n setTimeout( checkAPIReady, 10 );\n }", "title": "" }, { "docid": "adbe1055e01b57bdc5930411c507a5c3", "score": "0.6178422", "text": "ready(cb, context) {\n this.instance.ready(cb, context);\n }", "title": "" }, { "docid": "18d5e97b184eed0028ed4f7523a21468", "score": "0.6144041", "text": "function onAPILoadReady() {\n/* Display a login prompt */\n\tIPCortex.PBX.Auth.login().then(\n\t\tfunction() {\n\t\t\tconsole.log(TAGDIAL, 'Login successful');\n\t\t\t/* Get the API to start collecting data */\n\t\t\tIPCortex.PBX.startFeed().then(\n\t\t\t\tfunction() {\n\t\t\t\t\tconsole.log(TAGDIAL, 'Live data feed started');\n\t\t\t\t\trunApp();\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\t\tconsole.log(TAGDIAL, 'Live data feed failed');\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tfunction() {\n\t\t\tconsole.log(TAGDIAL, 'Login failed');\n\t\t}\n\t);\n}", "title": "" }, { "docid": "b68dae094ca359d942f5b6ea871f87fb", "score": "0.613306", "text": "onReady() {\n if (this._timer) clearInterval(this._timer);\n this._timer = setInterval(this._updateDB.bind(this), 10000);\n this.botReadyResolve(true);\n if (this._statusOverride !== false) {\n this._client.editStatus(\"online\", this._statusOverride);\n } else {\n this._statusInterval = setInterval(() => {\n let newStatus = this._configDB.get(\"status\", null, {server: \"*\"});\n if (this.currentStatus != newStatus) {\n this.currentStatus = newStatus;\n this._client.editStatus(\"online\", newStatus);\n }\n }, 30000);\n }\n }", "title": "" }, { "docid": "c308d56942b2f9dbc59e914242ba5ee4", "score": "0.60927355", "text": "isReady() {\n return this._ready;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "07d24d9cefebf26102dd41d81c32f68a", "score": "0.608756", "text": "get ready() {\n return this._ready.promise;\n }", "title": "" }, { "docid": "0c2e7a2cc8a529ed70ae93906d370d0d", "score": "0.608405", "text": "ready() {\r\n return new Promise((resolve, reject) => {\r\n autorun((reaction) => {\r\n if (this.__is_ready) {\r\n reaction.dispose();\r\n resolve(this.__is_ready);\r\n }\r\n });\r\n });\r\n }", "title": "" }, { "docid": "57a1c0d6063f139fda1ce70a239879de", "score": "0.6069679", "text": "function _ready_to_fetch($carousel) {\n\n if (running_request) {\n return false;\n }\n\n if (full) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "652f8900dea158ee26e73a9a5eb9be99", "score": "0.60657865", "text": "ready() {\n this.__dataInitialized = true;\n }", "title": "" }, { "docid": "8294940f695950ec130b5e2a469ff187", "score": "0.60622597", "text": "_onReady() {\n super._onReady();\n\n this._forEach((channel) => this._gpio.open(channel, Gpio.direction.out))\n .then(() => this.emit('ready'))\n .catch(() => undefined);\n }", "title": "" }, { "docid": "4beae582e18247373750f96affc62c8a", "score": "0.6055303", "text": "function onReady() {\n\n\t}", "title": "" }, { "docid": "a77960444c3cf5ca262ea27361c0d47a", "score": "0.6046557", "text": "function onReady(callback) {\n if (ready.done) {\n callback();\n return;\n }\n\n ready.callbacks.push(callback);\n }", "title": "" }, { "docid": "9118b756a171003ada10f15a3ca1dcda", "score": "0.6036537", "text": "function ready() {\n ch_ready();\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "e151d51da1c37aa42aca270c853fa466", "score": "0.6032505", "text": "get isReady() {\n return this._isReady;\n }", "title": "" }, { "docid": "a71485eb863b26fa97010fa56963cef5", "score": "0.60130006", "text": "function doBauhausReady() {\n\tbauhausSliderMods();\n\tbauhausMoveFooterDiv();\n\tbauhausBindTappableLinks();\n\tbauhausSearchToggle();\n\tbauhausWebAppMenu();\n\tbauhausVideoUnwrap();\n\tbauhausHandleSearch();\n\tbauhausHandlePostImgs();\n\tbauhausCheckForPushIt();\n}", "title": "" }, { "docid": "1f66c72c95495ffa36ddf5849b911979", "score": "0.59935963", "text": "async wait_until_ready() {\n\t\tthis.cancel_autouse();\n\t\tawait wait_until_ready(this.cooldown_id);\n\t}", "title": "" }, { "docid": "3da9d4b7b1a529b4ed380f0867142e80", "score": "0.5983656", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "3da9d4b7b1a529b4ed380f0867142e80", "score": "0.5983656", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "dda0783e210d48ff38cec429eb55b5a4", "score": "0.5950679", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "7eba7823ea6173e09e58ede2a6c161b3", "score": "0.5948203", "text": "function ready(cb) {\n if (doc.body) {\n return cb();\n }\n setTimeout(function () {\n ready(cb);\n });\n }", "title": "" }, { "docid": "bb6e64841dd00763b112127db7a6ac94", "score": "0.5941752", "text": "function checkIfReady() {\n\n\t\t\tfor (var i in auto_load)\n\t\t\t{\n\t\t\t\tvar file = auto_load[i];\n\n\t\t\t\tif (!isLoaded(file))\n\t\t\t\t\t// Not ready yet.\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Good to go.\n\t\t\ttriggerReadyEvent();\n\n\t\t}", "title": "" }, { "docid": "7d682668b3268efc5e49113d9d587530", "score": "0.5936374", "text": "ready () {\n console.log(`Shard ${this.bot.shard.id + 1} is ready, serving ${this.bot.guilds.array().length} guilds.`)\n\n // Set status message to the default until we get info from master process\n this.setActivity()\n }", "title": "" }, { "docid": "91a4908dd4bff2b29c0ecd1b4420fe96", "score": "0.5934861", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "91a4908dd4bff2b29c0ecd1b4420fe96", "score": "0.5934861", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "91a4908dd4bff2b29c0ecd1b4420fe96", "score": "0.5934861", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "91a4908dd4bff2b29c0ecd1b4420fe96", "score": "0.5934861", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "91a4908dd4bff2b29c0ecd1b4420fe96", "score": "0.5934861", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" }, { "docid": "91a4908dd4bff2b29c0ecd1b4420fe96", "score": "0.5934861", "text": "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }", "title": "" } ]
86885ef58c5811a55b7efd27050a9342
Returns the global window object associated with provided element.
[ { "docid": "c39eea462fb439bbfba3a9ee42fed03f", "score": "0.7120635", "text": "function index_esm_getWindowOf(target) {\n // Assume that the element is an instance of Node, which means that it\n // has the \"ownerDocument\" property from which we can retrieve a\n // corresponding global object.\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local window object if it's not possible extract one from\n // provided element.\n\n return ownerGlobal || window;\n}", "title": "" } ]
[ { "docid": "640a4f0b8d1792dacdc102154d731d2a", "score": "0.80424273", "text": "function getWindow(element) {\n if (!element) {\n return _window;\n }\n\n return getDocument.getDocument(element).defaultView || _window;\n}", "title": "" }, { "docid": "53d7ed17e68f17ab03d2cf4e5c3d74cd", "score": "0.74916434", "text": "function getOwnerWindow(element) {\n var ownerDocument = getOwnerDocument(element);\n return ownerDocument ? ownerDocument.defaultView || window : null;\n}", "title": "" }, { "docid": "3813d074bee1e52895e012ab2ed0aadf", "score": "0.74692136", "text": "getOwnerWindow(element) {\n return element.ownerDocument.defaultView || element.ownerDocument.parentWindow;\n }", "title": "" }, { "docid": "e62adf53d456cd4dace527e05f180788", "score": "0.7381838", "text": "getOwnerWindow(element) {\n return element.ownerDocument.defaultView || element.ownerDocument.parentWindow;\n }", "title": "" }, { "docid": "cec6ced3d07a6f085ba381834125411e", "score": "0.7048396", "text": "function getWindow(elem) {\n return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "title": "" }, { "docid": "6dc87e4d4d3894c54c746bc0ec4787ab", "score": "0.70278007", "text": "function getWindow(elem) {\n return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "title": "" }, { "docid": "6dc87e4d4d3894c54c746bc0ec4787ab", "score": "0.70278007", "text": "function getWindow(elem) {\n return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "title": "" }, { "docid": "e9d7a8d754c57f198459c9c284800b81", "score": "0.6961478", "text": "function getWindow(elem) {\n\t\treturn jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "e9d7a8d754c57f198459c9c284800b81", "score": "0.6961478", "text": "function getWindow(elem) {\n\t\treturn jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "e07252e14ba7a3db3c07921715b79efe", "score": "0.6959701", "text": "function getWindow(elem) {\n\t\t\treturn jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t\t}", "title": "" }, { "docid": "e07252e14ba7a3db3c07921715b79efe", "score": "0.6959701", "text": "function getWindow(elem) {\n\t\t\treturn jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t\t}", "title": "" }, { "docid": "e07252e14ba7a3db3c07921715b79efe", "score": "0.6959701", "text": "function getWindow(elem) {\n\t\t\treturn jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t\t}", "title": "" }, { "docid": "c64940505ebf615dc930cd7adf24e31a", "score": "0.69227284", "text": "function getWindow( elem ) {\n return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "title": "" }, { "docid": "c64940505ebf615dc930cd7adf24e31a", "score": "0.69227284", "text": "function getWindow( elem ) {\n return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "title": "" }, { "docid": "43042581a1e87ec75077c466fc28686c", "score": "0.68893605", "text": "function getWindow(elem){return jQuery.isWindow(elem)?elem:9===elem.nodeType&&elem.defaultView}", "title": "" }, { "docid": "49ac0ecb477a91164cb0fe4a7c8162fd", "score": "0.684193", "text": "function getWindow( elem ) {\n return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "c9a342503247e4a1235d07ecb8d2a9f2", "score": "0.6840487", "text": "function getWindow( elem ) {\n\t\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n\t}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" }, { "docid": "20ee8d832a158ea6446a8fffa41eecec", "score": "0.6829813", "text": "function getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}", "title": "" } ]
932659f4d8671dced22c9c6b193970d9
get products by user id
[ { "docid": "24eec223e9fb494545491fe1728ab404", "score": "0.8213091", "text": "function getByUserId(id) {\n return productModel.find({ user: id });\n}", "title": "" } ]
[ { "docid": "a7fd9a6d3faa52aca599c11318d1a014", "score": "0.76918435", "text": "function getProductByUserId(req, res, next) {\n cartService\n .getProduct(req.params.id)\n .then((result) => { \n if (!result.length) {\n return next({\n message: 'User not found',\n status: '400',\n })\n }\n res.status(200).json(result);\n })\n .catch((err) => {\n next(err)\n })\n}", "title": "" }, { "docid": "bff79248b46860a5b43911751ef68150", "score": "0.7348823", "text": "getProductByUser(user_id) {\n return new Promise((resolve, reject) => {\n\n connection.query(queries_util.getProductByUser, [user_id],\n\n (err, resultset, fields) => {\n if (err) {\n reject('Query error:' + err.stack);\n\n }\n // Resultado en formato JSON\n let result = JSON.parse(JSON.stringify(resultset));\n\n // Si no se encuentra el usuario solicitado\n if (Object.keys(result).length === 0) {\n resolve(null);\n }\n resolve(result);\n });\n });\n }", "title": "" }, { "docid": "3e777289f518f56dcd166e05511f390f", "score": "0.711815", "text": "function getProductUserById(req, res, next) {\n cartService\n .getProductUser(req.params.id)\n .then((result) => { \n if (!result.length) {\n return next({\n message: 'Cart not found',\n status: '400',\n })\n }\n res.status(200).json(result);\n })\n .catch((err) => {\n next(err)\n })\n}", "title": "" }, { "docid": "1787d7ef3181042bb3d6bebaf4a45d6a", "score": "0.6990583", "text": "async function getUserProducts(userId) {\n try {\n const userProducts = await axios.get(BASE_URL + `/products/${userId}`);\n if (userProducts) {\n message: \"Products Exist for this userId!\";\n const newProductArray = userProducts.data.userProducts;\n\n setProducts(newProductArray);\n console.log(newProductArray);\n } else {\n message: \"No products for that userId\";\n }\n } catch (err) {\n console.error(err);\n throw err;\n }\n }", "title": "" }, { "docid": "96c6250031704a09b276d5adae84bbf0", "score": "0.69376224", "text": "async getByUser(req, res) {\r\n try { \r\n //populate muestra los objetos referenciados. Mostramos los campos que queremos\r\n const orders = await Order.find({idUser: req.params.id}).populate('ordersProducts.idProduct idUser', 'name price categorie firstName lastName address');\r\n if(!orders.length) return res.status(204).send() //No content\r\n res.send({message: 'Successful search', orders});\r\n } catch (error) {\r\n console.error(500) \r\n res.send({message:'There was a problem trying to get orders'});\r\n }\r\n }", "title": "" }, { "docid": "7c4bccb7354d00efdd86b400bb99b8cb", "score": "0.6924634", "text": "async user({ _id }) {\n const inventory = await inventoryService.getByProduct(_id)\n const user = !isEmpty(inventory) ? await userService.getUser(inventory.store.userId) : null\n return user\n }", "title": "" }, { "docid": "2bcda3cafbd8a6943f2c30f4dfbadeb7", "score": "0.6911366", "text": "function getShoppingCartItemsByUserId(userId) {\n return new Promise(async (resolve, reject) => {\n try {\n let shopping_items = await Shopping_cart_items.findOne({ userId: userId })\n if(!shopping_items) {\n return resolve(null)\n }\n let dataForUser = []\n for(let i = 0; i < shopping_items.products.length; i++) {\n let item = shopping_items.products[i] \n\n let product = await Products.find({_id: item.productId }).exec()\n let productUser = product[0] || ''\n dataForUser.push({\n ...item._doc,\n name: productUser.name,\n detail: productUser.detail,\n imageUrl: productUser.imageUrl\n })\n }\n \n resolve(dataForUser);\n } catch (err_msg) {\n reject({\n error: true,\n message: 'Something went wrong while fetching shopping cart items!',\n status: 500,\n err_msg\n })\n }\n });\n}", "title": "" }, { "docid": "6f32632cef3b63966c6d8c68c13faea9", "score": "0.6823348", "text": "async getProductByAdmin(_, { id }, context) {\n // 1. check auth\n const user = isAdmin(context);\n try {\n const product = await Product.findById(id);\n return product;\n } catch (error) {\n throw new Error(error);\n }\n }", "title": "" }, { "docid": "a27d7183130b5ce2465bf183de091b25", "score": "0.6821269", "text": "async getItemsUser(userId) {\n return await firebase\n .firestore()\n .collection(\"offers\")\n .where(\"user\", \"==\", userId)\n .get();\n }", "title": "" }, { "docid": "b54e119024bafe3b9dc468c563ce2df1", "score": "0.67382884", "text": "async function getCartsByUserId(id) {\n try {\n const { rows: [cart] } = await\n client.query(`\n SELECT * FROM orders\n WHERE status = 'created'\n AND \"userId\" = $1\n `, [ id ])\n\n console.log(\"cartid\", cart)\n\n const { rows: products} = await client.query(`\n SELECT products.*, order_products.id AS \"orderProductId\"\n FROM products\n JOIN order_products ON products.id=order_products.\"productId\"\n WHERE order_products.\"orderId\"=$1;\n `, [id])\n\n cart.products = products\n console.log(\"cart products\", cart)\n return cart\n } catch (error) {\n throw error;\n }\n}", "title": "" }, { "docid": "52b96aecdf5f5c00fe38179cc56ca671", "score": "0.6647988", "text": "function selectOpenCartByUserId(req, res) {\n\tDB.Cart.findOne({'user': req.params.user_id,completed:false})\n\t.populate('items')\n\t.exec( (err, fCart) => {\n\t\tres.json(fCart);\n\t});\n}//end of selectOpenCartByUserId()", "title": "" }, { "docid": "4629ffe88f357d42f5aee74c6f689381", "score": "0.66429615", "text": "function getUserProducts(req, res, next) {\n var page = req.query.page || 1;\n var limit = req.query.limit || 10;\n \n var options = {\n page: page,\n limit: limit,\n lean: true\n };\n \n Product.paginate({\n owner: ObjectId(req.user._id)\n }, options, (err, products) => {\n if (err) return next(err);\n if (!products) return next({\n message: 'No products found.',\n status: 404\n });\n \n var pagination = {\n pageNumber: products.page,\n itemsPerPage: products.limit,\n prev: res.locals.paginate.href(true),\n next: res.locals.paginate.href(),\n };\n \n utils.sendJSONresponse(res, 200, products, false, pagination);\n });\n }", "title": "" }, { "docid": "9316fa258eb048d526490b119ac79e60", "score": "0.6590481", "text": "getCartByUserId(id) {\n return axios.get(USER_API_BASE_URL + \"/cart/get-cart-user-id/\" + id);\n }", "title": "" }, { "docid": "269639c1709f051d2eaa728b28349308", "score": "0.6561699", "text": "static async getUserById(id) {\n \n let res = await this.request(`user/useritems/${id}`)\n return res\n }", "title": "" }, { "docid": "e084b61d2e28e82b87a55c296223c958", "score": "0.65473926", "text": "getProductByID(product_id) {\n return axios\n .get(API_URL + product_id, {\n headers: authHeader()\n })\n .then(response => {\n return response;\n })\n .catch(err => {\n return err;\n });\n }", "title": "" }, { "docid": "af63820574f47901b54e4e6039a939a3", "score": "0.65473604", "text": "getProductById(id) {\n return new Promise((resolve, reject) => {\n\n connection.query(queries_util.getProductById, [id],\n\n (err, resultset, fields) => {\n if (err) {\n reject('Query error:' + err.stack);\n\n }\n // Resultado en formato JSON\n let result = JSON.parse(JSON.stringify(resultset));\n\n // Si no se encuentra el usuario solicitado\n if (Object.keys(result).length === 0) {\n resolve(null);\n }\n resolve(result);\n });\n });\n }", "title": "" }, { "docid": "4928b1202461082d7426536478645f20", "score": "0.65361965", "text": "static async fetchProductById(productId) {\n const product = storage\n .get(\"products\")\n .find({ id: Number(productId) })\n .value()\n return product\n }", "title": "" }, { "docid": "4bdcfb1f2bfbbb007394653740939636", "score": "0.6505322", "text": "getProduct(id) {\n return axios.get(\"/api/products/\" + id);\n }", "title": "" }, { "docid": "40812d392dab0d96ade3a85bf67f941a", "score": "0.648237", "text": "async function getCart(req) {\n console.log(req.user.id)\n var cart = await Cart.findAll({\n where:{\n userId:req.user.id\n },\n include: [{\n model: Product,User\n \n }]\n })\n return cart;\n}", "title": "" }, { "docid": "76c6433b2a370ae14dbde5ea41b0a0b8", "score": "0.64816886", "text": "getByUserId(userId) {\n return this.data.filter(item => item.user_id === userId);\n }", "title": "" }, { "docid": "64894e583c9877d52f00df96cf856560", "score": "0.6476701", "text": "getProductByProductId(productId) {\n if(this.result!=null){\n return this.result.find(item => {\n return item.ID == productId;\n });\n }\n }", "title": "" }, { "docid": "1f260fe399e32c7e2759f3ca1b13ebaf", "score": "0.6445609", "text": "function getProduct(req, res, next) {\n var params = req.params;\n \n Product\n .findOne({ '_id': ObjectId(params.productId) }, { password: 0, __v: 0 })\n .exec((err, product) => {\n if (err) return next(err);\n if (!product) return next({\n message: 'Product not found.',\n status: 404\n });\n \n utils.sendJSONresponse(res, 200, product);\n });\n }", "title": "" }, { "docid": "646d63f1894f197a91ae9b563547df13", "score": "0.64187217", "text": "function getProductById(id){\n return products.find(product => product.id === id)\n}", "title": "" }, { "docid": "88bab12ce510efd30e7598bc0d91a637", "score": "0.64177364", "text": "function getById(req, res) {\n products.findById(req.params.id, (err, product) => {\n if(err)\n res.send(err);\n\n res.json(product);\n });\n}", "title": "" }, { "docid": "4b50ca14e99f1fe29d2f071ad10d2827", "score": "0.6416916", "text": "async getProductsByAdmin(_, __, context) {\n // 1. check auth\n const user = isAdmin(context);\n try {\n const products = await Product.find().sort({ createdAt: -1 });\n newArr = [];\n\n for (let obj of products) {\n newArr.push({ product: obj });\n }\n return newArr;\n } catch (err) {\n throw new Error(err);\n }\n }", "title": "" }, { "docid": "99af41bc32957e8918647fcc425771ab", "score": "0.64067274", "text": "getUserData(id) {\n let data = this.props.users.users\n let result = data.filter(user => user.login.uuid === id)\n return result\n }", "title": "" }, { "docid": "7c417cb3a4a72883f0b9ab2bd6a7b60b", "score": "0.64063203", "text": "function getAvailableArtItemsForUser(userId) {\n var deferred = $q.defer();\n $http\n .get(\"/api/project/user/\" + userId +\"/art\")\n .success(function(response) {\n deferred.resolve(response);\n });\n return deferred.promise;\n }", "title": "" }, { "docid": "cae745a25d57360905b381f691c1c66e", "score": "0.63726693", "text": "GetUser(id){\n var getUser = this.users.filter((userId) => {\n return userId.id === id; // it'll look through the this.users array and for each element that id === argument id\n // will be return into seperate arrays\n })[0]; // from each user will return an array, so with [0] we take the first elemnent which is id\n return getUser\n }", "title": "" }, { "docid": "e8df1a8f5911fd30d88e8fc0b0a01bd1", "score": "0.6371957", "text": "async function findFunction (userId) {\n const order = await Order.find({\n where: {\n userId: userId,\n isCheckedOut: false\n }\n });\n\n const cart = await Order_Product.findAll({\n where: {\n orderId: order.id\n },\n raw: true\n });\n\n const predicate = (value, key) => {\n return key.startsWith('quantity') || key.startsWith('productId');\n };\n\n const productArr = cart.map(itemObj => {\n return _.pickBy(itemObj, predicate);\n });\n\n const productIdAndQuantityObj = _.mapValues(\n _.keyBy(productArr, 'productId'),\n 'quantity'\n );\n\n return productIdAndQuantityObj;\n}", "title": "" }, { "docid": "ff6c904d518ea5fb447ca622fbbd81f6", "score": "0.63663715", "text": "async showProductbyId (req, res) {\n\t\tlet {id} = req.params;\n\t\ttry {\n\t\t\tconst oneProduct = await products.findOne({_id:id});\n\t\t\tres.send(oneProduct);\n\t\t}\n\t\tcatch(e){\n\t\t\tres.send({e});\n\t\t}\n\t}", "title": "" }, { "docid": "1e4ecae22b4224ede815cf5023022d64", "score": "0.63401824", "text": "function readProductsByID(id) {\n connection.query(\"SELECT * FROM products where ?\", { item_id: id }, function (err, res) {\n if (err) throw err;\n displayItems(res);\n });\n}", "title": "" }, { "docid": "1220f3c6c19701e5f1332642c7256b78", "score": "0.63328034", "text": "function getUser() {\n\tif(sessionStorage.getItem('isAuthenticated')) {\n\t\t// display basket count\n\t\tlet count = 0;\n\t\tlet currUserId = sessionStorage.getItem('currUserId');\n\t\tlet currentUserCartKey = 'cart_' + currUserId;\n\t\tcount = JSON.parse(localStorage.getItem(currentUserCartKey || \"[]\")).length;\n\t\tdocument.getElementById('basket').innerHTML = count;\n\t\tdocument.getElementById('loginButton').style.display = 'none';\n\t\tdocument.getElementById('cartName').innerHTML = sessionStorage.getItem('currUserName') + '\\'s Cart';\n\n\t} else {\n\t\tdocument.getElementById('cartName').innerHTML = \"Cart\";\n\t\tdocument.getElementById('logoutButton').style.display = 'none';\n\t\tdocument.getElementById('basket-container').style.display = 'none';\n\t\tloadJSON(PATH);\n\t};\n\t// getting all products on the main page.\n\tgetAll();\n}", "title": "" }, { "docid": "d65b3302336bd489f53e5afe728792ff", "score": "0.6306496", "text": "function getProductById(id) {\n let product = null;\n products.forEach(element => { \n if (element._id === id) {\n product = element;\n }\n });\n return (product);\n }", "title": "" }, { "docid": "d8b19e33965ed69f67b584506de36f3f", "score": "0.63012284", "text": "onGetProductById(resolve, // Inject this to disable auto responding\r\n params) {\r\n const { viewer, ...payload } = params;\r\n this._createRequestLog('getProductById', viewer, payload);\r\n }", "title": "" }, { "docid": "0be4d3c4d9334056c0f343717650dea1", "score": "0.62993103", "text": "function getProducts() {\n fetch('http://localhost:8080/api/products', {\n method: 'GET',\n headers: {\n 'Authorization': `bearer ${localStorage.getItem('access_token')}`\n }})\n .then(res => res.json())\n .then((data) => {setProducts(data)}) \n .catch(console.error());\n }", "title": "" }, { "docid": "bfe25debf6a3f07089d4533d5fcf13bd", "score": "0.6282835", "text": "static read (id) {\n return fetchCollectionItems('products', id);\n }", "title": "" }, { "docid": "7e9544b3201d2e74aec5d9877ee55eda", "score": "0.62650156", "text": "function getProductById(id) {\n\tlet xhr = new XMLHttpRequest();\n\txhr.open('GET', `api/products/${id}`);\n\txhr.onreadystatechange = function () {\n\t\tif(xhr.readyState === 4){\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tlet prod = JSON.parse(xhr.responseText);\n\t\t\t\tdisplaySingleProduct(prod);\n\t\t\t} else{\n\t\t\t\tdisplayError('No customer found.');\n\t\t\t}\n\t\t}\n\t}\n\txhr.send();\n}", "title": "" }, { "docid": "e1d60bd66eba33d00c6ab41363af2212", "score": "0.6264334", "text": "async getProductById(req, res) {\n\n const productId = req.params.productId;\n\n const { error } = Joi.validate(productId, Joi.objectId().required());\n\n if (error) {\n return res.status(404).send(error.details[0].message);\n }\n\n const product = await Product.findById(productId).populate('brand', 'brandName').populate('category', 'categoryName');\n\n if (!product) {\n return res.send(\"Product not found\");\n }\n\n res.send(product);\n }", "title": "" }, { "docid": "1a33645fa62b63f1bdc78169131f641b", "score": "0.620398", "text": "findProduct(productId) {\n var self = this;\n\n if(productId) {\n self.initShoppingCart();\n const shoppingCart = self.req.session.shoppingCart;\n var product = self.getProductFromShoppingCart(shoppingCart, productId);\n if(product.productId) {\n return self.res.status(200).json(product);\n }\n return self.res.status(404).json({error : \"L'identifiant spécifié n'est pas associé à un élément qui se trouve dans le panier\"});\n }\n return self.res.status(404).json({error: \"Url invalide.\"});\n }", "title": "" }, { "docid": "ad94ef72e1332fdf978ab4609788d837", "score": "0.62017596", "text": "function getProductsById (prductId) {\r\n return db\r\n .query(`SELECT * FROM products WHERE id = ($1)`, [prductId])\r\n .then(result => {\r\n return result.rows[0]\r\n })\r\n}", "title": "" }, { "docid": "70d59e8dd2c1a63e945a722b8b1aa919", "score": "0.6200277", "text": "getUser(id){\n return this.users.filter((user) => user.id === id)[0];\n }", "title": "" }, { "docid": "fc38154326c0711079444b45ff61d695", "score": "0.6187158", "text": "static finduserOrderById(req, res) {\n const { userid } = req.decoded;\n db.query(UserOrder, [userid]).then((userorder) => {\n res.status(200).json(userorder.rows);\n }).catch((err) => {\n res.send(err.message);\n });\n }", "title": "" }, { "docid": "e21bf601af6201c00da223eb78e6f785", "score": "0.61799854", "text": "product (parent, args, context, info) {\n return products.find((product) => product.id === Number(args.id));\n }", "title": "" }, { "docid": "1d0db92301627babed77f94a939469e9", "score": "0.61790395", "text": "function ordersByOrderId (req, res) {\n if (req.user) {\n if (req.user.type === 'cus') {\n pool.query(`SELECT orderid, userid, orderday, ordermonth, orderyear, timeperiod, orderprice, order_placed_at\n FROM orders WHERE orderid = $1 AND userid =$2;`,\n [req.params.orderid, req.user.userid]).then(result => {\n if (result.rows.length > 0){\n var order = result.rows[0];\n order.products = [];\n pool.query(`select count(op.productid), p.modelname, op.productid, p.price\n from orderproduct as op \n JOIN products as p\n on op.productid = p.productid\n where op.orderid = $1\n group by p.modelname, op.productid, p.price\n order by op.productid;`, [req.params.orderid])\n .then(result => {\n\n console.log(result.rows);\n var products = result.rows;\n pushProducts(products, order);\n res.send(order);\n });\n }\n });\n } else if (req.user.type === 'adm') {\n pool.query(`SELECT orderid, userid, orderday, ordermonth, orderyear, timeperiod, orderprice, order_placed_at\n FROM orders WHERE orderid = $1`,\n [req.params.orderid]).then(result => {\n var order = result.rows[0];\n order.products = [];\n pool.query(`select count(op.productid), p.modelname, op.productid, p.price\n from orderproduct as op JOIN products as p\n on op.productid = p.productid \n where orderid = $1\n group by p.modelname, op.productid, p.price\n order by op.productid;`, [req.params.orderid])\n .then(result => {\n\n console.log(result.rows);\n var products = result.rows;\n pushProducts(products, order);\n res.send(order);\n });\n });\n }\n function pushProducts(products, order) {\n products.forEach((item) => {\n order.products.push(item);\n });\n }\n }\n}", "title": "" }, { "docid": "825a9b15b9337951eeb42c3eb021ba78", "score": "0.61754", "text": "getUserByID(id) {\n const users = this.getUsers(); //Returns the collection of Users\n\n return users.find(user => user.getId() === id); //Compare each user id with the user id we are interested in and return it.\n }", "title": "" }, { "docid": "c89528acf18d371329b8bf7f2458a1d2", "score": "0.6173407", "text": "getProducts(auth) {\n const query = `{\n products(first: 10) {\n edges {\n node {\n title\n }\n }\n }\n }`;\n \n return graphQLClient(query, auth);\n }", "title": "" }, { "docid": "8212d534c4ce4ae7f02cef829ab6b87e", "score": "0.6172227", "text": "async getUserMovies({userId}){\n //busco las peliculas de un usuarioId\n const query = userId && {userId};\n const userMovies = await this.mongoLib.getAll(this.collection,query);\n return userMovies || [];\n }", "title": "" }, { "docid": "1c0b482c8723823462b3b21372ded90e", "score": "0.61695874", "text": "static find(id) {\n\n\t\treturn axios.get('/product/' + id)\n\t\t\t\t\t.then(data => data);\n\n\t}", "title": "" }, { "docid": "8877e839b66b635c7efdd08cffc1b8a2", "score": "0.61695015", "text": "getProductByID(req, res) {\n console.log(\"Query------ \", req.query);\n con.query(\"SELECT * FROM `product` where product_id=?\", [req.query.id], function (err, result) {\n console.log('response from get producy data by id----', result)\n if (err)\n throw err;\n else {\n\n return res.status(200).json({\n product: result\n })\n }\n })\n }", "title": "" }, { "docid": "220fbf5e018657d5b72b01a0df9b3389", "score": "0.61687016", "text": "async byUser(userId) {\n let photos = await Photo.find({ user_id: userId });\n return await this.preparePhotos(photos);\n }", "title": "" }, { "docid": "7a19d008fa49a2f5089a9e653302ab76", "score": "0.6168204", "text": "function getProduct(id) {\n\treturn async (dispatch) => {\n\t\tconst resp = await client.product.fetch(id);\n\t\tconsole.log(resp)\n\t\tdispatch({\n\t\t\ttype: PRODUCT_FOUND,\n\t\t\tpayload: resp,\n\t\t})\n\t\treturn resp\n\t}\n}", "title": "" }, { "docid": "44bf92e9d01dd6f10e7678472a0f2e8d", "score": "0.61666167", "text": "async function getOrdersByUser(req, res){\n try {\n const pedidos = await Order.findAll({where: {UserId: req.params.UserId}})\n res.send(pedidos)\n } catch (error) {\n res.send(error)\n }\n}", "title": "" }, { "docid": "284e537aac140f9998eed59574b28138", "score": "0.61657345", "text": "getProducts() {\n return new Promise((resolve, reject) => {\n\n\n connection.query(queries_util.getProducts,\n\n (err, resultset, fields) => {\n if (err) {\n reject('Query error:' + err.stack);\n\n }\n // Resultado en formato JSON\n let result = JSON.parse(JSON.stringify(resultset));\n\n // Si no se encuentra el usuario solicitado\n if (Object.keys(result).length === 0) {\n resolve(null);\n }\n resolve(result);\n });\n });\n }", "title": "" }, { "docid": "82d59ec30cea1242763cea27314b0480", "score": "0.61342025", "text": "getSingleProductDetail(id) {\n this.loading.show();\n //if (this.type == 'recent' || this.type == 'wishList') {\n this.config.Woocommerce.getAsync(\"products/\" + id + \"?\" + this.config.productsArguments).then((data) => {\n //this.alert.show(\"loaded\");\n this.loading.hide();\n let navigationExtras = { queryParams: { data: JSON.parse(data.body) } };\n this.navCtrl.navigateRoot(\"product-detail\", navigationExtras);\n this.shared.addToRecent(JSON.parse(data.body));\n }, err => {\n this.loading.hide();\n this.alert.show(\"Item not Available!\");\n console.log(err);\n });\n }", "title": "" }, { "docid": "670a5b0da8d7201d32eda9bb174572d4", "score": "0.6132486", "text": "function viewProducts() {\n connection.query(\"SELECT * FROM products\", function (err, res) {\n if (err) throw err;\n for (let i = 0; i < res.length; i++) {\n console.log(\n \"Id: \" +\n res[i].id +\n \" || Product: \" +\n res[i].product_name +\n \" || Price: \" +\n res[i].price +\n \" || Quantity: \" +\n res[i].quantity +\n \"\\n----------------------------------------------------------------------------\"\n );\n }\n continueManage();\n });\n}", "title": "" }, { "docid": "50112c0ee691d3545f01dc7924ab6e0e", "score": "0.60901463", "text": "async function getProductById(id) {\n try {\n const { rows: products } = await client.query(\n `\n SELECT *\n FROM products\n WHERE id = $1;\n `,\n [id]\n );\n\n // Get Stars\n const { rows: stars } = await client.query(\n `\n SELECT \n \"productId\",\n SUM(stars) / COUNT(*) AS AvgStars\n FROM reviews\n GROUP BY \"productId\"\n `\n );\n \n // Get Reviews\n const { rows: reviews } = await client.query(\n `\n SELECT \n *\n FROM reviews\n `\n );\n\n const productsWithReviews = products.map((product) => {\n product.stars = stars.filter(\n (_star) => _star.productId === product.id\n );\n product.reviews = reviews.filter(\n (_review) => _review.productId === product.id\n );\n return product;\n });\n\n return productsWithReviews;\n } catch (error) {\n throw error;\n }\n}", "title": "" }, { "docid": "e3f28fb4a5385259518ba362c4821035", "score": "0.6072969", "text": "function findProduct(id){\n\treturn productData.findProduct(product => product.id === id)\n}", "title": "" }, { "docid": "b7a97342090ea8f58964d9a3f69033c4", "score": "0.6067044", "text": "getOrderDetailByProduct(productId){\n const jwt = localStorage.getItem('token')\n return axios.get(`https://localhost:44394/api/OrderDetail/${productId}`, {headers: {Authorization: 'Bearer ' + jwt}});\n }", "title": "" }, { "docid": "88036108848a0eea7545b78d4f7a86e3", "score": "0.6063142", "text": "fetchByUser(userId) {\n\t\t\treturn FruitRating.collection().query(qb => {\n\t\t\t\tqb.where('user_id', userId);\n\t\t\t\tqb.orderBy('created_at', 'desc');\n\t\t\t}).fetch({\n\t\t\t\twithRelated: [\n\t\t\t\t\t'fruit'\n\t\t\t\t]\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "41ff25f4d0112a19ef49fae4267855b2", "score": "0.60628694", "text": "async obtenerProductor(id){\n return productorPersonaDao.obtenerProductor(id);\n }", "title": "" }, { "docid": "8efff6ffe06a77339a3447b7b351c003", "score": "0.6062773", "text": "fetchBasket(userId) {\n\t\treturn db.query(\n\t\t\"SELECT b.id, b.product_id, b.price, b.qty, p.image \" +\n\t\t\t\"FROM baskets b \" +\n\t\t\t\"INNER JOIN products p \" +\n\t\t\t\"ON b.product_id = p.id \" +\n\t\t\t\"WHERE b.user_id = ?\", [userId]\n\t\t).then(rows => {\n\t\t\treturn rows;\n\t\t});\n\t}", "title": "" }, { "docid": "c7b465e2ebe0a8a1c2dc7f386d1ce6fd", "score": "0.605878", "text": "getProductsById(id) {\n let productMatch;\n\n this.products.forEach(product => {\n if (id === product.id) {\n productMatch = product;\n }\n });\n\n return productMatch;\n }", "title": "" }, { "docid": "dedbe305ad371ab0169fe39926cdb68a", "score": "0.60468143", "text": "products({ products }) {\n products = Promise.all(\n products.map(productId => productService.getProduct(productId))\n )\n return products\n }", "title": "" }, { "docid": "cfb8c50ad933c3478232b879df1dc05b", "score": "0.6045763", "text": "function getProductById(products, id) {\n let returnedProduct = products.find(elem => {\n if (elem.productId == id) {\n\n return elem;\n }\n });\n\n if (returnedProduct == undefined) {\n console.log(\"No products found with that id\");\n }\n \n return returnedProduct;\n}", "title": "" }, { "docid": "0a3aeefcdc97951e93134041f7f3bc2f", "score": "0.60407305", "text": "function getArtOfferedByUser(userId) {\n var deferred = $q.defer();\n $http\n .post(\"/api/project/user/\" + userId + \"/artOffered\")\n .success(function(artItems) {\n deferred.resolve(artItems);\n })\n return deferred.promise;\n }", "title": "" }, { "docid": "291d1d5424bd5a6ca78a74b80099fe4e", "score": "0.60403275", "text": "function getUserOrders(user_id, success, fail) {\n request(\"GET\", `/api/v1/order/user/${user_id}/list`, success, fail);\n}", "title": "" }, { "docid": "f0b784529e2657e45b855c9343471986", "score": "0.6037423", "text": "async index({ params }, res) {\n let userItems = await User.findUserItems(db, params.userId);\n\n\t\tres.json(userItems);\n\t}", "title": "" }, { "docid": "f526e3c584493d8bc926e4f3d486c55c", "score": "0.60371935", "text": "getByUserId(db, user_id){\n return db \n .from('brand_requests')\n .where('brand_requests.user_id',user_id)\n .select('*')\n .orderBy('id','desc')\n }", "title": "" }, { "docid": "39d35f6125042556d1619920319ba3eb", "score": "0.60215217", "text": "getKidsbyUser(currentUserId) {\n console.log(`http://localhost:8088/kids_users/?userId=${currentUserId}`)\n return fetch(\n `http://localhost:8088/kids_users/?userId=${currentUserId}&expand=kid`\n ).then(response => response.json());\n }", "title": "" }, { "docid": "ca2d5aedc0519cba44a0dd699229ee7d", "score": "0.60180664", "text": "function getProducts() {\n var params = getParams();\n params[\"categoryID\"] = $scope.categoryId;\n categoryApiService.getProductsByCategoryId(params).$promise.then(function(response) {\n var result = response.result || [];\n $scope.productsList = result;\n });\n }", "title": "" }, { "docid": "119d467e0da2833060a52f90044ca1d0", "score": "0.6017367", "text": "static async getById(req, res) {\n\n try {\n const product = await productModels.findOne(\n {\n where: {id: req.params.id}\n }\n );\n\n if (!product) {\n return res.status(404).json({\n status: 404,\n message: 'product not found'\n });\n }\n \n console.log(product)\n return res.status(200).json({\n status: 200,\n data: product,\n });\n\n } catch (error) {\n return res.status(500).json({\n status: 500,\n error: error.message\n })\n }\n }", "title": "" }, { "docid": "7e8bf247e25ef4128b42fd98018a1398", "score": "0.60104764", "text": "getUser(userId) {\n return this.state.allUsers.find((user) => user.id === userId);\n }", "title": "" }, { "docid": "44534ec8b5fc47fac275589e8617baf3", "score": "0.5999177", "text": "function get(id){\n return searchUserByField('_id', id);\n}", "title": "" }, { "docid": "e2c3c6088c5b7cb3ef8b80ba398040be", "score": "0.59916234", "text": "viewProductoPorId(id) {\n return productosArray.filter((prod) => prod.id === parseInt(id))[0]\n }", "title": "" }, { "docid": "eff91163cfcf0c3e5badefe5e2bac535", "score": "0.59873104", "text": "function getItemInventoryByUserId(req, res, next) {\n services.getItemInventoryByUserId(crypto.parsedObj(req.body))\n .then(result => response.handleResponseWithLogs(req,res,true,result))\n .catch(err => response.handleErrorResponse(res, err));\n}", "title": "" }, { "docid": "cd2272d70e5fadc760bad485a4909e00", "score": "0.5987256", "text": "getUserById (req, res) {\n UserModel.findOne({_id: req.params.userId})\n .exec((err, data)=>{\n if (err) res.send(err);\n else res.json(data);\n });\n }", "title": "" }, { "docid": "ee8c04ff2a88cce844d586457f1cdf3f", "score": "0.59864646", "text": "function viewProducts(){\n\tconnection.query('SELECT * FROM products', function(err,res){\n\t\tif (err) throw err;\n\t\tfor (var i = 0; i < res.length; i++) {\n\t\t\tconsole.log('ID: ' + res[i].id + '| sku: ' + res[i].sku +' | name: ' + res[i].product_name + \" | Price: $\" + res[i].price + \" | Quantity: \" + res[i].stock_quantity);\n\t\t};\n\t\tconsole.log('\\n');\n\t\tmanagerView();\n\t});\n}", "title": "" }, { "docid": "3e02c9d0b3f1d45ef7d4353c0746a957", "score": "0.5986285", "text": "async function fetchProductWithID(id) {\n try {\n const Product = models.product \n const res = await Product.findAll({ where:{ product_id:id } }) \n return res \n } catch (error) {\n console.log(error.message)\n }\n }", "title": "" }, { "docid": "40f1e3a56b5d3629d4b8443b8216626a", "score": "0.5963222", "text": "getSingle(params) {\n return this.get(`api/users/${params.id}`);\n }", "title": "" }, { "docid": "f1a5562c9331a4f4de8ae0b40bda0989", "score": "0.5959548", "text": "static getProduct(id) {\n //since store it as string i need to parse it \n let products = JSON.parse(localStorage.getItem(\"products\"));\n //geting the item by maching id\n return products.find(product => product.id === id)\n }", "title": "" }, { "docid": "f950ceb7d1dc9c590484ce13fe919fe8", "score": "0.5949935", "text": "function getProductById(id) {\n var servCall = SmartShopService.getProduct(id);\n servCall.then(function (d) {\n $scope.singleProduct = d.data;\n $scope.updateId = $scope.singleProduct.ProductId;\n $scope.updateName = $scope.singleProduct.ProductName;\n $scope.updateCategory = $scope.singleProduct.ProductCategory;\n $scope.updateDescription = $scope.singleProduct.ProductDescription;\n $scope.updatePrice = $scope.singleProduct.ProductPrice;\n $(\"#ViewModal\").modal();\n },\n function (error) {\n $log.error('Oops! Something went wrong while fetching the Product' + error.data.ExceptionInformation);\n });\n }", "title": "" }, { "docid": "844905e6833f78dfb0647b5c0d239aac", "score": "0.5943824", "text": "function getById (id) {\n for (var key in $scope.products) {\n if ($scope.products[key]['_id'] == id) {\n return $scope.products[key]; \n } \n }\n\n return 'item not found';\n}", "title": "" }, { "docid": "4f2a98df07176b789cf26870feae5794", "score": "0.5939865", "text": "async getUserData(userid) {\n try {\n let user = await User.findAll({\n where: {\n id: {\n [Op.eq]: userid\n }\n }\n });\n return Promise.resolve(user);\n } catch (error) {\n return Promise.reject(error);\n }\n }", "title": "" }, { "docid": "04e799e65eb3ab1da3f7080bcd44fdec", "score": "0.5938289", "text": "async viewproduct(req, res) {\r\n try {\r\n let productId = req.params.productId;\r\n\r\n if (productId === undefined && productId === '') {\r\n return res.status(422).json({\r\n \"status\": 422,\r\n \"message\": 'product Id requried'\r\n });\r\n }\r\n\r\n let data = await Product.findOne({ _id: productId }).lean();\r\n\r\n return res.status(200).json({\r\n \"status\": true,\r\n \"data\": data\r\n });\r\n\r\n } catch (error) {\r\n return res.status(500).json({\r\n \"status\": false,\r\n message: error\r\n });\r\n }\r\n }", "title": "" }, { "docid": "df49dbaf74a32a1ab9dab875bb61ae97", "score": "0.5937137", "text": "getUser(req, res) {\n const userId = parseInt(req.params.userId, 10);\n return users\n .find({\n where: {\n id: userId,\n },\n })\n .then((user) => {\n if (user) {\n res.status(200).send(user);\n }\n return res.status(404).send({ message: 'User not found' });\n })\n .catch(error => res.status(500).send(error));\n }", "title": "" }, { "docid": "4d09d63d88b6882a2ce1b0e33c9a3815", "score": "0.5928183", "text": "function getProduct(id) {\n for (i = 0; i < products.length; i++) {\n if (products[i].productId == id)\n return products[i].productName;\n }\n}", "title": "" }, { "docid": "77c8c6e838203493acbff16b7124538e", "score": "0.5927669", "text": "selectProd(id) {\n return this.PRODUCTS.filter(prod => prod.id === parseInt(id))[0];\n }", "title": "" }, { "docid": "474e372f7c2d5b0092d02b023e920849", "score": "0.59241384", "text": "function getProducts() {\n var d = $q.defer();\n $http.get(APP_URL + '/getProducts').success(function (response) {\n d.resolve(response);\n });\n return d.promise;\n }", "title": "" }, { "docid": "c75d61e7ce4d1c7616d91f31fee852e0", "score": "0.591867", "text": "getUserById(id) {\n let user;\n for (let i = 0; i < this.users.length; i++) {\n if (this.users[i].id == id) {\n user = this.users[i];\n break;\n }\n }\n return user;\n }", "title": "" }, { "docid": "3284c7017fa55ef6b76ddf6ab077a55d", "score": "0.5910681", "text": "function searchProductById(id) {\n let product;\n let productById;\n\n catalog.forEach(function(item) {\n if(item.id == id) {\n product = item;\n }\n })\n\n productById = new Promise(function(resolve, reject) {\n setTimeout(function() {\n if(product !== undefined) {\n resolve(product);\n }\n else {\n console.log(id);\n reject(\"No product with id: \" + id);\n }\n }, 1000);\n });\n\n return productById;\n }", "title": "" }, { "docid": "2501a6b3d5376ca8b623585ee52ab59a", "score": "0.59104705", "text": "getUser(req, res, next) {\n const user = users.find(user => user.id == req.params.id);\n\n res.json(user);\n }", "title": "" }, { "docid": "b78795353dffa2f4db08d07affad4cce", "score": "0.5909956", "text": "async function productos({ id }, args, { prisma }) {\n\treturn await prisma.pedido.findOne({ where: { id } }).productos();\n}", "title": "" }, { "docid": "d84e3f33e00daea9607bcc0768911b1b", "score": "0.59096247", "text": "async getCartItems(userId) {\n let account;\n\n return await Customer.findOne({ _id: userId })\n .then((acc) => {\n if (!acc) {\n return { error: 'Account not found' };\n }\n account = acc;\n return { cart: acc.shopping_cart };\n })\n .catch((err) => {\n return { error: err };\n });\n }", "title": "" }, { "docid": "492adaa9761cb1efcb6fad3133df209d", "score": "0.59058917", "text": "function obtenerProducto(id){\n return Producto.findById(id)\n}", "title": "" }, { "docid": "a936acc0fec5e7060a39f8703a8e4ee1", "score": "0.5903516", "text": "getAllProductData(){\n const { currentUser, product } = this.props;\n const { selectedSize, selectedQuantity } = this.state;\n\n return {\n userId: currentUser ? currentUser.id : null,\n product,\n productId: product.id,\n selectedSize,\n selectedQuantity\n };\n }", "title": "" }, { "docid": "46c13e0c7849b73ccb8385491f6d6f78", "score": "0.59012944", "text": "async function getCartByUserIdService(id) {\n const cart = await Cart.find({ user_id: id }).exec();\n if (!cart) throw CartNotExistErr();\n return cart;\n}", "title": "" }, { "docid": "52186d7f7cdc245634a152b46b3a107f", "score": "0.5901159", "text": "async function getListByUserId(userId) {\n if (userId) {\n\n // Find by Primary Key\n return await List.findAll({\n where: { userId },\n\n attributes: ['id', 'name'],\n\n order: [\n ['name', 'ASC']\n ]\n });\n }\n return null;\n}", "title": "" }, { "docid": "4e835dd385edeabf3b7567374af3d385", "score": "0.590042", "text": "async showOneProduct (req, res) {\n\t\tlet {sku} = req.params;\n\t\ttry {\n\t\t\tconst oneProduct = await products.findOne({SKU:sku});\n\t\t\tres.send(oneProduct);\n\t\t}\n\t\tcatch(e){\n\t\t\tres.send({e});\n\t\t}\n\t}", "title": "" }, { "docid": "1a1648b01adc938b42296df5de3ad7ed", "score": "0.59000987", "text": "findProducts() {\n var self = this;\n var products = [];\n\n self.initShoppingCart();\n self.req.session.shoppingCart.forEach(function(elem) {\n var product = { productId : elem.productId, quantity : elem.quantity };\n products.push(product);\n });\n\n return self.res.status(200).json(products);\n }", "title": "" }, { "docid": "1fab1e988d3837daef04ce024fb79a37", "score": "0.59000784", "text": "getActiveProducts() {\n return new Promise((resolve, reject) => {\n\n\n connection.query(queries_util.getActiveProducts,\n\n (err, resultset, fields) => {\n if (err) {\n reject('Query error:' + err.stack);\n\n }\n // Resultado en formato JSON\n let result = JSON.parse(JSON.stringify(resultset));\n\n // Si no se encuentra el usuario solicitado\n if (Object.keys(result).length === 0) {\n resolve(null);\n }\n resolve(result);\n });\n });\n }", "title": "" } ]
68e3af2603ce6d0f6fe58ac3ee2840f0
Clear all open alerts.
[ { "docid": "0c16d9b6e2fde1d2a58d3cac30b966ad", "score": "0.78128016", "text": "clearAlerts() {\n if (this['alertPopups'] && this.scope_) {\n for (var i = 0; i < this['alertPopups'].length; i++) {\n if (this['alertPopups'][i]['canClose']) {\n clearTimeout(this['alertPopups'][i]['timeout']);\n }\n }\n\n this['alertPopups'] = this['alertPopups'].filter((alertPopup) => !alertPopup['canClose']);\n apply(this.scope_);\n }\n }", "title": "" } ]
[ { "docid": "cf827243e25eb6fc5db39a409b992562", "score": "0.79062206", "text": "clearAlerts() {\n this['alertArray'].length = 0;\n AlertManager.getInstance().clearAlerts();\n }", "title": "" }, { "docid": "22bf689a9c4382c53fea7b2cfa2f7158", "score": "0.74654186", "text": "clearAlerts() {\n\t\t\tcryAlert.innerText = '';\n\t\t\tpukeAlert.innerText = '';\n\t\t\tyawnAlert.innerText = '';\n\t\t}", "title": "" }, { "docid": "089f228094fcc60be57527d986182833", "score": "0.6862261", "text": "function clear_alerts_onclick() {\n\t// Before proceeding further, ask the user to confirm it one more time.\n\tvar r = confirm(\"Do you want to clear all the alerts?\");\n\n\tif (r == false) {\n\t\treturn;\n\t}\n\t\n\t// Send the Supply & Demand Alert Clear command to the server.\n\t// Send it to the remote server via XHR (XML HTTP Request).\n\tvar xhr = new XMLHttpRequest();\n\tvar url = window.location.href + \"?request=ClearSupplyAndDemandData\";\n\txhr.open('GET', url, true);\n\n\t// Call a function when the state changes.\n\txhr.onreadystatechange = function() {\n\t\tif(xhr.readyState == 4 && xhr.status == 200) {\n\t\t\t// Clear the table contents.\n\t\t\tdocument.getElementsByTagName(\"tbody\")[0].innerHTML = \"\";\n\t\t\t// Disable the clear button.\n\t\t\tdocument.getElementById(\"clearAlerts\").disabled = true;\n\t\t\tdocument.getElementById(\"clearAlerts\").className = \"clearAlertsInactive\";\t\n\t\t\t// Clear the local data structure as well.\n\t\t\tsupplyAndDemandAlertData = [];\n \t}\n\t}\n\t\n\txhr.send(null);\n}", "title": "" }, { "docid": "e0708ac892946e7d22abf30d4a58e6e9", "score": "0.67823917", "text": "publishClearAllAlert() {\r\n const alertTitle = \"INFO:\";\r\n const alertDescription = \"Your recent calculation has been deleted\";\r\n const alertNote = \"You can now start entering a new calculation\";\r\n\r\n const newAlert = this.__buildAlert(alertTypeEnum.INFO, alertTitle, alertDescription, alertNote, false);\r\n\r\n this.__parseMessageToDocument(newAlert);\r\n this.__waitAndReturnToDefaultAlert(2500);\r\n }", "title": "" }, { "docid": "3b3a141441fe09770e459335cf0d7646", "score": "0.6777123", "text": "clearAll() {\n for (channel in this._handlers) {\n this.off(channel);\n }\n }", "title": "" }, { "docid": "83ac58d431dd60d65d7c0cefa04ab06d", "score": "0.6761718", "text": "clearAlerts() {\n this.setState({\n alerts: []\n });\n }", "title": "" }, { "docid": "d52f62e57ed51c5a8ef6256b800b1f0c", "score": "0.66545457", "text": "function clearAlerts() {\n document.getElementById(\"alerts\").innerText = \"\";\n }", "title": "" }, { "docid": "f05cff4cd47918ad9e066886e097991a", "score": "0.66303974", "text": "function clear() {\n let name_alert = document.getElementById(\"name_alert\");\n let email_alert = document.getElementById(\"email_alert\");\n let phone_alert = document.getElementById(\"phone_alert\");\n let radio_alert = document.getElementById(\"radio_alert\");\n let checkbox_alert = document.getElementById(\"checkbox_alert\");\n let message_alert = document.getElementById(\"message_alert\");\n let alerts = [name_alert, email_alert, phone_alert, radio_alert, checkbox_alert, message_alert];\n alerts.forEach(alert => alert.innerHTML = \"\");\n}", "title": "" }, { "docid": "06ded6fe7d738d2696fd91ee24554384", "score": "0.66051704", "text": "clear() {\n\t\tthis.watchList.forEach((item) => item.removeWatcher());\n\t\tthis.watchList = [];\n\n\t\tchannel.appendLocalisedInfo('cleared_all_watchers');\n\t\tthis._updateStatus();\n\t}", "title": "" }, { "docid": "bb7379293a623e6e68b640bc4cf04243", "score": "0.6489115", "text": "clear() {\n log.debug('Removing all menu popup windows.');\n for (const win of this.menuWindows.values()) {\n win.destroy();\n }\n }", "title": "" }, { "docid": "6511f3b3105a589e0d688adda3edb032", "score": "0.64497256", "text": "closeAll() {\n this._closeDialogs(this.openDialogs);\n }", "title": "" }, { "docid": "6511f3b3105a589e0d688adda3edb032", "score": "0.64497256", "text": "closeAll() {\n this._closeDialogs(this.openDialogs);\n }", "title": "" }, { "docid": "c4e0723644b775661b12335d1733897e", "score": "0.6439451", "text": "clearAlert() {\n const currentAlert = document.querySelector('.alert');\n\n if (currentAlert) {\n currentAlert.remove();\n }\n\n }", "title": "" }, { "docid": "c879729bf21ca1054998eab221e0e324", "score": "0.6411484", "text": "clearAll() {\n this.traceAggregator.clear()\n this.eventAggregator.clear()\n\n this._clearSeenErrors()\n }", "title": "" }, { "docid": "8bd67d38bc0f658a217096afaed71dd1", "score": "0.6370134", "text": "closeAll() {\n this._closeDialogs(this.openDialogs);\n }", "title": "" }, { "docid": "75dc56dd8791f61a7d4eabd6688babd1", "score": "0.6324005", "text": "clearAlert() {\n const currentAllert = document.querySelector('.store-msg');\n if(currentAllert){\n currentAllert.remove();\n }\n }", "title": "" }, { "docid": "0b2af58f0f5a6cb8544b3c305bf95234", "score": "0.6310787", "text": "static clear() {\n while (notifications.length > 0) {\n notifications[0].hide();\n }\n }", "title": "" }, { "docid": "6e48190fa33759a280242abd20519848", "score": "0.6283309", "text": "closeAll() {\r\n let i = this.openDialogs.length;\r\n while (i--) {\r\n this.openDialogs[i].close();\r\n }\r\n }", "title": "" }, { "docid": "c4a9a6de02876fafa82d4f2043d373e3", "score": "0.6219953", "text": "function clearAllTOs() {\r\n\tfor (key in TOs) {\r\n\t\tvar toItem = TOs[key];\r\n\t\tfor (var i=0; i<toItem.length; i++) {\r\n\t\t\tif (toItem[i] > -1) {\r\n\t\t\t\tclearTimeout(toItem[i]);\r\n\t\t\t\tqueriesTriggered--;\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\t\r\n\tTOs = {};\r\n}", "title": "" }, { "docid": "1b33e09a4ac0e8e695845526358da500", "score": "0.61987126", "text": "function clear() {\r\n __onfireEvents = {};\r\n }", "title": "" }, { "docid": "a511cfe7d76df453705ff2b8284021d9", "score": "0.61850435", "text": "clearAll() {\n this.filters = {};\n this.filterSummary = [];\n this.activeQuery = null;\n this.trackUi('Clear all filters and queries');\n }", "title": "" }, { "docid": "f8b3e79b1c008b582da37776b6156a7e", "score": "0.61603755", "text": "function clearAll() {\n messageTabs({\"clear\":true});\n globals = [];\n drawSubstitutions();\n}", "title": "" }, { "docid": "fb4af1a92312f42c947868ee58e6ac95", "score": "0.61403126", "text": "function clearAllZWDTimers()\n{\n\tfor (i = 0; i < g_timerAPStatus.length; i++) {\n\t\tclearTimeout(g_timerAPStatus[i]);\n\t}\n\tg_timerAPStatus = [];\n}", "title": "" }, { "docid": "5a3b4adc9ad053cb320379dfe0f3abe3", "score": "0.6129304", "text": "function clearAlerts() {\n $('.alert-msg, .success-msg').remove();\n}", "title": "" }, { "docid": "43d45d48a2ed09cc6596047ec0343fdb", "score": "0.61164623", "text": "function ClearAll() {\n\tlocalStorage.clear();\n\tdoShowAll();\n}", "title": "" }, { "docid": "4d74294278827c2e96c2cf4b5343cb9f", "score": "0.6106516", "text": "function clearMessages() {\n clearNotificationMessage();\n clearErrorMessage();\n }", "title": "" }, { "docid": "3213d9e6494edd2adb1b8f13d0d430e0", "score": "0.6069258", "text": "static clearAll() {\n _timers.forEach(el => el.stop())\n }", "title": "" }, { "docid": "8a47dd7337d23f52759339990c4cc794", "score": "0.60651046", "text": "function Tpl_msgClearAll(){\n\n $(\"#Cala_alertMessages\").html('');\n\n}", "title": "" }, { "docid": "3f1a505ae980c17c296ad977d85dcd10", "score": "0.6011249", "text": "function clearAll(){\n localStorage.clear();\n init();\n }", "title": "" }, { "docid": "162e7e44c0d842105aa322764fdefa2e", "score": "0.6010201", "text": "function clearAlerts(alertType, flagClearAll) {\n\n // Hide alert details pop up if displayed\n $(\"#tooltip\").hide();\n\n // update global vars - for alerts\n var requestData = {\n // \"alertType\" : -1,\n \"clearAll\" : flagClearAll\n };\n\n if (\"severe\" == alertType.toLowerCase()) { // Severe\n requestData.alertType = 0;\n } else if (\"error\" == alertType.toLowerCase()) { // Error\n requestData.alertType = 1;\n } else if (\"warning\" == alertType.toLowerCase()) { // Warning\n requestData.alertType = 2;\n } else { // All\n requestData.alertType = -1;\n }\n\n $.getJSON(\"clearAlerts\", requestData, function(data) {\n\n // call system alerts callback handler\n getSystemAlertsBack(data);\n\n if (window.location.pathname.toLowerCase().indexOf('clusterdetail.html') != -1) {\n var objForceUpdateForWidgets = {\n \"ClusterDetails\" : {},\n \"ClusterMembers\" : {},\n \"ClusterMembersRGraph\" : {},\n \"ClusterKeyStatistics\" : {},\n \"ClusterJVMPauses\" : {},\n \"ClusterWANInfo\" : {},\n \"ClusterMemoryUsage\" : {},\n \"ClusterDiskThroughput\" : {}\n };\n // Call forced pulse update function\n forcePulseDataUpdate(objForceUpdateForWidgets);\n } else if (window.location.pathname.toLowerCase().indexOf('memberdetails.html') != -1) {\n var objForceUpdateForWidgets = {\n \"MemberDetails\" : {\n \"memberId\" : memberId,\n \"memberName\" : memberName\n }\n };\n // Call forced pulse update function\n forcePulseDataUpdate(objForceUpdateForWidgets);\n }\n }).error(repsonseErrorHandler);\n\n $(\"#allAlertScrollPane\").addClass(\"hide-scroll-pane\");\n}", "title": "" }, { "docid": "c58719cce66326164e0c1f0c899645bb", "score": "0.59760725", "text": "function sendClearAllMsg() {\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n chrome.tabs.sendMessage(tabs[0].id, {action: \"clearAll\"});\n });\n}", "title": "" }, { "docid": "481003f566bf7bf9066effcdd01d136a", "score": "0.59746754", "text": "function clearAllTimers() { \n clearInterval(play_signals_id); // Intervals\n clearTimeout(first_signal_id); // Timeouts\n clearTimeout(game_timeout_id);\n // console.log(\"In clear all timers.\"); // for debugging \n }", "title": "" }, { "docid": "f1a7a5d5b9d5b94697bda6f60a121c64", "score": "0.59729093", "text": "function clearAll(){\n return app$.qClearAll();\n }", "title": "" }, { "docid": "8decd65f1517030bd75a5342d97f422f", "score": "0.5931473", "text": "function _dismissAll() {\r\n\r\n var i = _messages.length;\r\n\r\n while (i--) {\r\n _messages[i].dismiss();\r\n }\r\n\r\n }", "title": "" }, { "docid": "778b0ea2af310d134146667b381a0f76", "score": "0.59293133", "text": "close() {\n for (const [key, watcher] of this._watchers) {\n watcher.close();\n }\n\n this._watchers.clear();\n }", "title": "" }, { "docid": "30826653b6c00318ae760bee50257b94", "score": "0.59272486", "text": "reset() {\n this.log(\"Reseting Activity Watcher\");\n\n /* close each watch */\n this.watches.forEach(watch => {\n this.log(`Closing ${ watch.name }`);\n watch.close();\n });\n\n /* stop the print loop */\n clearInterval(this.startInterval);\n\n /* reset all the arrays */\n this.printers = [];\n this.watches = [];\n this.hooks = [];\n this.printQueue = [];\n\n this.log(\"Finished Reseting Activity Watcher\");\n }", "title": "" }, { "docid": "340635c185e980a8769bc9cc82018143", "score": "0.5920767", "text": "async function clearNotificationAlarms() {\n\treturn new Promise(async (resolve, reject) => {\n\t\tchrome.alarms.getAll(async (alarms) => {\n\t\t\tfor (let alarm of alarms) {\n\t\t\t\tif (alarm.name.startsWith('Notify')) {\n\t\t\t\t\tawait clearAlarm(alarm.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn resolve();\n\t\t});\n\t});\n}", "title": "" }, { "docid": "6d822fef74f3ce4b62a9512ef3cc3658", "score": "0.591293", "text": "function clearAllLocalStoreCurses() {\n\tlocalStorage.clear();\n}", "title": "" }, { "docid": "5b2460c6a6995947d9317c8f49a7a769", "score": "0.591196", "text": "clear(toastId) {\n // Call every toastRef manualClose function\n for (const toast of this.toasts) {\n if (toastId !== undefined) {\n if (toast.toastId === toastId) {\n toast.toastRef.manualClose();\n return;\n }\n }\n else {\n toast.toastRef.manualClose();\n }\n }\n }", "title": "" }, { "docid": "74ac52fd57de640c827ea50d632c6808", "score": "0.589302", "text": "function clearAll() {\n clearEnemyPlanes();\n clearTanks();\n clearBombs();\n clearMachinegun();\n clearCoins();\n}", "title": "" }, { "docid": "decb3119246c59a84290fa6b628ea0d6", "score": "0.5887723", "text": "closeAll() {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }", "title": "" }, { "docid": "963d5f5c811200cbe898ec1c66159ab8", "score": "0.5884783", "text": "function clearTimers() {\n intervalArray.forEach(function(element, index, array) {\n window.clearInterval(element);\n });\n }", "title": "" }, { "docid": "66ecf45ceba9a60207cc1ca95b1cf3a9", "score": "0.588091", "text": "refreshAlertsList() {\n this.alerts = this.show.all ? _.clone(this.allAlerts) : this.allAlerts.filter((alert) => alert.isOwnAlert());\n this.order = DEFAULT_ORDER;\n }", "title": "" }, { "docid": "4aa8611d86b14357f78442cbcaf30094", "score": "0.5879694", "text": "function clearAllReports(section){\n\n // clear suggestions\n clickButtons(section, \"reject-report\");\n\n // clear freewrite reports\n clickButtons(section, \"clear-freewrite-report\");\n\n // clear other reports\n clickButtons(section, \"clear-report\");\n}", "title": "" }, { "docid": "cd6a5dfe4eac8b47f72699263421f4ae", "score": "0.5874837", "text": "function clearAll(action) {\n // JqueryUI dialogue widget\n\t$( \"#dialog-confirm\" ).dialog({\n\t\tresizable: false,\n\t\theight:250,\n\t\tmodal: true,\n\t\tbuttons: {\n\t\t\t\"Clear Teams\": function() {\n performAction(action, \"\");\n\t\t\t\t$( this ).dialog( \"close\" );\n\t\t\t},\n\t\t\tCancel: function() {\n\t\t\t\t$( this ).dialog( \"close\" );\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "706d2795bff454a76ec7cf1c233aa0a2", "score": "0.58720076", "text": "clear() {\n if (this.subscriptions != null) {\n this.subscriptions.dispose()\n }\n this.subscriptions = new CompositeDisposable()\n this.handlersByEventName = {}\n }", "title": "" }, { "docid": "3be1bc3c203aa79e558efd984eb1ec01", "score": "0.5866666", "text": "clearWatchers() {\n\t\tthis.watch.clear();\n\t}", "title": "" }, { "docid": "d309c9a798d865e7e2d2264d300a26fc", "score": "0.58654714", "text": "function clear() {\n removeAll();\n }", "title": "" }, { "docid": "a9646756503252680ed01b8e53379996", "score": "0.5859221", "text": "clear() {\n this.clearPacketArray(this.allPackets);\n this.allPackets = [];\n this.activePackets = [];\n this.unansweredPacketNumbers = [];\n this.activeAcks = [];\n this.activeNacks = [];\n this.receivedAcks = [];\n\n for (var i=0; i < this.timers.length; i++) {\n this.timers[i].remove();\n }\n this.timers = [];\n\n this.sendChars = [];\n this.resentPackets = 0;\n this.receivedMessage = '';\n this.registry.set('receivedMessage', '');\n }", "title": "" }, { "docid": "0c255b39873fde8eeee5eb648a22d58e", "score": "0.5849385", "text": "function clearAll() {\n\n clearAllHasBeenClicked = 1;\n\n hoverInterestsButtons = 1;\n hoverEducationButtons = 1\n hoverProfileButtons = 1;\n hoverExperienceButtons = 1;\n\n clearProfile();\n clearEducation();\n clearExperience();\n clearSkills();\n clearInterests();\n\n clearAllHasBeenClicked = 0;\n\n refreshAllBars();\n\n}", "title": "" }, { "docid": "6538ce12cf4701cb69b13d3cfd2d1911", "score": "0.58484507", "text": "function clearMonitors() {\n\n var monitors = [ downloadMonitor.intervalId, labelMonitorIntervalId];\n\n while (0 < monitors.length) {\n \n var monitor = monitors.pop();\n if ( null !== monitor) {\n clearInterval(monitor);\n monitor = null;\n }\n }\n\n monitors = null;\n}", "title": "" }, { "docid": "5afa39000653bed228448f7044b00d7f", "score": "0.5836815", "text": "function clearAll() {\n localStorage.clear();\n location.reload();\n}", "title": "" }, { "docid": "76066db2162fc838a1aad1086814a2b9", "score": "0.5823086", "text": "function clearAll(){\n clearFluid();\n clearBlocks();\n clearSources();\n}", "title": "" }, { "docid": "5a9302f20eea70024b1c26ef941e0f66", "score": "0.5818475", "text": "function closeAllAlerts(){\r\n\tvar tDiv = document.getElementsByTagName(\"div\");\r\n\tvar noeud = \"\";\r\n\tif (document.all){\r\n\t for (var n=0; n<tDiv.length; n++) {\r\n\t \tnoeud = String(tDiv[n].getAttributeNode(\"class\").nodeValue);\r\n\t if (noeud.search(/alertControl/g)>=0) {\r\n\t tDiv[n].setAttribute('class', 'alertControlHidden');\r\n\t\t\t tDiv[n].setAttribute('className', 'alertControlHidden');\r\n\t }\r\n\t }\r\n\t}else{\r\n\t for (var n=0; n<tDiv.length; n++) {\r\n\t \tnoeud = String(tDiv[n].getAttribute(\"class\"));\r\n\t if (noeud.search(/alertControl/g)>=0) {\r\n\t tDiv[n].setAttribute('class', 'alertControlHidden');\r\n\t\t\t tDiv[n].setAttribute('className', 'alertControlHidden');\r\n\t }\r\n\t }\r\n\t}\r\n}", "title": "" }, { "docid": "87240d9623d246fa311fb848fb8ac8e7", "score": "0.5807376", "text": "function Clear ()\n\t{\n\t\tthis.SessionPool.DeleteContainer( this );\n\n\t\tvar TrackerNames = ( new VBArray( this.Trackers.Keys() ) ).toArray();\n\t\tfor ( var i = 0; i < TrackerNames.length; ++i )\n\t\t\tthis.Trackers( TrackerNames[i] ).Clear();\n\t}", "title": "" }, { "docid": "c307ed77760f4263efb01eede3a8068d", "score": "0.58045465", "text": "clearAll() {\n // Clear result array\n this.auditResults = [];\n // Reinitiate to page 1\n this.currentPage = 0;\n // Clear file input\n $(\"#fileToNotary\").val(null);\n }", "title": "" }, { "docid": "cafdea5e0e70d4afadf7d40d864878b9", "score": "0.5801099", "text": "static clear() {\n\t\t\tRestLog.messageLog = [];\n\t\t\tthis.forceUpdate();\n\t\t}", "title": "" }, { "docid": "128de5fb4a32b9461ce72c566f88520b", "score": "0.5798119", "text": "function clearAll() {\n\t// clear text areas \n\tclear(output);\n\tclear(errOutput);\n}", "title": "" }, { "docid": "dc7c55619400127a0ad0a0b2c5415cd3", "score": "0.579096", "text": "function clearAllCookie() {\n setCookie(g_cookie_user_id_name, '', 0);\n setCookie(g_cookie_connect_page_id_name, '', 0);\n setCookie(g_maximize_flg_name, '', 0);\n\n //dispatch event to check in client\n createDispatchEvent('webchat_clear_event');\n}", "title": "" }, { "docid": "c85ac8263639b529ebd4d1e50e161ec3", "score": "0.57889813", "text": "clearAllTodos() {\n appStore.allTodoKeys.forEach(key => {\n db.ref(`todos/${key}`).remove();\n });\n\n appStore.toggleConfirmModalStatus();\n }", "title": "" }, { "docid": "f6eef18d283d3c8a421975b3f2f530aa", "score": "0.57840884", "text": "clearAll() {\n this.old.clear();\n this.young.clear();\n }", "title": "" }, { "docid": "8e6fc4b53adf21fb5b1388f334bb748b", "score": "0.5773245", "text": "destroy() {\n this.am_.unlisten(EventType.ALERT, this.handleAlert_, false, this);\n this.am_ = null;\n this.scope = null;\n }", "title": "" }, { "docid": "ba8dcc736834d1c209210272e4402d22", "score": "0.5767399", "text": "async function clearNotifications() {\n return await Notifications.cancelAllScheduledNotificationsAsync();\n}", "title": "" }, { "docid": "386ff9a4483c30c696875ededf5b3cee", "score": "0.5764656", "text": "function clearAll() {\n io.sockets.to('stations').emit('clear', '');\n}", "title": "" }, { "docid": "d8a060bd9f5be4bbc9b56ecbc8064b7f", "score": "0.5753922", "text": "clear() {\n this._eventsStash = [];\n }", "title": "" }, { "docid": "0cae49b422d52390fef9c770ab597fbe", "score": "0.5747185", "text": "clear()\n {\n this._exceptionsBySelector.clear();\n this._exceptions.clear();\n }", "title": "" }, { "docid": "89b6085bc7ccbb21dae252b6e084edbf", "score": "0.57402736", "text": "clear() {\n // Delete one by one so that we send\n // the appropriate signals.\n const keyList = this.keys();\n for (let i = 0; i < keyList.length; i++) {\n this.delete(keyList[i]);\n }\n }", "title": "" }, { "docid": "d4c87c061b6a303494fc867ba32081f9", "score": "0.57354057", "text": "clearIntervals() {\n this.intervals.forEach(interval => {\n clearInterval(interval);\n });\n this.intervals = [];\n }", "title": "" }, { "docid": "3a3bd9c361ad33be8c63e3cba48e364a", "score": "0.5727127", "text": "function clearAll(){\n oneshotXHR.abort();\n input.value = \"\";\n setHash(\"q=\");\n gc();\n clearResultsDOM();\n toggleClearButton(false);\n }", "title": "" }, { "docid": "0372d1d555ec65705998ef32b39a14f8", "score": "0.5723971", "text": "clear() {\n // Remove all messages\n this.__log.innerHTML = \"\";\n }", "title": "" }, { "docid": "7aef097fc0b58d933d380cf837ff6f9d", "score": "0.5714202", "text": "function clearAll() {\n localStorage.clear();\n}", "title": "" }, { "docid": "1d3a48033773ed149aba8f84aec1eeb1", "score": "0.57088053", "text": "function clearIWs() {\n for (var i = 0; i < infowindows.length; i++) {\n infowindows[i].close();\n }\n}", "title": "" }, { "docid": "e938a88334c3e5cf6e88a4c3daecb3bc", "score": "0.5707694", "text": "function clear() {\n addedCount = 0;\n activeCount = 0;\n trackedFiles = {};\n }", "title": "" }, { "docid": "596b287fa74a4f4608d276b82a3f51f2", "score": "0.56977195", "text": "function clearAllTimeout() {\r\n\t\tvar id = window.setTimeout(function () {}, 0);\r\n\t\twhile (id > 0) {\r\n\t\t\t// will do nothing if no timeout with id is present\r\n\t\t\twindow.clearTimeout(id);\r\n\t\t\tid = id - 1;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9ea9acd3e4e41d5159d17ee54b8e2cc9", "score": "0.56925815", "text": "static deleteAllFromUI() {\n document.querySelector(selectors.clearId).addEventListener(\"click\", () => {\n StorageController.deleteAllFromLS();\n });\n }", "title": "" }, { "docid": "5bb7cc704958e90ce6923f9133559eec", "score": "0.56894696", "text": "clearAllTransactions() {\n // REMOVE ALL THE TRANSACTIONS\n this.transactions = new Array();\n \n // MAKE SURE TO RESET THE LOCATION OF THE\n // TOP OF THE TPS STACK TOO\n this.mostRecentTransaction = -1; \n this.numTransactions = 0; \n }", "title": "" }, { "docid": "de8c8c2b49c095686b2d41b4bb2856d1", "score": "0.5688535", "text": "function clearEvents() {\r\n alert(\"All calandar events and local storage will now be cleared!\");\r\n localStorage.clear();\r\n initializeExampleArray();\r\n window.location.reload();\r\n}", "title": "" }, { "docid": "958fc53345b6d23e3d3d1524ab544a26", "score": "0.56857944", "text": "function clear() {\n\tfor( let t in runningTimers ) clearTimeout( runningTimers[t] );\n}", "title": "" }, { "docid": "aedb275a055f0a2aa1eafda027da5fd9", "score": "0.5668251", "text": "function clear() {\n\t\tZotero.DB.beginTransaction();\n\t\tZotero.DB.query(\"DELETE FROM transactionSets\");\n\t\tZotero.DB.query(\"DELETE FROM transactions\");\n\t\tZotero.DB.query(\"DELETE FROM transactionLog\");\n\t\t_currentID = null;\n\t\t_activeID = null;\n\t\t_activeEvent = null;\n\t\t_maxID = null;\n\t\tZotero.DB.commitTransaction();\n\t}", "title": "" }, { "docid": "a753b81897b85eb2882e3c9694062292", "score": "0.5650263", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "4baa896dbd1b855f501e327edbed3d87", "score": "0.5640991", "text": "function unwatchAll() {\n var path;\n \n for (path in _watcherMap) {\n if (_watcherMap.hasOwnProperty(path)) {\n unwatchPath(path);\n }\n }\n}", "title": "" }, { "docid": "4b68173ff908fee7a2a25f2ee8017824", "score": "0.5626715", "text": "clear() {\n // Delete one by one to emit the correct signals.\n const keyList = this.keys();\n for (let i = 0; i < keyList.length; i++) {\n this.delete(keyList[i]);\n }\n }", "title": "" }, { "docid": "1382a5f8c48a338e9cc175de8c636b08", "score": "0.56237435", "text": "clear() {\n // Delete one by one to emit the correct signals.\n let keyList = this.keys();\n for (let i = 0; i < keyList.length; i++) {\n this.delete(keyList[i]);\n }\n }", "title": "" }, { "docid": "171ab494325b90815ccbc57832da012a", "score": "0.56228906", "text": "function clearAll() {\n calculator.displayValue = '0';\n calculator.first = null;\n calculator.waiting = false;\n calculator.operator = null;\n}", "title": "" }, { "docid": "f6ce0af549460ffb07d95f8fc37f697e", "score": "0.56205916", "text": "destroy_() {\n AlertManager.getInstance().unlisten(EventType.ALERT, this.handleAlertEvent_, false, this);\n AlertManager.getInstance().unlisten(EventType.CLEAR_ALERTS, this.clearAlerts, false, this);\n\n if (this.dupeDelay_) {\n this.dupeDelay_.dispose();\n this.dupeDelay_ = null;\n }\n\n this.timeout_ = null;\n this.scope_ = null;\n }", "title": "" }, { "docid": "f9b928ad02f9c0c369ed6e11dd144698", "score": "0.562042", "text": "function clearAll() {\r\n\r\n\t// clear the panel display and any selected buttons\r\n\tif (isDisplay == \"yes\") {\r\n\t\tif (thisBldg == \"Seattle\") {\r\n\t\t\tclearDisplay()\r\n\t\t\tclearButton(bldgClicked, 'b')\r\n\t\t} else {\r\n\t\t\tvar clearFloor = floorName.substring(0, 1)\r\n\t\t\tsetDisplay(thisBldg, clearFloor)\r\n\t\t}\r\n\r\n\t\tclearButton(clicked)\r\n\t}\r\n\t\r\n\t// reset variables\r\n\tclearVar()\r\n\r\n\t// clear data frame\r\n\tvar clearFile = thisPath + 'data.html'\r\n\r\n\tif (this.data.location != clearFile) this.data.location = clearFile\r\n}", "title": "" }, { "docid": "2d6e0fedccd9e42932d8ba98f69f8841", "score": "0.56173337", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "2d6e0fedccd9e42932d8ba98f69f8841", "score": "0.56173337", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "5be0890ad6c1a4fcaa6ca1691bf73c74", "score": "0.5613233", "text": "function resetAlert () {\n\talertify.set({\n\t\tlabels : {\n\t\t\tok : \"OK\",\n\t\t\tcancel : \"Cancel\"\n\t\t},\n\t\tdelay : 5000,\n\t\tbuttonReverse : false,\n\t\tbuttonFocus : \"ok\"\n\t});\n }", "title": "" }, { "docid": "730c478ed112ac8c1e93960d8c645cf2", "score": "0.5600189", "text": "clear() {\n this.clearFrames();\n this.configs.clear();\n this.appResults.clear();\n }", "title": "" }, { "docid": "9d2685e2adb5b3be1a253ab9e5c5e830", "score": "0.5597132", "text": "function allClear() {\n screen.html('');\n mathScreen = '';\n }", "title": "" }, { "docid": "26fe2082c5d58d0fb1adf6cf74fd72ca", "score": "0.5596449", "text": "function clearAllSchedHistory(){\n}", "title": "" }, { "docid": "4fa593ac7a62ebcd8b1e023583d2f4e1", "score": "0.5593666", "text": "clearCharts() {\n Promise.all(this._chartsPromises).then(function (charts) {\n for (let index in charts) {\n charts[index].destroy()\n }\n });\n this._chartsPromises = [];\n }", "title": "" }, { "docid": "812a89507865eccf0dcab4dff70b8689", "score": "0.55908495", "text": "clearAll () {\n return this._transact(async db => db.clear())\n }", "title": "" }, { "docid": "03252f10f955690c8fcfaf0c58b4bfdf", "score": "0.55869967", "text": "clearAllStateCaches() {\n const localStorageManager = LocalStorageManager.getInstance();\n localStorageManager.clearAllStateCaches(this.cacheNs);\n }", "title": "" }, { "docid": "38475597c0789dfc41e37adbdc6943c3", "score": "0.55836904", "text": "function reset() {\n\n windows.forEach( function (w) {\n w.contentWindow.close();\n } );\n\n windows.length = 0;\n}", "title": "" }, { "docid": "f05bb285f9271d1b4773b0759a56ecdf", "score": "0.5578254", "text": "resetAll() {\n this.objects.forEach(object => object._reset());\n }", "title": "" }, { "docid": "0ae211548977096a08b4c1609161f2a8", "score": "0.5576113", "text": "function clearAll() { \n localStorage.clear();\n}", "title": "" }, { "docid": "47fe53da98addfa89e2e667f68dce056", "score": "0.55738753", "text": "destroy_() {\n AlertManager.getInstance().unlisten(EventType.ALERT, this.registerAlert_, false, this);\n this.scope_ = null;\n }", "title": "" }, { "docid": "3a6b8022a9f9f0ed3fdde5e8207cff65", "score": "0.5562043", "text": "function clearAllIntervals() {\n for (let i = 0; i < 1000; i++) {\n clearInterval(i);\n }\n}", "title": "" } ]
900af5a052f9897f571a8386fb2b1dde
Create an extendable calculator 5
[ { "docid": "c7406a4a441e419a3b8c29753eb779c3", "score": "0.6086263", "text": "function Calculator() {\n\n this.methods = {\n \"-\": (a, b) => a - b,\n \"+\": (a, b) => a + b\n };\n \n this.calculate = function(str) {\n \n let split = str.split(' '),\n a = +split[0],\n op = split[1],\n b = +split[2];\n \n if (!this.methods[op] || isNaN(a) || isNaN(b)) {\n return NaN;\n }\n \n return this.methods[op](a, b);\n };\n \n this.addMethod = function(name, func) {\n this.methods[name] = func;\n };\n }", "title": "" } ]
[ { "docid": "52bf0e5edc653e2555011a6965effcaf", "score": "0.6214008", "text": "function scientificCalculator() {}", "title": "" }, { "docid": "5d5da1924fb950ad1689906329f5ef42", "score": "0.6055051", "text": "onBtn(b) {\n\n if (expression.value == '' && !/([\\d|-])/.test(b)) //When the screan is empty put a zero if u press a symbol(exept for -)\n {\n\n let result = (expression.value = '0' + b)\n\n if (result == '0.') {\n expression.allowDot = false\n }\n expression.value = result\n expression.isResult = false\n return result\n }\n\n else if (/([-|+|*|/])/.test(expression.value.charAt(expression.value.length - 1))\n && /([\\d])/.test(expression.value.charAt(expression.value.length - 2))\n && b == \"-\") { //using the minus for negative numbers\n\n let result = (expression.value += ' -')\n\n expression = { value: result, isResult: false, allowDot: true }\n return result\n }\n else if ((expression.value != \"\" && !/([\\d])/.test(expression.value.charAt(expression.value.length - 1)) && !/([\\d])/.test(b)) //no 2 simbols next to each other\n || b == '.' && expression.allowDot == false) // not allowing dot when already used in a number (till adding operator)\n {\n\n let result = (expression.value = expression.value)\n\n expression.value = result\n expression.isResult = false\n return result\n }\n\n else {\n\n let result = (expression.value += b)\n\n expression.value = result\n expression.isResult = false\n if (b == \".\") {\n expression.allowDot = false\n } else if (/([-|+|*|/])/.test(b)) {\n expression.allowDot = true\n }\n\n return result\n }\n\n\n\n\n }", "title": "" }, { "docid": "9c60c46a0641a646969457fe83a7ca26", "score": "0.6025057", "text": "function calculator(){\n\n\tthis.sum = function(n1, n2){\n\tif(!isNaN(n1) && !isNaN(n2)){\n\t\treturn n1 + n2;\n\t}\n\n}\n\tthis.sub = function(n1, n2){\n\t\tif(!isNaN(n1) && !isNaN(n2)){\n\t\t\treturn n1 - n2;\n\t\t}\n\t}\n\tthis.div = function(n1, n2){\n\t\tif(!isNaN(n1) && !isNaN(n2)){\n\t\t\treturn n1 / n2;\n\t\t}\n\t}\t\n\tthis.mul = function(n1, n2){\n\t\tif(!isNaN(n1) && !isNaN(n2)){\n\t\t\treturn n1 * n2;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "1e5054536a68e37537bc45f8bf3cf6a3", "score": "0.6019155", "text": "function otherMathBtn(btnCheck){\n var extContainer = document.createElement(\"div\"),\n vertCont, visibleCont, hiddenCont, supCont,\n contArray = [];\n contArray.length = 5;\n extContainer.setAttribute(\"class\",\"ui segment math-block\");\n \n for(var i=0;i<contArray.length;i++){\n vertCont = document.createElement(\"div\");\n visibleCont = document.createElement(\"div\");\n hiddenCont = document.createElement(\"div\");\n supCont = document.createElement(\"sup\");\n supContV = document.createElement(\"sup\");\n \n vertCont.setAttribute(\"class\",\"ui vertical animated basic teal button include\");\n visibleCont.setAttribute(\"class\",\"visible content\");\n hiddenCont.setAttribute(\"class\",\"hidden content\");\n vertCont.appendChild(visibleCont);\n vertCont.appendChild(hiddenCont);\n \n if(btnCheck === 'math-1'){\n switch(i){\n case 0:\n supCont.innerHTML = \"y\";\n supContV.innerHTML = \"y\";\n visibleCont.innerHTML = \"x\";\n hiddenCont.innerHTML = \"x\";\n visibleCont.appendChild(supCont);\n hiddenCont.appendChild(supContV);\n vertCont.setAttribute(\"class\",\"ui vertical animated basic teal button\");\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'x^y')\");\n break;\n case 1:\n supCont.innerHTML = \"3\";\n supContV.innerHTML = \"3\";\n visibleCont.innerHTML = \"x\";\n hiddenCont.innerHTML = \"x\"\n visibleCont.appendChild(supCont);\n hiddenCont.appendChild(supContV);\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'x^3')\");\n break;\n case 2:\n visibleCont.innerHTML = \"1/x\";\n hiddenCont.innerHTML = \"1/x\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'1/x')\");\n vertCont.className += ' shift';\n break;\n case 3:\n supCont.innerHTML = \"x\";\n supContV.innerHTML = \"x\";\n visibleCont.innerHTML = \"10\";\n hiddenCont.innerHTML = \"10\"\n visibleCont.appendChild(supCont);\n hiddenCont.appendChild(supContV);\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'10^x')\");\n vertCont.className += ' shift';\n break;\n case 4:\n visibleCont.innerHTML = \"e\";\n hiddenCont.innerHTML = \"e\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'euler')\");\n break;\n }\n } else if(btnCheck === 'math-2'){\n switch(i){\n case 0:\n supCont.innerHTML = \"x\";\n supContV.innerHTML = \"x\";\n visibleCont.innerHTML = \"e\";\n hiddenCont.innerHTML = \"e\";\n visibleCont.appendChild(supCont);\n hiddenCont.appendChild(supContV);\n vertCont.setAttribute(\"class\",\"ui vertical animated basic teal button\");\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'y=e^x')\");\n break;\n case 1:\n visibleCont.innerHTML = \"ln\";\n hiddenCont.innerHTML = \"ln\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'ln')\");\n break;\n case 2:\n visibleCont.innerHTML = \"log\";\n hiddenCont.innerHTML = \"log\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'log')\");\n vertCont.className += ' shift';\n break;\n case 3:\n visibleCont.innerHTML = \"π\";\n hiddenCont.innerHTML = \"π\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'pi')\");\n break;\n case 4:\n visibleCont.innerHTML = \"n!\";\n hiddenCont.innerHTML = \"n!\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'factorial')\")\n break;\n }\n } else if(btnCheck === 'trig-1'){\n switch(i){\n case 0:\n visibleCont.innerHTML = \"sin\";\n hiddenCont.innerHTML = \"sin\";\n vertCont.setAttribute(\"class\",\"ui vertical animated basic teal button\");\n vertCont.className += ' shift';\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'sin')\");\n break;\n case 1:\n visibleCont.innerHTML = \"cos\";\n hiddenCont.innerHTML = \"cos\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'cos')\");\n vertCont.className += ' shift';\n break;\n case 2:\n visibleCont.innerHTML = \"tg\";\n hiddenCont.innerHTML = \"tg\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'tg')\");\n break;\n case 3:\n visibleCont.innerHTML = \"asin\";\n hiddenCont.innerHTML = \"asin\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'arcsin')\");\n vertCont.className += ' shift';\n break;\n case 4:\n visibleCont.innerHTML = \"acos\";\n hiddenCont.innerHTML = \"acos\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'arccos')\");\n vertCont.className += ' shift';\n break;\n }\n } else if(btnCheck === \"trig-2\"){\n switch(i){\n case 0:\n visibleCont.innerHTML = \"atg\";\n hiddenCont.innerHTML = \"atg\";\n vertCont.setAttribute(\"class\",\"ui vertical animated basic teal button\");\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'arctg')\");\n vertCont.className += ' shift';\n break;\n case 1:\n visibleCont.innerHTML = \"hsin\";\n hiddenCont.innerHTML = \"hsin\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'hsin')\");\n vertCont.className += ' shift';\n break;\n case 2:\n visibleCont.innerHTML = \"hcos\";\n hiddenCont.innerHTML = \"hcos\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'hcos')\");\n vertCont.className += ' shift';\n break;\n case 3:\n visibleCont.innerHTML = \"htg\";\n hiddenCont.innerHTML = \"htg\";\n vertCont.setAttribute(\"onclick\",\"calculatorFunc(null,'htg')\");\n vertCont.className += ' shift';\n break;\n case 4:\n }\n }\n contArray[i] = vertCont;\n extContainer.appendChild(contArray[i]);\n }\n if(btnCheck === 'trig-2'){\n extContainer.removeChild(vertCont);\n }\n return extContainer;\n}", "title": "" }, { "docid": "24013b205c3519a1f3ed5d242840995e", "score": "0.59933466", "text": "function number (value){\r\n //Updats las added element\r\n lastAdded = value;\r\n if(value!== '.') value = parseInt(value);\r\n calculatorInput = calculatorInput + value;\r\n document.getElementById(\"input\").innerHTML = calculatorInput;\r\n resizeInput ();\r\n}", "title": "" }, { "docid": "f6c813f58de03e9f8532f8b94c56ac14", "score": "0.59659964", "text": "function calculate(operator) {\n let base = $(\"input[type='radio']:checked\").attr(\"id\").split(\"-\")[1];\n let operands = input.textContent.split(operator);\n\n operands = operands.map((e) => {\n return anyToDec(e, base);\n });\n\n finalResult = operands[0];\n operands.shift();\n operands.map((e) => {\n if (operator === \"+\") {\n finalResult += e;\n } else if (operator === \"-\") {\n finalResult -= e;\n } else if (operator === \"*\") {\n finalResult *= e;\n } else if (operator === \"/\") {\n finalResult /= e;\n }\n });\n input.textContent = Number(finalResult).toString(Number(base)).toUpperCase();\n}", "title": "" }, { "docid": "1d050f5d060ed8c5eef186ff271b3897", "score": "0.5939446", "text": "function calculator(num1){\nreturn function numbers2(num2){\n\treturn function operation(operation){\n\t\tif (operation === 'sum'){\n\t\t\treturn num1 + num2\n\t\t}\n\t\tif (operation === 'rest'){\n\t\t\treturn num1 - num2\n\t\t}\n\t\tif (operation === 'multi'){\n\t\t\treturn num1 * num2\n\t\t}\n\t\tif (operation === 'div') {\n\t\t\treturn num1 / num2\n\t\t}\n\t}\n}\n}", "title": "" }, { "docid": "f8b85585f91519d6eeb8dc054099b184", "score": "0.5935989", "text": "function mycalculator(){\n\t// this is for the +button\n\tthis.resultValue=0;\n\tthis.ButtonClicked=function(button){\n this.selectorOperation=button;\n\t}\n\t// this is for the calculation\n\tthis.computeResult=function(){\n\t\t// this is very importan to define the input as number.\n\t\tvar num1=parseFloat(this.input1);\n\t\tvar num2=parseFloat(this.input2);\n\t\tif(this.selectorOperation==='+'){\n\t\n\t\tthis.resultValue=num1+num2;\n\t\t}\n\t\telse if(this.selectorOperation==='/'){\n\t\n\t\tthis.resultValue=num1/num2S;\n\t\t}\n\n\n else if(this.selectorOperation==='-'){\n\t\n\t\tthis.resultValue=num1-num2;\n\t\t}\n\t\telse if(this.selectorOperation==='*'){\n\t\n\t\tthis.resultValue=num1*num2;\n\t\t}\n\n\t\t// this is for the button clear\n\t\tthis.ButtonClear=function(){\n\t\t\tthis.input1=null;//clearing the input1\n\t\t\tthis.input2=null;//clearing the input2\n\t\t\tthis.selectorOperation=null;//clearing the selectoroption\n\t\t\tthis.resultValue = \"0\";//clearing the resultvalue.\n\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c0b80e939c10c751b22ef4bcc0983c40", "score": "0.59337795", "text": "function addOperator(value) {\n\tvar screen = document.getElementsByClassName('screen')[0];\n\tscreen.innerHTML = \"\";\n\toperator = value;\n\tif (number1 != null) {\n\t\tif (operator == \"+\") {\n\t\t\tnumber1 = Number(number1) + Number(number2);\n\t\t}\n\t\tif (operator == \"-\") {\n\t\t\tnumber1 = Number(number1) - Number(number2);\n\t\t}\n\t\tif (operator == \"*\") {\n\t\t\tnumber1 = Number(number1) * Number(number2);\n\t\t}\n\t\tif (operator == \"/\") {\n\t\t\tnumber1 = Number(number1) / Number(number2);\n\t\t}\n\t} else {\n\t\tnumber1 = number2;\n\t}\n}", "title": "" }, { "docid": "628d493dcc08797a0a2c0b8331a6d668", "score": "0.59329766", "text": "function createCalculator() {\r\n return {\r\n add: function (a, b) {\r\n return a + b;\r\n },\r\n subtract: function (a, b) {\r\n return a - b;\r\n },\r\n divide: function (a, b) {\r\n return a / b;\r\n },\r\n multiply: function (a, b) {\r\n return a * b;\r\n },\r\n };\r\n}", "title": "" }, { "docid": "0e3065ca35e2bb1d5bcd2a3cf0acb8ac", "score": "0.59156877", "text": "function Calculation() {\r\n}", "title": "" }, { "docid": "de9cf58bbc68d5a18c190f31e4a4048a", "score": "0.5894809", "text": "function insertNum(num){\n if(execution == false){\n document.calculator.display.value = \"\";\n execution = true;\n}\n\n//replaces operators\nif(num === '+'|| num === '-' || num === '*' || num === '/'){\n if(expressionArray[expressionArray.length - 1] == '+' || expressionArray[expressionArray.length - 1] == '-' || expressionArray[expressionArray.length -1] == '*' || expressionArray[expressionArray.length - 1] == '/'){\n expressionArray.pop();\n expressionArray.push(num);\n operationInserted = true;\n console.log(\"raw array\", expressionArray);\n }\n}\n\n\n if(operationInserted == false){\n document.calculator.display.value = document.calculator.display.value + num;\n expressionArray.push(num);\n console.log(\"joined array\", expressionArray.join(''));\n }\n\n if(Number(document.calculator.display.value.length) <= 10){\n document.calculator.display.value = document.calculator.display.value;\n }else{\n document.getElementById(\"zero_button\").disabled = true;\n document.getElementById(\"button1\").disabled = true;\n document.getElementById(\"button2\").disabled = true;\n document.getElementById(\"button3\").disabled = true;\n document.getElementById(\"button4\").disabled = true;\n document.getElementById(\"button5\").disabled = true;\n document.getElementById(\"button6\").disabled = true;\n document.getElementById(\"button7\").disabled = true;\n document.getElementById(\"button8\").disabled = true;\n document.getElementById(\"button9\").disabled = true;\n document.getElementById(\"decimal\").disabled = true;\n document.getElementById(\"pi_Button\").disabled = true;\n }\n //disables buttons to prevent overflow\n\n if(decimalInserted == false){\n let commaInput = Number(document.calculator.display.value.split(\",\").join(\"\")).toLocaleString();\n document.calculator.display.value = commaInput;\n }\n}", "title": "" }, { "docid": "ce673bcc8402ec5770766111fa528c22", "score": "0.58860683", "text": "function makeOperation(){\n var result = 0;\n\n if (operator === \"+\") {\n result = parseFloat(number1, 10) + parseFloat(number2, 10);\n } else if (operator === \"-\") {\n result = parseFloat(number1, 10) - parseFloat(number2, 10);\n } else if (operator === decodeHtml($(divideButton).text())) {\n result = parseFloat(number1, 10) / parseFloat(number2, 10);\n } else if (operator === decodeHtml($(multiplyButton).text())) {\n result = parseFloat(number1, 10) * parseFloat(number2, 10);\n } else if (operator === decodeHtml($(sqrtButton).text())){ \n result = Math.sqrt(parseFloat(number1, 10));\n } else if (operator === \"an\"){\n //default for not entering number2 = square exponentiation\n if(number2 === \"\") {\n number2 = number1;\n }\n result = Math.pow(parseFloat(number1, 10), parseFloat(number2, 10));\n }else if (operator === \"a2\"){\n result = parseFloat(number1, 10) * parseFloat(number1, 10);\n }\n if (isFloat(result)) { \n //round off the result if it has more than 15 characters\n result = parseFloat(result.toFixed(14));\n }\n //test the result for number of characters\n if(testNumLength(result.toString())) {\n result = tooLongNumber(result.toString());\n } \n //display everything correctly \n $(totalNum1).text(result);\n //add the operation to the memory display\n saveAndDisplayOperation(number1, number2, totalOperator.text(), result); \n //reset variabes\n lastResult = result.toString();\n number1 = result.toString();\n $(totalNum2).text(\"\");\n $(totalOperator).text(\"\");\n number2 = \"\";\n operator = \"\";\n //check the current window size and adjust method of display in the memory\n checkWindowSize();\n }", "title": "" }, { "docid": "e0f4d2d7c4c342c0504829fcc35f9f6f", "score": "0.58738047", "text": "function Calculator() {\n let operations = {\n \"+\": function(x, y) {\n return x + y;\n },\n\n // '-': function(x,y) {\n // return x - y;\n //}\n \"-\": (x, y) => x - y\n };\n\n this.calculate = function(str) {\n let resArr = str.split(\" \"),\n operator = resArr[1];\n x = +resArr[0];\n y = +resArr[2];\n\n //// console.log(resArr);\n if (!operations[operator] || isNaN(x) || isNaN(y)) {\n return NaN;\n }\n\n return operations[operator](x, y);\n };\n\n this.addMethod = function(name, func) {\n operations[name] = func;\n };\n}", "title": "" }, { "docid": "3111740b16811c994c676b81672e9855", "score": "0.58716625", "text": "function calculate() {\n const lastCharacter = screen.text().charAt(screen.text().length - 1);\n if (lastCharacter === \"+\" || lastCharacter === \"-\" || lastCharacter === \"*\" || lastCharacter === \"/\") {\n deleteLast();\n let number = eval((screen.text()));\n screen.text(number);\n operatorCounter = 0;\n } else {\n let number = eval((screen.text()));\n screen.text(number);\n }\n }", "title": "" }, { "docid": "5df8ce5a735cc3df9ddd9636a7e1b9e0", "score": "0.58679986", "text": "function Calculation() {\n}", "title": "" }, { "docid": "5c91cb48256532e7af8024ef31aac57f", "score": "0.5860616", "text": "function calculations(num) {\n decimalclicked = false;\n oldvalue = parseInt(oldvalue);\n newvalue = parseInt(newvalue);\n switch(mathoperator){ \n case \"+\":\n resultvalue = oldvalue + newvalue; \n break;\n case \"-\":\n resultvalue = oldvalue - newvalue; \n break;\n case \"x\":\n resultvalue = oldvalue * newvalue; \n break;\n case \"÷\":\n resultvalue = oldvalue / newvalue; \n break;\n default:\n resultvalue = newvalue;\n \n } \n oldvalue = resultvalue;\n display.innerText = resultvalue;\n console.log(resultvalue);\n }", "title": "" }, { "docid": "a00d26dec8486f1a3f47414da4ca1736", "score": "0.58505267", "text": "function Calculator() {\n this.methods = {\n \"+\": (a, b) => a + b,\n \"-\": (a, b) => a - b,\n };\n this.addMethod = function(operator, func) {\n this.methods[operator] = func;\n };\n this.calculate = function(expression) {\n let arr = expression.split(' ');\n let a = +arr[0];\n let operator = arr[1];\n let b = +arr[2];\n\n if (!this.methods[operator] || isNaN(a) || isNaN(b)) {\n return NaN;\n }\n \n return this.methods[operator](a, b);\n };\n}", "title": "" }, { "docid": "5e12a87fb22e12e21352c3312d362616", "score": "0.58411574", "text": "function addOperation(operator) {\n valueS = parseFloat(sDisplay.textContent);\n if (markerFirstItem === 0) {\n valueF = valueS;\n markerFirstItem = 1;\n return;\n }\n var numStr = \"\";\n switch (operator) {\n case \"+\":\n valueF +=valueS;\n secondDisplayClear(); \n numStr = valueF.toString();\n if (numStr.length > 16) {\n sDisplay.textContent = valueF.toExponential(4);\n } else {\n sDisplay.textContent = parseFloat(valueF.toFixed(4)) + 0; \n } \n markerFirstItem = 1;\n break;\n case \"-\":\n valueF -=valueS;\n secondDisplayClear(); \n numStr = valueF.toString();\n if (numStr.length > 16) {\n sDisplay.textContent = valueF.toExponential(4);\n } else {\n sDisplay.textContent = parseFloat(valueF.toFixed(4)) + 0; \n }\n markerFirstItem = 1;\n break;\n case \"*\":\n valueF *=valueS;\n secondDisplayClear(); \n numStr = valueF.toString();\n if (numStr.length > 16) {\n sDisplay.textContent = valueF.toExponential(4);\n } else {\n sDisplay.textContent = parseFloat(valueF.toFixed(4)) + 0; \n }\n \n markerFirstItem = 1;\n break;\n case \"/\":\n if (valueS === \"0\") {\n fDisplay.textContent = \"\";\n sDisplay.textContent = \"Infinity\";\n break;\n }\n valueF /=valueS;\n secondDisplayClear(); \n numStr = valueF.toString();\n if (numStr.indexOf(\"e\")>=0 || parseInt(valueF).toString().length > 10) {\n sDisplay.textContent = valueF.toExponential(4);\n } else {\n sDisplay.textContent = parseFloat(valueF.toFixed(4)) + 0; \n }\n\n markerFirstItem = 1;\n break;\n }\n \n}", "title": "" }, { "docid": "40706598636da4c2da9c28f50c9eb432", "score": "0.5813406", "text": "function setCalculator() {\n var buttons = $('control-ring').getElementsByTagName('li');\n var onclicks = new Array(); // store the onclick of other buttons temparaily\n var count = 0, sum = 0; // count: the buttons clicked, sum: random number sum\n var reset = true; // whether need to reinitiate the calculator\n var robotMode = false;\n\n var afterRetrieved = function(id) {\n // disable current button\n addClass(buttons[id], 'disabled');\n buttons[id].onclick = undefined;\n // enable other buttons\n for (var j = 0; j < buttons.length; j++) {\n if (j === id) continue;\n removeClass(buttons[j], 'disabled');\n buttons[j].onclick = onclicks[j];\n }\n };\n\n var beforeRetrieved = function(id) {\n // disable other buttons\n for (var j = 0; j < buttons.length; j++) {\n if (j === id) continue;\n addClass(buttons[j], 'disabled');\n onclicks[j] = buttons[j].onclick;\n buttons[j].onclick = undefined;\n }\n };\n\n // enable the summation\n $('at-plus-container').onmousedown = function() {\n if (reset) {\n // set the robot initiator\n $$('apb').onclick = function() {\n robotMode = true;\n robot();\n this.onclick = undefined;\n }\n count = sum = 0;\n for (var i = 0; i < buttons.length; i++) {\n var setClick = function(id) {\n buttons[id].onclick = function() {\n // set number notifier\n var notifier = addTag(buttons[id], 'span');\n addClass(notifier, 'unread');\n notifier.innerHTML = '...';\n // set button states\n beforeRetrieved(id);\n // retrieve random number\n loadXML('/', function() {\n if (this.readyState === 4 && this.status === 200) {\n // renew the notifier\n notifier.innerHTML = this.responseText;\n sum += parseInt(this.responseText);\n // set button states\n afterRetrieved(id);\n // if all clicked, trigger the sum event\n if (++count == 5) {\n $('info-bar').onclick = function() {\n $('result').innerHTML = sum.toString();\n this.onclick = undefined;\n }\n }\n if (robotMode) robot(); // tell the robot to continue\n }\n });\n };\n }(i);\n }\n reset = false;\n }\n };\n\n // clear the result when mouse move away\n $('at-plus-container').onmouseleave = function() {\n for (var i = 0; i < buttons.length; i++) {\n buttons[i].onclick = undefined;\n onclicks[i] = undefined;\n removeTag(buttons[i], 'span');\n removeClass(buttons[i], 'disabled');\n $('result').innerHTML = '';\n }\n reset = true;\n robotMode = false;\n };\n}", "title": "" }, { "docid": "d7168046c6f74dce2741a782451967f2", "score": "0.5812844", "text": "function createCalc() {\r\n var name = \"calc\";\r\n\r\n var calc = commandConstructor(name);\r\n\r\n calc.run = function () { $('.old_input').last().append('<p>' + run(calc.args) + '</p>'); };\r\n\r\n register(calc);\r\n}", "title": "" }, { "docid": "269d8b2ac73ad42fd4deb72b96f04f16", "score": "0.581242", "text": "function createCalculator() {\n return {\n add: (a, b) => {\n return a + b;\n },\n subtract: (a, b) => {\n return a - b;\n },\n multiply: (a, b) => {\n return a * b;\n },\n divide: (a, b) => {\n return a / b;\n }\n };\n}", "title": "" }, { "docid": "0381b45a0d0790b5ce536e00dcdfb82a", "score": "0.5810087", "text": "function Calculate() {\n expressionBefore = parseFloat(expressionBefore);\n expressionAfter = parseFloat(expressionAfter);\n if (operator == '+') {\n result = expressionBefore + expressionAfter;\n document.getElementById('textbox').value = result;\n operator = '';\n expressionBefore = result;\n expressionAfter = '';\n return;\n } else if (operator == '-') {\n result = expressionBefore - expressionAfter;\n document.getElementById('textbox').value = result;\n operator = '';\n expressionBefore = result;\n expressionAfter = '';\n return;\n } else if (operator == '*') {\n result = expressionBefore * expressionAfter;\n document.getElementById('textbox').value = result;\n operator = '';\n expressionBefore = result;\n expressionAfter = '';\n return;\n } else if (operator == '/') {\n result = expressionBefore / expressionAfter;\n document.getElementById('textbox').value = result;\n operator = '';\n expressionBefore = result;\n expressionAfter = '';\n return;\n }\n}", "title": "" }, { "docid": "ad704b41b9cf37b258fd7b29c4f63582", "score": "0.5809837", "text": "function Calculator() {\n\tvar rpn = [];\n\tvar total = 0;\n\tthis.value = function() {\n\t\treturn total;\n\t}\n\t\n\tthis.push = function(number){\t\n\t\t\t rpn.push(number); \n\t}\t\t\t\t\t\t\t\t\n\n\tthis.plus = function(number){\n\t\tif (rpn.length < 2) {\n\t\t\tthrow \"error the Calculator is empthy\"\n\t\t} \n\t\telse {\n\t\t\ttotal = rpn[rpn.length-2] + rpn[rpn.length-1];\n\t\t\trpn.pop();\n\t\t\trpn.pop();\n\t\t\trpn.push(total);\n\t\t\treturn total;\n\t\t} \n\t}\n\t\n\tthis.minus = function(number){\n\t\tif (rpn.length < 2) {\n\t\t\tthrow \"error the Calculator is empthy\"\t\n\t\t} \n\t\telse {\n\t\t\ttotal = rpn[rpn.length-2] - rpn[rpn.length-1];\n\t\t\trpn.pop();\n\t\t\trpn.pop();\n\t\t\trpn.push(total);\n\t\t\treturn total;\n\t\t} \n\t}\n\n\tthis.multiply = function(number) {\n\t\tif (rpn.length < 2) {\n\t\t\tthrow \"error the Calculator is empthy\"\n\t\t} \n\t\telse {\n\t\t\ttotal = rpn[rpn.length-2] * rpn[rpn.length-1];\n\t\t\trpn.pop();\n\t\t\trpn.pop();\n\t\t\trpn.push(total);\n\t\t\treturn total;\n\t\t} \n\t}\n\t\n\tthis.divide = function(number) {\n\t\tif (rpn.length < 2) {\n\t\t\tthrow \"error the Calculator is empthy\"\n\t\t} \n\t\telse {\n\t\t\ttotal = rpn[rpn.length-2] / rpn[rpn.length-1];\n\t\t\trpn.pop();\n\t\t\trpn.pop();\n\t\t\trpn.push(total);\n\t\t\treturn total;\n\t\t} \n\t}\n}", "title": "" }, { "docid": "dd7d7c758515d9d922014bec2bc21b06", "score": "0.57980204", "text": "function budgetCalculator(watch,phone,laptop){\n var calculator = watch + phone + laptop;\n return calculator;\n}", "title": "" }, { "docid": "1c02d9b2063db6f821a73a8ec0a2726a", "score": "0.5775845", "text": "function Calculator() {\n return (\n <div>\n {/* <p>19 + 341 = ?</p> */}\n <MathComp a={19} b={341} operator='+' />\n {/* <p>42 - 17 = ?</p> */}\n <MathComp a={42} b={17} operator='-' /> \n {/* <p>100 * 3 = ?</p> */}\n <MathComp a={100} b={3} operator='*' />\n {/* <p>96 / 4 = ?</p> */}\n <MathComp a={96} b={4} operator='/' />\n <MathComp a={96} b={0} operator='/' />\n <MathComp a={96} b='just a text' operator='/' />\n\n </div>\n );\n}", "title": "" }, { "docid": "780a0403a1c991031fe57bf1c20fbdc0", "score": "0.5760501", "text": "add() {\n this.operator = \"+\";\n this.multiNumberFunctionInitiated();\n }", "title": "" }, { "docid": "4ab76008bf7be06c84c0764ff3ba3feb", "score": "0.57378805", "text": "function createCurryCalc() {\n let args = [];\n return function calc() {\n let newArgs = Array.prototype.slice.call(arguments);\n args = args.concat(newArgs);\n if (args.length >= 5) {\n return args.reduce(function(acc, el) {\n return acc + el;\n }, 0);\n }\n return calc;\n }\n}", "title": "" }, { "docid": "1f5042a2e57c783178d25f39a8eaf2e3", "score": "0.5737043", "text": "function makeAdvancedCalculatorParser(_NUM, _ID) {\n\n var _ID = _ID || ID;\n \n var _NUM = _NUM || NUM;\n \n /*\n var ARGLIST = T(ALT(SEQ(REP(function(x) { return TERM(x) }, ','), function(x) { return TERM(x) }),\n OPT(function(x) { return TERM(x) })),\n x => x.filter(y => y != ','));\n */\n \n var ARGLIST = T(LIST(function(x) { return TERM(x) }, ',', true), x => x);\n \n\n var FUNCALL = T(SEQ(_ID, '(', ARGLIST, ')'),\n x => {\n var args = [];\n //Check if arglist exists\n if (x[2] != ')') { args = x[2] }\n return {op: x[0], args};\n });\n \n var PARENS = ALT(\n T(SEQ('(', function(x) { return TERM(x) }, ')'), x => x[1]),\n FUNCALL,\n _NUM,\n T(_ID, x => ({op:'var', id:x[0]}))\n );\n\n var UNARY = ALT( T(SEQ('-', PARENS), x => {return {op: '-', args: [x[1]]}}),\n PARENS );\n\n var FACTOR = ALT(\n T(SEQ( UNARY, REP( ALT('*','/'), UNARY) ), infixT(['*','/'])),\n UNARY\n );\n\n var TERM = ALT(\n T(SEQ( FACTOR, REP( ALT('+', '-'), FACTOR) ), infixT(['+','-'])),\n FACTOR\n );\n \n return SEQ(TERM, END);\n}", "title": "" }, { "docid": "c6695303be41d5d5f6b1ab40ba72344d", "score": "0.57364106", "text": "function clickSum(){\n number += '+';\n usedOperator = '+';\n add();\n}", "title": "" }, { "docid": "1a8964d8429a2dc3ccc52f28f289e04e", "score": "0.57040334", "text": "function makeSimpleCalculatorParser(_NUM) {\n \n _NUM = _NUM || NUM;\n \n var PARENS = ALT(\n T(SEQ('(', function(x) { return TERM(x) }, ')'), x => x[1]),\n _NUM\n );\n\n var UNARY = ALT( T(SEQ('-', PARENS), x => {return {op: '-', args: [x[1]]}}),\n PARENS );\n\n var FACTOR = ALT(\n T(SEQ( UNARY, REP( ALT('*','/'), UNARY) ), infixT(['*','/'])),\n UNARY\n );\n\n var TERM = ALT(\n T(SEQ( FACTOR, REP( ALT('+', '-'), FACTOR) ), infixT(['+','-'])),\n FACTOR\n );\n \n return TERM;\n}", "title": "" }, { "docid": "df0f950dfc457340652ae52739e271f8", "score": "0.5688317", "text": "function zeichen() {\r\n function teile() {erg.value = concatter(\"/\")}\r\n \r\n function substrahier() {erg.value = concatter(\"-\")}\r\n \r\n function multiplizier() {erg.value = concatter(\"*\")}\r\n\r\n function addier() {erg.value = concatter(\"+\")}\r\n\r\n function punktier() {erg.value = concatter(\".\")}\r\n\r\n mal.addEventListener('click', multiplizier);\r\n teil.addEventListener('click', teile);\r\n plus.addEventListener('click', addier);\r\n minus.addEventListener('click', substrahier);\r\n point.addEventListener('click', punktier)\r\n}", "title": "" }, { "docid": "ad374e60807bf312691cb97db7e4b15f", "score": "0.5675399", "text": "function plusFive(num) {\n // your code here...\n}", "title": "" }, { "docid": "26129047980fc5cfe448c1acdeb7d385", "score": "0.5664887", "text": "function simpleCalculator(operator,number1,number2){\n function plus(number1,number2) {\n return (number1 + number2);\n }\n function minus(number1,number2) {\n return (number1 - number2);\n }\n function multiply(number1,number2) {\n return (number1 * number2);\n }\n function divide(number1,number2) {\n return (number1 / number2);\n }\n var c = 0;\n switch(operator.toString()) {\n case '+':\n c = plus(number1,number2)\n break;\n case '-':\n c = minus(number1,number2)\n break;\n case '*':\n c = multiply(number1,number2)\n break;\n case '/':\n c = divide(number1,number2)\n break;\n default:\n c = \"Don't really know..\";\n }\n return c\n}", "title": "" }, { "docid": "a56452f33277995fd6392bf61bc87691", "score": "0.5654376", "text": "function calc() {\n //\n // __2 .value, use the value property to grab the input value.\n //\n // var a = document.querySelector(\"#value1\").value;\n //\n //\n //***** important!! *****/\n //\n // 3 but if you do it in that way, the second value is going to be transformed in a string 4², that's why before adding the document.query..., you add parseInt(), this parseInt is going to convert the data i have and introduce it into the parenthesis and transform it into numbers.\n\n // and you d it like so\n // __4\n //\n //\n var a = parseInt(document.querySelector(\"#value1\").value);\n //\n // __5\n //\n var b = parseInt(document.querySelector(\"#value2\").value);\n //\n // __6\n //\n var operatorr = document.querySelector(\"#operator\").value;\n //\n //\n // __7\n var calculate;\n //\n //\n // __8\n //\n //CREATE AN IF STATEMENT\n // if certain condition has been meet, DO something.\n\n if (operatorr == \"add\") {\n calculate = a + b;\n } else if (operatorr == \"min\") {\n calculate = a - b;\n } else if (operatorr == \"div\") {\n calculate = a / b;\n } else if (operatorr == \"mul\") {\n calculate = a * b;\n }\n //\n //\n // __9\n // Once you console.log and check the browser, you will see that nothing happened, and that is because you need an EVENT\n //\n //\n // console.log(calculate);\n //\n //\n // __12\n // __HERE you add the .innerHtml, what the innerHtnl does is that it inserts a value in between a pair of html tags\n //\n document.querySelector(\"#result\").innerHTML = calculate;\n //\n //\n // __10\n //\n // Go to the HTML and create a div with an ID called result,DON'T write anything inside of it and the DIV should be outside the form.\n //\n //\n //\n // __11\n //\n //\n //\n}", "title": "" }, { "docid": "f9fb466069b54571d8616d3c3d7e65f5", "score": "0.56367797", "text": "function calcApp() {\n getHistory();\n\n $('#addition-button').on('click', function() {\n theOperators = 'Add';\n });\n $('#subtraction-button').on('click', function() {\n theOperators = 'Subtract';\n });\n $('#multiplication-button').on('click', function() {\n theOperators = 'Multiply';\n });\n $('#division-button').on('click', function() {\n theOperators = 'Divide';\n });\n $('#equals-button').on('click', getCalc);\n $('#eraser-button').on('click', clearAll);\n}", "title": "" }, { "docid": "29175116c1bc6fb820e00594abd5ced6", "score": "0.56322664", "text": "function addCalc() {\n\n}", "title": "" }, { "docid": "4158ca1489935bd9c145548761acd8f1", "score": "0.5631754", "text": "function Calculator() {\n\n this.read = function() {\n this.a = +prompt('a?', 0);\n this.b = +prompt('b?', 0);\n };\n \n this.sum = function() {\n return this.a + this.b;\n };\n \n this.mul = function() {\n return this.a * this.b;\n };\n }", "title": "" }, { "docid": "64c101240c699eb22cc3e641128d8649", "score": "0.56277424", "text": "function makeEquation() {\n // Helper function to make a 'container' equation element\n const cont = (content, width = 0.6, xAlign = 'center') => ({\n container: { content, width, xAlign },\n });\n\n // Helper function to make a 'fraction' within a 'container' of fixed width\n function frac(\n numerator, symbol, denominator, nSpace = 0.03, dSpace = 0.03, width, overhang = 0.03,\n ) {\n return cont({\n frac: {\n numerator,\n symbol,\n denominator,\n numeratorSpace: nSpace,\n denominatorSpace: dSpace,\n scale: 0.95,\n overhang,\n },\n }, width, 'right');\n }\n\n // Helper function to make a 'fraction' equation element with numerator\n // and denominator of fixed width\n function wFrac(\n numerator, symbol, denominator, width = 0.2,\n ) {\n return {\n frac: {\n numerator: cont(numerator, width),\n symbol,\n denominator: cont(denominator, width),\n scale: 0.95,\n },\n };\n }\n\n // Helper function to make a 'lines' equation element\n const lin = (content, baselineSpace = 0.5) => ({\n lines: { content, baselineSpace: baselineSpace / 0.7, justify: 'left' },\n });\n\n figure.add({\n name: 'eqn',\n make: 'equation',\n options: {\n elements: {\n eq1: '=',\n eq2: '=',\n eq3: '=',\n eq4: '=',\n eq5: '=',\n eq6: '=',\n v1: { symbol: 'vinculum' },\n v2: { symbol: 'vinculum' },\n v3: { symbol: 'vinculum' },\n v4: { symbol: 'vinculum' },\n v5: { symbol: 'vinculum' },\n v6: { symbol: 'vinculum' },\n sin: { style: 'normal', color: colSin },\n cos: { style: 'normal', color: colCos },\n tan: { style: 'normal', color: colTan },\n cot: { style: 'normal', color: colCot },\n sec: { style: 'normal', color: colSec },\n csc: { style: 'normal', color: colCsc },\n opp_1: { text: 'opposite', color: colOpp, size: 0.2 },\n opp_2: { text: 'opposite', color: colOpp, size: 0.2 },\n opp_3: { text: 'opposite', color: colOpp, size: 0.2 },\n opp_4: { text: 'opposite', color: colOpp, size: 0.2 },\n adj_1: { text: 'adjacent', color: colAdj, size: 0.2 },\n adj_2: { text: 'adjacent', color: colAdj, size: 0.2 },\n adj_3: { text: 'adjacent', color: colAdj, size: 0.2 },\n adj_4: { text: 'adjacent', color: colAdj, size: 0.2 },\n hyp_1: { text: 'hypotenuse', color: colHyp, size: 0.2 },\n hyp_2: { text: 'hypotenuse', color: colHyp, size: 0.2 },\n hyp_3: { text: 'hypotenuse', color: colHyp, size: 0.2 },\n hyp_4: { text: 'hypotenuse', color: colHyp, size: 0.2 },\n theta1: { text: '\\u03b8', color: colTheta },\n theta2: { text: '\\u03b8', color: colTheta },\n theta3: { text: '\\u03b8', color: colTheta },\n theta4: { text: '\\u03b8', color: colTheta },\n theta5: { text: '\\u03b8', color: colTheta },\n theta6: { text: '\\u03b8', color: colTheta },\n val1: { text: '0.0000', color: colText },\n val2: { text: '0.0000', color: colText },\n val3: { text: '0.0000', color: colText },\n val4: { text: '0.0000', color: colText },\n val5: { text: '0.0000', color: colText },\n val6: { text: '0.0000', color: colText },\n lb1: { symbol: 'bracket', side: 'left' },\n lb2: { symbol: 'bracket', side: 'left' },\n lb3: { symbol: 'bracket', side: 'left' },\n lb4: { symbol: 'bracket', side: 'left' },\n lb5: { symbol: 'bracket', side: 'left' },\n lb6: { symbol: 'bracket', side: 'left' },\n rb1: { symbol: 'bracket', side: 'right' },\n rb2: { symbol: 'bracket', side: 'right' },\n rb3: { symbol: 'bracket', side: 'right' },\n rb4: { symbol: 'bracket', side: 'right' },\n rb5: { symbol: 'bracket', side: 'right' },\n rb6: { symbol: 'bracket', side: 'right' },\n A: { color: colHyp },\n B: { color: colOpp },\n C: { color: colAdj },\n Adash: { text: 'A\\'', color: colHyp },\n Bdash: { text: 'B\\'', color: colOpp },\n Cdash: { text: 'C\\'', color: colAdj },\n },\n phrases: {\n oppHyp: frac('opp_1', 'v1', 'hyp_1', 0.01, 0.03, 0.65),\n adjHyp: frac('adj_1', 'v2', 'hyp_2', 0.01, 0.03, 0.65),\n oppAdj: frac('opp_2', 'v3', 'adj_2', 0.01, 0.03, 0.65),\n hypOpp: frac('hyp_3', 'v4', 'opp_3', 0.01, 0.03, 0.65),\n hypAdj: frac('hyp_4', 'v5', 'adj_3', 0.01, 0.03, 0.65),\n adjOpp: frac('adj_4', 'v6', 'opp_4', 0.01, 0.03, 0.65),\n sinTheta: ['sin', ' ', 'theta1'],\n cosTheta: ['cos', ' ', 'theta2'],\n tanTheta: ['tan', ' ', 'theta3'],\n cotTheta: ['cot', ' ', 'theta4'],\n secTheta: ['sec', ' ', 'theta5'],\n cscTheta: ['csc', ' ', 'theta6'],\n f1: [{ sub: ['f_1', '_1'] }, { brac: ['lb1', 'theta1', 'rb1'] }],\n f2: [{ sub: ['f_2', '_2'] }, { brac: ['lb2', 'theta2', 'rb2'] }],\n f3: [{ sub: ['f_3', '_3'] }, { brac: ['lb3', 'theta3', 'rb3'] }],\n f4: [{ sub: ['f_4', '_4'] }, { brac: ['lb4', 'theta4', 'rb4'] }],\n f5: [{ sub: ['f_5', '_5'] }, { brac: ['lb5', 'theta5', 'rb5'] }],\n f6: [{ sub: ['f_6', '_6'] }, { brac: ['lb6', 'theta6', 'rb6'] }],\n c1: cont(lin(['oppHyp', 'adjHyp', 'oppAdj', 'adjOpp', 'hypAdj', 'hypOpp']), 0.6),\n c2: cont(lin(['eq1', 'eq2', 'eq3', 'eq4', 'eq5', 'eq6']), 0.3),\n trig: lin(['sinTheta', 'cosTheta', 'tanTheta', 'cotTheta', 'secTheta', 'cscTheta']),\n values: lin(['val1', 'val2', 'val3', 'val4', 'val5', 'val6']),\n functions: lin(['f1', 'f2', 'f3', 'f4', 'f5', 'f6']),\n final1: lin([\n ['oppHyp', ' ', 'eq1', ' ', 'sinTheta'],\n ['oppAdj', ' ', 'eq3', ' ', 'tanTheta'],\n ['hypAdj', ' ', 'eq5', ' ', 'secTheta'],\n ], 0.6 / 1.1),\n final2: lin([\n ['adjHyp', ' ', 'eq2', ' ', 'cosTheta'],\n ['adjOpp', ' ', 'eq4', ' ', 'cotTheta'],\n ['hypOpp', ' ', 'eq6', ' ', 'cscTheta'],\n ], 0.6 / 1.1),\n },\n layout: 'init',\n forms: {\n ratios: ['c1'],\n values: ['c1', 'c2', 'values'],\n functions: ['c1', 'c2', 'functions'],\n trig: ['c1', 'c2', 'trig'],\n final: { scale: [['final1', cont('', 0.8), 'final2'], 1.1] },\n AonB: { scale: [wFrac('Adash', 'v2', 'Bdash'), 1.8] },\n AonBEq: {\n scale: [[\n wFrac('Adash', 'v2', 'Bdash'),\n ' ', 'eq1', ' ',\n wFrac('A', 'v1', 'B'),\n ], 1.8],\n },\n AonCEq: {\n scale: [[\n wFrac('Adash', 'v2', 'Cdash'),\n ' ', 'eq1', ' ',\n wFrac('A', 'v1', 'C'),\n ], 1.8],\n },\n },\n position: [-2.8, 1.2],\n },\n mods: {\n scenarios: {\n oneTri: { position: [-2.8, 1.2] },\n twoTri: { position: [-0.3, 0.7] },\n center: { position: [-1.5, 0.3] },\n },\n },\n });\n\n // Add function to function map that dissolves equation in to its values form\n figure.fnMap.global.add('eqnInToValues', () => {\n figure.elements._eqn.setScenario('oneTri');\n figure.elements._eqn.showForm('values');\n figure.elements._eqn.animations.new().dissolveIn().start();\n figure.fnMap.exec('triSetup', [2, 1.453], 'values', true);\n });\n}", "title": "" }, { "docid": "0c81d3814e85d31c02a729b1be7ddbeb", "score": "0.56273353", "text": "function math(button){\n screen.value += button;\n if(button === \"CE\"){\n screen.value = \"\";\n }\n}", "title": "" }, { "docid": "c80b8f29e7034ea4c0f327dc34b8c40b", "score": "0.56147534", "text": "function addition() {\n \n }", "title": "" }, { "docid": "23c6d0aff902d95bf494d458f81ab772", "score": "0.5576245", "text": "function calc(num1, num2, num3, num4, num5) {\n return num1 + num2 + num3 + num4 + num5;\n}", "title": "" }, { "docid": "efc36ad05f71f5ca7ff8948c20f2736c", "score": "0.55611384", "text": "function Calculator() {\n this.read = function() { \n this.a = +prompt('a?', 0);\n this.b = +prompt('b?', 0);\n };\n this.sum = function() {\n return (this.a + this.b);\n };\n this.mul = function(a,b) {\n return (this.a * this.b);\n };\n}", "title": "" }, { "docid": "4104d418d5cd91fc75509d53d8a47370", "score": "0.55568045", "text": "function fiveKey() {\n five = \"5\";\n answer = answer + five;\n document.querySelector(\"#result-display\").innerHTML = answer;\n document.querySelector(\"#calculation-display\").innerHTML = answer;\n}", "title": "" }, { "docid": "3810c046433c14a684830b51a76fe5f7", "score": "0.5555262", "text": "function calcByOperator(operator) {\n\n switch (operator) {\n\n case 'plus':\n sum += screen;\n break;\n\n case 'minus':\n sum -= screen;\n break;\n\n case 'times':\n sum *= screen;\n sum = sum.toFixed(3);\n break;\n\n case 'divide':\n sum /= screen;\n sum = sum.toFixed(3);\n break;\n\n }\n}", "title": "" }, { "docid": "357b0b9cc0ac87e62d88212cd43e5ea1", "score": "0.5542007", "text": "function generateCalculator(type = \"sum\") {\n switch (type) {\n case \"sum\":\n return function(a, b) {\n return a + b;\n };\n\n case \"sub\":\n return function(a, b) {\n return a - b;\n };\n }\n}", "title": "" }, { "docid": "ad890b9365f76228bf6bba1b87bb5309", "score": "0.55355054", "text": "function operatorSumar(){\n operator='+'; \n}", "title": "" }, { "docid": "54075a0c872d3cd9ebcf2d91fb12f33e", "score": "0.5530183", "text": "function createE(n) {\n expression += n;\n document.querySelector(\".display\").innerHTML = expression;\n}", "title": "" }, { "docid": "255c81c5afdddde49366b50958dc8c3a", "score": "0.55267507", "text": "function appendDigit () {\n // Also appends dot\n // Also appends e-\n // The following functions perform tasks to enable correct behavior of other functions that need various of their tasks performed at this point of the program:\n miscTasks();\n\n if (operator === null) {\n // This case is when appendage goes against 1st operand\n if (keyPressed === '.' && operand1 === null) {\n // More specifically, against 1st operand, with the added condition that dot is the very first character received(operand1 is empty)\n keyPressed = '0.'; // suplant the dot by a zero and dot, and process as a single digit.\n }\n\n if (operand1 === null) {\n // If null, concat keyPressed with empty string\n // Now the '0.' will be appended to the current content of operand1. But since the content is the null character, we load operand1 with an empty string and append the '0.' to it. Net result is we loaded the '0.' string into the operand1 variable. For a case of a single numeric digit received, the net effect is that the single digit is appended.\n operand1 = '';\n operand1 = operand1.concat(keyPressed);\n\n } else {\n // now we handle the case when characters are directed to 1st operand, but operand is not empty. In this case, it is just a matter of appending the additional digit. Simple.\n operand1 = operand1.concat(keyPressed);\n }\n // Now mirror the operand1 content to the LCD for user to view.\n lcd.innerHTML = operand1;\n // And update the subtotal register and it's viewable display also.\n subtotal = operand1;\n subTot.innerHTML = operand1;\n\n } else {\n // Now the case when operator is not null. This means that previous processes completed loading of digits destined to the 1st operand and also loaded the desired operand to the operand register. Any subsequent digits and dot will be destined to the 2nd operand. Procedure is same as for the 1st operand. But this time performed for the operand2 variable:\n if (keyPressed === '.' && operand2 === null) {\n // Case of 2nd operand empty\n keyPressed = '0.'; // Got a dot.\n }\n if (operand2 === null) {\n // on virgin location concat keyPressed with empty string\n operand2 = '';\n operand2 = operand2.concat(keyPressed);\n\n } else {\n // What to do if 2nd operand already had some content.\n operand2 = operand2.concat(keyPressed);\n\n }\n lcd.innerHTML = operand2; // Let user see the result of the appendage procedure.\n }\n // Reset all variables to get them ready for a possible subsequent use\n keyPressedNumber = false;\n keyPressedDot = false;\n keyPressedExp = false;\n // Update details for developer visualization while building the App.\n updDebug();\n return; // Done!\n}", "title": "" }, { "docid": "3237d65d5479d31a32f0669b94d0a4bc", "score": "0.55171", "text": "function performOperation (e) {\n var operator = e.target.innerText;\n switch (operator) {\n case '+':\n pendingVal = displayVal;\n displayVal = '0';\n displayValElement.innerText = displayVal;\n evalStringArray.push(pendingVal);\n evalStringArray.push('+');\n break;\n case '-':\n pendingVal = displayVal;\n displayVal = '0';\n displayValElement.innerText = displayVal;\n evalStringArray.push(pendingVal);\n evalStringArray.push('-');\n break;\n case 'x':\n pendingVal = displayVal;\n displayVal = '0';\n displayValElement.innerText = displayVal;\n evalStringArray.push(pendingVal);\n evalStringArray.push('*');\n break;\n case '÷':\n pendingVal = displayVal;\n displayVal = '0';\n displayValElement.innerText = displayVal;\n evalStringArray.push(pendingVal);\n evalStringArray.push('/');\n break;\n case '=':\n evalStringArray.push(displayVal);\n var evaluation = eval(evalStringArray.join(''));\n displayVal = evaluation + ''; \n displayValElement.innerText = displayVal;\n evalStringArray = []; // clear the array\n break;\n default:\n break;\n }\n}", "title": "" }, { "docid": "617540710958ca5de157ecf16bedc5fd", "score": "0.5507229", "text": "function btnoperator(simbol){\r\n\tvar displaytxt = document.getElementById(\"basicform:basicdisplay\").value;\r\n\tvar firstdigit = document.getElementById(\"basicform:firstdigit\").value;\r\n\t//alert ('TEST: tecla: '+simbol);\r\n\t//Se for primeiro digito, continua a expressao como ja tendo digitos\r\n\tif ( firstdigit == \"true\" ){\r\n\t\tfirstdigit = \"false\";\r\n\t\tdocument.getElementById(\"basicform:firstdigit\").value=firstdigit;\r\n\t\t//Se for 0.0 apaga texto do ecra. qq outro valor mantem e segue construcao da expressao\r\n\t\tif (displaytxt==\"0.0\") {\r\n\t\t\tdisplaytxt=\"\";\r\n\t\t}\r\n\t}\r\n\t//Se o display estiver vazio\r\n\tif ( displaytxt.length < 1 ) {\r\n\t\t//se for o sinal \"-\" inicia a string\r\n\t\t//alert ('TEST: tecla: '+simbol);\r\n\t\tif (simbol==\"-\") {\r\n\t\t\t//alert ('TEST: simbol == -');\r\n\t\t\tdisplaytxt=\"\"+simbol;\r\n\t\t}\r\n\t\t//se for o \".\" inicia a string com \"0.\"\r\n\t\telse if (simbol==\".\") {\r\n\t\t\t//alert ('TEST: simbol == .');\r\n\t\t\tdisplaytxt=\"0\"+simbol;\r\n\t\t}\r\n\t\t//caso contrario é um erro\r\n\t\telse {\r\n\t\t\talert ('Erro: Tem que introduzir caracteres numéricos primeiro!');\r\n\t\t}\r\n\t}\r\n\t//se o display nao esta vazio, o caracter anterior tem de ser digito numerico\r\n\telse {\r\n\t\t//alert ('TEST: displaytxt.length >= 1');\r\n\t\t//(ERRO) var lastChar=displaytxt.substring(displaytxt.length-1);\r\n\t\tvar lastchar=displaytxt.substr(displaytxt.length-1, 1); //substr(number, lenght)\r\n\t\t//alert ('TEST: tecla: '+simbol+' last char: '+lastchar);\r\n\t\t//se digito anterior for numerico\r\n\t\tif ( isdigit(lastchar) ) {\r\n\t\t\t//alert ('TEST: é numerico!');\r\n\t\t\t//se o operador for ponto\r\n\t\t\tif (simbol==\".\") {\r\n\t\t\t\t//alert ('TEST: simbol=.');\r\n//\t\t\t\t//testar que nao existe outro ponto nos caracteres anteriores até aparecer um operador \r\n\t\t\t\t//se o texto do display so tem um caracter\r\n\t\t\t\tif (displaytxt.length<2) {\r\n\t\t\t\t\tdisplaytxt=displaytxt+simbol;\r\n\t\t\t\t}\r\n\t\t\t\t//se o texto do display tem mais do que um caracter\r\n\t\t\t\telse {\r\n\t\t\t\t\tfor (i=displaytxt.length-2;i>=0;i--) {\r\n\t\t\t\t\t\tvar prevchar=displaytxt.substr(i,1); //substr(number, lenght)\r\n\t\t\t\t\t\t//alert ('TEST: simbol=. , inside for , prevchar='+prevchar);\r\n\t\t\t\t\t\t// se caracter nao for digito numerico\r\n\t\t\t\t\t\tif ( ! isdigit(prevchar) ) {\r\n\t\t\t\t\t\t\t//se encontrar um ponto estamos perante erro\r\n\t\t\t\t\t\t\tif (prevchar==\".\") {\r\n\t\t\t\t\t\t\t\talert ('Erro: o numero digitado já tem um ponto!');\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\t//se encontrar um operador acrescenta o ponto ao display\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tdisplaytxt=displaytxt+simbol;\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\t// se caracter for digito numerico e chegarmos ao inicio da string\r\n\t\t\t\t\t\telse if (i<=0) {\r\n\t\t\t\t\t\t\t//alert ('TEST: IS nuneric digit e i=0!');\r\n\t\t\t\t\t\t\tdisplaytxt=displaytxt+simbol;\r\n\t\t\t\t\t\t\tbreak;\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\t//se o operador nao e ponto, acrescenta operador ao display\r\n\t\t\telse {\r\n\t\t\t\tdisplaytxt=displaytxt+simbol;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//se for operador - testar que caracter anterior não e o operador - nem .\r\n\t\telse if (simbol==\"-\" && lastChar!=\"-\" && lastChar!=\".\") {\r\n\t\t\tdisplaytxt=displaytxt+simbol;\r\n\t\t}\r\n\t\t//se for operador . testar que caracter anterior não é .\r\n\t\telse if (simbol==\".\" && lastChar!=\".\") {\r\n\t\t\tdisplaytxt=displaytxt+\"0\"+simbol;\r\n\t\t}\r\n\t\t\t\r\n\t\telse {\r\n\t\t\talert ('não pode escrever dois operadores consecutivos: '+lastChar+simbol);\r\n\t\t}\r\n\t}\r\n\tdocument.getElementById(\"basicform:basicdisplay\").value=displaytxt;\r\n}", "title": "" }, { "docid": "eee39bd73c212b83efef4cb580818fe2", "score": "0.55016184", "text": "function cookThatNum ([num, op1, op2, op3, op4, op5]){\n function cookIt(num, operator){\n switch (operator){\n case \"chop\": return num / 2;\n case \"dice\": return Math.sqrt(num);\n case \"spice\": return num + 1;\n case \"bake\": return num * 3;\n case \"fillet\": return 0.8 * num;\n }\n }\n \n num = cookIt(num, op1);\n console.log(num);\n num = cookIt(num, op2);\n console.log(num);\n num = cookIt(num, op3);\n console.log(num);\n num = cookIt(num, op4);\n console.log(num);\n num = cookIt(num, op5);\n console.log(num); \n}", "title": "" }, { "docid": "1863d26ceb4326b38eb3a637c1129d63", "score": "0.5491239", "text": "function operations(operation){\n if(operation == '+' && symbol == true){\n expression+='+';\n displayExpression='';\n decimalCount=0;\n document.getElementById(\"display\").innerHTML='0';\n symbol=false;\n }\n if(operation == '-' && symbol == true){\n expression+='-';\n displayExpression='';\n decimalCount=0;\n document.getElementById(\"display\").innerHTML='0';\n symbol=false;\n }\n if(operation == 'x' && symbol == true){\n expression+='*';\n displayExpression='';\n decimalCount=0;\n document.getElementById(\"display\").innerHTML='0';\n symbol=false;\n }\n if(operation == '/' && symbol == true){\n expression+='/';\n displayExpression='';\n decimalCount=0;\n document.getElementById(\"display\").innerHTML='0';\n symbol=false;\n }\n}", "title": "" }, { "docid": "6e892c6d932884e63c2bc3b338fca189", "score": "0.54903555", "text": "function Calculator(a, b, c) {\n if (b == '+') {\n return a + c;\n } else if (b == '-') {\n return a - c;\n } else if (b == '*') {\n return a * c;\n } else if (b == '/') {\n return a / c;\n } else if (b == '%') {\n return a % c;\n }\n}", "title": "" }, { "docid": "7135e1e6adcc4012d8a0cd853fa72924", "score": "0.549027", "text": "function hardEquation(amount) {\r\n var new_variable = (createRandom(20, 0));\r\n var new_operator;\r\n //add initial variable to current answer amount and equation string\r\n equation_string += new_variable;\r\n actual_answer = new_variable;\r\n for (var i = 1; i < amount; i++) {\r\n new_variable = (createRandom(10, 0));\r\n //make sure subtraction is disabled if new variable is larger than current answer to prevent negative answer\r\n if (actual_answer < new_variable) {\r\n new_operator = \"plus\";\r\n }\r\n else {\r\n new_operator = possible_operators[createRandom(1, 0)];\r\n }\r\n //calculate new answer\r\n if (new_operator == \"minus\") {\r\n actual_answer -= new_variable;\r\n }\r\n else {\r\n actual_answer += new_variable;\r\n }\r\n //fill equation_string\r\n equation_string += \" \" + new_operator + \" \" + new_variable;\r\n }\r\n}", "title": "" }, { "docid": "bfb1a2506340a857b6eeed35b5e54178", "score": "0.5489766", "text": "function createNewCalculator() {\n // my code\n function Calculator() {\n this.read = function () {\n this.a = +prompt(\"enter a number: \", 0);\n this.b = +prompt(\"enter another number: \", 0);\n };\n this.sum = function () {\n return this.a + this.b;\n };\n this.mul = function () {\n return this.a * this.b;\n };\n }\n\n // given code\n let calculator = new Calculator();\n alert(\"You've created a calculator. It will ask you for two values.\");\n calculator.read();\n\n alert(\"Sum=\" + calculator.sum());\n alert(\"Mul=\" + calculator.mul());\n}", "title": "" }, { "docid": "039855f45dc0a259785fbc28c4c224d3", "score": "0.548478", "text": "function clickMul(){\n number += '*';\n usedOperator = '*';\n add();\n}", "title": "" }, { "docid": "41f44a3e416b635bbad1fb62bd553b46", "score": "0.54840195", "text": "function calculator (num1, num2, userOperator) {\r\n if (userOperator === \"+\") {\r\n console.log('Your result is: ' + addNumbers(num1, num2))\r\n } else if (userOperator === \"-\") {\r\n console.log('Your result is: ' + subtractNumbers(num1, num2))\r\n } else if (userOperator === \"*\") {\r\n console.log('Your result is: ' + multiplyNumbers(num1, num2))\r\n } else if (userOperator === \"/\") {\r\n console.log('Your result is: ' + divideNumbers(num1,num2))\r\n } else {\r\n console.log('Please use +, -, *, /')\r\n }\r\n}", "title": "" }, { "docid": "403ea5b75f67fe6a95bb849d79cd8ef6", "score": "0.54738957", "text": "function calculate() {\n if (operator == 1) {\n currentInput = eval(memory) * eval(currentInput);\n };\n if (operator == 2) {\n currentInput = eval(memory) / eval(currentInput);\n if (currentInput == \"Infinity\") {\n currentInput = \"Error Divide By Zero\";\n }\n };\n if (operator == 3) {\n currentInput = eval(memory) + eval(currentInput);\n };\n if (operator == 4) {\n currentInput = eval(memory) - eval(currentInput);\n };\n if (operator == 5 && currentInput >= 16) {\n currentInput = memory + \"e\" + currentInput;\n };\n if (operator == 5 && currentInput <= 15) {\n currentInput = currentInput = eval(memory) * eval(Math.pow(10, currentInput));\n };\n operator = 0; //clear operator\n memory = \"0\"; //clear memory\n displayCurrentInput();\n}", "title": "" }, { "docid": "f7f0590d7f0920efe9d4c146b37a7f84", "score": "0.54725045", "text": "function buttonClick(e) {\r\n var calcValue = document.getElementById(\"calcWindow\").value;\r\n var calcDecimal = document.getElementById(\"decimals\").value;\r\n var buttonValue = e.target.value;\r\n\r\n //this switch case is used to give each button that has a specific label a specific function\r\n switch (buttonValue) {\r\n case \"del\":\r\n calcValue = \"\";\r\n break;\r\n case \"bksp\":\r\n calcValue = eraseChar(calcValue);\r\n break;\r\n case \"enter\":\r\n calcValue += \" = \" + evalEq(calcValue, calcDecimal) + \"\\n\";\r\n break;\r\n case \"prev\":\r\n calcValue += lastEq(calcValue);\r\n break;\r\n default:\r\n calcValue += buttonValue;\r\n break;\r\n }\r\n //these document varibles use the value method to put do the specific function in the calculators comment window\r\n document.getElementById(\"calcWindow\").value = calcValue;\r\n document.getElementById(\"calcWindow\").focus();\r\n}", "title": "" }, { "docid": "4ff1c9787d9f9e814dfb307917ecf14c", "score": "0.5457115", "text": "function calculator (operation) {\n\tvar numbers = Array.prototype.slice.call(arguments)\n\tnumbers.shift()\n\tvar result;\n\tswitch (operation) {\n\t\tcase 'suma':\n\t\t\tresult = numbers.reduce(function(a,b){return a+b});\n\t\t\tbreak;\n\t\tcase 'resta':\n\t\t\tresult = numbers.reduce(function(a,b){return a-b});\n\t\t\tbreak;\n\t\tcase 'multiplicacion':\n\t\t\tresult = numbers.reduce(function(a,b){return a*b});\n\t\t\tbreak;\n\t\tcase 'division':\n\t\t\tresult = numbers.reduce(function(a,b){return a/b});\n\t\t\tbreak;\n\t} \n\treturn result;\n}", "title": "" }, { "docid": "cfc17a787b67577ee7609afa4cd68ec1", "score": "0.5455189", "text": "function addOperator(operator) {\n calc.push(Number(currentNumber.innerText));\n \n /**\n * In case the last value is '=' it clean the previous value and\n * display the next calc\n */\n if(previousNumber.innerText.charAt([previousNumber.innerText.length -1]) === \"=\" & currentNumber.innerText.length > 0) {\n previousNumber.innerText = ` ${currentNumber.innerText} ${operator}`;\n } else {\n previousNumber.innerText += ` ${currentNumber.innerText} ${operator}`;\n }\n\n currentNumber.innerText = '0';\n\n if (operator === \"=\") {\n calcResult();\n return;\n }\n\n calc.push(operator);\n}", "title": "" }, { "docid": "c812e16c9e47989a8fbd94875ecd49c3", "score": "0.54550207", "text": "function addFive(input) {\n return Number(input) + 5;\n }", "title": "" }, { "docid": "86edccd393f90c86907d666f35348887", "score": "0.5452498", "text": "function assignOperator(optn){\n\n //For + - x / ^ % \n var x = Display.value;\n var lastSign = x.charAt(x.length - 1);\n\n //For Log\n var lastSign2 = x.substring(x.length-3);\n\n //For SquareRoot\n var lastSign3 = x.substring(x.length - 1);\n\n //Condition That Avoid Consecutive Operators\n if (lastSign === '+' || lastSign === '-' || lastSign === 'x' || lastSign === '/' || lastSign === '^' || lastSign === '%' || lastSign2 === 'log' || lastSign3 === rootSign) {\n\n Display.value = \"Syntax Error! \";\n screenError = '1' ;\n }\n\n else if (operationCounter ==='1') {\n\n if (Display.value.charAt(0) === '-') {\n Display.value+= optn ;\n }\n \n else {\n \n Display.value = 'No Nested Operations ';\n screenError = '1';\n\n }\n }\n\n else if (optn === 'x') {\n\n Display.value += 'x';\n\n }\n\n else if (optn === '/') {\n\n Display.value += '/';\n\n }\n\n else if (optn === '+') {\n\n Display.value += '+';\n\n }\n\n else if (optn === '-') {\n\n Display.value += '-';\n\n }\n\n else if (optn === 'log') {\n\n Display.value = 'log';\n \n }\n\n else if (optn === '^') {\n\n Display.value += '^';\n \n }\n\n else if (optn === '%') {\n\n Display.value += '%';\n \n }\n\n else if (optn === 'sqrt') {\n\n Display.value = rootSign;\n\n }\n\n operationCounter = '1';\n \n}", "title": "" }, { "docid": "542299da6344055c0872d25cfe4a3a2c", "score": "0.54394853", "text": "calc(){\n let last = '';\n this._lastOperator = this.getLastItem();\n\n if (this._operation.length < 3) {\n\n let firstItem = this._operation[0];\n this._operation = [firstItem, this._lastOperator, this._lastNumber];\n }\n\n if (this._operation.length > 3) {\n last = this._operation.pop(); // tirar e guardar a ultima operacao\n\n this._lastNumber = this.getResult();\n\n } else if (this._operation.length == 3) {\n\n this._lastNumber = this.getLastItem(false);\n }\n \n let result = this.getResult(); // a funcao 'eval()' é quem faz as operacões\n\n if (last == \"%\") { //verificar se ultimo é simbolo %\n\n result /= 100;\n\n this._operation = [result];\n \t\n } else {\n \n this._operation = [result]; // atribuir novos valores ao array this._operation\n \n if (last) this._operation.push(last);\n }\n this.setLastNumberToDisplay(); // mostrar na tela a operacão feita\n }", "title": "" }, { "docid": "d15b4fcba824cf723a80e9b8561269c3", "score": "0.54299104", "text": "function buttonClick(e) {\r\n //Getting the value from the textarea box with the id of calcWindow. \r\n var calcValue = document.getElementById(\"calcWindow\").value;\r\n //Getting the value from the textarea box with the id of decimals. \r\n var calcDecimal = document.getElementById(\"decimals\").value;\r\n //defines each button on the calculator. \r\n var buttonValue = e.target.value;\r\n\r\n switch (buttonValue) {\r\n //this case will delete the contents on the page. \r\n case \"del\":\r\n calcValue = \"\";\r\n break;\r\n //Will delete the last object to be entered in the calculator.\r\n case \"bksp\":\r\n calcValue = eraseChar(calcValue);\r\n break;\r\n //Will solve the situation that is being applied to the calculator. \r\n case \"enter\":\r\n calcValue += \" = \" + evalEq(calcValue, calcDecimal) + \"\\n\";\r\n break;\r\n //Copies the last equation that was pluged into the calculator.\r\n case \"prev\":\r\n calcValue = lastEq(calcValue);\r\n break;\r\n default:\r\n calcValue += buttonValue;\r\n break;\r\n }\r\n //Putting the text on the window of the calculator.\r\n document.getElementById(\"calcWindow\").value = calcValue;\r\n //put the cursor focus with in the calculator window.\r\n document.getElementById(\"calcWindow\").focus();\r\n}", "title": "" }, { "docid": "fdebc20f5718b8f2544360679e8492f7", "score": "0.54238445", "text": "function add(num5, num6) {\r\n let result = num5 + num6 +1;\r\n result = result * 2;\r\n result = result - 3;\r\n result = result / 4;\r\n \r\n return result\r\n }", "title": "" }, { "docid": "e126536f745adaaf071896b9a3ff02a8", "score": "0.54211456", "text": "function calculator(stringInput){ \n // Step 1: iterate through the string, make the string into a list \n let listOfCalculatorItems = stringInput.split(\"\")\n console.log(listOfCalculatorItems)\n\n // Step 2: figure out what is the operator being inputted \n let operator = listOfCalculatorItems[1];\n console.log(operator)\n\n // Step 3: to \"parse\" the numbers into actual numbers \n let firstNumber = parseInt(listOfCalculatorItems[0]);\n let secondNumber = parseInt(listOfCalculatorItems[2])\n\n // Step4: bunch of if stateements depending on what the operator is:\n let result; \n if (operator == \"x\") {\n result = firstNumber * secondNumber;\n } else if (operator == \"/\") {\n result = firstNumber / secondNumber; \n } else if (operator == \"+\") {\n result = firstNumber + secondNumber;\n } else if (operator == \"-\") { \n result = firstNumber - secondNumber;\n }\n\n return result;\n}", "title": "" }, { "docid": "559fea0911547d23aa64098a124cf383", "score": "0.5419303", "text": "function calculate(operand1, operator, operand2) {\n\tif (operator == \"addButton\") \n\t\tresult = Number(operand1) + Number(operand2);\n\telse if (operator == \"subtractButton\")\n\t\tresult = Number(operand1) - Number(operand2);\n\telse if (operator == \"multiplyButton\")\n\t\tresult = Number(operand1) * Number(operand2);\n\telse if (operator == \"divideButton\")\n\t\tresult = Number(operand1)/Number(operand2);\n}", "title": "" }, { "docid": "122ade499cff6b183ae07d4f0cee3350", "score": "0.54159796", "text": "function mediumEquation(amount) {\r\n var new_variable = (createRandom(10, 0));\r\n var new_operator;\r\n //creating an initial value is required to make sure the answer is never negative\r\n //add initial variable to current answer amount and equation string\r\n equation_string += new_variable;\r\n actual_answer = new_variable;\r\n for (var i = 1; i < amount; i++) {\r\n new_variable = (createRandom(10, 0));\r\n //make sure subtraction is disabled if new variable is larger than current answer to prevent negative answer\r\n if (actual_answer < new_variable) {\r\n new_operator = \"plus\";\r\n }\r\n else {\r\n new_operator = possible_operators[createRandom(1, 0)];\r\n }\r\n //calculate new answer\r\n if (new_operator == \"minus\") {\r\n actual_answer -= new_variable;\r\n }\r\n else {\r\n actual_answer += new_variable;\r\n }\r\n //fill equation_string\r\n equation_string += \" \" + new_operator + \" \" + new_variable;\r\n }\r\n}", "title": "" }, { "docid": "e246c2b15d0a9666ffdcd45218745629", "score": "0.5415538", "text": "function AppendOperator(x) {\n operator += x;\n document.getElementById('textbox').value = '0';\n}", "title": "" }, { "docid": "e2d8077103e84558e91e37d9ec5ad9d2", "score": "0.54116", "text": "function ArithmeticOperation(operator) {\n if (history.innerText != '' && screen.innerText != '') {\n switch (currentOperator) {\n case '+':\n history.innerText = parseInt(history.innerText) + parseInt(screen.innerText);\n break;\n \n case '-':\n history.innerText = parseInt(history.innerText) - parseInt(screen.innerText);\n break;\n \n case '*':\n history.innerText = parseInt(history.innerText) * parseInt(screen.innerText);\n break;\n \n case '/':\n history.innerText = parseInt(history.innerText) / parseInt(screen.innerText);\n break;\n\n case '%':\n history.innerText = parseInt(history.innerText) % parseInt(screen.innerText);\n break;\n\n case 'comb':\n Combination();\n break;\n }\n } else {\n if(screen.innerText != ''){\n history.innerText = parseInt(screen.innerText);\n }\n }\n logHistory();\n \n if (operator == '=') {\n currentOperator = '';\n } else {\n currentOperator = operator;\n screen.innerText = '';\n }\n}", "title": "" }, { "docid": "cf5872c655a69005218fa844c412611e", "score": "0.54077387", "text": "function calc(exp) {\n return `calc(${exp})`;\n}", "title": "" }, { "docid": "cf5872c655a69005218fa844c412611e", "score": "0.54077387", "text": "function calc(exp) {\n return `calc(${exp})`;\n}", "title": "" }, { "docid": "c2ae55b22bce726d2bb4a0e5b7e9f0b3", "score": "0.5401174", "text": "function Calculator() {\n return (\n <div>\n {/* Math renders a span tag containing the result */}\n {/* Each span is the font-size of the result in pixels */}\n <p>\n 19 + 142 = <Math num1={19} operator=\"+\" num2={142} />\n </p>\n <p>\n 42 - 17 = <Math num1={42} operator=\"-\" num2={17} />\n </p>\n <p>\n 100 * 3 = <Math num1={100} operator=\"*\" num2={3} />\n </p>\n <p>\n 96 / 4 = <Math num1={96} operator=\"/\" num2={4} />\n </p>\n </div>\n );\n}", "title": "" }, { "docid": "1f180ed710bf0e1f3688af00836ed200", "score": "0.5396969", "text": "function onButtonPress(button) {\n\n // updates input operators\n if (button.type == \"operator\") {\n calc_data.expression.push(button.symbol);\n calc_data.equiv_form.push(button.value);\n } \n \n // updates input numbers and ()'s\n else if (button.type == \"number\") {\n calc_data.expression.push(button.symbol);\n calc_data.equiv_form.push(button.value);\n } \n \n // updates screen input for trig functions\n else if (button.type == \"trig_func\") {\n if(button.name == \"sin\") {\n calc_data.expression.push(\"(sin\");\n calc_data.equiv_form.push(button.value);\n }\n else if(button.name == \"cos\") {\n calc_data.expression.push(\"(cos\");\n calc_data.equiv_form.push(button.value);\n }\n else if(button.name == \"tan\") {\n calc_data.expression.push(\"(tan\");\n calc_data.equiv_form.push(button.value);\n }\n else if(button.name == \"cot\") {\n calc_data.expression.push(\"(cot\");\n calc_data.equiv_form.push(button.value);\n } \n } \n \n // updates screen input for math functions\n else if (button.type == \"math_func\") {\n if(button.name == \"log\") {\n calc_data.expression.push(\"log\");\n calc_data.equiv_form.push(button.value);\n }\n else if(button.name == \"ln\") {\n calc_data.expression.push(\"ln\");\n calc_data.equiv_form.push(button.value);\n }\n else if(button.name == \"exponent\") {\n calc_data.expression.push(\"^\");\n calc_data.equiv_form.push(button.value);\n }\n } \n \n // updates input for other keys\n else if (button.type == \"key\") {\n if (button.name == \"all-clear\") {\n calc_data.expression = [];\n calc_data.equiv_form = [];\n updateResultToScreen(0);\n\n } else if (button.name == \"delete\") {\n calc_data.expression.pop();\n calc_data.equiv_form.pop();\n }\n } \n \n // updates input for calculate \"=\" button\n else if (button.type == \"calculate\") {\n console.log(\"calc_data: \", calc_data.equiv_form);\n\n let equiv_js_expression = calc_data.equiv_form.join(\"\");\n onCalculatePress(equiv_js_expression);\n }\n\n //testing to view the equivalent js expression as it forms\n console.log(\"equivalent: \", calc_data.equiv_form.join(''));\n\n updateInputToScreen(calc_data.expression.join(\"\"));\n}", "title": "" }, { "docid": "2232facee6e7bc2e859e51287d24023c", "score": "0.53955483", "text": "function addAndMultiplyBy5(num1, num2) {\n return (num1 + num2) * 5;\n}", "title": "" }, { "docid": "8b1e6134eb8c3ff67725583061181dd9", "score": "0.5394321", "text": "function calculator(n1, n2, op) {\n switch (op) {\n case \"+\": {\n return n1 + n2;\n }\n case \"-\": {\n return n1 - n2;\n }\n case \"*\": {\n return n1 * n2;\n }\n case \"/\": {\n return n1 / n2;\n }\n }\n}", "title": "" }, { "docid": "7169b980b16f39dd60d1ba0243553882", "score": "0.53939307", "text": "function method(){\n click ++;//button click counter\n var input = $(this).text();//get text value from button or method clicked\n $('#method').append(input);//add method symbol to dom\n $('span').toggleClass(\"input\");//toggle class on span so second set of numbers in different span\n\n if (click === 2) {\n $('#total').text('ERROR: only one operation allowed!');//error if clicked more than once\n $('span').toggleClass(\"input\");//toggle class on span so second set of numbers in different span\n click=0;\n } else if ($(this).data('name')==='add'){\n calcMethod = 'add';\n } else if ($(this).data('name')==='subtract'){\n calcMethod = 'subtract';\n } else if ($(this).data('name')==='multiply'){\n calcMethod = 'multiply';\n } else {\n calcMethod = 'divide';\n }\nreturn calcMethod;//return math opertor method to use in calcFunc\n}", "title": "" }, { "docid": "af207d8aee6b15fcd83bf2e6b52d5033", "score": "0.5389478", "text": "function calc9() {\n var aa8 = parseFloat( document.getElementById(\"8oper1a\").value );\n var ab8 = parseFloat( document.getElementById(\"8oper1b\").value );\n\t var ac8 = parseFloat( document.getElementById(\"8oper1c\").value );\n var ad8 = parseFloat( document.getElementById(\"8oper1d\").value );\n\t \n\nw8 = plus4(aa8, ab8, ac8, ad8); \n\n\tif(!w8){\n\t\tw8 = 0;\n\t}\n\n document.getElementById(\"8resul1\").value = w8;\n//****\t \n//****\t\n var ba8 = parseFloat( document.getElementById(\"8oper2a\").value );\n var bb8 = parseFloat( document.getElementById(\"8oper2b\").value );\n\t var bc8 = parseFloat( document.getElementById(\"8oper2c\").value );\n var bd8 = parseFloat( document.getElementById(\"8oper2d\").value );\n\t\n\nx8 = plus4(ba8, bb8, bc8, bd8); \n\n\tif(!x8){\n\t\tx8 = 0;\n\t}\n\n document.getElementById(\"8resul2\").value = x8;\n//****\t \n//****\t\n\t var ca8 = parseFloat( document.getElementById(\"8oper3a\").value );\n var cb8 = parseFloat( document.getElementById(\"8oper3b\").value );\n\t var cc8 = parseFloat( document.getElementById(\"8oper3c\").value );\n var cd8 = parseFloat( document.getElementById(\"8oper3d\").value );\n\t\n\ny8 = plus4(ca8, cb8, cc8, cd8);\n\n\tif(!y8){\n\t\ty8 = 0;\n\t} \n\n document.getElementById(\"8resul3\").value = y8;\n }", "title": "" }, { "docid": "e07581e0f00c2bdb27fee0ba7daac840", "score": "0.53864884", "text": "function calculator(a, b, method) {\n switch (method) {\n case \"add\":\n return a + b;\n case \"sub\":\n return a - b;\n case \"mul\":\n return a * b;\n case \"divide\":\n return a / b;\n case \"exponentiation\":\n return Math.pow(a, b);\n default:\n return `please pass method to calculator`\n }\n}", "title": "" }, { "docid": "1a6c6aa25b06c85d48f6b4d9c4910ba5", "score": "0.53856826", "text": "function init() {\n // For loop for the number buttons\n for(var i=0; i < calc.buttonsArr.length; i ++) {\n calc.buttonsArr[i].addEventListener('click', function() {\n calc.screens.value += this.innerHTML\n })\n }\n\n // For loop for the operator buttons.\n // This adds the event listener and then prints the value of the buttons that\n // are pressed onto the input screen. Then, the input screen value is taken and\n // thrown into an arry called \"calculation\"\n for(var x=0; x < calc.operatorsArr.length; x ++ ) {\n calc.operatorsArr[x].addEventListener('click', function() {\n calc.calculation.push(calc.screens.value)\n calc.calculation.push(this.innerHTML)\n calc.screens.value = ''\n calc.screens.placeholder = ''\n })\n }\n\n // added event listener for the clear button\n calc.clear.addEventListener('click', clear)\n\n // added event listener for the equals button that includes all of the if statements\n // to tell the computer what operator to use. It takes the numbers from the\n // calculation array and then performs one of the functions on them\n // and then clears the calculation array so new numbers can be entered\n calc.equals.addEventListener('click', function() {\n if (calc.calculation[1] == calc.operatorsArr[1].innerHTML) {\n calc.calculation.push(calc.screens.value)\n calc.screens.value = calc.operations.add(Number(calc.calculation[0]),Number(calc.calculation[2]))\n calc.calculation = []\n }\n else if (calc.calculation[1] == calc.operatorsArr[0].innerHTML) {\n calc.calculation.push(calc.screens.value)\n calc.screens.value = calc.operations.subtract(Number(calc.calculation[0]),Number(calc.calculation[2]))\n calc.calculation = []\n }\n else if (calc.calculation[1] == calc.operatorsArr[3].innerHTML) {\n calc.calculation.push(calc.screens.value)\n calc.screens.value = calc.operations.multiply(Number(calc.calculation[0]),Number(calc.calculation[2]))\n calc.calculation = []\n }\n else if (calc.calculation[1] == calc.operatorsArr[2].innerHTML) {\n calc.calculation.push(calc.screens.value)\n calc.screens.value = calc.operations.divide(Number(calc.calculation[0]),Number(calc.calculation[2]))\n calc.calculation = []\n }\n })\n }", "title": "" }, { "docid": "3d394a7385974d892abaf6962775585d", "score": "0.53851515", "text": "function more_Math() {\n var simple_Math = (1 + 2) * 10 / 2 - 5;\n document.getElementById(\"Math5\").innerHTML = \"1 plus 2, multiplied by 10, divided in half and then subtracted by 5 equals \" + simple_Math;\n}", "title": "" }, { "docid": "1ce91ef09599c1c308e00a8f7349b576", "score": "0.53837895", "text": "function add() {\n if (strInput === \"\" && operation === \"\" && current === 0) printed = \"0+\";\n else {\n if (strInput === \"\" && operation === \"\" && current !== 0) {\n printed = fix(current) + \"+\";\n result = current;\n } else {\n if (strInput !== \"\" && operation === \"\") {\n printed = strInput + \"+\";\n result = Number(strInput);\n } else {\n if (strInput !== \"\") current = Number(strInput);\n switch (operation) {\n case \"+\":\n printed += fix(current) + \"+\";\n result += current;\n break;\n case \"-\":\n printed += fix(current) + \"+\";\n result -= current;\n break;\n case \"*\":\n printed += fix(current) + \"+\";\n switch (prevOp) {\n case \"\":\n result = tempResult * current;\n break;\n case \"+\":\n result += tempResult * current;\n break;\n case \"-\":\n result -= tempResult * current;\n break;\n }\n break;\n case \"/\":\n if (current === 0) {\n clear();\n $(\"#inputScr\").html(\"Cannot divide by zero\");\n return;\n }\n printed += fix(current) + \"+\";\n switch (prevOp) {\n case \"\":\n result = tempResult / current;\n break;\n case \"+\":\n result += tempResult / current;\n break;\n case \"-\":\n result -= tempResult / current;\n break;\n }\n break;\n case \"sqrt\":\n case \"1/\":\n printed += strOutput + \"+\";\n checkPrevOpTwo();\n break;\n case \"%\":\n printed += fix(percentage) + \"%\" + fix(current) + \"+\";\n current = percentage * current / 100;\n checkPrevOpTwo();\n percentage = 0;\n break;\n } // end of switch operation\n }\n }\n }\n current = result;\n $(\"#outputScr\").html(fixOut(printed));\n $(\"#inputScr\").html(fix(current));\n operation = \"+\";\n prevOp = \"+\";\n prevOpTwo = \"\";\n tempResult = null;\n strInput = \"\";\n strOutput = \"\";\n }", "title": "" }, { "docid": "b231f3a52492c578303de5dcb70ab037", "score": "0.53825384", "text": "function Calculators() {\n this.e_label1 = '';\n this.e_label2 = '';\n this.e_label3 = '';\n this.repaymentCalculatorError = false;\n}", "title": "" }, { "docid": "8cba3b01c9ff5a4fcd15f19c4848e161", "score": "0.5379374", "text": "function mathOperation() {\n if (lastOperation === 'X'){\n result = parseFloat(result) * parseFloat(display2Num);\n } else if (lastOperation === '+'){\n result = parseFloat(result) + parseFloat(display2Num);\n }else if (lastOperation === '-'){\n result = parseFloat(result) - parseFloat(display2Num);\n }else if (lastOperation === '/'){\n result = parseFloat(result) / parseFloat(display2Num);\n }else if (lastOperation === '%'){\n result = parseFloat(result) % parseFloat(display2Num);\n }\n}", "title": "" }, { "docid": "a95a609d61b8bc01c5696db6a8e2b932", "score": "0.537872", "text": "function Equation(){\n\t//not implemented\n}", "title": "" }, { "docid": "09c423a8a1956193fb884f0e4c3f5975", "score": "0.53753203", "text": "function Calculator() {\n this.read = function() {\n this.a = +prompt(\"Enter value A\");\n this.b = +prompt(\"Enter value B\");\n };\n this.sum = function() {\n return this.a + this.b;\n };\n this.mul = function() {\n return this.a * this.b;\n };\n}", "title": "" }, { "docid": "9dbbef7300f2ed5fa3ff19d254eea64d", "score": "0.5370745", "text": "function operate(operator) {\r\n if ($('#input-window').val() === '') return; //nothing to calculate\r\n\r\n // If the user just pressed an operator button, replace the operator\r\n // in the formula string. Otherwise, update the input window with current\r\n // result and add the operator to the formula string\r\n if (fBtnPressed === true) {\r\n var formula = $('#formula').html().replace(/(\\+|\\-|\\*|\\/)$/, operator);\r\n $('#formula').html(formula);\r\n } else {\r\n fBtnPressed = true;\r\n clear = true;\r\n $('#formula').text($('#formula').text() + $('#input-window').val());\r\n result = eval($('#formula').text());\r\n formatNumber(result);\r\n $('#formula').html($('#formula').text() + operator);\r\n }\r\n}", "title": "" }, { "docid": "7e58a7ab259f37f6f92174b4f4686fd5", "score": "0.53681755", "text": "function addNumberInput(value){\n const inputScreen = document.getElementsByClassName('calculator__screen')[0]; //añadir al input osea capturar el contenedor \n const inputValue = inputScreen.value; // captura el valor como un string\n if(inputValue === \"0\" && inputValue.length === 1 && value !== \",\")// sustituir el 0 del principio\n return inputScreen.value = value; \n \n \n if(inputScreen.value === \"\" && value == \",\"){ //contenedor de la calculadora igual vacio\n return inputScreen.value = 0 + value;\n }\n inputScreen.value = inputValue + value; //añade N° derecha-- no los suma xq el primer valor es una string + el parametro\n}", "title": "" }, { "docid": "38fbbfc73c0a48eacd5afcebf9db3910", "score": "0.5367819", "text": "function addFive(input) {\n return input + 5;\n}", "title": "" }, { "docid": "7148546eb3f6b4f76f593838156679f7", "score": "0.536483", "text": "function calculator(start) {\n var total = start\n return {\n add: function(numToAdd) {\n return total += numToAdd\n },\n subtract: function(numToSubtract) {\n return total -= numToSubtract\n },\n multiply: function(numToMultiply) {\n return total *= numToMultiply\n },\n divide: function(numToDivide) {\n return total /= numToDivide\n },\n enter: function(){\n console.log(total)\n }\n }\n}", "title": "" }, { "docid": "021188e1d05613b9a703c1110b706e8f", "score": "0.5361945", "text": "function calculate(){\n const tempNum = parseInt(document.querySelector(\".result\").innerText);\n switch (operator){\n case '+':\n buffer += tempNum;\n break;\n case '-':\n buffer -= tempNum;\n break;\n case '×':\n buffer *= tempNum;\n break;\n case '÷':\n buffer /= tempNum;\n buffer = Math.round(buffer);\n break;\n default:\n buffer = tempNum;\n break;\n }\n\n}", "title": "" }, { "docid": "b0ec6e14e2294ac541f2c80b6548ad4d", "score": "0.53599036", "text": "function run(){\n\n let btn = this.value;\n console.log(btn)\n if (clearForm(btn, firstNum, secondNum, operator)) {\n firstNum = \"\";\n secondNum = \"\";\n operator = null;\n answer = undefined;\n display.value = \"\";\n\n } else if (readyToCalculate(btn, firstNum, secondNum, operator)) {\n if (answer === undefined) {\n answer = calculate(firstNum, secondNum, operator);\n } else {\n answer = calculate(answer, secondNum, operator);\n }\n display.value = answer;\n\n } else if (operatorAfterMinus(btn, firstNum, secondNum, operator)) {\n firstNum = \"\";\n secondNum = \"\";\n operator = null;\n answer = undefined;\n display.value = \"ERROR\";\n\n } else if (allowChainingOperations(btn, firstNum, secondNum, operator)) {\n firstNum = calculate(firstNum, secondNum, operator);\n operator = btn;\n secondNum = \"\";\n display.value = firstNum;\n } else if (operatorAfterOperator(btn, firstNum, secondNum, operator)) {\n operator = btn;\n\n } else if (allowNegativeFirstNumber(btn, firstNum)) {\n firstNum += btn;\n display.value = firstNum;\n\n } else if (allowNegativeSecondNumber(btn, operator, secondNum)) {\n secondNum += btn;\n display.value = secondNum;\n \n } else if (anyOperator(btn)) {\n operator = btn;\n\n\n } else if (setFirstNumber(operator)) {\n firstNum += btn;\n display.value = firstNum;\n\n } else if (setSecondNumber(firstNum, operator)) {\n secondNum += btn;\n display.value = secondNum;\n\n }\n}", "title": "" }, { "docid": "34bb2614e7b55c81fc649ffe6b1258fc", "score": "0.53597707", "text": "function setOperator(number){\n operator = number;\n var opString = \"\";\n flag = true;\n if(operator === 4){\n display.innerHTML += \" / \";\n opString = \" / \";\n }else if(operator === 3){\n display.innerHTML += \" * \";\n opString = \" * \";\n }else if(operator === 2){\n display.innerHTML += \" - \";\n opString = \" - \";\n }else{\n display.innerHTML += \" + \";\n opString = \" + \";\n }\n //for getting rid of multiple operators\n if(flag === true){\n display.innerHTML = num1 + opString;\n }\n //Does not let use do an operation before num1\n if(flag === true && num1 === \"\"){\n clearButton();\n }\n\n if(equalTo === true){\n clearButton();\n }\n}", "title": "" }, { "docid": "a1c8eb2cf2b243f5ffbdd80660783cc8", "score": "0.53550136", "text": "function calculator(num1,num2,calcType) {\n if(calcType===\"add\"){\n return num1+num2;\n } else if(calcType===\"sub\"){\n return num1-num2;\n } else if(calcType===\"mul\"){\n return num1*num2;\n } else if(calcType===\"div\"){\n return num1/num2;\n }\n}", "title": "" }, { "docid": "f992257fada6e709e7e47f567b63d8a5", "score": "0.5349737", "text": "function Calculator(operasi,nilai1,nilai2){\n\n\t// console.log(`hasil ${operasi} ${nilai1} dan ${nilai2} adalah ${hasil}`);\n\tlet result = ''; //untuk menyimpan nilai result\n\tif (operasi === \"pertambahan\") {\n\t\tresult = nilai1 + nilai2\n\t } else if (operasi === \"pengurangan\") {\n\t \tresult = nilai1 - nilai2\n\t } else if (operasi === \"perkalian\") {\n\t \tresult = nilai1 * nilai2\n\t }else{\n\t \treturn 'nama operasi tidak tersedia' //menampilkan jika input nama operator salah\n\t }\n\t return `hasil ${operasi} ${nilai1} dan ${nilai2} adalah ${result}`; \n\t\n}", "title": "" }, { "docid": "2523dded358269fdef01336c28cec721", "score": "0.534766", "text": "function plusmin() {\r\n if ($('#input-window').val() === '') return; //nothing to calculate\r\n result = eval($('#input-window').val() + '*-1');\r\n formatNumber(result);\r\n}", "title": "" }, { "docid": "614d56d0b7e0bf49c9715dbcd7767040", "score": "0.5344932", "text": "function plusM() {\n if (document.getElementById(\"operator\").value != \"\") {\n var disNum = document.getElementById(\"sNum\").value;\n\n if (numMemory == \"\") {\n numMemory += document.getElementById(\"sNum\").value;\n } else {\n var newNum = eval(numMemory + \"+\" + disNum);\n numMemory = newNum;\n }\n } else {\n var disNum = document.getElementById(\"sNum\").value;\n if (numMemory == \"\") {\n numMemory += document.getElementById(\"fNum\").value;\n } else {\n var newNum = eval(numMemory + \"+\" + disNum);\n numMemory = newNum;\n }\n }\n}", "title": "" }, { "docid": "f5c115e210f94f9c8a8e43318ddd15f4", "score": "0.53436667", "text": "function getOperand(operand){\r\n var input_var = document.getElementById('input');\r\n switch(operand){\r\n case '+': \r\n input_var.value += '+';\r\n break;\r\n case '-':\r\n input_var.value += '-';\r\n break;\r\n case '÷':\r\n input_var.value += '/';\r\n break;\r\n case 'x':\r\n input_var.value += '*';\r\n break;\r\n }\r\n}", "title": "" } ]
1fc6117f6df80d608e1ce6d8940dda89
Cohesive View Framework Ends Screen Specific Mandatory Validation Starts
[ { "docid": "d7eb5e2c2ddb1d3fe95776410769eda3", "score": "0.5181696", "text": "function fnTeacher360DegreeReportMandatoryCheck(operation) {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\t\n\tswitch (operation) {\n\t\t case 'View':\n if ($scope.teacherID == '' || $scope.teacherID == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Teacher ID']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t/*if ($scope.teacherName == '' || $scope.teacherName == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Teacher Name']);\n\t\t\t\treturn false;\n\t\t\t}*/\n\t\t\tbreak;\n\t\t case 'Detail':\n\t\t return true;\n\t\t break;\n\t}\n\treturn true;\n}", "title": "" } ]
[ { "docid": "f97a898db2851bed47cc0d7d534706c1", "score": "0.61392254", "text": "function activitiesValidated(e) {\n\t// Remove error messages and alerts\n\tactivitiesLegend[2].classList.add('valid');\n\tactivitiesLegend[2].classList.remove('not-valid');\n\te.parentElement.lastElementChild.style.display = 'none';\n}", "title": "" }, { "docid": "8c7da5ec061d2fc9023ef30418a536f6", "score": "0.59830385", "text": "function finish() {\n if (fieldsValidated && groupFieldsValidated) {\n if (errors.length < 1) {\n errors = null;\n form.trigger(yafovEvents.FORM_VALID);\n } else {\n form.trigger(yafovEvents.FORM_INVALID, {errors: errors});\n }\n }\n }", "title": "" }, { "docid": "d858452ce737135daa37e970b3e6f44b", "score": "0.5940731", "text": "isValidated() {\n if (this.props.isOnSignupView) {\n //this step can be skipped, so we'll just run this function to update the completedSignupSteps\n this.props.updateCandidateValues({}, false, true); //update parent component\n // let isStepValid = this.validateAllAddAndEditForms();\n return true; //returning true to have stepzilla move user to the next step\n }\n }", "title": "" }, { "docid": "22067916ebe2acd0b072dd84adfd79ec", "score": "0.58510154", "text": "runValidations() {}", "title": "" }, { "docid": "cec4fa3ea54f20e246fe174f504524e3", "score": "0.574765", "text": "function C17537_Auto_Validation_Dont_Validate()\n{\ntry{\n Log.AppendFolder(\"C17537_Auto_Validation_Dont_Validate\");\n InitializationEnviornment.initiliaze();\n AppLoginLogout.login(); \n var keyWordNm =\"Daily Admission\";\n var packageNm =\"Dated\";\n var subPakNm =\"Adult\";\n var qty = 1;\n dt = CommonCalender.getTodaysDate();\n var dateD = aqConvert.DateTimeToFormatStr(dt, \"%#m/%#d/%Y\");\n var givenPaymentType = \"Cash\"; \n \n Button.clickOnButton(selectDirectoryButton); \n if(slidetoggleAutovalidateslidetogg.FlexObject.active){\n slidetoggleAutovalidateslidetogg.Click(); \n } else{\n \t\t\t Button.clickOnButton(selectDirectoryButton); \n \t\t } \n placeOrder(keyWordNm,packageNm,subPakNm,qty,dateD,givenPaymentType);\n selectSupportManagerFromMainMenu(); \n aqUtils.Delay(5000);\n // AppLoginLogout.loginSupportManager();\n checkOrderInfoSupportManager(OrderInfo.prototype.OrderID,qty);\n AppLoginLogout.logout();\n } catch (e) {\n\t merlinLogError(\"Oops! There's some glitch in the script: \" + e.message);\n\t return;\n }\n finally { \n\t Log.PopLogFolder();\n } \n}", "title": "" }, { "docid": "7456645893442617a64f8a64c41114e5", "score": "0.5669056", "text": "checkIfLayoutIsValid ()\n {\n console.log('End of checking layout components existence\\n');\n if (this._layoutIsValid)\n {\n this.dispatch('LayoutIsLoaded');\n }\n }", "title": "" }, { "docid": "99e089be1faa2b5e5fef322ff604f5a3", "score": "0.56514263", "text": "function validate() {\n\t\texperimentr.endTimer('tutorial');\n\t\texperimentr.release();\n\t}", "title": "" }, { "docid": "1b96d4c1843ca4650a24128f4992a668", "score": "0.564133", "text": "clickValidate() {\n // let proveTime = false;\n let proveChoose = false;\n if (this.proveTimeService.checkInputTime(this.dateTimepickerStart, this.dateTimepickerEnd)) { //this.datePickFirstDate, this.datePickerSeccondDate, this.pickStartTime, this.pickEndTime\n proveChoose = true;\n //refactor the input date and time to a date \n /* this.isoDateStart = this.timeService.dateToIsoString(this.datePickFirstDate, this.pickStartTime);\n this.isoDateEnd = this.timeService.dateToIsoString(this.datePickerSeccondDate, this.pickEndTime); */\n this.isoDateStart = this.timeService.dateTimeToIsoString(this.dateTimepickerStart);\n this.isoDateEnd = this.timeService.dateTimeToIsoString(this.dateTimepickerEnd);\n switch (this.roleId) {\n case 2:\n proveChoose = this.checkInputAssistance();\n break;\n case 3:\n proveChoose = this.checkInputCustomer();\n break;\n }\n //with participate enabled\n if (this.participateDisabled == false && proveChoose) {\n if (this.pickPaastBon.name == \"\") {\n this.toastsService.noPaastBon();\n return;\n }\n if (this.pickPaastActivity.name == \"\") {\n this.toastsService.noPaastActivity();\n return;\n }\n }\n //prove the input values for the user\n this.proveSelfPayer(); //to prove the choose of selfpayer to push it to the database\n //checks the input for the table\n if (!this.showTable) { // makes the calcultation only if the user clicks bestätigen\n switch (this.roleId) {\n case 2:\n this.checkInputForTableAssistent();\n break;\n case 3:\n this.checkInputForTableCustomer();\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "6a8de5dfc97ac7e81aa3f4b21125685d", "score": "0.56189483", "text": "function prepareUi() \n{\t\t\n //If arInvoiceId > 0, Its an Update/Put, Hence render UI with retrieved existing data\n if (loanDocumentPlaceHolderType.loanDocumentPlaceHolderTypeId > 0) {\n renderControls();\n //populateUi();\n dismissLoadingDialog();\n } else //Else its a Post/Create, Hence render empty UI for new Entry\n {\n renderControls();\n dismissLoadingDialog();\n }\n\n\t//Validate to Check Empty/Null input Fields\n $('#save').click(function (event) {\n\t\n var validator = $(\"#myform\").kendoValidator().data(\"kendoValidator\");\n\t\t\n if (!validator.validate()) {\n smallerWarningDialog('One or More Fields are Empty', 'ERROR');\n } else {\n\t\t\tdisplayLoadingDialog();\n\t\t\t//Retrieve & save data\n\t\t\tsaveDocument(); \n\t\t}\n\t});\n}", "title": "" }, { "docid": "a2b3aed4538fce1e693f03a95d4e1f5f", "score": "0.5557769", "text": "function skipValidation() {\n jq(\"body\").data(\"isSkipNavigationConfirm\", true);\n \n}", "title": "" }, { "docid": "003a3532025e4690a89ca1f9ccc6ecac", "score": "0.5544716", "text": "function hideAgileBoardForm() {\n $rootScope.isAgileBoardFormVisible = false;\n }", "title": "" }, { "docid": "4a9ea78a2c5e9eb1ebfce29270fc16c1", "score": "0.55369186", "text": "function onStartActivity(event) {\n event.preventDefault();\n var validCategory = selectedCategory !== null;\n var validGoal = userGoal.value !== \"\";\n var validMinutes = minutes.value !== \"\" && minutes.value !== 'e';\n var validSeconds = seconds.value !== \"\" && seconds.value !== 'e';\n if (validCategory && validGoal && validMinutes && validSeconds) {\n changePage1();\n } else {\n warning.hidden = false;\n userGoal.style.borderBottom = '1px solid #EFB7EC';\n }\n}", "title": "" }, { "docid": "5317e9e17ebb09ff7608314bd8f1dc1b", "score": "0.5527534", "text": "function validated(e) {\n\t// Remove error messages and alerts\n\te.parentElement.classList.add('valid');\n\te.parentElement.classList.remove('not-valid');\n\te.parentElement.lastElementChild.style.display = 'none';\n}", "title": "" }, { "docid": "f722ea5e7d75d4e23c15ffbb098ae0a0", "score": "0.5519684", "text": "function fnGeneralLevelConfigurationsReject() {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\t// Generic Field Starts\n\t$scope.MakerRemarksReadonly = true;\n\t$scope.CheckerRemarksReadonly = false;\n\t$scope.mastershow = true;\n\t$scope.detailshow = false;\n\t$scope.auditshow = false;\n\t$scope.mvwAddDeteleDisable = true; //Multiple View\n\t$scope.operation = 'Rejection';\n\t// Generic field Ends\n\t// Screen Specific Scope Starts\t\n\t$scope.instituteIDreadOnly = true;\n\t$scope.instituteNamereadOnly = true;\n $scope.instituteSearchreadOnly = true;\n \n\t$scope.notificationTypereadOnly = true;\n\t$scope.notificationDescriptionreadOnly = true;\n\t$scope.subjectIDreadOnly = true;\n\t$scope.subjectNamereadOnly = true;\n\t$scope.feeTypereadOnly = true;\n\t$scope.feeDescriptionreadOnly = true;\n $scope.otherLangDescriptionreadOnly=true;\n\t$scope.fromreadOnly = true;\n\t$scope.toreadOnly = true;\n\t$scope.gradereadOnly = true;\n\t$scope.examTypereadOnly = true;\n\t$scope.examDescriptionreadOnly = true;\n\t// screen Specific Scope Ends\n\treturn true;\n}", "title": "" }, { "docid": "8548dd36f9327be55ba228217e146ecc", "score": "0.55105364", "text": "function entryvalidator()\r\n{\r\n\tValidate(1, 0, 'name');\r\n\tValidate(0, 0, 'order');\r\n\tValidate(1, 0, 'contracts');\r\n\tValidate(1, 0, 'data');\r\n\tValidate(1, 0, 'accessories');\r\n\tValidate(1, 0, 'phones');\r\n\tinnernullvalidate('vzaccessinput');\r\n\tinnernullvalidate('vzemailinput');\r\n\tinnernullvalidate('nlineinput');\r\n\tinnernullvalidate('nlinecpeinput');\r\n\tif(ispagevalid())\r\n\t{\r\n\t\tloadXMLDisplay();transform();addUser();history.go();clearcells();\r\n\t}\r\n}", "title": "" }, { "docid": "d683245f2f62f157a6675aff5964417c", "score": "0.5497545", "text": "validateHeaderButton(){\n //valida si no existe seleccionada ningun tipo de oferta\n if(this.droolsModel == null){\n return false;\n }else if(this.droolsModel.typeAlert == null){\n return false;\n }else if((this.droolsModel.typeAlert.id == 4 || this.droolsModel.typeAlert.id == 12) \n && this.droolsModel.stage == null){\n return false;\n }else if(this.hideGrid){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "10144cfca430a116673f5074adfd8ec3", "score": "0.5494832", "text": "function onCancel() {\n guestView();\n }", "title": "" }, { "docid": "de470f07b99b90ee75d9cbce1125c87c", "score": "0.548985", "text": "onNextPress() {\n\t\tconst res = this.props.validate();\n\n\t\tif (res === undefined) {\n\t\t\tthis.onNext();\n\t\t} else {\n\t\t\tthis.props.ui.showErrorAlert(\n\t\t\t\tthis.t('errors.invalidFieldsAlert.title'),\n\t\t\t\tthis.t('errors.invalidFieldsAlert.message')\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "5da9933f4ec7d9fb22fcf8a4dfadb916", "score": "0.5483793", "text": "function validateCustomerInsight(pageType)\n{\n\t\n\n\tvar hdnImageURL = document.getElementById(\"hdnImageURL\").value;\n\tif(pageType == 'new')\n\t{\n\t\t/**\n\t\t*\tValidate the object of divs.\n\t\t**/\t\n\t\tif(document.getElementById('ProductInsightSummary') && document.getElementById('errProductCustomerPainPoints')){\t\t\t\n\t\t\tdocument.getElementById('errProductCustomerPainPoints').style.display = 'none';\n\t\t\tdocument.getElementById('errProductInsightSummary').style.display = 'none';\n\t\t}\n\t\t\n\t\t/**\n\t\t*\tValidating Customer Feedback\n\t\t**/\n\t\tif(isEmpty(document.getElementById('ProductInsightSummary').value) || (document.getElementById('ProductInsightSummary').value == \"Please summarise the feedback (quoting verbatim where possible) - this will help to ensure a speedy and effective response!\") && document.getElementById('ProductInsightSummary').disabled == false)\n\t\t{\n\t\t\tdocument.getElementById('errProductInsightSummary').style.display = 'block';\t\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t*\tOpening collapsed divs if there values are not entered.\n\t\t\t**/\n\t\t\tif(document.getElementById('DivInsightSummary') && document.getElementById('DivCustomerPainPoints'))\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"imgInsightSummary\").src = hdnImageURL+\"/arrow-down.gif\";\n\t\t\t\tdocument.getElementById(\"imgCustomerPainPoints\").src = hdnImageURL+\"/arrow-down.gif\";\n\n\t\t\t\tdocument.getElementById('DivInsightSummary').style.display = 'block';\n\t\t\t\tdocument.getElementById('DivCustomerPainPoints').style.display = 'block';\n\t\t\t}\n\t\t\tdocument.getElementById('ProductInsightSummary').focus();\n\t\t\treturn false;\n\t\t}\n\t\t/**\n\t\t*\tValidating Customer Pain Points\n\t\t**/\t\t\n\t\telse if(isEmpty(document.getElementById('ProductCustomerPainPoints').value) || (document.getElementById('ProductCustomerPainPoints').value == \"Please indicate how important this feedback is to the customer/prospect and its specific impact on their regular activities and wider business.\"))\n\t\t{\n\t\t\t\t/**\n\t\t\t\t*\tOpening collapsed divs if there values are not entered.\n\t\t\t\t**/\n\t\t\t\tif(document.getElementById('DivInsightSummary') && document.getElementById('DivCustomerPainPoints'))\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"imgInsightSummary\").src = hdnImageURL+\"/arrow-down.gif\";\n\t\t\t\t\tdocument.getElementById(\"imgCustomerPainPoints\").src = hdnImageURL+\"/arrow-down.gif\";\n\n\t\t\t\t\tdocument.getElementById('DivInsightSummary').style.display = 'block';\n\t\t\t\t\tdocument.getElementById('DivCustomerPainPoints').style.display = 'block';\n\t\t\t\t}\n\t\t\t\n\t\t\t\tdocument.getElementById('errProductCustomerPainPoints').style.display = 'block';\n\t\t\t\tdocument.getElementById('ProductCustomerPainPoints').focus();\n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\telse if(isEmpty(document.getElementById('ProductRecommendedActions').value) || (document.getElementById('ProductRecommendedActions').value == \"Do you have any suggestions or ideas that you would like the subject matter expert to take on board before they respond to your feedback?\"))\n\t\t{\n\t\t\t//document.getElementById('errProductCustomerFeedback').style.display = 'block';\n\t\t\tdocument.getElementById('ProductRecommendedActions').value = '';\n\t\t\t//document.getElementById('ProductCustomerFeedback').focus();\n\t\t\t//return false;\n\t\t}\n\n\t}\n\telse if(pageType == 'add')\n\t{\n\t\t/**\n\t\t*\tValidate the object of divs.\n\t\t**/\t\n\t\tif(document.getElementById('ProductInsightSummary') && document.getElementById('errProductCustomerPainPoints')){\t\t\t\n\t\t\tdocument.getElementById('errProductCustomerPainPoints').style.display = 'none';\n\t\t\tdocument.getElementById('errProductInsightSummary').style.display = 'none';\t\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t*\tValidating Customer Feedback\n\t\t**/\n\t\t/*if(isEmpty(document.getElementById('ProductInsightSummary').value) || (document.getElementById('ProductInsightSummary').value == \"Please summarise the feedback (quoting verbatim where possible) - this will help to ensure a speedy and effective response!\") && document.getElementById('ProductInsightSummary').disabled == false)\n\t\t{\n\n\t\t\tdocument.getElementById('errProductInsightSummary').style.display = 'block';\t\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t*\tOpening collapsed divs if there values are not entered.\n\t\t\t** /\n\t\t\tif(document.getElementById('DivInsightSummary') && document.getElementById('DivCustomerPainPoints'))\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"imgInsightSummary\").src = hdnImageURL+\"/arrow-down.gif\";\n\t\t\t\tdocument.getElementById(\"imgCustomerPainPoints\").src = hdnImageURL+\"/arrow-down.gif\";\n\n\t\t\t\tdocument.getElementById('DivInsightSummary').style.display = 'block';\n\t\t\t\tdocument.getElementById('DivCustomerPainPoints').style.display = 'block';\n\t\t\t}\n\t\t\tdocument.getElementById('ProductInsightSummary').focus();\n\t\t\treturn false;\n\t\t}*/\n\t\t/**\n\t\t*\tValidating Customer Pain Points\n\t\t**/\t\t\n\t\t/*else if(isEmpty(document.getElementById('ProductCustomerPainPoints').value) || (document.getElementById('ProductCustomerPainPoints').value == \"Please indicate how important this feedback is to the customer/prospect and its specific impact on their regular activities and wider business.\") )\n\t\t{\n\t\t\t\t/**\n\t\t\t\t*\tOpening collapsed divs if there values are not entered.\n\t\t\t\t** /\n\t\t\t\tif(document.getElementById('DivInsightSummary') && document.getElementById('DivCustomerPainPoints'))\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"imgInsightSummary\").src = hdnImageURL+\"/arrow-down.gif\";\n\t\t\t\t\tdocument.getElementById(\"imgCustomerPainPoints\").src = hdnImageURL+\"/arrow-down.gif\";\n\n\t\t\t\t\tdocument.getElementById('DivInsightSummary').style.display = 'block';\n\t\t\t\t\tdocument.getElementById('DivCustomerPainPoints').style.display = 'block';\n\t\t\t\t}\n\n\t\t\tif(document.getElementById('ProductCustomerPainPoints').getAttribute(\"ReadOnly\") == 'readonly'){\n\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdocument.getElementById('errProductCustomerPainPoints').style.display = 'block';\n\t\t\t\tdocument.getElementById('ProductCustomerPainPoints').focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}*/\n\t\t/**\n\t\t*\tValidating Customer Feedback\n\t\t**/\n\t\telse if(isEmpty(document.getElementById('ProductRecommendedActions').value) || (document.getElementById('ProductRecommendedActions').value == \"Do you have any suggestions or ideas that you would like the subject matter expert to take on board before they respond to your feedback?\") && document.getElementById('ProductRecommendedActions').disabled == false)\n\t\t{\n\t\t\t//document.getElementById('errProductCustomerFeedback').style.display = 'block';\n\t\t\tdocument.getElementById('ProductRecommendedActions').value = '';\n\t\t\t//document.getElementById('ProductCustomerFeedback').focus();\n\t\t\t//return false;\n\t\t}\n\t}\n\t\n\tif(document.getElementById('ProductIssueField') && document.getElementById('ProductfamilynameWhoProductFamilyName') && document.getElementById('ProductPracticeAreaId') && document.getElementById('ProductSellingObstacleId'))\n\t{\n\t\tif(document.getElementById('ProductIssueField').value == -1 && ((document.getElementById('ProductfamilynameWhoProductFamilyName').value == 0 && document.getElementById('ProductPracticeAreaId').value == 0 && document.getElementById('ProductSellingObstacleId').value == 0 )|| (document.getElementById('ProductfamilynameWhoProductFamilyName').value ==\"\" && document.getElementById('ProductPracticeAreaId').value == \"\" && document.getElementById('ProductSellingObstacleId').value == \"\"))){\n\t\t\tdocument.getElementById(\"errProductIssue\").style.display = \"block\";\n\t\t\tdocument.getElementById(\"errProductIssue\").innerHTML = \"Selected option not allowed if combination is blank.\";\n\t\t\treturn false;\n\t\t}\t\t\n\t}\n\n\t/*\n\t*\tCheck that Current Status Field value should not be blank.\n\t*/\n\tif((current_user_role == 'S' || current_user_role == 'A' ) && document.getElementById('ProductInsightStatus').disabled == false && (document.getElementById(\"ProductInsightStatus\").value == 0 || document.getElementById(\"ProductInsightStatus\").value == ''))\n\t{\n\t\t\tdocument.getElementById(\"errCurrentStatus\").style.display = \"block\";\n\t\t\tdocument.getElementById(\"errCurrentStatus\").innerHTML = \"<b>*Please change this value to reflect current status.</b>\";\n\t\t\treturn false;\n\t}\n\n\n\t/*if((current_user_role == 'S' || current_user_role == 'A' ) && document.getElementById('ProductIssueField').disabled == false && (document.getElementById(\"ProductIssueField\").value == 0 || document.getElementById(\"ProductIssueField\").value == ''))\n\t{\n\t\t\tdocument.getElementById(\"errProductIssue\").style.display = \"block\";\n\t\t\tdocument.getElementById(\"errProductIssue\").innerHTML = \"<b>*Please create a new issue or select one from the drop-down menu; 'Issue' feature helps you link this feedback record to an already identified trend and improve future reporting.</b>\";\n\t\t\treturn false;\n\t}*/\n\n\t/**/\n\tif(document.getElementById(\"ProductInsightStatus\")){\n\t\tvar w = document.getElementById(\"ProductInsightStatus\").selectedIndex;\n\t\tvar selected_status = document.getElementById(\"ProductInsightStatus\").options[w].text;\n\t\tvar selected_status = selected_status.toLowerCase();\n\t}\n\n\tif((current_user_role == 'S' || current_user_role == 'A' ) && (selected_status == 'issue resolved' || selected_status == 'response2: issue - under review' || selected_status == 'response3: issue - out of scope' ||selected_status == 'response4: issue - on roadmap') && document.getElementById('ProductIssueField').value == 0)\n\t{\n\t\t\tdocument.getElementById(\"errProductIssue\").style.display = \"block\";\n\t\t\tdocument.getElementById(\"errProductIssue\").innerHTML = \"<b>*Please create a new issue or select one from the drop-down menu; 'Issue' feature helps you link this feedback record to an already identified trend and improve future reporting.</b>\";\n\t\t\treturn false;\n\t}\n\n\t/*\n\t*\tForce SME to change status value, if SME has entered into the insight..\n\t*/\n\tif(current_user_role == 'S' && document.getElementById(\"HdnOldCurrentStatusValue\").value == document.getElementById(\"ProductInsightStatus\").value && (document.getElementById(\"ProductInsightStatus\").value != '' || document.getElementById(\"ProductInsightStatus\").value != 0) && document.getElementById('ProductInsightStatus').disabled == false){\n\tvar SiteURL = document.getElementById(\"SiteURL\").value;\n\t \tGB_showCenter('', SiteURL+'/products/oldstatus',150,400);\n\t\t/*var UserOption = confirm(\"Record status has not been changed!\\n Would you like to change it now?\");\n\t\tif (UserOption == true)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}*/\n\t\t//document.getElementById(\"errCurrentStatus\").style.display = \"block\";\n\t\t//document.getElementById(\"errCurrentStatus\").innerHTML = \"<b>*Please change this value to update current status.</b>\";\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "5870443db96ec36910e6e05945d33d1b", "score": "0.5482653", "text": "function validateLogic() {\n\n}", "title": "" }, { "docid": "00f2e24d73f3f0b4e6793b8f062bf63d", "score": "0.5480789", "text": "checkTheForm() {\n if (this.selectedStartDate.length > 0 &&\n this.checkTheTerm() &&\n this.checkTheOpportunity() &&\n this.checkStage()) {\n this.disableContinueBtn = false;\n }\n else {\n this.disableContinueBtn = true;\n }\n }", "title": "" }, { "docid": "429d090519d064252177cd2cae324604", "score": "0.546706", "text": "function endMeditation(){\n setView('startMeditation');\n }", "title": "" }, { "docid": "960749e2ae54cb199da1b8261b1188b7", "score": "0.5461931", "text": "function Validation($item) {\n var _Data = $item[$item.label].ePage.Entities,\n _input = _Data.Header.Data,\n _errorcount = _Data.Header.Meta.ErrorWarning.GlobalErrorWarningList;\n\n\n //Validation Call\n RelatedOrgCtrl.ePage.Masters.Config.GeneralValidation($item);\n if (RelatedOrgCtrl.ePage.Entities.Header.Validations) {\n RelatedOrgCtrl.ePage.Masters.Config.RemoveApiErrors(RelatedOrgCtrl.ePage.Entities.Header.Validations, $item.label);\n }\n\n if (_errorcount.length == 0) {\n SaveList($item);\n } else {\n RelatedOrgCtrl.ePage.Masters.Config.ShowErrorWarningModal(RelatedOrgCtrl.currentMhu);\n }\n }", "title": "" }, { "docid": "82654fba0e23c077ec67daabfd2720df", "score": "0.5456737", "text": "function prepareUi() \n{\t\t\n renderControls();\n\tdismissLoadingDialog\n\n $('#save').click(function (event) {\n\n var validator = $(\"#myform\").kendoValidator().data(\"kendoValidator\");\n var gridData = $(\"#grid\").data().kendoGrid.dataSource.view();\n\n\n\t\t//if (!validator.validate()) {\n // smallerWarningDialog('A form input is empty or has invalid value', 'ERROR');\n //}\n //else {\n\t\t\tif (confirm('Are you sure you want Save Repayment Schedule?')) {\n displayLoadingDialog();\n\t\t\t\tselectedBorrowing.borrowingRepaymentSchedules = [];\n saveGridData(gridData);\n\n\t\t\t\tsaveSchedule();\t\t\t\t\n } else {\n smallerWarningDialog('Please review and save later', 'NOTE');\n }\n\t\t//}\n\t});\n}", "title": "" }, { "docid": "1034450e80c489281d51969562c07b5c", "score": "0.543814", "text": "function _validate()\n{\n\tviewModel.isFormValid = rQueryClient.validateModel(viewModel, _validationSet);\n}", "title": "" }, { "docid": "17ce13415f5649b700f6edc89e14b939", "score": "0.54272836", "text": "function ValidatePage(pageCode) {\r\n //Function which calls the whole validation for the page.\r\n if (Page_ClientValidate(pageCode)) {\r\n switch (pageCode) {\r\n case \"vgEditOffice\":\r\n return confirm(Resources.StudentPractice_vgEditOffice);\r\n break;\r\n case \"vgEditProvider\":\r\n return confirm(Resources.StudentPractice_vgEditProvider);\r\n break;\r\n case \"vgOfficeUser\":\r\n case \"vgProviderUser\":\r\n case \"vdApplication\":\r\n default:\r\n return true;\r\n break;\r\n }\r\n }\r\n else {\r\n hideValidatorCallout();\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "3dacaead662bf3f4041f2c26d4a88547", "score": "0.54155934", "text": "function runValidation()\n{\n\tif(isCurrentPage(\"forum\")) {validateForumPostSubmission();}\n\telse if(isCurrentPage(\"forum-post\")) {validateResponseSubmission();}\n}", "title": "" }, { "docid": "4b35a3571c3729deb5da55348135b717", "score": "0.54155576", "text": "function validateForm() {\n \"use strict\";\n firstNameValidation();\n lastNameValidation();\n companyNameValidation();\n emailValidation();\n imageValidation();\n dayValidation();\n lectureOptionValidation();\n checkLengthOfText();\n checkAll();\n if(firstNameValidation() && lastNameValidation() && companyNameValidation() && emailValidation() && dayValidation() &&\n lectureOptionValidation() && imageValidation() && checkLengthOfText() === true){\n window.location.href = \"dummy.html\";\n }\n }", "title": "" }, { "docid": "0b8ea0ea67e48c90cebecb5112a4bdd4", "score": "0.54146665", "text": "function btnValidation2(mode) {\n var msg = 'Please Select a Survey for category adding', mode = ( typeof mode === 'undefined') ? 'addCategory' : mode;\n pantry_maintenance_js_app = pantry_maintenance_js.app;\n\n if ( typeof pantry_maintenance_js_app.concessionaire_grid === \"undefined\" || typeof pantry_maintenance_js_app.category_grid === 'undefined') {\n // error\n console.error(\"unexpected undefined\");\n }\n\n if (mode === 'addCategory' || mode === 'editCategory' || mode === 'deleteCategory' || mode === 'addQuestion' || mode === 'editQuestion' || mode === 'deleteQuestion') {\n if (! pantry_maintenance_js_app.concessionaire_grid.getSelectionModel().hasSelection()) {\n return;\n\n msg = 'Please select a Survey first.';\n Ext.MessageBox.show({\n title : 'No Surveys Selected',\n msg : msg,\n buttons : Ext.MessageBox.OK,\n icon : Ext.MessageBox.INFO\n });\n\n return false;\n } else if (mode !== 'addCategory' && mode !== 'deleteQuestion' && ! pantry_maintenance_js_app.category_grid.getSelectionModel().hasSelection()) {\n msg = 'Please select a Category first';\n Ext.MessageBox.show({\n title : 'No Category selected',\n msg : msg,\n buttons : Ext.MessageBox.OK,\n icon : Ext.MessageBox.INFO\n });\n\n return false;\n } else {\n if (!pantry_maintenance_js.app.question_grid.getSelectionModel().getSelection()[0]) {\n msg = 'Please Select a Question first.';\n Ext.MessageBox.show({\n title : 'No Category selected',\n msg : msg,\n buttons : Ext.MessageBox.OK,\n icon : Ext.MessageBox.INFO\n });\n\n return false;\n }\n }\n } else if (mode === 'editSurvey' || mode === 'deleteSurvey') {\n if (! pantry_maintenance_js_app.concessionaire_grid.getSelectionModel().hasSelection()) {\n msg = (mode === 'editSurvey') ? 'Please Select a Concessioanire to edit' : 'Please Select a Concessioanire to delete';\n\n Ext.MessageBox.show({\n title : 'No Survey Selected',\n msg : msg,\n buttons : Ext.MessageBox.OK,\n icon : Ext.MessageBox.INFO\n });\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "e37619799871b45a0c46127ba78d99dd", "score": "0.5388107", "text": "@api\n validate() {\n this._forScheduled = false;\n if (sessionStorage.getItem('customButtonEvent') == 'true') {\n sessionStorage.removeItem('customButtonEvent');\n this._forScheduled = true;\n this._interestBalance = this._actualInterestBalance;\n return {\n isValid: true\n };\n }\n var isValid = true;\n var errorMessage = '';\n inpPrincipal\n var inpTotal = this.template.querySelector(\".inpTotal\");\n inpTotal.setCustomValidity(\"\");\n var inpPrincipal = this.template.querySelector(\".inpPrincipal\");\n inpPrincipal.setCustomValidity(\"\");\n var inpInterest = this.template.querySelector(\".inpInterest\");\n inpInterest.setCustomValidity(\"\");\n var inpFee = this.template.querySelector(\".inpFee\");\n inpFee.setCustomValidity(\"\");\n var errorAll = \"\";\n\n if (parseFloat(this._principal) < 0) {\n // isValid = false;\n errorMessage = 'Principal amount should not be negative';\n inpPrincipal.setCustomValidity(errorMessage);\n }\n\n if (parseFloat(this._total) < 0) {\n // isValid = false;\n errorMessage = 'Total amount should not be negative';\n inpTotal.setCustomValidity(errorMessage);\n }\n\n\n if (parseFloat(this._interest) < 0) {\n // isValid = false;\n errorMessage = 'Interest amount should not be negative';\n inpInterest.setCustomValidity(errorMessage);\n }\n if (parseFloat(this._fee) < 0) {\n //isValid = false;\n errorMessage = 'Fee amount should not be negative';\n inpFee.setCustomValidity(errorMessage);\n }\n\n if (parseFloat(this._principal) == 0 && parseFloat(this._interest) == 0 && parseFloat(this._fee) == 0) {\n isValid = false;\n errorAll = 'The transaction has no amount entered';\n }\n\n if (parseFloat(this._principal) > this._principalBalance) {\n // isValid = false;\n errorMessage = 'Principal amount should be less than or equal to principal balance';\n inpPrincipal.setCustomValidity(errorMessage);\n }\n if (parseFloat(this._total) > parseFloat(this._totalBalance).toFixed(2)) {\n // isValid = false;\n errorMessage = 'Total amount should be less than or equal to total balance';\n inpTotal.setCustomValidity(errorMessage);\n }\n if (parseFloat(this._interest) > parseFloat(this._interestBalance).toFixed(2)) {\n // isValid = false;\n errorMessage = 'Interest amount should be less than or equal to interest balance';\n inpInterest.setCustomValidity(errorMessage)\n }\n if (parseFloat(this._fee) > this._feeBalance) {\n\n // isValid = false;\n errorMessage = 'Fee amount should be less than or equal to fee balance';\n inpFee.setCustomValidity(errorMessage)\n }\n\n if (this._interest == '') {\n this._interest = 0;\n }\n if (this._fee == '') {\n this._fee = 0;\n }\n if (this._principal == '') {\n this._principal = 0;\n }\n\n if (isValid) {\n isValid = this.getValidForm();\n } else {\n this.getValidForm();\n }\n\n if (!isValid) {\n return {\n isValid: false,\n errorMessage: errorAll\n };\n } else {\n return {\n isValid: true,\n errorMessage: \"\"\n };\n }\n\n //If the component is invalid, return the isValid parameter as false and return an error message. \n\n }", "title": "" }, { "docid": "457dbf0a11a0123ed868e09ba9ce6732", "score": "0.5380248", "text": "function fnClassSummaryMandatoryCheck(operation) {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\t\n\tswitch (operation) {\n\t\t\t\tcase 'View':\n\t\t\t\t\t if ((($scope.class == '' || $scope.class == null || $scope.class == 'Select option') & \n\t\t\t\t\t\t//($scope.date == '' || $scope.date == null) &\n\t\t\t\t\t\t($scope.authStat == '' || $scope.authStat == null || $scope.authStat == 'Select option')))\n\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tfn_Show_Exception('FE-VAL-028');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t break;\n\t\n\t\t case 'Detail':\n\t\t return true;\n\t\t break;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "b94a30d83952883682db7fa2bdec4cd8", "score": "0.537858", "text": "function touch() {\n let ok = true\n ok = ($('#description').val().length > 0) // description must be filled\n if (ok)\n $('#cmdSave').removeClass('hidden')\n else\n $('#cmdSave').addClass('hidden')\n}", "title": "" }, { "docid": "00b9d8a8fe7d3067d2e94b3d5593dcb4", "score": "0.5365036", "text": "function onClear() {\n\tvar panel = View.panels.get(\"requestPanel\");\n\t\n\t//Clear all the console value fields\n\tpanel.setInputValue(\"bl.ctry_id\", \"\", \"\");\n\tpanel.setInputValue(\"reserve_rm.bl_id\", \"\", \"\");\n\tpanel.setInputValue(\"reserve_rm.fl_id\", \"\", \"\");\n\tpanel.setInputValue(\"reserve_rm.rm_id\", \"\", \"\");\n\tpanel.setInputValue(\"bl.site_id\", \"\", \"\");\n\tpanel.setInputValue(\"reserve_rm.config_id\", \"\", \"\");\n\tpanel.setInputValue(\"reserve_rm.rm_arrange_type_id\", \"\", \"\");\n\tpanel.setInputValue(\"reserve.user_created_by\", \"\", \"\");\n\tpanel.setInputValue(\"reserve.user_requested_by\", \"\", \"\");\n\tpanel.setInputValue(\"reserve.user_requested_for\", \"\", \"\");\n\tpanel.setInputValue(\"reserve.date_start\", \"\", \"\");\n\tpanel.setInputValue(\"reserve.time_start\", \"\", \"\");\n\tpanel.setInputValue(\"reserve.time_end\", \"\", \"\");\n\t\n\tclearShowAllCheckBox();\n\n\tpanel.setInputValue(\"resources.resource_id\", \"\", \"\");\n\tpanel.setInputValue(\"resource_std.resource_std\", \"\", \"\");\n\t\n\t// Check the security groups the user belongs to, in order to restrict the list of reservations \n // that must be showed\n initRestriction();\n\t\n\trefreshTabView();\t\n}", "title": "" }, { "docid": "2112b5dfa9d3e3e479591496df801923", "score": "0.5351238", "text": "function validate() {\n\t\tvar pass;\n\n\t\t// If the game is over, disregard clicks\n\t\tif ( globalVars.currentlyPlaying ) {\n\n\t\t\tpass = true;\n\n\t\t\tif ( globalVars.totalFound != globalVars.boardLength * globalVars.boardHeight - globalVars.mines.length ) {\n\t\t\t\tpass = false;\n\t\t\t}\n\n\t\t\tif ( pass ) {\n\t\t\t\t$message.html( globalConstants.WIN_MESSAGE );\n\t\t\t\tglobalVars.currentlyPlaying = false;\n\t\t\t} else {\n\t\t\t\t$message.html( globalConstants.TRY_AGAIN_MESSAGE );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9fb40273ee426a0c85d74157a4a2335f", "score": "0.5333968", "text": "function tshirtValidation() {\n\ttshirtLabel.style.display = design.value !== \"Select Theme\" ? \"none\" : \"block\";\n}", "title": "" }, { "docid": "3313bff8f11c8fa29ffa922f771d0bf1", "score": "0.5332663", "text": "static resetAllValidity() {\n START_INPUT.setCustomValidity('');\n END_INPUT.setCustomValidity('');\n START_INPUT.reportValidity();\n END_INPUT.reportValidity();\n SettingsManager.resetOKButtonValidity();\n }", "title": "" }, { "docid": "abc5122923baefd7a1edfa61e806d2ed", "score": "0.5327025", "text": "function showSuccessScreen()\n{\n let testHeight = form_screen.clientHeight;\n let newHeight = testHeight.toString() +\"px\";\n success_screen.style.minHeight = newHeight;\n form_screen.style.display = \"none\";\n success_screen.style.display = \"flex\";\n success_screen.style.flexDirection = \"column\";\n success_screen.style.justifyContent = \"space-between\";\n\n formFirst.value = \"\";\n formLast.value = \"\";\n formEmail.value = \"\";\n formBirthdate.value = \"\";\n formQuantity.value = \"\";\n for(let i=0; i<formLocation.length;i++)\n {\n formLocation[i].checked = false;\n }\n formCheckbox2.checked = false;\n}", "title": "" }, { "docid": "7be24b7900aea5bc3bae6395d4ff41ea", "score": "0.5320069", "text": "function ValidateNFCText() {\n\talert(\"Please bring second device closer to beam\");\n var mes1=createndefmessage();\n adapter.enableForegroundNdefPush(context1,mes1);\n}", "title": "" }, { "docid": "0b05a24d910b846076b40be9f8bdd9a4", "score": "0.5307344", "text": "function validateActivities() {\n\n\t\t//Make sure that there is no error show on the activities element, before showing a new one\n\t\ttoggleErrorOnElement(inputFields[\"lastActivity\"], \"hide\");\n\n\t\t//Count for check amout for checked input fields\n\t\tlet checkedCounter = 0;\n\n\t\tfor (var i = 0; i < inputFields['activities'].length; i++) {\n\t\t\t//If the current input field is check. If it is add one to the counter\n\t\t\tif ($(inputFields['activities'][i]).is(':checked')) {\n\t\t\t\tcheckedCounter++;\n\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t//If the checkedCounter is greater than zero add erorr message to the errorsArray\n\t\tif (checkedCounter === 0) {\n\t\t\ttoggleErrorOnElement(inputFields[\"lastActivity\"], \"show\", \"At least one activity must be selected.\");\n\t\t} else {\n\t\t\ttoggleErrorOnElement(inputFields[\"lastActivity\"], \"hide\");\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "d41273c1553f73a94882eecd8b9f9fb7", "score": "0.53053945", "text": "validate() {\n this.log('validating');\n this.cacheVariables();\n this.validateLayout();\n // this.validatePosition();\n this.validateControls();\n\n // Component is now valid\n this._valid = true;\n }", "title": "" }, { "docid": "1a7f8decd10fca29db49e4c414a3871f", "score": "0.5299377", "text": "function validateUser() {\r\n\r\n complaint = document.getElementById(\"complaint\").value;\r\n\r\n //---------------------------------------------------------------> CSS Class Edit\r\n document.getElementById(\"mainVentArea\").classList.add(\"send\");\r\n\r\n //---------------------------------------------------------------> JS Conditional\r\n if (!complaintSent) { //If we haven't yet sent a complaint.\r\n\r\n storeComplaint(complaint);\r\n setTimeout(function () { //\r\n makeValidatersVisible();\r\n refreshValidaters();\r\n }, 3500);\r\n\r\n } else if (didComplaintChanged()) { //If the user updated the complaint.\r\n storeComplaint(complaint);\r\n setTimeout(function () {\r\n refreshValidaters()\r\n }, 3500);\r\n resetAnimation(document.getElementById(\"mainVentArea\", 6000))\r\n\r\n } else { //If there the complaint is still the same but the user still wants validation.\r\n refreshValidaters()\r\n }\r\n lastComplaint = complaint;\r\n}", "title": "" }, { "docid": "4938b4b87ad4f16e0b8587bf99ea6380", "score": "0.52975845", "text": "function fnClassExamScheduleSummaryMandatoryCheck(operation) {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\t\n\tswitch (operation) {\n\t\t\t\tcase 'View':\n\t\t\t\t\tif ((($scope.class == '' || $scope.class == null || $scope.class == 'Select option') & \n\t\t\t\t\t\t($scope.exam == '' || $scope.exam == null || $scope.exam == 'Select option') &\n\t\t\t\t\t\t($scope.authStat == '' || $scope.authStat == null || $scope.authStat == 'Select option')))\n\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tfn_Show_Exception('FE-VAL-028');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t break;\n\t\n\t\t case 'Detail':\n\t\t return true;\n\t\t break;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "7b880f233be80777b6f33b87b312c093", "score": "0.5289875", "text": "function validate() {\n if ($scope.contentPickerForm) {\n //Validate!\n if ($scope.model.config && $scope.model.config.minNumber && parseInt($scope.model.config.minNumber) > $scope.renderModel.length) {\n $scope.contentPickerForm.minCount.$setValidity('minCount', false);\n } else {\n $scope.contentPickerForm.minCount.$setValidity('minCount', true);\n }\n if ($scope.model.config && $scope.model.config.maxNumber && parseInt($scope.model.config.maxNumber) < $scope.renderModel.length) {\n $scope.contentPickerForm.maxCount.$setValidity('maxCount', false);\n } else {\n $scope.contentPickerForm.maxCount.$setValidity('maxCount', true);\n }\n }\n }", "title": "" }, { "docid": "c4e2325dc8d39620fd3849e84d58ce3f", "score": "0.52895033", "text": "function check_endscreen(endscreen) {\r\n endscreen.style.display = \"none\";\r\n }", "title": "" }, { "docid": "11823f58bc0c8f2a3d151c993f657963", "score": "0.5288757", "text": "function myOnLoad()\n{\n\tsetUserView();\n\tloadDock();\n\tsetChargeType('d');\n if (showErrorMessage) {\n showErrorMessages();\n }\n\n} //end of method", "title": "" }, { "docid": "df18099b8277bf12b635b2beb70f5ee5", "score": "0.5280467", "text": "function ValidateActivityCheckboxes() {\n let hint = registerActivityElement.lastElementChild;\n if(activityCost > 0) {\n registerActivityElement.classList.remove(\"not-valid\");\n registerActivityElement.classList.add(\"valid\");\n hint.style.display = 'none';\n return true;\n }\n else {\n registerActivityElement.classList.add(\"not-valid\");\n hint.style.display = 'block';\n }\n\n return false;\n }", "title": "" }, { "docid": "23ec9217c8da19ab73b9b9f6ffc80df4", "score": "0.527465", "text": "function validateEventAfterStep4() {\n if ($scope.isValidateButtonDisabled) {\n return;\n }\n\n $scope.isValidateButtonDisabled = true;\n\n validateEvent();\n\n if ($scope.missingInfo.length > 0) {\n $scope.infoMissing = true;\n $scope.isValidateButtonDisabled = false;\n return;\n }\n\n if (ignoreDuplicates) {\n createOffer();\n }\n else {\n suggestExistingOffers(EventFormData);\n }\n }", "title": "" }, { "docid": "1470932176d9df1de025f3501964b16b", "score": "0.52745384", "text": "function Complete() {\n if (StartUnloadCtrl.ePage.Masters.ValidationSource.length > 0 || StartUnloadCtrl.ePage.Masters.DocumentValidation.length > 0) {\n if (StartUnloadCtrl.ePage.Masters.ValidationSource.length > 0) {\n if (StartUnloadCtrl.ePage.Masters.InwardDetails.length > 0) {\n StartUnloadCtrl.ePage.Entities.Header.Data.TMSGatepassHeader.InwardNo = true;\n }\n var _obj = {\n ModuleName: [\"MyTask\"],\n Code: [StartUnloadCtrl.ePage.Entities.Header.Data.TMSGatepassHeader.GatepassNo],\n API: \"Group\",\n FilterInput: {\n ModuleCode: \"DMS\",\n SubModuleCode: \"GAT\",\n },\n GroupCode: StartUnloadCtrl.ePage.Masters.ValidationSource[0].Code,\n EntityObject: StartUnloadCtrl.ePage.Entities.Header.Data\n };\n errorWarningService.ValidateValue(_obj);\n }\n if (StartUnloadCtrl.ePage.Masters.DocumentValidation.length > 0) {\n GetDocumentValidation().then(function (response) {\n if (StartUnloadCtrl.ePage.Masters.docTypeSource.length == 0 || StartUnloadCtrl.ePage.Masters.docTypeSource.length == response.length) {\n StartUnloadCtrl.ePage.Entities.Header.Data.Document = true;\n } else {\n StartUnloadCtrl.ePage.Entities.Header.Data.Document = null;\n }\n var _obj = {\n ModuleName: [\"MyTask\"],\n Code: [StartUnloadCtrl.ePage.Entities.Header.Data.TMSGatepassHeader.GatepassNo],\n API: \"Group\",\n FilterInput: {\n ModuleCode: \"DMS\",\n SubModuleCode: \"GAT\",\n },\n GroupCode: \"Document\",\n EntityObject: StartUnloadCtrl.ePage.Entities.Header.Data\n };\n errorWarningService.ValidateValue(_obj);\n });\n } $timeout(function () {\n var _errorcount = errorWarningService.Modules.MyTask.Entity[StartUnloadCtrl.ePage.Entities.Header.Data.TMSGatepassHeader.GatepassNo].GlobalErrorWarningList;\n if (_errorcount.length > 0) {\n if (StartUnloadCtrl.ePage.Masters.DocumentValidation.length > 0) {\n angular.forEach(_errorcount, function (value, key) {\n if (value.MetaObject == \"Document\") {\n var doctypedesc = '';\n angular.forEach(StartUnloadCtrl.ePage.Masters.docTypeSource, function (value, key) {\n doctypedesc = doctypedesc + value.DocTypeDesc + \",\";\n });\n value.Message = 'Please Upload Document';\n doctypedesc = doctypedesc.slice(0, -1);\n value.Message = value.Message + \" for this \" + doctypedesc + \" Document type\";\n }\n });\n }\n StartUnloadCtrl.ePage.Masters.ShowErrorWarningModal(StartUnloadCtrl.taskObj.PSI_InstanceNo);\n if (StartUnloadCtrl.ePage.Masters.IsTaskList) {\n StartUnloadCtrl.getErrorWarningList({\n $item: _errorcount\n });\n }\n } else {\n CompleteWithSave();\n }\n }, 1000);\n } else {\n CompleteWithSave();\n }\n }", "title": "" }, { "docid": "220c106b72fdf5b9aa4040152a75a84f", "score": "0.52706814", "text": "function validate () {\n $('button[type=\"submit\"]').click(function(e) {\n if (($('input:text').hasClass(\"invalid\"))) {\n e.preventDefault();\n $(\"fieldset:eq(0)\").prepend('<p class=\"invalid\">Please Correct the highlighted areas and make sure to check at least one activity.</p>')\n $('html,body').animate({scrollTop: 0});\n }if (($('input').hasClass(\"valid\"))) {\n $(\"fieldset:eq(0) legend p\").hide()\n }if (($('input:checkbox:checked').length < 1)) {\n $(\"fieldset:eq(2) legend\").append('<p class=\"invalid\">Please pick an activity.</p>')\n e.preventDefault();\n $(\"fieldset:eq(2) legend\").animate({scrollTop: 0});\n }if (($('input:checkbox:checked').length >= 1)) {\n $(\"fieldset:eq(2) legend p\").hide()\n }if($('#name').val() === \"\") {\n $('#name').addClass(\"invalid\")\n } if ($('#mail').val() === \"\") {\n $('#mail').addClass(\"invalid\")\n } if ($('#payment').val() === \"credit card\" && $('#cc-num').val() === \"\") {\n $('#cc-num').addClass(\"invalid\")\n } if ($('#payment').val() === \"credit card\" && $('#zip').val() === \"\") {\n $('#zip').addClass(\"invalid\")\n } if ($('#payment').val() === \"credit card\" && $('#cvv').val() === \"\") {\n $('#cvv').addClass(\"invalid\")\n }\n})\n}", "title": "" }, { "docid": "850b5f37c178b597967c34bee061abe7", "score": "0.526675", "text": "function askCheckPastContextWantedInvalid() {\n getIsValidPastSystemResponse(getIsValidPastSystemResponseCallback,false); \n }", "title": "" }, { "docid": "5787186ac4f802486fe44261f2560055", "score": "0.52608424", "text": "function securityQestionFormDesign() {\n\t$(\"#profileContainer\").hide();\n\t$(\"#editProfileContainer\").hide();\n\t/* Need to remove later on time. */ \n\tclearOldData();\n\tshowScreenAndSetHeight('editProfileSecurityContainer', 'edit_profile_security_area');\n\t$('#edit_profile_security_area').show();\n\tsetExtraMarginForAndroid('editProfileSecureBottomId');/* Create extra space for Android device to pop up key board */\n\t/*Disabling the save button before loading the form*/\n\tsubmitBtnDisableUI('editProfileSecurityUpdateBtn');\n\tsubmitBtnDisableUI('editProfileSecurityUpdateBtnBtm');\n\tif(user_get_profile_obj){/* Null check for user get profile object */\n\t\tgetSecurityQuestions();\n\t}\n\tregisterBlurForEditProfileSecurity();\n\tsetIntervalForSecurityUpdateButton();\n\t$(\"#editProfileOldPassword\").focus();\n}", "title": "" }, { "docid": "83e72e6bb4549cbbd038bcc920eea8f8", "score": "0.52586186", "text": "function handleValidations()\n {\n \t if( customValidationFunction!=null )\n \t{\n \t\t customValidationFunction();\n \t\t }\n }", "title": "" }, { "docid": "92269107a5d5becabfd8c4460f77a5f4", "score": "0.525467", "text": "function validationPass(element) {\r\n element.parentElement.classList.add('valid');\r\n element.parentElement.classList.remove('not-valid');\r\n element.parentElement.lastElementChild.style.display = 'none'; //This hides the accessibility hint\r\n}", "title": "" }, { "docid": "d8570f7ebea01e474e79e510857db18c", "score": "0.52546054", "text": "function VisualValidacion(){\n //si algun campo obligatorio esta vacio, lo marca con rojo\n if($('#NSSA').val()==\"\"){\n Invalido($('#NSSA'));\n }else{\n Valido($('#NSSA'));\n }\n if($('#NombrePaciente').val()==\"\"){\n Invalido($('#NombrePaciente'));\n }else{\n Valido($('#NombrePaciente'));\n }\n if($('#ApPaterno').val()==\"\"){\n Invalido($('#ApPaterno'));\n }else{\n Valido($('#ApPaterno'));\n }\n if($('#ApMaterno').val()==\"\"){\n Invalido($('#ApMaterno'));\n }else{\n Valido($('#ApMaterno'));\n }\n if($('#Calle').val()==\"\"){\n Invalido($('#Calle'));\n }else{\n Valido($('#Calle'));\n }\n if($('#NumeroExterior').val()==\"\"){\n Invalido($('#NumeroExterior'));\n }else{\n Valido($('#NumeroExterior'));\n }\n if($('#Colonia').val()==\"\"){\n Invalido($('#Colonia'));\n }else{\n Valido($('#Colonia'));\n }\n if($('#Delegacion').val()==\"\"){\n Invalido($('#Delegacion'));\n }else{\n Valido($('#Delegacion'));\n }\n if($('#NumeroTelefono1').val()==\"\"){\n Invalido($('#NumeroTelefono1'));\n }else{\n Valido($('#NumeroTelefono1'));\n }\n //checa si el campo especificar otro esta vacio si el estatus es \"Otro\"\n if($('#Activo').val()==5){\n if($('#Especificar').val()==\"\"){\n Invalido($('#Especificar'));\n }else{\n Valido($('#Especificar'));\n }\n }\n}", "title": "" }, { "docid": "a2eb0299238abffdcc72e52b881caa6a", "score": "0.52507275", "text": "function cleanInput() {\r\n if (vm.event.partnerType === 'None') {\r\n delete vm.event.partnerName;\r\n }\r\n if (vm.event.frequency == 'once') {\r\n delete vm.event.startDate;\r\n delete vm.event.endDate;\r\n delete vm.event.dates; \r\n delete vm.event.weeklyDates; \r\n \r\n } else if (vm.event.frequency == 'dates') {\r\n delete vm.event.weeklyDates; \r\n delete vm.event.startDateTime;\r\n delete vm.event.endDateTime;\r\n if (typeof vm.event.dates == 'undefined' || vm.event.dates.length === 0) {\r\n addOccurrenceDateRow();\r\n }\r\n } else if (vm.event.frequency == 'weekly') {\r\n delete vm.event.dates; \r\n delete vm.event.startDateTime;\r\n delete vm.event.endDateTime;\r\n if (typeof vm.event.weeklyDates == 'undefined' || vm.event.weeklyDates.length === 0) {\r\n addWeeklyOccurrenceRow();\r\n }\r\n }\r\n \r\n if (vm.event.freeEvent === 'Yes') {\r\n delete vm.event.cost;\r\n }\r\n if (!vm.isSportsSelected) {\r\n delete vm.event.sportsSubcategory;\r\n } \r\n if (vm.event.orgType !== 'Other') {\r\n delete vm.event.orgTypeOther;\r\n }\r\n \r\n /* make sure there is at least one location, this will then get caught in validations */\r\n if (vm.event.locations.length === 0) {\r\n addLocation();\r\n }\r\n \r\n if (vm.event.admin.newsletterCategory && vm.event.admin.newsletterCategory.length > 0 ) {\r\n if (vm.event.admin.newsletterCategory[0].value !== \"Attractions/Happenings\" && vm.event.admin.newsletterCategory[0].value !== \"Sports\" ) {\r\n vm.event.admin.newsletterSubcategory = [];\r\n } \r\n\r\n }\r\n if (vm.uploader.queue.length > 0) { \r\n if (!vm.event.image || _.isEmpty(vm.event.image.binId)) {\r\n sweetAlert(\"Image Problem\",\"The event image was not properly uploaded. Either upload the image or remove it.\");\r\n $scope.ecForm.$setValidity(\"badImage\", false);\r\n } else {\r\n $scope.ecForm.$setValidity(\"badImage\", true);\r\n }\r\n } else if (vm.event.image && _.isEmpty(vm.event.image.binId)) {\r\n delete vm.event.image;\r\n } \r\n\r\n \r\n }", "title": "" }, { "docid": "203671252ddb2f631f171dd8cbcc7e59", "score": "0.5248527", "text": "function fnTeacherLeaveManagementSummaryMandatoryCheck(operation) {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\t\n\tswitch (operation) {\n\t\t\t\tcase 'View':\n//\t\t\t\t\tif ((($scope.teacherName == '' || $scope.teacherName == null) & \n//\t\t\t\t\t ($scope.from == '' || $scope.from == null) &\n//\t\t\t\t\t\t($scope.to == '' || $scope.to == null) &\n//\t\t\t\t\t\t($scope.leaveType == '' || $scope.leaveType == null || $scope.leaveType == 'Select option') &\n//\t\t\t\t\t\t($scope.leaveStatus == '' || $scope.leaveStatus == null || $scope.leaveStatus == 'Select option')))\n//\t\t\n//\t\t\t\t\t{\n//\t\t\t\t\t\tfn_Show_Exception('FE-VAL-028');\n//\t\t\t\t\t\treturn false;\n//\t\t\t\t\t}\n if ($scope.from == '' || $scope.from == null) {\n\n fn_Show_Exception_With_Param('FE-VAL-001', ['From Date']);\n return false;\n }\n if ($scope.to == '' || $scope.to == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['To Date']);\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\t\treturn true;\n\t break;\n\t\n\t\t case 'Detail':\n\t\t return true;\n\t\t break;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "d7bc26950b7dd805776010a1225399e3", "score": "0.5247182", "text": "function pmsPaymentFormBackCallback() {\n\n\tdisplayErrorInfo();\n\tdisplayStep();\n}", "title": "" }, { "docid": "0dd251f1c372cac95753ce948682487a", "score": "0.52467054", "text": "function fnUserRoleReject() {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\n\t//Generic Field Starts\n\t$scope.MakerRemarksReadonly = true;\n\t$scope.CheckerRemarksReadonly = false;\n\t$scope.mastershow = true;\n\t$scope.detailshow = false;\n\t$scope.auditshow = false;\n\t$scope.operation = 'Rejection';\n\t$scope.mvwAddDeteleDisable = true; //Multiple View\n\t//Generic Field Ends\n\t//Screen Specific Scope Starts\n\t$scope.roleIDreadOnly = true;\n $scope.roleIDSearchreadOnly = true;\n\t$scope.roleDescriptionreadOnly = true;\n\t$scope.functionIDreadOnly = true;\n\t$scope.createreadOnly = true;\n\t$scope.modifyreadOnly = true;\n\t$scope.deletereadOnly = true;\n\t$scope.viewreadOnly = true;\n\t$scope.rejectreadOnly = true;\n\t$scope.autoAuthreadOnly = true;\n\t$scope.authorizereadOnly = true;\n $scope.instituteNamereadOnly = true;\n $scope.instituteIDreadOnly = true;\n $scope.instituteSearchreadOnly = true;\n\t//Screen Specific Scope Ends\n\treturn true;\n}", "title": "" }, { "docid": "0a81eb2f46f1c2ca309fc41aacb6f691", "score": "0.5244283", "text": "isValid() {\n //deconstruct the props\n const {errors, isValid } = validateInput(this.state);\n //if(!isValid) {\n this.setState({ errors });\n //}\n\n if(this.state.submitApplied)\n this.scrollPage({errors});\n\n return isValid;\n }", "title": "" }, { "docid": "9ca4e4e9aa68dc974624282c25059798", "score": "0.5240184", "text": "function fnUserRoleMandatoryCheck(operation) {\n\tvar $scope = angular.element(document.getElementById('SubScreenCtrl')).scope();\n\n\tswitch (operation) {\n\t\tcase 'View':\n if ($scope.instituteID == '' || $scope.instituteID == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Institute ID']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($scope.roleID == '' || $scope.roleID == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Role ID']);\n\t\t\t\treturn false;\n\t\t\t}\n \n\t\t\tbreak;\n\n\t\tcase 'Save':\n// if ($scope.instituteName == '' || $scope.instituteName == null) {\n//\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Institute Name']);\n//\t\t\t\treturn false;\n//\t\t\t}\n if ($scope.instituteID == '' || $scope.instituteID == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Institute ID']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($scope.roleID == '' || $scope.roleID == null) {\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Role ID']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($scope.roleDescription == '' || $scope.roleDescription == null) {\n\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Role Description']);\n\t\t\t\treturn false;\n\t\t\t}\n\n\n\t\t\tif ($scope.ClassRoleTable == null || $scope.ClassRoleTable.length == 0) {\n\n\t\t\t\tfn_Show_Exception_With_Param('FE-VAL-001', ['Subject Role ' + 'record ' + (i+1)]);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "b2ca45be0faba698ffc2b34a8a79e593", "score": "0.5230808", "text": "validate(){\r\n if (this.content instanceof Forms)\r\n return this.content.validator.validate();\r\n }", "title": "" }, { "docid": "6396342d1e939468327d401b9370955e", "score": "0.52261466", "text": "focusOut() {\n return this.set('canShowErrors', true);\n }", "title": "" }, { "docid": "2632e971dd2d6fa2ef098dd7a76bf704", "score": "0.52225226", "text": "function validation() {\n should_run = true\n document.getElementById(\"initial_immunity_error\").hidden = true\n document.getElementById(\"virulence_error\").hidden = true\n document.getElementById(\"infection_duration_error\").hidden = true\n document.getElementById(\"trans_rate_error\").hidden = true\n document.getElementById(\"range_error\").hidden = true\n document.getElementById(\"initial_population_error\").hidden = true\n document.getElementById(\"initial_infected_error\").hidden = true\n document.getElementById(\"sim_period_error\").hidden = true\n\n if(immunity.value < 0 || immunity.value > 100) {\n should_run = false\n document.getElementById(\"initial_immunity_error\").hidden = false\n }\n if(virulence.value < 0 || virulence.value > 75) {\n should_run = false\n document.getElementById(\"virulence_error\").hidden = false\n }\n if(duration.value < 1 || duration.value > 20) {\n should_run = false\n document.getElementById(\"infection_duration_error\").hidden = false\n }\n if(transmission.value < 0.1 || transmission.value > 10) {\n should_run = false\n document.getElementById(\"trans_rate_error\").hidden = false\n }\n\n if(initial_population.value < 1000 || initial_population.value > 1000000) {\n should_run = false\n document.getElementById(\"initial_population_error\").hidden = false\n }\n\n if(sim_period.value < 30 || sim_period.value > 1000 ) {\n should_run = false\n document.getElementById(\"sim_period_error\").hidden = false\n }\n\n if(initial_infected.value < 1|| initial_infected.value > 10000){\n should_run = false\n document.getElementById(\"initial_infected_error\").hidden = false\n }\n\n if (should_run == false) {\n document.getElementById(\"range_error\").hidden = false\n }\n\n return should_run\n}", "title": "" }, { "docid": "351dde1c73d5d7ba137013b02c7fc458", "score": "0.522172", "text": "function validateBeforeRun(){\n\t\t\n\t\tif(g_temp.isHorizontal == false){\t//vertical type\t\t\t\n\t\t\tif(g_temp.gridHeight == 0)\n\t\t\t\tthrow new Error(\"You must set height before run.\");\t\t\n\t\t}else{\n\t\t\tif(g_temp.gridWidth == 0)\n\t\t\t\tthrow new Error(\"You must set width before run.\");\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "351dde1c73d5d7ba137013b02c7fc458", "score": "0.522172", "text": "function validateBeforeRun(){\n\t\t\n\t\tif(g_temp.isHorizontal == false){\t//vertical type\t\t\t\n\t\t\tif(g_temp.gridHeight == 0)\n\t\t\t\tthrow new Error(\"You must set height before run.\");\t\t\n\t\t}else{\n\t\t\tif(g_temp.gridWidth == 0)\n\t\t\t\tthrow new Error(\"You must set width before run.\");\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "46205922c757b56f6dd43c23187362ea", "score": "0.5218063", "text": "hideEditItemForm() {\n if (__DEVONLY__) $log.debug('editItemVis hideEditItemForm');\n editItemVis.item = null;\n editItemVis.list = null;\n \n $rootScope.$evalAsync(() => {\n editItemVis.visible = false;\n });\n \n backgroundScreenVis.hideBackgroundScreen();\n }", "title": "" }, { "docid": "5f0fc26e185b6c8296c7fbb4739078ad", "score": "0.52166", "text": "function validateMdsInformationForm() {\n var mdsItPersonnel = $('#txtMdsITPersonnel');\n// var mdsDesignation = $('#txtMdsDesignation');\n var mdsContactNo = $('#txtMdsContactNo');\n// var mdsEmailAddress = $('#txtMdsEmailAddress');\n// var mdsNoWorkStation = $('#txtMdsNoWorkStation');\n// var mdsNoSiteOutlet = $('#txtMdsNoSiteOrOutlet');\n \n if(mdsItPersonnel.val() === '') {\n alert('Please Enter It Personnel For Manage Document Services!');\n mdsTab.click();\n scrollTo(mdsItPersonnel.attr('id'));\n mdsItPersonnel.focus();\n return false;\n } \n \n// if(mdsDesignation.val() === '') {\n// alert('Please Enter Designation For Manage Document Services!');\n// mdsTab.click();\n// scrollTo(mdsDesignation.attr('id'));\n// mdsDesignation.focus();\n// return false;\n// } \n \n if(mdsContactNo.val() === '') {\n alert('Please Enter Contact No For Manage Document Services!');\n mdsTab.click();\n scrollTo(mdsContactNo.attr('id'));\n mdsContactNo.focus();\n return false;\n }\n \n// if(mdsEmailAddress.val() === '') {\n// alert('Please Enter Email Address For Manage Document Services!');\n// mdsTab.click();\n// scrollTo(mdsEmailAddress.attr('id'));\n// mdsEmailAddress.focus();\n// return false;\n// }\n// \n// var regex = /^([a-zA-Z0-9_\\.\\-\\+])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n// if(!regex.test(mdsEmailAddress.val())) {\n// alert('Please Enter Correct Email Address For Manage Document Services!');\n// mdsTab.click();\n// scrollTo(mdsEmailAddress.attr('id'));\n// mdsEmailAddress.focus();\n// return false;\n// }\n// \n// if(mdsNoWorkStation.val() === '') {\n// alert('Please Enter No Work Station For Manage Document Services!');\n// mdsTab.click();\n// scrollTo(mdsNoWorkStation.attr('id'));\n// mdsNoWorkStation.focus();\n// return false;\n// }\n// \n// if(mdsNoSiteOutlet.val() === '') {\n// alert('Please Enter No Site Outlet For Manage Document Services!');\n// mdsTab.click();\n// scrollTo(mdsNoSiteOutlet.attr('id'));\n// mdsNoSiteOutlet.focus();\n// return false;\n// }\n \n return true;\n}", "title": "" }, { "docid": "ed76a6df52666a92b31e8cfbbc756aae", "score": "0.5211263", "text": "mainUInit()\n {\n\n MainUI.calculateButton.addEventListener(\"click\",function(){ \n \n const hasErrors = MainUI.validateFields(); // validate\n\n if(hasErrors==false)\n {\n const rec = new Rectangle(parseFloat(MainUI.lengthTextField.value),parseFloat(MainUI.widthTextField.value));\n \n WebStorageDAO.storeDataToSessionStorage(\"rectangleData\",rec);\n \n location.href=\"html/report.html\";\n }\n\n }); \n\n }", "title": "" }, { "docid": "c6c92b68dcb18d1130a604d12817b851", "score": "0.5207581", "text": "function configureReimbursementCreateView() {\n\tconsole.log('in configureReimbursementCreateView();');\n\n\tdocument.getElementById('reg-message').setAttribute('hidden', true);\n\n\tdocument.getElementById('submit-reimbursement').setAttribute('disabled', true);\n\tdocument.getElementById('sub-button-container').addEventListener('mouseover', validateReimbursementCreateForm);\n\tdocument.getElementById('submit-reimbursement').addEventListener('click', submitReimbursementRequest);\n\t// $('.file-upload').file_upload();\n\n}", "title": "" }, { "docid": "68cb73ba281d4db3349d0a767bc5085b", "score": "0.5203769", "text": "function dynamicPdpPageVerification()\n{\n\ttry\n\t{\n\t\ttarget.tap({x:630,y:185});\n\t\ttimeDelay();\n\t\t{\n\t\t\tif(main.scrollViews()[0].webViews()[0].links()[3].staticTexts()[PDP_OVERVIEW_TAB].checkIsValid())\n\t\t\t{\n\t\t\t\tpdpPageVerification();\n\t\t\t}\n\t\t\telse if(main.scrollViews()[0].webViews()[0].staticTexts()[PDP_SORRY_TEXT].checkIsValid())\n\t\t\t{\n\t\t\t\tpdpRequestedPageNotFoundVerification();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t \tthrow (\"PDP Page is not Displayed\");\n\t\t\t}\n\t\t}\t\n\t}\n\tcatch(err)\n {\n\t\terrorLogger(err, \" PDP Page is not displayed\");\n }\n}", "title": "" }, { "docid": "28b566fb9109d210ccd5349961167752", "score": "0.52007926", "text": "function OnBtnCreateSign2_Click( e )\n{\n try\n {\n BusyAction( $.activity_indicator , controls , function()\n {\n var bRet = false ;\n\n // Controller creation for the Next View\n Alloy.Globals.createAndOpenControllerExt( 'CreateSignPaintView' , { component_number: 2 , mode: \"AeDES\" } ) ;\n\n bRet = true ;\n\n return bRet ;\n } ) ;\n }\n catch( exception )\n {\n Alloy.Globals.AlertUserAndLogAsync( L( 'generic_exception_msg' ) + exception.message ) ;\n }\n}", "title": "" }, { "docid": "135d142a07b29a39be97394b9d941a93", "score": "0.5198942", "text": "function end(e) {\r\n // alert(\"Please fill out diary study before leaving the page\");\r\n e.preventDefault();\r\n e.returnValue = '';\r\n}", "title": "" }, { "docid": "03b65c9ae0db8a77dc7c7ddc909ac508", "score": "0.51915836", "text": "function sub() {\r\n if (validate()) {\r\n $(\".thank\").addClass(\"thank-active\");\r\n $(\"body\").addClass(\"lock\");\r\n $(\".consult\").removeClass(\"consult-active\");\r\n\r\n $(\".thank-close , .thank-button\").click(function (event) {\r\n $(\".thank\").removeClass(\"thank-active\");\r\n $(\"body\").removeClass(\"lock\");\r\n });\r\n }\r\n}", "title": "" }, { "docid": "5fffc84e940502a4a45d7a817b899fe7", "score": "0.51823926", "text": "function validateParameters() {\n var includedField = false;\n // go through all included fields to check if at least on is an output field\n for (var index = 0; index < $scope.wizardForm.fields.length; index++){\n if($scope.wizardForm.fields[index].include && $scope.wizardForm.fields[index].title != undefined && $scope.wizardForm.fields[index].title.trim() != \"\"){\n if(isOutputField($scope.wizardForm.fields[index])) {\n includedField = true;\n break;\n }\n }\n }\n if(!includedField){\n var msg = \"\";\n if($scope.queryView === 'query'){\n msg = \"A query requires at least one ouput field. Please select 'Both' or 'Results Only' for at least one field.\";\n }else {\n msg = \"A view requires at least one ouput field. Please select 'Yes' for at least one field.\";\n }\n renderResultsModal('error', msg);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "eca8d70a93586afa4c1b07e0e4fe41b1", "score": "0.5178702", "text": "function edit_validation(item) {\n if(item.ID_Componente != \"\" && item.Componente != \"\" && item.ID_Dimension != \"\") return true;\n else $.notify(\"Complete todos los campos primero!\",\"info\");\n }", "title": "" }, { "docid": "54aa6b92804b62728e004daf343eae74", "score": "0.5177811", "text": "function validationFail(element) {\r\n element.parentElement.classList.add('not-valid');\r\n element.parentElement.classList.remove('valid');\r\n element.parentElement.lastElementChild.style.display = 'inline'; //displays accessbility user hint\r\n}", "title": "" }, { "docid": "05bff373e5510a684909d032e347cc9b", "score": "0.5177386", "text": "function validateActivity(){\n\n removeError('.activity-error');\n for(let i=0; i<checkBoxList.length; i++) {\n if (checkBoxList[i].checked) {\n activitySelected = true;\n break;\n }\n }\n if (!activitySelected) {\n errorMsg = \"Please select an activity\";\n displayError(\"activity-error\",activities,label);\n }\n\n }", "title": "" }, { "docid": "58926105122c7b94fc07c42eaf370c17", "score": "0.5176516", "text": "function validate(){\n\t\t //Test the function\n\t\t if(!checkboxes()) {\n\t\t \t\talert(\"Must select a contact method\");\n\t\t\t\treturn false;\n\t\t }\n\t\t return true;\n}", "title": "" }, { "docid": "c3e3c312e229bfbe97613db1e032eca0", "score": "0.5173941", "text": "validate() {}", "title": "" }, { "docid": "bb28ce2e5647571052a6293bf086d086", "score": "0.51711136", "text": "function OnBtnCreateSign1_Click( e )\n{\n try\n {\n BusyAction( $.activity_indicator , controls , function()\n {\n var bRet = false ;\n\n // Controller creation for the Next View\n Alloy.Globals.createAndOpenControllerExt( 'CreateSignPaintView' , { component_number: 1 , mode: \"AeDES\" } ) ;\n\n bRet = true ;\n\n return bRet ;\n } ) ;\n }\n catch( exception )\n {\n Alloy.Globals.AlertUserAndLogAsync( L( 'generic_exception_msg' ) + exception.message ) ;\n }\n}", "title": "" }, { "docid": "668bec16d4f2f99236fc303892ba6c47", "score": "0.51675105", "text": "_onRenderEnd() {\n this._hideCropTool();\n this._hideOverrideTool();\n }", "title": "" }, { "docid": "3ba58f1bc7652c8311c577345a2436e8", "score": "0.5167341", "text": "function preFinalValidation() {\n\n\tamenity_flag = 0;\n\n\tvar values = document.getElementsByName(\"amenitites\");\n\n\tvar amenitiesCount = 0;\n\n\tfor (var i = 0; i < values.length; i++) {\n\n\t\tif (values[i].checked) {\n\n\t\t\tamenitiesCount++;\n\n\t\t\tif (amenitiesCount >= 2) {\n\n\t\t\t\tamenity_flag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (amenitiesCount < 2) {\n\n\t\talert(\"Select at least 2 Amenities\");\n\t}\n\n\t// checking option selected or not\n\n\tmeeting_type = 0;\n\n\tvar meetingType = document.getElementsByName(\"meetingType\");\n\n\tif (meetingType.length == 0) {\n\n\t\tmeeting_type = 0;\n\n\t} else {\n\n\t\tmeeting_type = 1;\n\t}\n\n\n\tif (name_flag && seating_capacity && meeting_type && amenity_flag) {\n\n\t\tdocument.getElementById(\"submitButton\").disabled = false;\n\n\t} else {\n\n\t\talert('Please enter all mandatory fields');\n\t\tdocument.getElementById(\"submitButton\").disabled = true;\n\t}\n\n} // end of preFinalValidation function", "title": "" }, { "docid": "0a9ea71188dc05a324f974dccec66326", "score": "0.5164969", "text": "function EjecutarValidacionesAlComienzo() {\n\n //BusinessRuleId:1720, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divModulo_Atencion_Inicial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n\n\n }\n //BusinessRuleId:1720, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1738, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n DisabledControl($(\"#\" + nameOfTable + \"Modulo_Atencion_Inicial\" + rowIndex), (\"true\" == \"true\"));\n\n\n }\n //BusinessRuleId:1738, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1752, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divClave').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n\n\n }\n //BusinessRuleId:1752, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1752, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divClave').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n\n\n }\n //BusinessRuleId:1752, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1752, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divClave').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n\n\n }\n //BusinessRuleId:1752, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n \n\n \n\n\n\n //BusinessRuleId:238, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if ($('#' + nameOfTable + 'Incapaz' + rowIndex).val() == TryParseInt('false', 'false') && $('#' + nameOfTable + 'Edad' + rowIndex).val() == TryParseInt('null', 'null')) { $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none'); } else {}\n\n\n }\n //BusinessRuleId:238, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:238, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Incapaz' + rowIndex).val() == TryParseInt('false', 'false') && $('#' + nameOfTable + 'Edad' + rowIndex).val() == TryParseInt('null', 'null')) { $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none'); } else {}\n\n\n }\n //BusinessRuleId:238, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:238, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Incapaz' + rowIndex).val() == TryParseInt('false', 'false') && $('#' + nameOfTable + 'Edad' + rowIndex).val() == TryParseInt('null', 'null')) { $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none'); } else {}\n\n\n }\n //BusinessRuleId:238, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1896, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (EvaluaQuery(\"select GLOBAL[USERROLEID]\", rowIndex, nameOfTable) == TryParseInt('4', '4')) {\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divNombre_Completo').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex));\n $('#divEscolaridad_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n $('#divClave').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n $('#divModulo_Atencion_Inicial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:1896, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1896, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (EvaluaQuery(\"select GLOBAL[USERROLEID]\", rowIndex, nameOfTable) == TryParseInt('4', '4')) {\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divNombre_Completo').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex));\n $('#divEscolaridad_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n $('#divClave').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n $('#divModulo_Atencion_Inicial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:1896, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1896, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (EvaluaQuery(\"select GLOBAL[USERROLEID]\", rowIndex, nameOfTable) == TryParseInt('4', '4')) {\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divNombre_Completo').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex));\n $('#divEscolaridad_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n $('#divClave').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n $('#divModulo_Atencion_Inicial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:1896, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if ($('#' + nameOfTable + 'Escolaridad' + rowIndex).val() == TryParseInt('11', '11')) {\n $('#divEspecialidad').css('display', 'block');\n $('#divEstudios_Superiores').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divIncompleto').css('display', 'none');\n } else {\n $('#divEspecialidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n $('#divEstudios_Superiores').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divIncompleto').css('display', 'block');\n }\n\n }\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Escolaridad' + rowIndex).val() == TryParseInt('11', '11')) {\n $('#divEspecialidad').css('display', 'block');\n $('#divEstudios_Superiores').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divIncompleto').css('display', 'none');\n } else {\n $('#divEspecialidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n $('#divEstudios_Superiores').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divIncompleto').css('display', 'block');\n }\n\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Escolaridad' + rowIndex).val() == TryParseInt('11', '11')) {\n $('#divEspecialidad').css('display', 'block');\n $('#divEstudios_Superiores').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divIncompleto').css('display', 'none');\n } else {\n $('#divEspecialidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n $('#divEstudios_Superiores').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divIncompleto').css('display', 'block');\n }\n\n }\n\n if (operation == 'New') {\n if ($('#' + nameOfTable + 'Incapaz' + ':checked').val() == TryParseInt('true', 'true')) {\n $('#divTipo_de_Inimputabilidad').css('display', 'block');\n $('#divEspecifique').css('display', 'block');\n } else {\n $('#divTipo_de_Inimputabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n $('#divEspecifique').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex));\n }\n }\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Incapaz' + ':checked').val() == TryParseInt('true', 'true')) {\n $('#divTipo_de_Inimputabilidad').css('display', 'block');\n $('#divEspecifique').css('display', 'block');\n } else {\n $('#divTipo_de_Inimputabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n $('#divEspecifique').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex));\n }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Incapaz' + ':checked').val() == TryParseInt('true', 'true')) {\n $('#divTipo_de_Inimputabilidad').css('display', 'block');\n $('#divEspecifique').css('display', 'block');\n } else {\n $('#divTipo_de_Inimputabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n $('#divEspecifique').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex));\n }\n }\n\n if (operation == 'New') {\n if ($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + ':checked').val() == TryParseInt('true', 'true')) { $('#divGrupo_al_que_pertenece').css('display', 'block'); } else { $('#divGrupo_al_que_pertenece').css('display', 'none'); }\n }\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + ':checked').val() == TryParseInt('true', 'true')) { $('#divGrupo_al_que_pertenece').css('display', 'block'); } else { $('#divGrupo_al_que_pertenece').css('display', 'none'); }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + ':checked').val() == TryParseInt('true', 'true')) { $('#divGrupo_al_que_pertenece').css('display', 'block'); } else { $('#divGrupo_al_que_pertenece').css('display', 'none'); }\n }\n\n\n \n\n \n\n \n\n //BusinessRuleId:1915, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divTipo_de_Inimputabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n $('#divGrupo_al_que_pertenece').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n $('#divEspecifique').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex));\n\n\n }\n //BusinessRuleId:1915, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n //BusinessRuleId:1921, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divEs_victima').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex));\n\n\n }\n //BusinessRuleId:1921, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex).val() == TryParseInt('1', '1')) {\n $('#divEs_victima').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'block');\n } else {\n $('#divEs_victima').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex).val() == TryParseInt('1', '1')) {\n $('#divEs_victima').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'block');\n } else {\n $('#divEs_victima').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n }\n }\n //BusinessRuleId:1943, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divTitulo_del_Hecho').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));\n\n\n }\n //BusinessRuleId:1943, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1943, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divTitulo_del_Hecho').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));\n\n\n }\n //BusinessRuleId:1943, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1943, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divTitulo_del_Hecho').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));\n\n\n }\n //BusinessRuleId:1943, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1944, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divTitulo_del_Hecho').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));\n\n\n }\n //BusinessRuleId:1944, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1944, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divTitulo_del_Hecho').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));\n\n\n }\n //BusinessRuleId:1944, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1944, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divTitulo_del_Hecho').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));\n\n\n }\n //BusinessRuleId:1944, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1945, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divEscolaridad_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n\n\n }\n //BusinessRuleId:1945, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1945, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divEscolaridad_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n\n\n }\n //BusinessRuleId:1945, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1945, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divEscolaridad_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex));\n\n\n }\n //BusinessRuleId:1945, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1947, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Peso' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estatura' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Cara' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Complexion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Piel' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Frente' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calvicie' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Anteojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Nariz' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Labios' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Boca' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Menton' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Menton' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Barba' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Orejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Orejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Bigote' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Senas_Particulares' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_Fisica' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex));\n\n\n }\n //BusinessRuleId:1947, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1947, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Peso' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estatura' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Cara' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Complexion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Piel' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Frente' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calvicie' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Anteojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Nariz' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Labios' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Boca' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Menton' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Menton' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Barba' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Orejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Orejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Bigote' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Senas_Particulares' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_Fisica' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex));\n\n\n }\n //BusinessRuleId:1947, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1947, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Peso' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estatura' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Cara' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Complexion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Piel' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Frente' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Cabello' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calvicie' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Color_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Ojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Anteojos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Nariz' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Labios' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Boca' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Menton' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Menton' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Barba' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Orejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Orejas' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Bigote' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Senas_Particulares' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_Fisica' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex));\n\n\n }\n //BusinessRuleId:1947, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n if (operation == 'New') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divCalidad_Juridica').css('display', 'block');\n $('#divRazon_Social').css('display', 'block');\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'block');\n } else {\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n $('#divRazon_Social').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'none');\n }\n }\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divCalidad_Juridica').css('display', 'block');\n $('#divRazon_Social').css('display', 'block');\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'block');\n } else {\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n $('#divRazon_Social').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'none');\n }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divCalidad_Juridica').css('display', 'block');\n $('#divRazon_Social').css('display', 'block');\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'block');\n } else {\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n $('#divRazon_Social').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'none');\n }\n }\n\n //BusinessRuleId:1958, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombres2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Sexo2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'ID_Estado_Institucion' + rowIndex));\n\n\n }\n //BusinessRuleId:1958, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1958, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombres2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Sexo2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'ID_Estado_Institucion' + rowIndex));\n\n\n }\n //BusinessRuleId:1958, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1958, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombres2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Sexo2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad2' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'ID_Estado_Institucion' + rowIndex));\n\n\n }\n //BusinessRuleId:1958, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n //BusinessRuleId:1959, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if ($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex).val() == TryParseInt('null', 'null')) { AsignarValor($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), 'null'); } else {}\n\n\n }\n //BusinessRuleId:1959, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1959, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex).val() == TryParseInt('null', 'null')) { AsignarValor($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), 'null'); } else {}\n\n\n }\n //BusinessRuleId:1959, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1959, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex).val() == TryParseInt('null', 'null')) { AsignarValor($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), 'null'); } else {}\n\n\n }\n //BusinessRuleId:1959, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1975, Attribute:266530, Operation:Field, Event:None\n //1975\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex).prop(\"checked\") === true) {\n AsignarValor($('#' + nameOfTable + 'Nombre' + rowIndex), 'Victimas');\n AsignarValor($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex), 'Quien o Quienes');\n AsignarValor($('#' + nameOfTable + 'Apellido_Materno' + rowIndex), 'Resulten');\n $('#divFecha_de_Nacimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Nacimiento' + rowIndex));\n $('#divEdad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Edad' + rowIndex));\n $('#divEstado_Civil').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_Civil' + rowIndex));\n $('#divTipo_de_Identificacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));\n $('#divNacionalidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad' + rowIndex));\n $('#divEscolaridad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad' + rowIndex));\n $('#divOcupacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex));\n $('#divPais').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais' + rowIndex));\n $('#divEstado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex));\n $('#divMunicipio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex));\n $('#divColonia').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex));\n $('#divCodigo_Postal').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex));\n $('#divCalle').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex));\n $('#divNumero_Exterior').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex));\n $('#divNumero_Interior').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex));\n $('#divTelefono').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Telefono' + rowIndex));\n $('#divExtension').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Extension' + rowIndex));\n $('#divCelular').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Celular' + rowIndex));\n $('#divCorreo_Electronico').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex));\n $('#divIncapaz').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex));\n $('#divPais_de_Origen').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Origen' + rowIndex));\n $('#divOriginario_de').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de' + rowIndex));\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));\n $('#divSe_Informo_sobre_el_Procedimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex));\n $('#divDatos_Confidenciales').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex));\n $('#divEntre_Calle').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex));\n $('#divY_Calle').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex));\n $('#divCURP').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'CURP' + rowIndex));\n $('#divRFC').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'RFC' + rowIndex));\n $('#divPoblacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex));\n $('#divReferencia_de_Domicilio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex));\n $('#divLatitud').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Latitud' + rowIndex));\n $('#divLongitud').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Longitud' + rowIndex));\n $('#divSituacion_de_Vulnerabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex));\n $('#divEtnia').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Etnia' + rowIndex));\n $('#divNo_de_Hijos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'No_de_Hijos' + rowIndex));\n $('#divReligion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Religion' + rowIndex));\n $('#divServicio_Medico').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Servicio_Medico' + rowIndex));\n $('#divIdioma').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Idioma' + rowIndex));\n $('#divCalidad_Migratoria').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex));\n $('#divEstado_de_Nacimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex));\n $('#divMunicipio_de_Nacimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex));\n $('#divDialecto').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Dialecto' + rowIndex));\n $('#divDiscapacidad_Mental').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex));\n $('#divDiscapacidad_Fisica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex));\n $('#divDiscapacidad_Sensorial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex));\n $('#divDiscapacidad_Psicosocial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex));\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n $('#divIncompleto').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incompleto' + rowIndex));\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n if ('true' == 'true') {\n $('#divAdicciones_de_Involucrado').css('display', 'none');\n } else {\n $('#divAdicciones_de_Involucrado').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divLugares_que_Frecuenta').css('display', 'none');\n } else {\n $('#divLugares_que_Frecuenta').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divDatos_Personales_Adicionales').css('display', 'none');\n } else {\n $('#divDatos_Personales_Adicionales').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divOtras_Identificaciones').css('display', 'none');\n } else {\n $('#divOtras_Identificaciones').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divOtros_Domicilios').css('display', 'none');\n } else {\n $('#divOtros_Domicilios').css('display', 'block');\n }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); }\n $('#divNumero_de_Identificacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex));\n } else {\n //$('#' + nameOfTable + 'Nombre' + rowIndex).attr(\"placeholder\", \" \").val(\"\").focus().blur();\n //$('#' + nameOfTable + 'Apellido_Paterno' + rowIndex).attr(\"placeholder\", \" \").val(\"\").focus().blur();\n //$('#' + nameOfTable + 'Apellido_Materno' + rowIndex).attr(\"placeholder\", \" \").val(\"\").focus().blur();\n //AsignarValor($('#' + nameOfTable + 'Nombre' + rowIndex),EvaluaQuery(\"select '.'\", rowIndex, nameOfTable));\n //AsignarValor($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex),EvaluaQuery(\"select '.'\", rowIndex, nameOfTable));\n //AsignarValor($('#' + nameOfTable + 'Apellido_Materno' + rowIndex),EvaluaQuery(\"select '.​​'\", rowIndex, nameOfTable)); \n DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"false\" == \"true\"));\n if ('false' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"false\" == \"true\"));\n if ('false' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"false\" == \"true\"));\n if ('false' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); }\n $('#divFecha_de_Nacimiento').css('display', 'block');\n $('#divEdad').css('display', 'block');\n $('#divEstado_Civil').css('display', 'block');\n $('#divTipo_de_Identificacion').css('display', 'block');\n $('#divNacionalidad').css('display', 'block');\n $('#divEscolaridad').css('display', 'block');\n $('#divOcupacion').css('display', 'block');\n $('#divPais').css('display', 'block');\n $('#divEstado').css('display', 'block');\n $('#divColonia').css('display', 'block');\n $('#divCodigo_Postal').css('display', 'block');\n $('#divCalle').css('display', 'block');\n $('#divNumero_Exterior').css('display', 'block');\n $('#divNumero_Interior').css('display', 'block');\n $('#divTelefono').css('display', 'block');\n $('#divExtension').css('display', 'block');\n $('#divCelular').css('display', 'block');\n $('#divCorreo_Electronico').css('display', 'block');\n $('#divIncapaz').css('display', 'block');\n $('#divPais_de_Origen').css('display', 'block');\n $('#divOriginario_de').css('display', 'block');\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'block');\n $('#divSe_Informo_sobre_el_Procedimiento').css('display', 'block');\n $('#divDatos_Confidenciales').css('display', 'block');\n $('#divEntre_Calle').css('display', 'block');\n $('#divY_Calle').css('display', 'block');\n $('#divCURP').css('display', 'block');\n $('#divRFC').css('display', 'block');\n $('#divPoblacion').css('display', 'block');\n $('#divReferencia_de_Domicilio').css('display', 'block');\n $('#divLatitud').css('display', 'block');\n $('#divLongitud').css('display', 'block');\n $('#divSituacion_de_Vulnerabilidad').css('display', 'block');\n $('#divEtnia').css('display', 'block');\n $('#divNo_de_Hijos').css('display', 'block');\n $('#divReligion').css('display', 'block');\n $('#divServicio_Medico').css('display', 'block');\n $('#divIdioma').css('display', 'block');\n $('#divCalidad_Migratoria').css('display', 'block');\n $('#divEstado_de_Nacimiento').css('display', 'block');\n $('#divMunicipio_de_Nacimiento').css('display', 'block');\n $('#divDialecto').css('display', 'block');\n $('#divDiscapacidad_Mental').css('display', 'block');\n $('#divDiscapacidad_Fisica').css('display', 'block');\n $('#divDiscapacidad_Sensorial').css('display', 'block');\n $('#divDiscapacidad_Psicosocial').css('display', 'block');\n $('#divMunicipio').css('display', 'block');\n $('#divMunicipio_Corporacion').css('display', 'block');\n $('#divCorporacion').css('display', 'block');\n $('#divIncompleto').css('display', 'block');\n $('#divCalidad_Juridica').css('display', 'block');\n if ('false' == 'true') {\n $('#divAdicciones_de_Involucrado').css('display', 'none');\n } else {\n $('#divAdicciones_de_Involucrado').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divLugares_que_Frecuenta').css('display', 'none');\n } else {\n $('#divLugares_que_Frecuenta').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divDatos_Personales_Adicionales').css('display', 'none');\n } else {\n $('#divDatos_Personales_Adicionales').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divOtras_Identificaciones').css('display', 'none');\n } else {\n $('#divOtras_Identificaciones').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divOtros_Domicilios').css('display', 'none');\n } else {\n $('#divOtros_Domicilios').css('display', 'block');\n }\n $('#divNumero_de_Identificacion').css('display', 'block');\n }\n }\n //1975\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex).prop(\"checked\") === true) {\n AsignarValor($('#' + nameOfTable + 'Nombre' + rowIndex), 'Victimas');\n AsignarValor($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex), 'Quien o Quienes');\n AsignarValor($('#' + nameOfTable + 'Apellido_Materno' + rowIndex), 'Resulten');\n $('#divFecha_de_Nacimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Nacimiento' + rowIndex));\n $('#divEdad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Edad' + rowIndex));\n $('#divEstado_Civil').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_Civil' + rowIndex));\n $('#divTipo_de_Identificacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));\n $('#divNacionalidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad' + rowIndex));\n $('#divEscolaridad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad' + rowIndex));\n $('#divOcupacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex));\n $('#divPais').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais' + rowIndex));\n $('#divEstado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex));\n $('#divMunicipio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex));\n $('#divColonia').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex));\n $('#divCodigo_Postal').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex));\n $('#divCalle').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex));\n $('#divNumero_Exterior').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex));\n $('#divNumero_Interior').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex));\n $('#divTelefono').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Telefono' + rowIndex));\n $('#divExtension').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Extension' + rowIndex));\n $('#divCelular').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Celular' + rowIndex));\n $('#divCorreo_Electronico').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex));\n $('#divIncapaz').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex));\n $('#divPais_de_Origen').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Origen' + rowIndex));\n $('#divOriginario_de').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de' + rowIndex));\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));\n $('#divSe_Informo_sobre_el_Procedimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex));\n $('#divDatos_Confidenciales').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex));\n $('#divEntre_Calle').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex));\n $('#divY_Calle').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex));\n $('#divCURP').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'CURP' + rowIndex));\n $('#divRFC').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'RFC' + rowIndex));\n $('#divPoblacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex));\n $('#divReferencia_de_Domicilio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex));\n $('#divLatitud').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Latitud' + rowIndex));\n $('#divLongitud').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Longitud' + rowIndex));\n $('#divSituacion_de_Vulnerabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex));\n $('#divEtnia').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Etnia' + rowIndex));\n $('#divNo_de_Hijos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'No_de_Hijos' + rowIndex));\n $('#divReligion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Religion' + rowIndex));\n $('#divServicio_Medico').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Servicio_Medico' + rowIndex));\n $('#divIdioma').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Idioma' + rowIndex));\n $('#divCalidad_Migratoria').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex));\n $('#divEstado_de_Nacimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex));\n $('#divMunicipio_de_Nacimiento').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex));\n $('#divDialecto').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Dialecto' + rowIndex));\n $('#divDiscapacidad_Mental').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex));\n $('#divDiscapacidad_Fisica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex));\n $('#divDiscapacidad_Sensorial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex));\n $('#divDiscapacidad_Psicosocial').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex));\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n $('#divIncompleto').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incompleto' + rowIndex));\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n if ('true' == 'true') {\n $('#divAdicciones_de_Involucrado').css('display', 'none');\n } else {\n $('#divAdicciones_de_Involucrado').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divLugares_que_Frecuenta').css('display', 'none');\n } else {\n $('#divLugares_que_Frecuenta').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divDatos_Personales_Adicionales').css('display', 'none');\n } else {\n $('#divDatos_Personales_Adicionales').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divOtras_Identificaciones').css('display', 'none');\n } else {\n $('#divOtras_Identificaciones').css('display', 'block');\n }\n if ('true' == 'true') {\n $('#divOtros_Domicilios').css('display', 'none');\n } else {\n $('#divOtros_Domicilios').css('display', 'block');\n }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); }\n $('#divNumero_de_Identificacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex));\n } else {\n //$('#' + nameOfTable + 'Nombre' + rowIndex).attr(\"placeholder\", \" \").val(\"\").focus().blur();\n //$('#' + nameOfTable + 'Apellido_Paterno' + rowIndex).attr(\"placeholder\", \" \").val(\"\").focus().blur();\n //$('#' + nameOfTable + 'Apellido_Materno' + rowIndex).attr(\"placeholder\", \" \").val(\"\").focus().blur();\n //AsignarValor($('#' + nameOfTable + 'Nombre' + rowIndex),EvaluaQuery(\"select '.'\", rowIndex, nameOfTable));\n //AsignarValor($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex),EvaluaQuery(\"select '.'\", rowIndex, nameOfTable));\n //AsignarValor($('#' + nameOfTable + 'Apellido_Materno' + rowIndex),EvaluaQuery(\"select '.​​'\", rowIndex, nameOfTable)); \n DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"false\" == \"true\"));\n if ('false' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"false\" == \"true\"));\n if ('false' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"false\" == \"true\"));\n if ('false' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); }\n $('#divFecha_de_Nacimiento').css('display', 'block');\n $('#divEdad').css('display', 'block');\n $('#divEstado_Civil').css('display', 'block');\n $('#divTipo_de_Identificacion').css('display', 'block');\n $('#divNacionalidad').css('display', 'block');\n $('#divEscolaridad').css('display', 'block');\n $('#divOcupacion').css('display', 'block');\n $('#divPais').css('display', 'block');\n $('#divEstado').css('display', 'block');\n $('#divColonia').css('display', 'block');\n $('#divCodigo_Postal').css('display', 'block');\n $('#divCalle').css('display', 'block');\n $('#divNumero_Exterior').css('display', 'block');\n $('#divNumero_Interior').css('display', 'block');\n $('#divTelefono').css('display', 'block');\n $('#divExtension').css('display', 'block');\n $('#divCelular').css('display', 'block');\n $('#divCorreo_Electronico').css('display', 'block');\n $('#divIncapaz').css('display', 'block');\n $('#divPais_de_Origen').css('display', 'block');\n $('#divOriginario_de').css('display', 'block');\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'block');\n $('#divSe_Informo_sobre_el_Procedimiento').css('display', 'block');\n $('#divDatos_Confidenciales').css('display', 'block');\n $('#divEntre_Calle').css('display', 'block');\n $('#divY_Calle').css('display', 'block');\n $('#divCURP').css('display', 'block');\n $('#divRFC').css('display', 'block');\n $('#divPoblacion').css('display', 'block');\n $('#divReferencia_de_Domicilio').css('display', 'block');\n $('#divLatitud').css('display', 'block');\n $('#divLongitud').css('display', 'block');\n $('#divSituacion_de_Vulnerabilidad').css('display', 'block');\n $('#divEtnia').css('display', 'block');\n $('#divNo_de_Hijos').css('display', 'block');\n $('#divReligion').css('display', 'block');\n $('#divServicio_Medico').css('display', 'block');\n $('#divIdioma').css('display', 'block');\n $('#divCalidad_Migratoria').css('display', 'block');\n $('#divEstado_de_Nacimiento').css('display', 'block');\n $('#divMunicipio_de_Nacimiento').css('display', 'block');\n $('#divDialecto').css('display', 'block');\n $('#divDiscapacidad_Mental').css('display', 'block');\n $('#divDiscapacidad_Fisica').css('display', 'block');\n $('#divDiscapacidad_Sensorial').css('display', 'block');\n $('#divDiscapacidad_Psicosocial').css('display', 'block');\n $('#divMunicipio').css('display', 'block');\n $('#divMunicipio_Corporacion').css('display', 'block');\n $('#divCorporacion').css('display', 'block');\n $('#divIncompleto').css('display', 'block');\n $('#divCalidad_Juridica').css('display', 'block');\n if ('false' == 'true') {\n $('#divAdicciones_de_Involucrado').css('display', 'none');\n } else {\n $('#divAdicciones_de_Involucrado').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divLugares_que_Frecuenta').css('display', 'none');\n } else {\n $('#divLugares_que_Frecuenta').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divDatos_Personales_Adicionales').css('display', 'none');\n } else {\n $('#divDatos_Personales_Adicionales').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divOtras_Identificaciones').css('display', 'none');\n } else {\n $('#divOtras_Identificaciones').css('display', 'block');\n }\n if ('false' == 'true') {\n $('#divOtros_Domicilios').css('display', 'none');\n } else {\n $('#divOtros_Domicilios').css('display', 'block');\n }\n $('#divNumero_de_Identificacion').css('display', 'block');\n }\n }\n\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex).prop(\"checked\") === true) {\n $('#divPersona_Moral').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n } else { $('#divPersona_Moral').css('display', 'block'); }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex).prop(\"checked\") === true) {\n $('#divPersona_Moral').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n } else { $('#divPersona_Moral').css('display', 'block'); }\n }\n\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divQ_Q_R_O_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));\n } else { $('#divQ_Q_R_O_').css('display', 'block'); }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divQ_Q_R_O_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));\n } else { $('#divQ_Q_R_O_').css('display', 'block'); }\n }\n\n\n //BusinessRuleId:1999, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divNombre_Completo2').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));\n\n\n }\n //BusinessRuleId:1999, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1999, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divNombre_Completo2').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));\n\n\n }\n //BusinessRuleId:1999, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:1999, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divNombre_Completo2').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));\n\n\n }\n //BusinessRuleId:1999, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2148, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n\n\n }\n //BusinessRuleId:2148, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n //BusinessRuleId:2150, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('3', '3')) {\n $('#divMunicipio_Corporacion').css('display', 'block');\n $('#divCorporacion').css('display', 'block');\n } else {\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2150, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2150, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('3', '3')) {\n $('#divMunicipio_Corporacion').css('display', 'block');\n $('#divCorporacion').css('display', 'block');\n } else {\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2150, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2151, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('3', '3')) {\n $('#divOcupacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex));\n $('#divEstado_de_Involucrado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n } else {}\n\n\n }\n //BusinessRuleId:2151, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2151, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('3', '3')) {\n $('#divOcupacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex));\n $('#divEstado_de_Involucrado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n } else {}\n\n\n }\n //BusinessRuleId:2151, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2154, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('1', '1')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'block');\n $('#divEs_victima').css('display', 'block');\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:2154, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2154, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('1', '1')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'block');\n $('#divEs_victima').css('display', 'block');\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:2154, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n //BusinessRuleId:2162, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n AsignarValor($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex), EvaluaQuery(\"SELECT NUAT FROM Modulo_Atencion_Inicial where Clave = GLOBAL[SpartanOperationId]\", rowIndex, nameOfTable));\n\n\n }\n //BusinessRuleId:2162, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2176, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('3', '3')) {\n $('#divMunicipio_Corporacion').css('display', 'block');\n $('#divCorporacion').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divOcupacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex));\n $('#divEstado_de_Involucrado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:2176, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2176, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('3', '3')) {\n $('#divMunicipio_Corporacion').css('display', 'block');\n $('#divCorporacion').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divOcupacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex));\n $('#divEstado_de_Involucrado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:2176, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2178, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('1', '1')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:2178, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2178, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('1', '1')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n } else {}\n\n\n }\n //BusinessRuleId:2178, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n\n\n\n\n //BusinessRuleId:2181, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divCalidad_Juridica').css('display', 'block');\n $('#divRazon_Social').css('display', 'block');\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'block');\n } else {\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n $('#divRazon_Social').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'none');\n }\n\n\n }\n //BusinessRuleId:2181, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2181, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Persona_Moral' + rowIndex).prop(\"checked\") === true) {\n $('#divCalidad_Juridica').css('display', 'block');\n $('#divRazon_Social').css('display', 'block');\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'block');\n } else {\n $('#divCalidad_Juridica').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));\n $('#divRazon_Social').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex));\n $(\"a[href='#tabRepresentante_Legal']\").css('display', 'none');\n }\n\n\n }\n //BusinessRuleId:2181, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n \n\n \n //1994\n if (operation == 'Update') {\n if ($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex).prop(\"checked\") === true) {\n $('#divPersona_Moral').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n } else { $('#divPersona_Moral').css('display', 'block'); }\n }\n if (operation == 'Consult') {\n if ($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex).prop(\"checked\") === true) {\n $('#divPersona_Moral').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n } else { $('#divPersona_Moral').css('display', 'block'); }\n }\n //BusinessRuleId:2177, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('4', '4')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n } else {}\n\n\n }\n //BusinessRuleId:2177, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2177, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('4', '4')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n } else {}\n\n\n }\n //BusinessRuleId:2177, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n //BusinessRuleId:2180, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('2', '2')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'block');\n $('#divQ_Q_R_O_').css('display', 'block');\n $('#divPersona_Moral').css('display', 'block');\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n } else {\n $('#divQ_Q_R_O_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));\n $('#divPersona_Moral').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2180, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2180, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('2', '2')) {\n $('#divOcupacion').css('display', 'block');\n $('#divEstado_de_Involucrado').css('display', 'block');\n $('#divQ_Q_R_O_').css('display', 'block');\n $('#divPersona_Moral').css('display', 'block');\n $('#divMunicipio_Corporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));\n $('#divCorporacion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex));\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n } else {\n $('#divQ_Q_R_O_').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));\n $('#divPersona_Moral').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2180, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n //BusinessRuleId:2430, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n SetRequiredToControl($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));\n\n\n }\n //BusinessRuleId:2430, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2430, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n SetRequiredToControl($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));\n\n\n }\n //BusinessRuleId:2430, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n //BusinessRuleId:1274, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (EvaluaQuery(\"DECLARE @date date, @tmpdate date, @years int\" +\n \" \" +\n \" SELECT @date = convert(date,(convert(varchar(10),'FLD[Fecha_de_Nacimiento]',103)),103)\" +\n \" \" +\n \" SELECT @tmpdate = @date\" +\n \" \" +\n \" SELECT @years = DATEDIFF(yy, @tmpdate, GETDATE()) - CASE WHEN (MONTH(@date) > MONTH(GETDATE())) OR (MONTH(@date) = MONTH(GETDATE()) AND DAY(@date) > DAY(GETDATE())) THEN 1 ELSE 0 END\" +\n \" \" +\n \" SELECT @tmpdate = DATEADD(yy, @years, @tmpdate)\" +\n \" \" +\n \" SELECT @years\", rowIndex, nameOfTable) < TryParseInt('18', '18') && GetValueByControlType($('#' + nameOfTable + 'Fecha_de_Nacimiento' + rowIndex), nameOfTable, rowIndex) != TryParseInt('null', 'null') || GetValueByControlType($('#' + nameOfTable + 'Incapaz' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) { $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'block'); } else { $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none'); }\n\n\n }\n //BusinessRuleId:1274, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2507, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divExpediente_MP').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MP' + rowIndex));\n\n\n }\n //BusinessRuleId:2507, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2507, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divExpediente_MP').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MP' + rowIndex));\n\n\n }\n //BusinessRuleId:2507, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2507, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divExpediente_MP').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MP' + rowIndex));\n\n\n }\n //BusinessRuleId:2507, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n //BusinessRuleId:2863, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Cabello' + rowIndex));\n\n\n }\n //BusinessRuleId:2863, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2863, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Cabello' + rowIndex));\n\n\n }\n //BusinessRuleId:2863, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n //BusinessRuleId:2889, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (GetValueByControlType($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex), nameOfTable, rowIndex) == TryParseInt('false', 'false')) {\n $('#divPersona_Aparecio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex));\n } else { $('#divPersona_Aparecio').css('display', 'block'); }\n\n\n }\n //BusinessRuleId:2889, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2889, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex), nameOfTable, rowIndex) == TryParseInt('false', 'false')) {\n $('#divPersona_Aparecio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex));\n } else { $('#divPersona_Aparecio').css('display', 'block'); }\n\n\n }\n //BusinessRuleId:2889, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2889, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex), nameOfTable, rowIndex) == TryParseInt('false', 'false')) {\n $('#divPersona_Aparecio').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex));\n } else { $('#divPersona_Aparecio').css('display', 'block'); }\n\n\n }\n //BusinessRuleId:2889, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2892, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (GetValueByControlType($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex), nameOfTable, rowIndex) == TryParseInt('false', 'false')) {\n $('#divFecha_de_Aparicion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));\n $('#divCon_Vida').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex));\n } else {\n $('#divFecha_de_Aparicion').css('display', 'block');\n $('#divCon_Vida').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2892, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2892, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex), nameOfTable, rowIndex) == TryParseInt('false', 'false')) {\n $('#divFecha_de_Aparicion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));\n $('#divCon_Vida').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex));\n } else {\n $('#divFecha_de_Aparicion').css('display', 'block');\n $('#divCon_Vida').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2892, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2892, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex), nameOfTable, rowIndex) == TryParseInt('false', 'false')) {\n $('#divFecha_de_Aparicion').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));\n $('#divCon_Vida').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex));\n } else {\n $('#divFecha_de_Aparicion').css('display', 'block');\n $('#divCon_Vida').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2892, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2902, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) != TryParseInt('2', '2')) {\n $('#divPersona_Desaparecida').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex));\n } else { $('#divPersona_Desaparecida').css('display', 'block'); }\n\n\n }\n //BusinessRuleId:2902, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2902, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) != TryParseInt('2', '2')) {\n $('#divPersona_Desaparecida').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex));\n } else { $('#divPersona_Desaparecida').css('display', 'block'); }\n\n\n }\n //BusinessRuleId:2902, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2902, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) != TryParseInt('2', '2')) {\n $('#divPersona_Desaparecida').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex));\n } else { $('#divPersona_Desaparecida').css('display', 'block'); }\n\n\n }\n //BusinessRuleId:2902, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2179, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('1', '1')) {\n $('#divEs_victima').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'block');\n } else {\n $('#divEs_victima').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2179, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2179, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex), nameOfTable, rowIndex) == TryParseInt('1', '1')) {\n $('#divEs_victima').css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'block');\n } else {\n $('#divEs_victima').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2179, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2942, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divExpediente_MASC').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MASC' + rowIndex));\n\n\n }\n //BusinessRuleId:2942, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2942, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divExpediente_MASC').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MASC' + rowIndex));\n\n\n }\n //BusinessRuleId:2942, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2942, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divExpediente_MASC').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MASC' + rowIndex));\n\n\n }\n //BusinessRuleId:2942, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2986, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n\n\n }\n //BusinessRuleId:2986, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2986, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n\n\n }\n //BusinessRuleId:2986, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2986, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n\n\n }\n //BusinessRuleId:2986, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n //BusinessRuleId:2720, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Telefonico' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Redes_Sociales' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_X' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_Y' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex));\n\n }\n //BusinessRuleId:2720, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2720, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Telefonico' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Redes_Sociales' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_X' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_Y' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex));\n\n }\n //BusinessRuleId:2720, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2494, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n DisabledControl($(\"#\" + nameOfTable + \"Edad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Edad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex)); }\n\n }\n //BusinessRuleId:2494, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2494, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n DisabledControl($(\"#\" + nameOfTable + \"Edad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Edad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex)); }\n\n }\n //BusinessRuleId:2494, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n //BusinessRuleId:3594, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (GetValueByControlType($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex), nameOfTable, rowIndex) == TryParseInt('5', '5') && GetValueByControlType($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divPreferencia_Sexual').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n $('#divPreferencia_Sexual').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n }\n\n }\n //BusinessRuleId:3594, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3594, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex), nameOfTable, rowIndex) == TryParseInt('5', '5') && GetValueByControlType($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divPreferencia_Sexual').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n $('#divPreferencia_Sexual').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n }\n\n }\n //BusinessRuleId:3594, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3594, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex), nameOfTable, rowIndex) == TryParseInt('5', '5') && GetValueByControlType($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divPreferencia_Sexual').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n $('#divPreferencia_Sexual').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));\n }\n\n }\n //BusinessRuleId:3594, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3600, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n var valor = $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).val();\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).empty();\n if (!$('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).hasClass('AutoComplete')) {\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).append($(\"<option selected />\").val(\"\").text(\"\"));\n $.each(EvaluaQueryDictionary(\"SELECT Clave, Nombre FROM Municipio WHERE Estado = FLD[Estado_de_Nacimiento]\", rowIndex, nameOfTable), function(index, value) { $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).append($(\"<option />\").val(index).text(value)); });\n } else {\n var selectData = [];\n selectData.push({ id: \"\", text: \"\" });\n $.each(EvaluaQueryDictionary(\"SELECT Clave, Nombre FROM Municipio WHERE Estado = FLD[Estado_de_Nacimiento]\", rowIndex, nameOfTable), function(index, value) { selectData.push({ id: index, text: value }); });\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).select2({ data: selectData })\n }\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).val(valor).trigger('change');\n\n }\n //BusinessRuleId:3600, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3600, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n var valor = $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).val();\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).empty();\n if (!$('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).hasClass('AutoComplete')) {\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).append($(\"<option selected />\").val(\"\").text(\"\"));\n $.each(EvaluaQueryDictionary(\"SELECT Clave, Nombre FROM Municipio WHERE Estado = FLD[Estado_de_Nacimiento]\", rowIndex, nameOfTable), function(index, value) { $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).append($(\"<option />\").val(index).text(value)); });\n } else {\n var selectData = [];\n selectData.push({ id: \"\", text: \"\" });\n $.each(EvaluaQueryDictionary(\"SELECT Clave, Nombre FROM Municipio WHERE Estado = FLD[Estado_de_Nacimiento]\", rowIndex, nameOfTable), function(index, value) { selectData.push({ id: index, text: value }); });\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).select2({ data: selectData })\n }\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).val(valor).trigger('change');\n\n }\n //BusinessRuleId:3600, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3600, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n var valor = $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).val();\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).empty();\n if (!$('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).hasClass('AutoComplete')) {\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).append($(\"<option selected />\").val(\"\").text(\"\"));\n $.each(EvaluaQueryDictionary(\"SELECT Clave, Nombre FROM Municipio WHERE Estado = FLD[Estado_de_Nacimiento]\", rowIndex, nameOfTable), function(index, value) { $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).append($(\"<option />\").val(index).text(value)); });\n } else {\n var selectData = [];\n selectData.push({ id: \"\", text: \"\" });\n $.each(EvaluaQueryDictionary(\"SELECT Clave, Nombre FROM Municipio WHERE Estado = FLD[Estado_de_Nacimiento]\", rowIndex, nameOfTable), function(index, value) { selectData.push({ id: index, text: value }); });\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).select2({ data: selectData })\n }\n $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex).val(valor).trigger('change');\n\n }\n //BusinessRuleId:3600, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n //BusinessRuleId:3628, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divLocalidad_del_Tutor').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex));\n $('#divOriginario_de_T').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de_T' + rowIndex));\n\n\n }\n //BusinessRuleId:3628, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3628, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divLocalidad_del_Tutor').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex));\n $('#divOriginario_de_T').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de_T' + rowIndex));\n\n\n }\n //BusinessRuleId:3628, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n \n\n \n\n //BusinessRuleId:3851, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));\n\n\n }\n //BusinessRuleId:3851, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3851, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));\n\n\n }\n //BusinessRuleId:3851, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3851, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));\n\n\n }\n //BusinessRuleId:3851, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3854, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (GetValueByControlType($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divGrupo_al_que_pertenece').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n $('#divGrupo_al_que_pertenece').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:3854, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3854, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divGrupo_al_que_pertenece').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n $('#divGrupo_al_que_pertenece').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:3854, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3854, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divGrupo_al_que_pertenece').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n $('#divGrupo_al_que_pertenece').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:3854, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2234, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Incapaz' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divTipo_de_Inimputabilidad').css('display', 'block');\n $('#divEspecifique').css('display', 'block');\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n SetRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n } else {\n $('#divTipo_de_Inimputabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n $('#divEspecifique').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex));\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2234, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:2234, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Incapaz' + rowIndex), nameOfTable, rowIndex) == TryParseInt('true', 'true')) {\n $('#divTipo_de_Inimputabilidad').css('display', 'block');\n $('#divEspecifique').css('display', 'block');\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'block');\n $(\"a[href='#tabDatos_de_los_Hechos']\").css('display', 'none');\n SetRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n } else {\n $('#divTipo_de_Inimputabilidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n $('#divEspecifique').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex));\n $(\"a[href='#tabDatos_del_Tutor']\").css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:2234, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:3903, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (TryParseInt('107', '107') == EvaluaQuery(\"SELECT GLOBAL[USERROLEID]\", rowIndex, nameOfTable)) {\n DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Edad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Sexo\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Sexo' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_Civil\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_Civil' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Identificacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_de_Identificacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Ocupacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Telefono\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Telefono' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Extension\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Extension' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Celular\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Celular' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Incapaz\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Nacimiento_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Nacimiento_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Edad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Sexo_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Sexo_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_Civil_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_Civil_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Identificacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_de_Identificacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_de_Identificacion_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Ocupacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Localidad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Telefono_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Telefono_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Extension_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Extension_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Celular_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Celular_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Compareciente\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Originario_de\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Titulo_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Narrativa_Breve_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Narrativa_Breve_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Prioridad_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Prioridad_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Hora_Aproximada_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Hora_Aproximada_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_del_hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_del_hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Y_calle_de_los_hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Latitud_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Latitud_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Longitud_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Longitud_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_lugar_del_hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_lugar_del_hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Origen_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Origen_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Originario_de_T\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de_T' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causa_de_Interrupcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Insuficientes\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Actualizacion_de_Sobreseimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Se_Informaron_sobre_sus_Derechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Se_Informo_sobre_el_Procedimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Confidenciales\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Inimputabilidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Y_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"CURP\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'CURP' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"RFC\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'RFC' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"CURP_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'CURP_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"RFC_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'RFC_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Referencia_de_Domicilio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Latitud\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Latitud' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Longitud\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Longitud' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Situacion_de_Vulnerabilidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Grupo_al_que_pertenece\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Etnia\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Etnia' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"No_de_Hijos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'No_de_Hijos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Religion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Religion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Servicio_Medico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Servicio_Medico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad_\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Especialidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estudios_Superiores\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Idioma\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Idioma' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calidad_Migratoria\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Dialecto\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Dialecto' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_de_Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Especifique\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Mental\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Fisica\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Sensorial\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Psicosocial\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Referencia_de_Domicilio_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_de_Domicilio_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Latitud_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Latitud_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Longitud_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Longitud_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Referencia_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Y_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_identificacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Telefonico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Telefonico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Redes_Sociales\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Redes_Sociales' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Observaciones\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Lugar\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Folio_Adicciones\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Folio_Adicciones' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Documento_Extraviado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Documento_Extraviado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Documento_Extraviado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Documento_Extraviado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Modulo_Atencion_Inicial\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Q_Q_R_O_\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Es_victima\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_Corporacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Corporacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Incompleto\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Incompleto' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Peso\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Peso' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estatura\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estatura' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Padecimiento_de_Enfermedad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_Cara\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Cara' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Cejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Cejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Cantidad_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Implantacion_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Complexion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Complexion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Color_Piel\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Color_Piel' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Frente\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Frente' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Largo_de_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Color_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Color_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calvicie\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calvicie' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Color_Ojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Color_Ojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Ojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_Ojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Ojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Anteojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Anteojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Nariz\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_Nariz\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Nariz' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Labios\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Labios' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Boca\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Boca' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Grosor_de_Labios\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Menton\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Menton' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Menton\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Menton' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Barba\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Barba' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_Orejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Orejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_Orejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Orejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_Lobulo\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Bigote\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Bigote' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Senas_Particulares' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Imagen_Tatuaje\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Situacion_Fisica\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_Fisica' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Otras_Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Persona_Moral\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calidad_Juridica\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Razon_Social\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombres2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombres2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Sexo2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Sexo2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"ID_Estado_Institucion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'ID_Estado_Institucion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Expediente_MP\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MP' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Coordenada_X\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_X' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Coordenada_Y\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_Y' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Observaciones\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Gravidez\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Gravidez' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Persona_Desaparecida\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Persona_Aparecio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Aparicion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Con_Vida\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Expediente_MASC\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MASC' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Preferencia_Sexual\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex)); }\n } else {}\n\n }\n //BusinessRuleId:3903, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4081, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n if (GetValueByControlType($('#' + nameOfTable + 'Escolaridad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('6', '6')) {\n $('#divEspecialidad').css('display', 'block');\n $('#divEstudios_Superiores').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divEspecialidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n $('#divEstudios_Superiores').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:4081, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4081, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (GetValueByControlType($('#' + nameOfTable + 'Escolaridad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('6', '6')) {\n $('#divEspecialidad').css('display', 'block');\n $('#divEstudios_Superiores').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divEspecialidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n $('#divEstudios_Superiores').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:4081, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4081, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n if (GetValueByControlType($('#' + nameOfTable + 'Escolaridad' + rowIndex), nameOfTable, rowIndex) == TryParseInt('6', '6')) {\n $('#divEspecialidad').css('display', 'block');\n $('#divEstudios_Superiores').css('display', 'block');\n SetRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n } else {\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n $('#divEspecialidad').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex));\n $('#divEstudios_Superiores').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));\n }\n\n\n }\n //BusinessRuleId:4081, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n //BusinessRuleId:4085, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $(\"a[href='#tabDesestimacion']\").css('display', 'none');\n DisabledControl($(\"#\" + nameOfTable + \"Causa_de_Interrupcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Insuficientes\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Actualizacion_de_Sobreseimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex)); }\n\n\n }\n //BusinessRuleId:4085, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4085, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $(\"a[href='#tabDesestimacion']\").css('display', 'none');\n DisabledControl($(\"#\" + nameOfTable + \"Causa_de_Interrupcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Insuficientes\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Actualizacion_de_Sobreseimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex)); }\n\n\n }\n //BusinessRuleId:4085, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4085, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $(\"a[href='#tabDesestimacion']\").css('display', 'none');\n DisabledControl($(\"#\" + nameOfTable + \"Causa_de_Interrupcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Insuficientes\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Actualizacion_de_Sobreseimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex)); }\n\n\n }\n //BusinessRuleId:4085, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n\n\n\n\n \n\n \n\n \n\n \n\n\n\n //BusinessRuleId:4517, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'New') {\n $('#divIncapaz').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex));\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));\n\n\n }\n //BusinessRuleId:4517, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4517, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n $('#divIncapaz').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex));\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));\n\n\n }\n //BusinessRuleId:4517, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4517, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Consult') {\n $('#divIncapaz').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex));\n $('#divSe_Informaron_sobre_sus_Derechos').css('display', 'none');\n SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));\n\n\n }\n //BusinessRuleId:4517, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n //BusinessRuleId:4375, Attribute:0, Operation:Object, Event:SCREENOPENING\n if (operation == 'Update') {\n if (TryParseInt('107', '107') == EvaluaQuery(\"SELECT GLOBAL[USERROLEID]\", rowIndex, nameOfTable)) {\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Edad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Sexo\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Sexo' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_Civil\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_Civil' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Identificacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_de_Identificacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Ocupacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Telefono\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Telefono' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Extension\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Extension' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Celular\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Celular' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Incapaz\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Incapaz' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Nacimiento_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Nacimiento_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Edad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Sexo_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Sexo_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_Civil_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_Civil_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Identificacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_de_Identificacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_de_Identificacion_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Ocupacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Ocupacion_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Localidad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Telefono_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Telefono_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Extension_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Extension_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Celular_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Celular_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico_del_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Compareciente\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Originario_de\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Titulo_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Narrativa_Breve_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Narrativa_Breve_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Prioridad_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Prioridad_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Hora_Aproximada_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Hora_Aproximada_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_del_hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_del_hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_del_Hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_del_Hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Y_calle_de_los_hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Latitud_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Latitud_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Longitud_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Longitud_de_los_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_lugar_del_hecho\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_lugar_del_hecho' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Origen_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Pais_de_Origen_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Originario_de_T\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Originario_de_T' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causa_de_Interrupcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Insuficientes\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Causal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Causal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Actualizacion_de_Sobreseimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Se_Informaron_sobre_sus_Derechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Se_Informo_sobre_el_Procedimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Datos_Confidenciales\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Inimputabilidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Y_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"CURP\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'CURP' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"RFC\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'RFC' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"CURP_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'CURP_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"RFC_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'RFC_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Referencia_de_Domicilio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Latitud\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Latitud' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Longitud\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Longitud' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Situacion_de_Vulnerabilidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Grupo_al_que_pertenece\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Etnia\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Etnia' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"No_de_Hijos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'No_de_Hijos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Religion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Religion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Servicio_Medico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Servicio_Medico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad_\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad_' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Especialidad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Especialidad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estudios_Superiores\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estudios_Superiores' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Idioma\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Idioma' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calidad_Migratoria\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Dialecto\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Dialecto' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado_de_Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Especifique\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Especifique' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Mental\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Fisica\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Sensorial\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Psicosocial\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Referencia_de_Domicilio_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_de_Domicilio_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Latitud_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Latitud_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Longitud_Tutor\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Longitud_Tutor' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Referencia_Hechos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Referencia_Hechos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Poblacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Poblacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Colonia\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Colonia' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Codigo_Postal' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Entre_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Y_Calle\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Y_Calle' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Exterior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_identificacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Correo_Electronico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Telefonico\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Telefonico' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Redes_Sociales\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Redes_Sociales' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Observaciones\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Involucrado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Involucrado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Lugar\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Clave' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Folio_Adicciones\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Folio_Adicciones' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Descripcion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Documento_Extraviado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Documento_Extraviado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Documento_Extraviado\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Documento_Extraviado' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Modulo_Atencion_Inicial\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Q_Q_R_O_\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Es_victima\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Es_victima' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Municipio_Corporacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Corporacion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Corporacion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Incompleto\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Incompleto' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Peso\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Peso' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Estatura\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Estatura' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Padecimiento_de_Enfermedad\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_Cara\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Cara' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Cejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Cejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Cantidad_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Implantacion_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Complexion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Complexion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Color_Piel\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Color_Piel' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Frente\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Frente' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Largo_de_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Color_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Color_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calvicie\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calvicie' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Color_Ojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Color_Ojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Ojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_Ojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Ojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Anteojos\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Anteojos' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Nariz\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_Nariz\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Nariz' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Labios\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Labios' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Boca\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Boca' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Grosor_de_Labios\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Menton\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Menton' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Menton\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Menton' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Barba\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Barba' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_Orejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_Orejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tamano_Orejas\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tamano_Orejas' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Tipo_Lobulo\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Bigote\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Bigote' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Senas_Particulares' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Imagen_Tatuaje\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Situacion_Fisica\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Situacion_Fisica' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Otras_Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Persona_Moral\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Moral' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Calidad_Juridica\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Calidad_Juridica' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Razon_Social\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Razon_Social' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombres2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombres2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Paterno2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Apellido_Materno2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nombre_Completo2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Sexo2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Sexo2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Nacionalidad2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Escolaridad2\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Escolaridad2' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"ID_Estado_Institucion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'ID_Estado_Institucion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Expediente_MP\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MP' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Cabello\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Forma_de_Cabello' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Numero_Interior' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Coordenada_X\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_X' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Coordenada_Y\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Coordenada_Y' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Observaciones\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Observaciones' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Gravidez\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Gravidez' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Persona_Desaparecida\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Persona_Aparecio\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Persona_Aparecio' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Aparicion\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Con_Vida\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Con_Vida' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Expediente_MASC\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Expediente_MASC' + rowIndex)); }\n DisabledControl($(\"#\" + nameOfTable + \"Preferencia_Sexual\" + rowIndex), (\"true\" == \"true\"));\n if ('true' == 'true') { SetNotRequiredToControl($('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex)); }\n if ('true' == 'true') {\n $('#divAdicciones_de_Involucrado a').attr('disabled', 'disabled');\n $('#divAdicciones_de_Involucrado a').css(\"pointer-events\", \"none\");\n } else {\n $('#divAdicciones_de_Involucrado a').attr('disabled', '');\n $('#divAdicciones_de_Involucrado a').css(\"pointer-events\", \"all\");\n }\n if ('true' == 'true') {\n $('#divLugares_que_Frecuenta a').attr('disabled', 'disabled');\n $('#divLugares_que_Frecuenta a').css(\"pointer-events\", \"none\");\n } else {\n $('#divLugares_que_Frecuenta a').attr('disabled', '');\n $('#divLugares_que_Frecuenta a').css(\"pointer-events\", \"all\");\n }\n if ('true' == 'true') {\n $('#divDatos_Personales_Adicionales a').attr('disabled', 'disabled');\n $('#divDatos_Personales_Adicionales a').css(\"pointer-events\", \"none\");\n } else {\n $('#divDatos_Personales_Adicionales a').attr('disabled', '');\n $('#divDatos_Personales_Adicionales a').css(\"pointer-events\", \"all\");\n }\n if ('true' == 'true') {\n $('#divOtras_Identificaciones a').attr('disabled', 'disabled');\n $('#divOtras_Identificaciones a').css(\"pointer-events\", \"none\");\n } else {\n $('#divOtras_Identificaciones a').attr('disabled', '');\n $('#divOtras_Identificaciones a').css(\"pointer-events\", \"all\");\n }\n if ('true' == 'true') {\n $('#divOtros_Domicilios a').attr('disabled', 'disabled');\n $('#divOtros_Domicilios a').css(\"pointer-events\", \"none\");\n } else {\n $('#divOtros_Domicilios a').attr('disabled', '');\n $('#divOtros_Domicilios a').css(\"pointer-events\", \"all\");\n }\n } else {}\n\n }\n //BusinessRuleId:4375, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//BusinessRuleId:1857, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'New'){\n $('#divNombre_Completo').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo' + rowIndex));$('#divNombre_Completo_del_Tutor').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex)); SetNotRequiredToControl( $('#' + nameOfTable + 'Edad' + rowIndex));\n\n}\n//BusinessRuleId:1857, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:1857, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\n $('#divNombre_Completo').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo' + rowIndex));$('#divNombre_Completo_del_Tutor').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex)); SetNotRequiredToControl( $('#' + nameOfTable + 'Edad' + rowIndex));\n\n}\n//BusinessRuleId:1857, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4744, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'New'){\n SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud' + rowIndex));\n\n}\n//BusinessRuleId:4744, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4744, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\n SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud' + rowIndex));\n\n}\n//BusinessRuleId:4744, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4744, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Consult'){\n SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud' + rowIndex));\n\n}\n//BusinessRuleId:4744, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\n\n\n//BusinessRuleId:2182, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\nif( GetValueByControlType($('#' + nameOfTable + 'Persona_Moral' + rowIndex),nameOfTable,rowIndex)==TryParseInt('true', 'true') ) { $('#divQ_Q_R_O_').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex)); $('#divQ_Q_R_O_').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));} else { $('#divQ_Q_R_O_').css('display', 'block'); $('#divQ_Q_R_O_').css('display', 'block');}\n\n}\n//BusinessRuleId:2182, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:2182, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Consult'){\nif( GetValueByControlType($('#' + nameOfTable + 'Persona_Moral' + rowIndex),nameOfTable,rowIndex)==TryParseInt('true', 'true') ) { $('#divQ_Q_R_O_').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex)); $('#divQ_Q_R_O_').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));} else { $('#divQ_Q_R_O_').css('display', 'block'); $('#divQ_Q_R_O_').css('display', 'block');}\n\n}\n//BusinessRuleId:2182, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n\n\nif(operation == 'New' || operation == 'Update'){\n if( GetValueByControlType($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex),nameOfTable,rowIndex)==TryParseInt('true', 'true')) { \n $(\".div-titulo,#divMapa\").hide();\n } else {\n $(\".div-titulo,#divMapa\").show();\n }\n}\n\n\n\n//BusinessRuleId:4746, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'New'){\nif( GetValueByControlType($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex),nameOfTable,rowIndex)==TryParseInt('true', 'true') ) { $('#divNombre').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre' + rowIndex));$('#divApellido_Paterno').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno' + rowIndex));$('#divApellido_Materno').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); $('#divSexo').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));$('#divOcupacion').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion' + rowIndex));$('#divPais_de_Nacimiento').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));$('#divEstado_de_Involucrado').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));$('#divGravidez').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Gravidez' + rowIndex));} else {}\n\n}\n//BusinessRuleId:4746, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4746, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\nif( GetValueByControlType($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex),nameOfTable,rowIndex)==TryParseInt('true', 'true') ) { $('#divNombre').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre' + rowIndex));$('#divApellido_Paterno').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno' + rowIndex));$('#divApellido_Materno').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); $('#divSexo').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));$('#divOcupacion').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion' + rowIndex));$('#divPais_de_Nacimiento').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));$('#divEstado_de_Involucrado').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));$('#divGravidez').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Gravidez' + rowIndex));} else {}\n\n}\n//BusinessRuleId:4746, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4746, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Consult'){\nif( GetValueByControlType($('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex),nameOfTable,rowIndex)==TryParseInt('true', 'true') ) { $('#divNombre').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre' + rowIndex));$('#divApellido_Paterno').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno' + rowIndex));$('#divApellido_Materno').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex)); $('#divSexo').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));$('#divOcupacion').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion' + rowIndex));$('#divPais_de_Nacimiento').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));$('#divEstado_de_Involucrado').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));$('#divGravidez').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Gravidez' + rowIndex));} else {}\n\n}\n//BusinessRuleId:4746, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:3713, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'New'){\n $('#divOriginario_de').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de' + rowIndex));$('#divOriginario_de_T').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de_T' + rowIndex));\n\n\n}\n//BusinessRuleId:3713, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:3713, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\n $('#divOriginario_de').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de' + rowIndex));$('#divOriginario_de_T').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de_T' + rowIndex));\n\n\n}\n//BusinessRuleId:3713, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4111, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\nif( EvaluaQuery(\"SELECT canalizado FROM Detalle_de_Datos_Generales WHERE Clave = FLDD[lblClave]\",rowIndex, nameOfTable)==TryParseInt('1', '1') && TryParseInt(ReplaceGLOBAL('GLOBAL[idTablero]'), ReplaceGLOBAL('GLOBAL[idTablero]'))==TryParseInt('2', '2') ) { DisabledControl($(\"#\" + nameOfTable + \"Clave\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Clave' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nombre\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_de_Nacimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Edad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Edad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Sexo\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estado_Civil\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Identificacion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_de_Identificacion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Escolaridad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Ocupacion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Pais\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Pais' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Municipio\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Colonia\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calle\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calle' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Telefono\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Extension\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Extension' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Celular\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Celular' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Incapaz\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Incapaz' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nombre_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Nacimiento_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_de_Nacimiento_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Edad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Sexo_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estado_Civil_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Identificacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_de_Identificacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Escolaridad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Ocupacion_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Pais_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estado_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Municipio_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Localidad_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Colonia_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calle_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Telefono_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Extension_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Extension_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Celular_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Celular_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Correo_Electronico_del_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Compareciente\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Originario_de\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Titulo_del_Hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Narrativa_Breve_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Narrativa_Breve_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Prioridad_del_Hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Prioridad_del_Hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Fecha_del_Hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_del_Hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Hora_Aproximada_del_Hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Hora_Aproximada_del_Hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Pais_del_hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estado_del_Hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Municipio_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Colonia_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Codigo_Postal_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calle_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Entre_Calle_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Entre_Calle_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Y_calle_de_los_hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Exterior_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Interior_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Latitud_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Longitud_de_los_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_de_los_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_lugar_del_hecho\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_lugar_del_hecho' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Origen_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Origen_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Originario_de_T\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de_T' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Causa_de_Interrupcion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Datos_Insuficientes\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Causal\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Causal' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Actualizacion_de_Sobreseimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Se_Informaron_sobre_sus_Derechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Se_Informo_sobre_el_Procedimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Datos_Confidenciales\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Inimputabilidad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Y_Calle\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Y_Calle' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"CURP\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'CURP' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"RFC\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'RFC' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"CURP_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'CURP_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"RFC_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'RFC_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Poblacion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Referencia_de_Domicilio\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Situacion_de_Vulnerabilidad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Grupo_al_que_pertenece\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Etnia\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Etnia' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"No_de_Hijos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'No_de_Hijos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Religion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Religion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Servicio_Medico\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Servicio_Medico' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Especialidad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Especialidad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estudios_Superiores\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Idioma\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Idioma' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calidad_Migratoria\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estado_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Municipio_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Dialecto\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Dialecto' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estado_de_Involucrado\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Especifique\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Especifique' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Mental\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Fisica\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Sensorial\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Discapacidad_Psicosocial\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Poblacion_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Referencia_de_Domicilio_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Latitud_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Longitud_Tutor\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_Tutor' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Poblacion_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Referencia_Hechos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_Hechos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_identificacion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Descripcion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Descripcion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Numero_Telefonico\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Telefonico' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Redes_Sociales\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Redes_Sociales' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Observaciones\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Observaciones' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Lugar\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Folio_Adicciones\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Folio_Adicciones' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Documento_Extraviado\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Documento_Extraviado' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Documento_Extraviado\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Documento_Extraviado' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Modulo_Atencion_Inicial\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Q_Q_R_O_\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Es_victima\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Es_victima' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Municipio_Corporacion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Incompleto\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Incompleto' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Peso\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Peso' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estatura\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estatura' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Padecimiento_de_Enfermedad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_Cara\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_Cara' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Cejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Cejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Cantidad_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Implantacion_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Complexion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Complexion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Color_Piel\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Color_Piel' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Frente\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Frente' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Largo_de_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Color_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Color_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calvicie\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calvicie' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Color_Ojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Color_Ojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Ojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_Ojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_Ojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Anteojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Anteojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Nariz\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_Nariz\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_Nariz' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Labios\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Labios' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Boca\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Boca' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Grosor_de_Labios\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Menton\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Menton' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Menton\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_de_Menton' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Barba\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Barba' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_Orejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_Orejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_Orejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_Orejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_Lobulo\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Bigote\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Bigote' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Senas_Particulares' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Imagen_Tatuaje\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Situacion_Fisica\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Situacion_Fisica' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Otras_Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Persona_Moral\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Persona_Moral' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calidad_Juridica\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calidad_Juridica' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Razon_Social\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Razon_Social' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nombres2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nombres2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Apellido_Paterno2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Apellido_Materno2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nombre_Completo2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Sexo2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Nacionalidad2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Escolaridad2\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad2' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"ID_Estado_Institucion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'ID_Estado_Institucion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Expediente_MP\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Expediente_MP' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_de_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Coordenada_X\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Coordenada_X' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Coordenada_Y\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Coordenada_Y' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Gravidez\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Gravidez' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Persona_Desaparecida\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Persona_Desaparecida' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Persona_Aparecio\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Persona_Aparecio' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Fecha_de_Aparicion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_de_Aparicion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Con_Vida\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Con_Vida' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Expediente_MASC\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Expediente_MASC' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Preferencia_Sexual\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Preferencia_Sexual' + rowIndex));} DisabledControl($(\"#\" + nameOfTable + \"Pais_de_Nacimiento\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Nacimiento' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Es_victima\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Es_victima' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Incompleto\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Incompleto' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Gravidez\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Gravidez' + rowIndex));} DisabledControl($(\"#\" + nameOfTable + \"Peso\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Peso' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Estatura\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Estatura' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Padecimiento_de_Enfermedad\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Padecimiento_de_Enfermedad' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_Cara\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_Cara' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Cejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Cejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Cejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_de_Cejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Cantidad_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Cantidad_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Implantacion_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Implantacion_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Complexion\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Complexion' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Color_Piel\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Color_Piel' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Frente\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Frente' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Largo_de_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Largo_de_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Color_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Color_Cabello' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Calvicie\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Calvicie' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Color_Ojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Color_Ojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_de_Ojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_de_Ojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_Ojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_Ojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Anteojos\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Anteojos' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Nariz\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_de_Nariz' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_Nariz\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_Nariz' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Labios\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Labios' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Boca\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Boca' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Grosor_de_Labios\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Grosor_de_Labios' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Menton\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Menton' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Menton\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_de_Menton' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Barba\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Barba' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_Orejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_Orejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tamano_Orejas\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tamano_Orejas' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Tipo_Lobulo\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_Lobulo' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Bigote\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Bigote' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Senas_Particulares' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Imagen_Tatuaje\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Imagen_Tatuaje' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Situacion_Fisica\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Situacion_Fisica' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Otras_Senas_Particulares\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Otras_Senas_Particulares' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Forma_de_Cabello\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Forma_de_Cabello' + rowIndex));}} else {}\n\n\n}\n//BusinessRuleId:4111, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4712, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\nif( GetValueByControlType($('#' + nameOfTable + 'Con_Vida' + rowIndex),nameOfTable,rowIndex)==TryParseInt('2', '2') ) { $('#divEstado_de_Involucrado').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));} else { $('#divEstado_de_Involucrado').css('display', 'block');}\n\n\n}\n//BusinessRuleId:4712, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4712, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Consult'){\nif( GetValueByControlType($('#' + nameOfTable + 'Con_Vida' + rowIndex),nameOfTable,rowIndex)==TryParseInt('2', '2') ) { $('#divEstado_de_Involucrado').css('display', 'none'); SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));} else { $('#divEstado_de_Involucrado').css('display', 'block');}\n\n\n}\n//BusinessRuleId:4712, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:4714, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\nif( EvaluaQuery(\"select count(*) from Detalle_de_Relaciones r inner join Detalle_de_Datos_Generales dg on dg.Clave = r.Involucrado where \"\n+\" (dg.Es_victima = 1 or dg.Tipo_de_Compareciente = 2) and Involucrado = FLDD[lblClave]\",rowIndex, nameOfTable)==TryParseInt('1', '1') ) { DisabledControl($(\"#\" + nameOfTable + \"Tipo_de_Compareciente\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));}DisabledControl($(\"#\" + nameOfTable + \"Es_victima\" + rowIndex), (\"true\" == \"true\"));if ('true'=='true'){SetNotRequiredToControl( $('#' + nameOfTable + 'Es_victima' + rowIndex));}} else {}\n\n\n}\n//BusinessRuleId:4714, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:1911, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'New'){\n SetNotRequiredToControl( $('#' + nameOfTable + 'Clave' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Edad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Extension' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Celular' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Incapaz' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_de_Nacimiento_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Extension_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Celular_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Narrativa_Breve_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Prioridad_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Hora_Aproximada_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Entre_Calle_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_lugar_del_hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Origen_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de_T' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Causal' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Y_Calle' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'CURP' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'RFC' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'CURP_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'RFC_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Etnia' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'No_de_Hijos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Religion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Servicio_Medico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Especialidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Idioma' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Dialecto' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Especifique' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Descripcion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Telefonico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Redes_Sociales' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Observaciones' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Folio_Adicciones' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Documento_Extraviado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Documento_Extraviado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Es_victima' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Incompleto' + rowIndex));\n\n\n}\n//BusinessRuleId:1911, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:1911, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Update'){\n SetNotRequiredToControl( $('#' + nameOfTable + 'Clave' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Edad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Extension' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Celular' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Incapaz' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_de_Nacimiento_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Extension_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Celular_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Narrativa_Breve_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Prioridad_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Hora_Aproximada_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Entre_Calle_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_lugar_del_hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Origen_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de_T' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Causal' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Y_Calle' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'CURP' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'RFC' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'CURP_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'RFC_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Etnia' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'No_de_Hijos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Religion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Servicio_Medico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Especialidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Idioma' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Dialecto' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Especifique' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Descripcion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Telefonico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Redes_Sociales' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Observaciones' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Folio_Adicciones' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Documento_Extraviado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Documento_Extraviado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Es_victima' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Incompleto' + rowIndex));\n\n\n}\n//BusinessRuleId:1911, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//BusinessRuleId:1911, Attribute:0, Operation:Object, Event:SCREENOPENING\nif(operation == 'Consult'){\n SetNotRequiredToControl( $('#' + nameOfTable + 'Clave' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Edad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Extension' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Celular' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Incapaz' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Paterno_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Apellido_Materno_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nombre_Completo_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_de_Nacimiento_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Edad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Sexo_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_Civil_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Identificacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_de_Identificacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Nacionalidad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Escolaridad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Ocupacion_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Localidad_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Telefono_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Extension_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Celular_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Correo_Electronico_del_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Compareciente' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Titulo_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Narrativa_Breve_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Prioridad_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Fecha_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Hora_Aproximada_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_del_hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_del_Hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Colonia_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Codigo_Postal_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calle_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Entre_Calle_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Y_calle_de_los_hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Exterior_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Interior_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_de_los_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_lugar_del_hecho' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Pais_de_Origen_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Originario_de_T' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Causa_de_Interrupcion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Insuficientes' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Causal' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Actualizacion_de_Sobreseimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informaron_sobre_sus_Derechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Se_Informo_sobre_el_Procedimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Datos_Confidenciales' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Inimputabilidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Y_Calle' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'CURP' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'RFC' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'CURP_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'RFC_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Situacion_de_Vulnerabilidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Grupo_al_que_pertenece' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Etnia' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'No_de_Hijos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Religion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Servicio_Medico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Especialidad' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estudios_Superiores' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Idioma' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Calidad_Migratoria' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Nacimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_de_Nacimiento' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Dialecto' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Estado_de_Involucrado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Especifique' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Mental' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Fisica' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Sensorial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Discapacidad_Psicosocial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_de_Domicilio_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Latitud_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Longitud_Tutor' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Poblacion_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Referencia_Hechos' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_identificacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Descripcion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Numero_Telefonico' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Redes_Sociales' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Observaciones' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Lugar' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Folio_Adicciones' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Documento_Extraviado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Tipo_de_Documento_Extraviado' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Modulo_Atencion_Inicial' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Q_Q_R_O_' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Es_victima' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Municipio_Corporacion' + rowIndex));SetNotRequiredToControl( $('#' + nameOfTable + 'Incompleto' + rowIndex));\n\n\n}\n//BusinessRuleId:1911, Attribute:0, Operation:Object, Event:SCREENOPENING\n\n//NEWBUSINESSRULE_SCREENOPENING//\n}", "title": "" }, { "docid": "6841d2db331907db07696650deb29354", "score": "0.51611215", "text": "function ogoneSubscriptionFormBack() {\n displayStep();\n}", "title": "" }, { "docid": "c436a9b702c8304c4224c0f2ce4ef874", "score": "0.5152976", "text": "function respondToCancel(e){ \r\n var app = UiApp.getActiveApplication();\r\n app.getElementById('feedbacklabel').setVisible(false).setText(\"\");\r\n app.getElementById('nametextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('cont1nametextbox').setVisible(true).setText(\"\");\r\n app.getElementById('surnametextbox').setVisible(true).setText(\"\");\r\n app.getElementById('emailtextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('remailtextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('countrytextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('regiontextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('citytextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('sitetextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('logotextbox').setVisible(true).setValue(\"\");\r\n app.getElementById('abpanel').setVisible(false);\r\n \r\n var helpPanels = new Array(\"namehelppanel\", \"cont1namehelppanel\",\"surnamehelppanel\", \"emailhelppanel\", \"countryhelppanel\", \"regionhelppanel\", \"cityhelppanel\", \"sitehelppanel\", \"logohelppanel\"); \r\n for (var i = 0; i < helpPanels.length ; i++) { \r\n app.getElementById(helpPanels[i]).setVisible(false);\r\n }\r\nreturn app;\r\n}", "title": "" }, { "docid": "24b797502a04d175890d676e511fdee6", "score": "0.5150946", "text": "function validateOrganizer() {\n controller.showValidation = true;\n if (!controller.organizerForm.$valid || controller.organizersWebsiteFound ||\n controller.websiteError || controller.urlError || controller.nameError ||\n controller.addressError || controller.contactError) {\n controller.hasErrors = true;\n controller.disableSubmit = true;\n $scope.$broadcast('organizerAddressSubmit');\n $scope.$broadcast('organizerContactSubmit');\n return;\n }\n if (controller.isNew) {\n createNewOrganizer();\n }\n else {\n saveOrganizer();\n }\n }", "title": "" }, { "docid": "e429743359ed98e828c0d58cd661118a", "score": "0.51502585", "text": "function _validate() {\n // TODO\n}", "title": "" }, { "docid": "4fc9e93061c26c2aca6d51dc2f95ef91", "score": "0.51500356", "text": "function Start()\n {\n console.log(\"App Started...\");\n\n //implement functions\n loadHeader(); \n loadFooter();\n loadParagraphs(); \n \n //check if sucessfully form validated\n let formValidated =validateForm();\n if(formValidated)\n {\n console.log(\"successfully validated form\");\n }\n else\n {\n console.log(\"form not validated -does not exist\"); \n } \n \n }", "title": "" }, { "docid": "db61bd2f5bf424ac39c3592ed80c0888", "score": "0.514844", "text": "if (boolConnectionToMF) {\n this.view.errorMessage.isVisible = true;\n }", "title": "" }, { "docid": "d4c1612b64dda2721e243e6c7247b673", "score": "0.51481897", "text": "function completeUserSubmissionProcess() {\n\n event.stopImmediatePropagation();\n\n if ($('#userCommunicationInfoForm').validationEngine('validate')) {\n\n\n// var loader = $('#tabsContentsSection').loadImager();\n// $('#tabsContentsSection').loadImager('appendImage');\n\n if ($('#userGeneralInfoForm').val() === '1') {\n\n if ($('#userAddressInfoForm').val() === '1') {\n\n if ($('#userCommunicationInfoForm').val() === '1') {\n\n BootstrapDialog.show({\n title: window.lang.translate('Submission Process'),\n message: window.lang.translate('User information submission completed successfully. \\n\\\n You will be directed to the system main page. \\n\\\n An email sent to your submitted email address.\\n\\\n Please click on provided confirmation link to activate your account and login to the system.\\n\\\n '),\n type: BootstrapDialog.TYPE_SUCCESS,\n buttons: [{\n icon: 'glyphicon glyphicon-check',\n label: 'OK',\n cssClass: 'btn-success',\n action: function () {\n// $('#tabsContentsSection').loadImager('removeLoadImage');\n window.location.href =\n \"/ostim/sanalfabrika\";\n }\n }],\n closable: false\n });\n } else {\n BootstrapDialog.show({\n title: window.lang.translate('Submission Process'),\n message: window.lang.translate('Please fill user communication information first'),\n type: BootstrapDialog.TYPE_WARNING,\n closable: false,\n buttons: [{\n icon: 'glyphicon glyphicon-check',\n label: 'OK',\n cssClass: 'btn-warning',\n action: function () {\n// $('#tabsContentsSection').loadImager('removeLoadImage');\n $(\"html, body\").animate({scrollTop: 0}, \"slow\");\n event.preventDefault();\n }\n }]\n });\n }\n } else {\n BootstrapDialog.show({\n title: window.lang.translate('Submission Process'),\n message: window.lang.translate('Please fill user address information form first'),\n type: BootstrapDialog.TYPE_WARNING,\n closable: false,\n buttons: [{\n icon: 'glyphicon glyphicon-check',\n label: 'OK',\n cssClass: 'btn-warning',\n action: function () {\n// $('#tabsContentsSection').loadImager('removeLoadImage');\n window.location.href =\n \"/ostim/sanalfabrika/registration#userAddressInfoForm\";\n event.preventDefault();\n }\n }]\n });\n }\n } else {\n BootstrapDialog.show({\n title: window.lang.translate('Submission Process'),\n message: window.lang.translate('Please fill user general information form first'),\n type: BootstrapDialog.TYPE_WARNING,\n closable: false,\n buttons: [{\n icon: 'glyphicon glyphicon-check',\n label: 'OK',\n cssClass: 'btn-warning',\n action: function () {\n// $('#tabsContentsSection').loadImager('removeLoadImage');\n window.location.href =\n \"/ostim/sanalfabrika/registration#userGeneralInfoForm\";\n event.preventDefault();\n }\n }]\n });\n }\n }\n}", "title": "" }, { "docid": "ae76fb7a9e9f1ac76dc2b40e2e08b253", "score": "0.5147027", "text": "function validate () {}", "title": "" }, { "docid": "fe0bafc6f01ca3e24052b97054deda43", "score": "0.5146559", "text": "function validateCertEquiPgFieldGoFurther() \n{\nif(kony.net.isNetworkAvailable(constants.NETWORK_TYPE_ANY)){\n\tvar curFrm;\n\tcurFrm = kony.application.getCurrentForm();\n\tswitch(curFrm[\"id\"])\n\t{\n\t\tcase \"frmCertEquivalency1\":\n\t\tcase \"frmCertEquivalencyTab1\":\n\t\t if (curFrm.txtCertSubittedBy = undefined || curFrm.txtCertSubittedBy.text == \"\")\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectCertificateSubmitBy\"));\n\t\t gblErrWidgetRefId = curFrm.txtCertSubittedBy;\n\t\t return false;\n\t\t }\n\t\t else if (curFrm.dropdownStudyLevel.selectedKey == 0) \n\t\t {\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectStudyLevel\"));\n\t\t gblErrWidgetRefId = curFrm.dropdownStudyLevel;\n\t\t return false;\n\t\t }\n\t\t else if (curFrm.txtMajor = undefined || curFrm.txtMajor.text == \"\")\n\t\t {\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterMajor\"));\n\t\t gblErrWidgetRefId = curFrm.txtMajor.setFocus(true);\n\t\t return false;\n\t\t }\n\t\t //else if (curFrm.txtIssueBy = undefined || curFrm.txtIssueBy.text == \"\") \n\t\t else if (curFrm.rbimgPublic.src != \"checked.png\" && curFrm.rbimgprivate.src != \"checked.png\" ) \n\t\t {\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterIssueBy\"));\n\t\t gblErrWidgetRefId = curFrm.txtIssueBy;\n\t\t \t\treturn false;\n\t\t }\n\t\t else if (curFrm.dropdowncountryofexam.selectedKey == 0)\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblSelectCountry\"));\n\t\t gblErrWidgetRefId = curFrm.dropdowncountryofexam;\n\t\t return false;\n\t\t }\n\t\t else if (curFrm.rbimgmale.src != \"checked.png\" && curFrm.rbimgfemale.src != \"checked.png\" ) \n\t\t {\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectGender\"));\n\t\t gblErrWidgetRefId = curFrm.rbimgmale;\n\t\t \t\treturn false;\n\t\t }\n\t\t /*else if (curFrm.dropdownemirate.selectedKey == 0)\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblSelectEmirate\"));\n\t\t gblErrWidgetRefId = curFrm.dropdownemirate;\n\t\t return false;\n\t\t }*/\n\t\t else\n\t\t {\n\t\t \tif(gblDeviceInfo != \"tab\")\n\t\t \t{\n\t\t \t\tfrmCertEquivalency2.show();\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\tcase \"frmCertEquivalency2\":\n\t\t\tif (curFrm.cmbTypeOfStudy.selectedKey == 0)\n\t\t\t{\n\t\t\t\talertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectTypeStudy\"));\n\t\t\t\tgblErrWidgetRefId = curFrm.cmbxTypeOfStudy;\n\t\t\t\treturn false;\n\t\t }\n\t\t else if (curFrm.cmbTypeOfStudy.selectedKey == 6 && curFrm.txtBoxOthers.text == \"\")\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseTypeOfStudyDetailsOthers\"));\n\t\t\t\tgblErrWidgetRefId = curFrm.txtBoxOthers;\n\t\t return false;\n\t\t }\n\t\t\telse if (curFrm.imgSelf.src != \"checked.png\" && (curFrm.txtSponsoredBy = undefined || curFrm.txtSponsoredBy.text == \"\")) \n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterSponserBy\"));\n \tgblErrWidgetRefId = curFrm.txtSponsoredBy;\n\t\t return false;\n\t\t }\n\t\t\telse if (curFrm.txtNoofyears = undefined || curFrm.txtNoofyears.text == \"\" || (kony.os.toNumber(curFrm.txtNoofyears))==0)\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterNoOfYears\"));\n \t\tgblErrWidgetRefId = curFrm.txtNoofyears;\n\t\t return false;\n\t\t }\n\t\t\t/*else if (curFrm.txtNoofTerms = undefined || curFrm.txtNoofTerms.text == \"\")\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterNoofTerms\"));\n\t\t\t\tgblErrWidgetRefId = curFrm.txtNoofTerms;\n\t\t return false;\n\t\t }*/\n\t\t\telse if (curFrm.txtStartYear = undefined || curFrm.txtStartYear.text == \"\")\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterStartStudyDate\"));\n\t\t \t\tgblErrWidgetRefId = curFrm.txtStartYear;\n\t\t\t\treturn false;\n\t\t }\n\t\t\telse if (!validateYear(curFrm.txtStartYear.text, \"please enter valid year\"))\n\t\t\t{\n\t\t\t\talertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterValidYearVaule\"));\n\t\t \t\tgblErrWidgetRefId = curFrm.txtStartYear;\n\t\t return false;\n\t\t }\n\t\t\telse if (curFrm.txtGraduationYear = undefined || curFrm.txtGraduationYear.text == \"\")\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterDateOfGraduation\"));\n \t\t\tgblErrWidgetRefId = curFrm.txtGraduationYear;\n\t\t return false;\n\t\t }\n\t\t\telse if (!validateYear(curFrm.txtGraduationYear.text, \"please enter valid year\"))\n\t\t\t{\n\t\t\t\talertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterValidYearVaule\"));\n \t\t\tgblErrWidgetRefId = curFrm.txtGraduationYear;\n\t\t\t\treturn false;\n\t\t }\n\t\t\telse if (curFrm.txtStartYear.text >= curFrm.txtGraduationYear.text)\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseEnterStartYear\"));\n \t\tgblErrWidgetRefId = curFrm.txtStartYear;\n\t\t return false;\n\t\t }\n\t\t\telse if (curFrm.dropdownCountryWhereExam.selectedKey == 0)\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectCountryExam\"));\n \t\tgblErrWidgetRefId = curFrm.dropdownCountryWhereExam;\n\t\t return false;\n\t\t }\n\t\t\telse if (curFrm.dropdownpaymentmethodtype.selectedKey == \"SPMT\")\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectPaymentMethod\"));\n \t\tgblErrWidgetRefId = curFrm.dropdownpaymentmethodtype;\n\t\t return false;\n\t\t }\n\t\t\telse if (curFrm.dropdownpaymentcardtype.selectedKey == 0)\n\t\t\t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleaseSelectPaymentMethod\"));\n \t\tgblErrWidgetRefId = curFrm.dropdownpaymentcardtype;\n\t\t return false;\n\t\t }\n\t\t else\n\t\t {\n\t\t \tif(gblDeviceInfo != \"tab\")\n\t\t \t\tfrmCertEquivalency3.show();\n\t\t \telse\n\t\t \t\tfrmCertEquivalencyTab2.show();\n\t\t }\n\t \tbreak;\n\t case \"frmCertEquivalency3\":\n\t case \"frmCertEquivalencyTab2\":\n\t \t//frmCertEquivalency2.segment21727613372409676.data.length ==;\n\t \t/*if(frmCertEquivalency2.segment21727613372409676.data == null || frmCertEquivalency2.segment21727613372409676.data == \"\" || frmCertEquivalency2.segment21727613372409676.data.length <= 0)\n\t \t{\n\t\t alertDialog(\"please add Transfer Credit\");\n\t\t return false;\n\t \t}\n\t \telse*/\n\t \tif(deviceName==\"android\")\n\t \t{\n\t\t \tif(curFrm.txtUniversityOrCollege.text != \"\" || curFrm.dropdownTransfCountry.selectedKey != \"0\" || curFrm.txtTransfNoofyears.text != \"\")\n\t\t\t {\n\t\t\t \talertDialog(kony.i18n.getLocalizedString(\"lblPressAdd\"));\n\t\t\t \treturn false;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tif(gblDeviceInfo != \"tab\")\n\t\t\t \t{\n\t\t\t \t\tfrmCertEquivalency4.show();\n\t\t\t \t\tbreak;\n\t\t\t \t}\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t \tif(gblDeviceInfo != \"tab\")\n\t\t \t{\n\t\t \t\tfrmCertEquivalency4.show();\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t case \"frmCertEquivalency4\":\n\t \t /*if(curFrm.txtSchoolCollegeUniv.text != \"\" || curFrm.dropdownTransfCountry.selectedKey != \"0\" || curFrm.txtCertificate.text != \"\" || curFrm.dropdownTransfCountry.comboboxPreCertCountry != \"0\" || curFrm.txtPeriodFrom.text != \"\" || curFrm.txtPeriodTo.text != \"\" )\n\t\t {\n\t\t \talertDialog(\"Please Press Add\");\n\t\t \treturn false;\n\t\t }*/\n\t\t if(curFrm.dropdownlevel.selectedKey != \"0\"||curFrm.txtSchoolCollegeUniv.text!=\"\"||curFrm.txtCertificate.text!=\"\"||curFrm.comboboxPreCertCountry.selectedKey != \"0\"||curFrm.txtPeriodFrom.text!=\"\"||curFrm.txtPeriodTo.text!=\"\")\n\t \t{\n\t \t\talertDialog(kony.i18n.getLocalizedString(\"lblPressAdd\"));\n\t\t \treturn false;\n\t \t}\n\t \telse if(curFrm.segPreviousCertificate.data == null || curFrm.segPreviousCertificate.data == \"\" || curFrm.segPreviousCertificate.data.length <= 0 || isOld==true)\n\t \t{\n\t\t alertDialog(kony.i18n.getLocalizedString(\"lblPleasePreCertDet\"));\n\t\t return false;\n\t \t}\n\t\t else\n\t\t {\n\t\t \tif(gblDeviceInfo != \"tab\")\n\t\t \t{\n\t\t \t\tfrmCerEquivalencyAttach.show();\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t case \"frmCerEquivalencyAttach\":\n\t\t if(gvCertEQuiReqDoc.length==0){\n\t\t \tgblNoOfDocs = \"1\";\n\t\t \tinvokeCertEquiWs();\n\t\t }else{\n\t\t //kony.print(\"---\"+curFrm.segAttachment.data.length+\"---\"+gvCertEQuiReqDoc.length);\n\t\t \t if(curFrm.segAttachment.data == null || curFrm.segAttachment.data == \"\" || curFrm.segAttachment.data.length < gvCertEQuiReqDoc.length)\n\t\t \t{\n\t\t\t alertDialog(kony.i18n.getLocalizedString(\"lblAddCert\"));\n\t\t\t return false;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\tgblNoOfDocs = curFrm.segAttachment.data.length;\n\t\t \t\tinvokeCertEquiWs();\n\t \t\t}\n\t\t }\n\t \t//break;\n\t}\n}else{\n\t\talert(kony.i18n.getLocalizedString(\"lblNetworkMsg\"));\n\t}\n}", "title": "" }, { "docid": "ddfe47b0369ec98e964e3d05259fae3e", "score": "0.5141585", "text": "function feedbackDismissed()\n {\n \topenPage('root');\n }", "title": "" }, { "docid": "e8e3c40dec8d8160578637b947d9f819", "score": "0.5140546", "text": "function validate() {\n\n // Invalid form - exectued only if form is not valid, prevents any further action until fixed.\n function validation(inputName) {\n if (inputName.value === '' || undefined) {\n inputName.style.backgroundColor = 'coral';\n formValid = false;\n setTimeout(function () {\n inputName.style.backgroundColor = 'white';\n }, 2000)\n }\n }\n\n // Executing 'validation' function on the inputs.\n validation(byID('titleInput'));\n validation(byID('messageInput'));\n}", "title": "" }, { "docid": "c8e23d828fd9ffe239ac78910743f8f2", "score": "0.51355976", "text": "function invalidBilling(){\r\n\t app.getForm('billing').object.fulfilled.value = false;\r\n\t app.getView().render('util/empty');\r\n}", "title": "" }, { "docid": "320edffbf7dca09ae6884359d2c445d7", "score": "0.51352346", "text": "function closeValidateModal() {\n modalbg.style.display = \"block\";\n let urlPart = testFormDatas(currentUrl);\n if (urlPart) {\n window.location.replace(\"https://nicolasduquesne2.github.io/Nicolas_duquesne_4_20092021/\");\n }\n}", "title": "" }, { "docid": "bdbf30ee58ecc5b2f54456168c76cfb9", "score": "0.51343244", "text": "function ValidateCompanyContactsMandatoryControls()\n {\n var ErrGlobalShtMsg='Company Contacts Add Fail.'; \n\t //Setting up Short Message.\n var ShortMessage=ErrGlobalShtMsg;\n \n //Setting up Long Message.\n var LongMessage=\"\";\n \n //Validating ClientContactName against empty.\n if(true==IstxtEmpty('txtCompanyContactName'))\n {\n if(\"\"==LongMessage)\n { \n LongMessage=ErrGlobal14;\n }\n else\n {\n LongMessage=LongMessage + '\\n' + ErrGlobal14;\n }\n }\n \n //Validating Role against empty.\n if(false==IsddlSelected('ddlCompanyContactsRole'))\n {\n if(\"\"==LongMessage)\n {\n LongMessage=ErrGlobal15;\n }\n else\n {\n LongMessage=LongMessage + '\\n' + ErrGlobal15;\n }\n }\n \n //Validating ClientContacts Email against Empty.\n if(true==IstxtEmpty('txtCompanyContactsEmail'))\n {\n if(\"\"==LongMessage)\n {\n LongMessage=ErrGlobal16;\n }\n // else if(!IsEmail(document.all('txtCompanyContactsEmail').value))\n // {\n\t\t\t\t//if(\"\"==LongMessage)\n\t\t\t\t// {\n\t\t\t\t// LongMessage=\"Please Enter Valid Email.\";\n\t\t\t\t// }\n\t\t\t\t// else\n\t\t\t\t // {\n\t\t\t\t// LongMessage=LongMessage + '\\n' + LongMessage;\n\t\t\t\t// }\n // }\n else\n {\n LongMessage=LongMessage + '\\n' + ErrGlobal16;\n }\n }\n if(true==IstxtEmpty('txtCompanyContactsPhone'))\n {\n\t\t\t\tif(\"\"==LongMessage)\n\t\t\t\t{\n\t\t\t\tLongMessage=ErrGlobal17;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\tLongMessage=LongMessage + '\\n' + ErrGlobal17;\n\t\t\t\t}\n }\n \n //If all the Mandatories are filled then return true.\n if(\"\"==LongMessage)\n {\n return true;\n }\n //Else set the Error Message.\n else\n\t\t {\n\t\t //set error message on toppage\n\t\t\t SetErrorMessage(ShortMessage,LongMessage);\t\t\t\n\t\t\t //validation failure\n\t\t\t return false;\n\t\t }\t\t\n }", "title": "" }, { "docid": "4accb417b022f9306e2002c28105b64c", "score": "0.5133781", "text": "checkInteractValidity() {\n if (Phaser.Geom.Rectangle.ContainsPoint(this.winnerRoom_top_mid_info, this.winnerRoom_character_north)) {\n\n\n } else if (Phaser.Geom.Rectangle.ContainsPoint(this.winnerRoom_bot_left_info, this.winnerRoom_character_north)) {\n\n }\n\telse if (Phaser.Geom.Rectangle.ContainsPoint(this.winnerRoom_top_right_info, this.winnerRoom_character_north)) {\n\n\n }\n else {\n this.hideActivities();\n this.winnerRoom_E_KeyImg.alpha = 0.0;\n this.checkActivityOpened(false,false,false,false,false,false);\n }\n }", "title": "" }, { "docid": "ed2ff8ed57c55ee1a509ca5cb716ff89", "score": "0.5131856", "text": "function missingB() {\n if ($firstInput.val() !== \"\" && $lastInput.val() !== \"\" &&\n $titleInput.val() !== \"\" && $cityInput.val() !== \"\" && \n $stateInput.val() !== \"\" && $publisherInput.val() !== \"\" &&\n $yearInput.val() !== \"\") { \n $('[required]').removeClass(\"red\");\n $(\"#msg\").css(\"visibility\", \"hidden\");\n } else {\n $('[required]').addClass(\"red\");\n $(\"#msg\").css(\"visibility\", \"visible\");\n e.preventDefault(); \n } \n }", "title": "" }, { "docid": "fc6b703cce17b0dee9ce64c6408c2ab1", "score": "0.5129916", "text": "function afterRender()/*:void*/ {\n com.coremedia.cms.editor.sdk.components.StudioDialog.prototype.afterRender.call(this);\n if (!this.discardCallback) {\n this.getDiscardButton$mY08().hide();\n }\n }", "title": "" } ]
c2dd5611f7c25da280f4df024da7afe6
B O O K R I D E
[ { "docid": "67c83b68cf306a10dc4c0ca64d842c33", "score": "0.0", "text": "function bookmyride(){\n checkConnection();\n app.router.navigate('/ridehistory/');\n //var sess_city = window.localStorage.getItem(\"session_city\");\n var sess_cust = window.localStorage.getItem(\"session_custid\");\n var sess_mobilenum = window.localStorage.getItem(\"session_mobilenum\");\n var bookRideForm=$(\".bookRide\").serialize();\n //console.log(bookRideForm);\n var city = $(\"#city\").val();\n\n var postdata=bookRideForm+'&city='+city+'&sess_cust='+sess_cust+'&sess_mobilenum='+sess_mobilenum;\n //console.log(postdata);\n //var stringify=JSON.stringify(postdata);\n //console.log(stringify);\n var url = 'http://128.199.226.85/mobileapp_celcabs/appcontroller/bookMyRide';\n $.ajax({\n 'type':'POST', \n 'url':url,\n //'dataType':'json',\n 'data':postdata,\n //'data':{'city':city,'sess_cust':sess_cust,'sess_mobilenum':sess_mobilenum},\n success:function(data){\n //alert(data);\n //console.log(data+\"::\"); \n if(data=='inserted'){\n /*var ridebooktoastTop = app.toast.create({\n text: 'Ride booked successfully.',\n position: 'top',\n closeTimeout: 4000,\n closeButton: true\n });*/\n $('#bookRide')[0].reset();\n //ridebooktoastTop.open();\n app.dialog.alert(\"Ride booked successfully\",function (){\n app.router.navigate('/ridehistory/');\n });\n }\n }\n });\n}", "title": "" } ]
[ { "docid": "4a3bdcfeb633cc2e352f95502dd2a435", "score": "0.5839918", "text": "function EOzMCEG2kDyWbSPJIICEpA(){}", "title": "" }, { "docid": "e48e4b7a3aa71df35c483ced1e452129", "score": "0.58279437", "text": "function _2XEbHcHe2jmPYfmsOJUDbA(){}", "title": "" }, { "docid": "e7c504f5acc4edb0f4dc2b31790fa48c", "score": "0.5826812", "text": "function e(B,e,t,n){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[t][0]:r[t][1]}", "title": "" }, { "docid": "f7c125dd3c87a8f1e8c5d1ca2ff4e1aa", "score": "0.5805049", "text": "function mSRQAu7ItjugQsBXE87Mrw() {}", "title": "" }, { "docid": "8195319fed9d2e7d6ddcf4adea2ce514", "score": "0.5743749", "text": "function e(B,e,t,n){switch(t){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return B+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return B+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return B+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return B+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return B+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return B+(e?\" жил\":\" жилийн\");default:return B}}", "title": "" }, { "docid": "41e8e093dfaa47bf4b8c67c2ae78c807", "score": "0.5724736", "text": "function ixo1021548() { return 'veXOb'; }", "title": "" }, { "docid": "8a9a9cd8ea62f517c88c754308eeda4a", "score": "0.5721321", "text": "function lI9DNjWQqTynu2ANdpNw_bA() {}", "title": "" }, { "docid": "a50302dba602669b846804da04cc8aad", "score": "0.56344134", "text": "function nw6PUrLXLjqiWJDOBAtITA() {}", "title": "" }, { "docid": "f3564911b2c761dabb4284a6a582985c", "score": "0.5608946", "text": "function e(t,e,o,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[o][0]:i[o][1]}", "title": "" }, { "docid": "cc40508e414cd5b9a616a005574d90ab", "score": "0.5598776", "text": "function _5JLIsfM2BDWu5if6PVH9Mw() {}", "title": "" }, { "docid": "f11a772a80e81ebdf7857849f4a78c39", "score": "0.5595752", "text": "function e(B,e,t,n){var r={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[B+\" sekondamni\",B+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[B+\" mintamni\",B+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[B+\" voramni\",B+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[B+\" disamni\",B+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[B+\" mhoineamni\",B+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[B+\" vorsamni\",B+\" vorsam\"]};return n?r[t][0]:r[t][1]}", "title": "" }, { "docid": "a356c935e6ffd623f6366635210d282c", "score": "0.55897987", "text": "static Hr(t, e) {\n return rs(t.ro, e.ro) || ut.W(t.key, e.key);\n }", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "3616e45c17a8d6bb1df29f747780dd28", "score": "0.5572086", "text": "function e(t,e,n,r){var i={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?i[n][0]:i[n][1]}", "title": "" }, { "docid": "d533edd73b6a6a73d431be319bf7697a", "score": "0.55663604", "text": "function e(t,e,r,n){var a={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?a[r][0]:a[r][1]}", "title": "" }, { "docid": "6f6bcd0d5d8c8260a469ff32c2000718", "score": "0.5525137", "text": "function B_beH2IPB1j_axZyufu9WU8w(){}", "title": "" }, { "docid": "9b457cec6da10133f41cb04cd55f46a4", "score": "0.55248326", "text": "function _8SzARJV9njS10hoe_bNfgMg() {}", "title": "" }, { "docid": "1bd8553bb971e28052fa9fec88b59f9c", "score": "0.5519403", "text": "function amr527176() { return 'e ='; }", "title": "" }, { "docid": "35eeb3b793df0dd00695cbc38a5cc3c4", "score": "0.55165505", "text": "function e(B,e,t,n){var r={s:[\"viensas secunds\",\"'iensas secunds\"],ss:[B+\" secunds\",B+\" secunds\"],m:[\"'n míut\",\"'iens míut\"],mm:[B+\" míuts\",B+\" míuts\"],h:[\"'n þora\",\"'iensa þora\"],hh:[B+\" þoras\",B+\" þoras\"],d:[\"'n ziua\",\"'iensa ziua\"],dd:[B+\" ziuas\",B+\" ziuas\"],M:[\"'n mes\",\"'iens mes\"],MM:[B+\" mesen\",B+\" mesen\"],y:[\"'n ar\",\"'iens ar\"],yy:[B+\" ars\",B+\" ars\"]};return n?r[t][0]:e?r[t][0]:r[t][1]}", "title": "" }, { "docid": "7a41ba8a3291e4afb9a4bae8ff5535e3", "score": "0.55116844", "text": "function e(t,e,n,r){var o={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?o[n][0]:o[n][1]}", "title": "" }, { "docid": "9f4f6f36652f34541517e8bb317956b6", "score": "0.5499533", "text": "function EBB6YpS42zKw0RTPI65LPQ() {}", "title": "" }, { "docid": "77c308d0c7c9dce3aebc021c277bdc52", "score": "0.54970974", "text": "function _82pwGb6BWzOVYZGortTaJw() {}", "title": "" }, { "docid": "41e6bee41bc9b76ffb2a26465cd21d09", "score": "0.54823136", "text": "function e(t,e,n,r){var a={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?a[n][0]:a[n][1]}", "title": "" }, { "docid": "41e6bee41bc9b76ffb2a26465cd21d09", "score": "0.54823136", "text": "function e(t,e,n,r){var a={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?a[n][0]:a[n][1]}", "title": "" }, { "docid": "9a11644cac2df92ff995dc05dbe9f4f5", "score": "0.5480604", "text": "function WwLsf9svtT_acggkuTIOTEA() {}", "title": "" }, { "docid": "da1230fa7c2bad1b4695564aca8641c2", "score": "0.54669297", "text": "function e(t,e,o,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[o][0]:i[o][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "8e8dc0a2504ac24b7b2821812cc54393", "score": "0.54569787", "text": "function e(t,e,n,i){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "972a2950bbd7ae3aade75bbafffc847a", "score": "0.5441868", "text": "function e(n,e,t,r){var a={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?a[t][0]:a[t][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9f69a8e172305f5ea8233301d0a82895", "score": "0.5433514", "text": "function e(t,e,n,r){var i={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "9a9fbf05450dff5c5ab54e20d63c3a0d", "score": "0.5429187", "text": "function e(t,e,i,n){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[i][0]:r[i][1]}", "title": "" }, { "docid": "9a9fbf05450dff5c5ab54e20d63c3a0d", "score": "0.5429187", "text": "function e(t,e,i,n){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[i][0]:r[i][1]}", "title": "" }, { "docid": "af82adedbe2871bdbca2742a943f577e", "score": "0.5425397", "text": "function amr648284() { return 'tch '; }", "title": "" }, { "docid": "162e79fcd6af303358ecc6e8077cd9ac", "score": "0.5424955", "text": "function e(t,e,a,n){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[a][0]:r[a][1]}", "title": "" }, { "docid": "58c897884dd425e7d8b69a1591ec078b", "score": "0.542297", "text": "function e(t,e,n,r){var a={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "58c897884dd425e7d8b69a1591ec078b", "score": "0.542297", "text": "function e(t,e,n,r){var a={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "dd9f0ee428963a5392ab8604e629004b", "score": "0.5422588", "text": "function e(t,e,n,a){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title": "" }, { "docid": "4ec26450e9f05a9de0cfb427da070024", "score": "0.5417175", "text": "function e(n,e,t,a){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[t][0]:r[t][1]}", "title": "" }, { "docid": "90062226ffd7b6cd01dec7a4097300a0", "score": "0.5406982", "text": "function ixo309560() { return 'ect('; }", "title": "" }, { "docid": "19a8783d9eb3b0c9ad942a0577d2aa67", "score": "0.5405018", "text": "function Kr(e,t,n,r){var a={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return t?a[n][0]:a[n][1]}", "title": "" }, { "docid": "10f4afb80d955af0b4a0f7690ea4c94b", "score": "0.53949726", "text": "function _5Ra3VTLNPzq7ojEKUXMbvA() {}", "title": "" }, { "docid": "0e52d807ff46a81db771ef99dfbb5520", "score": "0.53919315", "text": "function e(t,e,r,n){var a={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return n?a[r][0]:a[r][1]}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "f5e4f52e616a15325891d76e64e4e82b", "score": "0.5390936", "text": "function e(t,e,n,r){switch(n){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "eb5ff40aa06c0ffd74a032e979761e3f", "score": "0.53833985", "text": "function e(B,e,t,n){var r={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[B+\" Tage\",B+\" Tagen\"],w:[\"eine Woche\",\"einer Woche\"],M:[\"ein Monat\",\"einem Monat\"],MM:[B+\" Monate\",B+\" Monaten\"],y:[\"ein Jahr\",\"einem Jahr\"],yy:[B+\" Jahre\",B+\" Jahren\"]};return e?r[t][0]:r[t][1]}", "title": "" }, { "docid": "eb5ff40aa06c0ffd74a032e979761e3f", "score": "0.53833985", "text": "function e(B,e,t,n){var r={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[B+\" Tage\",B+\" Tagen\"],w:[\"eine Woche\",\"einer Woche\"],M:[\"ein Monat\",\"einem Monat\"],MM:[B+\" Monate\",B+\" Monaten\"],y:[\"ein Jahr\",\"einem Jahr\"],yy:[B+\" Jahre\",B+\" Jahren\"]};return e?r[t][0]:r[t][1]}", "title": "" }, { "docid": "eb5ff40aa06c0ffd74a032e979761e3f", "score": "0.53833985", "text": "function e(B,e,t,n){var r={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[B+\" Tage\",B+\" Tagen\"],w:[\"eine Woche\",\"einer Woche\"],M:[\"ein Monat\",\"einem Monat\"],MM:[B+\" Monate\",B+\" Monaten\"],y:[\"ein Jahr\",\"einem Jahr\"],yy:[B+\" Jahre\",B+\" Jahren\"]};return e?r[t][0]:r[t][1]}", "title": "" }, { "docid": "30f737f85ebb6af1bbc7db78ad40c1e7", "score": "0.53789955", "text": "function IooF83evvDe5wVUXXK_a_bTw() {}", "title": "" }, { "docid": "fd9a089926f5f1ca1db3a09c0329c538", "score": "0.5376845", "text": "function e(t,e,n,r){var o={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[t+\" sekondamni\",t+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[t+\" mintamni\",t+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[t+\" voramni\",t+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[t+\" disamni\",t+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[t+\" mhoineamni\",t+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[t+\" vorsamni\",t+\" vorsam\"]};return r?o[n][0]:o[n][1]}", "title": "" }, { "docid": "b2356342bcf96de21fc136215daeee5d", "score": "0.5375253", "text": "function e(n,e,t,r){var a={s:[\"thoddea sekondamni\",\"thodde sekond\"],ss:[n+\" sekondamni\",n+\" sekond\"],m:[\"eka mintan\",\"ek minut\"],mm:[n+\" mintamni\",n+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[n+\" voramni\",n+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[n+\" disamni\",n+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[n+\" mhoineamni\",n+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[n+\" vorsamni\",n+\" vorsam\"]};return r?a[t][0]:a[t][1]}", "title": "" }, { "docid": "1ac507c5d6aac7c114c1a979ee26340d", "score": "0.53751546", "text": "function __axO4V4GhxjCIJCmJ0hzrQQ() {}", "title": "" }, { "docid": "bd9b2612a6eee81ae9d0b4932e8bfd24", "score": "0.53741765", "text": "function He(e,t,r,o){switch(r){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "4f9b56f8a23a5ad1a0d18bce5dcf6e66", "score": "0.53732854", "text": "static key(t, e, n) {\n return [ t, os(e), n ];\n }", "title": "" }, { "docid": "61f5e5c81a1700adce57543d6b134fdd", "score": "0.5361222", "text": "function nEFJTGszhDC20jLeAKfEFQ() {}", "title": "" }, { "docid": "ecbf91e4896fd5b64db55642b924786d", "score": "0.53553593", "text": "function ilP8cu7JYzamTa6vdby6Sw() {}", "title": "" }, { "docid": "ac8131ecf3973a5feed90fbccddec58e", "score": "0.535464", "text": "function e(t,e,o,r){switch(o){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return t+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return t+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return t+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return t+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return t+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return t+(e?\" жил\":\" жилийн\");default:return t}}", "title": "" }, { "docid": "7a34a064d689b473cfe779060da07b29", "score": "0.5354561", "text": "function e(n,e,t,r){switch(t){case\"s\":return e?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return n+(e?\" секунд\":\" секундын\");case\"m\":case\"mm\":return n+(e?\" минут\":\" минутын\");case\"h\":case\"hh\":return n+(e?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return n+(e?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return n+(e?\" сар\":\" сарын\");case\"y\":case\"yy\":return n+(e?\" жил\":\" жилийн\");default:return n}}", "title": "" } ]
6aafe999e6610f9d08d40f9278f51025
Game Functionality & Logic
[ { "docid": "62132fe7e0bea34c5abfc8f5d24a32ed", "score": "0.0", "text": "function genAnswer()\r\n\t\t\t{\r\n\t\t\t\tcomAnswer = Math.floor(Math.random() * Math.floor(diffRange));\r\n\t\t\t\treturn comAnswer;\r\n\t\t\t}", "title": "" } ]
[ { "docid": "80ed6cbe2645f38043a430c0e6b621aa", "score": "0.7437908", "text": "function game() {\r\n dessinerSerpent();\r\n dessinerPomme();\r\n detectionCollition();\r\n verifMangerPomme();\r\n gestionVieSerpent();\r\n gestionAffichageBonus();\r\n }", "title": "" }, { "docid": "11f81cdd97fe12f94250020b70f8da10", "score": "0.72720253", "text": "function game() {\t\n\t\t//console.log(\"in game\");\n\t\tdrawGame();\t\t//Game drawn\n\t\t//COLLISION CHECK\n\t\tvar ifCollision = collisionCheck(p, currentCont);\t\t//returns wither item-object or null\t\n\t\t//console.log(ifCollision);\n\t\t// if (ifCollision !== null) {\t\t\t//if collision\n\t\t// \tconsole.log(\"animation false\");\n\t\t// \tanimationState = false;\n\t\t// }\n\t\t// if no collision or a current mission on\n\t\tif (ifCollision === null || currentMission !== null) {\t\t//if this loop is not entered, game (map-view) pauses\n\t\t\trequestAnimationFrame(game);\n\t\t}\n\n\t\tgameState(ifCollision);\n\t}", "title": "" }, { "docid": "8e6190876b32f18967c4daadc1c5ec83", "score": "0.719918", "text": "function game() {\n aboutMe();\n isMyDogs();\n citiesLived();\n}", "title": "" }, { "docid": "c346364159a8468c231ab484ce420430", "score": "0.71682614", "text": "function game(){\n\tupdate();\n\trender();\n}", "title": "" }, { "docid": "c346364159a8468c231ab484ce420430", "score": "0.71682614", "text": "function game(){\n\tupdate();\n\trender();\n}", "title": "" }, { "docid": "a4d9819364b1212f37c51de59092dbee", "score": "0.71320426", "text": "function game () {\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n evaluation();\n\n}", "title": "" }, { "docid": "74e52c02f332eb0ddb0ab985326854ee", "score": "0.709773", "text": "function setupGame() {\r\n\r\n}", "title": "" }, { "docid": "ed402936ba1dc7e552ee0da8560abd0a", "score": "0.7051887", "text": "function gameLogicUpdate() {\n scoreUpdate();\n handlePipe();\n checkForWin();\n}", "title": "" }, { "docid": "d13505a23276c92e827400a23224ae80", "score": "0.7050106", "text": "function game() {\n \n if (play) {\n //clears canvas\n ctx.fillStyle = \"#000\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n //check if powerup already on screen - DONE\n //if not have a random chance for a power up to appear - DONE\n //if power up appears randomly selec from powerups dictionary - DONE\n // control hit test and moving of power up\n //activate power up\n // after power up finished reset power up on screen to false\n //server sending\n\n paddles[0].draw(ctx);\n paddles[1].draw(ctx);\n hud.draw(ctx);\n\n if (powerup !== null) {\n socket.emit(\"powerUp\", powerup);\n powerupOnScreen = true;\n powerup.move();\n powerup.draw(ctx);\n }\n\n //p1 controls game logic\n if (player === 1) {\n if (frame % 2 === 0) {\n socket.emit(\"balls\", balls);\n }\n //power ups controll goes here\n\n if (!powerupOnScreen && frame % 2 === 0) {\n var random = Math.floor((Math.random() * 200) + 1);\n //console.log(random);\n if (random === 1) {\n var powerUpRandom = Math.floor(Math.random() * 2) + 1;\n if(powerUpRandom === 1){\n powerup = new MultiBall(canvas.width / 2, canvas.height / 2, balls);\n powerupType = \"M\";\n console.log(\"MultiBall\"); \n }else{\n powerup = new FastBall(canvas.width / 2, canvas.height / 2, balls);\n powerupType = \"F\";\n console.log(\"FastBall\");\n }\n }\n }\n \n //iterate across all balls in the game frame\n for (var i = 0; i < balls.length; ++i) {\n \n if(powerupOnScreen && powerup != null){\n if(powerup.hitTest(balls[i].position.x, balls[i].position.y)){\n if(powerupType === \"M\"){\n powerup = null;\n makeBalls(5, balls[i].position.x, balls[i].position.y);\n }else{\n powerup = null;\n powerupOnScreen = false;\n balls[i].increaseXspeed();\n balls[i].increaseXspeed();\n balls[i].increaseXspeed();\n }\n \n }\n }\n\n //perform hitTest on both paddles \n for (var paddleNum = 0; paddleNum < 2; ++paddleNum) {\n ballX = balls[i].position.x;\n ballY = balls[i].position.y;\n ballXVelocity = balls[i].velocity.x;\n\n if (paddles[paddleNum].hitTest(ballX, ballY, paddleNum)) { //paddle has been hit by ball\n balls[i].bounceX();\n //if ball hits on the middle of the paddle then don't want to change y speed at all, \n //else bounce harder in that y direction\n if (paddles[paddleNum].getHitPosition(balls[i].position.y) == 1) { //upper third hit\n balls[i].increaseYspeed(); \n } else if (paddles[paddleNum].getHitPosition(balls[i].position.y) == 3) { //lower third hit\n balls[i].increaseYspeed();\n }\n balls[i].increaseXspeed();\n }\n }\n\n balls[i].draw(ctx);\n\n if (balls[i].position.x >= canvas.width) {\n if (balls.length === 1) {\n hud.message = \"Player 1 won\"\n hud.scores.p1 += 1;\n socket.emit(\"hud\", hud);\n makeBalls(numOfBalls, canvas.width / 2, canvas.height / 2);\n } else {\n hud.scores.p1 += 1;\n socket.emit(\"hud\", hud);\n balls.splice(i, 1);\n if (balls.length === 1 ) {\n //powerup = null;\n powerupOnScreen = false;\n }\n }\n\n } else if (balls[i].position.x <= 0) {\n if (balls.length === 1) {\n hud.message = \"Player 2 won\"\n hud.scores.p2 += 1;\n socket.emit(\"hud\", hud);\n makeBalls(numOfBalls, canvas.width / 2, canvas.height / 2);\n } else {\n hud.scores.p2 += 1;\n socket.emit(\"hud\", hud);\n balls.splice(i, 1);\n if (balls.length === 1 ) {\n //powerup = null;\n powerupOnScreen = false;\n }\n }\n } else if (balls[i].position.y >= canvas.height || balls[i].position.y <= 0) {\n balls[i].bounceY();\n }\n }\n } else {\n for (var i = 0; i < balls.length; ++i) {\n balls[i].draw(ctx);\n }\n powerup = null;\n }\n }\n frame += 1;\n requestAnimationFrame(game);\n }", "title": "" }, { "docid": "97a9daf4d1793c2058c659241c137a8a", "score": "0.7045891", "text": "function playGame(){\n \n\n}", "title": "" }, { "docid": "a409d9dff5d0e40e08347a9d9fbb0157", "score": "0.70344114", "text": "function game() {\n}", "title": "" }, { "docid": "cacfef5df1ca04655d1395ae81b8ffa1", "score": "0.70246965", "text": "function runGame(){\n\n // update ball position and check for ball events\n ball.isSwatted();\n ball.update();\n game.checkWallCollision();\n game.checkOffScreen();\n // check for paddle events\n game.checkBallPaddleCollision(leftPaddle);\n game.checkBallPaddleCollision(rightPaddle);\n // display paddles and ball\n leftPaddle.display();\n rightPaddle.display();\n ball.display();\n // handle cat actions\n game.moveCatArm();\n game.catHeadAppears();\n game.checkGameOver();\n}", "title": "" }, { "docid": "630f62af5cba611d86b3bad6a38a54e7", "score": "0.7023852", "text": "function game() {\r\n var x = 0;\r\n var y = 0;\r\n var s = 1;\r\n if(gameinfo._allPlayerIndicator[screenShifter.index]._respawn == -1) {\r\n if(map[16]){\r\n s = 3;\r\n }\r\n if(map[87]){\r\n y = Math.floor(-4*s);\r\n }else if(map[83]) {\r\n y = Math.floor(4*s);\r\n }\r\n if(map[65]) {\r\n x = Math.floor(-4*s);\r\n }else if(map[68]) {\r\n x = Math.floor(4*s);\r\n }\r\n if(map[27]) {\r\n socket.emit('leaveGame', game_index);\r\n socket.emit('leaveHost', host_index);\r\n myArea.currentMode = mode.LOGIN;\r\n }\r\n if(keyBoard.click == 1 && map[81]) {\r\n socket.emit('changeWeapon', game_index, 1);\r\n keyBoard.click = 0;\r\n }else if(keyBoard.click == 1 && map[69]) {\r\n socket.emit('changeWeapon', game_index, -1);\r\n keyBoard.click = 0;\r\n }else if(keyBoard.click == 1 && map[82]) {\r\n socket.emit('reloading', game_index);\r\n keyBoard.click = 0;\r\n }\r\n \r\n socket.emit('movePlayer', game_index, x, y);\r\n socket.emit('direction', game_index, myArea.x, myArea.y);\r\n var tmp = gameinfo._allPlayerIndicator[screenShifter.index];\r\n if(tmp._wp > 0 && mouseInfo.press == 1 && tmp._load[tmp._wp] > 0) {\r\n socket.emit('attack', game_index);\r\n }else if(mouseInfo.press == 1 && mouseInfo.relea == 0 && tmp._load[tmp._wp] > 0) {\r\n socket.emit('attack', game_index);\r\n mouseInfo.relea = 1;\r\n }\r\n }\r\n if(gameinfo._access == false) {\r\n if(330 < myArea.x && myArea.x < 480 && 420 < myArea.y && myArea.y < 480 && mouseInfo.click == 1) {\r\n socket.emit('leaveGame', game_index);\r\n game_index = -1;\r\n gameinfo = null;\r\n mouseInfo.click = 0;\r\n myArea.currentMode = mode.HOST;\r\n }\r\n }\r\n mouseInfo.click = 0;\r\n}", "title": "" }, { "docid": "e090e1c1ebfbe163a01e484186bef27d", "score": "0.70125854", "text": "function main(){\n // Repeatedly loop and update the game & draw the result on the screen\n let loop = function() {\n update();\n draw();\n\n if(!gameOver){\n window.requestAnimationFrame(loop, screen.canvas);\n } else{\n //call gameover function\n GameOver(screen, win);\n }\n }\n window.requestAnimationFrame(loop, screen.canvas);\n }", "title": "" }, { "docid": "0cb0ddeb3b2c479381c5813b988c0606", "score": "0.7003058", "text": "function main() {\n /* Get our time delta information which is required if this game\n * requires smooth animation. Because everyone's computer processes\n * instructions at different speeds we need a constant value that\n * would be the same for everyone (regardless of how fast their\n * computer is) - hurray time!\n */\n var now = Date.now(),\n dt = (now - lastTime) / 1000.0;\n\n /* Below the update/render functions are called, and passed along is the time delta to\n * our update function since it may be used for smooth animation.\n */\n\n \n // if the player is not selected render the characters screen\n if(playerSelected === false){\n renderCharacterChooser();\n\n // only render the start screen when the start screen mode is on\n if(startScreenMode === true){\n startScreen.render();\n }\n\n //changes the players image according to the users selection\n playerChanger();\n\n // stores that image\n currentPlayerSprite = playerChanger();\n\n }else{\n\n // allow the bugs to move if the game isn't over\n if(quitMode === false){\n update(dt);\n }\n render(); // render the playing field\n\n // renders the keys on the field unless the game is paused so the keys do not overlap the pause screen\n if(gameProperties.gamePaused === false){\n renderKeys();\n }\n player.sprite = currentPlayerSprite;\n\n // once the player loses all their lives call the gameOver method and stop the game\n if(player.lives < 1){\n gameOver();\n window.quitMode = true;\n }\n }\n /* Set our lastTime variable which is used to determine the time delta\n * for the next time this function is called.\n */\n lastTime = now;\n\n /* Use the browser's requestAnimationFrame function to call this\n * function again as soon as the browser is able to draw another frame.\n */\n win.requestAnimationFrame(main);\n }", "title": "" }, { "docid": "f3a97662f435f325f9be1740fe3f100f", "score": "0.6984799", "text": "function draw(){\n background(\"white\")\n rectMode(CENTER)\n \n \n play1.visible=false\n coin.visible=false\n bomb.visible=false\n player.visible=false\n\n // starting gameState 0\n\nif(gameState===0){\n if(mousePressedOver(Survivel)){\n gameState=play1\n Survivel.visible=false\n onlinePlay.visible=false\n }\n\n if(mousePressedOver(onlinePlay)){\n gameState=1\n onlinePlay.visible=false\n Survivel.visible=false\n }\n}\n\n// gameState 0 if condition ending\n\n// starting gameState 1\n if(gameState===1){\n game=new Game()\n game.getState()\n game.start()\n \n }\n\n // gameState 1 ending\n \n // starting gameState play\n\n if(gameState===play1){\n background(\"white\")\n \n ground.visible=true\n\n camera.position.x = player.x;\n\n ground.depth=player.depth\n player.depth+=1\n \n invisibleGround=createSprite(700,600,100000000000000000000000000000000000000000000000000000000000000000,30)\n\n invisibleGround.visible=false\n\n player.collide(invisibleGround)\n\n bomb.visible=true\n coin.visible=true\n player.visible=true\n player.setCollider(\"rectangle\",0,0,50,90)\n player.velocityY=player.velocityY+4\n \n upWall=createSprite(100000,40,10000000000000000000000000000000000000000000000000000000000000000000000,40)\n upWall.visible=false\n\n leftWall=createSprite(-435,400,340,100000000000000000000000000000)\n leftWall.visible=false\n\n player.collide(leftWall)\n player.collide(upWall)\n\n if(keyDown(\"space\")){\n player.velocityY=-30\n }\n\n else if(keyWentUp(\"left\")){\n player.changeAnimation(\"back\",leftPlayerStanding)\n }\n\n else if(keyDown(\"left\")){\n player.x=player.x-15\n player.changeAnimation(\"backRunning\",leftPlayer)\n }\n\n else if(keyDown(\"right\")){\n player.x=player.x+15\n player.changeAnimation(\"running\",playerImage)\n }\n\n else if (keyWentUp(\"right\")){\n player.changeAnimation(\"standing\",playerImage1)\n }\n\n \n else if(player.isTouching(coin)){\n coinText+=1\n coin.visible=false\n }\n\nelse if(player.x>=displayWidth){\n ground.x+=400\n}\n\n player.collide(ground)\n\n \n \n if(player.isTouching(bomb)){\n player.changeAnimation(\"explode\",bombExploding,3000)\n bomb.visible=false\n gameState=greeting1\n }\n\n if(keyDown(\"enter\")){\n bullet=createSprite(player.x+70,player.y-17,10,2)\n bullet.velocityX=70\n }\n \n \n}\n\n// gameState play1 ending\n\n// gameState greeting1 starting\nif(gameState===greeting1){\n//enemy.visible=false\ncoin.visible=false\nbomb.visible=false\nground.visible=false\n\n}\n// gameState greeting 1 ending\n\n drawSprites()\n}", "title": "" }, { "docid": "487ae7f7a13aa891a698e4e590d39f7c", "score": "0.69767475", "text": "runGame() {\n this.chooseSingleOrMultiPlayer();\n while (this.playerOne.score < 3 && this.playerTwo.score < 3) {\n let playerOneGesture = this.playerOne.chooseGesture();\n let playerTwoGesture = this.playerTwo.chooseGesture();\n this.letsDoTheMathToFindAWinner(playerOneGesture, playerTwoGesture);\n }\n this.displayGameWinner();\n this.wantToPlayAgain();\n }", "title": "" }, { "docid": "be7bc9a1846cb065928c0076ae0840e3", "score": "0.69381744", "text": "function Game() {}", "title": "" }, { "docid": "05b343b830ce8cb43519e624e191a367", "score": "0.6901095", "text": "function draw() {\n //if its gameover show the background for gameover. If win is true, show the win background. If the game hasent started, show the intro.\n if (showGameOver === true) {\n image(gameOverBackground, 0, 0, windowWidth, windowHeight);\n } else if (showGameWin === true) {\n image(winningBackground, 0, 0, windowWidth, windowHeight);\n } else if (gameStart === false) {\n introScreen(); //main screen\n } else {\n //setting the background to a dark night grass background\n image(backgroundNight, 0, 0, windowWidth, windowHeight); // display background\n\n //check gameOver (if its game over or not)\n checkGameOver();\n checkIfWon();\n CourageBar();\n PowerBar();\n timeCounter();\n hintsFound();\n\n //item pie replenish the courage gauge\n itemPie.RaiseCourage(couragePlayer);\n //item poison that kills you instantly\n itemPoison.DropCourage(couragePlayer);\n //handleInput, display and move for courage\n couragePlayer.move();\n couragePlayer.display();\n couragePlayer.handleInput();\n\n //Display and Eats the pie or poison // constrain items to screen\n itemPie.constrainToScreen();\n itemPie.display();\n itemPoison.constrainToScreen();\n itemPoison.display();\n\n //for loop Arrays for the Monsters'move, display\n for (let i = 0; i < badMonsters.length; i++) {\n badMonsters[i].move();\n badMonsters[i].display();\n //Once the special skill has been activated, Courage will be able to shoot the monsters\n couragePlayer.updateBullets(badMonsters[i]);\n }\n\n //Arrays for the clues. The clues will move and display. Courage will be able to collect clues and have \"the clues found\" score updated at the top.\n for (let i = 0; i < cluesFind.length; i++) {\n if (cluesFind[i].isAlive === true) {\n cluesFind[i].move();\n cluesFind[i].display();\n couragePlayer.handleEatingClue(cluesFind[i]);\n }\n }\n }\n}", "title": "" }, { "docid": "9e9538c589d8806c7e4f0741d0e2d7da", "score": "0.6900705", "text": "function updateGameState() {\n}", "title": "" }, { "docid": "a186cebef2334a150c2ff0288950b9e6", "score": "0.68943834", "text": "function main() {\n /* Get our time delta information which is required if your game\n * requires smooth animation. Because everyone's computer processes\n * instructions at different speeds we need a constant value that\n * would be the same for everyone (regardless of how fast their\n * computer is) - hurray time!\n */\n var now = Date.now(),\n dt = (now - lastTime) / 1000.0;\n\n /* Call our update/render functions, pass along the time delta to\n * our update function since it may be used for smooth animation.\n */\n\n // This function will be used to show the message \"Game over\" OR \"You won\".\n renderWinner();\n\n // if true stop drawing bugs and everything else. to let message above be written\n if(gameWon === false && gameLost === false){\n update(dt);\n render();\n }\n\n /* Set our lastTime variable which is used to determine the time delta\n * for the next time this function is called.\n */\n lastTime = now;\n\n /* Use the browser's requestAnimationFrame function to call this\n * function again as soon as the browser is able to draw another frame.\n */\n win.requestAnimationFrame(main);\n }", "title": "" }, { "docid": "8c710f40b511d911f34a4c7d31ab83f7", "score": "0.6892839", "text": "gameOver(gameState) {\n gameIsOver(gameState);\n }", "title": "" }, { "docid": "bcebc276072ac941833c641234399c87", "score": "0.6891212", "text": "function runGame() {\n game.run();\n\n}", "title": "" }, { "docid": "439f308bb0de3ab81428a5ef565d10b1", "score": "0.6868713", "text": "updateGame(time) {\n\t\t\t\n\t\t\tif ( gameObject.state.wasPaused ) {\n\t\t\t\tgameObject.state.wasPaused = false;\n\t\t\t\tgameObject.time.currentTime = time;\n\t\t\t}\n\n\t\t\t// Updating time values\n\n\n\t\t\tgameObject.time.pastTime = gameObject.time.currentTime;\n\t\t\tgameObject.time.currentTime = time;\n\t\t\tgameObject.time.delta =\n\t\t\tgameObject.time.currentTime - gameObject.time.pastTime;\n\t\t\tgameObject.time.deltaRate = gameObject.time.delta / 16;\n\n\t\t\t// Checking screens to behave accordingly\n\n\t\t\t// Switch hack better than 1000's of if-else-if, don't you think ?\n\n\t\t\tswitch( true ) {\n\n\t\t\t\tcase gameObject.screen.onLoadingScreen:\n\n\t\t\t\t\tif ( gameObject.loader.loaded ) {\n\t\t\t\t\t\tgameObject.audio.playSound(\n\t\t\t\t\t\t\tgameObject.media.gameTracks[3], true, true\n\t\t\t\t\t\t);\n\t\t\t\t\t\tgameObject.screen.changeScreen( 'onIntroScreen' );\n\t\t\t\t\t}\n\t\t\t\t\telse if ( !gameObject.loader.loading ) {\n\t\t\t\t\t\tgameObject.loader.loading = true;\n\t\t\t\t\t\tgameObject.loader.load();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t// Draw loading screen\n\n\t\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\t\tgameObject.graphics.drawBackground();\n\t\t\t\t\t\tgameObject.graphics.drawLoadingScreen();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase gameObject.screen.onIntroScreen:\n\n\t\t\t\t\tgameObject.interface.scrollText.move();\n\t\t\t\t\tgameObject.interface.scrollText.update();\n\n\t\t\t\t\t// Drawing scrolling text\n\n\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\tgameObject.graphics.drawBackground();\n\t\t\t\t\tgameObject.graphics.drawScrollText();\n\n\t\t\t\t\tif ( gameObject.interface.scrollText.finished ) {\n\n\t\t\t\t\t\t// Reseting properties for ending\n\n\t\t\t\t\t\tgameObject.interface.scrollText.reset();\n\t\t\t\t\t\tgameObject.screen.changeScreen( 'onTitleScreen' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase gameObject.screen.onTitleScreen:\n\n\t\t\t\t\tgameObject.interface.title.update();\n\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\tgameObject.graphics.drawBackground();\n\t\t\t\t\tgameObject.graphics.drawTitle();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase gameObject.screen.onCreditScreen ||\n\t\t\t\t\t\t gameObject.screen.onHowToScreen ||\n\t\t\t\t\t\t gameObject.screen.onOptionScreen:\n\n\t\t\t\t gameObject.interface.backBtn.update();\n\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\tgameObject.graphics.drawBackground();\n\n\t\t\t\t\tif ( gameObject.screen.onCreditScreen ) {\n\t\t\t\t\t\tgameObject.graphics.drawCredits();\n\t\t\t\t\t}\n\t\t\t\t\telse if ( gameObject.screen.onHowToScreen ) {\n\t\t\t\t\t\tgameObject.graphics.drawHowTo();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgameObject.interface.options.update();\n\t\t\t\t\t\tgameObject.graphics.drawOptions();\n\t\t\t\t\t}\n\n\t\t\t\t\tgameObject.graphics.drawBackBtn();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase gameObject.screen.onPlayingScreen:\n\n\t\t\t\t\t/* We won't handle everything about the game here for code\n\t\t\t\t\t * readability and maintenance purposes. Instead for most tasks \n\t\t\t\t\t * we'll call specific components' methods if some condition is met.\n\t\t\t\t\t */\n\n\t\t\t\t\tif ( !gameObject.state.started &&\n\t\t\t\t\t !gameObject.state.inTransition ) {\n\t\t\t\t\t\tgameObject.state.inTransition = true;\n\t\t\t\t\t\tgameObject.audio.changeTrack(\n\t\t\t\t\t\t\tgameObject.media.gameTracks[4],\n\t\t\t\t\t\t\ttrue,\ttrue, false\n\t\t\t\t\t\t);\n\t\t\t\t\t\tshowSmallController();\t// For small viewports\n\t\t\t\t\t}\n\t\t\t\t\telse if ( gameObject.state.inTransition ) {\n\n\t\t\t\t\t\tif ( gameObject.audio.transitionFinished &&\n\t\t\t\t\t\t gameObject.screen.transitionReady ) {\n\t\t\t\t\t\t\tgameObject.audio.transitionFinished = false;\n\t\t\t\t\t\t\tgameObject.state.inTransition = false;\n\t\t\t\t\t\t\tgameObject.state.started = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Game Started\n\n\t\t\t\t\telse if ( gameObject.state.started &&\n\t\t\t\t\t\t\t\t\t\t!gameObject.state.gameOver.started ) {\n\n\t\t\t\t\t\t// Changing states based on game progression\n\n\t\t\t\t\t\tif ( !gameObject.state.level1.started ) {\n\t\t\t\t\t\t\tgameObject.state.level1.started = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Registering victory in level 1\n\t\t\t\t\t\telse if ( gameObject.state.level1.bossFinished &&\n\t\t\t\t\t\t\t\t\t\t\t!gameObject.state.level1.inVictory &&\n\t\t\t\t\t\t\t\t\t\t\tgameObject.audio.transitionFinished )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgameObject.state.level1.inVictory = true;\n\t\t\t\t\t\t\tgameObject.state.victory.intervalReferenceTime =\n\t\t\t\t\t\t\tgameObject.time.currentTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Registering victory in level 2\n\t\t\t\t\t\telse if ( gameObject.state.level2.bossFinished &&\n\t\t\t\t\t\t\t\t\t\t\t!gameObject.state.level2.inVictory &&\n\t\t\t\t\t\t\t\t\t\t\tgameObject.audio.transitionFinished )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgameObject.state.level2.inVictory = true;\n\t\t\t\t\t\t\tgameObject.state.victory.intervalReferenceTime =\n\t\t\t\t\t\t\tgameObject.time.currentTime;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Performing actions\n\n\t\t\t\t\t\tgameObject.components.update();\n\t\t\t\t\t\tgameObject.components.moveAll();\n\t\t\t\t\t\tgameObject.components.checkAll();\n\n\t\t\t\t\t\t// Drawing\n\n\t\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\t\tgameObject.graphics.drawBackground();\n\t\t\t\t\t\tgameObject.graphics.drawPowerUps();\n\t\t\t\t\t\tgameObject.graphics.drawShots();\n\t\t\t\t\t\tgameObject.graphics.drawPlayer();\n\t\t\t\t\t\tgameObject.graphics.drawEnemies();\n\t\t\t\t\t\tgameObject.graphics.drawInfo();\n\n\t\t\t\t\t\t/* These will be level transitions that will mainly provide\n\t\t\t\t\t\t * a room for the background or screen to change\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\t// Level 1 transition\n\n\t\t\t\t\t\tif (\tgameObject.state.level1.inVictory &&\n\t\t\t\t\t\t\t\t\t!gameObject.state.level2.started &&\n\t\t\t\t\t\t\t\t\tgameObject.time.currentTime -\n\t\t\t\t\t\t\t\t\tgameObject.state.victory.intervalReferenceTime >\n\t\t\t\t\t\t\t\t\tgameObject.state.victory.intervalTime )\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t\tif ( gameObject.screen.transitionReady &&\n\t\t\t\t\t\t\t\t\t !gameObject.state.level1.finished ) {\n\n\t\t\t\t\t\t\t\tgameObject.state.level1.finished = true;\n\t\t\t\t\t\t\t\tgameObject.audio.changeTrack(\n\t\t\t\t\t\t\t\t\tgameObject.media.gameTracks[5],\n\t\t\t\t\t\t\t\t\ttrue, true, false\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( gameObject.screen.transitionFinished ) {\n\n\t\t\t\t\t\t\t\tgameObject.state.level2.started = true;\n\n\t\t\t\t\t\t\t\t// Reseting transition properties\n\n\t\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Level 2 transition. If there were more levels, this would\n\t\t\t\t\t\t * be almost the same as level 1 conditionals. We could even\n\t\t\t\t\t\t * write a general check for all of these, but the goal here\n\t\t\t\t\t\t * is just to provide a base structure\n\t\t\t\t\t\t */\n\n\n\t\t\t\t\t\telse if ( gameObject.state.level2.inVictory &&\n\t\t\t\t\t\t\t\t\t !gameObject.state.level2.finished &&\n\t\t\t\t\t\t\t\t\t gameObject.time.currentTime -\n\t\t\t\t\t\t\t\t\t\t\tgameObject.state.victory.intervalReferenceTime >\n\t\t\t\t\t\t\t\t\t\t\tgameObject.state.victory.intervalTime )\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t\tif ( gameObject.screen.transitionReady ) {\n\n\t\t\t\t\t\t\t\tgameObject.state.level2.finished = true;\n\t\t\t\t\t\t\t\tgameObject.audio.changeTrack(\n\t\t\t\t\t\t\t\t\tgameObject.media.gameTracks[5],\n\t\t\t\t\t\t\t\t\ttrue, true, false\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tgameObject.screen.changeScreen( 'onEndingScreen' );\n\t\t\t\t\t\t\t\thideSmallController();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handling end of start and eventual game over transitions\n\n\t\t\t\t\t\t// This will be at last as it needs to be drawn over everything\n\n\t\t\t\t\t\tif ( gameObject.screen.transitionStarted &&\n\t\t\t\t\t\t !gameObject.screen.transitionFinished &&\n\t\t\t\t\t\t !gameObject.state.gameOver.inTransition &&\n\t\t\t\t\t\t !gameObject.state.gameOver.started ) {\n\n\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t\t// To restart properties, in case we need more transitions\n\n\t\t\t\t\t\t\tif ( gameObject.screen.transitionFinished ) {\n\t\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( gameObject.state.gameOver.inTransition &&\n\t\t\t\t\t\t\t\t\t\t\t!gameObject.screen.transitionReady ) {\n\n\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t\tif ( gameObject.screen.transitionReady ) {\n\t\t\t\t\t\t\t\tgameObject.audio.changeTrack(\n\t\t\t\t\t\t\t\t\tgameObject.media.gameTracks[0],\n\t\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tgameObject.state.gameOver.inTransition = false;\n\t\t\t\t\t\t\t\tgameObject.state.gameOver.started = true;\n\t\t\t\t\t\t\t\tgameObject.state.resetGame();\n\t\t\t\t\t\t\t\tgameObject.screen.changeScreen( 'onGameOverScreen' );\n\t\t\t\t\t\t\t\thideSmallController();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase gameObject.screen.onGameOverScreen:\n\n\t\t\t\t\t/* Audio will be loaded from the last conditional of playing\n\t\t\t\t\t * screen, so we can use it to activate the timer for game over\n\t\t\t\t\t * animation\n\t\t\t\t\t */\n\n\t\t\t\t\tif ( gameObject.audio.transitionFinished &&\n\t\t\t\t\t !gameObject.state.gameOver.audioLoaded ) {\n\t\t\t\t\t\tgameObject.audio.transitionFinished = false;\n\t\t\t\t\t\tgameObject.state.gameOver.audioLoaded = true;\n\t\t\t\t\t\tgameObject.state.gameOver.intervalReferenceTime =\n\t\t\t\t\t\tgameObject.time.currentTime;\n\t\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\t\tgameObject.graphics.drawGameOver(); // Else we get a flicker\n\t\t\t\t\t}\n\t\t\t\t\telse if ( gameObject.state.gameOver.audioLoaded &&\n\t\t\t\t\t\t\t\t\t\tgameObject.time.currentTime -\n\t\t\t\t\t\t\t\t\t\tgameObject.state.gameOver.intervalReferenceTime >=\n\t\t\t\t\t\t\t\t\t\tgameObject.state.gameOver.intervalTime) {\n\n\t\t\t\t\t\t// Changing to initial track\n\n\t\t\t\t\t\tif ( !gameObject.state.gameOver.finished ) {\n\t\t\t\t\t\t\tgameObject.state.gameOver.finished = true;\n\t\t\t\t\t\t\tgameObject.audio.changeTrack(\n\t\t\t\t\t\t\t\tgameObject.media.gameTracks[3],\n\t\t\t\t\t\t\t\ttrue, true, false\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( gameObject.audio.transitionFinished ) {\n\t\t\t\t\t\t\t// Reseting audio state for future transitions\n\t\t\t\t\t\t\tgameObject.audio.transitionFinished = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Title background, not actually there yet\n\n\t\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\t\tgameObject.graphics.drawTitle();\n\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t/* If transitionScreen method has already reseted properties,\n\t\t\t\t\t\t * it's over\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tif ( !gameObject.screen.transitionStarted ) {\n\n\t\t\t\t\t\t\t// Reseting game over properties\n\n\t\t\t\t\t\t\tgameObject.state.gameOver.inTransition = false;\n\t\t\t\t\t\t\tgameObject.state.gameOver.started = false;\n\t\t\t\t\t\t\tgameObject.state.gameOver.finished = false;\n\t\t\t\t\t\t\tgameObject.state.gameOver.audioLoaded = false;\n\n\t\t\t\t\t\t\t// Back to title\n\n\t\t\t\t\t\t\tgameObject.screen.changeScreen( 'onTitleScreen' );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\t\tgameObject.graphics.drawGameOver();\t\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Ending screen will show ending text and reset game\n\n\t\t\t\tcase gameObject.screen.onEndingScreen:\n\n\t\t\t\t\tgameObject.interface.scrollText.move();\n\t\t\t\t\tgameObject.interface.scrollText.update();\n\n\t\t\t\t\tgameObject.graphics.clear();\n\t\t\t\t\tgameObject.graphics.drawBackground();\n\t\t\t\t\tgameObject.graphics.drawScrollText();\n\n\t\t\t\t\tif ( gameObject.interface.scrollText.finished ) {\n\n\t\t\t\t\t\t// Transitioning screen back to title\n\n\t\t\t\t\t\tgameObject.graphics.drawTitle();\n\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\tif ( gameObject.screen.transitionFinished ) {\n\n\t\t\t\t\t\t\t// Reseting screen states\n\n\t\t\t\t\t\t\tgameObject.screen.transitionScreen();\n\n\t\t\t\t\t\t\t// Reseting game and scrollText properties\n\n\t\t\t\t\t\t\tgameObject.state.resetGame();\n\t\t\t\t\t\t\tgameObject.interface.scrollText.reset();\n\n\t\t\t\t\t\t\t// Actually changing to title screen\n\n\t\t\t\t\t\t\tgameObject.screen.changeScreen( 'onTitleScreen' );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tgameObject.graphics.drawBackground();\n\n\t\t\t}\n\n\t\t\tgameObject.id = requestAnimationFrame( gameManager.updateGame );\n\n\t\t}", "title": "" }, { "docid": "737ee9d6bac1f22a327c4f90a1cca5bc", "score": "0.68679655", "text": "function main () {\n //snake movement\n moveSnake();\n\n //add conditions\n checkBounds();\n gameOver = checkPassThrough(snakeCoords.H);\n checkFood();\n \n //render display\n render();\n\n //game over\n if(gameOver) {\n clearInterval(repeat);\n }\n}", "title": "" }, { "docid": "6483da2aa887dd7e4eea1a654b3d903c", "score": "0.686761", "text": "function game_play() {\r\n if(game_playing) {\r\n player_jump();\r\n } else if(game_startscreen) {\r\n game_start();\r\n } else if(!player_falling) {\r\n game_reset();\r\n }\r\n}", "title": "" }, { "docid": "2c26bbb5a2241ffda90a2b3536620c7b", "score": "0.6865496", "text": "resetGame() {\n\n\t\t\t\t// Background\n\n\t\t\t\tgameObject.components.background.x = 0;\n\t\t\t\tgameObject.components.background.y1 = 0;\n\t\t\t\tgameObject.components.background.y2 = -canvasHeight;\n\t\t\t\tgameObject.components.background.started = false;\n\n\t\t\t\t// Player\n\n\t\t\t\tgameObject.components.player.x = canvasWidth * .5 - 30;\n\t\t\t\tgameObject.components.player.y = canvasHeight * 1.1;\n\t\t\t\tgameObject.components.player.allowPlayer = false;\n\t\t\t\tgameObject.components.player.movingUp = false;\n\t\t\t\tgameObject.components.player.movingDown = false;\n\t\t\t\tgameObject.components.player.movingRight = false;\n\t\t\t\tgameObject.components.player.movingLeft = false;\n\t\t\t\tgameObject.components.player.shooting = false;\n\t\t\t\tgameObject.components.player.speed = 1;\n\t\t\t\tgameObject.components.player.lives = 3;\n\t\t\t\tgameObject.components.player.invincible = false;\n\t\t\t\tgameObject.components.player.hitPoints = 1;\n\t\t\t\tgameObject.components.player.score = 0;\n\t\t\t\tgameObject.components.player.deathAnimationCanDraw = true;\n\t\t\t\tgameObject.components.player.shots = [];\n\t\t\t\tgameObject.components.player.shotType = 1;\n\t\t\t\tgameObject.components.player.collisionCircle.x = canvasWidth * .5;\n\t\t\t\tgameObject.components.player.collisionCircle.y =\n\t\t\t\tcanvasHeight * 1.1\t+ 30;\n\n\t\t\t\t// Power ups\n\n\t\t\t\tgameObject.components.powerUps.list = [];\n\t\t\t\tgameObject.components.powerUps.spawnInterval = 30000;\n\n\t\t\t\t// Enemies\n\n\t\t\t\tgameObject.components.enemies.list = [];\n\t\t\t\tgameObject.components.enemies.bosses = [];\n\t\t\t\tgameObject.components.enemies.shots = [];\n\t\t\t\tgameObject.components.enemies.spawnInterval = 6000;\n\n\t\t\t\t// States\n\n\t\t\t\tgameObject.state.inTransition = false;\n\t\t\t\tgameObject.state.started = false;\n\t\t\t\tgameObject.state.finished = false;\n\n\t\t\t\tgameObject.state.level1.started = false;\n\t\t\t\tgameObject.state.level1.bossStarted = false;\n\t\t\t\tgameObject.state.level1.bossFinished = false;\n\t\t\t\tgameObject.state.level1.inVictory = false;\n\t\t\t\tgameObject.state.level1.finished = false;\n\t\t\t\t\n\t\t\t\tgameObject.state.level2.started = false;\n\t\t\t\tgameObject.state.level2.bossStarted = false;\n\t\t\t\tgameObject.state.level2.bossFinished = false;\n\t\t\t\tgameObject.state.level2.inVictory = false;\n\t\t\t\tgameObject.state.level2.finished = false;\n\n\t\t\t\tgameObject.state.victory.intervalReferenceTime = 0;\n\n\t\t\t\t// Audio reset\n\n\t\t\t\tgameObject.audio.currentStereo.pan.value = 0;\n\t\t\t\tgameObject.audio.currentStereoValue = 0\n\n\t\t\t}", "title": "" }, { "docid": "f073422da4e885a7e91d38d22785b5d0", "score": "0.68444484", "text": "function playGame() {\r\n\r\n}", "title": "" }, { "docid": "458603874bca8bbdb0c46bc4edb5b513", "score": "0.684408", "text": "function game(){\r\n if (isPause == false){\r\n update();\r\n }\r\n render();\r\n}", "title": "" }, { "docid": "73da5318316a8b565949c885e5279f2d", "score": "0.6834085", "text": "function update() {\n draw()\n controlGame()\n }", "title": "" }, { "docid": "0fc693ae4775d3f075904695130d241c", "score": "0.6826099", "text": "handleGameLoop(msg=null) {\n \n let imperium_self = this;\n let z = imperium_self.returnEventObjects();\n\n if (this.game.queue.length > 0) {\n\n imperium_self.saveGame(imperium_self.game.id);\n \n let qe = this.game.queue.length-1;\n let mv = this.game.queue[qe].split(\"\\t\");\n let shd_continue = 1;\n\n//console.log(\"QUEUE: \" + JSON.stringify(this.game.queue));\n\n if (mv[0] === \"gameover\") {\n \tif (imperium_self.browser_active == 1) {\n \t salert(\"Game Over\");\n \t}\n \timperium_self.game.over = 1;\n \timperium_self.saveGame(imperium_self.game.id);\n \treturn;\n }\n \n\n //\n // start of status phase, players must exhaust\n //\n if (mv[0] === \"exhaust_at_round_start\") { \n\n\tlet player = mv[1]; // state or players\n this.game.queue.splice(qe, 1);\n\n \treturn 0;\n\n }\n \n\n if (mv[0] === \"setvar\") { \n\n\tlet type = mv[1]; // state or players\n\tlet num = parseInt(mv[2]); // 0 if state, player_number if players\n\tlet valname = mv[3]; // a string\n\tlet valtype = mv[4];\n\tlet val = mv[5];\n\tif (valtype == \"int\") { val = parseInt(val); }\n\n\tif (type == \"state\") {\n\t imperium_self.game.state[valname] = val;\n\t}\n\n\tif (type == \"players\") {\n\t imperium_self.game.players_info[num-1][valname] = val;\n\t}\n\n this.game.queue.splice(qe, 1);\n\n \treturn 1;\n\n }\n \n\n\n //\n // resolve [action] [1] [publickey voting or 1 for agenda]\n //\n if (mv[0] === \"resolve\") {\n\n let le = this.game.queue.length-2;\n let lmv = [];\n if (le >= 0) {\n\t lmv = this.game.queue[le].split(\"\\t\");\n\t}\n\n\n\t//\n\t// doubled resolve-plays\n\t//\n\tif (mv[1] === \"play\" && lmv[0] === \"resolve\") {\n\t if (lmv[1] === \"play\") {\n \t this.game.queue.splice(qe, 1);\n \t return 1;\n\t }\n\t}\n\n\n\t//\n\t// token allocation workaround\n\t//\n\tif (lmv[1] != undefined) {\n\t if (lmv[1] === \"tokenallocation\") {\n\t if (lmv[2] != undefined) {\n\t if (lmv[2] === this.app.wallet.returnPublicKey()) {\n\t\tthis.playing_token_allocation = 0;\n\t }\n\t }\n\t }\n\t}\n\n\t//\n\t// note we are done, to prevent reloads\n\t//\n\tif (mv[1] === \"strategy\") {\n\t if (mv[3]) {\n\t if (mv[3] === this.app.wallet.returnPublicKey()) {\n this.game.state.playing_strategy_card_secondary = 0;\n\t }\n\t }\n\t}\n\n\t//\n\t// this overwrites secondaries, we need to clear manually\n\t// if we are playing the sceondary, we don't want to udpate status\n\t//\n\tif (this.game.state.playing_strategy_card_secondary == 0 && this.playing_token_allocation == 0) {\n this.updateStatus(\"Waiting for Opponent Move...\"); \n\t}\n\n\tif (mv[1] == lmv[0]) {\n \t if (mv[2] != undefined) {\n\n\t if (this.game.confirms_received == undefined || this.game.confirms_received == null) {\n\t if (mv[2] != -1) {\n\t\tthis.resetConfirmsNeeded(this.game.players_info.length); \n\t } else {\n\n\t\t//\n\t\t// aggressively resolve, or we hit an error in some\n\t\t// situations which cause looping of the strategy \n\t\t// card.\n\t\t//\n\t this.resetConfirmsNeeded(0);\n \t this.game.queue.splice(this.game.queue.length-1);\n \t this.game.queue.splice(this.game.queue.length-1);\n \t return 1;\n\n\t }\n\t }\n\n\n\t //\n\t // set confirming player as inactive\n\t //\n\t for (let i = 0; i < this.game.players.length; i++) {\n\t if (this.game.players[i] === mv[3]) {\n\t this.setPlayerInactive((i+1));\n\t\tif (!this.game.confirms_players.includes(mv[3])) {\n\t\t this.game.confirms_received += parseInt(mv[2]);\n\t\t this.game.confirms_players.push(mv[3]);\n\t }\n\t }\n\t }\n\n\n\t //\n\t //\n\t //\n\t let still_to_move = [];\n\t for (let i = 0; i < this.game.players.length; i++) {\n\t still_to_move.push(this.game.players[i]);\n\t }\n\t for (let i = 0; i < this.game.confirms_players.length; i++) {\n\t for (let z = 0; z < still_to_move.length; z++) {\n\t\tif (still_to_move[z] === this.game.confirms_players[i]) {\n\t\t still_to_move.splice(z, 1);\n\t }\n\t }\n\t }\n\n\t let notice = \"Players still to move: <ul>\";\n\t let am_i_still_to_move = 0;\n\t for (let i = 0; i < still_to_move.length; i++) {\n\t for (let z = 0; z < this.game.players.length; z++) {\n\t\tif (this.game.players[z] === still_to_move[i]) {\n\t\t if (this.game.players[z] === this.app.wallet.returnPublicKey()) { am_i_still_to_move = 1; }\n\t notice += '<li class=\"option\">'+this.returnFaction((z+1))+'</li>';\n\t\t}\n\t }\n\t }\n\t notice += '</ul>';\n\t if (am_i_still_to_move == 0) {\n\t this.updateStatus(notice);\n\t }\n\n\n \t if (this.game.confirms_needed <= this.game.confirms_received) {\n\t this.resetConfirmsNeeded(0);\n \t this.game.queue.splice(qe-1, 2);\n \t return 1;\n\n \t } else {\n\n \t this.game.queue.splice(qe, 1);\n\n\t //\n\t // we are waiting for a set number of confirmations\n\t // but maybe we reloaded and still need to move\n\t // in which case the instruction we need to run is \n\t // the last one.... \n\t //\n\t if (mv[3] != undefined) {\n\t if (!this.game.confirms_players.includes(this.app.wallet.returnPublicKey())) {\n\t \t return 1;\n\t }\n if (mv[1] == \"agenda\") {\n\t\t return 1;\n\t\t}\n\t }\n\t if (this.game.confirms_needed < this.game.confirms_received) { return 1; }\n \t return 0;\n }\n \n return 0;\n \n \t } else {\n \t this.game.queue.splice(qe-1, 2);\n \t return 1;\n\t }\n } else {\n\n //\n // remove the event\n //\n this.game.queue.splice(qe, 1);\n\n //\n // go back through the queue and remove any event tht matches this one\n // and all events that follow....\n //\n for (let z = le, zz = 1; z >= 0 && zz == 1; z--) {\n let tmplmv = this.game.queue[z].split(\"\\t\");\n if (tmplmv.length > 0) {\n if (tmplmv[0] === mv[1]) {\n this.game.queue.splice(z);\n zz = 0;\n }\n }\n }\n\t}\n } \n \n\n\n\n if (mv[0] === \"rider\") {\n \n\tlet x = {};\n\t x.player \t= mv[1];\n\t x.rider \t= mv[2];\n\t x.choice \t= mv[3];\n\n\tthis.game.state.riders.push(x); \n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n\n\n if (mv[0] === \"research\") {\n\n let player = parseInt(mv[1]);\n \tthis.game.queue.splice(qe, 1);\n\n this.setPlayerActiveOnly(player);\n\n if (imperium_self.game.player == player) {\n imperium_self.playerResearchTechnology(function(tech) {\n imperium_self.addMove(\"purchase\\t\"+imperium_self.game.player+\"\\ttech\\t\"+tech);\n imperium_self.addMove(\"NOTIFY\\t\"+imperium_self.returnFaction(imperium_self.game.player) + \" researches \" + imperium_self.tech[tech].name);\n imperium_self.endTurn();\n });\n } else {\n\t imperium_self.updateStatus(imperium_self.returnFaction(player) + \" is researching technology...\");\n\t}\n\treturn 0;\n\n }\n\n\n\n\n if (mv[0] === \"preloader\") {\n\n\ttry {\n\t this.app.browser.addElementToDom(`\n\t\t <div class=\"background_loader\" style=\"display:none\">\n\t\t <img src=\"/imperium/img/starscape_background1.jpg\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/ships/carrier_100x200.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/ships/destroyer_100x200.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/ships/dreadnaught_100x200.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/ships/fighter_100x200.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/ships/infantry_100x200.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/BUILD.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/DIPLOMACY.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/EMPIRE.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/INITIATIVE.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/MILITARY.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/POLITICS.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/TECH.png\" style=\"width:10px;height:10px\" />\n\t\t <img src=\"/imperium/img/strategy/TRADE.png\" style=\"width:10px;height:10px\" />\n\t\t </div>\n\t `);\n\t} catch (err) {}\n\n\tthis.preloadImages();\n\n \tthis.game.queue.splice(qe, 1);\n\treturn 1;\n\n }\n\n\n\n if (mv[0] === \"announce_retreat\") {\n\n\tlet player = parseInt(mv[1]);\n\tlet opponent = parseInt(mv[2]);\n let from = mv[3];\n let to = mv[4];\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// insert prospective retreat into game queue\n\t//\n\tlet retreat_inserted = 0;\n\tfor (let i = this.game.queue.length-1; i >= 0; i--) {\n\t let lmv = this.game.queue[i].split(\"\\t\")[0];\n\t if (lmv === \"space_combat_end\") {\n \t this.game.queue.splice(i+1, 0, \"retreat\\t\"+player+\"\\t\"+opponent+\"\\t\"+from+\"\\t\"+to);\n\t }\n\t}\n\n\n this.updateStatus(this.returnFactionNickname(player) + \" announces a retreat\");\n\n\tif (this.game.player === opponent) {\n\t this.playerRespondToRetreat(player, opponent, from, to);\n\t} else {\n\t this.updateStatus(this.returnFaction(opponent) + \" responding to \" + this.returnFaction(player) + \" retreat\");\n\t}\n\n\treturn 0;\n\n }\n\n\n if (mv[0] === \"retreat\") {\n \n\tlet player = parseInt(mv[1]);\n\tlet opponent = parseInt(mv[2]);\n let from = mv[3];\n let to = mv[4];\n \tthis.game.queue.splice(qe, 1);\n\n\tif (this.game.state.retreat_cancelled == 1 || this.game.players_info[opponent-1].temporary_opponent_cannot_retreat == 1 || this.game.players_info[opponent-1].permanent_opponent_cannot_retreat == 1) {\n\t this.updateLog(\"With retreat impossible, the fleets turns to battle...\");\n\t return 1; \n\t}\n\n\tlet sys_from = this.returnSectorAndPlanets(from);\n\tlet sys_to = this.returnSectorAndPlanets(to);\n\n\tfor (let i = 0; i < sys_from.s.units[player-1].length; i++) {\n\t sys_to.s.units[player-1].push(sys_from.s.units[player-1][i]);\n\t}\n\tsys_from.s.units[player-1] = [];\n\n\n sys_to.s.activated[player-1] = 1;\n this.saveSystemAndPlanets(sys_to);\n this.saveSystemAndPlanets(sys_from);\n this.updateSectorGraphics(from);\n this.updateSectorGraphics(to);\n\n\timperium_self.updateLog(this.returnFactionNickname(player) + \" retreats to \" + sys_to.s.name);\n\n \treturn 1;\n \n }\n\n\n\n\n\n\n\n if (mv[0] === \"repair\") { \n\n \tlet player = parseInt(mv[1]);\n let type = mv[2];\n let sector = mv[3];\n let planet_idx = parseInt(mv[4]);\n let unit_idx = parseInt(mv[5]);\n\n\tlet sys = this.returnSectorAndPlanets(sector); \n\n \tif (type == \"space\") {\n\t sys.s.units[player-1][unit_idx].strength = sys.s.units[player-1][unit_idx].max_strength;\n \t} else {\n\t sys.p[planet_idx].units[player-1][unit_idx].strength = sys.p[planet_idx].units[player-1][unit_idx].max_strength;\n }\n \n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n if (mv[0] === \"check_fleet_supply\") { \n\n \tlet player = parseInt(mv[1]);\n \tlet sector = mv[2];\n\n this.game.queue.splice(qe, 1);\n\n return this.handleFleetSupply(player, sector);\n\n }\n\n\n if (mv[0] === \"continue\") { \n\n \tlet player = mv[1];\n \tlet sector = mv[2];\n\n\n\tif (this.handleFleetSupply(player, sector) == 0) {\n\t return 0;\n\t}\n\n\tthis.setPlayerActiveOnly(player);\n\n this.game.queue.splice(qe, 1);\n\n \t//\n \t// update sector\n \t//\n \tthis.updateSectorGraphics(sector);\n\n\tif (this.game.player == player) {\n \t this.playerContinueTurn(player, sector);\n\t} else {\n\t this.updateStatus(this.returnFaction(player) + \" has moved into \" + this.game.sectors[this.game.board[sector].tile].name);\n\t}\n\n return 0;\n\n }\n\n\n\n if (mv[0] === \"post_production\") {\n\nconsole.log(\"----------------------------\");\nconsole.log(\"---------- X X X -----------\");\nconsole.log(\"----------------------------\");\n\n\tlet player = mv[1];\n\tlet sector = mv[2];\n\tlet stuff = mv[3];\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n for (let i = 0; i < speaker_order.length; i++) {\n for (let k = 0; k < z.length; k++) {\n z[k].postProduction(imperium_self, player, sector, stuff);\n }\n }\n\t\n\treturn 1;\n\n }\n\n\n\n\n if (mv[0] === \"produce\") {\n \n \tlet player = mv[1];\n let player_moves = parseInt(mv[2]);\n let planet_idx = parseInt(mv[3]); // planet to build on\n let unitname = mv[4];\n let sector = mv[5];\n\n \tlet sys = this.returnSectorAndPlanets(sector);\n\n \tif (planet_idx != -1) {\n this.addPlanetaryUnit(player, sector, planet_idx, unitname);\n\t this.updateLog(this.returnFactionNickname(player) + \" produces \" + this.returnUnit(unitname, player).name + \" on \" + sys.p[planet_idx].name, 120, 1); // force message\n \t} else {\n this.addSpaceUnit(player, sector, unitname);\n\t this.updateLog(this.returnFactionNickname(player) + \" produces \" + this.returnUnit(unitname, player).name + \" in \" + sys.s.name, 120, 1); // force message\n }\n\n\n \t//\n \t// update sector\n \t//\n this.saveSystemAndPlanets(sys);\n \tthis.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n\n \t//\n \t// handle fleet supply\n \t//\n\tlet handle_fleet_supply = 1;\n for (let i = 0; i < this.game.queue.length; i++) {\n\t let nextcmd = this.game.queue[i];\n\t let tmpc = nextcmd.split(\"\\t\");\n\t if (tmpc[0] == \"produce\" && parseInt(tmpc[1]) == player) {\n\t //\n\t // handle fleet supply when all of my units are produced\n\t //\n\t handle_fleet_supply = 0;\n\t }\n\t}\n if (handle_fleet_supply == 1) {\n return this.handleFleetSupply(player, sector);\n\t}\n\n \treturn 1;\n \n }\n\n\n\n if (mv[0] === \"play\") {\n\n this.updateTokenDisplay();\n this.updateLeaderboard();\n\n \tlet player = mv[1];\n \tlet contplay = 0;\n\tif (this.game.state.active_player_turn == player) { \n\t contplay = 1; \n\t} else {\n\n\t //\n\t // new player turn\n\t //\n\t this.game.state.active_player_has_produced = 0;\n\n\t}\n\tif (parseInt(mv[2]) == 1) { contplay = 1; }\n\tthis.game.state.active_player_turn = player;\n\n\tthis.setPlayerActiveOnly(player);\n\n\ttry {\n document.documentElement.style.setProperty('--playing-color', `var(--p${player})`);\n \t} catch (err) {}\n\n if (player == this.game.player) {\n\n\t if (contplay == 0) {\n\n\t //\n\t // reset menu track vars\n\t //\n \t this.game.tracker = this.returnPlayerTurnTracker();\n\n\t //\n\t // reset vars like \"planets_conquered_this_turn\"\n\t //\n\t this.resetTurnVariables(player);\n\n\t }\n\n\n\t //\n\t // discard extra action cards here\n\t //\n\t let ac_in_hand = this.returnPlayerActionCards(this.game.player);\n\t let excess_ac = ac_in_hand.length - this.game.players_info[this.game.player-1].action_card_limit;\n\t if (excess_ac > 0) {\n\t this.playerDiscardActionCards(excess_ac);\n\t return 0;\n\t }\n\n \t this.playerTurn();\n\n } else {\n\n\t this.addEventsToBoard();\n \t this.updateStatus(\"<div><div class=\\\"player_color_box player_color_\"+player+\"\\\"></div>\" + this.returnFaction(parseInt(player)) + \" is taking their turn.</div>\");\n\n \t}\n \n \treturn 0;\n }\n\n\n\n if (mv[0] === \"strategy\") {\n\n\tthis.updateLeaderboard();\n\tthis.updateTokenDisplay();\n\n \tlet card = mv[1];\n \tlet strategy_card_player = parseInt(mv[2]);\n \tlet stage = parseInt(mv[3]); \n\n\tif (this.game.state.playing_strategy_card_secondary == 1) {\n\t if (this.game.confirms_players.includes(this.app.wallet.returnPublicKey()) || this.game.tmp_confirms_players.includes(this.app.wallet.returnPublicKey())) {\n\t return 0;\n\t } else {\n\t //\n\t // if our interface is locked, we're processing the secondary already\n\t //\n\t if (this.lock_interface == 1) {\n\t return 0;\n\t }\n\t }\n\t}\n\n\tif (strategy_card_player != -1) {\n\t if (!imperium_self.game.players_info[strategy_card_player-1].strategy_cards_played.includes(card)) {\n \t imperium_self.game.players_info[strategy_card_player-1].strategy_cards_played.push(card);\n\t }\n\t} else {\n\t if (!imperium_self.game.players_info[imperium_self.game.player-1].strategy_cards_played.includes(card)) {\n \t imperium_self.game.players_info[imperium_self.game.player-1].strategy_cards_played.push(card);\n\t }\n\t}\n\n \tif (stage == 1) {\n\t this.updateLog(this.returnFactionNickname(strategy_card_player) + \" plays \" + this.strategy_cards[card].name);\n\t this.updateStatus(this.returnFaction(strategy_card_player) + \" is playing \" + this.strategy_cards[card].name);\n \t this.playStrategyCardPrimary(strategy_card_player, card);\n\t return 0;\n \t}\n \tif (stage == 2) {\n\t this.updateStatus(\"All factions have the opportunity to play \" + this.strategy_cards[card].name);\n\t this.game.state.playing_strategy_card_secondary = 1;\n \t this.playStrategyCardSecondary(strategy_card_player, card);\n\t return 0;\n \t}\n \tif (stage == 3) {\n\t this.updateStatus(\"All factions have the opportunity to play \" + this.strategy_cards[card].name);\n\t this.game.state.playing_strategy_card_secondary = 1;\n \t this.playStrategyCardTertiary(strategy_card_player, card);\n\t return 0;\n \t}\n \n \treturn 0;\n\n }\n\n\n\n if (mv[0] === \"strategy_card_before\") {\n\n \tlet card = mv[1];\n \tlet player = parseInt(mv[2]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n for (let i = 0; i < speaker_order.length; i++) {\n for (let k = 0; k < z.length; k++) {\n if (z[k].strategyCardBeforeTriggers(this, (i+1), player, card) == 1) {\n this.game.queue.push(\"strategy_card_before_event\\t\"+card+\"\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+k);\n }\n }\n }\n\n return 1;\n\n }\n if (mv[0] === \"strategy_card_before_event\") {\n \n \tlet card = mv[1];\n \tlet player = parseInt(mv[2]);\n \tlet strategy_card_player = parseInt(mv[3]);\n \tlet z_index = parseInt(mv[4]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n return z[z_index].strategyCardBeforeEvent(this, player, strategy_card_player, card);\n\n }\n \n if (mv[0] === \"strategy_card_after\") {\n \n \tlet card = mv[1];\n \tlet player = parseInt(mv[2]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n for (let i = 0; i < speaker_order.length; i++) {\n for (let k = 0; k < z.length; k++) {\n if (z[k].strategyCardAfterTriggers(this, speaker_order[i], player, card) == 1) {\n this.game.queue.push(\"strategy_card_after_event\\t\"+card+\"\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+k);\n }\n }\n }\n\n\t//\n\t// moving to resolve --> January 24, 2021\n\t// this location seems wrong\n //this.game.state.playing_strategy_card_secondary = 0;\n\n return 1;\n }\n if (mv[0] === \"strategy_card_after_event\") {\n \n \tlet card = mv[1];\n \tlet player = parseInt(mv[2]);\n \tlet strategy_card_player = parseInt(mv[3]);\n \tlet z_index = parseInt(mv[4]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n return z[z_index].strategyCardAfterEvent(this, player, strategy_card_player, card);\n\n }\n \n\n if (mv[0] === \"playerschoosestrategycards_before\") {\n \n \tlet card = mv[1];\n \tlet player = parseInt(mv[2]);\n \tlet strategy_card_player = parseInt(mv[3]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerFirstOrder();\n\n for (let i = 0; i < speaker_order.length; i++) {\n for (let k = 0; k < z.length; k++) {\n if (z[k].playersChooseStrategyCardsBeforeTriggers(this, (i+1), speaker_order[i], card) == 1) {\n this.game.queue.push(\"playerschoosestrategycards_before_event\"+\"\\t\"+speaker_order[i]+\"\\t\"+k);\n }\n }\n }\n return 1;\n }\n if (mv[0] === \"playerschoosestrategycards_before_event\") {\n \n \tlet player = parseInt(mv[1]);\n \tlet z_index = parseInt(mv[2]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n return z[z_index].playersChooseStrategyCardsBeforeEvent(this, player);\n\n }\n if (mv[0] === \"playerschoosestrategycards_after\") {\n \n \tlet card = mv[1];\n \tlet player = parseInt(mv[2]);\n \tlet strategy_card_player = parseInt(mv[3]);\n let z = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n for (let i = 0; i < speaker_order.length; i++) {\n for (let k = 0; k < z.length; k++) {\n if (z[k].playersChooseStrategyCardsAfterTriggers(this, (i+1), speaker_order[i], card) == 1) {\n this.game.queue.push(\"playerschoosestrategycards_after_event\"+\"\\t\"+speaker_order[i]+\"\\t\"+k);\n }\n }\n }\n return 1;\n\n }\n if (mv[0] === \"strategy_card_after_event\") {\n\n \tlet player = parseInt(mv[1]);\n \tlet z_index = parseInt(mv[2]);\n let z = this.returnEventObjects();\n\n return z[z_index].playersChooseStrategyCardsAfterEvent(this, player);\n\n }\n \n\n\n\n if (mv[0] === \"turn\") {\n \n \tthis.game.state.turn++;\n\n this.game.state.active_player_moved = 0;\n this.game.state.active_player_turn = -1;\n\n \tlet new_round = 1;\n for (let i = 0; i < this.game.players_info.length; i++) {\n \t if (this.game.players_info[i].passed == 0) { new_round = 0; }\n }\n \n \t//\n \t// NEW TURN\n \t//\n \tif (new_round == 1) {\n \t this.game.queue.push(\"newround\");\n \t this.game.queue.push(\"setinitiativeorder\");\n \t} else {\n \t this.game.queue.push(\"setinitiativeorder\");\n \t}\n \n \tthis.updateLeaderboard();\n\treturn 1;\n \n }\n\n\n\n if (mv[0] === \"discard\") {\n\n\tlet player = mv[1];\n\tlet target = mv[2];\n\tlet choice = mv[3];\n \tthis.game.queue.splice(qe, 1);\n \n\tif (target == \"agenda\") {\n for (let z = 0; z < this.game.state.agendas.length; z++) {\n\t if (this.game.state.agendas[z] == choice) {\n\t this.game.state.agendas.splice(z, 1);\n\t z--;\n\t }\n\t }\n\t}\n\treturn 1; \n }\n \n\n if (mv[0] === \"quash\") {\n\n\tlet agenda_to_quash = parseInt(mv[1]);\n\tlet redeal_new = parseInt(mv[2]);\n \tthis.game.queue.splice(qe, 1);\n\n\tthis.game.state.agendas.splice(agenda_to_quash, 1);\n\n\tif (redeal_new == 1) {\n this.game.queue.push(\"revealagendas\\t1\");\n \t for (let i = 1; i <= this.game.players_info.length; i++) {\n //this.game.queue.push(\"FLIPCARD\\t1\\t1\\t1\\t\"+i); // deck card poolnum player\n this.game.queue.push(\"FLIPCARD\\t3\\t1\\t1\\t\"+i); // deck card poolnum player\n \t }\n\t}\n\n\treturn 1;\n\n }\n\n if (mv[0] === \"resolve_agenda\") {\n\n\tlet laws = this.returnAgendaCards();\n let agenda = mv[1];\n let winning_choice = \"\";\n\tlet winning_options = [];\n \tthis.game.queue.splice(qe, 1);\n\n for (let i = 0; i < this.game.state.choices.length; i++) {\n winning_options.push(0);\n }\n for (let i = 0; i < this.game.players.length; i++) {\n winning_options[this.game.state.how_voted_on_agenda[i]] += this.game.state.votes_cast[i];\n }\n\n\n //\n\t// speaker breaks ties\n\t//\n\tif (mv[2] === \"speaker\") {\n\t // resolve_agenda\tspeaker\t winning_choice\t\n\t let winner = mv[3];\n\t for (let i = 0; i < this.game.state.choices.length; i++) {\n\t if (this.game.state.choices[i] === winner) {\n\t winning_options[i] += 1;\n\t }\n\t }\n\t}\n\n //\n // determine winning option\n //\n let max_votes_options = -1;\n let max_votes_options_idx = 0;\n for (let i = 0; i < winning_options.length; i++) {\n if (winning_options[i] > max_votes_options) {\n max_votes_options = winning_options[i];\n max_votes_options_idx = i;\n }\n if (winning_options[i] > 0) {\n\n\t let is_planet = 0;\n\t let is_player = 0;\n\t let is_sector = 0;\n\n\t if (this.agenda_cards[agenda].elect == \"planet\") { \n\t is_planet = 1;\n this.updateLog(\"Agenda Outcome: \" + this.game.planets[this.game.state.choices[i]].name + \" receives \" + winning_options[i] + \" votes\");\n\t }\n\t if (this.agenda_cards[agenda].elect == \"player\") { \n\t is_player = 1;\n if (this.returnFactionNickname(this.game.state.choices[i]) !== \"Unknown\") {\n this.updateLog(\"Agenda Outcome: \" + this.returnFactionNickname(this.game.state.choices[i]) + \" receives \" + winning_options[i] + \" votes\");\n\t } else {\n this.updateLog(\"Agenda Outcome: \" + this.game.state.choices[i] + \" receives \" + winning_options[i] + \" votes\");\n\t }\n\t }\n\t if (this.agenda_cards[agenda].elect == \"sector\") { \n\t is_sector = 1;\n this.updateLog(\"Agenda Outcome: \" + this.game.sectors[this.game.state.choices[i]].name + \" receives \" + winning_options[i] + \" votes\");\n\t }\n\n\t if (is_sector == 0 && is_player == 0 && is_planet == 0) {\n this.updateLog(\"Agenda Outcome: \" + this.game.state.choices[i] + \" receives \" + winning_options[i] + \" votes\");\n\t }\n }\n }\n\n let total_options_at_winning_strength = 0;\n\tlet tied_choices = [];\n for (let i = 0; i < winning_options.length; i++) {\n if (winning_options[i] == max_votes_options) {\n\t total_options_at_winning_strength++; \n\t tied_choices.push(this.game.state.choices[i]);\n\t }\n }\n\n\n\t//\n\t// more than one winner\n\t//\n\tif (total_options_at_winning_strength > 1) {\n\t if (this.game.player == this.game.state.speaker) {\n\t imperium_self.playerResolveDeadlockedAgenda(agenda, tied_choices);\n\t }\n\t return 0;\n\t}\n\n\n\t//\n\t//\n\t//\n\tif (tied_choices.length == 1) { \n\t winning_choice = tied_choices[0]; \n\t}\n\n\t//\n\t// single winner\n\t//\n\tif (total_options_at_winning_strength == 1) {\n\n let success = imperium_self.agenda_cards[agenda].onPass(imperium_self, winning_choice);\n\n //\n // resolve riders\n //\n for (let i = 0; i < this.game.state.riders.length; i++) {\n let x = this.game.state.riders[i];\n if (x.choice === winning_choice || x.choice === this.game.state.choices[winning_choice]) {\n this.game.queue.push(\"execute_rider\\t\"+x.player+\"\\t\"+x.rider);\n }\n }\n\n }\n\n\t//\n\t// NOTIFY users of vote results\n\t//\n\tthis.game.queue.push(\"ACKNOWLEDGE\\tThe Galactic Senate has settled on '\"+this.returnNameFromIndex(winning_choice)+\"'\");\n\n\n\t//\n\t// REMOVE strategy card invocation\n\t//\n\tlet lmv = this.game.queue[qe-1].split(\"\\t\");\n\tif (lmv[0] === \"strategy\") {\n \t this.game.queue.splice(qe-1, 1);\n\t}\n\n\treturn 1;\n\n }\n\n\n\n\n\n if (mv[0] == \"execute_rider\") {\n\n\tlet action_card_player = parseInt(mv[1]);\n\tlet rider = mv[2];\n \tthis.game.queue.splice(qe, 1);\n\n\treturn this.action_cards[rider].playActionCardEvent(this, this.game.player, action_card_player, rider);\n }\n\n\n\n if (mv[0] == \"vote\") {\n\n\tlet laws = this.returnAgendaCards();\n let agenda = mv[1];\n\tlet player = parseInt(mv[2]);\n\tlet vote = mv[3];\n\tlet votes = parseInt(mv[4]);\n\n\tthis.game.state.votes_cast[player-1] = votes;\n\tthis.game.state.votes_available[player-1] -= votes;\n\tthis.game.state.voted_on_agenda[player-1][this.game.state.voting_on_agenda] = 1;\n\n\tthis.game.state.how_voted_on_agenda[player-1] = vote;\n\n if (vote == \"abstain\") {\n this.updateLog(this.returnFactionNickname(player) + \" abstains\");\n\t} else {\n\n\t let is_player = 0;\n\t let is_planet = 0;\n\t let is_sector = 0;\n\n\t let elected_choice = this.game.state.choices[parseInt(vote)];\n\t if (laws[agenda].elect === \"player\") { is_player = 1; }\n\t if (laws[agenda].elect === \"planet\") { is_planet = 1; }\n\t if (laws[agenda].elect === \"sector\") { is_sector = 1; }\n\t if (elected_choice.indexOf(\"planet\") == 0 || elected_choice.indexOf(\"new-byzantium\") == 0) { is_planet = 1; }\n\t if (elected_choice.indexOf(\"sector\") == 0) { is_sector = 1; }\n\n\t if (is_planet == 1) {\n this.updateLog(this.returnFactionNickname(player) + \" votes \" + votes + \" on \" + this.game.planets[this.game.state.choices[vote]].name);\n\t }\n\t if (is_sector == 1) {\n this.updateLog(this.returnFactionNickname(player) + \" votes \" + votes + \" on \" + this.game.sectors[this.game.state.choices[vote]].name);\n\t }\n\t if (is_player == 1) {\n this.updateLog(this.returnFactionNickname(player) + \" votes \" + votes + \" on \" + this.game.state.choices[vote]);\n\t }\n\t if (is_planet == 0 && is_sector == 0 && is_player == 0) {\n this.updateLog(this.returnFactionNickname(player) + \" votes \" + votes + \" on \" + this.game.state.choices[vote]);\n\t }\n }\n\n\n\tlet votes_finished = 0;\n\tfor (let i = 0; i < this.game.players.length; i++) {\n\t if (this.game.state.voted_on_agenda[i][this.game.state.voted_on_agenda.length-1] != 0) { votes_finished++; }\n\t}\n\n\t//\n\t// everyone has voted\n\t//\n\tif (votes_finished == this.game.players.length) {\n\n\t let direction_of_vote = \"tie\";\n \t let players_in_favour = [];\n\t let players_opposed = [];\n\n\t let winning_options = [];\n\t for (let i = 0; i < this.game.state.choices.length; i++) { \n\t winning_options.push(0);\n\t }\n\t for (let i = 0; i < this.game.players.length; i++) {\n\t winning_options[this.game.state.how_voted_on_agenda[i]] += this.game.state.votes_cast[i];\n\t }\n\n\t //\n\t // determine winning option\n\t //\n\t let max_votes_options = -1;\n\t let max_votes_options_idx = 0;\n\t for (let i = 0; i < winning_options.length; i++) {\n\t if (winning_options[i] > max_votes_options) {\n\t max_votes_options = winning_options[i];\n\t max_votes_options_idx = i;\n\t }\n\t if (winning_options[i] > 0) {\n\t this.updateLog(this.game.state.choices[i] + \" receives \" + winning_options[i] + \" votes\");\n\t }\n\t }\n\t \n\t let total_options_at_winning_strength = 0;\n\t for (let i = 0; i < winning_options.length; i++) {\n\t if (winning_options[i] == max_votes_options) { total_options_at_winning_strength++; }\n\t }\n\t\n\t}\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n\n }\n\n\n if (mv[0] == \"agenda\") {\n\n\t//\n\t// we repeatedly hit \"agenda\"\n\t//\n\tlet laws = imperium_self.returnAgendaCards();\n let agenda = mv[1];\n let agenda_num = parseInt(mv[2]);\n\tlet agenda_name = this.agenda_cards[agenda].name;\n\tthis.game.state.voting_on_agenda = agenda_num;\n\n\t//\n\t// display faction dashboard with voting strength\n\t//\n\tthis.displayFactionDashboard(1);\n\n\n\t//\n\t// voting happens in turns, speaker last\n\t//\n let who_is_next = 0;\n\tlet speaker_order = this.returnSpeakerOrder();\n\n\tfor (let i = 0; i < speaker_order.length; i++) {\n\t if (this.game.state.voted_on_agenda[speaker_order[i]-1][agenda_num] == 0) { \n\t // FEB 1\n\t //who_is_next = i+1;\n\t who_is_next = speaker_order[i];\n\t i = this.game.players_info.length; \n\t }\n }\n\n\n this.setPlayerActiveOnly(who_is_next);\n\n\tif (this.game.player != who_is_next) {\n\n let html = '<div class=\"agenda_instructions\">The following agenda has advanced for consideration in the Galactic Senate:</div>';\n \t html += '<div class=\"agenda_name\">' + imperium_self.agenda_cards[agenda].name + '</div>';\n\t html += '<div class=\"agenda_text\">';\n\t html += imperium_self.agenda_cards[agenda].text;\n\t html += '</div>';\n\t html += '<div class=\"agenda_status\">'+this.returnFaction(who_is_next)+' is now voting.</div>';\n\t this.updateStatus(html);\n\n\t} else {\n\n\t //\n\t // if the player has a rider, we skip the interactive voting and submit an abstention\n\t //\n\t if (imperium_self.doesPlayerHaveRider(this.game.player)) {\n\t imperium_self.addMove(\"resolve\\tagenda\\t1\\t\"+imperium_self.app.wallet.returnPublicKey());\n\t imperium_self.addMove(\"vote\\t\"+agenda+\"\\t\"+imperium_self.game.player+\"\\t\"+\"abstain\"+\"\\t\"+\"0\");\n\t imperium_self.endTurn();\n\t return 0;\n\t }\n\n\t //\n\t // otherwise we let them vote\n\t //\n \t let is_planet = 0;\n \t let is_sector = 0;\n\n let html = '<div class=\"agenda_instructions\">The following agenda has advanced for consideration in the Galactic Senate:</div>';\n \t html += '<div class=\"agenda_name\">' + imperium_self.agenda_cards[agenda].name + '</div>';\n\t html += '<div class=\"agenda_text\">';\n\t html += imperium_self.agenda_cards[agenda].text;\n\t html += '</div><ul>';\n\t for (let i = 0; i < this.game.state.choices.length && this.game.state.votes_available[imperium_self.game.player-1] > 0; i++) {\n\n\t let to_print = this.game.state.choices[i];\n\t if (to_print.indexOf(\"planet\") == 0) { to_print = this.game.planets[to_print].name; }\n\t if (to_print.indexOf(\"sector\") == 0) { to_print = this.game.sectors[to_print].sector; }\n\t if (to_print.indexOf(\"new-byzantium\") == 0) { to_print = \"New Byzantium\"; }\n\n html += '<li class=\"option\" id=\"'+i+'\">' + to_print + '</li>';\n\t }\n html += '<li class=\"option\" id=\"abstain\">abstain</li></ul></p>';\n\t imperium_self.updateStatus(html);\n\n $('.option').off();\n \t $('.option').on('mouseenter', function() {\n \t let s = $(this).attr(\"id\");\n\t if (s === \"abstain\") { return; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"planet\") == 0) { is_planet = 1; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"sector\") == 0 || imperium_self.game.state.choices[s].indexOf(\"new-byzantium\") == 0) { is_sector = 0; }\n \t if (is_planet == 1) {\n \t imperium_self.showPlanetCard(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile, imperium_self.game.planets[imperium_self.game.state.choices[s]].idx);\n \t imperium_self.showSectorHighlight(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile);\n \t }\n \t });\n \t $('.option').on('mouseleave', function() {\n \t let s = $(this).attr(\"id\");\n\t if (s === \"abstain\") { return; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"planet\") == 0) { is_planet = 1; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"sector\") == 0 || imperium_self.game.state.choices[s].indexOf(\"new-byzantium\") == 0) { is_sector = 0; }\n \t if (is_planet == 1) {\n \t imperium_self.hidePlanetCard(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile, imperium_self.game.planets[imperium_self.game.state.choices[s]].idx);\n imperium_self.hideSectorHighlight(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile);\n }\n });\n $('.option').on('click', function() {\n\n let vote = $(this).attr(\"id\");\n\t let votes = 0;\n\n\t if (is_planet == 1 && vote != \"abstain\") {\n \t imperium_self.hidePlanetCard(imperium_self.game.planets[imperium_self.game.state.choices[vote]].tile, imperium_self.game.planets[imperium_self.game.state.choices[vote]].idx);\n \t imperium_self.hideSectorHighlight(imperium_self.game.planets[imperium_self.game.state.choices[vote]].tile);\n\t }\t\n\n\t if (vote == \"abstain\") {\n\n\t imperium_self.addMove(\"resolve\\tagenda\\t1\\t\"+imperium_self.app.wallet.returnPublicKey());\n\t imperium_self.addMove(\"vote\\t\"+agenda+\"\\t\"+imperium_self.game.player+\"\\t\"+vote+\"\\t\"+votes);\n\t imperium_self.endTurn();\n\t return 0;\n\n\t }\n\n let html = '<p style=\"margin-bottom:15px\">Your voting strength is determined by your influence. Conquer more influence-rich planets to increase it. How many votes do you wish to cast in the Galactic Senate:</p>';\n\t for (let i = 1; i <= imperium_self.game.state.votes_available[imperium_self.game.player-1]; i++) {\n if (i == 1) {\n\t html += '<li class=\"option textchoice\" id=\"'+i+'\">'+i+' vote</li>';\n } else {\n\t html += '<li class=\"option textchoice\" id=\"'+i+'\">'+i+' votes</li>';\n\t }\n\t }\n\t imperium_self.updateStatus(html);\n\n $('.option').off();\n $('.option').on('click', function() {\n\n votes = $(this).attr(\"id\");\n \n \t imperium_self.addMove(\"resolve\\tagenda\\t1\\t\"+imperium_self.app.wallet.returnPublicKey());\n\t imperium_self.addMove(\"vote\\t\"+agenda+\"\\t\"+imperium_self.game.player+\"\\t\"+vote+\"\\t\"+votes);\n\t imperium_self.endTurn();\n\t return 0;\n\n\t });\n\t });\n\t}\n\n \treturn 0;\n\n }\n\n\n\n\n\n if (mv[0] == \"simultaneous_agenda\") {\n\n\t//\n\t// we repeatedly hit \"agenda\"\n\t//\n\tlet laws = imperium_self.returnAgendaCards();\n let agenda = mv[1];\n let agenda_num = parseInt(mv[2]);\n\tlet agenda_name = this.agenda_cards[agenda].name;\n\tthis.game.state.voting_on_agenda = agenda_num;\n\n\t//\n\t// display faction dashboard with voting strength\n\t//\n\tthis.displayFactionDashboard(1);\n\n\n\t//\n\t// voting happens simultaneously\n\t//\n\tlet has_everyone_voted = 1;\n\tfor (let i = 0; i < this.game.players_info.length; i++) {\n\t if (this.game.state.voted_on_agenda[i][agenda_num] == 0) { has_everyone_voted = 0; }\n }\n\tif (has_everyone_voted == 1) {\n \t this.game.queue.splice(qe, 1);\n\t return 1;\n\t}\n\n\n\t//\n\t// voting happens simultaneously\n\t//\n\tif (this.game.state.voted_on_agenda[this.game.player-1][agenda_num] == 1) { \n\n let html = '<div class=\"agenda_instructions\">Waiting for Voting Results:</div>';\n \t html += '<div class=\"agenda_name\">' + imperium_self.agenda_cards[agenda].name + '</div>';\n\t html += '<div class=\"agenda_text\">';\n\t html += imperium_self.agenda_cards[agenda].text;\n\t html += '</div>';\n\t this.updateStatus(html);\n\n\t} else {\n\n\t //\n\t // if the player has a rider, we skip the interactive voting and submit an abstention\n\t //\n\t if (imperium_self.doesPlayerHaveRider(this.game.player)) {\n\t imperium_self.addMove(\"resolve\\tagenda\\t1\\t\"+imperium_self.app.wallet.returnPublicKey());\n\t imperium_self.addMove(\"vote\\t\"+agenda+\"\\t\"+imperium_self.game.player+\"\\t\"+\"abstain\"+\"\\t\"+\"0\");\n\t imperium_self.endTurn();\n\t return 0;\n\t }\n\n\t //\n\t // otherwise we vote\n\t //\n \t let is_planet = 0;\n \t let is_sector = 0;\n\n let html = '<div class=\"agenda_instructions\">The following agenda has advanced for consideration in the Galactic Senate:</div>';\n \t html += '<div class=\"agenda_name\">' + imperium_self.agenda_cards[agenda].name + '</div>';\n\t html += '<div class=\"agenda_text\">';\n\t html += imperium_self.agenda_cards[agenda].text;\n\t html += '</div><ul>';\n\t for (let i = 0; i < this.game.state.choices.length && this.game.state.votes_available[imperium_self.game.player-1] > 0; i++) {\n\n\t let to_print = this.game.state.choices[i];\n\t if (to_print.indexOf(\"planet\") == 0) { to_print = this.game.planets[to_print].name; }\n\t if (to_print.indexOf(\"sector\") == 0) { to_print = this.game.sectors[to_print].sector; }\n\t if (to_print.indexOf(\"new-byzantium\") == 0) { to_print = \"New Byzantium\"; }\n\n html += '<li class=\"option\" id=\"'+i+'\">' + to_print + '</li>';\n\t }\n html += '<li class=\"option\" id=\"abstain\">abstain</li></ul></p>';\n\t imperium_self.updateStatus(html);\n\n $('.option').off();\n \t $('.option').on('mouseenter', function() {\n \t let s = $(this).attr(\"id\");\n\t if (s === \"abstain\") { return; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"planet\") == 0) { is_planet = 1; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"sector\") == 0 || imperium_self.game.state.choices[s].indexOf(\"new-byzantium\") == 0) { is_sector = 0; }\n \t if (is_planet == 1) {\n \t imperium_self.showPlanetCard(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile, imperium_self.game.planets[imperium_self.game.state.choices[s]].idx);\n \t imperium_self.showSectorHighlight(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile);\n \t }\n \t });\n \t $('.option').on('mouseleave', function() {\n \t let s = $(this).attr(\"id\");\n\t if (s === \"abstain\") { return; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"planet\") == 0) { is_planet = 1; }\n \t if (imperium_self.game.state.choices[s].indexOf(\"sector\") == 0 || imperium_self.game.state.choices[s].indexOf(\"new-byzantium\") == 0) { is_sector = 0; }\n \t if (is_planet == 1) {\n \t imperium_self.hidePlanetCard(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile, imperium_self.game.planets[imperium_self.game.state.choices[s]].idx);\n imperium_self.hideSectorHighlight(imperium_self.game.planets[imperium_self.game.state.choices[s]].tile);\n }\n });\n $('.option').on('click', function() {\n\n let vote = $(this).attr(\"id\");\n\t let votes = 0;\n\n\t if (is_planet == 1 && vote != \"abstain\") {\n \t imperium_self.hidePlanetCard(imperium_self.game.planets[imperium_self.game.state.choices[vote]].tile, imperium_self.game.planets[imperium_self.game.state.choices[vote]].idx);\n \t imperium_self.hideSectorHighlight(imperium_self.game.planets[imperium_self.game.state.choices[vote]].tile);\n\t }\t\n\n\t if (vote == \"abstain\") {\n\n\t imperium_self.addMove(\"resolve\\tagenda\\t1\\t\"+imperium_self.app.wallet.returnPublicKey());\n\t imperium_self.addMove(\"vote\\t\"+agenda+\"\\t\"+imperium_self.game.player+\"\\t\"+vote+\"\\t\"+votes);\n\t imperium_self.endTurn();\n\t return 0;\n\n\t }\n\n let html = '<p style=\"margin-bottom:15px\">Your voting strength is determined by your influence. Conquer more influence-rich planets to increase it. How many votes do you wish to cast in the Galactic Senate:</p>';\n\t for (let i = 1; i <= imperium_self.game.state.votes_available[imperium_self.game.player-1]; i++) {\n if (i == 1) {\n\t html += '<li class=\"option textchoice\" id=\"'+i+'\">'+i+' vote</li>';\n } else {\n\t html += '<li class=\"option textchoice\" id=\"'+i+'\">'+i+' votes</li>';\n\t }\n\t }\n\t imperium_self.updateStatus(html);\n\n $('.option').off();\n $('.option').on('click', function() {\n\n votes = $(this).attr(\"id\");\n \n \t imperium_self.addMove(\"resolve\\tagenda\\t1\\t\"+imperium_self.app.wallet.returnPublicKey());\n\t imperium_self.addMove(\"vote\\t\"+agenda+\"\\t\"+imperium_self.game.player+\"\\t\"+vote+\"\\t\"+votes);\n\t imperium_self.endTurn();\n\t return 0;\n\n\t });\n\t });\n\t}\n\n \treturn 0;\n\n }\n\n\n if (mv[0] == \"change_speaker\") {\n \n \tthis.game.state.speaker = parseInt(mv[1]);\n\tthis.displayFactionDashboard();\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n if (mv[0] == \"setinitiativeorder\") {\n\n \tlet initiative_order = this.returnInitiativeOrder();\n\n \tthis.game.queue.push(\"resolve\\tsetinitiativeorder\");\n\n \tfor (let i = initiative_order.length-1; i >= 0; i--) {\n \t if (this.game.players_info[initiative_order[i]-1].passed == 0) {\n \t this.game.queue.push(\"play\\t\"+initiative_order[i]);\n \t }\n \t}\n \n \treturn 1;\n \n }\n \n //\n // resetconfirmsneeded [confirms_before_continuing] [array \\t of \\t pkeys]\n //\n if (mv[0] == \"resetconfirmsneeded\") {\n\n\tlet confirms = 1;\n\tif (parseInt(mv[1]) > 1) { confirms = parseInt(mv[1]); }\n \tthis.resetConfirmsNeeded(confirms);\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n\n }\n\n\n if (mv[0] == \"tokenallocation\") {\n\n\t//\n\t// we undo this when we receive our own token allocation onchain\n\t//\n\tif (this.playing_token_allocation == 1) { return; }\n\tthis.playing_token_allocation = 1; \n\n\tif (parseInt(mv[2])) {\n \t this.playerAllocateNewTokens(parseInt(mv[1]), parseInt(mv[2]), 1, 3);\n\t} else { \n \t this.playerAllocateNewTokens(this.game.player, (this.game.players_info[this.game.player-1].new_tokens_per_round+this.game.players_info[this.game.player-1].new_token_bonus_when_issued), 1, 3);\n }\n \treturn 0;\n }\n \n \n if (mv[0] === \"newround\") {\n\n\t//\n\t// reset to turn 0\n\t//\n \tthis.game.state.turn = 0;\n\n \t//\n \t// SCORING\n \t//\n this.game.state.end_round_scoring = 1;\n if (this.game.state.round >= 1 && this.game.state.round_scoring == 0) {\n\n\t if (this.game.planets['new-byzantium'].owner != -1) {\n this.game.queue.push(\"strategy\\t\"+\"politics\"+\"\\t\"+this.game.state.speaker+\"\\t3\\t\"+1); // 3 ==> end-of-round tertiary\n this.game.queue.push(\"ACKNOWLEDGE\\t\"+\"The Galactic Senate has been re-established on New Byzantium, voting commences on the recent round of proposals\");\n\t }\n\n this.game.queue.push(\"strategy\\t\"+\"imperial\"+\"\\t\"+\"-1\"+\"\\t3\\t\"+1); // 3 ==> end-of-round tertiary\n\t this.game.state.playing_strategy_card_secondary = 0; // reset to 0 as we are kicking into secondary\n this.game.queue.push(\"resetconfirmsneeded\\t\" + imperium_self.game.players_info.length);\n this.game.queue.push(\"ACKNOWLEDGE\\t\"+\"As the Imperial card was not played in the previous round, all players now have an opportunity to score Victory Points (in initiative order)\");\n\n \t this.game.state.round_scoring = 0;\n\t return 1;\n \t} else {\n \t this.game.state.round_scoring = 0;\n\t this.game.state.playing_strategy_card_secondary = 0; // reset to 0 as no secondary to run\n \t}\nthis.game.state.end_round_scoring = 0;\n\n\n\t// testing - give everyone a sabotage\n\t//this.game.deck[1].hand.push((\"sabotage\"+this.game.player));\n\n\n\n\t//\n\t// check for victory condition\n\t//\n\tlet io = this.returnInitiativeOrder();\n\tfor (let i = 0; i < io.length; i++) {\n if (this.game.players_info[i].vp >= this.game.state.vp_target) {\n this.updateStatus(\"Game Over: \" + this.returnFaction(i) + \" has reached \" + this.game.state.vp_target + \" VP\");\n this.updateLog(\"Game Over: \" + this.returnFactionNickname(i) + \" has reached \" + this.game.state.vp_target + \" VP\");\n return 0;\n\t }\n }\n\n\n\n //\n \t// game event triggers\n \t//\n\tlet z = this.returnEventObjects();\n for (let k in z) {\n for (let i = 0; i < this.game.players_info.length; i++) {\n z[k].onNewRound(this, (i+1));\n \t }\n \t}\n\n \tthis.game.queue.push(\"resolve\\tnewround\");\n \tthis.game.state.round++;\n \tthis.updateLog(\"ROUND: \" + this.game.state.round);\n \tthis.updateStatus(\"Moving into Round \" + this.game.state.round + \"<p></p> Please be patient as we deal cards securely...\");\n\n\n\t//\n\t//\n\t//\n\tfor (let i = 0; i < this.game.players_info.length; i++) {\n\t if (this.game.players_info[i].must_exhaust_at_round_start.length > 0) {\n\t for (let b = 0; b < this.game.players_info[i].must_exhaust_at_round_start.length; b++) {\n\t this.game.queue.push(\"must_exhaust_at_round_start\\t\"+(i+1)+\"\\t\"+this.game.players_info[i].must_exhaust_at_round_start[b]);\n\t }\n\t }\n\t}\n\n\n\t//\n\t// REFRESH PLANETS\n\t//\n\tfor (let i = 0; i < this.game.players_info.length; i++) {\n\t for (let ii in this.game.planets) {\n\t this.game.planets[ii].exhausted = 0;\n\t }\n\t}\n\n\n \t//\n \t// RESET USER ACCOUNTS\n \t//\n for (let i = 0; i < this.game.players_info.length; i++) {\n \t this.game.players_info[i].passed = 0;\n\t this.game.players_info[i].strategy_cards_played = [];\n \t this.game.players_info[i].strategy = [];\n \t this.game.players_info[i].must_exhaust_at_round_start = [];\n \t this.game.players_info[i].objectives_scored_this_round = [];\n }\n\n\n \t//\n \t// REPAIR UNITS\n \t//\n \tthis.repairUnits();\n\n \n \t//\n \t// SET INITIATIVE ORDER\n \t//\n this.game.queue.push(\"setinitiativeorder\");\n\n\n\t//\n\t// ENABLE TESTINGvMODE\n\t//\n //this.game.queue.push(\"is_testing\");\n\n \n \t//\n \t// STRATEGY CARDS\n \t//\n// is_testing\n this.game.queue.push(\"playerschoosestrategycards_after\");\n this.game.queue.push(\"playerschoosestrategycards\");\n this.game.queue.push(\"playerschoosestrategycards_before\");\n\n if (this.game.state.round == 1) {\n this.game.queue.push(\"ACKNOWLEDGE\\tNEXT: all players must select a strategy card. If you are new to Red Imperium, consider taking Leadership, Politics, or Technology. They are simple but valuable cards!\");\n\t} else {\n this.game.queue.push(`ACKNOWLEDGE\\tNEXT: all players select their strategy card(s) for Round ${this.game.state.round}.`);\n\t}\n\n if (this.game.state.round == 1) {\n let faction = this.game.players_info[this.game.player-1].faction;\n this.game.queue.push(\"shownewobjectives\");\n//\t this.game.queue.push(`ACKNOWLEDGE\\t<div style=\"font-weight:bold\">Welcome to Red Imperium!</div><div style=\"margin-top:10px\">You are playing as ${this.factions[faction].name}. If you are new to Red Imperium, move a carrier with infantry into a sector beside your homeworld first turn and expand your empire...</div><div style=\"margin-top:10px;margin-bottom:10px;\">Capture resource-rich planets to build ships and wage war. Capture influence-rich planets to purchase tokens for more moves. Good luck.</div>`);\n this.game.queue.push(\"ACKNOWLEDGE\\t\"+this.factions[faction].intro);\n \t} else {\n this.game.queue.push(\"shownewobjectives\");\n }\n\n\n \n \t//\n \t// READY (arcade can let us in!)\n \t//\t \n \tif (this.game.initializing == 1) {\n this.game.queue.push(\"READY\");\n \t} else {\n \t //\n \t // ALLOCATE TOKENS\n \t //\n this.game.queue.push(\"tokenallocation\\t\"+this.game.players_info.length);\n\t this.playing_token_allocation = 0; // <--- ensure load\n this.game.queue.push(\"resetconfirmsneeded\\t\"+this.game.players_info.length);\n\t}\n\n \t//\n \t// ACTION CARDS\n \t//\n if (this.game.state.round > 1) {\n \t for (let i = 1; i <= this.game.players_info.length; i++) {\n this.game.queue.push(\"gain\\t\"+i+'\\t'+\"action_cards\"+\"\\t\"+(this.game.players_info[i-1].action_cards_per_round+this.game.players_info[i-1].action_cards_bonus_when_issued));\n this.game.queue.push(\"DEAL\\t2\\t\"+i+'\\t'+(this.game.players_info[i-1].action_cards_per_round+this.game.players_info[i-1].action_cards_bonus_when_issued));\n \t }\n \t}\n \n\n \t//\n \t// FLIP NEW AGENDA CARDS\n \t//\n this.game.queue.push(\"revealagendas\");\n \tfor (let i = 1; i <= this.game.players_info.length; i++) {\n this.game.queue.push(\"FLIPCARD\\t3\\t3\\t1\\t\"+i); // deck card poolnum player\n \t}\n\n\n\t//\n\t// DE-ACTIVATE SYSTEMS\n\t//\n this.deactivateSectors();\n this.unhighlightSectors();\t\n\n\n \t//\n \t// FLIP NEW OBJECTIVES\n \t//\n if (this.game.state.round == 1) {\n this.game.queue.push(\"revealobjectives\");\n \t for (let i = 1; i <= this.game.players_info.length; i++) {\n // only 1 card because first turn is short\n this.game.queue.push(\"FLIPCARD\\t4\\t1\\t2\\t\"+i); // deck card poolnum player\n \t }\n } else {\n\n if (this.game.state.round < 4) {\n this.game.queue.push(\"revealobjectives\");\n \t for (let i = 1; i <= this.game.players_info.length; i++) {\n this.game.queue.push(\"FLIPCARD\\t4\\t1\\t2\\t\"+i); // deck card poolnum player\n \t }\n\t }\n\n if (this.game.state.round >= 4) {\n this.game.queue.push(\"revealobjectives\");\n \t for (let i = 1; i <= this.game.players_info.length; i++) {\n this.game.queue.push(\"FLIPCARD\\t5\\t1\\t3\\t\"+i); // deck card poolnum player\n \t }\n\t }\n\n\t}\n \treturn 1;\n }\n \n\n if (mv[0] === \"revealagendas\") {\n\n\tlet updateonly = mv[1];\n\n \t//\n \t// reset agendas\n \t//\n\tif (!updateonly) {\n \t this.game.state.agendas = [];\n \t this.game.state.agendas_voting_information = [];\n }\n for (i = 0; i < this.game.pool[0].hand.length; i++) {\n this.game.state.agendas.push(this.game.pool[0].hand[i]);\t\n this.game.state.agendas_voting_information.push({});\n \t}\n \n \t//\n \t// reset pool\n \t//\n \tthis.game.pool = [];\n \tthis.updateLeaderboard();\n \tthis.game.queue.splice(qe, 1);\n\n \treturn 1;\n }\n \n if (mv[0] === \"shownewobjectives\") {\n\n\tlet game_mod = this;\n\tlet title = \"Your Objectives\";\n\tlet subtitle = \"check objectives, strategy cards and more in the CARDS menu...\";\n\tlet cards = [];\n\n for (let i = 0; i < this.game.state.new_objectives.length; i++) {\n\t if (this.game.state.new_objectives[i].type == \"secret\") {\n\t cards.push(this.secret_objectives[this.game.state.new_objectives[i].card]);\n\t }\n\t if (this.game.state.new_objectives[i].type == \"stage1\") {\n\t cards.push(this.stage_i_objectives[this.game.state.new_objectives[i].card]);\n\t }\n\t if (this.game.state.new_objectives[i].type == \"stage2\") {\n\t cards.push(this.stage_ii_objectives[this.game.state.new_objectives[i].card]);\n\t }\n\t} \n\n \tif (this.game.state.round > 1) {\n \t title = \"New Objectives\"; \n \t subtitle = \"view all public and secret objectives in the CARDS menu...\";\n \t}\n\n this.overlay.showCardSelectionOverlay(this.app, this, cards, {\n\n\t title : title,\n\t subtitle : subtitle,\n\t columns : cards.length ,\n\t backgroundImage : \"/imperium/img/starscape_background1.jpg\",\n\t padding: \"20px\",\n\t textAlign: \"center\",\n\t onContinue : function() {\n\n\t game_mod.overlay.hideOverlay();\n\n\t if (game_mod.game.planets['new-byzantium'].owner != -1 ) {\n\n\t let ac = [];\n\t let laws = game_mod.returnAgendaCards();\n\t for (let i = 0; i < game_mod.game.state.agendas.length; i++) {\n\t\tac.push(laws[game_mod.game.state.agendas[i]]);\n\t }\n\n game_mod.overlay.showCardSelectionOverlay(game_mod.app, game_mod, ac, {\n\t title : \"New Agendas\",\n\t subtitle : \"check active agendas, strategy cards and more in the CARDS menu\",\n\t columns : ac.length ,\n\t backgroundImage : \"/imperium/img/starscape_background1.jpg\",\n\t padding: \"20px\",\n\t textAlign: \"center\",\n\t onClose : function() {\n\t\t game_mod.overlay.hideOverlay();\n\t }\n\t }, function () {\n\t\tgame_mod.overlay.hideOverlay();\n\t });\n }\n\t },\n\t}, function () {});\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n\n }\n\n\n if (mv[0] === \"revealobjectives\") {\n\n \tthis.game.state.new_objectives = [];\n\n\tif (this.game.deck.length > 5) {\n for (i = 0; i < this.game.deck[5].hand.length; i++) {\n \t if (!this.game.state.secret_objectives.includes(this.game.deck[5].hand[i])) {\n this.game.state.secret_objectives.push(this.game.deck[5].hand[i]);\n\t this.game.state.new_objectives.push({ type : \"secret\" , card : this.game.deck[5].hand[i] });\n\t }\n \t }\n\t}\n\tif (this.game.pool.length > 1) {\n for (i = 0; i < this.game.pool[1].hand.length; i++) {\n \t if (!this.game.state.stage_i_objectives.includes(this.game.pool[1].hand[i])) {\n this.game.state.stage_i_objectives.push(this.game.pool[1].hand[i]);\t\n\t this.game.state.new_objectives.push({ type : \"stage1\" , card : this.game.pool[1].hand[i]});\n\t }\n \t }\n\t}\n\tif (this.game.pool.length > 2) {\n for (i = 0; i < this.game.pool[2].hand.length; i++) {\n\t if (!this.game.state.stage_ii_objectives.includes(this.game.pool[2].hand[i])) {\n this.game.state.stage_ii_objectives.push(this.game.pool[2].hand[i]);\t\n\t this.game.state.new_objectives.push({ type : \"stage2\" , card : this.game.pool[2].hand[i]});\n \t }\n \t }\n \t}\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n }\n\n\n if (mv[0] === \"is_testing\") {\n \n\t//\n\t// allows specifying objectives and action cards R1\n\t//\n if (this.game.state.round == 1) {\n\t //\n\t // is_testing - give action cards / objectives\n //\n // put specified objectives onto the board\n //\n let my_stage1_objectives = this.returnStageIPublicObjectives();\n let my_stage2_objectives = this.returnStageIIPublicObjectives();\n let my_secret_objectives = this.returnSecretObjectives();\n\n\t for (let i = 0; i < this.game.players_info.length; i++) {\n for (let k = 0; k < this.factions[this.game.players_info[i].faction].action_cards.length; k++) {\n if (this.game.player == (i+1)) {\n this.game.deck[1].hand.push(this.factions[this.game.players_info[i].faction].action_cards[k]);\n }\n }\n for (let k = 0; k < this.factions[this.game.players_info[i].faction].objectives.length; k++) {\n if (this.game.player == (i+1)) {\n let obj = this.factions[this.game.players_info[i].faction].objectives[k];\n if (my_stage1_objectives[obj]) {\n this.game.pool[1].hand.push(obj);\n this.game.state.stage_i_objectives.push(obj);\n this.game.state.new_objectives.push({ type : \"stage1\" , card : obj});\n }\n if (my_stage2_objectives[obj]) {\n this.game.pool[2].hand.push(obj);\n this.game.state.stage_ii_objectives.push(obj);\n this.game.state.new_objectives.push({ type : \"stage2\" , card : obj});\n }\n if (my_secret_objectives[obj]) {\n this.game.deck[5].hand.push(obj);\n this.game.state.secret_objectives.push(obj);\n this.game.state.new_objectives.push({ type : \"secret\" , card : obj});\n }\n }\n }\n }\n }\n\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n\n }\n\n if (mv[0] === \"score\") {\n\n \tlet player = parseInt(mv[1]);\n \tlet vp \t\t = parseInt(mv[2]);\n \tlet objective = mv[3];\n let objective_name = objective;\n let objective_text = \"\";\n let player_return_value = 1;\n\n\t// do not score if we sneak through\n\tif (objective == \"cancel\") {\n\t this.game.queue.splice(qe, 1);\n\t return 1;\n\t}\n\n if (this.secret_objectives[objective] != null) {\n\t objective_name = this.secret_objectives[objective].name; \n\t objective_text = this.secret_objectives[objective].text; \n\t}\n if (this.stage_i_objectives[objective] != null) { \n\t objective_name = this.stage_i_objectives[objective].name;\n\t objective_text = this.stage_i_objectives[objective].text; \n\t}\n if (this.stage_ii_objectives[objective] != null) {\n\t objective_name = this.stage_ii_objectives[objective].name;\n\t objective_text = this.stage_ii_objectives[objective].text; \n\t}\n\n\tif (objective_text == \"\") {\n \t this.updateLog(this.returnFactionNickname(player)+\" scores \"+objective_name+\" (\"+vp+\" VP)\");\n\t} else {\n\t this.updateLog(this.returnFactionNickname(player) + \" scores \" + objective_name + \"<p></p><div style='width:80%;font-size:1.0em;margin-left:auto;margin-right:auto;margin-top:15px;margin-bottom:15px'>\" + objective_text +'</div>');\n\t}\n\n \tthis.game.players_info[player-1].vp += vp;\n \tthis.game.players_info[player-1].objectives_scored.push(objective);\n\n\t//\n\t// end game\n\t//\n\tif (this.game.state.end_round_scoring != 1) {\n\t if (this.checkForVictory() == 1) {\n\t this.updateStatus(\"Game Over: \" + this.returnFaction(player-1) + \" has reached \" + this.game.state.vp_target + \" VP\");\n\t return 0;\n\t }\n\t}\n\n \tthis.game.queue.splice(qe, 1);\n\n\tif (player == this.game.player) {\n\t return 1;\n }\n\n \treturn 1;\n\n }\n \n \n if (mv[0] === \"playerschoosestrategycards\") {\n \n \tthis.updateStatus(\"Players selecting strategy cards, starting from \" + this.returnSpeaker());\n\n\tlet cards_issued = [];\n\n\tfor (let i = 0; i < this.game.players_info.length; i++) {\n\t cards_issued[i] = 0;\n\t if (this.game.players_info[i].strategy_cards_retained.length >= 1) {\n\t for (let y = 0; y < this.game.players_info[i].strategy_cards_retained.length; y++) {\n\t this.game.players_info[i].strategy.push(this.game.players_info[i].strategy_cards_retained[y]);\n\t cards_issued[i]++;\n\t }\n\t }\n\t this.game.players_info[i].strategy_cards_retained = [];\n\t}\n\n\n \t//\n \t// all strategy cards on table again\n \t//\n \tlet x = this.returnStrategyCards();\n \n \tfor (let z in x) {\n \t if (!this.game.state.strategy_cards.includes(z)) {\n\t let include_me = 1;\n\t for (let s = 0; s < this.game.players_info.length; s++) { if (this.game.players_info[s].strategy.includes(z)) { include_me = 0; } }\n\t if (include_me == 1) {\n \t this.game.state.strategy_cards_bonus[this.game.state.strategy_cards.length] = 0;\n \t this.game.state.strategy_cards.push(z);\n }\n }\n \t}\n \n \tif (this.game.player == this.game.state.speaker) {\n \n \t this.addMove(\"resolve\\tplayerschoosestrategycards\");\n \t this.addMove(\"addbonustounselectedstrategycards\");\n \n \t let cards_to_select = 1;\n \t if (this.game.players_info.length == 2) { cards_to_select = 3; }\n \t if (this.game.players_info.length == 3) { cards_to_select = 2; }\n \t if (this.game.players_info.length == 4) { cards_to_select = 2; }\n \t if (this.game.players_info.length >= 5) { cards_to_select = 1; }\n\n \t //\n \t // TODO -- ROUND 1 players only select 1\n \t //\n if (this.game.state.round == 1) { cards_to_select = 1; }\n\n \t for (let cts = 0; cts < cards_to_select; cts++) {\n for (let i = 0; i < this.game.players_info.length; i++) {\n \t let this_player = this.game.state.speaker+i;\n \t if (this_player > this.game.players_info.length) { this_player -= this.game.players_info.length; }\n\t if ((cts+cards_issued[(this_player-1)]) < cards_to_select) {\n \t this.rmoves.push(\"pickstrategy\\t\"+this_player+\"\\t\"+(cts+1));\n }\n }\n \t }\n \n \t this.endTurn();\n \t}\n\n \treturn 0;\n }\n \n if (mv[0] === \"addbonustounselectedstrategycards\") {\n \n for (let i = 0; i < this.game.state.strategy_cards.length; i++) {\n this.game.state.strategy_cards_bonus[i] += 1;\n \t}\n \n this.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n if (mv[0] === \"must_exhaust_at_round_start\") {\n\n\tlet player = parseInt(mv[1]);\n\tlet type = mv[2];\n\tlet number = \"all\"; if (mv[2]) { number = mv[2]; }\n this.game.queue.splice(qe, 1);\n\n\tlet exhausted = 0;\n\n\tif (type == \"cultural\") {\n\t for (let i in this.game.planets) {\n\t if (this.game.planets[i].type == \"cultural\") {\n\t this.game.planets[i].exhausted = 1;\n\t exhausted = 1;\n\t this.updateSectorGraphics(i);\n\t }\n\t }\n\t}\n\tif (type == \"industrial\") {\t\n\t for (let i in this.game.planets) {\n\t if (this.game.planets[i].type == \"industrial\") {\n\t this.game.planets[i].exhausted = 1;\n\t exhausted = 1;\n\t this.updateSectorGraphics(i);\n\t }\n\t }\n\t}\n\tif (type == \"hazardous\") {\n\t for (let i in this.game.planets) {\n\t if (this.game.planets[i].type == \"hazardous\") {\n\t this.game.planets[i].exhausted = 1;\n\t exhausted = 1;\n\t this.updateSectorGraphics(i);\n\t }\n\t }\n\t}\n\tif (type == \"homeworld\") {\n\t for (let i in this.game.planets) {\n\t if (this.game.planets[i].type == \"homeworld\") {\n\t this.game.planets[i].exhausted = 1;\n\t exhausted = 1;\n\t this.updateSectorGraphics(i);\n\t }\n\t }\n\t}\n\n\tif (exhausted == 0) {\n\t this.game.planets[type] = exhausted;\n\t this.updateSectorGraphics(i);\n\t}\n\n\n\treturn 1;\n\n }\n\n\n\n if (mv[0] === \"pickstrategy\") {\n \n \tlet player = parseInt(mv[1]);\n \tlet selection = parseInt(mv[2]);\n\n this.setPlayerActiveOnly(player);\n\n \tif (this.game.player == player) {\n \t this.playerSelectStrategyCards(function(card) {\t// mode 0\n \t imperium_self.addMove(\"resolve\\tpickstrategy\");\n \t imperium_self.addMove(\"purchase\\t\"+imperium_self.game.player+\"\\tstrategycard\\t\"+card);\n \t imperium_self.endTurn();\n \t }, selection);\n \t return 0;\n \t} else {\n\n\t let html = '';\n\t html += this.returnFaction(player) + \" is picking a strategy card: <ul>\";\n\n let scards = [];\n for (let z in this.strategy_cards) {\n scards.push(\"\");\n }\n\n for (let z = 0; z < this.game.state.strategy_cards.length; z++) {\n let rank = parseInt(this.strategy_cards[this.game.state.strategy_cards[z]].rank);\n while (scards[rank-1] != \"\") { rank++; }\n scards[rank-1] = '<li class=\"textchoice\" style=\"opacity:0.5\" id=\"'+this.game.state.strategy_cards[z]+'\">' + this.strategy_cards[this.game.state.strategy_cards[z]].name + '</li>';\n }\n\n for (let z = 0; z < scards.length; z++) {\n if (scards[z] != \"\") {\n html += scards[z];\n }\n }\n html += '</ul>';\n\n \t this.updateStatus(html);\n \t $('.textchoice').on('mouseenter', function() { let s = $(this).attr(\"id\"); imperium_self.showStrategyCard(s); });\n \t $('.textchoice').on('mouseleave', function() { let s = $(this).attr(\"id\"); imperium_self.hideStrategyCard(s); });\n\n \t}\n \treturn 0;\n }\n \n\n if (mv[0] === \"land\") {\n\n \tlet player = mv[1];\n \tlet player_moves = mv[2];\n let sector = mv[3];\n let source = mv[4]; // planet ship\n let source_idx = mv[5]; // planet_idx or ship_idx\n let planet_idx = mv[6];\n let unitjson = mv[7];\n\n let sys = this.returnSectorAndPlanets(sector);\n\n \tif (this.game.player != player || player_moves == 1) {\n if (source == \"planet\") {\n this.unloadUnitByJSONFromPlanet(player, sector, source_idx, unitjson);\n this.loadUnitByJSONOntoPlanet(player, sector, planet_idx, unitjson);\n } else {\n if (source == \"ship\") {\n this.unloadUnitByJSONFromShip(player, sector, source_idx, unitjson);\n this.loadUnitByJSONOntoPlanet(player, sector, planet_idx, unitjson);\n } else {\n this.loadUnitByJSONOntoPlanet(player, sector, planet_idx, unitjson);\n }\n }\n }\n\n\n if (this.game.queue.length > 1) {\n\t if (this.game.queue[this.game.queue.length-2].indexOf(\"land\") != 0) {\n let player_forces = this.returnNumberOfGroundForcesOnPlanet(player, sector, planet_idx);\n\t this.updateLog(this.returnFactionNickname(player) + \" lands \" + player_forces + \" infantry on \" + sys.p[parseInt(planet_idx)].name); \n\t } else {\n\t let lmv = this.game.queue[this.game.queue.length-2].split(\"\\t\");\n\t let lplanet_idx = lmv[6];\n\t if (lplanet_idx != planet_idx) {\n let player_forces = this.returnNumberOfGroundForcesOnPlanet(player, sector, planet_idx);\n\t this.updateLog(this.returnFactionNickname(player) + \" lands \" + player_forces + \" infantry on \" + sys.p[parseInt(planet_idx)].name); \n\t }\n\t }\n\t}\n\n this.saveSystemAndPlanets(sys);\n this.updateSectorGraphics(sector);\n this.game.queue.splice(qe, 1);\n return 1;\n \n }\n\n\n if (mv[0] === \"unload_infantry\") {\n\n \tlet player = mv[1];\n \tlet player_moves = mv[2];\n let sector = mv[3];\n let source = mv[4]; // planet ship\n let source_idx = mv[5]; // planet_idx or ship_idx\n\n if (source === \"planet\") {\n\t this.unloadUnitFromPlanet(player, sector, source_idx, \"infantry\");\n } else {\n\t this.unloadUnitFromShip(player, sector, source_idx, \"infantry\");\n }\n\n this.game.queue.splice(qe, 1);\n return 1;\n }\n\n if (mv[0] === \"load_infantry\") {\n\n \tlet player = mv[1];\n \tlet player_moves = mv[2];\n let sector = mv[3];\n let destination = mv[4]; // planet ship\n let source_idx = mv[5]; // planet_idx or ship_idx\n\n if (destination === \"planet\") {\n this.loadUnitOntoPlanet(player, sector, source_idx, \"infantry\");\n\t}\n if (destination === \"ship\") {\n this.loadUnitOntoShip(player, sector, source_idx, \"infantry\");\n\t}\n\n this.game.queue.splice(qe, 1);\n return 1;\n }\n\n\n\n\n if (mv[0] === \"load\") {\n \n \tlet player = mv[1];\n \tlet player_moves = mv[2];\n let sector = mv[3];\n let source = mv[4]; // planet ship\n let source_idx = mv[5]; // planet_idx or ship_idx\n let unitjson = mv[6];\n let shipjson = mv[7];\n\n \tif (this.game.player != player || player_moves == 1) {\n if (source == \"planet\") {\n this.unloadUnitByJSONFromPlanet(player, sector, source_idx, unitjson);\n this.loadUnitByJSONOntoShipByJSON(player, sector, shipjson, unitjson);\n } else {\n if (source == \"ship\") {\n\t if (source_idx != \"\") {\n this.unloadUnitByJSONFromShip(player, sector, source_idx, unitjson);\n this.loadUnitByJSONOntoShipByJSON(player, sector, shipjson, unitjson);\n\t } else {\n \t\tthis.removeSpaceUnitByJSON(player, sector, unitjson);\n this.loadUnitByJSONOntoShipByJSON(player, sector, shipjson, unitjson);\n\t }\n } else {\n this.loadUnitByJSONOntoShipByJSON(player, sector, shipjson, unitjson);\n }\n }\n }\n\n this.updateSectorGraphics(sector);\n this.game.queue.splice(qe, 1);\n return 1;\n \n }\n\n\n\n if (mv[0] === \"annex\") {\n \n \tlet player \t= parseInt(mv[1]);\n \tlet sector\t= mv[2];\n \tlet planet_idx\t= parseInt(mv[3]);\n \tthis.game.queue.splice(qe, 1);\n\n\tthis.displayFactionDashboard();\n\n\tlet sys = this.returnSectorAndPlanets(sector);\n\tlet planet = sys.p[planet_idx];\n\n\tif (planet) {\n\t planet.units[planet.owner-1] = [];\n\t if (planet.owner > -1) {\n this.game.players_info[planet.owner-1].lost_planet_this_round = player; // player who took it\n\t }\n this.updateLog(planet.name + \" is annexed by \" + imperium_self.returnFaction(imperium_self.game.player));\n\t this.updatePlanetOwner(sector, planet_idx, player);\n\t}\n\n this.updateSectorGraphics(sector);\n\n \treturn 1;\n \n }\n\n\n if (mv[0] === \"give\") {\n \n \tlet giver = parseInt(mv[1]);\n let recipient = parseInt(mv[2]);\n let type = mv[3];\n let details = mv[4];\n \tthis.game.queue.splice(qe, 1);\n\n if (type == \"action\") {\n\t if (this.game.player == recipient) {\n\t this.game.deck[1].hand.push(details);\n let ac_in_hand = this.returnPlayerActionCards(this.game.player);\n let excess_ac = ac_in_hand.length - this.game.players_info[this.game.player-1].action_card_limit;\n\t if (excess_ac > 0) {\n\t this.playerDiscardActionCards(excess_ac);\n\t return 0;\n\t } else {\n\t }\n\t this.endTurn();\n\t } else {\n\n\t if (this.game.player == giver) {\n\t for (let i = 0; i < this.game.deck[1].hand.length; i++) {\n\t\tif (this.game.deck[1].hand[i] == details) {\n\t\t this.game.deck[1].hand.splice(i, 1);\n\t\t}\n\t }\n\t }\n\n\t }\n\t return 0;\n }\n \n\t\n\tif (type == \"promissary\") {\n\t this.givePromissary(giver, recipient, details);\n\t let z = this.returnEventObjects();\n\t for (let z_index = 0; z_index < z.length; z++) {\n\t z[z_index].gainPromissary(this, receipient, details);\n\t z[z_index].losePromissary(this, sender, details);\n\t }\n\t}\n\n \treturn 1;\n\n }\n\n\n if (mv[0] === \"adjacency\") {\n \n \tlet type \t= mv[1];\n \tlet sector1\t= mv[2];\n \tlet sector2\t= mv[3];\n \tthis.game.queue.splice(qe, 1);\n\n\tthis.game.state.temporary_adjacency.push([sector1, sector2]);\n \treturn 1;\n\n }\n\n\n if (mv[0] === \"pull\") {\n \n \tlet puller = parseInt(mv[1]);\n let pullee = parseInt(mv[2]);\n let type = mv[3];\n let details = mv[4];\n \tthis.game.queue.splice(qe, 1);\n\n if (type == \"action\") {\n\t if (details === \"random\") {\n\t if (this.game.player == pullee) {\n\n\t let selectable = [];\n\t for (let i = 0; i < this.game.deck[1].hand.length; i++) {\n\t\tif (!this.game.players_info[pullee-1].action_cards_played.includes(this.game.deck[1].hand[i])) {\n\t\t selectable.push(this.game.deck[1].hand[i]);\n\t\t}\n\t }\n\n\t if (selectable.length == 0) {\n\n\t this.addMove(\"NOTIFY\\t\" + this.returnFaction(pullee) + \" does not have any action cards\");\n\n\t } else {\n\n\t let roll = this.rollDice(selectable.length);\n\t let action_card = selectable[roll-1];\n\t for (let i = 0; i < this.game.deck[1].hand.length; i++) {\n\t if (this.game.deck[1].hand[i] === action_card) {\n\t \t this.game.deck[1].hand.splice((roll-1), 1);\n\t\t }\n\t }\n\t this.addMove(\"give\\t\"+pullee+\"\\t\"+puller+\"\\t\"+\"action\"+\"\\t\"+action_card);\n\t this.addMove(\"NOTIFY\\t\" + this.returnFaction(puller) + \" pulls \" + this.action_cards[action_card].name);\n\t }\n\n\t this.endTurn();\n\t } else {\n\t let roll = this.rollDice();\n\t }\n\t } else {\n\n\t if (this.game.player == pullee) {\n\n\t for (let i = 0; i < this.game.deck[1].hand.length; i++) {\n\t if (this.game.deck[1].hand[i] === details) {\n\t this.game.deck[1].hand.splice(i, 1);\n\t }\n\t }\n\n\t this.addMove(\"give\\t\"+pullee+\"\\t\"+puller+\"\\t\"+\"action\"+\"\\t\"+details);\n\t this.addMove(\"NOTIFY\\t\" + this.returnFaction(puller) + \" pulls \" + this.action_cards[details].name);\n\t this.endTurn();\n\n\t }\n\n\t }\n \t}\n \n \treturn 0; \n\n }\n\n\n if (mv[0] === \"expend\") {\n \n \tlet player = parseInt(mv[1]);\n let type = mv[2];\n let details = mv[3];\n \n if (type == \"command\") {\n \t this.game.players_info[player-1].command_tokens -= parseInt(details);\n \t}\n if (type == \"strategy\") {\n \t this.game.players_info[player-1].strategy_tokens -= parseInt(details);\n \t}\n if (type == \"goods\") {\n \t this.game.players_info[player-1].goods -= parseInt(details);\n \t}\n if (type == \"trade\") {\n \t this.game.players_info[player-1].goods -= parseInt(details);\n \t}\n if (type == \"planet\") {\n \t this.game.planets[details].exhausted = 1;\n \t}\n \n\tthis.updateTokenDisplay();\n\tthis.updateLeaderboard();\n\tthis.displayFactionDashboard();\n \n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n\n if (mv[0] === \"unexhaust\") {\n \n \tlet player = parseInt(mv[1]);\n let type\t = mv[2];\n let name\t = mv[3];\n \n \tif (type == \"planet\") { this.unexhaustPlanet(name); }\n \n\tthis.displayFactionDashboard();\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n if (mv[0] === \"offer\") {\n\n\tlet offering_faction = parseInt(mv[1]);\n\tlet faction_to_consider = parseInt(mv[2]);\n\tlet stuff_on_offer = JSON.parse(mv[3]);\n\tlet stuff_in_return = JSON.parse(mv[4]);\n \tthis.game.queue.splice(qe, 1);\n\n let log_offer = '';\n let offering_html = this.returnFaction(offering_faction) + \" makes a trade offer to \" + this.returnFaction(faction_to_consider) + \": \";\n\t offering_html += '<div style=\"padding:20px;clear:left\">';\n\n\t if (stuff_on_offer.goods > 0) {\n\t log_offer += stuff_on_offer.goods + \" \";\n\t if (stuff_on_offer.goods > 1) {\n\t\tlog_offer += \"trade goods\";\n\t } else {\n\t\tlog_offer += \"trade good\";\n\t }\n\t }\n\t if (stuff_on_offer.promissaries.length > 0) {\n\t if (stuff_on_offer.goods >= 1) {\n\t log_offer += \" and \";\n\t }\n\t for (let i = 0; i < stuff_on_offer.promissaries.length; i++) {\n\t let pm = stuff_on_offer.promissaries[i].promissary;\n \tlet tmpar = pm.split(\"-\");\n \tlet faction_promissary_owner = imperium_self.factions[tmpar[0]].name;\n\t\tlog_offer += this.promissary_notes[tmpar[1]].name;\n\t\tlog_offer += \" \";\n\t\tlog_offer += \"(\"+faction_promissary_owner+\")\";\n\t }\n\t }\n\t if ((stuff_on_offer.goods == 0 && stuff_on_offer.promissaries_length == 0) || log_offer === \"\") {\n\t log_offer += 'nothing';\n\t }\n\n\t log_offer += \" in exchange for \";\n\n\t let nothing_check = \"nothing\";\n\t if (stuff_in_return.goods > 0) {\n\t nothing_check = \"\";\n\t log_offer += stuff_in_return.goods + \" \";\n\t if (stuff_in_return.goods > 1) {\n\t\tlog_offer += \"trade goods or commodities\";\n\t } else {\n\t\tlog_offer += \"trade good or commodity\";\n\t }\n\t }\n\t if (stuff_in_return.promissaries.length > 0) {\n\t nothing_check = \"\";\n\t if (stuff_in_return.goods > 1) {\n\t log_offer += \" and \";\n\t }\n\t for (let i = 0; i < stuff_in_return.promissaries.length; i++) {\n\t nothing_check = \"\";\n\t let pm = stuff_in_return.promissaries[i].promissary;\n \tlet tmpar = pm.split(\"-\");\n \tlet faction_promissary_owner = imperium_self.factions[tmpar[0]].name;\n\t\tlog_offer += this.promissary_notes[tmpar[1]].name;\n\t\tlog_offer += \" \";\n\t\tlog_offer += \"(\"+faction_promissary_owner+\")\";\n\t }\n\t }\n\t if ((stuff_in_return.goods == 0 && stuff_in_return.promissaries_length == 0) || nothing_check === \"nothing\") {\n\t log_offer += 'nothing';\n\t }\n\n\t offering_html += log_offer;\n\t offering_html += '</div>';\n\n log_offer = this.returnFactionNickname(offering_faction) + \" offers \" + this.returnFactionNickname(faction_to_consider) + \" \" + log_offer;\n\tthis.updateLog(log_offer);\n\tif (this.game.player == faction_to_consider) {\n\t this.playerHandleTradeOffer(offering_faction, stuff_on_offer, stuff_in_return, log_offer);\n\t}\n\n return 0;\n }\n \n\n\n if (mv[0] === \"refuse_offer\") {\n\n\tlet refusing_faction = parseInt(mv[1]);\n\tlet faction_that_offered = parseInt(mv[2]);\n \tthis.game.queue.splice(qe, 1);\n\n this.game.players_info[refusing_faction-1].traded_this_turn = 1;\n this.game.players_info[faction_that_offered-1].traded_this_turn = 1;\n\n\tif (faction_that_offered == this.game.player) {\n\t this.updateLog(this.returnFactionNickname(refusing_faction) + \" spurns trade offer\");\n\t this.game.queue.push(\"ACKNOWLEDGE\\tYour trade offer has been spurned by \"+this.returnFactionNickname(refusing_faction));\n\t return 1;\n\t}\n\n\tthis.updateLog(this.returnFactionNickname(refusing_faction) + \" spurns trade offer\");\n\tthis.displayFactionDashboard();\n return 1;\n\n }\n \n\n\n if (mv[0] === \"trade\") {\n \n \tlet offering_faction = parseInt(mv[1]);\n \tlet faction_responding = parseInt(mv[2]);\n let offer\t \t = JSON.parse(mv[3]);\n \tlet response\t \t = JSON.parse(mv[4]);\n\n \tthis.game.queue.splice(qe, 1);\n\n\tif (offering_faction == this.game.player) {\n\t this.game.queue.push(\"ACKNOWLEDGE\\tYour trade offer has been accepted by \"+this.returnFaction(faction_responding));\n\t}\n \n\tthis.updateLog(this.returnFactionNickname(faction_responding) + \" accepts trade offer\");\n\n this.game.players_info[offering_faction-1].traded_this_turn = 1;\n this.game.players_info[faction_responding-1].traded_this_turn = 1;\n\n \tthis.game.players_info[offering_faction-1].commodities -= parseInt(offer.goods);\n \tthis.game.players_info[faction_responding-1].commodities -= parseInt(response.goods);\n\n\tif (offer.promissaries) {\n\t for (let i = 0; i < offer.promissaries.length; i++) {\n\t this.givePromissary(offering_faction, faction_responding, offer.promissaries[i].promissary);\n\t }\n\t}\n\tif (response.promissaries) {\n\t for (let i = 0; i < response.promissaries.length; i++) {\n\t this.givePromissary(faction_responding, offering_faction, response.promissaries[i].promissary);\n\t }\n\t}\n\n \tthis.game.players_info[offering_faction-1].goods += parseInt(response.goods);\n \tthis.game.players_info[faction_responding-1].goods += parseInt(offer.goods);\n\n\tif (this.game.players_info[offering_faction-1].commodities < 0) {\n\t this.game.players_info[offering_faction-1].goods += parseInt(this.game.players_info[offering_faction-1].commodities);\n\t this.game.players_info[offering_faction-1].commodities = 0;\n\t}\n\n\tif (this.game.players_info[faction_responding-1].commodities < 0) {\n\t this.game.players_info[faction_responding-1].goods += parseInt(this.game.players_info[faction_responding-1].commodities);\n\t this.game.players_info[faction_responding-1].commodities = 0;\n\t}\n\n\tthis.displayFactionDashboard();\n \treturn 1;\n \t\n }\n\n\n\n \n //\n // can be used for passive activation that does not spend\n // tokens or trigger events, like activating in diplomacy\n //\n if (mv[0] === \"activate\") {\n\n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n\n\tthis.game.state.activated_sector = sector;\n\n sys = this.returnSectorAndPlanets(sector);\n \tsys.s.activated[player-1] = 1;\n\n \tthis.saveSystemAndPlanets(sys);\n this.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n\n \treturn 1;\n }\n\n\n\n if (mv[0] === \"deactivate\") {\n \n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n\n sys = this.returnSectorAndPlanets(sector);\n \tsys.s.activated[player-1] = 0;\n this.saveSystemAndPlanets(sys);\n this.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n\n //\n // used to track cards\n //\n if (mv[0] === \"lose\") {\n\n \tlet player = parseInt(mv[1]);\n let type = mv[2];\n let amount = parseInt(mv[3]);\n\tlet z = this.returnEventObjects();\n\n\tif (type == \"action_cards\") {\n\t this.game.players_info[player-1].action_cards_in_hand -= amount;\n\t if (this.game.players_info[player-1].action_cards_in_hand > 0) {\n\t this.game.players_info[player-1].action_cards_in_hand = 0;\n\t }\n\t}\n\tif (type == \"secret_objectives\") {\n\t this.game.players_info[player-1].secret_objectives_in_hand -= amount;\n\t if (this.game.players_info[player-1].secret_objectives_in_hand > 0) {\n\t this.game.players_info[player-1].secret_objectives_in_hand = 0;\n\t }\n\t}\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n\n }\n //\n // used to track cards\n //\n if (mv[0] === \"gain\") {\n\n \tlet player = parseInt(mv[1]);\n let type = mv[2];\n let amount = parseInt(mv[3]);\n let run_events = 1;\n\tif (mv[4] === \"0\") { run_events = 0; }\n\tlet z = this.returnEventObjects();\n\n\n\tif (type == \"action_cards\") {\n\n if (this.game.player == player && this.browser_active == 1) {\n\n\t // maybe we are already looking at an action card overlay? \n\t let bonus_buff = 0;\n\t document.querySelectorAll('.overlay_action_card').forEach(el => { bonus_buff++; });\n\n\t this.overlay.showOverlay(this.app, this, this.returnNewActionCardsOverlay(this.game.deck[1].hand.slice(this.game.deck[1].hand.length-(amount+bonus_buff), this.game.deck[1].hand.length)));\n\t document.getElementById(\"close-action-cards-btn\").onclick = (e) => {\n\t this.overlay.hideOverlay();\n\t this.game.state.showing_action_cards_amounts = 0;\n }\n\t }\n\t this.game.players_info[player-1].action_cards_in_hand += amount;\n\n\t if (run_events == 1) {\n\t z = this.returnEventObjects();\n\t for (let z_index in z) {\n \t z[z_index].gainActionCards(imperium_self, player, amount);\n \t }\n \t }\n\n\t}\n\tif (type === \"secret_objectives\" || type === \"secret_objective\") {\n if (this.game.player == player && this.browser_active == 1) {\n\t this.overlay.showOverlay(this.app, this, this.returnNewSecretObjectiveOverlay(this.game.deck[5].hand.slice(this.game.deck[5].hand.length-amount, this.game.deck[5].hand.length)));\n\t }\n\t this.game.players_info[player-1].secret_objectives_in_hand += amount;\n\t}\n\n\t//\n\t// MARCH 28\n\t//\n\ttry {\n let html = this.returnTokenDisplay();\n document.querySelector('.hud-header').innerHTML = html;\n\t} catch (err) {\n\t console.log(\"error updating hud-header: \" + err);\n \t}\n\n\n\tthis.updateTokenDisplay();\n\tthis.updateLeaderboard();\n\tthis.displayFactionDashboard();\n\n \tthis.game.queue.splice(qe, 1);\n\n\t// if action cards over limit\n\treturn this.handleActionCardLimit(player);\n\n }\n \n\n if (mv[0] === \"purchase\") {\n \n \tlet player = parseInt(mv[1]);\n let item = mv[2];\n let amount = parseInt(mv[3]);\n\tlet z = this.returnEventObjects();\n\n if (item === \"strategycard\") {\n\n \t this.updateLog(this.returnFactionNickname(player) + \" takes \" + this.strategy_cards[mv[3]].name);\n\n\t let strategy_card = mv[3]; \n\t for (let z_index in z) {\n strategy_card = z[z_index].gainStrategyCard(imperium_self, player, strategy_card);\n }\n\n \t this.game.players_info[player-1].strategy.push(mv[3]);\n \t for (let i = 0; i < this.game.state.strategy_cards.length; i++) {\n \t if (this.game.state.strategy_cards[i] === mv[3]) {\n \t this.game.players_info[player-1].goods += this.game.state.strategy_cards_bonus[i];\n \t this.game.state.strategy_cards.splice(i, 1);\n \t this.game.state.strategy_cards_bonus.splice(i, 1);\n \t i = this.game.state.strategy_cards.length+2;\n \t }\n \t }\n \t}\n\n if (item === \"tech\" || item === \"technology\") {\n\n \t this.updateLog(this.returnFactionNickname(player) + \" gains \" + this.tech[mv[3]].name);\n\n \t if (!this.game.players_info[player-1].tech.includes(mv[3])) {\n\t this.game.players_info[player-1].tech.push(mv[3]);\n\t }\n\n\t // we added tech, so re-fetch events\n\t z = this.returnEventObjects();\n\t for (let z_index in z) {\n \t z[z_index].gainTechnology(imperium_self, player, mv[3]);\n \t }\n\t this.upgradePlayerUnitsOnBoard(player);\n \t}\n\n if (item === \"goods\") {\n \t this.updateLog(this.returnFactionNickname(player) + \" gains \" + amount + \" trade goods\");\n\t for (let z_index in z) {\n \t amount = z[z_index].gainTradeGoods(imperium_self, player, amount);\n \t }\n\t this.game.players_info[player-1].goods += amount;\n\n if (this.game.state.use_tutorials == 1 && !this.game.state.seen_goods_tutorial) {\n this.game.state.seen_goods_tutorial = 1;\n this.overlay.showOverlay(imperium_self.app, imperium_self, '<div style=\"margin-left:auto;margin-right:auto;height:90vh;width:auto\"><img src=\"/imperium/img/tutorials/trade_goods.png\" style=\"width:auto;height:100%\" /></div>');\n// this likely causes disconnects as is not guaranteed to run on player turn\n// this.playerAcknowledgeNotice(\"REMEMBER: use the trade strategy card to get trade goods. Commercial partnerships can be as valuable as large fleets in Red Imperium\", function() {});\n }\n\n \t}\n\n\n if (item === \"commodities\") {\n\n\t if (this.game.state.use_tutorials == 1 && !this.game.state.seen_commodities_tutorial) {\n\t this.game.state.seen_commodities_tutorial = 1;\n this.overlay.showOverlay(imperium_self.app, imperium_self, '<div style=\"margin-left:auto;margin-right:auto;height:90vh;width:auto\"><img src=\"/imperium/img/tutorials/commodities.png\" style=\"width:auto;height:100%\" /></div>');\n// this likely causes disconnects as is not guaranteed to run on player turn\n// this.playerAcknowledgeNotice(\"REMEMBER: when you have commodities, trade them with a neighbouring player. They receive trade goods. Two players can trade commodities to each other and receive trade goods in return!\", function() {});\n\t }\n\n \t this.updateLog(this.returnFactionNickname(player) + \" gains \" + mv[3] + \" commodities\");\n\t for (let z_index in z) {\n \t amount = z[z_index].gainCommodities(imperium_self, player, amount);\n \t }\n \t this.game.players_info[player-1].commodities += amount;\n\t if (this.game.players_info[player-1].commodities > this.game.players_info[player-1].commodity_limit) {\n \t this.updateLog(this.returnFactionNickname(player) + \" capped at \" + this.game.players_info[player-1].commodity_limit);\n\t this.game.players_info[player-1].commodities = this.game.players_info[player-1].commodity_limit;\n\t }\n \t}\n\n if (item === \"command\") {\n\t if (parseInt(mv[3]) > 0) {\n \t this.updateLog(this.returnFactionNickname(player) + \" gains \" + mv[3] + \" command tokens\");\n\t for (let z_index in z) {\n \t amount = z[z_index].gainCommandTokens(imperium_self, player, amount);\n \t }\n \t this.game.players_info[player-1].command_tokens += amount;\n \t }\n \t}\n if (item === \"strategy\") {\n\t if (parseInt(mv[3]) > 0) {\n \t this.updateLog(this.returnFactionNickname(player) + \" gains \" + mv[3] + \" strategy tokens\");\n\t for (let z_index in z) {\n \t amount = z[z_index].gainStrategyTokens(imperium_self, player, amount);\n \t }\n \t this.game.players_info[player-1].strategy_tokens += amount;\n \t }\n \t}\n\n if (item === \"fleetsupply\") {\n\t if (parseInt(mv[3]) > 0) {\n\t for (let z_index in z) {\n \t amount = z[z_index].gainFleetSupply(imperium_self, player, amount);\n \t }\n \t this.game.players_info[player-1].fleet_supply += amount;\n \t this.updateLog(this.returnFactionNickname(player) + \" increases fleet supply to \" + this.game.players_info[player-1].fleet_supply);\n \t }\n \t}\n \n\tthis.updateTokenDisplay();\n\tthis.updateLeaderboard();\n\tthis.displayFactionDashboard();\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n if (mv[0] === \"pass\") {\n \tlet player = parseInt(mv[1]);\n \tthis.game.players_info[player-1].passed = 1;\n \tthis.updateLog(this.returnFactionNickname(player) + \" has passed\");\n \tthis.game.queue.splice(qe, 1);\n \treturn 1; \n }\n\n\n if (mv[0] === \"add_infantry_to_planet\") {\n \n \tlet player = mv[1];\n let planet = mv[2];\n let player_moves = parseInt(mv[3]);\n \n \tif (player_moves == 0 && this.game.player == player) {\n\t}\n\telse {\n\t this.game.planets[planet].units[player-1].push(this.returnUnit(\"infantry\", player)); \n\t}\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n if (mv[0] === \"remove_infantry_from_planet\") {\n \n \tlet player = mv[1];\n let planet_n = mv[2];\n let player_moves = parseInt(mv[3]); \n \n \tif (player_moves == 0 && this.game.player == player) {\n\t}\n\telse {\n\t\n\t let planet = this.game.planets[planet_n];\n\t let planetunits = planet.units[player-1].length;\n\n\t for (let i = 0; i < planetunits; i++) {\n\t let thisunit = planet.units[player-1][i];\n\t if (thisunit.type == \"infantry\") {\n\t planet.units[player-1].splice(i, 1);\n\t i = planetunits+2;\n\t }\n\t }\n\n\t}\n\n \tthis.game.queue.splice(qe, 1);\n \treturn 1;\n \n }\n\n\n if (mv[0] === \"move\") {\n \n \tlet player = mv[1];\n let player_moves = parseInt(mv[2]);\n let sector_from = mv[3];\n let sector_to = mv[4];\n let shipjson = mv[5];\n let hazard \t = mv[6];\n\n\t//\n\t// \"already_moved\"\n\t//\n\tlet shipobj = JSON.parse(shipjson);\n\tif (shipobj.already_moved) {\n\t delete shipobj.already_moved;\n\t shipjson = JSON.stringify(shipobj);\n\t}\n\n //\n\t//\n\t// \n\tif (hazard === \"rift\") {\n\n\t let obj = JSON.parse(shipjson);\n\n\t // on die roll 1-3 blow this puppy up\n\t let roll = this.rollDice(10);\n\t if (roll <= 3) {\n \t this.removeSpaceUnitByJSON(player, sector_from, shipjson);\n\t this.updateLog(\"The Gravity Rift destroys \"+this.returnFactionNickname(player)+\" \"+obj.name +\" (roll: \"+roll+\")\");\n \t this.game.queue.splice(qe, 1);\n \t this.updateSectorGraphics(sector_to);\n \t this.updateSectorGraphics(sector_from);\n\t return 1;\n\t } else {\n\t this.updateLog(\"The Gravity Risk accelerates \"+this.returnFactionNickname(player)+\" \"+obj.name+\" (roll: \"+roll+\")\");\n\t }\n\n\t}\n\n \t//\n \t// move any ships\n \t//\n \tif (this.game.player != player || player_moves == 1) {\n\n \t let sys = this.returnSectorAndPlanets(sector_from);\n \t let sys2 = this.returnSectorAndPlanets(sector_to);\n\t let obj = JSON.parse(shipjson);\n\n \t this.removeSpaceUnitByJSON(player, sector_from, shipjson);\n this.addSpaceUnitByJSON(player, sector_to, shipjson);\n\n\t //\n\t // report fleet movement\n\t //\n\t let next_move = this.game.queue[qe-1].split(\"\\t\")[0];\n\t if (next_move != \"move\") { this.updateLog(this.returnFactionNickname(player) + \" moves \" + this.returnPlayerFleetInSector(player, sector_to) + \" into \" + sys2.s.name); }\n\n \t}\n \n \tthis.updateSectorGraphics(sector_to);\n \tthis.updateSectorGraphics(sector_from);\n \tthis.game.queue.splice(qe, 1);\n\n //\n // handle fleet supply\n //\n let handle_fleet_supply = 1;\n for (let i = 0; i < this.game.queue.length; i++) {\n let nextcmd = this.game.queue[i];\n let tmpc = nextcmd.split(\"\\t\");\n if (tmpc[0] == \"move\" && parseInt(tmpc[3]) == sector_from) {\n //\n // handle fleet supply when all of my units are moved from that sector\n //\n handle_fleet_supply = 0;\n }\n }\n if (handle_fleet_supply == 1) {\n return this.handleFleetSupply(player, sector_from);\n }\n\n \treturn 1;\n \n }\n\n\n\n /////////////////\n // END OF TURN //\n /////////////////\n if (mv[0] === \"player_end_turn\") {\n\n \tlet player = parseInt(mv[1]);\n\tlet z = this.returnEventObjects();\n\n\t//\n\t// set player as inactive\n\t//\n this.setPlayerInactive(player);\n\n this.game.state.active_player_moved = 0;\n this.game.state.active_player_turn = -1;\n \tthis.game.queue.splice(qe, 1);\n\n\tlet speaker_order = this.returnSpeakerOrder();\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if ( z[i].playerEndTurnTriggers(this, speaker_order[i]) == 1 ) {\n\t this.game.queue.push(\"player_end_turn_event\\t\"+speaker_order[i]+\"\\t\"+k);\n\t }\n\t }\n\t}\n \treturn 1;\n }\n if (mv[0] === \"player_end_turn_event\") { \n \tlet player = parseInt(mv[1]);\n \tlet z_index = parseInt(mv[2]);\n\tlet z = this.returnEventObjects();\n \tthis.game.queue.splice(qe, 1);\n\treturn z[z_index].playerEndTurnEvent(this, player);\n }\n\n\n\n\n /////////////////////\n // ACTIVATE SYSTEM //\n /////////////////////\n if (mv[0] === \"activate_system\") {\n \n \tlet activating_player = parseInt(mv[1]);\n let sector\t = mv[2];\n\tlet player_to_continue = mv[3]; \n let z = this.returnEventObjects();\n\n sys = this.returnSectorAndPlanets(sector);\n \tsys.s.activated[activating_player-1] = 1;\n\tthis.game.state.activated_sector = sector;\n \tthis.saveSystemAndPlanets(sys);\n this.updateSectorGraphics(sector);\n\n\tthis.updateLog(this.returnFactionNickname(activating_player) + \" activates \" + this.returnSectorName(sector));\n\tthis.updateStatus(this.returnFaction(activating_player) + \" activates \" + this.returnSectorName(sector));\n\n \tthis.game.queue.splice(qe, 1);\n\n\tlet speaker_order = this.returnSpeakerOrder();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].activateSystemTriggers(this, activating_player, speaker_order[i], sector) == 1) {\n\t this.game.queue.push(\"activate_system_event\\t\"+activating_player+\"\\t\"+speaker_order[i]+\"\\t\"+sector+\"\\t\"+k);\n\t }\n }\n }\n \treturn 1;\n }\n\n if (mv[0] === \"activate_system_event\") {\n let z\t\t = this.returnEventObjects();\n \tlet activating_player = parseInt(mv[1]);\n \tlet player = parseInt(mv[2]);\n let sector\t = mv[3];\n let z_index\t = parseInt(mv[4]);\n \tthis.game.queue.splice(qe, 1);\n\treturn z[z_index].activateSystemEvent(this, activating_player, player, sector);\n\n }\n\n if (mv[0] === \"activate_system_post\") {\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n \tthis.game.queue.splice(qe, 1);\n this.updateSectorGraphics(sector);\n\t// control returns to original player\n if (this.game.player == player) { this.playerPostActivateSystem(sector); }\n\treturn 0;\n\n }\n\n\n\n ///////////////////\n // AGENDA VOTING //\n ///////////////////\n if (mv[0] === \"pre_agenda_stage\") {\n \n let z = this.returnEventObjects();\n\tlet agenda = mv[1];\n\n \tthis.game.queue.splice(qe, 1);\n\n this.updateLog(\"Agenda: \" + this.agenda_cards[agenda].name + \"<p></p><div style='width:80%;font-size:1.0em;margin-left:auto;margin-right:auto;margin-top:15px;margin-bottom:15px'>\" + this.agenda_cards[agenda].text +'</div>');\n\n\t//\n\t// clear all riders\n\t//\n\tthis.game.state.riders = [];\n\tthis.game.state.choices = [];\n\n\tlet speaker_order = this.returnSpeakerOrder();\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].preAgendaStageTriggers(this, speaker_order[i], agenda) == 1) {\n\t this.game.queue.push(\"pre_agenda_stage_event\\t\"+speaker_order[i]+\"\\t\"+agenda+\"\\t\"+k);\n\t }\n }\n }\n \treturn 1;\n }\n if (mv[0] === \"pre_agenda_stage_event\") {\n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n \tlet agenda = mv[2];\n let z_index\t = parseInt(mv[3]);\n \tthis.game.queue.splice(qe, 1);\n\treturn z[z_index].preAgendaStageEvent(this, player);\n }\n if (mv[0] === \"pre_agenda_stage_post\") {\n let agenda\t = mv[1];\n let imperium_self = this;\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// determine which choices the agenda is voting on\n\t//\n\tthis.game.state.choices = this.agenda_cards[agenda].returnAgendaOptions(imperium_self);\n\n let speaker_order = this.returnSpeakerOrder();\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t this.game.queue.push(\"pre_agenda_stage_player_menu\\t\"+speaker_order[i]+\"\\t\"+agenda);\n }\n\treturn 1;\n }\n if (mv[0] === \"pre_agenda_stage_player_menu\") {\n let player = parseInt(mv[1]);\n let agenda = mv[2];\n this.game.queue.splice(qe, 1);\n\tif (this.game.player == player) {\n this.playerPlayPreAgendaStage(player, agenda); \n\t}\n return 0;\n }\n\n\n\n\n\n if (mv[0] === \"post_agenda_stage\") {\n let z = this.returnEventObjects();\n\tlet agenda = mv[1];\n \tthis.game.queue.splice(qe, 1);\n\tlet speaker_order = this.returnSpeakerOrder();\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].postAgendaStageTriggers(this, speaker_order[i], agenda) == 1) {\n\t this.game.queue.push(\"post_agenda_stage_event\\t\"+speaker_order[i]+\"\\t\"+agenda+\"\\t\"+k);\n\t }\n }\n }\n \treturn 1;\n }\n if (mv[0] === \"post_agenda_stage_event\") {\n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n \tlet agenda = mv[2];\n let z_index\t = parseInt(mv[3]);\n \tthis.game.queue.splice(qe, 1);\n\treturn z[z_index].postAgendaStageEvent(this, player);\n }\n if (mv[0] === \"post_agenda_stage_post\") {\n let agenda\t = mv[1];\n \tthis.game.queue.splice(qe, 1);\n let speaker_order = this.returnSpeakerOrder();\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t this.game.queue.push(\"post_agenda_stage_player_menu\\t\"+speaker_order[i]+\"\\t\"+agenda);\n }\n\treturn 1;\n }\n if (mv[0] === \"post_agenda_stage_player_menu\") {\n let player = parseInt(mv[1]);\n let agenda = mv[2];\n this.game.queue.splice(qe, 1);\n\tif (this.game.player == player) {\n\n let winning_choice = \"\";\n let winning_options = [];\n\n for (let i = 0; i < this.game.state.choices.length; i++) {\n winning_options.push(0);\n }\n for (let i = 0; i < this.game.players.length; i++) {\n winning_options[this.game.state.how_voted_on_agenda[i]] += this.game.state.votes_cast[i];\n }\n\n //\n // determine winning option\n //\n let max_votes_options = -1;\n let max_votes_options_idx = 0;\n for (let i = 0; i < winning_options.length; i++) {\n if (winning_options[i] > max_votes_options) {\n max_votes_options = winning_options[i];\n max_votes_options_idx = i;\n }\n }\n\n let total_options_at_winning_strength = 0;\n\t let tied_choices = [];\n for (let i = 0; i < winning_options.length; i++) {\n if (winning_options[i] == max_votes_options) {\n\t total_options_at_winning_strength++; \n\t tied_choices.push(this.game.state.choices[i]);\n\t }\n }\n\n this.playerPlayPostAgendaStage(player, agenda, tied_choices); \n\t}\n return 0;\n }\n\n\n\n //////////////////////\n // PDS SPACE ATTACK //\n //////////////////////\n if (mv[0] === \"pds_space_attack\") { \n\n \tlet attacker = mv[1];\n let sector = mv[2];\n\tlet z\t\t = this.returnEventObjects();\n\n \tthis.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n\t//\n\t// reset \n\t//\n\tthis.resetTargetUnits();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].pdsSpaceAttackTriggers(this, attacker, speaker_order[i], sector) == 1 && this.returnOpponentInSector(attacker, sector) > -1) {\n\t this.game.queue.push(\"pds_space_attack_event\\t\"+speaker_order[i]+\"\\t\"+attacker+\"\\t\"+sector+\"\\t\"+k);\n }\n }\n }\n \treturn 1;\n }\n\n\n if (mv[0] === \"pds_space_attack_event\") {\n \n let z \t \t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n \tlet attacker = parseInt(mv[2]);\n let sector\t = mv[3];\n let z_index\t = parseInt(mv[4]);\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// opportunity to add action cards / graviton / etc.\n\t//\n\treturn z[z_index].pdsSpaceAttackEvent(this, attacker, player, sector);\n\n }\n\n\n if (mv[0] === \"pds_space_attack_post\") {\n\n \tlet attacker = parseInt(mv[1]);\n let sector\t = mv[2];\n \tthis.game.queue.splice(qe, 1);\n\n this.updateSectorGraphics(sector);\n\t\n\tlet opponent = this.returnOpponentInSector(attacker, sector);\n\n\tif (opponent == -1) { return 1; }\n\n\tif (this.doesPlayerHavePDSUnitsWithinRange(opponent, attacker, sector) == 1) {\n\t this.game.queue.push(\"pds_space_attack_player_menu\\t\"+attacker+\"\\t\"+attacker+\"\\t\"+sector);\n }\n\n \treturn 1;\n\n }\n\n\n\n if (mv[0] === \"pds_space_attack_player_menu\") {\n\n let player = parseInt(mv[1]);\n let attacker = parseInt(mv[2]);\n let sector = mv[3];\n this.game.queue.splice(qe, 1);\n\n this.updateSectorGraphics(sector);\n\n let defender = -1;\n let sys = imperium_self.returnSectorAndPlanets(sector);\n for (let i = 0; i < sys.s.units.length; i++) {\n if ((i + 1) != attacker) {\n if (sys.s.units[i].length > 0) {\n defender = (i + 1);\n }\n }\n }\n\n //\n // everyone skips if nothing to attack\n //\n if (defender == -1) {\n\t return 1;\n }\n\n\n\tif (this.game.player == player) {\n this.playerPlayPDSAttack(player, attacker, sector); \n\t}\n\n return 0;\n }\n\n\n\n\n\n\n ///////////////////////\n // PDS SPACE DEFENSE //\n ///////////////////////\n if (mv[0] === \"pds_space_defense\") {\n \n \tlet attacker = mv[1];\n let sector = mv[2];\n\tlet z\t\t = this.returnEventObjects();\n\n \tthis.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n\t//\n\t// reset \n\t//\n\tthis.resetTargetUnits();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].pdsSpaceDefenseTriggers(this, attacker, speaker_order[i], sector) == 1) {\n\t this.game.queue.push(\"pds_space_defense_event\\t\"+speaker_order[i]+\"\\t\"+attacker+\"\\t\"+sector+\"\\t\"+k);\n }\n }\n }\n \treturn 1;\n }\n\n\n if (mv[0] === \"pds_space_defense_event\") {\n \n let z \t \t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n \tlet attacker = parseInt(mv[2]);\n let sector\t = mv[3];\n let z_index\t = parseInt(mv[4]);\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// opportunity to add action cards / graviton / etc.\n\t//\n\treturn z[z_index].pdsSpaceDefenseEvent(this, attacker, player, sector);\n\n }\n\n\n if (mv[0] === \"pds_space_defense_post\") {\n\n \tlet attacker = parseInt(mv[1]);\n let sector\t = mv[2];\n \tthis.game.queue.splice(qe, 1);\n\n this.updateSectorGraphics(sector);\n\n\t//\n\t// all pds units have been identified and have chosen to fire at this point\n // this is taken care of by the event above. so we should calculate hits and \n\t// process re-rolls.\n\t//\n let speaker_order = this.returnSpeakerOrder();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t if (this.doesPlayerHavePDSUnitsWithinRange(attacker, speaker_order[i], sector) == 1) {\n\t this.game.queue.push(\"pds_space_defense_player_menu\\t\"+speaker_order[i]+\"\\t\"+attacker+\"\\t\"+sector);\n }\n }\n\n \treturn 1;\n\n }\n\n\n\n if (mv[0] === \"pds_space_defense_player_menu\") {\n\n let player = parseInt(mv[1]);\n let attacker = parseInt(mv[2]);\n let sector = mv[3];\n this.game.queue.splice(qe, 1);\n\n this.updateSectorGraphics(sector);\n\n\tthis.updateLog(this.returnFactionNickname(player) + \" preparing to fire PDS\");\n\n\tif (this.game.player == player) {\n this.playerPlayPDSDefense(player, attacker, sector); \n\t}\n\n return 0;\n }\n\n\n\n if (mv[0] === \"player_destroy_unit\") {\n\n let destroyer = parseInt(mv[1]);\n let destroyee = parseInt(mv[2]);\n let total \t = parseInt(mv[3]);\n let type \t = mv[4]; // space // ground\n let sector \t = mv[5];\n let planet_idx \t = mv[6];\n\n\tif (type == \"space\") {\n\t this.playerDestroyShips(destroyee, total, sector);\n\t}\n\n\treturn 0;\n\n }\n\n\n\n //\n // destroys a unit\n //\n if (mv[0] === \"destroy_unit\" || mv[0] === \"destroy\") {\n\n let destroyer = parseInt(mv[1]);\n let destroyee = parseInt(mv[2]);\n let type \t = mv[3]; // space // ground\n let sector \t = mv[4];\n let planet_idx \t = mv[5];\n let unit_idx \t = parseInt(mv[6]); // ship // ground\n let player_moves = parseInt(mv[7]); // does player also do this?\n\n\tlet sys = this.returnSectorAndPlanets(sector);\n\tlet z = this.returnEventObjects();\n\n\tif (type == \"space\") {\n\t sys.s.units[destroyee-1][unit_idx].strength = 0;\n\t sys.s.units[destroyee-1][unit_idx].destroyed = 1;\n\t}\n\tif (type == \"ground\") {\n\t sys.p[planet_idx].units[destroyee-1][unit_idx].strength = 0;\n\t sys.p[planet_idx].units[destroyee-1][unit_idx].destroyed = 1;\n\n\t if (sys.p[planet_idx].units[destroyee-1][unit_idx].type === \"spacedock\" || sys.p[planet_idx].units[destroyee-1][unit_idx].type === \"pds\") {\n\t sys.p[planet_idx].units[destroyee-1].splice(unit_idx, 1);\n\t }\n\t}\n\n\t//\n\t// we only de-array the units if we aren't destroying another unit\n\t//\n\tlet lmv = this.game.queue[qe-1].split(\"\\t\");\n\tif (lmv[0] !== \"destroy_unit\") {\n this.eliminateDestroyedUnitsInSector(destroyee, sector);\n\t}\n\n\t//\n\t// re-display sector\n\t//\n\tthis.saveSystemAndPlanets(sys);\n\tthis.updateSectorGraphics(sector);\n this.game.queue.splice(qe, 1);\n\n\treturn 1;\n\n }\n\n\n\n //\n // assigns one hit to one unit\n //\n if (mv[0] === \"destroy_infantry_on_planet\") {\n\n let attacker = parseInt(mv[1]);\n let sector \t = mv[2];\n let planet_idx \t = parseInt(mv[3]);\n let destroy \t = parseInt(mv[4]);\n\n\tlet sys = this.returnSectorAndPlanets(sector);\n\n\tlet z = this.returnEventObjects();\n\tlet planet = sys.p[planet_idx];\n\tlet player = planet.owner;\n\n\tfor (let i = 0; i < planet.units.length; i++) {\n\n\t if (planet.units[i].length > 0) {\n\n\t if ((i+1) != attacker) {\n\n\t let units_destroyed = 0;\n\n\t for (let ii = 0; ii < planet.units[i].length && units_destroyed < destroy; ii++) {\n\n\t\tlet unit = planet.units[i][ii];\n\n\t\tif (unit.type == \"infantry\") {\n\n\t\t unit.strength = 0;\n\t\t unit.destroyed = 1;\n\t\t units_destroyed++;\n\n \t for (let z_index in z) {\n\t planet.units[i][ii] = z[z_index].unitDestroyed(imperium_self, attacker, planet.units[i][ii]);\n\t } \n\n\t //\n\t // record units destroyed this round\n\t //\n\t try {\n\t if (planet.units[i][ii].destroyed == 1) {\n\t \t this.game.players_info[i].my_units_destroyed_this_combat_round.push(planet.units[i][ii].type);\n\t\t this.game.players_info[attacker-1].units_i_destroyed_this_combat_round.push(planet.units[i][ii].type);\n\t }\n\t \t } catch (err) {}\n\n \t imperium_self.eliminateDestroyedUnitsInSector(planet.owner, sector);\n\n\t }\n\t }\n\t }\n\t }\n\t}\n\n \tthis.saveSystemAndPlanets(sys);\n\tthis.updateSectorGraphics(sector);\n this.game.queue.splice(qe, 1);\n\n\treturn 1;\n\n }\n\n\n\n //\n // assigns one hit to one unit\n //\n if (mv[0] === \"assign_hit\") {\n\n let attacker = parseInt(mv[1]);\n let defender = parseInt(mv[2]);\n let player = parseInt(mv[3]);\n let type \t = mv[4]; // ship // ground\n let sector \t = mv[5]; // ship // ground\n let unit_idx \t = parseInt(mv[6]); // ship // ground\n let player_moves = parseInt(mv[7]); // does player also do this?\n\n\tlet sys = this.returnSectorAndPlanets(sector);\n\tlet z = this.returnEventObjects();\n\n\tif (type == \"ship\") {\n\n\t try {\n\n\t sys.s.units[player-1][unit_idx].last_round_damaged = this.game.state.space_combat_round;\n\t if ((player_moves == 1 && imperium_self.game.player == player) || imperium_self.game.player != player) {\n\t sys.s.units[player-1][unit_idx].strength--;\n\t }\n\t if (sys.s.units[player-1][unit_idx].strength <= 0) {\n\n\t this.updateLog(this.returnFactionNickname(player) + \" \" + sys.s.units[player-1][unit_idx].name + \" destroyed\");\n\t sys.s.units[player-1][unit_idx].destroyed = 1;\n\t for (let z_index in z) {\n\t sys.s.units[player-1][unit_idx] = z[z_index].unitDestroyed(imperium_self, attacker, sys.s.units[player-1][unit_idx]);\n\t } \n\n\t //\n\t // record units destroyed this round\n\t //\n\t try {\n\t if (sys.s.units[player-1][unit_idx].destroyed == 1) {\n\t\tthis.game.players_info[player-1].my_units_destroyed_this_combat_round.push(sys.s.units[player-1][unit_idx].type);\n\t\tthis.game.players_info[attacker-1].units_i_destroyed_this_combat_round.push(sys.s.units[player-1][unit_idx].type);\n\t }\n\t } catch (err) {}\n\n\t } else {\n\t this.updateLog(this.returnFactionNickname(player) + \" \" + sys.s.units[player-1][unit_idx].name + \" damaged\");\n\t }\n\t } catch (err) {\n\t console.log(\"Error? Not all hits assigned: \" + err);\n\t }\n\n\t //\n\t // save our obliterated ships\n\t //\n\t this.saveSystemAndPlanets(sys);\n\n\t //\n\t // has someone won?\n\t //\n let attacker_forces = this.doesPlayerHaveShipsInSector(attacker, sector);\n let defender_forces = this.doesPlayerHaveShipsInSector(defender, sector);\n\n if (attacker_forces > 0 && defender_forces == 0) {\n // this.updateLog(this.returnFaction(attacker) + \" wins space combat\");\n }\n if (attacker_forces == 0 && defender_forces == 0) {\n // this.updateLog(this.returnFaction(attacker) + \" and \" + this.returnFaction(defender) + \" obliterated in space combat\");\n }\n\n\t}\n\n\n\t//\n\t// don't clear if we have more to remove\n\t//\n\tlet tmpx = this.game.queue[this.game.queue.length-1].split(\"\\t\");\n\tif (tmpx[0] === \"assign_hit\" && tmpx[5] === sector) {\n\t // JAN 26th\n //this.eliminateDestroyedUnitsInSector(player, sector);\n\t} else {\n this.eliminateDestroyedUnitsInSector(player, sector);\n\t}\n\n\n\t//\n\t// re-display sector\n\t//\n\tthis.saveSystemAndPlanets(sys);\n\tthis.updateSectorGraphics(sector);\n this.game.queue.splice(qe, 1);\n\n\treturn 1;\n\n }\n\n\n //\n // must assign hit to capital ship, no events trigger\n //\n if (mv[0] === \"assign_hits_capital_ship\") {\n\n let player = parseInt(mv[1]);\n let sector \t = mv[2];\n let total_hits \t = mv[3];\n\tlet sys = this.returnSectorAndPlanets(sector);\n\n this.game.queue.splice(qe, 1);\n\n\tif (this.game.player == player) {\n \t this.playerAssignHitsCapitalShips(player, sector, total_hits);\n }\n\treturn 0;\n\n }\n\n\n\n //\n // triggers menu for user to choose how to assign hits\n //\n if (mv[0] === \"assign_hits\") {\n\n\t//\n\t// we need to permit both sides to play action cards before they fire and start destroying units\n\t// so we check to make sure that \"space_combat_player_menu\" does not immediately precede us... if\n\t// it does we swap out the instructions, so that both players can pick...\n\t//\n let le = this.game.queue.length-2;\n let lmv = [];\n if (le >= 0) {\n\t lmv = this.game.queue[le].split(\"\\t\");\n\t if (lmv[0] === \"ships_fire\" || lmv[0] == \"infantry_fire\" || lmv[0] == \"pds_fire\") {\n\t let tmple = this.game.queue[le];\n\t let tmple1 = this.game.queue[le+1];\n\t this.game.queue[le] = tmple1;\n\t this.game.queue[le+1] = tmple;\n\t return 1;\n\t }\n\t}\n\n\n let attacker = parseInt(mv[1]);\n let defender = parseInt(mv[2]);\n let type = mv[3]; // space // infantry\n\tlet sector\t = mv[4];\n\tlet planet_idx\t = mv[5]; // \"pds\" for pds shots\n\tif (planet_idx != \"pds\") { planet_idx = parseInt(planet_idx); }\n\tlet total_hits = parseInt(mv[6]);\n\tlet source\t = mv[7]; // pds // bombardment // space_combat // ground_combat // anti_fighter_barrage\n let sys \t = this.returnSectorAndPlanets(sector);\n\n\tthis.game.state.assign_hits_queue_instruction = \"\";\n if (this.game.player == defender) {\n\t this.game.state.assign_hits_queue_instruction = this.game.queue[this.game.queue.length-1];\n\t}\n\n this.game.queue.splice(qe, 1);\n\n\tif (total_hits > 0 ) {\n this.updateStatus(this.returnFaction(defender) + \" is assigning hits to units ... \");\n\t}\n\n if (this.game.state.assign_hits_to_cancel > 0) {\n total_hits -= this.game.state.assign_hits_to_cancel;\n this.game.state.assign_hits_to_cancel = 0;\n\t if (total_hits <= 0) { return 1; }\n }\n\n\tif (planet_idx == \"pds\") {\n\t if (total_hits > 0) {\n\t if (this.game.player == defender) {\n \t this.playerAssignHits(attacker, defender, type, sector, planet_idx, total_hits, source);\n\t return 0;\n\t } else {\n this.updateStatus(this.returnFaction(defender) + \" assigning hits to units ... \");\n\t }\n \t return 0;\n\t } else {\n\t return 1;\n\t }\n\t}\n\n\tif (type == \"anti_fighter_barrage\") {\n\n\t // reduce total hits to fighters in sector\n\t let fighters_in_sector = 0;\n\t let sys = this.returnSectorAndPlanets(sector);\n\t for (let i = 0; i < sys.s.units[defender-1].length; i++) {\n\t if (sys.s.units[defender-1][i].type === \"fighter\") {\n\t fighters_in_sector++;\n\t }\n\t }\n\t if (total_hits > fighters_in_sector) { total_hits = fighters_in_sector; }\n\n\t if (total_hits > 0) {\n\t if (this.game.player == defender) {\n \t this.playerAssignHits(attacker, defender, type, sector, planet_idx, total_hits, source);\n\t return 0;\n\t } else {\n this.updateStatus(this.returnFaction(defender) + \" assigning hits to units ... \");\n\t }\n\t return 0;\n\t } else {\n\t return 1;\n\t }\n\t}\n\n\tif (type == \"space\") {\n\t if (total_hits > 0) {\n\t if (this.game.player == defender) {\n \t this.playerAssignHits(attacker, defender, type, sector, planet_idx, total_hits, source);\n\t return 0;\n\t } else {\n this.updateStatus(this.returnFaction(defender) + \" assigning hits to units ... \");\n\t }\n\t return 0;\n\t } else {\n\t return 1;\n\t }\n\t}\n\n if (type == \"ground\") {\n if (total_hits > 0) {\n\n\t //\n\t // Ground Combat is Automated\n\t //\n this.assignHitsToGroundForces(attacker, defender, sector, planet_idx, total_hits);\n \t this.eliminateDestroyedUnitsInSector(defender, sector);\n \t this.eliminateDestroyedUnitsInSector(attacker, sector);\n\t this.updateSectorGraphics(sector);\n\n let attacker_forces = this.returnNumberOfGroundForcesOnPlanet(attacker, sector, planet_idx);\n let defender_forces = this.returnNumberOfGroundForcesOnPlanet(defender, sector, planet_idx);\n\n //\n // evaluate if planet has changed hands\n //\n if (attacker_forces >= 0 && attacker_forces > defender_forces && defender_forces <= 0) {\n\n //\n // destroy all units belonging to defender (pds, spacedocks)\n //\n if (defender != -1) {\n\t\t//\n\t\t// unless we are infiltrating and get to keep them...\n\t\t//\n\t\tif (this.game.players_info[attacker-1].temporary_infiltrate_infrastructure_on_invasion == 1 || this.game.players_info[attacker-1].temporary_infiltrate_infrastructure_on_invasion == 1) {\n\t\t let infiltration = 0;\n\t\t for (let i = 0; i < sys.p[planet_idx].units[defender-1].length; i++) {\n\t\t if (sys.p[planet_idx].units[defender-1][i].type === \"pds\") {\n\t\t this.addPlanetaryUnit(attacker, sector, planet_idx, \"pds\");\n\t\t infiltration = 1;\n\t\t }\n\t\t if (sys.p[planet_idx].units[defender-1][i].type === \"spacedock\") {\n\t\t this.addPlanetaryUnit(attacker, sector, planet_idx, \"spacedock\");\n\t\t infiltration = 1;\n\t\t }\n\t\t }\n sys.p[planet_idx].units[defender-1] = [];\n\t\t if (infiltration == 1) {\n\t\t this.game.players_info[attacker-1].temporary_infiltrate_infrastructure_on_invasion = 0;\n\t\t }\n\t\t} else {\n sys.p[planet_idx].units[defender-1] = [];\n }\n\n }\n\n //\n // NOTIFY and change ownership (if needed)\n //\n\t if (sys.p[planet_idx].owner == attacker) {\n\n let survivors = imperium_self.returnNumberOfGroundForcesOnPlanet(attacker, sector, planet_idx);\n if (survivors == 1) {\n this.updateLog(sys.p[planet_idx].name + \" defended by \" + this.returnFactionNickname(attacker) + \" (\" + survivors + \" infantry)\");\n } else {\n this.updateLog(sys.p[planet_idx].name + \" defended by \" + this.returnFactionNickname(attacker) + \" (\" + survivors + \" infantry)\");\n }\n\n\t } else {\n\n }\n\n }\n\n\t return 1;\n }\n }\n }\n\n\n\n //\n // update ownership of planet\n //\n if (mv[0] === \"gain_planet\") {\n\n let gainer\t = parseInt(mv[1]);\n\tlet sector\t = mv[2];\n\tlet planet_idx\t = parseInt(mv[3]);\n let sys = this.returnSectorAndPlanets(sector);\n\n this.game.queue.splice(qe, 1);\n\n //\n // note planet lost\n //\n if (sys.p[planet_idx].owner > -1) {\n this.game.players_info[sys.p[planet_idx].owner].lost_planet_this_round = gainer; // player who took it\n\t}\n\n this.updatePlanetOwner(sector, planet_idx, gainer);\n\n }\n\n\n\n\n\n //\n // triggers menu for user to choose how to assign hits\n //\n if (mv[0] === \"destroy_units\") {\n\n let player\t = parseInt(mv[1]);\n\tlet total = parseInt(mv[2]);\n\tlet sector\t = mv[3];\n\tlet capital \t = 0;\n\tif (parseInt(mv[4])) { capital = 1; }\n\n\tif (sector.indexOf(\"_\") > 0) {\n\t let sys = this.returnSectorAndPlanets(sector);\n\t sector = sys.s.sector;\n\t}\n\n this.game.queue.splice(qe, 1);\n\n\tif (total == 1) {\n \t this.updateStatus(this.returnFaction(player) + \" is destroying \"+total+\" unit\");\n\t} else { \n \t this.updateStatus(this.returnFaction(player) + \" is destroying \"+total+\" units\");\n\t}\n\n\tif (this.game.player == player) {\n \t this.playerDestroyUnits(player, total, sector, capital);\n\t}\n\n\treturn 0;\n\n }\n\n\n\n //\n // triggers menu for user to choose how to assign hits\n //\n if (mv[0] === \"destroy_ships\") {\n\n let player\t = parseInt(mv[1]);\n\tlet total = parseInt(mv[2]);\n\tlet sector\t = mv[3];\n\tlet capital \t = 0;\n\tif (parseInt(mv[4])) { capital = 1; }\n\n\tif (sector == undefined) {\n\t sector = this.game.state.activated_sector;\n }\n\n\tif (sector.indexOf(\"_\") > 0) {\n\t let sys = this.returnSectorAndPlanets(sector);\n\t sector = sys.s.sector;\n\t}\n\n this.game.queue.splice(qe, 1);\n\n\tif (total == 1) {\n \t this.updateStatus(this.returnFaction(player) + \" is destroying \"+total+\" ship\");\n\t} else { \n \t this.updateStatus(this.returnFaction(player) + \" is destroying \"+total+\" ships\");\n\t}\n\n\tif (this.game.player == player) {\n \t this.playerDestroyShips(player, total, sector, capital);\n\t}\n\n\treturn 0;\n\n }\n\n\n\n\n if (mv[0] === \"pds_fire\") {\n\n let player = parseInt(mv[1]);\n let attacker = parseInt(mv[2]);\n let sector = mv[3];\n\n this.game.queue.splice(qe, 1);\n\n\t//\n\t// sanity check\n\t//\n\tif (this.doesPlayerHavePDSUnitsWithinRange(attacker, player, sector) == 1) {\t \n\n //\n // get pds units within range\n //\n let battery = this.returnPDSWithinRangeOfSector(attacker, player, sector);\n\n\t let total_shots = 0;\n\t let hits_on = [];\n\t let hits_or_misses = [];\n\t let units_firing = [];\n\n\t let total_hits = 0;\n\t let z = this.returnEventObjects();\n\n\t let unmodified_roll = [];\n \t let modified_roll = [];\n\t let reroll = [];\n\n\t for (let i = 0; i < battery.length; i++) {\n\t if (battery[i].owner == player) {\n \t total_shots++;\n\t hits_on.push(battery[i].combat);\n\t units_firing.push(battery[i].unit);\n\t }\n\t }\n\n\n\t let attacker_best_shot_idx = 0;\n\t let shot_hits_on = 10;\n\t for (let i = 0; i < battery.length; i++) {\n\t if (battery[i].combat < shot_hits_on) {\n\t attacker_best_shot_idx = i;\n\t shot_hits_on = battery[i].combat;\n\t }\n\t }\n\n\n\t for (let i = 0; i < this.game.players_info[player-1].pds_combat_roll_bonus_shots; i++) {\n\n let bs = {};\n bs.name = \"Bonus\";\n bs.unit = JSON.parse(JSON.stringify(battery[attacker_best_shot_idx].unit));\n\t\t bs.unit.name = \"Bonus\";\n bs.range = battery[attacker_best_shot_idx].range;\n bs.combat = battery[attacker_best_shot_idx].combat;\n bs.owner = battery[attacker_best_shot_idx].owner;\n bs.sector = battery[attacker_best_shot_idx].sector;\n\n \t total_shots++;\n\t hits_on.push(bs.combat);\n\t units_firing.push(bs.unit);\n\t }\n\n this.updateLog(this.returnFactionNickname(player) + \" has \" + total_shots + \" PDS shots\");\n\n\n\t for (let s = 0; s < total_shots; s++) {\n\n\t let roll = this.rollDice(10);\n\n\t unmodified_roll.push(roll);\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRoll(this, player, attacker, player, \"pds\", roll);\n\t roll = z[z_index].modifyPDSRoll(this, player, attacker, player, roll);\n\t imperium_self.game.players_info[attacker-1].target_units = z[z_index].modifyTargets(this, attacker, player, imperium_self.game.player, \"pds\", imperium_self.game.players_info[attacker-1].target_units);\n\t }\n\n\t roll += this.game.players_info[player-1].pds_combat_roll_modifier;\n\t roll += this.game.players_info[player-1].temporary_pds_combat_roll_modifier;\n\n modified_roll.push(roll);\n reroll.push(0);\n\n\t if (roll >= hits_on[s]) {\n\t total_hits++;\n\t hits_or_misses.push(1);\n\t } else {\n\t hits_or_misses.push(0);\n\t }\n\t }\n\n\t //\n \t // handle rerolls\n\t //\n\t if (total_hits < total_shots) {\n\n\t let max_rerolls = total_shots - total_hits;\n\t let available_rerolls = this.game.players_info[player-1].combat_dice_reroll + this.game.players_info[player-1].pds_combat_dice_reroll;\n\n\t for (let z_index in z) {\n\t available_rerolls = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"pds\", available_rerolls);\n\t imperium_self.game.players_info[player-1].target_units = z[z_index].modifyTargets(this, attacker, player, imperium_self.game.player, \"pds\", imperium_self.game.players_info[player-1].target_units);\n\t }\n\n\t let attacker_rerolls = available_rerolls;\n\t if (max_rerolls < available_rerolls) {\n\t attacker_rerolls = max_rerolls;\n\t }\n\n\t for (let i = 0; i < attacker_rerolls; i++) {\n\n\t let lowest_combat_hit = 11;\n\t let lowest_combat_idx = 11;\n\n\t for (let n = 0; n < hits_to_misses.length; n++) {\n\t if (hits_on[n] < lowest_combat_hit && hits_or_misses[n] == 0) {\n\t\t lowest_combat_idx = n;\n\t\t lowest_combat_hit = hits_on[n];\n\t\t}\n\t }\n\t \n\t let roll = this.rollDice(10);\n\n\t reroll[lowest_combat_idx] = 1; \n\t unmodified_roll[lowest_combat_idx] = roll; \n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"pds\", roll);\n\t imperium_self.game.players_info[player-1].target_units = z[z_index].modifyTargets(this, attacker, player, imperium_self.game.player, \"pds\", imperium_self.game.players_info[player-1].target_units);\n\t }\n\n\t roll += this.game.players_info[player-1].pds_combat_roll_modifier;\n\t roll += this.game.players_info[player-1].temporary_pds_combat_roll_modifier;\n\t modified_roll[lowest_combat_idx] = roll;\n \n\t if (roll >= hits_on[lowest_combat_idx]) {\n\t total_hits++;\n\t\thits_or_misses[lowest_combat_idx] = 1;\n\t } else {\n\t\thits_or_misses[lowest_combat_idx] = -1;\n\t }\n\t }\n\n\t }\n\t //\n\t // total hits to assign\n\t //\n\t let restrictions = [];\n\n\t this.game.queue.push(\"assign_hits\\t\"+player+\"\\t\"+attacker+\"\\tspace\\t\"+sector+\"\\tpds\\t\"+total_hits+\"\\tpds\");\n\n //\n // create an object with all this information to update our LOG\n //\n let combat_info = {};\n combat_info.attacker = player;\n combat_info.hits_or_misses = hits_or_misses;\n combat_info.hits_or_misses = hits_or_misses;\n combat_info.units_firing = units_firing;\n combat_info.hits_on = hits_on;\n combat_info.unmodified_roll = unmodified_roll; // unmodified roll\n combat_info.modified_roll = modified_roll; // modified roll\n combat_info.reroll = reroll; // rerolls\n\n this.updateCombatLog(combat_info);\n\n\n\t if (total_hits == 1) {\n\t this.updateLog(this.returnFactionNickname(attacker) + \" takes \" + total_hits + \" hit\");\n\t } else {\n\t this.updateLog(this.returnFactionNickname(attacker) + \" takes \" + total_hits + \" hits\");\n\t }\n\n\n\n }\n\n\tthis.updateSectorGraphics(sector);\n\n return 1;\n\n }\n\n\n\n\n\n\n if (mv[0] === \"bombard\") {\n\n\tlet imperium_self = this;\n let attacker = parseInt(mv[1]);\n let sector = mv[2];\n let planet_idx = mv[3];\n\tlet z \t\t = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n\t//\n\t// sanity check\n\t//\n\tif (this.doesPlayerHaveShipsInSector(attacker, sector) == 1) {\t \n\n\t let sys = this.returnSectorAndPlanets(sector);\n\t let defender = sys.p[planet_idx].owner;\n\t let hits_to_assign = 0;\n\t let total_shots = 0;\n\t let hits_or_misses = [];\n\t let hits_on = [];\n\n\t let bonus_shots = 0;\n\n\t for (let i = 0; i < sys.p[planet_idx].units[attacker-1].length; i++) {\n\t if (sys.p[planet_idx].units[attacker-1][i].bombardment_rolls > 0) {\n\t for (let b = 0; b < sys.p[planet_idx].units[attacker-1][i].bombardment_rolls; b++) {\n\n\t let roll = this.rollDice(10);\n \t for (z_index in z) { roll = z[z_index].modifyCombatRoll(imperium_self, attacker, sys.p[planet_idx].owner, this.game.player, \"bombardment\", roll); }\n\n \t roll += this.game.players_info[attacker-1].bombardment_roll_modifier;\n\t roll += this.game.players_info[attacker-1].temporary_bombardment_roll_modifier;\n\t roll += this.game.players_info[attacker-1].combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][i].temporary_combat_modifier;\n\n\t if (roll >= sys.p[planet_idx].units[attacker-1][i].bombardment_combat) {\n\t\t hits_to_assign++;\n\t\t hits_or_misses.push(1);\n\t\t hits_on.push(sys.p[planet_idx].units[attacker-1][i].bombardment_combat);\n\t } else {\n\t\t hits_or_misses.push(0);\n\t\t hits_on.push(sys.p[planet_idx].units[attacker-1][i].bombardment_combat);\n\t }\n\t }\n\t }\n\t }\n\n\t //\n\t // bonus hits on is lowest attacking unit\n\t //\n\t let bonus_hits_on = 10;\n\t for (let i = 0; i < hits_on.length; i++) {\n\t if (hits_on[i] < bonus_hits_on) {\n\t bonus_hits_on = hits_on[i];\n\t }\n\t }\n\n\t bonus_shots += this.game.players_info[attacker-1].bombardment_combat_roll_bonus_shots;\n\t for (let i = hits_or_misses.length; i < hits_or_misses.length+bonus_shots; i++) {\n\t \n\t let roll = this.rollDice(10);\n \t for (z_index in z) { roll = z[z_index].modifyCombatRoll(imperium_self, attacker, sys.p[planet_idx].owner, this.game.player, \"bombardment\", roll); }\n\n \t roll += this.game.players_info[attacker-1].bombardment_roll_modifier;\n\t roll += this.game.players_info[attacker-1].temporary_bombardment_roll_modifier;\n\t roll += this.game.players_info[attacker-1].combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][i].temporary_combat_modifier;\n\n\t if (roll >= bonus_hits_on) {\n\t hits_to_assign++;\n\t hits_or_misses.push(1);\n\t hits_on.push(sys.p[planet_idx].units[attacker-1][i].bombardment_combat);\n\t } else {\n\t hits_or_misses.push(0);\n\t hits_on.push(bonus_hits_on);\n\t }\n\t }\n\n\n\n\n\t //\n \t // handle rerolls\n\t //\n\t if (hits_to_assign < total_shots) {\n\n\t let max_rerolls = hits_to_assign - total_hits;\n\t let available_rerolls = this.game.players_info[attacker-1].combat_dice_reroll + this.game.players_info[attacker-1].bombardment_combat_dice_reroll;\n\n\t for (let z_index in z) {\n\t available_rerolls = z[z_index].modifyCombatRerolls(this, attacker, defender, player, \"bombardment\", available_rerolls);\n\t }\n\n\t let attacker_rerolls = available_rerolls;\n\t if (max_rerolls < available_rerolls) {\n\t attacker_rerolls = max_rerolls;\n\t }\n\n\t for (let i = 0; i < attacker_rerolls; i++) {\n\n\t let lowest_combat_hit = 11;\n\t let lowest_combat_idx = 11;\n\n\t for (let n = 0; n < hits_to_misses.length; n++) {\n\t if (hits_on[n] < lowest_combat_hit && hits_or_misses[n] == 0) {\n\t\t lowest_combat_idx = n;\n\t\t lowest_combat_hit = hits_on[n];\n\t\t}\n\t }\n\t \n\t let roll = this.rollDice(10);\n \n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"space\", roll);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"space\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n \t for (z_index in z) { roll = z[z_index].modifyCombatRoll(imperium_self, attacker, sys.p[planet_idx].owner, this.game.player, \"bombardment\", roll); }\n \t roll += this.game.players_info[attacker-1].bombardment_roll_modifier;\n\t roll += this.game.players_info[attacker-1].temporary_bombardment_roll_modifier;\n\t roll += this.game.players_info[attacker-1].combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][lowest_combat_idx].temporary_combat_modifier;\n\n\t if (roll >= hits_on[lowest_combat_idx]) {\n\t hits_to_assign++;\n\t\thits_or_misses[lowest_combat_idx] = 1;\n\t } else {\n\t\thits_or_misses[lowest_combat_idx] = -1;\n\t }\n\t }\n\t }\n\n\t if (hits_to_assign == 1) {\n\t this.updateLog(\"Bombardment produces \" + hits_to_assign + \" hit\");\n\t } else {\n\t this.updateLog(\"Bombardment produces \" + hits_to_assign + \" hits\");\n\t }\n\n this.game.queue.push(\"assign_hits\\t\"+attacker+\"\\t\"+sys.p[planet_idx].owner+\"\\tground\\t\"+sector+\"\\t\"+planet_idx+\"\\t\"+hits_to_assign+\"\\tbombardment\");\n\n }\n\n return 1;\n\n }\n\n\n\n\n\n\n\n if (mv[0] === \"ships_fire\") {\n\n\t//\n\t// we need to permit both sides to play action cards before they fire and start destroying units\n\t// so we check to make sure that \"space_combat_player_menu\" does not immediately precede us... if\n\t// it does we swap out the instructions, so that both players can pick...\n\t//\n let le = this.game.queue.length-2;\n let lmv = [];\n if (le >= 0) {\n\t lmv = this.game.queue[le].split(\"\\t\");\n\t if (lmv[0] === \"space_combat_player_menu\") {\n\t let tmple = this.game.queue[le];\n\t let tmple1 = this.game.queue[le+1];\n\t this.game.queue[le] = tmple1;\n\t this.game.queue[le+1] = tmple;\n\t return 1;\n\t }\n\t}\n\n\tlet player \t = imperium_self.game.player;\n let attacker = parseInt(mv[1]);\n let defender = parseInt(mv[2]);\n let sector = mv[3];\n\tlet sys \t = this.returnSectorAndPlanets(sector);\n\tlet z \t\t = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n\t//\n\t// sanity check\n\t//\n\tif (this.doesPlayerHaveShipsInSector(attacker, sector) == 1) {\t \n\n\t let total_shots = 0;\n\t let total_hits = 0;\n\t let hits_or_misses = [];\n\t let hits_on = [];\n\t let units_firing = [];\n\t let unmodified_roll = [];\n\t let modified_roll = [];\n\t let reroll = [];\n\n\t //\n\t // then the rest\n\t //\n\t for (let i = 0; i < sys.s.units[attacker-1].length; i++) {\n\t //\n\t // repeat for N shots (i.e. Warsuns hit 3x)\n\t //\n\t for (let shots = 0; shots < sys.s.units[attacker-1][i].shots; shots++) {\n\t //\n\t // skip if unit is toast\n\t //\n if (sys.s.units[attacker-1][i].strength > 0) {\n\n\t let roll = this.rollDice(10);\n\n\t unmodified_roll.push(roll);\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRoll(this, attacker, defender, attacker, \"space\", roll);\n\t total_hits = z[z_index].modifyUnitHits(this, attacker, defender, attacker, \"space\", sys.s.units[attacker-1][i], roll, total_hits);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"space\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t roll += this.game.players_info[attacker-1].space_combat_roll_modifier;\n\t roll += this.game.players_info[attacker-1].temporary_space_combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][i].temporary_combat_modifier;\n\n\t modified_roll.push(roll);\n\t reroll.push(0);\n\n\t if (roll >= sys.s.units[attacker-1][i].combat) {\n\t total_hits++;\n\t total_shots++;\n\t hits_on.push(sys.s.units[attacker-1][i].combat);\n\t hits_or_misses.push(1);\n\t units_firing.push(sys.s.units[attacker-1][i]);\n\t } else {\n\t total_shots++;\n\t hits_or_misses.push(0);\n\t hits_on.push(sys.s.units[attacker-1][i].combat);\n\t units_firing.push(sys.s.units[attacker-1][i]);\n\t }\n\n\t }\n\t }\n\t }\n\n\t //\n \t // handle rerolls\n\t //\n\t if (total_hits < total_shots) {\n\n\t let max_rerolls = total_shots - total_hits;\n\t let available_rerolls = this.game.players_info[attacker-1].combat_dice_reroll + this.game.players_info[attacker-1].space_combat_dice_reroll;\n\n\t for (let z_index in z) {\n\t available_rerolls = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"space\", available_rerolls);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"space\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t let attacker_rerolls = available_rerolls;\n\t if (max_rerolls < available_rerolls) {\n\t attacker_rerolls = max_rerolls;\n\t }\n\n\t for (let i = 0; i < attacker_rerolls; i++) {\n\n\t let lowest_combat_hit = 11;\n\t let lowest_combat_idx = 11;\n\t let rerolling_unit = null;\n\n\t for (let n = 0; n < hits_to_misses.length; n++) {\n\t if (hits_on[n] < lowest_combat_hit && hits_or_misses[n] == 0) {\n\t\t lowest_combat_idx = n;\n\t\t lowest_combat_hit = hits_on[n];\n\t rerolling_unit = units_firing[n];;\n\t\t}\n\t }\n\t \n\t let roll = this.rollDice(10);\n\n\t unmodified_roll[lowest_combat_idx] = roll;\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"space\", roll);\n\t total_hits = z[z_index].modifyUnitHits(this, attacker, defender, attacker, \"space\", rerolling_unit, roll, total_hits);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"space\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t roll += this.game.players_info[player-1].space_combat_roll_modifier;\n\t roll += this.game.players_info[player-1].temporary_space_combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][lowest_combat_idx].temporary_combat_modifier;\n\n\t modified_roll[lowest_combat_idx] = roll;\n\t reroll[lowest_combat_idx] = 1;\n\n\t if (roll >= hits_on[lowest_combat_idx]) {\n\t total_hits++;\n\t\thits_or_misses[lowest_combat_idx] = 1;\n\t } else {\n\t\thits_or_misses[lowest_combat_idx] = -1;\n\t }\n\t }\n\n\t }\n\n\t //\n\t // create an object with all this information to update our LOG\n\t //\n\t let combat_info = {};\n combat_info.attacker = attacker;\n\t combat_info.hits_or_misses = hits_or_misses;\n\t combat_info.units_firing \t = units_firing;\n\t combat_info.hits_on \t = hits_on;\n\t combat_info.unmodified_roll = unmodified_roll; // unmodified roll\n\t combat_info.modified_roll = modified_roll; // modified roll\n\t combat_info.reroll \t = reroll; // rerolls\n\n\t this.updateCombatLog(combat_info);\n\n\t //\n\t // total hits to assign\n\t //\n\t let restrictions = [];\n\n\t if (total_hits == 1) {\n \t this.updateLog(this.returnFactionNickname(attacker) + \": \" + total_hits + \" hit\");\n\t } else {\n \t this.updateLog(this.returnFactionNickname(attacker) + \": \" + total_hits + \" hits\");\n\t }\n\t this.game.queue.push(\"assign_hits\\t\"+attacker+\"\\t\"+defender+\"\\tspace\\t\"+sector+\"\\tspace\\t\"+total_hits+\"\\tspace_combat\");\n\n }\n\n return 1;\n\n }\n\n\n\n\n\n if (mv[0] === \"infantry_fire\") {\n\n\t//\n\t// we need to permit both sides to play action cards before they fire and start destroying units\n\t// so we check to make sure that \"ground_combat_player_menu\" does not immediately precede us... if\n\t// it does we swap out the instructions, so that both players can play action cards before the \n\t// shooting starts...\n\t//\n let le = this.game.queue.length-2;\n let lmv = [];\n if (le >= 0) {\n\t lmv = this.game.queue[le].split(\"\\t\");\n\t if (lmv[0] === \"ground_combat_player_menu\") {\n\t let tmple = this.game.queue[le];\n\t let tmple1 = this.game.queue[le+1];\n\t this.game.queue[le] = tmple1;\n\t this.game.queue[le+1] = tmple;\n\t //\n\t // \n\t //\n\t return 1;\n\t }\n\t}\n\n\tlet player \t = imperium_self.game.player;\n let attacker = parseInt(mv[1]);\n let defender = parseInt(mv[2]);\n let sector = mv[3];\n let planet_idx = mv[4];\n\tlet sys \t = this.returnSectorAndPlanets(sector);\n\tlet z \t\t = this.returnEventObjects();\n\n this.game.queue.splice(qe, 1);\n\n\n\t//\n\t// sanity check\n\t//\n\tif (this.doesPlayerHaveInfantryOnPlanet(attacker, sector, planet_idx) == 1) {\t \n\n\t let total_shots = 0;\n\t let total_hits = 0;\n\t let hits_or_misses = [];\n\t let hits_on = [];\n let units_firing = [];\n let unmodified_roll = [];\n let modified_roll = [];\n let reroll = [];\n\n\n\t //\n\t // then the rest\n\t //\n\t for (let i = 0; i < sys.p[planet_idx].units[attacker-1].length; i++) {\n\t if (sys.p[planet_idx].units[attacker-1][i].type == \"infantry\" && sys.p[planet_idx].units[attacker-1][i].destroyed == 0) {\n\n\t units_firing.push(sys.p[planet_idx].units[attacker-1][i]);\n\n\t let roll = this.rollDice(10);\n\n\t unmodified_roll.push(roll);\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRoll(this, attacker, defender, attacker, \"ground\", roll);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"ground\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t roll += this.game.players_info[attacker-1].ground_combat_roll_modifier;\n\t roll += this.game.players_info[attacker-1].temporary_ground_combat_roll_modifier;\n\t roll += sys.p[planet_idx].units[attacker-1][i].temporary_combat_modifier;\n\n\t modified_roll.push(roll);\n\t reroll.push(0);\n\n\t if (roll >= sys.p[planet_idx].units[attacker-1][i].combat) {\n\t total_hits++;\n\t total_shots++;\n\t hits_or_misses.push(1);\n\t hits_on.push(sys.p[planet_idx].units[attacker-1][i].combat);\n\t } else {\n\t total_shots++;\n\t hits_or_misses.push(0);\n\t hits_on.push(sys.p[planet_idx].units[attacker-1][i].combat);\n\t }\n\n\t }\n\t }\n\n\n\t //\n \t // handle rerolls\n\t //\n\t if (total_hits < total_shots) {\n\n\t let max_rerolls = total_shots - total_hits;\n\t let available_rerolls = this.game.players_info[attacker-1].combat_dice_reroll + this.game.players_info[attacker-1].ground_combat_dice_reroll;\n\n\t for (let z_index in z) {\n\t available_rerolls = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"ground\", available_rerolls);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"ground\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t let attacker_rerolls = available_rerolls;\n\t if (max_rerolls < available_rerolls) {\n\t attacker_rerolls = max_rerolls;\n\t }\n\n\t for (let i = 0; i < attacker_rerolls; i++) {\n\n\t let lowest_combat_hit = 11;\n\t let lowest_combat_idx = 11;\n\n\t for (let n = 0; n < hits_to_misses.length; n++) {\n\t if (hits_on[n] < lowest_combat_hit && hits_or_misses[n] == 0) {\n\t\t lowest_combat_idx = n;\n\t\t lowest_combat_hit = hits_on[n];\n\t\t}\n\t }\n\t \n\t let roll = this.rollDice(10);\n\n\t unmodified_roll[lowest_combat_idx] = roll;\n\t reroll[lowest_combat_idx] = 1;\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"ground\", roll);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"ground\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t roll += this.game.players_info[player-1].ground_combat_roll_modifier;\n\t roll += this.game.players_info[player-1].temporary_ground_combat_roll_modifier;\n\t roll += sys.p[planet_idx].units[attacker-1][lowest_combat_idx].temporary_combat_modifier;\n\n\t modified_roll[lowest_combat_idx] = roll;\n\n\t if (roll >= hits_on[lowest_combat_idx]) {\n\t total_hits++;\n\t\thits_or_misses[lowest_combat_idx] = 1;\n\t } else {\n\t\thits_or_misses[lowest_combat_idx] = -1;\n\t }\n\t }\n\n\t }\n\n\t //\n\t // create an object with all this information to update our LOG\n\t //\n\t let combat_info = {};\n\t combat_info.attacker = attacker;\n\t combat_info.hits_or_misses = hits_or_misses;\n\t combat_info.units_firing \t = units_firing;\n\t combat_info.hits_on \t = hits_on;\n\t combat_info.unmodified_roll = unmodified_roll; // unmodified roll\n\t combat_info.modified_roll = modified_roll; // modified roll\n\t combat_info.reroll \t = reroll; // rerolls\n\n\t this.updateCombatLog(combat_info);\n\n\n\t //\n\t // total hits to assign\n\t //\n\t let restrictions = [];\n\n\t if (total_hits == 1) {\n \t this.updateLog(this.returnFactionNickname(attacker) + \": \" + total_hits + \" hit\");\n\t } else {\n \t this.updateLog(this.returnFactionNickname(attacker) + \": \" + total_hits + \" hits\");\n\t }\n\t this.game.queue.push(\"assign_hits\\t\"+attacker+\"\\t\"+defender+\"\\tground\\t\"+sector+\"\\t\"+planet_idx+\"\\t\"+total_hits+\"\\tground_combat\");\n\n\n }\n\n return 1;\n\n }\n\n\n\n\n\n\n //////////////////\n // SPACE COMBAT //\n //////////////////\n if (mv[0] === \"space_invasion\") {\n \n \tlet player = mv[1];\n \tlet sector = mv[2];\n this.game.queue.splice(qe, 1);\n\n this.game.state.space_combat_sector = sector;\n\n\t//\n\t// unpack space ships\n\t//\n\tthis.unloadStoredShipsIntoSector(player, sector);\n\n\t//\n\t// initialize variables for \n\t//\n\tthis.game.state.space_combat_round = 0;\n\tthis.game.state.space_combat_ships_destroyed_attacker = 0;\n\tthis.game.state.space_combat_ships_destroyed_defender = 0;\n\t\n\n \tif (player == this.game.player) {\n\t this.addMove(\"continue\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"space_combat_end\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"space_combat_post\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"space_combat\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"space_combat_start\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"anti_fighter_barrage\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"pds_space_defense_post\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"pds_space_defense\\t\"+player+\"\\t\"+sector);\n\t this.endTurn();\n\t}\n\n return 0;\n\n }\n if (mv[0] === \"space_combat_start\") {\n\n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// reset \n\t//\n\tthis.resetTargetUnits();\n this.game.state.space_combat_attacker = -1;\n this.game.state.space_combat_defender = -1;\n this.game.state.space_combat_retreats = [];\n\n\n \treturn 1;\n }\n if (mv[0] === \"space_combat_end\") {\n\n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n\n \tif (this.hasUnresolvedSpaceCombat(player, sector) == 1) {\n\t if (this.game.player == player) {\n\t this.addMove(\"space_combat_post\\t\"+player+\"\\t\"+sector);\n\t this.addMove(\"space_combat\\t\"+player+\"\\t\"+sector);\n\n\t if (this.game.state.space_combat_defender != -1) {\n\t let z = this.returnEventObjects();\n\t for (let z_index in z) {\n\t z[z_index].spaceCombatRoundEnd(this, this.game.state.space_combat_attacker, this.game.state.space_combat_defender, sector);\n\t }\n\t }\n\n\t this.endTurn();\n\t return 0;\n\t } else {\n\n\t //\n\t // maybe defender will score secret objective? - Nov 24\n\t //\n\t if (this.game.state.space_combat_defender != -1) {\n\t let z = this.returnEventObjects();\n\t for (let z_index in z) {\n\t z[z_index].spaceCombatRoundEnd(this, this.game.state.space_combat_attacker, this.game.state.space_combat_defender, sector);\n\t }\n\t }\n\n\t return 0;\n\t }\n\t} else {\n\n\t if (this.game_space_combat_defender == 1) {\n this.game.queue.push(\"space_combat_over_player_menu\\t\"+this.game.state.space_combat_defender+\"\\t\"+sector);\n \t } else {\n this.game.queue.push(\"space_combat_over_player_menu\\t\"+this.game.state.space_combat_attacker+\"\\t\"+sector);\n\t }\n\n \t this.game.queue.splice(qe, 1);\n\n if (this.game.state.space_combat_defender != -1) {\n let z = this.returnEventObjects();\n for (let z_index in z) {\n z[z_index].spaceCombatRoundEnd(this, this.game.state.space_combat_attacker, this.game.state.space_combat_defender, sector);\n }\n }\n\n\t if (this.game.player == player) {\n\t this.endTurn();\n\t }\n\n\t return 0;\n\t}\n\n \treturn 1;\n }\n if (mv[0] === \"space_combat\") {\n \n \tlet player = mv[1];\n let sector = mv[2];\n\tlet z \t\t = this.returnEventObjects();\n\n \tthis.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].spaceCombatTriggers(this, speaker_order[i], sector) == 1) {\n\t this.game.queue.push(\"space_combat_event\\t\"+speaker_order[i]+\"\\t\"+sector+\"\\t\"+k);\n }\n }\n }\n \treturn 1;\n }\n if (mv[0] === \"space_combat_event\") {\n \n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n let z_index = parseInt(mv[3]);\n \tthis.game.queue.splice(qe, 1);\n\n\treturn z[z_index].spaceCombatEvent(this, player, sector);\n\n }\n\n\n if (mv[0] === \"space_combat_post\") {\n\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n this.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// have a round of space combat\n\t//\n\tthis.game.state.space_combat_round++;\n\tthis.game.state.assign_hits_to_cancel = 0;\n\n\tfor (let i = 0; i < this.game.players_info.length; i++) {\n\t this.game.players_info[i].units_i_destroyed_last_combat_round = this.game.players_info[i].units_i_destroyed_last_combat_round;\n\t this.game.players_info[i].units_i_destroyed_this_combat_round = [];\n\t this.game.players_info[i].my_units_destroyed_last_combat_round = this.game.players_info[i].my_units_destroyed_last_combat_round;\n\t this.game.players_info[i].my_units_destroyed_this_combat_round = [];\n\t}\n\n\t//\n\t// who is the defender?\n\t//\n\tlet defender = this.returnDefender(player, sector);\n\n\t//\n\t// if there is no defender, end this charade\n\t//\n\tif (defender == -1) {\n\t return 1;\n\t}\n\n\t//\n\t// space units combat temporary modifiers set to 0\n\t//\n this.resetSpaceUnitTemporaryModifiers(sector);\n\n\n\tthis.game.state.space_combat_attacker = player;\n\tthis.game.state.space_combat_defender = defender;\n\n\t//\n\t// check that attacker and defender both have ships\n\t//\n if (this.doesPlayerHaveShipsInSector(player, sector) != 1 || this.doesPlayerHaveShipsInSector(defender, sector) != 1) {\n\t //\n\t // we can skip the combat as there is none\n\t //\n\t return 1;\n\t}\n\n\n\t//\n\t// otherwise, process combat\n\t//\n\tthis.updateLog(\"Space Combat: round \" + this.game.state.space_combat_round);\n\n\tthis.game.queue.push(\"space_combat_player_menu\\t\"+defender+\"\\t\"+player+\"\\t\"+sector);\n\tthis.game.queue.push(\"space_combat_player_menu\\t\"+player+\"\\t\"+defender+\"\\t\"+sector);\n\n return 1;\n\n }\n\n\n\n if (mv[0] === \"anti_fighter_barrage\") {\n\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n let sys = this.returnSectorAndPlanets(sector);\n let z = this.returnEventObjects();\n\n let attacker\t = player;\n let defender\t = -1;\n\n\tfor (let i = 0; i < sys.s.units.length; i++) {\n\t if ((i+1) != player) {\n\t if (sys.s.units[i].length > 0) {\n\t defender = (i+1);\n\t i = sys.s.units.length+1;\n\t }\n\t }\n\t}\n\n this.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n\n\tif (defender != -1) {\n\n this.game.queue.push(\"anti_fighter_barrage_post\\t\"+player+\"\\t\"+defender+\"\\t\"+attacker+\"\\t\"+sector);\n let speaker_order = this.returnSpeakerOrder();\n \t for (let i = 0; i < speaker_order.length; i++) {\n \t for (let k = 0; k < z.length; k++) {\n\t if (z[k].antiFighterBarrageEventTriggers(this, speaker_order[i], defender, attacker, sector) == 1) {\n this.game.queue.push(\"anti_fighter_barrage_event\\t\"+speaker_order[i]+\"\\t\"+defender+\"\\t\"+attacker+\"\\t\"+sector+\"\\t\"+k);\n }\n }\n }\n\n this.game.queue.push(\"anti_fighter_barrage_post\\t\"+player+\"\\t\"+attacker+\"\\t\"+defender+\"\\t\"+sector);\n \t for (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].antiFighterBarrageEventTriggers(this, speaker_order[i], attacker, defender, sector) == 1) {\n this.game.queue.push(\"anti_fighter_barrage_event\\t\"+speaker_order[i]+\"\\t\"+attacker+\"\\t\"+defender+\"\\t\"+sector+\"\\t\"+k);\n }\n }\n }\n }\n\n \treturn 1;\n }\n\n if (mv[0] === \"anti_fighter_barrage_event\") {\n \n \tlet player = parseInt(mv[1]);\n let attacker\t = mv[2];\n let defender\t = mv[3];\n let sector\t = mv[4];\n let z_index\t = mv[5];\n\n let z = this.returnEventObjects();\n \tthis.game.queue.splice(qe, 1);\n\treturn z[z_index].antiFighterBarrageEvent(this, player, attacker, defender, sector);\n\n }\n if (mv[0] === \"anti_fighter_barrage_post\") {\n\n \tlet player = parseInt(mv[1]);\n \tlet attacker = parseInt(mv[2]);\n \tlet defender = parseInt(mv[3]);\n let sector\t = mv[4];\n let sys = this.returnSectorAndPlanets(sector);\n sector\t = sys.s.sector;\n\n\t//\n\t// sanity check\n\t//\n\tif (this.doesPlayerHaveShipsInSector(attacker, sector) == 1) {\t \t\n\tif (this.doesPlayerHaveAntiFighterBarrageInSector(attacker, sector) == 1) {\t \n\t\n\t //\n\t // update log\n\t //\n this.updateLog(this.returnFactionNickname(attacker) + \" anti-fighter barrage...\");\n\n\t let total_shots = 0;\n\t let total_hits = 0;\n\t let hits_or_misses = [];\n\t let hits_on = [];\n\t let units_firing = [];\n\t let unmodified_roll = [];\n\t let modified_roll = [];\n\t let reroll = [];\n\n\t //\n\t // then the rest\n\t //\n\t for (let i = 0; i < sys.s.units[attacker-1].length; i++) {\n\t // skip if unit is toast or lacks fighter barrage\n\n if (sys.s.units[attacker-1][i].strength > 0 && sys.s.units[attacker-1][i].anti_fighter_barrage > 0) {\n\n for (let b = 0; b < sys.s.units[attacker-1][i].anti_fighter_barrage; b++) {\n\n\t let roll = this.rollDice(10);\n\n\t unmodified_roll.push(roll);\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRoll(this, attacker, defender, attacker, \"anti_fighter_barrage\", roll);\n\t total_hits = z[z_index].modifyUnitHits(this, attacker, defender, attacker, \"anti_fighter_barrage\", sys.s.units[attacker-1][i], roll, total_hits);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"anti_fighter_barrage\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t roll += this.game.players_info[attacker-1].space_combat_roll_modifier;\n\t roll += this.game.players_info[attacker-1].temporary_space_combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][i].temporary_combat_modifier;\n\n\t modified_roll.push(roll);\n\t reroll.push(0);\n\n\t if (roll >= sys.s.units[attacker-1][i].anti_fighter_barrage_combat) {\n\t total_hits++;\n\t total_shots++;\n\t hits_on.push(sys.s.units[attacker-1][i].anti_fighter_barrage_combat);\n\t hits_or_misses.push(1);\n\t units_firing.push(sys.s.units[attacker-1][i]);\n\t } else {\n\t total_shots++;\n\t hits_or_misses.push(0);\n\t hits_on.push(sys.s.units[attacker-1][i].anti_fighter_barrage_combat);\n\t units_firing.push(sys.s.units[attacker-1][i]);\n\t }\n\n \t }\n\n\t //\n \t // handle rerolls\n\t //\n\t if (total_hits < total_shots) {\n\n\t let max_rerolls = total_shots - total_hits;\n\t let available_rerolls = this.game.players_info[attacker-1].combat_dice_reroll + this.game.players_info[attacker-1].space_combat_dice_reroll;\n\n\t for (let z_index in z) {\n\t available_rerolls = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"anti_fighter_barrage\", available_rerolls);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"anti_fighter_barrage\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t let attacker_rerolls = available_rerolls;\n\t if (max_rerolls < available_rerolls) {\n\t attacker_rerolls = max_rerolls;\n\t }\n\n\t for (let i = 0; i < attacker_rerolls; i++) {\n\n\t let lowest_combat_hit = 11;\n\t let lowest_combat_idx = 11;\n\t let rerolling_unit = null;\n\n\t for (let n = 0; n < hits_to_misses.length; n++) {\n\t if (hits_on[n] < lowest_combat_hit && hits_or_misses[n] == 0) {\n\t \t lowest_combat_idx = n;\n\t\t lowest_combat_hit = hits_on[n];\n\t rerolling_unit = units_firing[n];;\n\t\t }\n\t }\n\t \n\t let roll = this.rollDice(10);\n\n\t unmodified_roll[lowest_combat_idx] = roll;\n\n\t for (let z_index in z) {\n\t roll = z[z_index].modifyCombatRerolls(this, player, attacker, player, \"anti_fighter_barrage\", roll);\n\t total_hits = z[z_index].modifyUnitHits(this, attacker, defender, attacker, \"space\", rerolling_unit, roll, total_hits);\n\t imperium_self.game.players_info[defender-1].target_units = z[z_index].modifyTargets(this, attacker, defender, imperium_self.game.player, \"space\", imperium_self.game.players_info[defender-1].target_units);\n\t }\n\n\t roll += this.game.players_info[player-1].space_combat_roll_modifier;\n\t roll += this.game.players_info[player-1].temporary_space_combat_roll_modifier;\n\t roll += sys.s.units[attacker-1][lowest_combat_idx].temporary_combat_modifier;\n\n\t modified_roll[lowest_combat_idx] = roll;\n\t reroll[lowest_combat_idx] = 1;\n\n\t if (roll >= hits_on[lowest_combat_idx]) {\n\t total_hits++;\n\t \t hits_or_misses[lowest_combat_idx] = 1;\n\t } else {\n\t \t hits_or_misses[lowest_combat_idx] = -1;\n\t }\n\t }\n\n\t } // per anti_fighter_barrageif attacking unit not dead\n\t } // if attacking unit not dead\n\t } // for all attacking units\n\n\t //\n\t // create an object with all this information to update our LOG\n\t //\n\t let combat_info = {};\n\t combat_info.attacker = attacker;\n\t combat_info.hits_or_misses = hits_or_misses;\n\t combat_info.units_firing \t = units_firing;\n\t combat_info.hits_on \t = hits_on;\n\t combat_info.unmodified_roll = unmodified_roll; // unmodified roll\n\t combat_info.modified_roll = modified_roll; // modified roll\n\t combat_info.reroll \t = reroll; // rerolls\n\n\t this.updateCombatLog(combat_info);\n\n\t //\n\t // total hits to assign\n\t //\n\t let restrictions = [];\n\n\t this.game.queue.push(\"assign_hits\\t\"+attacker+\"\\t\"+defender+\"\\tanti_fighter_barrage\\t\"+sector+\"\\tanti_fighter_barrage\\t\"+total_hits+\"\\tanti_fighter_barrage\");\n\t if (total_hits == 1) {\n \t this.updateLog(this.returnFactionNickname(attacker) + \": \" + total_hits + \" hit\");\n\t this.game.queue.push(\"ACKNOWLEDGE\\t\"+imperium_self.returnFaction(attacker)+\" launches anti-fighter-barrage (\"+total_hits+\" hit)\");\n\t } else {\n \t this.updateLog(this.returnFactionNickname(attacker) + \": \" + total_hits + \" hits\");\n\t this.game.queue.push(\"ACKNOWLEDGE\\t\"+imperium_self.returnFaction(attacker)+\" launches anti-fighter-barrage (\"+total_hits+\" hits)\");\n\t }\n\n } // does have anti fighter barrage in sector\n } // does have ships in sector\n\n \tthis.game.queue.splice(qe, 1);\n return 1;\n\n }\n\n\n\n if (mv[0] === \"space_combat_over_player_menu\") {\n\n\tlet player\t = parseInt(mv[1]);\n\tlet sector \t = mv[2];\n this.game.queue.splice(qe, 1);\n\n\tif (this.game.player == player) {\n this.playerPlaySpaceCombatOver(player, sector);\n\t}\n\n\treturn 1;\n\n }\n\n\n if (mv[0] === \"space_combat_player_menu\") {\n\n let attacker = parseInt(mv[1]);\n let defender = parseInt(mv[2]);\n let sector = mv[3];\n this.game.queue.splice(qe, 1);\n\n this.updateSectorGraphics(sector);\n\n\tif (this.game.player == attacker) {\n this.playerPlaySpaceCombat(attacker, defender, sector); \n\t}\n\n return 0;\n }\n\n\n\n if (mv[0] === \"ground_combat_over_player_menu\") {\n\n\tlet player\t = parseInt(mv[1]);\n\tlet sector \t = mv[2];\n\tlet planet_idx \t = parseInt(mv[3]);\n\n this.game.queue.splice(qe, 1);\n\n\n\tif (this.game.player == player) {\n this.playerPlayGroundCombatOver(player, sector, planet_idx);\n\t}\n\n\treturn 1;\n\n }\n\n\n if (mv[0] === \"ground_combat_player_menu\") {\n\n let attacker = parseInt(mv[1]);\n let defender = parseInt(mv[2]);\n let sector = mv[3];\n let planet_idx = mv[4];\n this.game.queue.splice(qe, 1);\n\n this.updateSectorGraphics(sector);\n\n\tif (this.game.player == attacker) {\n this.playerPlayGroundCombat(attacker, defender, sector, planet_idx);\n\t return 0;\n\t}\n\n return 0;\n }\n\n\n\n\n\n\n\n\n /////////////////\n // BOMBARDMENT //\n /////////////////\n if (mv[0] === \"bombardment\") {\n \n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n\tlet z\t\t = this.returnEventObjects();\n\n \tthis.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].bombardmentTriggers(this, speaker_order[i], player, sector, planet_idx) == 1) {\n\t this.game.queue.push(\"bombardment_event\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+sector+\"\\t\"+planet_idx+\"\\t\"+k);\n }\n }\n }\n \treturn 1;\n }\n if (mv[0] === \"bombardment_event\") {\n \n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n \tlet bombarding_player = parseInt(mv[2]);\n let sector\t = mv[3];\n let planet_idx\t = mv[4];\n let z_index\t = parseInt(mv[5]);\n\n \tthis.game.queue.splice(qe, 1);\n\n\treturn z[z_index].bombardmentEvent(this, player, bombarding_player, sector, planet_idx);\n\n }\n if (mv[0] === \"bombardment_post\") {\n\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n\tlet planet_idx = mv[3];\n\n this.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n\n let sys = this.returnSectorAndPlanets(sector);\n\tlet planet_owner = sys.p[planet_idx].owner;\n\n let is_there_bombardment = 0;\n\n\tif (planet_owner == -1 ) {\n\n\t return 1;\n\n\t} else {\n\n\t if (this.doesSectorContainPlayerUnit(player, sector, \"dreadnaught\") || this.doesSectorContainPlayerUnit(player, sector, \"warsun\")) {\n\t if (this.game.player == player) {\n\t this.playerPlayBombardment(player, sector, planet_idx);\n\t }\n\t return 0;\n }\n\t}\n\n\t//\n\t// wait for bombardment notice\n\t//\n\treturn 1;\n\n }\n\n\n\n ///////////////////////\n // PLANETARY DEFENSE //\n ///////////////////////\n if (mv[0] === \"planetary_defense\") {\n \n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n\tlet z\t\t = this.returnEventObjects();\n\n \tthis.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].planetaryDefenseTriggers(this, player, sector, planet_idx) == 1) {\n this.game.queue.push(\"planetary_defense_event\\t\"+speaker_order[i]+\"\\t\"+sector+\"\\t\"+planet_idx+\"\\t\"+k);\n }\n }\n }\n \treturn 1;\n }\n if (mv[0] === \"planetary_defense_event\") {\n \n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n let planet_idx\t = mv[3];\n let z_index\t = parseInt(mv[4]);\n\n \tthis.game.queue.splice(qe, 1);\n\treturn z[z_index].planetaryDefenseEvent(this, player, sector, planet_idx);\n\n }\n if (mv[0] === \"planetary_defense_post\") {\n\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n\tlet planet_idx = mv[3];\n\n this.updateSectorGraphics(sector);\n \tthis.game.queue.splice(qe, 1);\n\n\treturn 1;\n\n }\n\n\n\n\n\n ///////////////////\n // GROUND COMBAT //\n ///////////////////\n if (mv[0] === \"ground_combat_start\") {\n\n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// reset the combat round\n //\n this.game.state.ground_combat_round = 0;\n this.game.state.ground_combat_sector = sector;\n this.game.state.ground_combat_planet_idx = planet_idx;\n this.game.state.ground_combat_infantry_destroyed_attacker = 0;\n this.game.state.ground_combat_infantry_destroyed_defender = 0;\n this.game.state.ground_combat_attacker = -1;\n this.game.state.ground_combat_defender = -1;\n\n \treturn 1;\n\n }\n if (mv[0] === \"ground_combat_end\") {\n\n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n\tlet sys = this.returnSectorAndPlanets(sector);\n\n \tthis.game.queue.splice(qe, 1);\n\n\tif (this.game.state.ground_combat_defender != -1) {\n\t let z = this.returnEventObjects();\n\t for (let z_index in z) {\n\t z[z_index].groundCombatRoundEnd(this, this.game.state.ground_combat_attacker, this.game.state.ground_combat_defender, sector, planet_idx);\n\t }\n\t}\n\n if (this.hasUnresolvedGroundCombat(player, sector, planet_idx) == 1) {\n if (this.game.player == player) {\n this.addMove(\"ground_combat_end\\t\"+player+\"\\t\"+sector+\"\\t\"+planet_idx);\n this.addMove(\"ground_combat_post\\t\"+player+\"\\t\"+sector+\"\\t\"+planet_idx);\n this.addMove(\"ground_combat\\t\"+player+\"\\t\"+sector+\"\\t\"+planet_idx);\n this.endTurn();\n return 0;\n } else {\n return 0;\n }\n } else {\n\n\t if (this.game_ground_combat_defender == 1) {\n this.game.queue.push(\"ground_combat_over_player_menu\\t\"+this.game.state.ground_combat_defender+\"\\t\"+sector+\"\\t\"+planet_idx);\n \t } else {\n this.game.queue.push(\"ground_combat_over_player_menu\\t\"+this.game.state.ground_combat_attacker+\"\\t\"+sector+\"\\t\"+planet_idx);\n\t }\n\n\t //\n\t // update planet owner\n\t //\n let attacker_survivors = imperium_self.returnNumberOfGroundForcesOnPlanet(player, sector, planet_idx);\n let defender_survivors = imperium_self.returnNumberOfGroundForcesOnPlanet(this.game.state.ground_combat_defender, sector, planet_idx);\n\n\t if (attacker_survivors > 0) {\n this.updateLog(sys.p[planet_idx].name + \" conquered by \" + this.returnFactionNickname(player) + \" (\" + attacker_survivors + \" infantry)\");\n\n\t let attacker = player;\n\t let defender = this.game.state.ground_combat_defender; \n\n //\n // unless we are infiltrating and get to keep them...\n //\n if (this.game.players_info[player-1].temporary_infiltrate_infrastructure_on_invasion == 1 || this.game.players_info[player-1].temporary_infiltrate_infrastructure_on_invasion == 1) {\n let infiltration = 0;\n for (let i = 0; i < sys.p[planet_idx].units[defender-1].length; i++) {\n if (sys.p[planet_idx].units[defender-1][i].type === \"pds\") {\n this.addPlanetaryUnit(attacker, sector, planet_idx, \"pds\");\n infiltration = 1;\n }\n if (sys.p[planet_idx].units[defender-1][i].type === \"spacedock\") {\n this.addPlanetaryUnit(attacker, sector, planet_idx, \"spacedock\");\n infiltration = 1;\n }\n }\n sys.p[planet_idx].units[defender-1] = [];\n if (infiltration == 1) {\n this.game.players_info[attacker-1].temporary_infiltrate_infrastructure_on_invasion = 0;\n }\n } else {\n sys.p[planet_idx].units[defender-1] = [];\n }\n\n //\n // note planet lost\n //\n if (defender > 0) {\n\t if (defender != -1) {\n this.game.players_info[defender-1].lost_planet_this_round = attacker; // player who took it\n\t }\n\t }\n this.updatePlanetOwner(sector, planet_idx, player);\n\t } else {\n this.updateLog(sys.p[planet_idx].name + \" defended by \" + this.returnFactionNickname(this.game.state.ground_combat_defender) + \" (\" + defender_survivors + \" infantry)\");\n\t }\n\n \t this.game.queue.splice(qe, 1);\n\t return 1;\n }\n \treturn 1;\n }\n if (mv[0] === \"ground_combat\") {\n \n \tlet player = mv[1];\n let sector = mv[2];\n let planet_idx = mv[3];\n\tlet z\t\t = this.returnEventObjects();\n\n \tthis.game.queue.splice(qe, 1);\n\n\n let speaker_order = this.returnSpeakerOrder();\n\n \tfor (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].groundCombatTriggers(this, speaker_order[i], sector, planet_idx) == 1) {\n this.game.queue.push(\"ground_combat_event\\t\"+speaker_order[i]+\"\\t\"+sector+\"\\t\"+planet_idx+\"\\t\"+k);\n }\n }\n }\n \treturn 1;\n }\n if (mv[0] === \"ground_combat_event\") {\n \n let z\t\t = this.returnEventObjects();\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n let planet_idx \t = mv[3];\n let z_index\t = parseInt(mv[4]);\n \tthis.game.queue.splice(qe, 1);\n\n\treturn z[z_index].groundCombatEvent(this, player, sector, planet_idx);\n\n }\n if (mv[0] === \"ground_combat_post\") {\n\n \tlet player = parseInt(mv[1]);\n let sector\t = mv[2];\n let planet_idx\t = parseInt(mv[3]);\n\tlet sys \t = this.returnSectorAndPlanets(sector);\n\n \tthis.game.queue.splice(qe, 1);\n\tthis.game.state.assign_hits_to_cancel = 0;\n\n //\n // have a round of ground combat\n //\n this.game.state.ground_combat_round++;\n\n\tfor (let i = 0; i < this.game.players_info.length; i++) {\n\t this.game.players_info[i].units_i_destroyed_last_combat_round = this.game.players_info[i].units_i_destroyed_last_combat_round;\n\t this.game.players_info[i].units_i_destroyed_this_combat_round = [];\n\t this.game.players_info[i].my_units_destroyed_last_combat_round = this.game.players_info[i].my_units_destroyed_last_combat_round;\n\t this.game.players_info[i].my_units_destroyed_this_combat_round = [];\n\t}\n\n //\n // who is the defender?\n //\n let defender = this.returnDefender(player, sector, planet_idx);\n\n\n //\n // if there is no defender, end this charade\n //\n if (defender == -1) {\n\n\t if (sys.p[planet_idx].owner != player) {\n this.updateLog(this.returnFactionNickname(player) + \" seizes \" + sys.p[planet_idx].name);\n\t if (sys.p[planet_idx].owner != -1) {\n this.game.players_info[sys.p[planet_idx].owner-1].lost_planet_this_round = player; // player who took it\n\t }\n\t this.updatePlanetOwner(sector, planet_idx, player);\n\t }\n return 1;\n }\n\n\t//\n\t// reset temporary combat modifiers\n\t//\n\tthis.resetGroundUnitTemporaryModifiers(sector, planet_idx);\n\n\tthis.game.state.ground_combat_attacker = player;\n\tthis.game.state.ground_combat_defender = defender;\n\n\t//\n\t// have a round of ground combat\n\t//\n\n if (this.hasUnresolvedGroundCombat(player, sector, planet_idx) == 1) {\n\t this.updateLog(\"Round \"+this.game.state.ground_combat_round+\": \" + this.returnPlayerInfantryOnPlanet(player, sys.p[planet_idx]) + \" \" + this.returnFactionNickname(player) + \" infantry vs. \" + this.returnPlayerInfantryOnPlanet(defender, sys.p[planet_idx]) + \" \" + this.returnFactionNickname(defender) + \" infantry\");\n this.game.queue.push(\"ground_combat_player_menu\\t\"+defender+\"\\t\"+player+\"\\t\"+sector+\"\\t\"+planet_idx);\n this.game.queue.push(\"ground_combat_player_menu\\t\"+player+\"\\t\"+defender+\"\\t\"+sector+\"\\t\"+planet_idx);\n\t}\n\n\treturn 1;\n\n }\n\n\n\n\n /////////////////\n // ACTION CARD //\n /////////////////\n if (mv[0] === \"action_card\") {\n \n \tlet player = parseInt(mv[1]);\n \tlet card = mv[2];\n\tlet z = this.returnEventObjects();\n\n if (this.action_cards[card].type == \"action\") {\n\t this.game.state.active_player_moved = 1;\n\t}\n\n\tthis.updateLog(this.returnFactionNickname(player) + \" plays \" + this.action_cards[card].name + \"<p></p><div style='width:80%;font-size:1.0em;margin-left:auto;margin-right:auto;margin-top:15px;margin-bottom:15px'>\" + this.action_cards[card].text +'</div>');\n\n\tlet cards = this.returnActionCards();\n\tlet played_card = cards[card];\n\n \tthis.game.queue.splice(qe, 1);\n\n let speaker_order = this.returnSpeakerOrder();\n\n\tthis.game.players_info[this.game.player-1].can_intervene_in_action_card = 0;\n\n\t//\n\t// allow players to respond to their action cards, EVENT always triggers -- simultaneous unsupported now\n\t//\n\tif (this.game.state.action_card_order === \"simultaneous\") {\n \t for (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].playActionCardTriggers(this, speaker_order[i], player, card) == 1) {\n this.game.queue.push(\"action_card_event\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+card+\"\\t\"+k);\n }\n }\n }\n this.game.queue.push(\"simultaneous_action_card_player_menu\\t\"+player+\"\\t\"+card);\n \t //for (let i = 0; i < speaker_order.length; i++) {\n\t //if (speaker_order[i] != player) {\n //this.game.queue.push(\"action_card_player_menu\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+card);\n //}\n //}\n\n\t //\n\t // sabotage is a response to another card, which has its own simultaneous\n\t //\n\t if (card.indexOf(\"sabotage\") != 0) {\n this.game.queue.push(\"resetconfirmsneeded\\t\"+(speaker_order.length));\n\t }\n\t} else {\n \t for (let i = 0; i < speaker_order.length; i++) {\n\t for (let k = 0; k < z.length; k++) {\n\t if (z[k].playActionCardTriggers(this, speaker_order[i], player, card) == 1) {\n this.game.queue.push(\"action_card_event\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+card+\"\\t\"+k);\n }\n }\n\t if (speaker_order[i] != player) {\n this.game.queue.push(\"action_card_player_menu\\t\"+speaker_order[i]+\"\\t\"+player+\"\\t\"+card);\n }\n }\n\t}\n\n\treturn 1;\n\n }\n if (mv[0] === \"simultaneous_action_card_player_menu\") { \n\n\tlet action_card_player = parseInt(mv[1]);\n\tlet action_card = mv[2];\n\n\t//\n\t// the person who played the action card cannot respond to it\n\t//\n\tif (this.game.player == action_card_player) {\n \t //this.game.queue.splice(qe, 1);\n\t this.updateStatus(\"Your opponents are being notified you have played \" + this.action_cards[action_card].name);\n\t if (this.hasPlayerConfirmed(this.app.wallet.returnPublicKey())) {\n\t if (action_card.indexOf(\"sabotage\") != 0) {\n imperium_self.addMove(\"resolve\\tsimultaneous_action_card_player_menu\\t1\\t\" + imperium_self.app.wallet.returnPublicKey());\n imperium_self.addPublickeyConfirm(imperium_self.app.wallet.returnPublicKey(), 1);\n imperium_self.endTurn();\n\t } else {\n\t // sabotage doesn't need resolve, it happily resolves itself\n imperium_self.addMove(\"resolve\\tsimultaneous_action_card_player_menu\\t1\\t\" + imperium_self.app.wallet.returnPublicKey());\n imperium_self.addPublickeyConfirm(imperium_self.app.wallet.returnPublicKey(), 1);\n imperium_self.endTurn();\n }\n } else {\n imperium_self.addMove(\"resolve\\tsimultaneous_action_card_player_menu\\t1\\t\" + imperium_self.app.wallet.returnPublicKey());\n imperium_self.addPublickeyConfirm(imperium_self.app.wallet.returnPublicKey(), 1);\n imperium_self.endTurn();\n\t }\n\t return 0;\n\t} else {\n\t // sabotage is a special case where we want to show the menu even if we have already confirmed\n\t if (this.hasPlayerConfirmed(this.app.wallet.returnPublicKey()) && action_card.indexOf(\"sabotage\") != 0) {\n \t this.updateStatus(\"Waiting for players to respond to \"+this.action_cards[action_card].name);\n\t } else {\n \t //this.game.queue.splice(qe, 1);\n\t this.playerPlayActionCardMenu(action_card_player, action_card);\n\t } \n\t} \n\treturn 0;\n\n } \n if (mv[0] === \"action_card_player_menu\") { \n\n\tlet player = parseInt(mv[1]);\n\tlet action_card_player = parseInt(mv[2]);\n\tlet action_card = mv[3];\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// the person who played the action card cannot respond to it\n\t//\n\tif (player == action_card_player) {\n\t this.updateStatus(\"Your opponents are being notified you have played \" + this.action_cards[action_card].name);\n\t return 0;\n\t}\n\n\tif (this.game.player == player) {\n\t this.playerPlayActionCardMenu(action_card_player, action_card);\n\t} else {\n\t this.updateStatus(this.returnFaction(player) + \" is responding to action card \" + this.action_cards[action_card].name);\n\t}\n\treturn 0;\n\n } \n if (mv[0] === \"action_card_event\") { \n \n\tlet z = this.returnEventObjects();\n\n let player = parseInt(mv[1]);\n let action_card_player = mv[2];\n let card \t = mv[3];\n let z_index\t= parseInt(mv[4]);\n \n \tthis.game.queue.splice(qe, 1);\n\n return z[z_index].playActionCardEvent(this, player, action_card_player, card); \n\n }\n if (mv[0] === \"action_card_post\") { \n\n \tlet action_card_player = parseInt(mv[1]);\n \tlet card = mv[2];\n\tlet cards = this.returnActionCards();\n\n\tlet played_card = cards[card];\n \tthis.game.queue.splice(qe, 1);\n\n\t//\n\t// this is where we execute the card\n\t//\n\treturn played_card.playActionCard(this, this.game.player, action_card_player, card);\n\n }\n\n for (let i in z) {\n if (!z[i].handleGameLoop(imperium_self, qe, mv)) { return 0; }\n }\n\n //\n // avoid infinite loops\n //\n if (shd_continue == 0) {\n return 0;\n } \n }\n \n return 1;\n \n }", "title": "" }, { "docid": "f4036f3a4c8dfed6ea37a1f29bd9e2dd", "score": "0.68187773", "text": "function game() {\n if (!isGameOver()) {\n window.onkeydown = snake.changeDirection;\n resetColor();\n\n displayScore();\n displaySnake();\n\n addFruit();\n addSpecialFruit();\n displayFruits();\n\n snake.move(newDirection);\n ateFruit();\n\n } else {\n clearInterval(startGame);\n displayScore();\n }\n}", "title": "" }, { "docid": "411f1333b9ad28e01a872c493483d41e", "score": "0.68120784", "text": "function gameLoop() {\n\tgoodGuyUpdate()\n\tbadGuyUpdate()\n\tdrawScreen()\n\tdrawScore()\n}", "title": "" }, { "docid": "97a079fb9a25913f57d2cb19a1013dc6", "score": "0.68024176", "text": "function gameOp(){\nmessage = '';\nif((x+rad)>=rx&&(x+rad)<=(rx+rWidth)&&(y)>=(ry-s1*varianceOne-6)){\n\thealth--;\n\tmessage = 'oOf';\n}\nif((x+rad-canvas.width/2)>=rx2&&(x+rad-canvas.width/2)<=(rx2+rWidth)&&(y)>=(ry2-s2*varianceTwo-6)){\n\thealth--;\n\tmessage = 'oOf';\n}\nif((x+rad)>=rx&&(x+rad)<=(rx+rWidth)&&(y)<=(rHeight+8-s1*varianceOne)){\n\thealth--;\n\tmessage = 'oOf';\n}\nif((x+rad-canvas.width/2)>=rx2&&(x+rad-canvas.width/2)<=(rx2+rWidth)&&(y)<=(rHeight+8-s2*varianceTwo)){\n\thealth--;\n\tmessage = 'oOf';\n}\nif(y + rad >= canvas.height-10 || health <= 0){\n\thealth = 0;\n\tscore = 0;\n\tclearInterval(run);\n\talert('Game!');\n}\nif(y+rad<=my1+15&&y+rad>=my1+10&&x+2===mx1){\n\thealth -= 30;\n\tmx1 = canvas.width+20;\n}\nif(rx === canvas.width/2||rx2 === -20){\n\tscore++;\n\tscoreboard.textContent = score;\n}\nhealth>70?healthColor='green':health<=70&&health>40?healthColor='yellow':health<=40&&health>30?healthColor='orange':health<=30?healthColor='red':null;\n}", "title": "" }, { "docid": "da7e72ea66e44640354a3b2400e4fcb6", "score": "0.6789467", "text": "function game() {\n\tif (leftMove && player.x > 0) {\n\t\tplayer.x -= 7;\n\t}\n\tif (rightMove && player.x + player.size < canvas.width) {\n\t\tplayer.x += 7;\n\t}\n\tfor (let i = 0; i < letterCount; i++) {\n\t\tcollectible.y[i] += collectible.speed;\n\t}\n\tfor (let i = 0; i < wormCount; i++) {\n\t\tuncollectible.y[i] += uncollectible.speed;\n\t}\n\t\n\tfor (let i = 0; i < letterCount; i++) {\n\t\tif (collectible.state[i]) {\n\t\t\tif (player.x < collectible.x[i] + radius && \n\t\t\t\tplayer.x + player.size + radius > collectible.x[i] && \n\t\t\t\tplayer.y < collectible.y[i] + radius && \n\t\t\t\tplayer.y + player.size > collectible.y[i]) {\n\t\t\t\tscore++\n\t\t\t\tcollectible.state[i] = false;\n\t\t\t}\n\t\t}\n\n\t\tif (collectible.y[i] + radius > canvas.height) {\n\t\t\tcollectible.x.shift();\n\t\t\tcollectible.y.shift();\n\t\t\tcollectible.state.shift();\n\t\t}\n\t}\n\n\tfor (let i = 0; i < wormCount; i++) {\n\t\tif (player.x < uncollectible.x[i] + radius && \n\t\t\tplayer.x + player.size + radius > uncollectible.x[i] && \n\t\t\tplayer.y < uncollectible.y[i] + radius && \n\t\t\tplayer.y + player.size > uncollectible.y[i]) {\n\t\t\tlives--;\n\t\t\tuncollectible.y[i] = 0;\n\n\t\t\tif (lives === 0) {\n\t\t\t\tgameIsOver();\n\t\t\t}\n\t\t}\n\n\t\tif (uncollectible.y[i] + radius > canvas.height) {\n\t\t\tuncollectible.x.shift();\n\t\t\tuncollectible.y.shift();\n\t\t}\n\t}\n\n\tswitch (score) {\n\t\tcase 10:\n\t\t\tlevel = 2;\n\t\t\tuncollectible.speed = 5;\n\t\t\tcollectible.speed = 5;\n\t\t\tbreak;\n\t\tcase 20:\n\t\t\tlevel = 3;\n\t\t\tcollectible.speed = 6;\n\t\t\tcollectible.speed = 6;\n\t\t\tbreak;\n\t\tcase 30: \n\t\t\tlevel = 4;\n\t\t\tcollectible.speed = 7;\n\t\t\tuncollectible.speed = 7;\n\t\t\tbreak;\n\t\tcase 40: \n\t\t\tlevel = 5;\n\t\t\tcollectible.speed = 8;\n\t\t\tuncollectible.speed = 8;\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "1545eacfa9017590ba65905b0e2b712e", "score": "0.6786371", "text": "function GameDraw(){}", "title": "" }, { "docid": "f78223d0f60033fc30d28675571e86ab", "score": "0.6761498", "text": "playRound () {\n //this.game.moveAI() // Has the enemies controlled by the CPU make their moves\n }", "title": "" }, { "docid": "1fefe37c83c0a02daf14782616726a7d", "score": "0.6759987", "text": "handleState(game){\r\n\r\n if (this.player.frameX >= this.player.maxFrame){\r\n this.player.game.gameEnd = true;\r\n }\r\n }", "title": "" }, { "docid": "f0ee0c8d84668735a9b54128ec31bd2a", "score": "0.67518574", "text": "function listenGameActionEvents () {\n if ( keyPressed.spaceBar ) {\n return false;\n }\n\n if ( keyPressed.up && player.posY > ( player.height / 2 ) ) {\n player.updatePos.up();\n }\n\n if ( keyPressed.down && player.posY < ( canvas.height - player.height / 2 ) &&\n player.posY < background.getHeight() ) {\n player.updatePos.down();\n }\n\n if ( keyPressed.left && player.posX > ( player.width / 2 ) ) {\n player.updatePos.left();\n }\n\n if ( keyPressed.right && player.posX < ( canvas.width - player.width / 2 ) ) {\n player.updatePos.right();\n }\n\n if ( keyPressed.fire ) {\n player.fire();\n }\n\n if ( keyPressed.fire2 ) {\n player.throwBomb();\n }\n\n if ( keyPressed.speedUp && bgSpeed < 30 ) {\n bgSpeed += 2;\n }\n\n if ( keyPressed.speedDown && bgSpeed >= 10 ) {\n bgSpeed -= 2;\n }\n\n if ( keyPressed.buggerMode ) {\n if ( ! buggerMode ) {\n buggerMode = true;\n buggersManagement().createBuggers();\n }\n }\n\n if ( keyPressed.clearEnemies ) {\n if ( buggerMode ) {\n buggerMode = false;\n buggersManagement().destroyBuggers();\n }\n }\n }", "title": "" }, { "docid": "819f60bcb76089d6e26aa70200ba1ef6", "score": "0.6741639", "text": "function handleGameBoard() {\n renderBoard();\n handleATurn();\n handleResetGame();\n}", "title": "" }, { "docid": "92f549642e870df1eb13ebaaac47d621", "score": "0.67390984", "text": "function startGame() {\n\n}", "title": "" }, { "docid": "3801e525d98dc280bbf12f0965e15272", "score": "0.67205787", "text": "function youWin() {\n newGame();\n }", "title": "" }, { "docid": "c85b5f3016a3c9d3a2ff7e1af3dcbf0c", "score": "0.6716953", "text": "function simulation() {\n userMove();\n catMove();\n checkOffScreen();\n checkOverlap();\n checkPosition();\n display();\n}", "title": "" }, { "docid": "3d21d837a1a62fc5a96171b793d6a12d", "score": "0.671559", "text": "function startGame(){\n initializeGameState();\n}", "title": "" }, { "docid": "0089c0586ba2f9454708ba82a036a672", "score": "0.6714628", "text": "function gameScreen() {\n\n // the target falling\n target.display();\n target.update();\n target.isOffScreen();\n\n // Makes sure that the cannon will shoot random amount of fruits\n for (var i = 0; i < apples.length; i++) {\n apples[i].update();\n apples[i].display();\n apples[i].handleCollision(target);\n }\n for (var i = 0; i < oranges.length; i++) {\n oranges[i].update();\n oranges[i].display();\n oranges[i].handleCollision(target);\n\n }\n for (var i = 0; i < kiwis.length; i++) {\n kiwis[i].update();\n kiwis[i].display();\n kiwis[i].handleCollision(target);\n }\n\n for (var i = 0; i < strawberrys.length; i++) {\n strawberrys[i].update();\n strawberrys[i].display();\n strawberrys[i].handleCollision(target);\n }\n for (var i = 0; i < bananas.length; i++) {\n bananas[i].update();\n bananas[i].display();\n bananas[i].handleCollision(target);\n }\n\n cannon.handleInput();\n cannon.display();\n cannon.update();\n\n\n\n}", "title": "" }, { "docid": "54262d629c36306ac9cc8c1caccc62f1", "score": "0.671283", "text": "function gameLogic() {\n // Local storage data\n localStorage.setItem('ageTrack', age);\n localStorage.setItem('hungerTrack', hunger);\n localStorage.setItem('waterTrack', water);\n localStorage.setItem('exerciseTrack', exercise);\n localStorage.setItem('bladderTrack', bladder);\n localStorage.setItem('hygieneTrack', hygiene);\n localStorage.setItem('funTrack', fun);\n localStorage.setItem('energyTrack', energy);\n\n document.querySelector('.age-stat').innerHTML = age;\n document.querySelector('.hunger-stat').innerHTML = hunger;\n document.querySelector('.water-stat').innerHTML = water;\n document.querySelector('.exercise-stat').innerHTML = exercise;\n document.querySelector('.bladder-stat').innerHTML = bladder;\n document.querySelector('.hygiene-stat').innerHTML = hygiene;\n document.querySelector('.fun-stat').innerHTML = fun;\n document.querySelector('.energy-stat').innerHTML = energy;\n\n // Bonus status\n if (hunger >= 95 && water >= 95 && exercise >= 95 && bladder >= 95 && hygiene >= 95 && fun >= 95) {\n if (briliantText == 0) {\n dialog('Brilliant play!', 'animate__tada');\n briliantText = 1;\n }\n bonus.innerHTML = '🌟🌟🌟🌟🌟';\n timerScoreReset(1);\n } else if (hunger >= 85 && water >= 85 && exercise >= 85 && bladder >= 85 && hygiene >= 85 && fun >= 85) {\n if (excellentText == 0) {\n dialog('Excellent play!', 'animate__tada');\n excellentText = 1;\n }\n bonus.innerHTML = '🌟🌟🌟🌟';\n timerScoreReset(10);\n } else if (hunger >= 75 && water >= 75 && exercise >= 75 && bladder >= 75 && hygiene >= 75 && fun >= 75) {\n if (verygoodText == 0) {\n dialog('Very good play!', 'animate__tada');\n verygoodText = 1;\n }\n bonus.innerHTML = '🌟🌟🌟';\n timerScoreReset(100);\n } else if (hunger >= 65 && water >= 65 && exercise >= 65 && bladder >= 65 && hygiene >= 65 && fun >= 65) {\n if (scoreHelp == 0) {\n dialog('Play better and get faster score count!');\n scoreHelp = 1;\n }\n bonus.innerHTML = '🌟🌟';\n timerScoreReset(500);\n } else {\n bonus.innerHTML=('🌟');\n timerScoreReset(1000);\n }\n\n // Special sounds\n if (age == 2 && babySound01 == 0) {\n audio06.play();\n babySound01 = 1;\n }\n\n if (age == 3 && babySound02 == 0) {\n audio07.play();\n babySound02 = 1;\n }\n\n // Age\n if (age <= 3 && growText01 == 0) {\n growText01 = 1;\n dialog('New baby is born! 👶🏻', 'animate__swing');\n setTimeout(function() { dialog('Baby name is ' + name + '. 😇', 'animate__pulse'); }, 5000);\n audio02.play();\n avatar.innerHTML=('👶🏻');\n\n } else if (age > 3 && age <= 10 && growText02 == 0) {\n growText02 = 1;\n dialog(name + ' is now child! 🧒🏻', 'animate__swing');\n audio02.play();\n avatar.innerHTML=('🧒🏻');\n \n // Reset timers based on age\n timerHungerReset(10000);\n timerWaterReset(10000);\n timerExerciseReset(10000);\n timerBladderReset(10000);\n timerHygieneReset(10000);\n timerFunReset(10000);\n } else if (age > 10 && age <= 20 && growText03 == 0) {\n growText03 = 1;\n dialog(name +' is now girl! 👧🏻', 'animate__swing');\n audio02.play();\n avatar.innerHTML=('👧🏻');\n document.querySelector('.dog').style.display = 'block';\n \n // Reset timers based on age\n timerHungerReset(5000);\n timerWaterReset(5000);\n timerExerciseReset(5000);\n timerBladderReset(5000);\n timerHygieneReset(5000);\n timerFunReset(5000);\n } else if (age > 20 && age <= 60 && growText04 == 0) {\n growText04 = 1;\n dialog(name + ' is now woman! 👩🏻', 'animate__swing');\n audio02.play();\n avatar.innerHTML=('👩🏻');\n document.querySelector('.vacation').style.display = 'block';\n \n // Reset timers based on age\n timerHungerReset(3000);\n timerWaterReset(3000);\n timerExerciseReset(3000);\n timerBladderReset(3000);\n timerHygieneReset(3000);\n timerFunReset(3000);\n } else if (age > 60 && age <= 100 && growText05 == 0) {\n growText05 = 1;\n dialog(name + ' is now grandmother! 👩🏻‍🦳', 'animate__swing');\n audio02.play();\n avatar.innerHTML=('👩🏻‍🦳');\n document.querySelector('.gifts').style.display = 'block';\n\n // Reset timers based on age\n timerHungerReset(1500);\n timerWaterReset(1500);\n timerExerciseReset(1500);\n timerBladderReset(1500);\n timerHygieneReset(1500);\n timerFunReset(1500);\n } else if (age == 100) {\n die();\n }\n\n\n // If bleeder 0\n if (bladder <= 0 && dead != 1) {\n setTimeout(function() { dialog('Yucky! 🚽🥴', 'animate__swing'); }, 5000);\n hygiene = 10;\n bladder = 100;\n }\n\n // If 0\n if (hunger <= 0 || water <= 0 || exercise <= 0 || hygiene <= 0 || fun <= 0 || energy <= 0) {\n die();\n }\n\n\n /*\n * Progress bar colors\n */\n\n // Hunger\n if (hunger <= 100 && hunger > 30 ) {\n document.querySelector('.hunger-bar').style.background = '#A0C633';\n hungerBtn.classList.remove('animate__flash');\n } else if (hunger <= 30 && hunger > 15) {\n document.querySelector('.hunger-bar').style.background = 'orange';\n audio05.play();\n hungerBtn.classList.add('animate__flash');\n } else if (hunger <= 15) {\n dialog('🍏? 🥵', 'animate__swing');\n document.querySelector('.hunger-bar').style.background = '#ff7373';\n audio05.play();\n }\n\n // Water\n if (water <= 100 && water > 30 ) {\n document.querySelector('.water-bar').style.background = '#A0C633';\n waterBtn.classList.remove('animate__flash');\n } else if (water <= 30 && water > 15) {\n document.querySelector('.water-bar').style.background = 'orange';\n audio05.play();\n waterBtn.classList.add('animate__flash');\n } else if (water <= 15) {\n document.querySelector('.water-bar').style.background = '#ff7373';\n audio05.play();\n dialog('💧? 🥵', 'animate__swing');\n }\n\n // Exercise\n if (exercise <= 100 && exercise > 30 ) {\n document.querySelector('.exercise-bar').style.background = '#A0C633';\n exerciseBtn.classList.remove('animate__flash');\n } else if (exercise <= 30 && exercise > 15) {\n document.querySelector('.exercise-bar').style.background = 'orange';\n audio05.play();\n exerciseBtn.classList.add('animate__flash');\n } else if (exercise <= 15) {\n document.querySelector('.exercise-bar').style.background = '#ff7373';\n audio05.play();\n dialog('⚽️? 🥵', 'animate__swing');\n }\n\n // Bladder\n if (bladder <= 100 && bladder > 30 ) {\n document.querySelector('.bladder-bar').style.background = '#A0C633';\n bladderBtn.classList.remove('animate__flash');\n } else if (bladder <= 30 && bladder > 15) {\n document.querySelector('.bladder-bar').style.background = 'orange';\n audio05.play();\n bladderBtn.classList.add('animate__flash');\n } else if (bladder <= 15) {\n document.querySelector('.bladder-bar').style.background = '#ff7373';\n audio05.play();\n dialog('🚽? 🥵', 'animate__swing');\n }\n\n // Hygiene\n if (hygiene <= 100 && hygiene > 30 ) {\n document.querySelector('.hygiene-bar').style.background = '#A0C633';\n hygieneBtn.classList.remove('animate__flash');\n } else if (hygiene <= 30 && hygiene > 15) {\n document.querySelector('.hygiene-bar').style.background = 'orange';\n audio05.play();\n hygieneBtn.classList.add('animate__flash');\n } else if (hygiene <= 15) {\n document.querySelector('.hygiene-bar').style.background = '#ff7373';\n audio05.play();\n dialog('🛀? 🥵', 'animate__swing');\n }\n\n // Fun\n if (fun <= 100 && fun > 30 ) {\n document.querySelector('.fun-bar').style.background = '#A0C633';\n funBtn.classList.remove('animate__flash');\n } else if (fun <= 30 && fun > 15) {\n document.querySelector('.fun-bar').style.background = 'orange';\n audio05.play();\n funBtn.classList.add('animate__flash');\n } else if (fun <= 15) {\n document.querySelector('.fun-bar').style.background = '#ff7373';\n audio05.play();\n dialog('🎲? 🥵', 'animate__swing');\n }\n\n // Energy\n if (energy <= 100 && energy > 30 ) {\n document.querySelector('.energy-bar').style.background = '#A0C633';\n energyBtn.classList.remove('animate__flash');\n } else if (energy <= 30 && energy > 15) {\n document.querySelector('.energy-bar').style.background = 'orange';\n audio05.play();\n energyBtn.classList.add('animate__flash');\n } else if (energy <= 15) {\n document.querySelector('.energy-bar').style.background = '#ff7373';\n audio05.play();\n dialog('🛌? 🥵', 'animate__swing');\n }\n\n\n /*\n * Progress bar position\n */\n document.querySelector('.age-bar').style.width = age + '%';\n document.querySelector('.hunger-bar').style.width = hunger + '%';\n document.querySelector('.water-bar').style.width = water + '%';\n document.querySelector('.exercise-bar').style.width = exercise + '%';\n document.querySelector('.bladder-bar').style.width = bladder + '%';\n document.querySelector('.hygiene-bar').style.width = hygiene + '%';\n document.querySelector('.fun-bar').style.width = fun + '%';\n document.querySelector('.energy-bar').style.width = energy + '%';\n\n\n /*\n * Chat dialogs\n */\n if (age >= 1 && age <= 3) {\n if (hungerText01 == 0) {\n dialog('Hi, friend. 👋', 'animate__pulse');\n hungerText01 = 1;\n }\n \n if (hungerText01 == 1 && hungerText02 == 0) {\n setTimeout(function() { dialog('I am hungry! 😔', 'animate__pulse'); }, 5000);\n hungerText02 = 1;\n }\n\n if (hungerText02 == 1 && hungerText03 == 0) {\n setTimeout(function() {\n dialog('Click on 🍏 icon, to feed me.', 'animate__pulse');\n hungerBtn.disabled = false;\n hungerText03 = 1;\n }, 11000);\n }\n }\n\n if (hungerText01 == 1 && hungerText02 == 1 && hungerText03 == 1 && hungerText04 == 1 && hungerText05 == 0) {\n setTimeout(function() {\n dialog('Continue now with 💧, ⚽️, and so on ...', 'animate__pulse');\n waterBtn.disabled = false;\n exerciseBtn.disabled = false;\n bladderBtn.disabled = false;\n hygieneBtn.disabled = false;\n funBtn.disabled = false;\n energyBtn.disabled = false;\n }, 5000);\n\n hungerText05 = 1;\n }\n\n if (age == 11 && rndText01 == 0) {\n dialog('How are you?', 'animate__pulse');\n rndText01 = 1;\n }\n\n if (age == 21 && rndText02 == 0) {\n dialog('What a beautiful day. ☺️', 'animate__pulse');\n rndText02 = 1;\n }\n\n if (age == 31 && rndText03 == 0) {\n dialog('What a time to be alive!', 'animate__pulse');\n rndText03 = 1;\n }\n\n if (age == 41 && rndText04 == 0) {\n dialog('You doing very good. 👍', 'animate__pulse');\n rndText04 = 1;\n }\n\n if (age == 51 && rndText05 == 0) {\n dialog('You are my hero. 💪', 'animate__pulse');\n rndText05 = 1;\n }\n }", "title": "" }, { "docid": "bff94813eeac15938ff0e7e6177dabd0", "score": "0.6702946", "text": "function game() {\n\t//if (playersInGame.length > 0)\n\t{\n\t\t//do the things\n\n \tif (!endGame)\n \t{\n \t\tsetTimeout(function () {\n \t\t\tgame();\n }, gameTick);\n \t}\n };\n}", "title": "" }, { "docid": "cfae4b5b79f72d9d805cc86cdf93edce", "score": "0.6690865", "text": "function gameLoop () {\n gameDraw ();\n drawScoreboard();\n if (gameState == \"PLAY\") {\n snakeUpdate();\n snakeDraw();\n foodDraw();\n }\n}", "title": "" }, { "docid": "e053f380752baf7465f5fdef686e493b", "score": "0.6684426", "text": "gameLoop() {\n // Check how long it's been since last frame\n const currentFrame = Date.now();\n const timeDiff = currentFrame - this.lastFrame;\n\n // Increase the score!\n this.score += timeDiff;\n\n // Call update on all enemies\n this.enemies.forEach(enemy => enemy.update(timeDiff));\n\n // Call update on rocket\n if (this.rocket) {\n this.rocket.update(timeDiff);\n }\n // Call update to fries bonus\n if (this.bonus) this.bonus.update(timeDiff);\n\n // Call update to impact\n if (this.impact) {\n this.impact.update();\n if (this.impact.duration >= this.impact.max_duration) {\n delete this.impact;\n }\n }\n\n // Draw everything!\n this.ctx.drawImage(images['stars.png'], 0, 0); // draw the star bg\n this.enemies.forEach(enemy => enemy.render(this.ctx)); // draw the enemies\n this.player.render(this.ctx); // draw the player\n if (this.rocket) this.rocket.render(this.ctx);\n if (this.bonus) this.bonus.render(this.ctx);\n if (this.impact) this.impact.render(this.ctx);\n\n // Check if any enemies should die\n this.enemies.forEach((enemy, enemyIdx) => {\n if (enemy.y > GAME_HEIGHT) {\n delete this.enemies[enemyIdx];\n }\n });\n this.setupEnemies();\n\n // Check if Bonus has been caught\n if (this.checkBonus()) {\n this.player.numberOfLifes.push(1);\n }\n\n // Check if missile has been fired\n this.setupRocket();\n\n // Check if enemy has been destroyed and remove rocket accoridngly\n if (this.destroyEnemy()) {\n this.score = this.score + 5000;\n delete this.rocket;\n }\n\n // Check if player is dead\n if (this.isPlayerDead()) {\n // If they are dead, then it's game over!\n this.ctx.font = 'bold 40px Impact';\n this.ctx.fillStyle = '#ffffff';\n this.ctx.fillText('GAME OVER', 100, 200);\n this.ctx.shadowColor = 'black';\n this.ctx.shadowOffsetX = 5;\n this.ctx.shadowOffsetY = 5;\n this.ctx.shadowBlur = 7;\n\n this.ctx.font = 'bold 18px Arial';\n this.ctx.fillStyle = '#ffffff';\n this.ctx.fillText(`But hey you know ${this.score} is not that bad`, 30, 250);\n this.ctx.shadowColor = 'black';\n this.ctx.shadowOffsetX = 5;\n this.ctx.shadowOffsetY = 5;\n this.ctx.shadowBlur = 7;\n // add a start button to restart the game\n // display the button\n const restartButton = document.getElementsByClassName('restart');\n restartButton[0].classList.toggle('hidden');\n\n // actually restart the game\n restartButton[0].onclick = () => {\n // Remove the old canvas\n const oldcanvParent = document.getElementById('app');\n const oldcanv = document.getElementById('canvas');\n oldcanvParent.removeChild(oldcanv);\n const lifes = document.getElementById('life-container');\n oldcanvParent.removeChild(lifes);\n\n // start a new game\n const gameEngine2 = new Engine(document.getElementById('app'));\n gameEngine2.start();\n\n // toggle class to hide button\n restartButton[0].classList.toggle('hidden');\n };\n } else {\n // If player is not dead, then draw the score\n this.ctx.font = 'bold 30px Impact';\n this.ctx.fillStyle = '#ffffff';\n this.ctx.fillText(this.score, 5, 30);\n\n // Set the time marker and redraw\n this.lastFrame = Date.now();\n requestAnimationFrame(this.gameLoop);\n }\n }", "title": "" }, { "docid": "fbe82e86ece7cb3a910624fd13b9a8d5", "score": "0.6679094", "text": "run() {\n //Start the game with the first attack by USS Obama\n let attackOrRetreat = \"attack\"\n let alienShipIndex = 0;\n while (attackOrRetreat == \"attack\") {\n // USS Obama attacks Alien Ship\n this.ussObama.displayStatus();\n this.ussObama.attack(this.alienShips[alienShipIndex]);\n // If the alien ship is destroyed\n // if last ship\n // end game\n // else\n // get next alien ship\n // ask USS Obama attack or retreat\n if (this.alienShips[alienShipIndex].isDestroyed()) {\n this.alienShips[alienShipIndex].displayStatus();\n console.log(`%c${this.alienShips[alienShipIndex].name} has been destroyed!!`,'font-size: 30px; color: white; background: red; border: 1px solid');\n //if that was the last alien ship, end the game\n if (alienShipIndex == 5) {\n console.log(`%c${this.ussObama.name} has destroyed all the Alien Ships!!! Earth is saved!!! \\n**** GAME OVER ****`,'font-size: 30px; color: white; background: green; border: 1px solid');\n // alert (`${this.ussObama.name} has destroyed all the Alien Ships!!! Earth is saved!!! \\n****GAME OVER****`);\n attackOrRetreat = \"\"; //end Game by setting attackOrRetreat to empty string\n } else {\n //Get next Alien Ship\n alienShipIndex++;\n // attackOrRetreat = prompt(\"Would you like to attack or retreat?\", \"attack/retreat\");\n attackOrRetreat = \"attack\";\n }\n } else {\n // Alien Ship's turn to attack USS Obama\n this.alienShips[alienShipIndex].displayStatus();\n this.alienShips[alienShipIndex].attack(this.ussObama);\n // If USS Obama destroyed, end game\n if (this.ussObama.isDestroyed()) {\n console.log(`%c${this.ussObama.name} has been destroyed!! Game Over!!`,'font-size: 30px; color: white; background: red; border: 1px solid');\n // alert(`${this.ussObama.name} has been destroyed!! Game Over!!`);\n attackOrRetreat = \"\"; //end Game by setting attackOrRetreat to empty string\n }\n }\n // If USS Obama said retreat, end game.\n if (attackOrRetreat == \"retreat\") {\n console.log(\"%c*** GAME OVER ***\",'font-size: 50px; color: white; background: black; border: 1px solid');\n // alert(\"*** GAME OVER ***\");\n }\n } //end while loop\n }", "title": "" }, { "docid": "81e006cacf479150e613cb6b059ea575", "score": "0.66774225", "text": "function evaluateGame(){\n\t\tif (lost){\n\t\t\tlose();\n\t\t} else if (uncoveredBlocks == width * height - totalMines){\n\t\t\twin();\n\t\t}\n\t}", "title": "" }, { "docid": "0140f375dc9e3184198d213d3641e0ee", "score": "0.6674502", "text": "function gameLoop() {\n gameDraw();\n drawScoreboard();\n if (gameState == \"PLAY\") {\n snakeUpdate();\n snakeDraw();\n foodDraw();\n }\n}", "title": "" }, { "docid": "6b96c6bdfafa9c6785875aab6c250a84", "score": "0.6673544", "text": "function draw() {\n switch (gameState){\n case GameStates.Running:{\n for (var i = 0; i < bground.length; ++i) {\n bground[i].show();\n bground[i].update();\n }\n if (bground[0].needsNew()) {\n bground.push(new Background(width));\n bground.splice(0, 1);\n }\n\n for (var i = 0; i < fground.length; ++i) {\n fground[i].show();\n fground[i].update();\n }\n\n if (fground[0].needsNew()) {\n fground.push(new Foreground(width));\n fground.splice(0, 1);\n }\n player.update();\n player.show();\n noStroke();\n fill(0);\n textSize(20);\n // text(\"Time:\" + stopwatch.getElapsedTime(), width / 2, height / 2);\n text(\"Score: \" + score, width * .8, height *.1);\n break;\n }\n case GameStates.Over:{\n // gameover stuff here\n textAlign(CENTER, CENTER);\n stroke(0);\n fill(230,100,100);\n textSize(20);\n text(\"GAME OVER\", width / 2, height / 2);\n document.getElementById(\"gameMusic\").pause();\n var button = document.getElementById(\"menuButton\");\n button.style.visibility = \"visible\";\n var highScore = document.getElementById(\"scoresButton\");\n highScore.style.visibility = 'visible';\n // highScore.innerHTML = highscores;\n break;\n }\n case GameStates.Menu:{\n window.location.href = \"./index.html\"; \n break;\n }\n default:\n break;\n }\n}", "title": "" }, { "docid": "f8d72abfd6adc861cc35b3cb3098f031", "score": "0.66734713", "text": "function game() {\n if(turn == 1) {\n clrlock();\n turn = 2;\n spin();\n screenupdate();\n }\n else if(turn == 2) {\n spin();\n screenupdate();\n turn = 1;\n fcheck();\n wcheck();\n lbet = bet;\n bet = 0;\n maxwin();\n screenupdate();\n }}", "title": "" }, { "docid": "209f4bfde03e74dc84e8e207bd81a453", "score": "0.66692406", "text": "function start(){\n boxLocate();\n newGame();\n \n}", "title": "" }, { "docid": "7dfa48ae571be4b6a13aa08bd9816afc", "score": "0.66651285", "text": "function main() { //wird nach Laden der Seite ausgeführt\n checkGameRunning();\n init();\n renderLeaderboard();\n}", "title": "" }, { "docid": "992375afa6d266b067f1374452c2f802", "score": "0.66603196", "text": "function draw() {\n // spelstatus is 1, 2 of 3\n\n if (spelStatus === 1) {\n // dit is het uitlegscherm\n // teken hier alles wat daarvoor nodig is\n\n // stel ik druk de spatiebalk in (in spelstatus 1), dan maak ik van spelstatus 2\n }\n\n\n\n\n else if (spelStatus === 2) {\n // dit is de game, teken de game etc.\n }\n\n else if (spelStatus === 3) {\n // hier teken ik het gameover scherm\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n switch (spelStatus) {\n case UITLEG:\n var mijnVar = 0;\n background(0, 0, 255);\n fill(255, 255, 255);\n textSize(24);\n text(\"Druk op de spatiebalk om te starten\", 200, 200, 500, 50);\n\n if (keyIsPressed === true && key === \" \") {\n console.log(\"pressed space\");\n spelStatus = SPELEN;\n aantalLevens = 3;\n score = 0;\n }\n break;\n case SPELEN:\n beweegVijand();\n beweegKogel();\n beweegSpeler();\n \n // check voor iedere vijand of een kogel 'm raakt: \n for (var i = 0; i < vijandenX.length; i++) {\n if (checkVijandGeraakt(i)) {\n // punten erbij\n score++;\n\n if (score % 10 === 0) {\n kogelDiameter = 40;\n }\n else {\n kogelDiameter = 10;\n }\n\n // nieuwe vijand maken\n verwijderVijand(i);\n maakNieuweVijand();\n }\n }\n\n if (checkSpelerGeraakt()) {\n aantalLevens--;\n // leven eraf of gezondheid verlagen\n // eventueel: nieuwe speler maken\n }\n\n\n\n tekenVeld();\n tekenVijanden();\n tekenKogels();\n tekenSpeler(spelerX, spelerY);\n tekenTimer();\n tekenScore();\n\n if (checkGameOver()) {\n spelStatus = GAMEOVER;\n }\n break;\n case GAMEOVER:\n // hier komt het GAMEOVER scherm\n\n break;\n }\n}", "title": "" }, { "docid": "3a48ec5c9ec6fcea3545cd34ca5a8a51", "score": "0.6659797", "text": "function playGame () {\n\n populateGame();\n askQuestions();\n}", "title": "" }, { "docid": "5298b715ee9715d7db91f7d3c765cbd3", "score": "0.66597515", "text": "function runGame() {\n\n\t/*music on*/\n\tmapMusic.play();\n\t/* PLAYER OBJECT CREATED. */\n \t//checkAnswer();\n\t//console.log(\"running game\");\n\t//console.log(pressEnt);\n\tp = new Player(initWidth, initHeight);\n\tlistenToArrows(true);\t\t\t\t\t//arrow-keys activated\n\trequestAnimationFrame(game);\t\t\t//function call\n}", "title": "" }, { "docid": "e6f63ffa43a76f2b3126f88b34764a44", "score": "0.6658722", "text": "startGame() {\n this.frames++;\n this.clearScreen();\n this.clearElements();\n this.field.drawField(); \n this.drawElements();\n this.showEltsOnScreen();\n this.rollDown();\n this.checkCollisions();\n this.checkFuel();\n this.player[0].draw();\n this.drawPanel();\n this.updateScore();\n this.updateLives();\n this.gameUpdate();\n }", "title": "" }, { "docid": "d1102a33aed93556509715a4197ebcf7", "score": "0.6655363", "text": "gameLoop() {\n // Check how long it's been since last frame\n var currentFrame = Date.now();\n var timeDiff = currentFrame - this.lastFrame;\n\n // Increase the score!\n this.score += timeDiff;\n\n // Recalculate level with each new score\n this.level = Math.ceil(this.score / LEVEL_THRESHOLD);\n\n // ADDED: Call update on all shots \n this.shots.forEach(shot => shot.update(timeDiff));\n\n // Call update on all enemies\n this.enemies.forEach(enemy => enemy.update(timeDiff));\n\n // Draw everything!\n this.ctx.drawImage(images['cookie_cat_8-bit_starry_background.png'], 0, 0); // draw the cookie cat background\n this.enemies.forEach(enemy => enemy.render(this.ctx)); // draw the enemies\n this.player.render(this.ctx); // draw the player\n this.shots.forEach(shot => shot.render(this.ctx)); // * ADDED\n\n // Check if any enemies should die; if player's lives decrement, or if shots should be deleted.\n this.enemies.forEach((enemy, enemyIdx) => {\n if (enemy.y > GAME_HEIGHT) {\n delete this.enemies[enemyIdx];\n } else if (enemy.collidesWithHitBox(this.player.x, this.player.y)) {\n let impactThud = new Audio(ENEMY_IMPACT_SFX_ARRAY[Math.round(Math.random())]); // TODO\n impactThud.play();\n this.player.numLives--;\n delete this.enemies[enemyIdx];\n }\n this.shots.forEach((shot, shotIdx) => {\n if (enemy.collidesWithHitBox(shot.x, shot.y)) {\n delete this.enemies[enemyIdx];\n delete this.shots[shotIdx];\n this.bonus += 100;\n } \n });\n });\n\n // Check if any off-canvas shots should be deleted\n this.shots.forEach((shot, shotIndex) => {\n if (shot.x > GAME_WIDTH || shot.x < 0 || shot.y > GAME_HEIGHT || shot.y < 0) {\n delete this.shots[shotIndex];\n }\n });\n\n this.setupEnemies();\n this.setupShots();\n\n // Check if player is dead\n if (this.isPlayerDead()) {\n // If they are dead, then it's game over!\n bgMusic.pause();\n bgMusic.currentTime = 0;\n gameOverPlayerCry.play();\n //gameOverBgMusic.play();\n this.player.sprite = images['playerGameOver.png'];\n this.ctx.drawImage(images['lion_licker_static_bg_DARK.gif'], 0, 0);\n this.player.render(this.ctx);\n this.ctx.font = 'bold 26px \"Press Start 2P\"';\n this.ctx.fillStyle = '#fffba6';\n this.ctx.fillText('Ugh...', (GAME_WIDTH / 4), (GAME_HEIGHT / 12) * 1);\n this.ctx.font = 'bold 14px \"Press Start 2P\"';\n this.ctx.fillText('Lion Lickers OVERLOAD!', (GAME_WIDTH / 15), (GAME_HEIGHT / 12) * 2);\n this.ctx.fillStyle = '#FFF';\n this.ctx.fillText('SCORE: ' + this.score, (GAME_WIDTH / 15) * 2, (GAME_HEIGHT / 12) * 5);\n this.ctx.fillText('BONUS: ' + this.bonus, (GAME_WIDTH / 15) * 2, (GAME_HEIGHT / 12) * 6);\n this.ctx.fillStyle = '#FF0';\n this.ctx.fillText('TOTAL: ' + (this.score + this.bonus), (GAME_WIDTH / 15) * 2, (GAME_HEIGHT / 12) * 8);\n }\n else {\n // If player is not dead, then draw the score\n this.ctx.font = 'bold 14px \"Press Start 2P\"';\n this.ctx.fillStyle = '#fffba6';\n this.ctx.fillText('SCORE: ' + this.score, 5, GAME_HEIGHT / 15);\n this.ctx.fillText('BONUS: ' + this.bonus, 5, (GAME_HEIGHT / 15) * 2);\n this.ctx.fillStyle = '#fffba6';\n this.ctx.fillText('LIVES: ' + this.player.numLives, (GAME_WIDTH / 11) * 7, GAME_HEIGHT / 15);\n this.ctx.fillText('LEVEL: ' + this.level, (GAME_WIDTH / 11) * 7, (GAME_HEIGHT / 15) * 2);\n // Set the time marker and redraw\n this.lastFrame = Date.now();\n requestAnimationFrame(this.gameLoop);\n }\n }", "title": "" }, { "docid": "974535232e251ea6041172b3eb4da392", "score": "0.6654506", "text": "function defineState(gameState){\n switch(gameState){\n case STATE.play:\n if(keyCode == RIGHT_ARROW || keyCode == LEFT_ARROW || keyCode == DOWN_ARROW || keyCode == UP_ARROW){\n playerOneMovement(keyCode);\n }else {\n playerOneMovement(player1State);\n }\n \n if(key == 'a' || key == 'd' || key == 'w' || key == 's'){\n playerTwoMovement(key);\n }else {\n playerTwoMovement(player2State);\n }\n break;\n // definicion para pausa del jueego\n case STATE.pause:\n xJ1=xJ1-5;\n xJ2=xJ2+5;\n break;\n //definicion imagen ganador\n case STATE.win:\n if(opacity1 == 0){\n //figura serpiente roja\n fill(211,13,13);\n smooth();\nbeginShape();\n curveVertex((windowWidth/2)+ (2*windowWidth/256), (windowHeight/2)); // the first control point\n curveVertex((windowWidth/2)+ (2*windowWidth/256), (windowHeight/2)); // is also the start point of curve\n curveVertex((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(windowHeight/134)); // the first control poin\n curveVertex((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(10*windowHeight/134)); // the first control point\n curveVertex((windowWidth/2)+(6*windowWidth/256), (windowHeight/2)-(16*windowHeight/134));\n curveVertex((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(16*windowHeight/134));\n curveVertex((windowWidth/2)-(2*windowWidth/256), (windowHeight/2)-(10*windowHeight/134));\n curveVertex((windowWidth/2)-(2*windowWidth/256),(windowHeight/2)-(windowHeight/134));\n curveVertex((windowWidth/2)-(2*windowWidth/256), (windowHeight/2)); // the first control point0\n curveVertex((windowWidth/2)-(2*windowWidth/256), (windowHeight/2)); // is also the last control point\n endShape();\n //figura huevo\n fill(242,236,220);\n arc(windowWidth/2,windowHeight/2,windowWidth/8,windowHeight/3,0,PI,CHORD);\n translate(-windowWidth/16,3*windowHeight/4.2);\n rotate(PI/2 / -2);\n arc(windowWidth/2,windowHeight/2,windowWidth/8,2*windowHeight/5,PI,0,CHORD);\n //figura corona\n fill(247,190,45);\n beginShape();\n vertex((windowWidth/2)-(6*windowWidth/256),(windowHeight/2)-(24*windowHeight/134));\n vertex((windowWidth/2)+(6*windowWidth/256),(windowHeight/2)-(24*windowHeight/134));\n vertex((windowWidth/2)+(4*windowWidth/256),(windowHeight/2)-(28*windowHeight/134));\n vertex((windowWidth/2)+(2*windowWidth/256),(windowHeight/2)-(26*windowHeight/134));\n vertex((windowWidth/2)-(windowWidth/256),(windowHeight/2)-(32*windowHeight/134));\n vertex((windowWidth/2)-(2*windowWidth/256),(windowHeight/2)-(26*windowHeight/134));\n vertex((windowWidth/2)-(4*windowWidth/256),(windowHeight/2)-(28*windowHeight/134));\n vertex((windowWidth/2)-(6*windowWidth/256),(windowHeight/2)-(24*windowHeight/134));\n endShape();\n }else if(opacity2 == 0){\n //figura serpiente verde\n fill(80,149,8);\n smooth();\n beginShape();\n curveVertex((windowWidth/2)+ (2*windowWidth/256), (windowHeight/2)); // the first control point\n curveVertex((windowWidth/2)+ (2*windowWidth/256), (windowHeight/2)); // is also the start point of curve\n curveVertex((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(windowHeight/134)); // the first control poin\n curveVertex((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(10*windowHeight/134)); // the first control point\n curveVertex((windowWidth/2)+(6*windowWidth/256), (windowHeight/2)-(16*windowHeight/134));\n curveVertex((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(16*windowHeight/134));\n curveVertex((windowWidth/2)-(2*windowWidth/256), (windowHeight/2)-(10*windowHeight/134));\n curveVertex((windowWidth/2)-(2*windowWidth/256),(windowHeight/2)-(windowHeight/134));\n curveVertex((windowWidth/2)-(2*windowWidth/256), (windowHeight/2)); // the first control point0\n curveVertex((windowWidth/2)-(2*windowWidth/256), (windowHeight/2)); // is also the last control point\n endShape();\n //figura huevo\n fill(242,236,220);\n arc(windowWidth/2,windowHeight/2,windowWidth/8,windowHeight/3,0,PI,CHORD);\n translate(-windowWidth/16,3*windowHeight/4.2);\n rotate(PI/2 / -2);\n arc(windowWidth/2,windowHeight/2,windowWidth/8,2*windowHeight/5,PI,0,CHORD);\n //figura corona\n fill(247,190,45);\n beginShape();\n vertex((windowWidth/2)-(6*windowWidth/256),(windowHeight/2)-(24*windowHeight/134));\n vertex((windowWidth/2)+(6*windowWidth/256),(windowHeight/2)-(24*windowHeight/134));\n vertex((windowWidth/2)+(4*windowWidth/256),(windowHeight/2)-(28*windowHeight/134));\n vertex((windowWidth/2)+(2*windowWidth/256),(windowHeight/2)-(26*windowHeight/134));\n vertex((windowWidth/2)-(windowWidth/256),(windowHeight/2)-(32*windowHeight/134));\n vertex((windowWidth/2)-(2*windowWidth/256),(windowHeight/2)-(26*windowHeight/134));\n vertex((windowWidth/2)-(4*windowWidth/256),(windowHeight/2)-(28*windowHeight/134));\n vertex((windowWidth/2)-(6*windowWidth/256),(windowHeight/2)-(24*windowHeight/134));\n endShape();\n fill(255);\n ellipse(((windowWidth/2)+(2*windowWidth/256), (windowHeight/2)-(16*windowHeight/134),5,5));\n\n }\n break;\n }\n}", "title": "" }, { "docid": "c8bb4dd67e58ea46ee86fc790cce2236", "score": "0.6648281", "text": "function startGame(){\n document.querySelector(\".replay\").style.display=\"none\";\n document.querySelector(\".splashScreen\").style.display = \"none\";\n document.querySelector(\".area\").style.display = \"block\";\n gameArea.createCanvas();\n startTime = new Date();\n document.querySelector(\"canvas\").style.display = \"block\";\n gameArea.start();\n shotexist = false;\n targetsCount = 0;\n numshot = 0;\n shotsfired = [];\n reload = 20;\n myTimer = new textComp(\"30px\", 'AtarianSystemExtended', 'white', 700, 40);\n myScore = new textComp(\"30px\", \"AtarianSystemExtended\", \"white\",20, 40);\n spaceship = new drawcomp(document.querySelector(\"#spaceship\"),300,450,200,200);\n alien = new drawcomp(document.querySelector('#alien'),getRandomPosition()[0],getRandomPosition()[1],120,120);\n}", "title": "" }, { "docid": "7b6da126e96076cc069d9b744f65f15e", "score": "0.664403", "text": "checkGameMode() {\n if (this.gameMode == XMLscene.gameMode.BOT_VS_BOT) {\n this.currentState = this.state.BOT_ASK_SERVER_FOR_PAWN_AND_DIRECTION;\n } else if (this.gameMode == XMLscene.gameMode.MOVIE) {\n this.currentState = this.state.GET_MOVIE_PLAY_PAWN;\n } else {\n this.currentState = this.state.SELECTING_PAWN;\n }\n this.player = 1;\n }", "title": "" }, { "docid": "7d30f4466c43a3242b97109f68040c5f", "score": "0.66428095", "text": "function startGame()\n{\n moveElements();\n drawAll();\n}", "title": "" }, { "docid": "e566f1b6a66b2a4dbd3acac853ccd711", "score": "0.66404015", "text": "function keyDown(e){\n document.getElementById('gameCanvas').focus();\n mouseDown = true;\n //this code is all mostly self-explanatory\n switch(e.keyCode){\n case 38:\n //Up arrow\n e.preventDefault();\n upEntered = true;\n gui.writeText(\"Up arrow pressed\");\n break;\n case 37:\n //Left arrow\n e.preventDefault();\n leftEntered = true;\n gui.writeText(\"Left arrow pressed\");\n break;\n case 40:\n //Down arrow\n e.preventDefault();\n downEntered = true;\n gui.writeText(\"Down arrow pressed\");\n break;\n case 39:\n //Right arrow\n e.preventDefault();\n rightEntered = true;\n gui.writeText(\"Right arrow pressed\");\n break;\n case 69:\n //E\n //for testing:\n var playerHealth = player.getHealth();\n gui.writeText(playerHealth);\n break;\n case 67:\n //C\n //for testing:\n player.giveRandomItem();\n for(var a=0;a<player.getItems().length;a++){\n console.log(\"Player item \" + a + \" \" + player.getItems()[a].getName() + \" ID \" + player.getItems()[a].getID());\n }\n break;\n case 77:\n //M\n //this mutes the music\n if(mute){\n mute = false;\n music.volume = 1;\n battleMusic.volume = 1;\n }else{\n mute = true;\n music.volume = 0;\n battleMusic.volume = 0;\n }\n console.log(mute);\n break;\n case 82:\n //R\n //for testing:\n player.decrementHealth();\n var playerHealth = player.getHealth();\n gui.writeText(playerHealth);\n break;\n case 90:\n //Z\n //for testing:\n gui.writeText(\"Z pressed\");\n player.giveExp(10);\n// if(!applesGoByeBye){\n// stage.removeAllChildren();\n// applesGoByeBye = true;\n// }else{\n// world.displayOverworld();\n// gui.displayDebug();\n// applesGoByeBye = false;\n// }\n break;\n case 70:\n //F\n gui.writeText(\"F pressed\");\n actionEntered = true;\n break;\n case 72:\n //H\n //for testing:\n gui.writeText(\"H pressed\");\n console.log(\"H pressed\");\n if(!debugTime){\n gui.displayDebug();\n\n debugTime = true;\n }else{\n gui.hideDebug();\n \n debugTime = false;\n }\n break; \n }\n }", "title": "" }, { "docid": "87e62c4dd79bffa408ce7849f1b074ce", "score": "0.66392976", "text": "prepareNewGame() {\n //Your code here \n }", "title": "" }, { "docid": "41dc20d8a437a5de494e0dbd9225b00f", "score": "0.66343963", "text": "lauchGame() {\n\t\tif(this.isFull()) {\n\t\t\tthis.status = 2;\n\t\t\tthis.initGame();\n\t\t\tthis.initBoard();\n\t\t}\n\t}", "title": "" }, { "docid": "6826549f0549a15b33c47c9ba0257593", "score": "0.6634224", "text": "function stuffToDraw(){\n\tif (game == 1){\n\t\tdisplay.ctx.fillStyle = \"#11f\";\n\t\t//bgReady=true;\n\t\tif (false) {\n\t\t\tdisplay.ctx.drawImage(bgImage, 0, 0);\n\t\t}\n\t\tif (true) {\n\t\t\tdisplay.ctx.fillRect(0, 0, display.width, display.height);\n\t\t}\n\t\ttarget.draw(display.ctx);\n\t\t//red.draw(display.ctx);\t\n\t\tplayer.draw(display.ctx);\n\t\tfor (i=0;i<bullet.length;i++){\n\t\t\tif (bullet[i] instanceof Box){\n\t\t\t\tbullet[i].draw(display.ctx);\n\t\t\t}\n\t\t}\n\t\tdisplay.ctx.fillStyle = \"#000\";//text\n\t\tdisplay.ctx.font = 'bold 15px sans-serif';\n display.ctx.textAlign = 'left';\n\t\tdisplay.ctx.fillText(\"Score:\"+score,2,12);\n\t}\n\tif (game ===0){\n\t\tdisplay.ctx.fillStyle = \"#f70\";//background\n\t\tdisplay.ctx.fillRect(50, 50, 300, 200);\n\t\tdisplay.ctx.fillStyle = \"#5fc23f\";//Button\n\t\tdisplay.ctx.fillRect(100, 150, 200, 70);\n\t\tdisplay.ctx.fillStyle = \"#000\";//text\n\t\tdisplay.ctx.font = 'bold 50px sans-serif';\n\t\tdisplay.ctx.textAlign = 'center';\n\t\tif (score == 0){\n\t\t\tdisplay.ctx.fillText(\"Play\",200,200);\n\t\t\tdisplay.ctx.fillText(\"Shooter\",200,120);\n\t\t}\n\t\tif (score > 0){\n\t\t\tdisplay.ctx.fillText(\"Again\",200,200);\n\t\t\tdisplay.ctx.fillText(\"Score:\"+score,200,120);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "a68513930f7cf901152b78d99532c233", "score": "0.66253144", "text": "function game() {\n\tpickWord();\n\tcreateWordGuesses();\n\tshowImageAndWordGuesses();\n}", "title": "" }, { "docid": "f45563b321b2b71b1fa24277b23ad99d", "score": "0.66247314", "text": "onTime(timeInsecond) {\n if (Constants.isSlowDown()) {\n for (let i = 0; i < 1e8; ++i) {\n let y = i * i;\n }\n }\n\n let ds = timeInsecond - this._time;\n this._time = timeInsecond;\n\n this._gameOverseer.notifyBegin();\n for (let obj of this._world.objectsIterator()) {\n\n // Ticks trigger...\n this._gameOverseer.tick(obj);\n obj.tick();\n obj.traits.tick();\n\n // Remove objects out of ttl.\n if (obj.traits.has('engine_rm')) {\n this._world.deleteObject(obj);\n }\n\n // :-:: replace this by controllable -- and pass to object here\n // ---- especially the graphics\n if (obj.traits.has('hero')) {\n for (let l of this._input) {\n\n // Here we probably just want the r object to decide what to do with the input.\n let vxMax = this._vxMax;\n if (l.key == 37) {\n // left\n if (obj.vx - vxMax / 10 > -vxMax) {\n obj.vx -= vxMax / 10;\n }\n\n let img_l = \"gfx/hero_l0.png\";\n obj.image = img_l;\n obj.sprite.texture = PIXI.Texture.fromImage(obj.image);\n } else if (l.key == 39) {\n // right \n if (obj.vx + vxMax / 10 < vxMax) {\n obj.vx += vxMax / 10;\n }\n\n let img_r = \"gfx/hero_r0.png\";\n if (obj.image != img_r) {\n obj.image = img_r;\n obj.sprite.texture = PIXI.Texture.fromImage(obj.image);\n }\n\n } else if (l.key == 38 && l.type == 'up') {\n if (obj.traits.has('on_surface') && !obj.traits.has('no_jump')) {\n obj.vy = 18;\n obj.traits.set('on_surface', 0);\n this.onKeyRelease(l.key);\n }\n }\n }\n }\n\n // Camera\n if (obj.traits.has('hero')) {\n let camera = this._camera;\n\n let type = 'siege';\n if (type == 'siege') {\n\n camera[0] = obj.x;\n\n let target = Math.max(this._baseY, obj.y - this._baseY - obj.height * 4);\n\n // --> Math.max ?\n let speed = 1 / 10 + Math.min(4 / 10, Math.abs(camera[1] - target) / 100);\n\n camera[1] -= (camera[1] - target) * speed;\n }\n }\n\n // Gravity\n //\n // y+\n // ^\n // |\n // |\n // -----> x+\n if (obj.traits.has('gravity')) {\n let pullForce = 0.7;\n let friction = 1 / 10;\n\n if (obj.traits.has('low_gravity')) {\n pullForce /= 15;\n friction /= 4.5;\n }\n\n // Left-right friction.\n let pos = obj.vx >= 0;\n if (!pos) obj.vx = -obj.vx;\n obj.vx = obj.vx - obj.vx * friction;\n if (!pos) obj.vx = -obj.vx;\n\n // Pull-down.\n obj.vy -= pullForce;\n }\n\n if (obj.traits.has('velocity')) {\n obj.x = obj.x + (obj.vx);\n obj.y = obj.y + (obj.vy);\n\n if (Math.abs(obj.vx) < 0.001) obj.vx = 0;\n if (Math.abs(obj.vy) < 0.001) obj.vy = 0;\n }\n\n if (obj.traits.has('stomp_on_object_below')) {\n let yOrig = obj.y;\n let triggered = false;\n for (let i = 0; i < 15; ++i && !triggered) {\n for (let nearbyObj of this._world.getNearbyObjects(obj)) {\n if (nearbyObj != obj && !nearbyObj.traits.has('surface') && !nearbyObj.traits.has('decoration')) {\n if (Collisions.isCollide(nearbyObj, obj)) {\n triggered = true;\n break;\n }\n }\n }\n\n obj.y = obj.y - obj.height;\n }\n\n if (triggered) {\n obj.objectBelow();\n }\n\n obj.y = yOrig;\n }\n\n // Kill objects that fall-off stage.\n if (obj.y <= -100) {\n obj.traits.set('kill', 0);\n }\n\n if (obj.traits.has('walks') && obj.traits.has('on_surface')) {\n obj.vx += 0.2 * obj.walkDirection;\n }\n\n } // while world objects iteration\n\n // We apply collisions in a seperate loop to avoid having the following\n // sequence of events:\n // - obj1 removed from colision with obj2.\n // - obj1 applied gravity down\n //\n // This could also be resolved by making sure the object action on\n // in collision function is always the same one that was already\n // moved.\n for (let obj of this._world.objectsIterator()) {\n // Apply collisions; don't dedup so (l, r) then (r, l) will happen.\n for (let nearbyObj of this._world.getNearbyObjects(obj)) {\n // Convention: current object is on RHS.\n if (nearbyObj != obj) {\n if (Collisions.isCollide(nearbyObj, obj)) {\n Collisions.collide(nearbyObj, obj, this._world);\n }\n }\n }\n\n }\n\n // Update position for display engine -- do last.\n for (let obj of this._world.objectsIterator()) {\n if (obj.traits.has('displayable')) {\n\n this._world.notifyObjectMoved(obj);\n\n // Camera movement.\n obj.sprite.x -= -screenWidth / 4 + this._camera[0];\n obj.sprite.y -= -this._camera[1];\n }\n }\n\n // Control game state.\n this._gameOverseer.notifyEnd();\n }", "title": "" }, { "docid": "65155462e7fcaf421352012a910d3f8c", "score": "0.661975", "text": "function gameCore(){\n \n direc = (value.direction.length !== 0 ? value.direction.shift() : direc);\n\n // case suivante ou teleportation si bord\n var next = value.snake[value.snake.length-1].slice(0);\n switch(direc){\n case value.const.direction.UP:\n next[0]-=1;\n if(next[0] < 0){next[0] = value.HEIGHT-1;}\n break;\n case value.const.direction.RIGHT:\n next[1]+=1;\n if(next[1] > value.WIDTH-1){next[1] = 0;}\n break;\n case value.const.direction.DOWN:\n next[0]+=1;\n if(next[0] > value.HEIGHT-1){next[0] = 0;}\n break;\n case value.const.direction.LEFT:\n next[1]-=1;\n if(next[1] < 0){next[1] = value.WIDTH-1;}\n break;\n default:\n break;\n }\n \n // action a realiser sur la case d'arrivee\n switch(value.map[next[0]][next[1]]){\n\n // jeu perdu retour au menu \n case value.const.SNAKE:\n case value.const.WALL:\n clearInterval(interv);\n alert(\"Vous avez perdu !\\nVotre score est de \" + value.score);\n window.removeEventListener(\"keydown\", ctrlDown);\n window.removeEventListener(\"keyup\", ctrlUp);\n window.removeEventListener(\"keydown\", dir);\n document.getElementById(\"menu\").classList.remove(\"hide\");\n document.getElementById(\"jeu\").classList.add(\"hide\");\n break;\n\n // case avec un fruit\n case value.const.FRUIT[2]:\n score.innerHTML = \"Score : \" + ++value.score; // gestion du score\n case value.const.FRUIT[1]:\n score.innerHTML = \"Score : \" + ++value.score; // gestion du score\n case value.const.FRUIT[0]:\n score.innerHTML = \"Score : \" + ++value.score; // gestion du score\n for (i=0 ; i<value.const.FRUIT.length ; i++){\n if(value.const.FRUIT[i]===value.map[next[0]][next[1]]){value.stomach += i+1;}\n }\n value.snake.push(next);\n setColor(next[0], next[1], value.const.SNAKE, value);\n\n // nouveau fruit placé de manière aléatoire\n let j = 0;\n for (i=0 ; i<value.fruit.length ; i++){\n if(value.fruit[i][0] === next[0] && value.fruit[i][1] === next[1]){\n j = i;\n }\n }\n do {\n value.fruit[j] = [(Math.floor(Math.random() * (value.HEIGHT-2)) + 1),\n (Math.floor(Math.random() * (value.WIDTH-2)) + 1 ),\n getFruit(data)];\n } while (value.map[value.fruit[j][0]][value.fruit[j][1]] != value.const.VOID);\n setColor(value.fruit[j][0], value.fruit[j][1], value.const.FRUIT[value.fruit[j][2]], value);\n\n // variation de la vitesse du serpent quand il mange un fruit\n switch(value.acceleration){\n case \"no\":\n break;\n case \"easy\":\n clearInterval(interv);\n value.delay = (value.delay < data.delay * 0.75? value.delay : value.delay -= 5);\n interv = start(value.delay);\n break;\n case \"medium\":\n clearInterval(interv);\n value.delay = (value.delay < data.delay * 0.5? value.delay : value.delay -= 10);\n interv = start(value.delay);\n break;\n case \"hard\":\n clearInterval(interv);\n value.delay = (value.delay < data.delay * 0.25? value.delay : value.delay -= 15);\n interv = start(value.delay);\n break;\n case \"random\":\n clearInterval(interv);\n value.delay = (Math.random()*1.5 + 0.25) * data.delay;\n interv = start(value.delay);\n break;\n default:\n break;\n }\n\n break;\n \n // normal, case vide\n case value.const.VOID:\n if((value.stomach === 0 ? 0 : --value.stomach) === 0){\n let last = value.snake.shift();\n setColor(last[0], last[1], value.const.VOID, value);\n }\n value.snake.push(next);\n setColor(next[0], next[1], value.const.SNAKE, value);\n break;\n\n default:\n break;\n }\n }", "title": "" }, { "docid": "c293d12dfc40f4bacfe2eb4880e21cbf", "score": "0.66146964", "text": "function render(){\r\n\r\n // draw game environment\r\n drawRect(0,0,canvas.width,canvas.height,bgColor);\r\n drawNet();\r\n drawText(user.score, canvas.width/4, canvas.height/5, user.color);\r\n drawText(com.score,3*canvas.width/4-context.measureText(com.score).width, canvas.height/5, com.color);\r\n\r\n // draw game entities\r\n drawRect(com.x,com.y,com.width,com.height,com.color); \r\n drawRect(user.x,user.y,user.width,user.height,user.color);\r\n drawCircle(ball.x,ball.y,ball.radius,ball.color);\r\n drawCircle(invis_ball.x,invis_ball.y,invis_ball.radius,invis_ball.color);\r\n\r\n // draw pause overlay\r\n if (isPause == true){\r\n drawRect(0,0,canvas.width,canvas.height,bgColor_Pause);\r\n drawText(pause_dialogue,canvas.width/2 - context.measureText(pause_dialogue).width/2,canvas.height/2, user.color);\r\n }\r\n}", "title": "" }, { "docid": "0191a5c1973d41481a8d7edd61672ea9", "score": "0.6609644", "text": "create () {\n /****game.var adds a new \"class variable\" to game state, like in other languages****/\n\n //the number of winning line to finish animating before displaying win screen\n \n game.linesToAnimate = 0\n\n //used for ai minimax\n game.human = \"x\";\n game.ai = \"o\";\n\n //init the background image\n var background = game.add.sprite(game.world.centerX, game.world.centerY, 'background');\n background.anchor.set(0.5);\n background.width = game.screenWidth;\n background.height = 700;\n\n //used for displaying squares scaled to size\n game.squareSize = 115\n //the size of the board, i.e nxn board, 3x3 for tictactoe\n game.n = 3\n //flags for turn and win status\n game.isXTurn = true\n game.isDraw = false\n game.turns = 0\n\n //the top left coordinate to place the whole board at, we will make game\n //not hardcoded in the furture to center the board, but I believe we need jQuery\n //to get window size and I didn't feel like learning that right now\n game.startingX = game.screenWidth/2 - ((game.cache.getImage('square').width* game.n) / 2)\n game.startingY = 115\n //intialize waiting status to false, update accordingly later if multiplayer\n game.waiting = false\n\n //record of the pieces that have been placed\n game.placedPieces = []\n\n //asign functions ot the game object, so they can be called by the client\n this.assignFunctions()\n\n //used to display the previous placed peice, i.e hilight the square\n //that was last placed a peice in\n game.cursorSquares = []\n for (var i=0; i < game.n; i++) {\n game.cursorSquares[i]=new Array(game.n)\n }\n\n for (var i=0; i < game.n; i++)\n {\n for (var j=0; j < game.n; j++)\n {\n game.cursorSquares[i][j] = game.addSprite(game.startingX + i*game.squareSize, game.startingY + j*game.squareSize, 'redsquare')\n game.cursorSquares[i][j].alpha = 0\n }\n }\n\n //create an internal representation of the board as a 2D array\n game.board = game.makeBoardAsArray(game.n)\n //create the board on screen and makes each square clickable\n game.makeBoardOnScreen()\n //add messages that display turn status, connection statuses\n this.addTexts()\n //used to track double clicks\n game.previousPiece = \"\"\n\n //folloowing logic is for multiplayer games\n if(game.singleplayer || game.vsAi)\n return\n //if this is the first play against an opponent, create a new player on the server\n game.startMultiplayer()\n\n }", "title": "" }, { "docid": "cc6a14f34cd103ad4972de8660470c61", "score": "0.6608545", "text": "function initGame() {\n initUI();\n setWinsAndLosses();\n}", "title": "" }, { "docid": "84f8e5542654795116a5c90b712b62c4", "score": "0.6606904", "text": "function youWin() {\n newGame();\n}", "title": "" }, { "docid": "7e9980429fc4e58d608db69d1c7a0e2b", "score": "0.66048884", "text": "function game() {\n\n let randomTime = Math.round(Math.random() * getFaster);\n // Permet de faire pop de plus en plus vite\n getFaster > 700 ? getFaster = (getFaster * 0.9) : '';\n\n setTimeout(() => {\n\n // le jeu est gagner lorsque le nombre de zombie restant est a zero\n if (zombieRestant === 0) {\n\n youWin();\n \n // le jeu continue, tant que le nombre de zombie pop et inférieur a une valeur defini en haut \n } else if (canvas.childElementCount < gameOverNumber) {\n \n zombiePop();\n game();\n\n // le jeu est perdu, si aucune de ces conditions est remplissent. \n } else {\n\n gameOver();\n\n }\n\n }, randomTime);\n }", "title": "" }, { "docid": "3a29300e473e9f49935c07713c1407b7", "score": "0.66024405", "text": "function draw() {\n \n //THIS IS THE GAMESTATE START FOR THE GAME\n if(gameState === START){\n //MAKING INVISIBLE THE SPRITE WE DONT NEED FOR THIS GAMESTATE\n back.visible = false;\n road.visible = false;\n player.visible = false;\n gameOver.visible = false;\n restart.visible = false;\n\n //WRITING THE FUNCTION FOR THE DOWN BUTTON\n if(mousePressedOver(down)){\n back.visible = true;\n road.visible = true;\n player.visible = true;\n gameState = PLAY;\n }\n }\n\n //THIS IS THE FUNCTION TO SHOW ALL THE SPRITES IN THE GAME\n drawSprites();\n\n //THIS IS THE GAMESTATE PLAY FOR THE GAME \n if (gameState === PLAY) {\n down.visible = false;\n logo.visible = false;\n restart.visible = false;\n gameOver.visible = false;\n player.collide(edges);\n\n //MAKING THE ROAD INFINITE\n if (road.y > height) {\n road.y = height / 2.5;\n }\n\n //PRESSING THE LEFT TO MOVE LEFT\n if (keyDown(\"left\")) {\n player.x = player.x - 25;\n }\n\n //PRESSING THE RIGHT TO MOVE RIGHT\n if (keyDown(\"right\")) {\n player.x = player.x + 25;\n }\n\n //CREATING THE POINT\n if (frameCount % 100 == 0) {\n var money = createSprite(Math.round(random(200, width - 200)), 100, 10, 10);\n money.addImage(moneyImg);\n money.scale = 0.05;\n money.velocityY = (15 + score / 50);\n money.lifetime = 100;\n moneyGroup.add(money);\n }\n\n //CREATING THE POINT\n if (frameCount % 540 == 0) {\n var money1 = createSprite(Math.round(random(200, width - 200)), 100, 10, 10);\n money1.addImage(moneyImg1);\n money1.scale = 0.05;\n money1.velocityY = (15 + score / 50);\n money1.lifetime = 115;\n moneyGroup1.add(money1);\n }\n\n //CREATING THE SWORD\n if (frameCount % (400 -score /50) == 0) {\n var sword = createSprite(Math.round(random(300, width -300)), 100, 10, 10);\n sword.addAnimation(\"spining\", sword_animation);\n sword.scale = 1.5;\n sword.velocityY = (15 + score / 50);\n sword.lifetime = 115;\n swordGroup.add(sword);\n }\n\n //GIVING A POINT TO THE PLAYER\n if (player.isTouching(moneyGroup)) {\n moneySound.play();\n moneyGroup.destroyEach();\n score = score + 50;\n }\n\n //GIVING A POINT TO THE PLAYER\n if (player.isTouching(moneyGroup1)) {\n moneySound.play();\n moneyGroup1.destroyEach();\n score = score + 100;\n }\n\n //LOSING THE PLAYER\n if (player.isTouching(swordGroup)) {\n hitSound.play();\n gameState = END;\n }\n\n //THIS THE FUNCTION SCORE FOR THE CURRENT GAME\n textSize(30);\n stroke(\"white\");\n fill(\"white\");\n text(\"treasure : \" + score, width - 850, height - 700);\n \n // THIS IS THE GAMESTATE END FOR THE GAME\n } else if (gameState === END) {\n down.visible = false;\n logo.visible = false;\n restart.visible = true;\n gameOver.visible = true;\n swordGroup.setVelocityYEach(0);\n road.velocityY = 0;\n player.addAnimation(\"running\", player_stop);\n moneyGroup.destroyEach();\n moneyGroup1.destroyEach();\n swordGroup.destroyEach();\n //THIS IS THE FUNCTION FOR MAKING RESTART BUTTON \n if( mousePressedOver(restart)){\n score = 0;\n player.addAnimation(\"running\",player_running);\n road.velocityY = (15 +score/50);\n gameState = PLAY;\n }\n\n //THIS IS THE FUNCTION OF THE END SCORE\n textSize(30);\n stroke(\"white\");\n fill(\"white\");\n text(\"treasure : \" + score, width - 850, height - 700);\n }\n}", "title": "" }, { "docid": "358cde4e2f9dd0822027c2f8d9a5e034", "score": "0.66008264", "text": "draw() {\n clear();\n if (this.level === 2) {\n background(background2);\n } else if (this.level > 3) {\n background(background3);\n } else {\n background(background1);\n }\n //draw the player\n this.player.draw();\n\n // push new collectible every 1.5 seconds\n if (frameCount % 90 === 0) {\n this.vinyls.push(new Vinyl());\n }\n\n //array of obstacles\n this.vinyls.forEach((vinyl, index) => {\n vinyl.draw();\n vinyl.move();\n // collectibles and splice\n if (this.collisionCheck(this.player, vinyl) || this.vinyls.length > 10) {\n this.vinyls.splice(index, 1);\n if (this.collisionCheck(this.player, vinyl)) {\n document.getElementById(\"collect\").innerHTML = this.vinylCounter;\n this.score += 1;\n return (this.vinylCounter += 1);\n }\n }\n });\n //conditions to change levels\n if (this.level === 1 && this.vinylCounter === 8) {\n this.endGame = \"win\";\n } else if (this.level === 2 && this.vinylCounter === 12) {\n this.endGame = \"win\";\n } else if (this.level === 3 && this.vinylCounter === 16) {\n this.endGame = \"win\";\n } else if (this.time === 0 && this.level > 1) {\n this.endGame = \"pro\";\n } else if (this.time === 0 && this.level === 1) {\n this.endGame = \"out\";\n }\n // calling methods for levels, good and bad ending\n if (this.endGame === \"win\") {\n return this.toTheNextLevel();\n }\n if (this.endGame === \"pro\") {\n return this.discogsKing();\n }\n if (this.endGame === \"out\") {\n return this.goBackHome();\n }\n }", "title": "" }, { "docid": "8c45fdf974c554569928632cbaf6e9e0", "score": "0.6596449", "text": "function drawGame() {\n // Clear all elements\n context.clearRect(0, 0, gameWidth, gameHeight);\n\n // Draw player\n drawPaddle(margin, playerY);\n\n // Draw computer\n drawPaddle(gameWidth - paddleWidth - margin, computerY);\n\n // Draw middle line\n drawMiddleLine()\n\n //Draw player score\n drawScore();\n\n //Draw computer score\n drawHP();\n\n //Draw the ball\n drawBall(ballX, ballY)\n\n if(!gameStarted){\n drawText(\"Press 'Space' to play..\");\n }\n\n if(gameEnded){\n drawText(\"You lost! Press 'r' to restart, or 'h' for highscore\");\n }\n\n\n if (theme==\"football\") {\n drawFotballTheme();\n }\n else{\n drawSpaceTheme();\n \n }\n\n}", "title": "" }, { "docid": "524b0568b42cf3e7da4b6d8c51ad872d", "score": "0.65963644", "text": "function draw(){\n \n loadBackgroundPicture();\n clickToStart();\n \n if(gameStatus == 1){\n inGame();\n }else if(gameStatus == 2){\n gameOver();\n }else{\n startPage();\n }\n \n}", "title": "" }, { "docid": "0acadda1ab5212a76f03ef5253bdf995", "score": "0.65958726", "text": "function main() {\n\n // Create game object\n let game = new MSGame();\n\n create_difficulty(game);\n\n add_grid_listeners(game);\n\n add_difficulty_listeners(game);\n\n add_try_again_listener(game);\n\n // Start an easy game by default\n helper_init(game, DIFFICULTY_EASY[1], DIFFICULTY_EASY[2], DIFFICULTY_EASY[3]);\n\n render_grid(game);\n\n check_game_status(game);\n}", "title": "" }, { "docid": "bedf608e03c8b1645cffc736597fcb7f", "score": "0.6595026", "text": "function runProgram(){\n ////////////////////////////////////////////////////////////////////////////////\n //////////////////////////// SETUP /////////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n // Constant Variables\n var FRAME_RATE = 10;\n var FRAMES_PER_SECOND_INTERVAL = 1000 / FRAME_RATE;\n\n var KEY = {\n \"ENTER\": 13,\n \"A\": 65,\n \"D\": 68,\n \"W\": 87,\n \"S\": 83,\n \"LEFT\": 37,\n \"RIGHT\": 39,\n \"UP\": 38,\n \"DOWN\": 40,\n }\n \n // Game Item Objects\n \n function makeItem(x, y, velX, velY, id, color) {\n var itemInstance = {\n x: x * 20,\n y: y * 20,\n prevX: x * 20,\n prevY: y * 20,\n width: $(id).width(),\n originalW: $(id).width(),\n height: $(id).height(),\n speedX: velX,\n speedY: velY,\n id: id,\n passId: id.substring(1, id.length),\n canLeft: velX > 0 ? false : true,\n canRight: velX < 0 ? false : true,\n canUp: velY > 0 ? false : true,\n canDown: velY < 0 ? false : true, \n color: color,\n };\n return itemInstance;\n }\n\n var bike1 = makeItem(3, 3, 20, 0, \"#bike1\", \"rgb(242, 225, 94)\");\n\n var player1 = [bike1];\n\n var bike2 = makeItem(($(\"#board\").width() / 20) - 4, ($(\"#board\").height() / 20) - 4, -20, 0, \"#bike2\", \"rgb(103, 198, 249)\");\n\n var player2 = [bike2];\n\n var score1 = 0;\n var score2 = 0;\n\n var pause = false;\n\n updateScore(player1, score1);\n updateScore(player2, score2);\n\n // one-time setup\n var interval = setInterval(newFrame, FRAMES_PER_SECOND_INTERVAL); // execute newFrame every 0.0166 seconds (60 Frames per second)\n $(document).on('keydown', handleKeyDown); // change 'eventType' to the type of event you want to handle\n\n ////////////////////////////////////////////////////////////////////////////////\n ///////////////////////// CORE LOGIC ///////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n /* \n On each \"tick\" of the timer, a new frame is dynamically drawn using JavaScript\n by calling this function and executing the code inside.\n */\n function newFrame() {\n if (pause == false) {\n redrawGameItem(player1);\n redrawGameItem(player2);\n\n checkWalls(player1);\n checkWalls(player2);\n\n checkSelf(player1, player2);\n checkSelf(player2, player1);\n }\n }\n \n /* \n Called in response to events.\n */\n function handleKeyDown(event) {\n if(pause == false) {\n if (event.which == KEY.W) {\n console.log(\"up\");\n if (bike1.speedY == 0 && bike1.canUp) {\n bike1.speedY = -20;\n bike1.speedX = 0;\n }\n }\n if (event.which == KEY.S) {\n console.log(\"down\");\n if (bike1.speedY == 0 && bike1.canDown) {\n bike1.speedY = 20;\n bike1.speedX = 0;\n }\n }\n if (event.which == KEY.D) {\n console.log(\"right\");\n if (bike1.speedX == 0 && bike1.canRight) {\n bike1.speedY = 0;\n bike1.speedX = 20;\n }\n }\n if (event.which == KEY.A) {\n console.log(\"left\");\n if (bike1.speedX == 0 && bike1.canLeft) {\n bike1.speedY = 0;\n bike1.speedX = -20;\n }\n }\n\n if (event.which == KEY.UP) {\n console.log(\"up\");\n if (bike2.speedY == 0 && bike2.canUp) {\n bike2.speedY = -20;\n bike2.speedX = 0;\n }\n }\n if (event.which == KEY.DOWN) {\n console.log(\"down\");\n if (bike2.speedY == 0 && bike2.canDown) {\n bike2.speedY = 20;\n bike2.speedX = 0;\n }\n }\n if (event.which == KEY.RIGHT) {\n console.log(\"right\");\n if (bike2.speedX == 0 && bike2.canRight) {\n bike2.speedY = 0;\n bike2.speedX = 20;\n }\n }\n if (event.which == KEY.LEFT) {\n console.log(\"left\");\n if (bike2.speedX == 0 && bike2.canLeft) {\n bike2.speedY = 0;\n bike2.speedX = -20;\n }\n }\n }\n\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n ////////////////////////// HELPER FUNCTIONS ////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n \n /*function endGame() {\n // stop the interval timer\n clearInterval(interval);\n\n // turn off event handlers\n $(document).off();\n }*/\n\n function redrawGameItem(player) {\n if($(player[0].id).css(\"z-index\") !== 3) {\n $(player[0].id).css(\"z-index\", 3);\n }\n for (var i = 0; i < player.length; i++) {\n let obj = player[i]\n\n if (obj == player[0]) {\n obj.prevX = obj.x\n obj.x += obj.speedX;\n\n obj.prevY = obj.y\n obj.y += obj.speedY;\n }\n\n else {\n obj.prevX = obj.x;\n obj.x = player[i - 1].prevX;\n obj.prevY = obj.y;\n obj.y = player[i - 1].prevY;\n if ($(obj.id).css(\"z-index\") == -2) {\n $(obj.id).css(\"z-index\", 1)\n }\n }\n \n $(obj.id).css(\"left\", obj.x);\n $(obj.id).css(\"top\", obj.y);\n }\n\n if (player.length < 101) {\n addTrail(player);\n }\n }\n\n function checkWalls(player) {\n if (pause == false) {\n let obj = player[0];\n\n if (obj.x < 0 || obj.x > $(\"#board\").width() - 20 || obj.y < 0 || obj.y > $(\"#board\").height() - 20) {\n killPlayer(player);\n }\n }\n }\n\n function checkSelf(player, opponent) {\n if (pause == false) {\n let bike = player[0];\n\n for (var i = 1; i < player.length - 1; i++) {\n if (bike.x == player[i].x && bike.y == player[i].y) {\n killPlayer(player);\n }\n if (bike.x == opponent[i].x && bike.y == opponent[i].y) {\n killPlayer(player);\n }\n }\n\n bike.x > bike.prevX ? bike.canLeft = false : bike.canLeft = true;\n bike.x < bike.prevX ? bike.canRight = false : bike.canRight = true;\n bike.y > bike.prevY ? bike.canUp = false : bike.canUp = true;\n bike.y < bike.prevY ? bike.canDown = false : bike.canDown = true;\n }\n }\n\n function tieDeath(obj1, obj2) {\n let bike1 = obj1[0];\n let bike2 = obj2[0];\n\n for (var i = 1; i < obj1.length; i++) {\n if (bike1.x == obj1[i].x && bike1.y == obj1[i].y) {\n if(bike2.x == obj2[i].x && bike2.y == obj2[i].y) {\n return true;\n }\n if(bike2.x == obj1[i].x && bike2.y == obj1[i].y) {\n return true;\n }\n }\n\n if (bike1.x == obj2[i].x && bike1.y == obj2[i].y) {\n if(bike2.x == obj2[i].x && bike2.y == obj2[i].y) {\n return true;\n }\n if(bike2.x == obj1[i].x && bike2.y == obj1[i].y) {\n return true;\n }\n }\n }\n\n if (bike1.x < 0 || bike1.x > $(\"#board\").width() - 20 || bike1.y < 0 || bike1.y > $(\"#board\").height() - 20) {\n if (bike2.x < 0 || bike2.x > $(\"#board\").width() - 20 || bike2.y < 0 || bike2.y > $(\"#board\").height() - 20) {\n return true;\n }\n }\n }\n\n function addTrail (player) {\n $('<div id=\"' + player[0].passId + 'trail' + (player.length - 1) + '\" class = \"trail\" style= \"z-index: -2; background-color:' + player[0].color + ';\"></div>').insertAfter(player[0].id);\n player.push(makeItem(player[player.length - 1].prevX / 20, player[player.length - 1].prevY / 20, 0, 0, \"#\" + player[0].passId + 'trail' + (player.length - 1)))\n }\n\n function killPlayer(player) {\n if (pause == false) {\n pause = true;\n player1[0].speedX = 0;\n player1[0].speedY = 0;\n player2[0].speedX = 0;\n player2[0].speedY = 0;\n\n if (tieDeath(player1, player2)){\n if (Math.random() < 0.5) {\n score2 ++;\n updateScore(player2, score2);\n }\n else {\n score1 ++;\n updateScore(player1, score1);\n }\n } \n\n else {\n if (player == player1) {\n score2 ++;\n updateScore(player2, score2);\n }\n else if (player == player2) {\n score1 ++;\n updateScore(player1, score1);\n } \n }\n \n $(\".trail\").remove();\n player1 = [bike1];\n player2 = [bike2];\n\n \n\n resetGame();\n }\n }\n\n function updateScore(player, score){\n $(player[0].id + \"score\").text(score);\n }\n\n function resetGame() {\n $(\"#screenText\").text(3);\n $(\"#screenText\").css(\"z-index\", 3);\n\n $(\"#bike1\").css(\"z-index\", -2);\n $(\"#bike2\").css(\"z-index\", -2);\n\n $(\"#bike1\").css(\"left\", 0);\n $(\"#bike2\").css(\"left\", 0);\n $(\"#bike1\").css(\"top\", 0);\n $(\"#bike2\").css(\"top\", 0);\n\n console.log(\"reset in: 3\");\n setTimeout(function() {\n $(\"#screenText\").text(2);\n console.log(\"reset in: 2\");\n }, 1100);\n setTimeout(function() {\n $(\"#screenText\").text(1);\n console.log(\"reset in: 1\");\n }, 2200);\n setTimeout(function() {\n $(\"#screenText\").text(0);\n console.log(\"reset in: 0\");\n }, 3300);\n\n setTimeout(function() {\n createBikes();\n console.log(\"creating bikes!\");\n $(\"#screenText\").css(\"z-index\", -2);\n }, 4400);\n }\n\n function createBikes() {\n \n bike1 = makeItem(3, 3, 20, 0, \"#bike1\", \"rgb(242, 225, 94)\", \"Player 1: \");\n\n player1 = [bike1];\n\n bike2 = makeItem(($(\"#board\").width() / 20) - 4, ($(\"#board\").height() / 20) - 4, -20, 0, \"#bike2\", \"rgb(103, 198, 249)\", \"Player 2: \");\n\n player2 = [bike2];\n\n pause = false;\n }\n}", "title": "" }, { "docid": "445d6d6da7db8d89d30b2c846a84823f", "score": "0.6593516", "text": "function draw() {\n\n // play sound\n playSound();\n // check user inputs\n handleInputs();\n // load an empty screen\n ui.loadBg();\n\n // check if game is running or over\n // if game is over:\n if(game.gameIsOver) {\n // run Game Over sequence and display appropriate objects\n runGameOver();\n }\n // if game is running:\n else {\n // run Game sequence and display appropriate objects\n runGame();\n }\n // display instructions and score\n ui.displayControls();\n ui.displayScore();\n}", "title": "" }, { "docid": "9bdc0efd423c86d90d054d8473b0a0bd", "score": "0.6591522", "text": "function init() {\n // document.oncontextmenu = function() {return false;} //disable the right click context menu.\n \n gGame.isGameOver = false;\n gGame.isGameOn = false;\n\n gGame.flagedBombsCount = 0;\n gGame.markedCellsCount = 0;\n gGame.bombedCellsCount = 0;\n gGame.amountOfBombs = 0;\n gGame.safeClickCount = 3;\n gGame.areaHintCount = 3;\n\n gGame.health = LEVELS[gGame.levelIdx].health;\n gGame.isFirstClick = true;\n gGame.isAreaHint = false;\n gGame.isManualMinePosMod = false;\n gGame.isManualPosOn = false;\n\n gTimeParts.miliSec = 0;\n gTimeParts.sec = 0;\n gTimeParts.min = 0;\n gTimeParts.milSecStr = '00';\n gTimeParts.secondsStr= '00';\n gTimeParts.minutesStr = '00';\n \n clearInterval(gGame.timerInterval);\n gGame.timerInterval = null;\n\n gGame.bestTime = (localStorage.getItem(gGame.level+'BestTime'))? gGame.bestTime : Infinity;\n\n gGame.board = creatBoard(gGame.boardSize);\n renderBoard(gGame.board);\n renderHealth();\n\n document.querySelector('.game-container .game-statuse').innerText = GAME_ON;\n document.querySelector('.game-container .hint-buttons .safe-button span').innerText = gGame.safeClickCount;\n document.querySelector('.game-container .hint-buttons .hint-area-button span').innerText = gGame.areaHintCount;\n document.querySelector('.game-container .high-score h3 span').innerText = (gGame.bestTimeStr)? gGame.bestTimeStr : 'There is no best time..';\n document.querySelector('.game-container .stopwatch span').innerText = '00:00:00';\n\n gPrevStates = [];\n gCurrStateIdx = -1;\n gGame.playCount = 0;\n setNewState();\n}", "title": "" }, { "docid": "c1c41913c84fe1e2165ada791cefcd24", "score": "0.65905756", "text": "function UI(){\n //Game Screen\n if (menuState === \"game\"){\n //Sets up scene\n createCanvas(windowWidth, windowHeight);\n background(255, 0, 0);\n //Displays the background image and sausage icon\n imageMode(CENTER);\n image(bg, windowWidth/2, windowHeight/2, windowWidth, windowHeight)\n image(sausage, windowWidth/2, windowHeight/2);\n //Creates the buttons\n fill(255)\n rect(windowWidth/1.2, windowHeight/8, 100, 50); \n fill(255)\n rect(windowWidth/1.2, windowHeight/4, 100, 50)\n rect(windowWidth/1.2, windowHeight/2.75, 100, 50)\n fill(0)\n //Displays the Text\n textSize(50);\n stroke(255, 0, 0)\n fill(\"red\");\n text(score, windowWidth/2, windowHeight/8)\n textSize(25)\n stroke(0); \n text(\"multiplier\", windowWidth/1.2, windowHeight/8 - 5)\n text(\"Hats\", windowWidth/1.2 + 20, windowHeight/2.75 - 5)\n text(\"auto click\", windowWidth/1.2, windowHeight/4 - 5)\n fill(0);\n text(autoClickerCost, windowWidth/1.2 + 28, windowHeight/3.4)\n text(round(multiplierCost), windowWidth/1.2 + 35, windowHeight/6) \n\n //Displays hats if hatState is true\n if (hatState === true){\n scale(0.15)\n\n if (hatSelected === someHat[1]){\n image(hatSelected, windowWidth/0.36, windowHeight/0.34, 298*2, 246*2);\n }\n\n else if (hatSelected === someHat[0] || hatSelected === someHat[2]) {\n image(hatSelected, windowWidth/0.36, windowHeight/0.34);\n } \n\n }\n }\n //Hat selector screen \n else if (menuState === \"hat\"){\n //Sets background\n background(255);\n //Creates the buttons for hats\n fill(255);\n rect(windowWidth/7.5, windowHeight/8, 100, 50)\n rect(windowWidth/7.5 + 150, windowHeight/8, 100, 50)\n rect(windowWidth/7.5 + 300, windowHeight/8, 100, 50)\n rect(windowWidth/7.5 + 450, windowHeight/8, 100, 50)\n rect(windowWidth/7.5 + 600, windowHeight/8, 100, 50)\n //Displays the hat on the correct button\n image(som, windowWidth/7.5, windowHeight/8, 1286/18, 1002/18);\n image(fedora, windowWidth/7.5 + 150, windowHeight/8, 298/5, 246/5);\n image(cowboy, windowWidth/7.5 + 300, windowHeight/8, 913/15, 720/15);\n image(sausage, windowWidth/7.5 + 499, windowHeight/8 + 25, 417/6, 190/6)\n //Creates a back button\n fill(0);\n text(\"Back\", windowWidth/7.5 + 620, windowHeight/8 + 35)\n fill(255);\n }\n}", "title": "" }, { "docid": "79343fe76aa436c322eeb357a46167c7", "score": "0.6589351", "text": "function pvpGameStart() {\n\n\t// Randomize X & O assignment\n\tplayerX = gameState.players[Math.floor(Math.random()*2)];\n\tplayerO = _.without(gameState.players, playerX)[0];\n\n\t// Assign token values\n\tplayerX.token = 'X';\n\tplayerO.token = 'O';\n\n\t// Assign addToWinner attribute\n\tplayerX.addToWinner = 0;\n\tplayerO.addToWinner = 0;\n\n\t// Link up gameState + player associations\n\tgameState.turn = playerX;\n\tgameState.turnCounter = 1;\n\tstatus('<em>Current Move: </em>' + gameState.turn.name + ' is ' + gameState.turn.token);\n\n\t// ===============================================================================================\n\t// CENTRAL HUB SECTION - This section will house all gameplay condition checks except...\n\t//\t\t[Ref1] For brevity, the gameState.gameOver check for move() occurs within move()\n\t//\t\t[Ref2] For brevity, the gameState.gameOver check for switchTurn() occurs within switchturn()\n\t// ===============================================================================================\n\t$('.box').on('click', function() {\n\t\tvar converter = ('#' + this.id);\n\t\tgameState.move = $(converter);\n\t\tmove(gameState.move);\t\t// <-- [Ref1]\n\n\t\t// Upon move completion, check for win. Check for gameover to prevent players from adding wins after the game is over.\n\t\tif (checkWin(gameState.turn.token) && gameState.gameOver === false) {\n\t\t\tgameState.gameOver = true;\n\t\t\tstatus(gameState.turn.name + ' wins!');\n\t\t\t// Update win to the global player object\n\t\t\tgameState.turn.addToWinner ++;\n\t\t\tplayer1.wins = player1.wins + player1.addToWinner;\n\t\t\tplayer2.wins = player2.wins + player2.addToWinner;\n\t\t\trefreshScoreboard();\n\t\t\t$('#new-pvp-game-button').show();\n\t\t\treturn false;\n\t\t// If no winner; check for draw\n\t\t} else if (checkDraw()) {\n\t\t\tgameState.gameOver = true;\n\t\t\tstatus('Draw!');\n\t\t\t$('#new-pvp-game-button').show();\n\t\t\treturn false;\n\t\t// If no draw, switch turn\n\t\t} else {\n\t\t\tswitchTurn();\t\t// <-- [Ref2]\n\t\t}\n\t});\n\t// ==========================\n\t// End of CENTRAL HUB SECTION\n\t// ==========================\n\n\n\t// =========================\n\t// Individual Game Functions\n\t// =========================\n\n\t// For sake of brevity, the move function will house the gameState.gameOver checks rather the CENTRAL HUB SECTION.\n\tfunction move(square) {\n\t\t// Condition check for a closed square\n\t\tif(square.hasClass('closed') && gameState.gameOver === false) {\n\t\t\talert('Invalid choice!\\nPlease choose an open box');\n\t\t\t// BUGFIX: During this condition, the switchTurn() still gets called. To avoid calling switchTurn as a callback function of move()...\n\t\t\t// Manually change the turn and decrement gameState.turnCounter, thus the CENTRAL HUB switchTurn() will even out.\n\t\t\tif (gameState.turn == playerX) {\n\t\t\t\tgameState.turn = playerO;\n\t\t\t\tgameState.turnCounter --;\n\t\t\t} else {\n\t\t\t\tgameState.turn = playerX;\n\t\t\t\tgameState.turnCounter --;\n\t\t\t}\n\t\t\treturn false;\n\t\t// Condition check for open square\n\t\t} else if (square.hasClass('open') && gameState.gameOver === false) {\n\t\t\t// Switch the square's class\n\t\t\tsquare.removeClass('open');\n\t\t\tsquare.addClass('closed');\n\t\t\t// Add the player's token to the square\n\t\t\tsquare.text(gameState.turn.token);\n\t\t\t// Capture and use the square's id to capture the value onto the appropriate game board \n\t\t\tvar index = square.attr('id');\n\t\t\tgameState.board[index] = gameState.turn.token;\n\t\t}\n\t}\n\n\t// function to check for win\n\tfunction checkWin(token) {\n\t\tif(gameState.board[0] == token && gameState.board[1] == token && gameState.board[2] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[3] == token && gameState.board[4] == token && gameState.board[5] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[6] == token && gameState.board[7] == token && gameState.board[8] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[0] == token && gameState.board[3] == token && gameState.board[6] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[1] == token && gameState.board[4] == token && gameState.board[7] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[2] == token && gameState.board[5] == token && gameState.board[8] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[0] == token && gameState.board[4] == token && gameState.board[8] == token) {\n\t\t\treturn true;\n\t\t} else if (gameState.board[2] == token && gameState.board[4] == token && gameState.board[6] == token) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// function to check for draw\n\t// [note] The turnCounter checks for 9; the condition occurs after the players move registers but before the switchturn can be invoked);\n\tfunction checkDraw(){\n\t\tif (gameState.gameOver === false && gameState.turnCounter == 9) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// function to switchturn\n\tfunction switchTurn() {\n\t\tif (gameState.turn == playerX && gameState.gameOver === false) {\n\t\t\tgameState.turn = playerO;\n\t\t\tgameState.turnCounter ++;\n\t\t\tstatus('<em>Current Move: </em>' + gameState.turn.name + ' is ' + gameState.turn.token);\n\t\t\treturn false;\n\t\t} else if (gameState.turn == playerO && gameState.gameOver === false) {\n\t\t\tgameState.turn = playerX;\n\t\t\tgameState.turnCounter ++;\n\t\t\tstatus('<em>Current Move: </em>' + gameState.turn.name + ' is ' + gameState.turn.token);\n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7565cafa4dfb1281b4b9205993ef9efb", "score": "0.6587815", "text": "function Game(){\r\n//set the speed of the ball\r\nball.x += vx;\r\nball.y += vy;\r\n\r\n//check to see if the ball has collided with the right edge of the screen\r\nif((ball.x+ball.radius) > width)\r\n{\r\n//place the balls position in the center, increase the score for the left player and output that score to all clients\r\n\tball.x = 400;\r\n\tball.y = 200;\r\n\tp1Score += 1;\r\n\tio.emit(\"player1Score\", p1Score)\r\n\r\n}\r\n//check to see if the ball has collided with the left edge of the screen\r\nelse if((ball.x - ball.radius) < 0)\r\n{\r\n\t//place the balls position in the center, increase the score for the right player and output that score to all clients\r\n\tball.x = 400;\r\n\tball.y = 200;\r\n\tp2Score += 1;\r\n\tio.emit(\"player2Score\", p2Score)\r\n}\r\n//check to see if the ball has touched the top or bottom of the canvas\r\nelse if(ball.y > height || ball.y < 0)\r\n{\r\n\t//reverse the y speed of the ball\r\n\tvy = -vy\r\n}\r\n//check to see if the ball has collided with the paddle\r\nelse if(ball.x-ball.radius < leftPaddle.x+leftPaddle.width && (ball.y - ball.radius) > leftPaddle.y && (ball.y - ball.radius) < (leftPaddle.y + leftPaddle.height))\r\n{\r\n\tvx = - vx;\r\n\tvy = - vy;\r\n}\r\n//check to see if the ball has collided with the paddle\r\nelse if(ball.x+ball.radius > rightPaddle.x && ball.y+ball.radius > rightPaddle.y && ball.y < (rightPaddle.y+rightPaddle.height))\r\n{\r\n\tvx = - vx;\r\n\tvy = - vy;\r\n}\r\n}", "title": "" }, { "docid": "2d608ed597c94eb27b6842887231483e", "score": "0.6584541", "text": "function logic(){\n if (totalScore == mNumber) {\n wins = wins + 1;\n res.text('You Win!').css('color', 'white').animate({ opacity: \"0.01\" }, 1000).animate({ opacity: \"1\", fontSize: \"2rem\"}, 1000);\n audioElement.setAttribute(\"src\", \"Assets/Sound/splits.mp3\")\n audioElement.play();\n startGame();\n }\n else if (totalScore > mNumber) {\n losses++;\n res.text('You Lose!').css('color', 'red').animate({ opacity: \"0.01\" }, 1000).animate({ opacity: \"1\", fontSize: \"2rem\"}, 1000);\n audioElement.setAttribute(\"src\", \"Assets/Sound/suspension.mp3\")\n audioElement.play();\n startGame();\n }\n }", "title": "" }, { "docid": "3a4dc853b4060516262bbb07335685dc", "score": "0.65843576", "text": "function gameLoop()\n{\n\t\n}", "title": "" }, { "docid": "85d45b030cd125906b32fe583bba59a1", "score": "0.6583987", "text": "gameLoop() {\n \n // Check how long it's been since last frame\n let currentFrame = Date.now()\n let timeDiff = currentFrame - this.lastFrame\n\n // Increase the score!\n this.score += timeDiff\n\n //adjust difficulty based on score\n if(this.score>=10000000 && LEVEL==1){\n MAX_ENEMIES++\n LEVEL++;\n }else if(this.score>=20000000 && LEVEL==2){\n MAX_ENEMIES++;\n LEVEL++;\n }else if(this.score>=30000000 && LEVEL==3){\n MAX_ENEMIES;\n LEVEL==\"FINAL LEVEL\";\n }\n\n //adjust stats based on combo\n if(this.combo>=100 && this.player.level==1){\n this.player.maxHealth++;\n this.player.maxMana+=2;\n this.player.level++;\n\n let heart=document.createElement(\"img\");\n heart.classList=\"hearts\";\n heart.src=\"images/heart.gif\";\n heart.style.width=\"80px\"\n this.player.heartDOMElementsArray.push(heart);\n this.player.heartRoot.appendChild(heart);\n\n for(let i=1;i<=3;i++){\n let manaUnit=document.createElement(\"img\");\n manaUnit.classList=\"manaUnit\";\n manaUnit.src=\"images/greenManaUnit.gif\"\n manaUnit.style.width=\"60px\"\n this.player.manaDOMElementsArray.push(manaUnit);\n this.player.manaRoot.appendChild(manaUnit);\n }\n }else if(this.combo>=250 && this.player.level==2){\n this.player.maxHealth++;\n this.player.maxMana+=3;\n this.player.level++;\n\n let heart=document.createElement(\"img\");\n heart.classList=\"hearts\";\n heart.src=\"images/heart.gif\";\n heart.style.width=\"80px\"\n this.player.heartDOMElementsArray.push(heart);\n this.player.heartRoot.appendChild(heart);\n\n for(let i=1;i<=3;i++){\n let manaUnit=document.createElement(\"img\");\n manaUnit.classList=\"manaUnit\";\n manaUnit.src=\"images/greenManaUnit.gif\"\n manaUnit.style.width=\"60px\"\n this.player.manaDOMElementsArray.push(manaUnit);\n this.player.manaRoot.appendChild(manaUnit);\n }\n \n }\n\n // Call update on all enemies\n this.enemies.forEach(function(enemy) {\n enemy.update(timeDiff)\n })\n\n //lasers movement\n this.lasers.forEach(function(laser){\n laser.update(timeDiff);\n })\n\n //laser destroy if it reaches end.\n\n for(let i=0;i<this.lasers.length;i++){\n let positionYarray=this.lasers[i].domElement.style.top.split(\"\");\n positionYarray.pop();\n positionYarray.pop();\n let positionYnum=Number(positionYarray.join(\"\"));\n if(positionYnum<=0){\n try{\n this.lasers[i].destroy();\n this.lasers.splice(i,1);\n i--;\n }catch{};\n }\n }\n\n //laser destroy if it hits enemy.\n \n\n // Draw everything!\n //this.ctx.drawImage(images[\"stars.png\"], 0, 0); // draw the star bg\n let renderEnemy = function(enemy) {\n enemy.render(this.ctx)\n }\n \n renderEnemy = renderEnemy.bind(this)\n this.enemies.forEach(renderEnemy) // draw the enemies\n this.player.render(this.ctx) // draw the player\n\n // Check if any enemies should die\n this.enemies.forEach((enemy, enemyIdx) => {\n if (enemy.y > GAME_HEIGHT) {\n try{\n this.enemies[enemyIdx].destroy()\n // delete this.enemies[enemyIdx]\n }catch{}\n // this.enemies[enemyIdx].destroy()\n delete this.enemies[enemyIdx]\n }\n })\n this.setupEnemies()\n\n // Check if player is dead\n if (this.isPlayerDead()) {\n // If they are dead, then it's game over!\n this.info.update(this.score + \" GAME OVER. Thanks for playing!\\nRefresh the page to start again.\")\n this.music.stopMusic();\n inGame=false;\n this.SoundEffects.gameOver.play();\n // this.resetButton=new Button(this.root,\"Reset\",\"300px\",\"400px\")\n // this.resetButton.addEventListener(\"click\")\n // this.root.appendChild(this.resetButton)\n \n } else {\n // If player is not dead, then draw the score\n if(this.player.poweredUp==false){this.info.update(this.score+\" Level: \"+LEVEL+\"\\nCombo: \"+Math.floor(this.combo))\n }else{this.info.update(this.score+\" Level: \"+LEVEL+\" You are powered up! \\nUse the powers of gems and dance to destroy your enemies.\\nCombo: \"+Math.floor(this.combo))}\n\n // Set the time marker and redraw\n this.lastFrame = Date.now()\n setTimeout(this.gameLoop, 20)\n }\n }", "title": "" }, { "docid": "6afa9898e5b05dc0fa5692fe5a45b73e", "score": "0.6579068", "text": "function drawGame(){\n\tctx.clearRect(0,0, canvas.width, canvas.height);\n\tdrawBackground(primaryColor, secondaryColor);\n\tdrawActor(primaryColor, secondaryColor);\n\tdrawArrow();\n\tdrawArrow();\n\tdisplayStats();\n\t\n\t// collision detection game over top actor\n\tif(actorTopX < arrowHeadX && actorTopX+actorWidth > arrowHeadX && actorY < arrowHeadY && actorY+actorHeight > arrowHeadY){\n\t\tgameOver = true;\n\t}\n\t\n\t// collision detection game over bottom actor\n\tif(actorBottomX < arrowHeadX && actorBottomX+actorWidth > arrowHeadX && actorY+actorHeight < arrowHeadY && actorY+(actorHeight*2) > arrowHeadY){\n\t\tgameOver = true;\n\t}\n\t\n\t// boolean gameOver determine if document needs to reload\n\tif(gameOver){\n\t\talert(\"GAME OVER: \"+\n\t\t\t\"\\nYou survived \"+showTime+\" seconds\"+\n\t\t\t\"\\nYour score is \"+scoreCounter);\n\t\tgameOver = false;\n\t\tdocument.location.reload();\n\t}\n}", "title": "" }, { "docid": "a74578f427d4eb0a63940e7b46e6f84e", "score": "0.65708774", "text": "function checkGameState() {\n if (secondStage && playerX == 0 && playerY == 0) {\n gameOver = true\n led.setDisplayMode(DisplayMode.BackAndWhite)\n basic.showIcon(IconNames.Yes)\n } else {\n if (playerX == size - 1 && playerY == 0) {\n cornersReached[0] = true\n }\n\n if (playerX == 0 && playerY == size - 1) {\n cornersReached[1] = true\n }\n\n if (playerX == size - 1 && playerY == size - 1) {\n cornersReached[2] = true\n }\n\n if (cornersReached[0] && cornersReached[1] && cornersReached[2]) {\n secondStage = true\n\n led.unplot(masterX + size * 2 - 1, masterY + 1)\n led.unplot(masterX + 1, masterY + size * 2 - 1)\n led.unplot(masterX + size * 2 - 1, masterY + size * 2 - 1)\n }\n }\n}", "title": "" }, { "docid": "664943c92a735d7600fa1c66692fd08b", "score": "0.6570293", "text": "function drawGame() {\n\t\t//console.log(\"in draw game\");\n\t\tclearCanvas();\n\t\tdrawMap();\n\t\tdrawItems();\n\t\tdrawPlayer();\n\t}", "title": "" }, { "docid": "440069bb6c147f83951a484fcbb0eb0a", "score": "0.6567244", "text": "function main() {\n /* Get our time delta information which is required if your game\n * requires smooth animation. Because everyone's computer processes\n * instructions at different speeds we need a constant value that\n * would be the same for everyone (regardless of how fast their\n * computer is) - hurray time!\n */\n var now = Date.now(),\n dt = (now - lastTime) / 1000.0;\n\n\t\tcanvas.removeEventListener('click', doMouseDown,false);\n\t\tdocument.removeEventListener('keydown', doKeydown,false);\n\n\t\t/* Call our update/render functions, pass along the time delta to\n * our update function since it may be used for smooth animation.\n */\n update(dt);\n\n render();\n\n /* Set our lastTime variable which is used to determine the time delta\n * for the next time this function is called.\n */\n lastTime = now;\n\n /* Use the browser's requestAnimationFrame function to call this\n * function again as soon as the browser is able to draw another frame.\n */\n\t\t if(player.isActive)\n\t\t {\n\t\t\trequestId = win.requestAnimationFrame(main); \n\t\t }\n\t\t else\n\t\t {\n\t\t\treset();\n\t\t }\n\t\t\n }", "title": "" }, { "docid": "67f50637dabff9632b942b4580bb8c2a", "score": "0.65669125", "text": "gameUpdate() {\n // Recalls a whole new game but keeping lives/score counts\n if (this.isGameOver && this.lives > 1) { \n this.lives--;\n this.drawAfterDeath();\n setTimeout(() => {\n const div = document.getElementById('div');\n div.removeChild(div.childNodes[0]);\n document.createElement('canvas'); \n this.canvas.width = 1000;\n this.canvas.height = 750; \n this.context = this.canvas.getContext('2d');\n this.field = new Field(this.canvas, this.context);\n this.panel = new Panel(this.canvas, this.context); \n this.marker = new FuelMarker(this.canvas, this.context, 340, 640, 312, 60, markerImg);\n const game = new Game(markerImg, this.score, this.lives);\n game.keyboardControlConfig();\n game.loadElementImgs();\n game.markerBarInst();\n game.playerInst(); \n game.startGame();\n }, 2000);\n }\n // Finishes game\n else if (this.isGameOver) {\n this.lives--;\n this.drawAfterDeath(); \n this.context.font = '100px PressStart2P';\n this.context.fillStyle = 'white'; \n setTimeout(() => {\n this.context.fillText('GAME OVER', 50, 380);\n }, 1000);\n setTimeout(() => {\n location.reload();\n }, 3500);\n }\n // Keep moving\n else {\n window.requestAnimationFrame(() => this.startGame());\n }\n }", "title": "" }, { "docid": "14af540bd41de4ef4ce7efc214ffc903", "score": "0.65647644", "text": "async function game() {\n await choosecharacter()\n if (player[\"state\"] === 0) {\n await intro()\n \n }\n if (player[\"state\"] === 1) {\n await fight1() \n }\n if (player[\"state\"] === 2) {\n await scene2()\n }\n if (player[\"state\"] === 3) {\n await scene3()\n }\n if (player[\"state\"] === 4) {\n await scene4()\n await entershop()\n }\n if (player[\"state\"] === 5) {\n await scene5()\n }\n if (player[\"state\"] === 6) {\n await scene6()\n }\n if (player[\"state\"] === 7) {\n await scene7()\n await quiz()\n }\n \n}", "title": "" }, { "docid": "23dc24a8f383ca4325256f4567475c2c", "score": "0.65647584", "text": "function draw() {\n // draws background rooms and handles movement from one to another\n adventureManager.draw();\n clickablesManager.draw();\n\n for( let i = 0; i < clickables.length; i++ ) {\n clickables[i].visible = false;\n }\n\n if( gDebugMode == true ) {\n drawDebugInfo();\n }\n\n // team list\n image(images[ImageIndex],0, 0, 500, 50);\n\n if( adventureManager.getStateName() !== \"Splash\" && \n adventureManager.getStateName() !== \"Instructions\" ) {\n // responds to keydowns\n \tmoveSprite();\n\n // this is a function of p5.js, not of this sketch\n \tdrawSprite(playerSprite);\n\n if (file[0]) image(logo[0], 40, 70);\n if (file[1]) image(logo[1], 40, 170);\n if (file[2]) image(logo[2], 40, 270);\n if (file[3]) image(logo[3], 40, 370);\n\n \n }\n if (playerSprite.position.x <= 0 || playerSprite.position.x >= width || \n playerSprite.position.y <= 0 || playerSprite.position.y >= height) {\n groupIndex = 0;\n ina = 0;\n groupIndexMen = 0;\n groupIndexWomen = 0;\n inaMen = 0;\n inaWomen = 0;\n }\n}", "title": "" }, { "docid": "9ceed30ba3d68c393d38cf738daa25f9", "score": "0.6562268", "text": "function gameLoop() {\n // update\n engineUpdate();\n update();\n // draw\n engineDraw();\n draw();\n}", "title": "" }, { "docid": "3c0f0ec97e4708c114ea4a6090eeb1b5", "score": "0.65588886", "text": "function beginGame() {\n setFlag(\"ENGINE_RUNNING\", true);\n setFlag(\"COLLECT_POINTS\", true);\n draw();\n}", "title": "" }, { "docid": "1ce8827c144696fe3019b170368abd37", "score": "0.65582883", "text": "function go() {\n\t// The very first thing to do is to set which groups will be involved in the game. Groups can be used for grouped collision detection and for rendering order\n\tgbox.setGroups([\"background\",\"shell\",\"fodder\",\"turret\",\"sparks\",\"player\",\"hud\",\"gamecycle\"]); // Usually the background is the last thing rendered. The last thing is \"gamecycle\", that means games messages, like \"gameover\", menus etc.\n\tgbox.setAudioChannels({bgmusic:{volume:0.8},sfx:{volume:1.0}}); // If we're going to add audio to our game, we have to create virtual channels. Channels acts like groups but for audio: audio on the same channels can be stopped together and shares the same highest volume.\n\n\t\n\tmaingame=gamecycle.createMaingame(\"gamecycle\",\"gamecycle\"); // We create a new maingame into the \"gamecycle\" group. Will be called \"gamecycle\". From now, we've to \"override\" some of the maingame default actions.\n\t\n\tmaingame.bullettimer=0; // Maingame is a javascript object, so it can host any kind of variable, like our \"bullet timer\". Keeps the game still for a while, that happens when eating a ghost or when being eated ;)\n\t\n\tif (gbox.dataLoad(\"capman-hiscore\")===null) // We will keep the highscores too. So, if there is any highscore saved...\n\t\tgbox.dataSave(\"capman-hiscore\",100); // ... we will put a \"100 points\" hiscore.\n\t\n // This method is called every new level. That is called also for the first level, so...\n maingame.changeLevel=function(level) {\n\t\t// The first time the \"changeLevel\" is called, level is NULL. Our first stage is \"1\", so...\n\t\tif (level==null) level=1;\n\t\t// We need to store this number somewhere, since is needed to define which is the next level.\n\t\tmaingame.level=level; // \"maingame\" is handy enough to store some game data.\n\t\tmaingame.hud.setValue(\"stage\",\"value\",\"WAVE \"+level); // Put on the screen the stage name (I'll explain what the \"hud\" is in the \"initializeGame\" function)\n\n\t\t\n\t\t// Let's prepare the maze map now. Every stage is the same level but you can generate a new level each \"changeLevel\" call, using the \"level\" argument value.\n\t\t// This is just an array with the tile id or NULL for an empty transparent space.\n\t\tmaze=Database.PickLevel(4); \n\t\tmaze.tileIsSolid = function(obj,t){ // This function have to return true if the object \"obj\" is checking if the tile \"t\" is a wall, so...\n\t\t\t\treturn (t!==null)&& // Is a wall if is not an empty space and...\n\t\t\t\t\t\t((t==0)&&(obj.status!=\"goin\")); // The ghost's door (only if is not a ghost that is trying to go out or in)\n\t\t};\n\t\tgbox.createCanvas(\"mazecanvas\",{w:maze.w,h:maze.h}); // Since finalizeMap have calculated the real height and width, we can create a canvas that fits perfectly our maze... Let's call it \"mazecanvas\".\n\t\t// gbox.createCanvas(\"hudcanvas\",{w:screenwidth-maze.w,h:screenheight});\n\t\tgbox.blitTilemap(gbox.getCanvasContext(\"mazecanvas\"),maze); // Let's paste the maze map in the \"maze\" object into the just created \"mazecanvas\". So is now ready to be rendered.\n\t\t\t\t\t\t\n\t\tthis.newLife(); // We will call the local \"newLife\" method, since this came displaces enemies and player every new level. Do you remember this in capman? ;)\n\t\t\n\t\t\n\t\tManager.initialize();\n }\n \n // This event is triggered every time the player \"reborn\". As you've seen, is manually called in the last line of \"changelevel\"\n maingame.newLife=function(up) {\n\t// Let's clean up the level from the ghosts, sparks (visual effects like explosions - in capman are sparks the earned points messages) and left bonuses, if any.\n\tgbox.trashGroup(\"sparks\");\n\tgbox.trashGroup(\"bonus\");\n\tgbox.trashGroup(\"ghosts\");\n\tgbox.purgeGarbage(); // the gbox module have a garbage collector that runs sometime. Let's call this manually, for optimization (and better reinitialization)\n\tmaingame.bullettimer=0; // Reset the bullettimer, so the game can continue normally.\n\t// toys.topview.spawn(gbox.getObject(\"player\",\"capman\"),{x:maze.hw-6,y:maze.hh+50,accx:0,accy:0,xpushing:false,ypushing:false}); // Our \"capman\" object into the \"player\" group spawns in the middle of the maze every time it spawns.\n\t// Automatic.AddGhost({id:1,x:maze.hw-12,y:maze.hh-20}); // Ghost are added here\n\t// Automatic.AddGhost({id:2,x:maze.hw-24,y:maze.hh-17});\n\t// Automatic.AddGhost({id:3,x:maze.hw+4,y:maze.hh-20});\n\t// Automatic.AddGhost({id:4,x:maze.hw+14,y:maze.hh-17});\n\tif (this.bonustimer) this.bonustimer=300; // The timer is reset after spawning a new life, if the bouns is not appeared. As I said before, We well talk about this counter at the end.\n\tgbox.playAudio(\"ingame\"); // Start playing the ingame music. Notes that the \"maingame\" object will fade in/out and stop the \"bgmusic\" channel when the screen will fade automatically. We just need to play the music when the screen is fading to fade the music too!\n }\n\n\t\n// This method is called before starting the game, after the startup menu. Everything vital is done here, once per play.\nmaingame.initializeGame=function() {\n\n\t// Maingame gives an \"hud\" object that is rendered over everything. Really useful for indicators, like score, lives etc. The first thing we do is to populate this object.\n\t// maingame.hud.setWidget(\"label\",{widget:\"label\",font:\"small\",value:\"1UP\",dx:480,dy:20,clear:true}); // This is a classic \"1UP\" static label. Unuseful but really retro!\n\t// maingame.hud.setWidget(\"score\",{widget:\"label\",font:\"small\",value:0,dx:480,dy:50,clear:true}); // A score counter. This not only is a displayed value but will really keep the player's score.\n\t// maingame.hud.setWidget(\"label\",{widget:\"label\",font:\"small\",value:\"HI\",dx:480,dy:80,clear:true}); // The \"HI\" label. Becouse \"HI\" is more retro.\n\t// maingame.hud.setWidget(\"hiscore\",{widget:\"label\",font:\"small\",value:0,dx:480,dy:110,clear:true}); // The hiscore counter. This one will be just used for displaying.\n\n\t// maingame.hud.setWidget(\"lives\",{widget:\"symbols\",minvalue:0,value:3-maingame.difficulty,maxshown:3,tileset:\"capman\",tiles:[5],dx:480,dy:140,gapx:16,gapy:0}); // The classic life indicator, with repated capman symbols. Note the \"difficulty usage\" ;)\n\t// maingame.hud.setWidget(\"bonus\",{widget:\"stack\",rightalign:true,tileset:\"bonus\",dx:gbox.getScreenW()-5,dy:gbox.getScreenH()-34,gapx:12,gapy:0,maxshown:8,value:[]}); // The bonus queue: is the \"history\" of the picked up bonuses, on the lower right corner, aligned to the right. Starts with an empty array. gapx and gapy is the distance between symbols\n\tmaingame.hud.setWidget(\"stage\",{widget:\"label\",font:\"small\",value:\"\",dx:0,dw:gbox.getScreenW()-5,dy:32,halign:gbox.ALIGN_RIGHT,clear:true}); // The label with the stage name (low creativity: STAGE 1, STAGE 2 etc). Is empty for now, will be filled when a new level starts.\n\t\n\t// maingame.hud.setValue(\"hiscore\",\"value\",gbox.dataLoad(\"capman-hiscore\")); // setValue is used to set parametes on hud. So, well, we're setting the \"hiscore value\" to the loaded data \"capman-hiscore\" that contains the latest hiscore.\n\n\t// An object will draw the maze on the screen\n\tgbox.addObject({\n\t\tid:\"bg\", // This is the object ID\n\t\tgroup:\"background\", // Is in the \"backround\" group, that is the lower group in the \"setGroups\" list. Will be drawn for first.\n\t\tinitialize:function() { // This action is executed the first time the object is called, so...\n\t\t\tgbox.setCameraY(2,{w:maze.w,h:maze.h}); // We place the camera a bit down, since the full maze doesn't fit the screen.\n\t\t},\n\t\tblit:function() { // Then, the most important action: the \"blit\", where object are drawn on the screen.\n\t\t\tgbox.blitFade(gbox.getBufferContext(),{alpha:1}); // First let's clear the whole screen. Blitfade draws a filled rectangle over the given context (in this case, the screen)\n\t\t\tgbox.blit(gbox.getBufferContext(),gbox.getCanvas(\"mazecanvas\"),{dx:0,dy:0,dw:gbox.getCanvas(\"mazecanvas\").width,dh:gbox.getCanvas(\"mazecanvas\").height,sourcecamera:true}); // Simply draw the maze on the screen.\n\t\t}\n\t});\n\t\n\t\n\tgbox.addObject(Manager);\n\t\n\t \n\t \n\t// Automatic.AddCapman();\n \n \n \n // Some final touch to the maingame object...\n maingame.gameIsOver=function() { // This method is called by maingame itself to check if the game is over or not. So...\n\tvar isGameover=maingame.hud.getValue(\"lives\",\"value\")==0; // the game is REALLY over when lives counter reaches the zero.\n\tif (isGameover) // Just in time, we can do something useful, since we're here. Like... checking if we have a new *CAPMAN CHAMPION*...\n\t\tif (maingame.hud.getNumberValue(\"score\",\"value\")>maingame.hud.getNumberValue(\"hiscore\",\"value\")) // If the player's score is higher the shown hiscore...\n\t\t\tgbox.dataSave(\"capman-hiscore\",maingame.hud.getNumberValue(\"score\",\"value\")); // ... save the player's score as new hiscore. The next time we play \"capman\", the new hiscore to beat will be this one.\n\treturn isGameover; // Finally, returning if the game is ended or not.\n }\n // You can do this hiscore business in the ending animation, but for a tutorial, the \"gameIsOver\" is good enough. Is also unfair that there isn't an hiscore for each difficulty level. The world is bad... luckly you can this sources whenever you want, as exercise.\n \n // And now let's do something not related with ghosts, capmans, pills and mazes. Usually random things and hidden countings happens during the gameplay, so...\n maingame.gameEvents=function() { // This method happens every frame of the gameplay. You can keep here game timers or make happen random things, like...\n\tManager.Update();\n }\n \n // Another generator, but this one is simplier: this spawns a bonus in the middle of the maze.\n maingame.addBonus=function(data) { // Let's start with something that spawn a ghost. Objects as arguments are not only flexible, but you can give a name to the parameters or skipping them when calling.\n\t// All the bonuses have the same code, with a \"bonusid\" variable that changes its look and score. Notice that the bonus object don't use any toys, except for spawning sparks.\n\t// This is an example of an object implemented using nothing but the gbox object for his life cycle.\n\tgbox.addObject({\n\t\tid:null, // Bouns doesn't need to be referred, so we can give to him a \"null\" id. A random ID is given when created\n\t\tgroup:\"bonus\", // Bonuses are in their group...\n\t\ttileset:\"bonus\", // Using their tilesets...\n\t\ttime:250, // ...and remains on the screen for a little while.\n\t\tbonusid:data.bonusid, // We're keeping here which type of bonus we are.\n\t\tframe:(data.bonusid>7?7:data.bonusid), // The bonus type. The first 8 are different. Then the last one is repeated, but with growing score.\n\t\tx:maze.hw-6,y:maze.hh+54,\n\t\tfirst:function() {\n\t\t\t// Bonuses are quite simple...\n\t\t\tvar capman=gbox.getObject(\"player\",\"capman\"); // ... checking where capman is.\n\t\t\tif (gbox.collides(this,capman)) { // If is colliding with the bonus...\n\t\t\t\tgbox.hitAudio(\"bonus\"); // Play the bonus sound...\n\t\t\t\tvar bonusscore=((this.bonusid+1)*100); // Calculate the bonus multiplier...\n\t\t\t\tmaingame.hud.addValue(\"score\",\"value\",bonusscore); // Gives to the player the related bonus...\n\t\t\t\tmaingame.hud.pushValue(\"bonus\",\"value\",this.frame); // Add the bonus image to the bonus queue (the pile on the bottom of the screen)\n\t\t\t\ttoys.generate.sparks.popupText(this,\"sparks\",null,{font:\"small\",jump:5,text:bonusscore,keep:20}); // Our nice \"text spark\" with the earned score...\n\t\t\t\tgbox.trashObject(this); // ...and self-destroy.\n\t\t\t} else if (this.time==0) // If the time is up...\n\t\t\t\tgbox.trashObject(this); // ...too late, capman. Self-destroy without giving points\n\t\t\telse this.time--; // else, countdown.\n\t\t},\n\t\n\t\tblit:function() {\n\t\t\tgbox.blitTile(gbox.getBufferContext(),{tileset:this.tileset,tile:this.frame,dx:this.x,dy:this.y,fliph:this.fliph,flipv:this.flipv,camera:this.camera,alpha:1});\n\t\t}\n\n\t });\n\t\t\n}\n\n// Last but not least, the intro screen.\n// As you've seen, there are a bunch of method that are called by the \"maingame\" during the game life. We've used the default behaviour for most of them (the \"let's begin\" message, the \"gameover\" screen etc.)\n// but all of them are customizable. In this case, we're going to create a custom intro screen.\nmaingame.gameTitleIntroAnimation=function(reset) { \n\tif (reset) { // \"reset\" is true before the first frame of the intro screen. We can prepare the intro animation...\n\t\ttoys.resetToy(this,\"rising\"); // Like resetting a local toy. Some of the toys are \"helpers\": they use a local datastore of an object and does stuff, when called. For example: we're reserving a data store called \"rising\" to the \"maingame\" object.\n\t} else { // Then, when is the time to render our animation...\n\t\tgbox.blitFade(gbox.getBufferContext(),{alpha:1}); // First clear up the screen...\n\t\ttoys.logos.linear(this,\"rising\",{image:\"logo\",x:gbox.getScreenHW()-gbox.getImage(\"logo\").hwidth,y:20,sx:gbox.getScreenHW()-gbox.getImage(\"logo\").hwidth,sy:gbox.getScreenH(),speed:1,audioreach:\"eatghost\"}); // Then we're telling to the \"linear\" toy (which renders something that moves from a point to another and eventually plays an audio on end) to use the \"rising\" data store, for keeping his values.\n\t}\n};\n\n}\n\n\n// That's all. Please, gamebox... run the game!\n gbox.go();\n \n}", "title": "" } ]
21eb9384257566985d843b556706d11d
CHECK IF USER INPUT IS VALID POSTCODE
[ { "docid": "478b75fd3378a659a690c71e6b8437fd", "score": "0.7586254", "text": "function isValidPostcode(p) {\n //validate postcode is in the correct format\n var postcodeRegEx = /[A-Z]{1,2}[0-9]{1,2} ?[0-9][A-Z]{2}/i;\n return postcodeRegEx.test(p);\n}", "title": "" } ]
[ { "docid": "23767dd298b3d09a23429a3ebfb9c470", "score": "0.7504646", "text": "function postcodeValidation(postcode){\n if(!checkRegex(postcode, postRegex)){\n throw new Error('Postcode should be in correct format');\n }\n return true;\n}", "title": "" }, { "docid": "d1f52ff2bc439f1b38166c1a21ccbcad", "score": "0.725839", "text": "function isValidPostcode(postcode) {\n const regex = /^[a-z]{1,2}\\d[a-z\\d]?\\s*\\d[a-z]{2}$/i;\n return regex.test(postcode.replace(/\\s/g, ''));\n }", "title": "" }, { "docid": "076614471449357fd181bb682a38921f", "score": "0.7140708", "text": "function Postalcode_validation() \r\n { \r\n if(UPostalcode.value.match(Postalcode_V)) \r\n { \r\n Province_validation();\r\n return true; \r\n } \r\n else \r\n { \r\n alert('A Canadian postal code is a six-character string that forms part of a postal address in Canada. They are in the format A1A1A1'); \r\n UPostalcode.focus(); \r\n return false; \r\n } \r\n }", "title": "" }, { "docid": "3ea808d4da4cf69097670b6bf3da78ab", "score": "0.6956221", "text": "function isValidPostcode(postcode, countryID){\r\n if (countryID == 2) {\r\n return checkEirePostCode(postcode); // Ireland\r\n }\r\n else {\r\n return checkPostCode(postcode); // Uk by default\r\n }\r\n} //function", "title": "" }, { "docid": "8ae2452c9af538c944b90f55bef31e12", "score": "0.69049263", "text": "function validatePostalCode() {\n\t\t// I storing the given postal code in a variable for easy access.\n\t\tvar value = document.getElementById(\"postal_code\").value;\n\t\t//this regex accepts only data of the the following kind: XXXX-XXX where X must be a digit.\n\t\tvar zip = new RegExp(\"^[0-9]{4}-[0-9]{3}$\", \"m\");\n\t\t//Since this is an optional field, if it's not filled by the user\n\t\t// it should be marked as valid in order to allow the submit button to enable.\n\t\tif (value!=''){\n\t\t\t//if it wasn't correctly filled in, turns red indicating error.\n\t\t\tif (false == zip.test(value)) {\n\t\t\t\tfPostalCode = false;\n\t\t\t\tdocument.getElementById(\"postal_code\").style.borderColor = \"red\";\n\t\t\t//if it was correctly filled in, then shows green, indicating success.\n\t\t\t}else{ \n\t\t\t\tfPostalCode = true;\n\t\t\t\tdocument.getElementById(\"postal_code\").style.borderColor = \"green\";\n\t\t\t}\n\t\t//if it wasn't filled and since this is an optional field,\n\t\t// then allow it to continue by marking it as correct.\n\t\t}else{\n\t\t\tfPostalCode = true;\n\t\t\tdocument.getElementById(\"postal_code\").style.borderColor = \"#cccccc\";\n\t\t}\n\tbtnSubmit();\n\t}", "title": "" }, { "docid": "bc3763e3cda1b2646c5ce010ceffecec", "score": "0.6801701", "text": "function pincode(id){ \n var s5=document.getElementById(id).value;\n var re=/[0-9]/\n if(s5.length==6 && re.test(s5)){\n errmsg=\"\";\n pcode=1;\n }else{\n errmsg=\"Invalid Pincode\";\n pcode=0;\n }\n document.getElementById(\"err3\").innerHTML=errmsg;\n\n}", "title": "" }, { "docid": "e68d9bec43252148d4184ad89a4d6e60", "score": "0.6600479", "text": "function codePostal(){\n let leCodepostal = formulaireElementValues.codepostal;\n if(regexCodePostal(leCodepostal)){\n spanContentVide(\"hcodep\");\n alert(\"TRUE cpt\");\n return true;\n }\n else{\n spanContentRempli(\"hcodep\");\n alert(\"FALSE cpt\");\n return false;\n }\n }", "title": "" }, { "docid": "e97c7b7ed3504a672929ee2107fad7bc", "score": "0.6574259", "text": "function validatePIN (pin) {\n // if (pin.length == 4 || pin.length == 6) {\n // for (let x = 0; x < pin.length; x++) {\n // if (pin.charCodeAt(x) < 48 || pin.charCodeAt(x) > 57) {\n // return false;\n // }\n // }\n // return true;\n // }\n // return false;\n\n \n}", "title": "" }, { "docid": "2632482213a805d7d9378169c162a613", "score": "0.65476596", "text": "function validPostalCode(company){\n\n\tvar postalCode = company.postalCode;\n\tvar message = \"\";\n\tvar valid = true;\n\tif(postalCode === \"\"){\n\t\tcompany.message += \"<li>Postal Code must not be empty </li>\";\n\t\tvalid = false;\n\t}else if(postalCode.length < 6){\n\t\tcompany.message += \"<li>Postal Code must be 6 characters long </li>\";\n\t\tvalid = false;\n\t}else{\n\t\tif(postalCode.length === 7 && postalCode.indexOf(\" \") !== -1){\n\t\t\tpostalCode = (postalCode.substring(0,3) + postalCode.substring(4,7)).toUpperCase();\n\t\t}\n\t\tif(postalCode.length === 6){\n\t\t\tfor (var i = 0; i < postalCode.length; i++){\n\t\t\t\tif(i % 2 === 1){\n\t\t\t\t\t//Odds equals number\n\t\t\t\t\tif(isNaN(postalCode.charAt(i))){\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//Even means letters\n\t\t\t\t\tif( (postalCode.charAt(i) < 65) && (postalCode.charAt(i) > 90)){\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}else{\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!valid){\n\t\t\tcompany.message += \"<li>Postal Code is incorrect! Try L#L#L# </li>\";\n\t\t}\n\t}\n\treturn valid;\n\n}", "title": "" }, { "docid": "dc6bd74e6f4d65b8d9bf4292edcf6808", "score": "0.6542428", "text": "function checkPc() {\n var postalCode = form.postal.value;\n if (postalCode >= 1000 && postalCode <= 2990) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "be5fc7752a19d8ac636c086359939c6a", "score": "0.65207976", "text": "function verifyCode(vercode) {\n var vercodekey = '777';\n var regexDigit = /\\D/;\n\n if (vercodekey == vercode && !regexDigit.test(vercode))\n return true;\n else\n console.log(\"failed code number\");\n return false;\n}", "title": "" }, { "docid": "6b83158a49a9a0a0f479842f312a4b27", "score": "0.6470733", "text": "function CheckPostalCode() {\r\n \r\n var pCode;\r\n\r\n pCode = document.getElementById(\"pcode\").value;\r\n if (pCode === \"\") {\r\n document.getElementById(\"errormessage2\").innerHTML += ERROR_PCODE;\r\n document.getElementById(\"pcode\").focus();\r\n }\r\n}", "title": "" }, { "docid": "219ef104f77780597407baab0f6f9f83", "score": "0.6434703", "text": "function validateCode(code){\n if(code == \"CREATE\")\n return true;\n if(code.length != 4)\n return false;\n for(let i = 0; i < 4; i++){\n if(code[i] < 'A' || code[i] > 'Z')\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "c904d9a5f9fae59de0b09e4ac99bf1c0", "score": "0.64311695", "text": "function validateCode(){\n\t\t//if it's NOT valid\n\t\t\n\t\tvar a = $(\"#code\").val();\n\t\tvar filter = /^[0-9]+$/;\n//if it's NOT valid\n\t\t\n\t\t\n\t\t//if it's valid email\n\tif(filter.test(a))\n\t{\n\t\t\tcode.removeClass(\"error\");\n\t\t\tcodeInfo.text(\"\");\n\t\t\tcodeInfo.removeClass(\"error\");\n\t\t\treturn true;\n\t\t}\n\t\t//if it's NOT valid\n\t\telse{\n\t\t\tcode.addClass(\"error\");\n\t\t\tcodeInfo.text(\"Enter a valid Facility Code\");\n\t\t\tcodeInfo.addClass(\"error\");\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "747e489165f7be019a56b8e291014ef1", "score": "0.64013463", "text": "function validateAccession(accession_code) {\n var accessionRegex = new RegExp(\"[opqOPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}\"); //Regex used for ensuring accession code input matches Uniprot format\n //Using the RegExp .test() function to test whether the inputted accession code matches the regex format. If it does, return true, else false\n if (accessionRegex.test($(\"#UnipotAccessCode\").val())) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0debff020ef4c62a4f013242a3b608ab", "score": "0.638482", "text": "function validatePIN (pin) {\n if (pin.length === 4 || pin.length === 6) {\n \t// match length now, check int for all cars.\n \tvar ifPinStr = /^\\D/.test(pin);\n\n \tif (ifPinStr) {\n \t\treturn false;\n \t} else {\n \t\treturn true;\n \t}\n\n } else {\n \treturn false;\n }\n}", "title": "" }, { "docid": "936c17b8e3ac17d775ca69cb6dae5a28", "score": "0.63774025", "text": "function isPWgood (pw) {\r\n\tif(!isFieldEmpty(pw)){\r\n\t\tif (pw.value.length >= 8 && pw.value.match(/[0-9]/g)){\r\n\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false\r\n}", "title": "" }, { "docid": "35a6ff4f0112a83179e56a1680dab31d", "score": "0.63739336", "text": "function validatePIN (pin) {\n var length = pin.length;\n if(/\\9/.test(pin))return false;\n if(length===4||length===6)return true;\n else return false;\n }", "title": "" }, { "docid": "c24e5196a2e201211269df5bb041fd41", "score": "0.6367662", "text": "validateSecurityCode() {\n\t\tlet passed = true;\n\t\tlet val = this.element['securityCode'].value;\n\t\tlet regexp = /^[0-9]{3,4}$/;\n\t\tif (!regexp.test(val)){\n\t\t\tpassed = false;\n\t\t\tthis.issue('The security code did not look like a security code. Must be 3-4 numbers.');\n\t\t}\n\t\treturn passed;\n\t}", "title": "" }, { "docid": "3d35310043b872f5e17646dff983faee", "score": "0.6365055", "text": "function validatePostCode(e) {\n if (e.target.value.length < 5 || e.target.value.length > 5) {\n document.getElementById(`${e.target.id}-error`).innerText = \"Enter 5 digits\"\n document.getElementById(\"add_btn\").disabled = true\n }\n else {\n document.getElementById(`${e.target.id}-error`).innerText = \"\"\n document.getElementById(\"add_btn\").disabled = false\n }\n}", "title": "" }, { "docid": "6a38eac8a6f4b854b8bbd35ed1f605fb", "score": "0.6356976", "text": "function isAValidCode(code) {\n\tif (!Number.isInteger(code) || (code<1) || (code>999)) {\n\t\treturn false;\n\t}\t\n\treturn true;\n}", "title": "" }, { "docid": "79d5f945a20a2128e70d18c1ec7a8454", "score": "0.63433754", "text": "function validatePIN (pin) {\n let isnum = /^\\d+$/.test(pin);\n if(pin.length === 4 || pin.length === 6){\n if (isnum) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "508986ba09ccfc52a564547f756a1cb3", "score": "0.6335804", "text": "function validateCode ( code ) {\n\tif ( !code ) {\n\t\treturn invalid;\n\t}\n\n\t// line feed becomes generic whitespace\n\tif ( code === 10 ) {\n\t\treturn 32;\n\t}\n\n\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\tif ( code < 128 ) {\n\t\treturn code;\n\t}\n\n\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t// to correct the mistake or we'll end up with missing € signs and so on\n\tif ( code <= 159 ) {\n\t\treturn controlCharacters[ code - 128 ];\n\t}\n\n\t// basic multilingual plane\n\tif ( code < 55296 ) {\n\t\treturn code;\n\t}\n\n\t// UTF-16 surrogate halves\n\tif ( code <= 57343 ) {\n\t\treturn invalid;\n\t}\n\n\t// rest of the basic multilingual plane\n\tif ( code <= 65535 ) {\n\t\treturn code;\n\t} else if ( !codePointSupport ) {\n\t\treturn invalid;\n\t}\n\n\t// supplementary multilingual plane 0x10000 - 0x1ffff\n\tif ( code >= 65536 && code <= 131071 ) {\n\t\treturn code;\n\t}\n\n\t// supplementary ideographic plane 0x20000 - 0x2ffff\n\tif ( code >= 131072 && code <= 196607 ) {\n\t\treturn code;\n\t}\n\n\treturn invalid;\n}", "title": "" }, { "docid": "508986ba09ccfc52a564547f756a1cb3", "score": "0.6335804", "text": "function validateCode ( code ) {\n\tif ( !code ) {\n\t\treturn invalid;\n\t}\n\n\t// line feed becomes generic whitespace\n\tif ( code === 10 ) {\n\t\treturn 32;\n\t}\n\n\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\tif ( code < 128 ) {\n\t\treturn code;\n\t}\n\n\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t// to correct the mistake or we'll end up with missing € signs and so on\n\tif ( code <= 159 ) {\n\t\treturn controlCharacters[ code - 128 ];\n\t}\n\n\t// basic multilingual plane\n\tif ( code < 55296 ) {\n\t\treturn code;\n\t}\n\n\t// UTF-16 surrogate halves\n\tif ( code <= 57343 ) {\n\t\treturn invalid;\n\t}\n\n\t// rest of the basic multilingual plane\n\tif ( code <= 65535 ) {\n\t\treturn code;\n\t} else if ( !codePointSupport ) {\n\t\treturn invalid;\n\t}\n\n\t// supplementary multilingual plane 0x10000 - 0x1ffff\n\tif ( code >= 65536 && code <= 131071 ) {\n\t\treturn code;\n\t}\n\n\t// supplementary ideographic plane 0x20000 - 0x2ffff\n\tif ( code >= 131072 && code <= 196607 ) {\n\t\treturn code;\n\t}\n\n\treturn invalid;\n}", "title": "" }, { "docid": "02437e4f7d00fa27ba02ce8c411a0500", "score": "0.63268054", "text": "function checkIAWPN(value)\n{\n\t// empty string and 'applied for' are allowed:\n\tif (value.length == 0 || value.toLowerCase() == \"applied for\")\n\t\treturn true;\n\t// has to be a 12 digit number but not the example number '123456789001'\n\tif (value.length != 12 || value == \"123456789001\" || !checkAllDigits(value))\n\t\treturn false;\n\n\treturn true;\n}", "title": "" }, { "docid": "42c9231eb28351357033f6b1de121059", "score": "0.63159645", "text": "confirmationCodeValidator(code) {\n return code.length === 6;\n }", "title": "" }, { "docid": "2414c4fd78a8beb7aa7abfc5aed3e248", "score": "0.6313146", "text": "function checkCodeFormat(code) {\n // return /^[0-9_]+$/.test(code);\n return /^[0-9](_[0-9])*$/.test(code);\n}", "title": "" }, { "docid": "9d64b7a7d3dfc00f2f98f0fda5b5389b", "score": "0.6295225", "text": "validateZipcode() {\n const location = this.state.location.value;\n\n if (location.length === 0) {\n return 'Enter a zip code';\n } else if (!postcodeValidator(location, 'US')) {\n return 'Enter a valid zip code';\n }\n }", "title": "" }, { "docid": "c23e5365a293055b2058c9081f0f9d3b", "score": "0.62713206", "text": "function validateCode(code) {\n if (!code) {\n return invalid;\n }\n\n // line feed becomes generic whitespace\n if (code === 10) {\n return 32;\n }\n\n // ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n if (code < 128) {\n return code;\n }\n\n // code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n // to correct the mistake or we'll end up with missing € signs and so on\n if (code <= 159) {\n return controlCharacters[code - 128];\n }\n\n // basic multilingual plane\n if (code < 55296) {\n return code;\n }\n\n // UTF-16 surrogate halves\n if (code <= 57343) {\n return invalid;\n }\n\n // rest of the basic multilingual plane\n if (code <= 65535) {\n return code;\n } else if (!codePointSupport) {\n return invalid;\n }\n\n // supplementary multilingual plane 0x10000 - 0x1ffff\n if (code >= 65536 && code <= 131071) {\n return code;\n }\n\n // supplementary ideographic plane 0x20000 - 0x2ffff\n if (code >= 131072 && code <= 196607) {\n return code;\n }\n\n return invalid;\n}", "title": "" }, { "docid": "c23e5365a293055b2058c9081f0f9d3b", "score": "0.62713206", "text": "function validateCode(code) {\n if (!code) {\n return invalid;\n }\n\n // line feed becomes generic whitespace\n if (code === 10) {\n return 32;\n }\n\n // ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n if (code < 128) {\n return code;\n }\n\n // code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n // to correct the mistake or we'll end up with missing € signs and so on\n if (code <= 159) {\n return controlCharacters[code - 128];\n }\n\n // basic multilingual plane\n if (code < 55296) {\n return code;\n }\n\n // UTF-16 surrogate halves\n if (code <= 57343) {\n return invalid;\n }\n\n // rest of the basic multilingual plane\n if (code <= 65535) {\n return code;\n } else if (!codePointSupport) {\n return invalid;\n }\n\n // supplementary multilingual plane 0x10000 - 0x1ffff\n if (code >= 65536 && code <= 131071) {\n return code;\n }\n\n // supplementary ideographic plane 0x20000 - 0x2ffff\n if (code >= 131072 && code <= 196607) {\n return code;\n }\n\n return invalid;\n}", "title": "" }, { "docid": "e5506813f5c5b29f3727553fbd59a6fd", "score": "0.6230933", "text": "function validatePIN (pin) {\n return typeof pin === \"string\" && !~pin.indexOf('.') && !isNaN(Number(pin)) && (pin.length === 4 || pin.length === 6);\n}", "title": "" }, { "docid": "4046d862fa0cf0fd74478d243afda97a", "score": "0.6226126", "text": "function statePostcodeCheck(state, postcode, type) {\r\n var errMsg = `${type}: `;\r\n\r\n switch (state) {\r\n case 'VIC':\r\n if (!(postcode[0] == '3' || postcode[0] == '8')) {\r\n errMsg += 'This postcode does not belong to VIC';\r\n }\r\n break;\r\n\r\n case 'NSW':\r\n if (!(postcode[0] == '1' || postcode[0] == '2')) {\r\n errMsg += 'This postcode does not belong to NSW';\r\n }\r\n break;\r\n\r\n case 'QLD':\r\n if (!(postcode[0] == '4' || postcode[0] == '9')) {\r\n errMsg += 'This postcode does not belong to QLD';\r\n }\r\n break;\r\n\r\n case 'NT':\r\n if (!(postcode[0] == '0')) {\r\n errMsg += 'This postcode does not belong to NT';\r\n }\r\n break;\r\n\r\n case 'WA':\r\n if (!(postcode[0] == '6')) {\r\n errMsg += 'This postcode does not belong to WA';\r\n }\r\n break;\r\n\r\n case 'SA':\r\n if (!(postcode[0] == '5')) {\r\n errMsg += 'This postcode does not belong to SA';\r\n }\r\n break;\r\n\r\n case 'TAS':\r\n if (!(postcode[0] == '7')) {\r\n errMsg += 'This postcode does not belong to TAS';\r\n }\r\n break;\r\n\r\n case 'ACT':\r\n if (!(postcode[0] == '0')) {\r\n errMsg += 'This postcode does not belong to ACT';\r\n }\r\n break;\r\n }\r\n\r\n return errMsg;\r\n}", "title": "" }, { "docid": "13b2c392050f91ecdb9acf98b7f8e304", "score": "0.62240326", "text": "function allnumeric(uzip)\n{\n //Checking the zipcode range of numeric characters \nvar numbers = /^[0-9]+$/;\nif(uzip.value.match(numbers))\n{\nreturn true;\n}\nelse\n{\n //Alert if condition is not met\nalert('ZIP code must have numeric characters only');\nuzip.focus();\nreturn false;\n}\n}", "title": "" }, { "docid": "8310ed4347e03336f859591fbd101ad9", "score": "0.6212398", "text": "function validatePIN(pin) {\n //return true or false\n // verify that all are numberic values (integers)\n // verify that the total digits are either 4 or 6\n if (pin.length == 4 || pin.length == 6) {\n return /^\\d+$/.test(pin);\n }\n return false;\n}", "title": "" }, { "docid": "e60eb65d2f36e06dd82813884d2b0d0d", "score": "0.6194259", "text": "function validPin(pin) {\n if (isNaN(pin)) {\n return false;\n } else { \n if (pin.length === 4 || pin.length === 6) {\n return true;\n } else {\n return false;\n }\n }\n}", "title": "" }, { "docid": "354162b7bbcd04102ff16250eee1fa5d", "score": "0.61905104", "text": "function validateAddress(postcode) {\n // Ensure postcode matches UK postcode format\n if(!postcode.toUpperCase().match(/(GIR 0AA)|((([ABCDEFGHIJKLMNOPRSTUWYZ][0-9][0-9]?)|(([ABCDEFGHIJKLMNOPRSTUWYZ][ABCDEFGHKLMNOPQRSTUVWXY][0-9][0-9]?)|(([ABCDEFGHIJKLMNOPRSTUWYZ][0-9][ABCDEFGHJKSTUW])|([ABCDEFGHIJKLMNOPRSTUWYZ][ABCDEFGHKLMNOPQRSTUVWXY][0-9][ABEHMNPRVWXY])))) [0-9][ABDEFGHJLNPQRSTUWXYZ]{2})/g\n)) return false;\n\n // Set request to send to the getAddress API\n var addressRequest = {\n uri: 'https://api.getAddress.io/v2/uk/' + postcode + '?api-key=' + process.env.API_KEY_GETADDRESS,\n json: true,\n resolveWithFullResponse: true\n };\n // Send request\n return rpromise(addressRequest)\n .then(function(response) {\n //console.log(response.statusCode);\n if(response.statusCode === 200) return true;\n })\n .catch(function(error) {\n //console.log(error);\n return false;\n });\n}", "title": "" }, { "docid": "b3c9bb6bc944d865d2ee9f3a91488fc5", "score": "0.6160849", "text": "function isvalid_authcode(){\n var authcode = document.getElementsByName(\"authcode\")[0].value;\n if(authcode.length != 6){\n alert(\"Your auth code is not correct, please try again!\");\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "b0b7429b80e67168beff60a18c44fbd2", "score": "0.61601865", "text": "function zipCodeValid() {\n const zipCodeValue = zipCode.value;\n const testZipCode = /^\\d{5}$/.test(zipCodeValue);\n \n if (testZipCode === true) {\n \n displayError(zipCode, 'valid');\n return true;\n } else {\n\n displayError(zipCode,'not-valid');\n return false;\n };\n}", "title": "" }, { "docid": "c6f11129e961016be1e4f07f499178ec", "score": "0.6143697", "text": "function validatePIN (pin) {\n //return true or false\n return /^(\\d{4}|\\d{6})$/.test(pin);\n}", "title": "" }, { "docid": "39902f0071f920119bfa26a7f271cd4e", "score": "0.6136634", "text": "function validateCode( code ) {\n\t\t\tif ( !code ) {\n\t\t\t\treturn 65533;\n\t\t\t}\n\t\t\t// line feed becomes generic whitespace\n\t\t\tif ( code === 10 ) {\n\t\t\t\treturn 32;\n\t\t\t}\n\t\t\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\t\t\tif ( code < 128 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t\t\t// to correct the mistake or we'll end up with missing € signs and so on\n\t\t\tif ( code <= 159 ) {\n\t\t\t\treturn controlCharacters[ code - 128 ];\n\t\t\t}\n\t\t\t// basic multilingual plane\n\t\t\tif ( code < 55296 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\t// UTF-16 surrogate halves\n\t\t\tif ( code <= 57343 ) {\n\t\t\t\treturn 65533;\n\t\t\t}\n\t\t\t// rest of the basic multilingual plane\n\t\t\tif ( code <= 65535 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\treturn 65533;\n\t\t}", "title": "" }, { "docid": "39902f0071f920119bfa26a7f271cd4e", "score": "0.6136634", "text": "function validateCode( code ) {\n\t\t\tif ( !code ) {\n\t\t\t\treturn 65533;\n\t\t\t}\n\t\t\t// line feed becomes generic whitespace\n\t\t\tif ( code === 10 ) {\n\t\t\t\treturn 32;\n\t\t\t}\n\t\t\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\t\t\tif ( code < 128 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t\t\t// to correct the mistake or we'll end up with missing € signs and so on\n\t\t\tif ( code <= 159 ) {\n\t\t\t\treturn controlCharacters[ code - 128 ];\n\t\t\t}\n\t\t\t// basic multilingual plane\n\t\t\tif ( code < 55296 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\t// UTF-16 surrogate halves\n\t\t\tif ( code <= 57343 ) {\n\t\t\t\treturn 65533;\n\t\t\t}\n\t\t\t// rest of the basic multilingual plane\n\t\t\tif ( code <= 65535 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\treturn 65533;\n\t\t}", "title": "" }, { "docid": "39902f0071f920119bfa26a7f271cd4e", "score": "0.6136634", "text": "function validateCode( code ) {\n\t\t\tif ( !code ) {\n\t\t\t\treturn 65533;\n\t\t\t}\n\t\t\t// line feed becomes generic whitespace\n\t\t\tif ( code === 10 ) {\n\t\t\t\treturn 32;\n\t\t\t}\n\t\t\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\t\t\tif ( code < 128 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t\t\t// to correct the mistake or we'll end up with missing € signs and so on\n\t\t\tif ( code <= 159 ) {\n\t\t\t\treturn controlCharacters[ code - 128 ];\n\t\t\t}\n\t\t\t// basic multilingual plane\n\t\t\tif ( code < 55296 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\t// UTF-16 surrogate halves\n\t\t\tif ( code <= 57343 ) {\n\t\t\t\treturn 65533;\n\t\t\t}\n\t\t\t// rest of the basic multilingual plane\n\t\t\tif ( code <= 65535 ) {\n\t\t\t\treturn code;\n\t\t\t}\n\t\t\treturn 65533;\n\t\t}", "title": "" }, { "docid": "b79dffc2018b84d3f82a29cb0f5d1a3f", "score": "0.61165506", "text": "function validateZipCode() {\n const zipCode = document.getElementById('zip').value;\n const zipCodeIsValid = /^\\d{5}$/.test(zipCode);\n const zipCodeHint = document.getElementById('zip-hint');\n\n showHint(zipCodeIsValid, zipCodeHint);\n\n return zipCodeIsValid;\n}", "title": "" }, { "docid": "cd8121d06905439c6ee9c11bfae37486", "score": "0.6105678", "text": "function validatePIN (pin) { \n if(/^(\\d{4}|\\d{6})$/.test(pin)){\n return true; \n }else{\n return false; \n }\n }", "title": "" }, { "docid": "fae1b94044fba2c82990839ff1cf01fd", "score": "0.6101936", "text": "function checkZipCode (strng) {\r\n var error = \"\";\r\n var legalChars = /[0-9]{4,5}/; // allow only letters and numbers\r\n\r\n if (strng == \"\") {\r\n error = \"You didn't enter a Zip Code.\\n\";\r\n }\r\n else if ((strng.length < 4) || (strng.length > 5)) {\r\n error = \"The Zip Code is the wrong length.\\n\";\r\n }\r\n else if (!legalChars.test(strng)) {\r\n error = \"The Zip Code contains illegal characters.\\n\";\r\n } \r\nreturn error; \r\n}", "title": "" }, { "docid": "e603699592fb63bc9554150e29c176f6", "score": "0.60999775", "text": "function validateCode(code) {\n \tif (!code) {\n \t\treturn 65533;\n \t}\n\n \t// line feed becomes generic whitespace\n \tif (code === 10) {\n \t\treturn 32;\n \t}\n\n \t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n \tif (code < 128) {\n \t\treturn code;\n \t}\n\n \t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n \t// to correct the mistake or we'll end up with missing € signs and so on\n \tif (code <= 159) {\n \t\treturn controlCharacters[code - 128];\n \t}\n\n \t// basic multilingual plane\n \tif (code < 55296) {\n \t\treturn code;\n \t}\n\n \t// UTF-16 surrogate halves\n \tif (code <= 57343) {\n \t\treturn 65533;\n \t}\n\n \t// rest of the basic multilingual plane\n \tif (code <= 65535) {\n \t\treturn code;\n \t}\n\n \treturn 65533;\n }", "title": "" }, { "docid": "e603699592fb63bc9554150e29c176f6", "score": "0.60999775", "text": "function validateCode(code) {\n \tif (!code) {\n \t\treturn 65533;\n \t}\n\n \t// line feed becomes generic whitespace\n \tif (code === 10) {\n \t\treturn 32;\n \t}\n\n \t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n \tif (code < 128) {\n \t\treturn code;\n \t}\n\n \t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n \t// to correct the mistake or we'll end up with missing € signs and so on\n \tif (code <= 159) {\n \t\treturn controlCharacters[code - 128];\n \t}\n\n \t// basic multilingual plane\n \tif (code < 55296) {\n \t\treturn code;\n \t}\n\n \t// UTF-16 surrogate halves\n \tif (code <= 57343) {\n \t\treturn 65533;\n \t}\n\n \t// rest of the basic multilingual plane\n \tif (code <= 65535) {\n \t\treturn code;\n \t}\n\n \treturn 65533;\n }", "title": "" }, { "docid": "404a8d2615f28994e54944b48e0155f8", "score": "0.6097405", "text": "function validatePostalCode(value, element) {\n\t// this.optional(element) will return true if the element is empty.\n\t// It's used to skip validation of empty, non-required elements.\n\t// Yes, this is an unfortunate naming on jQuery.validation's part.\n\tif (this.optional(element)) {\n\t\treturn true;\n\t}\n\n\tif (undefined == value || null == value) {\n\t\treturn false;\n\t}\n\n\tvar lenValue = value.length;\n\n\t// Format is either \"12345\" or \"123 45\". \n\tif (lenValue != 5 && lenValue != 6) {\n\t\treturn false;\n\t}\n\n\t// If length is 5, then there can be no space.\n\tif (lenValue == 5 && value.indexOf(' ') != -1) {\n\t\treturn false;\n\t}\n\n\t// If length is 6, then 4th character must be a space.\n\tif (lenValue == 6 && value[3] != ' ') {\n\t\treturn false;\n\t}\n\n\t// Check first three digits.\n\tvar part = value.substring(0,3);\n\tvar number = +part;\n\tif (isNaN(number)) {\n\t\treturn false;\n\t}\n\n\t// Check last two digits.\n\tpart = value.substring(lenValue-2);\n\tnumber = +part;\n\tif (isNaN(number)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "2a98fbd0c3d625118381c52a813a1ff3", "score": "0.60915405", "text": "function sitesave(){\n if(text==0){\n document.getElementById(\"err1\").innerHTML=\"Invalid Name\";\n return false;\n }\n if(pcode==0){\n document.getElementById(\"err3\").innerHTML=\"Invalid Pincode\";\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "f8aca595b9c0ecdbcc4a685313e5b948", "score": "0.60906047", "text": "function validate_code(code) {\n\t// line feed becomes generic whitespace\n\tif (code === 10) {\n\t\treturn 32;\n\t}\n\n\t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n\tif (code < 128) {\n\t\treturn code;\n\t}\n\n\t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n\t// to correct the mistake or we'll end up with missing € signs and so on\n\tif (code <= 159) {\n\t\treturn windows_1252[code - 128];\n\t}\n\n\t// basic multilingual plane\n\tif (code < 55296) {\n\t\treturn code;\n\t}\n\n\t// UTF-16 surrogate halves\n\tif (code <= 57343) {\n\t\treturn NUL;\n\t}\n\n\t// rest of the basic multilingual plane\n\tif (code <= 65535) {\n\t\treturn code;\n\t}\n\n\t// supplementary multilingual plane 0x10000 - 0x1ffff\n\tif (code >= 65536 && code <= 131071) {\n\t\treturn code;\n\t}\n\n\t// supplementary ideographic plane 0x20000 - 0x2ffff\n\tif (code >= 131072 && code <= 196607) {\n\t\treturn code;\n\t}\n\n\treturn NUL;\n}", "title": "" }, { "docid": "d0f17708501f5f5f942c73043adfbafa", "score": "0.60721135", "text": "function validateCode(code) {\n \tif (!code) {\n \t\treturn 65533;\n \t}\n\n \t// line feed becomes generic whitespace\n \tif (code === 10) {\n \t\treturn 32;\n \t}\n\n \t// ASCII range. (Why someone would use HTML entities for ASCII characters I don't know, but...)\n \tif (code < 128) {\n \t\treturn code;\n \t}\n\n \t// code points 128-159 are dealt with leniently by browsers, but they're incorrect. We need\n \t// to correct the mistake or we'll end up with missing € signs and so on\n \tif (code <= 159) {\n \t\treturn controlCharacters[code - 128];\n \t}\n\n \t// basic multilingual plane\n \tif (code < 55296) {\n \t\treturn code;\n \t}\n\n \t// UTF-16 surrogate halves\n \tif (code <= 57343) {\n \t\treturn 65533;\n \t}\n\n \t// rest of the basic multilingual plane\n \tif (code <= 65535) {\n \t\treturn code;\n \t}\n\n \treturn 65533;\n }", "title": "" }, { "docid": "d722a41fe8c779f55a0f03c9f9b2178b", "score": "0.60602415", "text": "function isCodeValid(code) {\n if (!code) {\n return undefined\n }\n // joinCodes are len 5-6 alphabet chars\n const alpha_only = /\\b([a-z]{5,6})\\b/i;\n\n return alpha_only.test(code)\n}", "title": "" }, { "docid": "fd063a5d639ae36dec02a146290f42ee", "score": "0.6056055", "text": "function isAlphaNumeric(code) {\n return isNumber(code) || isAlpha(code);\n}", "title": "" }, { "docid": "4a5fcebd7154d563474edf31ca1cb28a", "score": "0.6051233", "text": "function checkZipIsValid() {\n let check=/^[0-9]+$/\n let zipCode = document.getElementById(\"zip\")\n let zipNum= zipCode.value\n if (zipCode.value.length != 5) {\n document.getElementById(\"zipError\").style.display = \"block\"\n return false\n }\n if(!zipCode.value.match(check)){\n console.log(typeof zipNum)\n document.getElementById(\"zipError\").style.display = \"block\"\n return false\n }\n return true\n}", "title": "" }, { "docid": "9b88e6e2b813f13178f9b6586889b912", "score": "0.6050934", "text": "function isValidSNESCode(code) {\r\n // make string upper case for easier comparison\r\n code = code.toUpperCase();\r\n \r\n // SNES codes are 9 characters\r\n if (code.length != 9) {\r\n return false;\r\n }\r\n \r\n // the middle character must be a dash\r\n if (code.charAt(4) != '-') {\r\n return false;\r\n }\r\n \r\n for (var i = 0; i < code.length; i++) {\r\n if (i == 4) {\r\n continue;\r\n }\r\n \r\n if (ALPHABET_SNES.indexOf(code.charAt(i)) == -1) {\r\n return false;\r\n }\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "0c0bf78ca7e4632a2b10a51ca2beed34", "score": "0.6049166", "text": "function validate_isbn(){\n\t\t\t\tvar isbn = edit_form.isbn.value;\n\t\t\t\tvar error = \"\";\n\n\t\t\t\tif(isbn==\"\"){ \n\t\t\t\t\treturn true;\n\t\t\t\t}else if(!isbn.match(/^[0-9][0-9\\-]{11}[0-9]$/)){ \n\t\t\t\t\terror = \"Numbers and hypens only. Must start and end with a number. Length must be 13 characters.\";\n\t\t\t\t\talert(error); \n\t\t\t\t\tdocument.getElementById('isbn').focus();\n\t\t\t\t}\n\t\t\t\tif(error==\"\") return true;\n\t\t}", "title": "" }, { "docid": "5c92f7b9919f2f7f1bb4a0a176c4f63d", "score": "0.6048802", "text": "function validatePin(){\n \nvar pin;\n \n pin = document.getElementById(\"userpin\").value;\n \n if (pin == \"\"){\n alert(\"Please enter your PIN.\");\n }\n else if (pin.length < 4){\n alert(\"Your PIN must be 4 digits, no other characters permitted.\");\n }\n else{\n enablebtnPurchase()\n }\n}", "title": "" }, { "docid": "a6c16e29f61035ee4bce0367021c94b4", "score": "0.60251886", "text": "function validateZipcode() {\n var zipcode = document.getElementById(\"zipcode\");\n var zipcodeError = document.getElementById(\"zipcodeRequirements\");\n\n //If the zipcode is empty, or does not match the patterns DDDDD or DDDDD-DDDD, return false.\n if (isEmpty(zipcode.value) || (!zipcodePattern.test(zipcode.value))) {\n styleError(zipcode, zipcodeError, false);\n return false;\n }\n else {\n styleError(zipcode, zipcodeError, true);\n return true;\n }\n}", "title": "" }, { "docid": "ea41e4b692c720e9ee01d45d829a3c6a", "score": "0.602173", "text": "function truckCode_verify(){\n if(truckCode.value != '' && truckCode.value.match(truckCodeRegex)){\n truckCode.style.border = '1px solid green';\n truckCodeError('');\n return true;\n }\n else{\n truckCode.style.border = '2px solid red';\n truckCodeError('Please fill in the field');\n truckCode.focus();\n return false;\n }\n}", "title": "" }, { "docid": "3ee986bcc805b5e2a1a165b11179555e", "score": "0.6018086", "text": "function validate_course_code(){\n\t\t\t\tvar course_code = edit_form.course_code.value;\n\t\t\t\tvar error = \"\";\n\n\t\t\t\tif(course_code==\"\"){ \n\t\t\t\t\terror = \"Course code is required\";\n\t\t\t\t\talert(error);\n\t\t\t\t\tdocument.getElementById('course_code').focus(); \n\t\t\t\t}else if(!course_code.match(/^[A-Z][A-Z0-9]{0,4}[0-9]$/)){ \n\t\t\t\t\terror = \"Uppercase letters and numbers only. Max length is six characters.\";\n\t\t\t\t\talert(error); \n\t\t\t\t\tdocument.getElementById('course_code').focus();\n\t\t\t\t}\n\n\t\t\t\tif(error==\"\") return true;\n\t\t}", "title": "" }, { "docid": "f3cc8911a557376cb691e96e0a72737c", "score": "0.6016297", "text": "badInput(input) {\n if (input.length > 7\n || input.length < 2) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "09fd386cf5ed48f09691fe7fd0d46d68", "score": "0.6008754", "text": "function isValidRawCode(code) {\r\n var temp = parseInt(code.value, 16);\r\n \r\n if (isNaN(temp)) {\r\n return false;\r\n }\r\n \r\n if (system == SYSTEM_GENESIS) {\r\n if ((temp < 0) || (temp > 65535)) {\r\n return false;\r\n }\r\n } else {\r\n if ((temp < 0) || (temp > 255)) {\r\n return false;\r\n }\r\n }\r\n \r\n temp = parseInt(code.address, 16);\r\n \r\n if (isNaN(temp)) {\r\n return false;\r\n }\r\n \r\n if ((system == SYSTEM_SUPERNINTENDO) || (system == SYSTEM_GENESIS)) {\r\n if ((temp < 0) || (temp > 16777215)) {\r\n return false;\r\n }\r\n } else {\r\n if ((temp < 0) || (temp > 65535)) {\r\n return false;\r\n }\r\n }\r\n \r\n if (code.hasCompare() && \r\n ((system == SYSTEM_NINTENDO) || (system == SYSTEM_GBGG))) {\r\n temp = parseInt(code.compare, 16);\r\n \r\n if (isNaN(temp)) {\r\n return false;\r\n }\r\n \r\n if ((temp < 0) || (temp > 255)) {\r\n return false;\r\n }\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "a804114764088336ea5fc592182e61f6", "score": "0.5997648", "text": "function checkValidCode(code) {\n return code >= UNICODE_CODES_MIN &&\n code <= UNICODE_CODES_MAX &&\n (code < RESTRICTED_BLOCK_MIN || code > RESTRICTED_BLOCK_MAX) &&\n !RESTRICTED_SINGLE_CODES[code];\n}", "title": "" }, { "docid": "b478b5cc478addd89faeda6e982061c4", "score": "0.5977528", "text": "function validatePIN(pin) {\n return /^(\\d{4}|\\d{6})$/.test(pin)\n}", "title": "" }, { "docid": "b478b5cc478addd89faeda6e982061c4", "score": "0.5977528", "text": "function validatePIN(pin) {\n return /^(\\d{4}|\\d{6})$/.test(pin)\n}", "title": "" }, { "docid": "f49936b2833e36eac82a65420e7c788d", "score": "0.596207", "text": "function validatePIN(pin) {\n let regex = /^\\d{4}$|^\\d{6}$/;\n if (pin.match(regex) && (pin.length == 4 || pin.length == 6)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "71d9d7664aad14cd5efa03f36345f2a8", "score": "0.59589475", "text": "function valbzip() {\n 'use strict';\n var zipb = (document.getElementById('bilZip').value);\n //window.alert(\"Your zip is \" + zipb);\n var zipbFormat = /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/;\n if (zipb.match(zipbFormat)) {\n return true;\n //window.alert(\"zip code is good.\");\n } else {\n window.alert(\"Please enter a valid zip code.\");\n document.getElementById('bilZip').focus();\n return false;\n }\n}", "title": "" }, { "docid": "71eb6ee748812930fe41c09b5eda3a55", "score": "0.59565693", "text": "function IsValidPAN(num) {\n var regex = /^[A-Z]{5}\\d{4}[A-Z]{1}/;\n if (!regex.test(num)) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "557540b7837598ee0a6d28b7c67ca10e", "score": "0.5953796", "text": "function isPrescribe(input) {\n document.getElementById('prescribedby').value = document.getElementById('prescribedby').value.trim();\n input = input.trim();\n let prescName = /^[a-zA-Z.]+( [a-zA-Z.]+)*$/;\n if (input.length >= 2 && input.length <= 50 && input.match(prescName)) {\n setSuccessMsg(prescribedby);\n val_data = 1;\n return True;\n }\n else {\n setErrorMsg(prescribedby);\n val_data = 0;\n return false;\n }\n}", "title": "" }, { "docid": "7a8f3e54d0e8094f4d6a162578544724", "score": "0.5952975", "text": "function verify_phone() {\n\t\tvar error = \"\";\n\t\tvar tel = doucment.getElementById(\"mobile\").value;\n\t\tif (tel == error) {\n\t\t\talert(\"You didn't enter a phone number.\\n\");\n\t\t\t}\n\t\t\n\t\t//strip out acceptable non-numeric characters\n\t\tvar stripped = tel.replace(/[\\(\\)\\.\\-\\ ]/g, '');\n\t\t\n\t\tif (isNaN(parseInt(stripped))) {\n\t\t\talert(\"The phone number contains illegal characters.\");\n\t\t\t}\n\t\tif (!(stripped.length == 8)) {\n\t\t\talert(\"The phone number is the wrong length. Make sure you included an area code.\\n\");\n\t\t\t}\n\t\treturn error;\n\t}", "title": "" }, { "docid": "7ad06523702ef549c5b541f705fff875", "score": "0.5950329", "text": "function isValidNESCode(code) {\r\n // make string upper case for easier comparison\r\n code = code.toUpperCase();\r\n \r\n // NES codes are either 6 or 8 characters\r\n if ((code.length != 6) && (code.length != 8)) {\r\n return false;\r\n }\r\n \r\n // NES codes can only contain 'letters' in the NES game genie alphabet\r\n for (var i = 0; i < code.length; i++) {\r\n if (ALPHABET_NES.indexOf(code.charAt(i)) == -1) {\r\n return false;\r\n }\r\n }\r\n \r\n // if we didn't bail out, we must be a valid code\r\n return true;\r\n }", "title": "" }, { "docid": "b2b12f39836cfea45b8052a4d6b84244", "score": "0.59493667", "text": "function validatePIN(pin) {\n return (/^[0-9]{4}$|^[0-9]{6}$/).test(pin);\n}", "title": "" }, { "docid": "3fc3d43a2e8b56baa6232cf57e1545f8", "score": "0.5944427", "text": "function checkZip() {\n\t\t\tvar zip = (document.getElementById('zip').value)\n var isValid = /^[0-9]{5}(?:-[0-9]{4})?$/.test(zip);\n\t\t\tif (zip != \"\"){\n\t\t\t\t if (!isValid) {\n alert('Please enter a correct zipcode');\n\t\t\t\t}\n\t\t\t}\n }", "title": "" }, { "docid": "7e8db8eb50d05dfde0916157a6245dd1", "score": "0.59392405", "text": "function validation(element) {\r\n if (!((element.charCodeAt()>=47 && element.charCodeAt()<=57)||element.charCodeAt()==37||(element.charCodeAt()>=40 && element.charCodeAt()<=43)||element.charCodeAt()==45||element.charCodeAt()==94)) {\r\n return true;\r\n }else return false;\r\n}", "title": "" }, { "docid": "b94b123e410ec2a041ce7892dd1b73d2", "score": "0.59276974", "text": "function isValidPassportId() {\n var passport_id = $(\"#passport-id\").val();\n var reg = new RegExp(\"^[A-Z0-9]+$\");\n\n var flag = false;\n if(passport_id.length === 0) {\n $(\"#validation-passport-id\").html(\"Please enter your passport ID.\");\n }\n else if(passport_id.length > 25) {\n $(\"#validation-passport-id\").html(\"Please enter no more than 25 characters.\");\n }\n else if(reg.test(passport_id) === false) {\n $(\"#validation-passport-id\").html(\"Please enter only capital letters and digits.\");\n }\n else {\n $(\"#validation-passport-id\").html(\"Passport ID is valid.\");\n flag = true;\n }\n\n return flag;\n}", "title": "" }, { "docid": "7cd947327a58e8df35f385867b161420", "score": "0.59243286", "text": "function check(e){\r\n let reg=/[0-9]/;\r\n let isbn_no = isbn.value;\r\n\r\n if(reg.test(isbn_no) == false){\r\n alert(\"enter an int\");\r\n }\r\n}", "title": "" }, { "docid": "995a7c4708b788f88c19ee1dcd65570c", "score": "0.59199363", "text": "function validateZipCode(submit) {\n const zipCode = document.getElementById('zipcode').value;\n const error = document.getElementById('zipcode_error');\n if (zipCode.length >= 5 && zipCode.length <= 10) {\n const validZipCode = (/^[0-9-]*$/);\n const zipCodeTest = validZipCode.test(zipCode);\n zipCodeError(zipCodeTest, zipCode, submit);\n } else {\n zipCode.className = 'invalid';\n error.innerHTML = 'Please enter a zip code between 5 and 10 characters.';\n if (submit === true) {\n submitError();\n }\n }\n}", "title": "" }, { "docid": "05f68abd322903c06e13a2849450a4c4", "score": "0.5910807", "text": "function validatePIN(pin) {\n return (\n pin.replace(/[^0-9]/g, \"\") === pin &&\n ([...pin].length == 4 || [...pin].length == 6)\n );\n}", "title": "" }, { "docid": "66a3318b03ca3ea7d77ba14f52804443", "score": "0.5910412", "text": "function validate(data) {\n return checkPrefixAndLength('terravaloperpub', data, 83);\n }", "title": "" }, { "docid": "57fdb428ee15ec07c9fa9c939ab0f635", "score": "0.5885355", "text": "function validatePIN(pin) {\n // if(pin.length < 4) return false; early return optional\n return /^(\\d{4}|\\d{6})$/.test(pin);\n}", "title": "" }, { "docid": "98aac931f71d57bc03678127c0ddf532", "score": "0.588387", "text": "function validateInput(inp) {\n\tif(isNaN(inp)) {\n\t\tdisplayErrorMessage(\"Arvon tulee olla numero väliltä [8,16]\");\n\t\treturn false;\n\t}\n\telse if(inp > 16 || inp < 8) {\n\t\tdisplayErrorMessage(\"Arvon tulee olla väliltä [8,16]\");\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "b7e8d81b514da24d2a5d15487129f851", "score": "0.58767813", "text": "function pwChecker (pass) { \n if (isNaN(pass.slice(0, 1)) && pass.length === 8) {\n\n alert(\"Password Accepted\");\n }\n else {\n alert(\"Try again\");\n } \n}", "title": "" }, { "docid": "34d292e67995d94db1c4ff57b669d29f", "score": "0.5870488", "text": "function validZipCode () {\n const zipCodeInput = zipCode.value\n const regZipCode = /^\\d{5}$/.test(zipCodeInput)\n const zipCodeAlert = document.querySelector('#zip-hint')\n \n if (!regZipCode) {\n zipCodeAlert.parentNode.classList.remove('valid')\n zipCodeAlert.parentNode.classList.add('not-valid')\n zipCodeAlert.classList.remove('hint')\n } else if (regZipCode) {\n zipCodeAlert.parentNode.classList.remove('not-valid')\n zipCodeAlert.parentNode.classList.add('valid')\n zipCodeAlert.classList.add('hint')\n }\n return regZipCode\n }", "title": "" }, { "docid": "b55d15676e0d0ba4d615f89096d584de", "score": "0.58631057", "text": "function cvvCheck() {\n let input = getInputByID(\"#cvv\");\n let value = input.value;\n let re = /^\\s*\\d{3}\\s*$/;\n\n if (isEmpty(input)) {\n removeMsg(input, \"Enter valid code\", \"error\");\n markEmpty(input);\n }\n else if (re.test(value)) {\n removeMsg(input, \"Enter valid code\", \"error\");\n validEntry(getFormEntry(input));\n }\n else {\n notification(input, \"Enter valid code\", \"error\");\n }\n}", "title": "" }, { "docid": "f2170322af28df8c67c39fbcdb4367db", "score": "0.585197", "text": "function validate_publisher(){\n\t\t\t\tvar publisher = edit_form.publisher.value;\n\t\t\t\tvar error = \"\";\n\n\t\t\t\tif(publisher==\"\"){ \n\t\t\t\t\treturn true;\n\t\t\t\t}else if(!publisher.match(/^.*[A-Za-z0-9]{1,}.*$/)){ \n\t\t\t\t\terror = \"Must have atleast one alphanumeric character.\";\n\t\t\t\t\talert(error); \n\t\t\t\t\tdocument.getElementById('publisher').focus();\n\t\t\t\t}\n\n\t\t\t\tif(error==\"\") return true;\n\t\t}", "title": "" }, { "docid": "436a3bf8af3f422f29f334f512ba5dcf", "score": "0.58420724", "text": "function zipCode() {\n\n zipcode = prompt(\"please type in your zip code in a valid format - 5 digits\")\n\n if (zipcode.length !== 5) {\n\n console.log(zipcode.length)\n console.log(typeof(zipcode))\n return zipCode();\n \n } else if (isNaN(zipcode)) {\n\n console.log(isNaN(zipcode))\n alert(\"Your zipcode must contain 5 numbers\")\n return zipCode();\n\n } else if (zipcode.includes(\" \")) {\n alert(\"Your zipcode cannot contain any whitespaces\")\n console.log(zipcode.length)\n console.log(typeof(zipcode))\n return zipCode();\n \n } else if (zipcode.length == 5 && isNaN(zipcode) === false) {\n alert(`Your zipcode is ${zipcode}`)\n console.log(zipcode)\n }\n\n}", "title": "" }, { "docid": "1fdfd1836faeefb614f788c251ef88df", "score": "0.583865", "text": "function GSValidateZipCode(source)\n{\n\tif (!ValidateRegular(source, \"\\\\d{5}(-\\\\d{4})?\"))\n\t{\n\t\tsource.select();\n\t\tsource.focus();\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "7db5d78297b7ab432a80d07846bf2ad9", "score": "0.5835944", "text": "function address_validate(){\n\tvar zip_code = document.getElementById(\"zip\").value;\n\tvar contact_number = document.getElementById(\"contact_number\").value;\n\tvar error_message = \"\";\n\tif ( zip_code == \"\" || zip_code == \"None\" || !zip_code.match(/^[0-9]{6}$/g)){\n\t\terror_message += \"Enter 6 digit zip code\\n\"\n\t}\n\tif ( contact_number == \"\" || contact_number == \"None\" || !contact_number.match(/^[0-9]{10}$/g)){\n\t\terror_message += \"Enter 10 digit contact number\\n\"\n\t}\n\tif (error_message!==\"\"){\n\t\talert (error_message)\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a1a0fa22fd845d4f4ddf9d7c08fc075c", "score": "0.5835203", "text": "function nationalityValidation(parameter){ \n\tvar letters = /^[A-Za-z ]+$/.test(parameter);\n\tif(letters == true){ \n\t\treturn true; \n\t}else{ \n\t\treturn false; \n\t} \n}", "title": "" }, { "docid": "596e7e33c72fb2de7a2950bc918856f9", "score": "0.5833463", "text": "function validatephn(){\n\t document.getElementById(\"phnerror\").innerHTML = \"\";\n\t if(student.phnno.value.length==0)\n\t {\n\t\tdocument.getElementById(\"phnerror\").innerHTML = \"You must enter a phone no\";\n\t\treturn false;\n\t } \n\t else if(/[^0-9]/.test(student.phnno.value)) \n { \n\t\tdocument.getElementById(\"phnerror\").innerHTML = \"You must enter only digits\";\n\t\treturn false;\n\t }\n\t else if(student.phnno.value.length!=10) \n { \n\t\tdocument.getElementById(\"phnerror\").innerHTML = \"phn no must contains 10 digit\";\n\t\treturn false;\n\t }\n\t return true;\n }", "title": "" }, { "docid": "d4d534a40c672f4e2e8ab8c8d11406d1", "score": "0.5832381", "text": "validatePanno(e){\r\n\tvar pannoPattern=/[A-Z]{5}[0-9]{4}[A-Z]{1}$/;\r\n\t\tif(!pannoPattern.test(e.target.value)){\r\n\t\t\talert('Kindly Enter Valid PAN No');\r\n\t\t\tthis.setState({[e.target.id]:''});\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0fd1fd69d23e400c46d403ce3404bc0c", "score": "0.5831844", "text": "function validateInput(input) {\n\n //make sure input is number first\n var num = parseInt(input);\n if (Number.isInteger(num) === false) {\n return false;\n }\n if (input < 8 || input > 128) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "e4855163cce5a54ef4eee11202123792", "score": "0.5826505", "text": "function validate_pov(value, requiredOrNot) {\n requiredOrNot = parseInt(requiredOrNot);\n if (requiredOrNot == 1 || (requiredOrNot == 0 && value.length >= 1)) {\n value = value + \"\";\n if (required(value) == false)\n return \"Place of visit is required\";\n else if (value.length > 50)\n return \"Minimum 50 characters allowed\";\n // if(nameRegexWithSpace(value)==false)\n else if (alphabetSpaceNumberRegex(value) == false)\n return \"Enter Alphabets Number or spaces Only\";\n }\n return \"true\";\n}", "title": "" }, { "docid": "a9fd8f1f6e163131f588c894e5526817", "score": "0.5817599", "text": "function validateZip(zipcode){\n var US_postalCodeRegex = /^([0-9]{5})(?:[-\\s]*([0-9]{4}))?$/;\n return US_postalCodeRegex.test(zipcode);\n}", "title": "" }, { "docid": "9f0e0ff9a7ee3164f36167cf57c6d9fc", "score": "0.58156633", "text": "function evaluateCode() {\n getCode = document.getElementById(\"codeentered\").value; //get character entered\n var charset1 = getCode.trim(); //remove any hidden characters entered\n var charset2 = code.trim() //remove any hidden characters generated\n //text if code entered matches the number of generated characters\n if(charset1.length == charset2.length && charset1 == charset2) {\n disableButton(false) //if match, run the function to enable button\n }\n}", "title": "" }, { "docid": "7e70ec03d9032478c420ecb7b3e265f2", "score": "0.58135736", "text": "function isValidIBAN(input) {\n var CODE_LENGTHS = {\n AD: 24,\n AE: 23,\n AT: 20,\n AZ: 28,\n BA: 20,\n BE: 16,\n BG: 22,\n BH: 22,\n BR: 29,\n CH: 21,\n CR: 21,\n CY: 28,\n CZ: 24,\n DE: 22,\n DK: 18,\n DO: 28,\n EE: 20,\n ES: 24,\n FI: 18,\n FO: 18,\n FR: 27,\n GB: 22,\n GI: 23,\n GL: 18,\n GR: 27,\n GT: 28,\n HR: 21,\n HU: 28,\n IE: 22,\n IL: 23,\n IS: 26,\n IT: 27,\n JO: 30,\n KW: 30,\n KZ: 20,\n LB: 28,\n LI: 21,\n LT: 20,\n LU: 20,\n LV: 21,\n MC: 27,\n MD: 24,\n ME: 22,\n MK: 19,\n MR: 27,\n MT: 31,\n MU: 30,\n NL: 18,\n NO: 15,\n PK: 24,\n PL: 28,\n PS: 29,\n PT: 25,\n QA: 29,\n RO: 24,\n RS: 22,\n SA: 24,\n SE: 24,\n SI: 19,\n SK: 24,\n SM: 27,\n TN: 24,\n TR: 26,\n AL: 28,\n BY: 28,\n CR: 22,\n EG: 29,\n GE: 22,\n IQ: 23,\n LC: 32,\n SC: 31,\n ST: 25,\n SV: 28,\n TL: 23,\n UA: 29,\n VA: 22,\n VG: 24,\n XK: 20\n };\n var iban = String(input)\n .toUpperCase()\n .replace(/[^A-Z0-9]/g, ''), // keep only alphanumeric characters\n code = iban.match(/^([A-Z]{2})(\\d{2})([A-Z\\d]+)$/), // match and capture (1) the country code, (2) the check digits, and (3) the rest\n digits;\n // check syntax and length\n if (!code || iban.length !== CODE_LENGTHS[code[1]]) {\n return false;\n }\n // rearrange country code and check digits, and convert chars to ints\n digits = (code[3] + code[1] + code[2]).replace(/[A-Z]/g, function (letter) {\n return letter.charCodeAt(0) - 55;\n });\n // final check\n return mod97(digits);\n}", "title": "" }, { "docid": "3e1342a9e3a157f1afcc889dd97fae0f", "score": "0.5812913", "text": "function valzip() {\n 'use strict';\n var zip = (document.getElementById('inZip').value);\n //window.alert(\"Your zip is \" + zip);\n var zipFormat = /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/;\n if (zip.match(zipFormat)) {\n return true;\n //window.alert(\"zip code is good.\");\n } else {\n window.alert(\"Please enter a valid zip code.\");\n document.getElementById('inZip').focus();\n return false;\n }\n}", "title": "" }, { "docid": "9f1aa755ec669ea19b6510d2cabe5216", "score": "0.5812854", "text": "function isPostalCode$1(value, locale) {\n return typeof value === \"string\" && validator.isPostalCode(value, locale);\n}", "title": "" }, { "docid": "9684894ec646a1ff0d2172251a5c4818", "score": "0.5809182", "text": "function isValidCode(code) {\n if (!Number.isInteger(code)) {\n return false;\n }\n const codeString = code.toString();\n if (error_constants_1.errorValues[codeString]) {\n return true;\n }\n if (isJsonRpcServerError(code)) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "1229ecce1ddfddbddcb3d80e0cb8d97c", "score": "0.58072007", "text": "function validatePIN(pin) {\n let out = false;\n if (/^[0-9]{4}$/.test(pin) === true || /^[0-9]{6}$/.test(pin) === true) {\n out = true;\n }\n return out;\n}", "title": "" } ]
2cf957eef42248ee8ff0e656ce632847
imageMapXY(img: Image, func: (img: Image, x: number, y: number) => Pixel): Image
[ { "docid": "314c546f7bb6b7778a0b53c28ca056d8", "score": "0.8999656", "text": "function imageMapXY(image, func) {\r\n let imgCopy = image.copy();\r\n for(let x=0; x<image.width; ++x) {\r\n for(let y=0; y<image.height; ++y) {\r\n imgCopy.setPixel(x,y, func(imgCopy, x, y));\r\n }\r\n }\r\n return imgCopy;\r\n}", "title": "" } ]
[ { "docid": "cb8707929b036b067027a52a07b61f1c", "score": "0.8778716", "text": "function imageMapXY(img, f){\r\n let output = img.copy();\r\n for(let i = 0; i < img.width; ++i){\r\n for(let j =0; j < img.height; ++j){\r\n output.setPixel(i,j, f(img, i, j));\r\n }\r\n }\r\n return output ;\r\n}", "title": "" }, { "docid": "14f9e9f8e6d55403add351646deb7f50", "score": "0.70558584", "text": "function imageMask(image, func, maskValue) {\r\n //when func(img, x, y) returns true, set pixel to maskValue\r\n //else dont change the pixel\r\n function callback(image, x, y) {\r\n return func(image, x, y)? maskValue: image.getPixel(x,y);\r\n }\r\n return imageMapXY(image, callback);\r\n}", "title": "" }, { "docid": "052f064c03c7290b3126cd459567bbfe", "score": "0.63715", "text": "function blurImage(img){\r\n return imageMapXY(img, blurPixel);\r\n}", "title": "" }, { "docid": "48d7e3c59ff3775f3dd84c15b15fd20c", "score": "0.6284928", "text": "function SharpMap_PixelToMap(x,y,obj)\n{\n\t var p=new Object();\n\t p.x = obj.minX+x*obj.zoom/obj.container.offsetWidth; p.y = obj.maxY-y*obj.zoom/obj.container.offsetWidth;\n\t return p;\n}", "title": "" }, { "docid": "f8242e5b7706019281dcbb27553acc2b", "score": "0.6107404", "text": "function imageMask(img, f, maskValue){\r\n // HOF which applies maskValue if pixel isn't the same as original image\r\n // hlprIm((img: Image, x: number, y: number): Pixel\r\n function hlprIm(img, i, j){\r\n if(f(img,i,j) === true){\r\n return maskValue;\r\n }\r\n else{\r\n return img.getPixel(i,j);\r\n }\r\n }\r\n let tmp = imageMapXY(img, hlprIm);\r\n return tmp;\r\n}", "title": "" }, { "docid": "1365510ac06b84376f53a3762c3aaccf", "score": "0.60876644", "text": "function mapToGrayscale(img){\r\n return imageMapXY(img, HelperGs);\r\n}", "title": "" }, { "docid": "19a710b9a414c013be151088914c55ff", "score": "0.6007509", "text": "function callback(image, x, y) {\r\n return func(image, x, y)? maskValue: image.getPixel(x,y);\r\n }", "title": "" }, { "docid": "18323101f2cfc91f808320f322e3ae9d", "score": "0.5986437", "text": "function map(func, map) {\r\n return reduce(function (acc, value, point) { return set(point, func(value), acc); }, map, from([]));\r\n}", "title": "" }, { "docid": "941e720ceea4d552f4860532a4ad5835", "score": "0.59482276", "text": "function getMapXY(xIn,yIn) {\n\t\txDistance = maxX - minX;\n\t\tyDistance = maxY - minY;\n\t\t//mouseX = xIn;\n\t\tpixelX = xDistance / imageWidth;\n\t\tmapX = pixelX * xIn + minX;\n\t\tyIn = imageHeight - yIn;\n\t\tpixelY = yDistance / imageHeight;\n\t\tmapY = pixelY * yIn + minY;\n\t\ttolerance = pixelX * pixelTolerance;\n}", "title": "" }, { "docid": "c0308e36bdf52ae4a9e39b3483f69ee1", "score": "0.5937109", "text": "map(func){\r\n for(let i = 0; i < this.rows; i++){\r\n for(let j = 0; j < this.cols; j++){\r\n this.cells[i][j] = func(this.cells[i][j]);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3ed4971d3aca772a6cc09880ba3d44b4", "score": "0.59273887", "text": "function getIndex(x, y){\n return ((y * map.width) + x);\n}", "title": "" }, { "docid": "4ebaa6487c7521f09c5d7b77ba1edbca", "score": "0.5852674", "text": "function shape(x, y) {\n image(img, x, y, 100, 100);\n}", "title": "" }, { "docid": "a3987fcdba77e9d4527df07ef8ffc178", "score": "0.5847785", "text": "function addImageToMap2(i,j,k) {\n var S = document.getElementById(\"2grid-\"+i+\"-\"+j);\n var ctx = S.getContext(\"2d\");\n var img = document.getElementById(\"symbol\" + k);\n ctx.drawImage(img,0,0,150,150);\n map[\"2grid-\"+i+\"-\"+j] = k;\n}", "title": "" }, { "docid": "038b16e8b55c9d6d8446d2f674085083", "score": "0.5829863", "text": "processEachCameraPixel(img, pixelCallback) {\n /* No point in doing anything without a callback... */\n if (typeof pixelCallback !== 'function') {\n return;\n }\n\n /* Put the image in the tmp/workspace canvas. */\n this.cameraCtx.drawImage(img, 0, 0);\n\n var w = this.cameraCanvas.width,\n h = this.cameraCanvas.height,\n /* Camera image pixels */\n cameraPixels = this.cameraCtx.getImageData(0, 0, w, h);\n\n for (var i = 0; i < w; ++i) {\n for (var j = 0; j < h; ++j) {\n var idx = (j * w + i) * 4;\n /* Invoke the callback */\n var pixel = {\n r: cameraPixels.data[idx],\n g: cameraPixels.data[idx+1],\n b: cameraPixels.data[idx+2],\n a: cameraPixels.data[idx+3]\n };\n var rasterCell = this.outputRaster.data[i][j];\n pixelCallback(pixel, rasterCell);\n }\n }\n }", "title": "" }, { "docid": "3765cb394d2da5c6188b32ccd78a751c", "score": "0.58263487", "text": "function imageHover(coordinates) {\n let center = new google.maps.LatLng(coordinates['latitude'], coordinates['longitude']);\n let map = document.getElementById(\"map\");\n window.map.panTo(center);\n}", "title": "" }, { "docid": "f454fc8b79fd5939c200d06e1c1544b3", "score": "0.580765", "text": "forEachTile(func) {\n this.tiles.forEach((row, y) => {\n row.forEach((tile, x) => {\n func(x, y, tile)\n })\n })\n }", "title": "" }, { "docid": "eef605eab1a8d02243a2a928159662c8", "score": "0.57569903", "text": "function drawMap(map)\r\n{\r\n\tfor (var i = 0; i < map.cells_x; i++)\r\n\t{\r\n\t\tfor (var j = 0; j < map.cells_y; j++)\r\n\t\t{\r\n\t\t\tctx.drawImage(image, map.cells[i][j].pos_x, map.cells[i][j].pos_y);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "d36e74f5f771eb03c566f0026530d8c9", "score": "0.5749068", "text": "function getIndex(x, y) {\n\treturn (x + y * srcImage.width) * 4\n}", "title": "" }, { "docid": "b25cf39e2bdaeda39c92ee3255af029f", "score": "0.5717465", "text": "map(func){\n //Apply a function to every element of matrix\n for(let i = 0; i < this.rows; i++){\n for (let j = 0; j < this.columns; j++){\n let val = this.data[i][j]; //Gets value from position i,j of data\n this.data[i][j] = func(val); //writes the output of the called function\n //into the i,j position of data\n //-->function needs to work with data\n }\n }\n }", "title": "" }, { "docid": "fa1858aa31cdcdf9740a91005fd961a8", "score": "0.5699024", "text": "function extraer(img, coord){\n img.setRoi(coord.x - 4, coord.y - 4, coord.w, coord.h);\n img2 = img.resize(coord.w, coord.h, \"bilinear\");\n return img2;\n}", "title": "" }, { "docid": "98384f5fc36b12f29bc99c4a11b5a98f", "score": "0.56963974", "text": "function map (board, fn) {\n return board.map((cell, i) => {\n var cy = i % 3\n var cx = (i - cy) / 3\n return fn(cell, cx, cy)\n })\n}", "title": "" }, { "docid": "ea885156b9547bb23021ed61de86baac", "score": "0.56549674", "text": "function drawImage_offset(_canvas, _context, _bitmap, _x, _y, _offsetX, _offsetY) \n{\n\tvar w = _bitmap.width;\n\tvar h = _bitmap.height;\n\t\n\t_context.drawImage(_bitmap, _x + _offsetX, _y + _offsetY, w, h, _x * C_PIXEL_SIZE, _y * C_PIXEL_SIZE, w * C_PIXEL_SIZE, h * C_PIXEL_SIZE);\n}", "title": "" }, { "docid": "c109b625a3b4ff4f60fcb319aa10adc5", "score": "0.5651768", "text": "function drawMap()\n{\n for (var i = 0; i < mapArray.length; i++)\n {\n for (var j = 0; j < mapArray[i].length; j++)\n {\n ctx.drawImage(imgs[mapArray[i][j]], i * blockSize, j * blockSize, blockSize, blockSize)\n }\n }\n\n}", "title": "" }, { "docid": "a85766ad3e172165ed978f96e4dc836e", "score": "0.56243443", "text": "function img (context,id,x,y)\n{\n var img = document.getElementById(id);\n context.drawImage(img,x,y,200,150);\n}", "title": "" }, { "docid": "be659b926ba69052b16830198f3b1066", "score": "0.559627", "text": "function positionMap(){\n\tvar img = $('img#imageid'); \n\t//or however you get a handle to the IMG\n\tvar offset = img.offset();\n\tvar imgWidth = img.width();\n\t//var imgHeight = img.height();\n\t//alert(offset.left);\n\t\n\t//Position the tags in the relative area of the image.\n\t$('ul.map').css({width:imgWidth});\n\t//$('ul.map').css({position:'absolute',left:offset.left-12,top:offset.top});\t\n}", "title": "" }, { "docid": "4b38ab58aa6c2797ceb995f97403b5d2", "score": "0.55941004", "text": "function updateCustomMarkers( event ) {\n // get map object\n var map = event.chart;\n\n // go through all of the images\n for ( var x in map.dataProvider.images ) {\n // get MapImage object\n var image = map.dataProvider.images[ x ];\n\n // check if it has corresponding HTML element\n if ( 'undefined' == typeof image.externalElement )\n image.externalElement = createCustomMarker( image );\n\n // reposition the element accoridng to coordinates\n var xy = map.coordinatesToStageXY( image.longitude, image.latitude );\n image.externalElement.style.top = xy.y + 'px';\n image.externalElement.style.left = xy.x + 'px';\n }\n\n\n}", "title": "" }, { "docid": "6cd73d6a2a09a259d7dab45e16cbc729", "score": "0.5583854", "text": "function loadAndDrawImage($image, context, yOffset) {\r\n // draw the image\r\n context.drawImage($image, 140, yOffset + 5, 20, 20);\r\n}", "title": "" }, { "docid": "dab9cafdbc4474e0b27462ef2941c983", "score": "0.55817235", "text": "function updateCustomMarkers( event ) {\n \n // go through all of the images\n imageSeries.mapImages.each(function(image) {\n // check if it has corresponding HTML element\n if (!image.dummyData || !image.dummyData.externalElement) {\n // create onex\n image.dummyData = {\n externalElement: createCustomMarker(image)\n };\n }\n \n // reposition the element accoridng to coordinates\n var xy = chart.geoPointToSVG( { longitude: image.longitude, latitude: image.latitude } );\n image.dummyData.externalElement.style.top = xy.y + 'px';\n image.dummyData.externalElement.style.left = xy.x + 'px';\n });\n \n }", "title": "" }, { "docid": "11c5d878c0d6a3136fe0a7a20b1367da", "score": "0.55785114", "text": "pixel(x, y) {\n return this.pixels[x + y * this.width];\n }", "title": "" }, { "docid": "11c5d878c0d6a3136fe0a7a20b1367da", "score": "0.55785114", "text": "pixel(x, y) {\n return this.pixels[x + y * this.width];\n }", "title": "" }, { "docid": "8df2f162c7643afefad4b6a35205e9cc", "score": "0.55596274", "text": "function scaleImageCoordinate(x, y, r) {\n var x_ = x * r;\n var y_ = (3328 - y) * r;\n return {x: x_, y: y_};\n}", "title": "" }, { "docid": "25a58778037d235e59cba699bc2e7bd0", "score": "0.5533285", "text": "function displayImg(img, x, y) {\n context.drawImage(img, x * SIZE, y * SIZE);\n}", "title": "" }, { "docid": "1ba23a109dec537e3185627881f22eb9", "score": "0.5526937", "text": "function imageIndexOf(x, y) {\n return x + (y+2) * (maxX+3) + topImages + 3; // This is the simplified version\n// return x+y*(maxX+2)+topImages+(maxX+1)*2+(y+1)+6; }\n}", "title": "" }, { "docid": "38e003eaf69fa6868b08f647059d102d", "score": "0.5520141", "text": "function drawImage(canvas) {\n var context = canvas.node().getContext(\"2d\"),\n image = context.createImageData(dx, dy);\n\n //for (var y = 0, p = -1; y < dy; ++y) {\n for (var y = dy-1, p = -1; y >= 0; --y) {\n for (var x = 0; x < dx; ++x) {\n if (mapdata[y][x] < 0.) {\n image.data[++p] = 200;\n image.data[++p] = 200;\n image.data[++p] = 210;\n image.data[++p] = 255;\n } else {\n var c = d3.rgb(color(mapdata[y][x]));\n image.data[++p] = c.r;\n image.data[++p] = c.g;\n image.data[++p] = c.b;\n image.data[++p] = 255;\n }\n }\n }\n\n context.putImageData(image, 0, 0);\n }", "title": "" }, { "docid": "bd5eefd4483ac0d6d9be41ce946eb375", "score": "0.5511656", "text": "function map (array2d, fn) {\n array2d.forEach((sub, x) => { sub.forEach((vec, y) => fn(vec, x, y)) });\n}", "title": "" }, { "docid": "996f2a1caaae22f3b7f5a52d0ac6407b", "score": "0.550125", "text": "function getPixelAt(imageData, x, y) {\n var offset = ((y * (imageData.width * 4)) + (x * 4));\n return getPixelAtOffset(imageData.data, offset);\n }", "title": "" }, { "docid": "37e06f6d6386a20527e18eb08008b2f0", "score": "0.54847646", "text": "function map() {\r\n\r\n}", "title": "" }, { "docid": "726ec02e881bf737a38fac5ace169935", "score": "0.54803157", "text": "function updateCustomMarkers( event ) {\n // get map object\n var map = event.chart;\n\n // go through all of the images\n for ( var x in map.dataProvider.images ) {\n // get MapImage object\n var image = map.dataProvider.images[ x ];\n\n // check if it has corresponding HTML element\n if ( 'undefined' == typeof image.externalElement )\n image.externalElement = createCustomMarker( image );\n\n // reposition the element accoridng to coordinates\n image.externalElement.style.top = map.latitudeToY( image.latitude ) + 'px';\n image.externalElement.style.left = map.longitudeToX( image.longitude ) + 'px';\n }\n}", "title": "" }, { "docid": "59e3f4b6e65317e4b9ee629f12b8737a", "score": "0.5468049", "text": "static map (matrix, funk) {\n return new Matrix(matrix.rows, matrix.cols)\n .map((e, i, j) => funk(matrix.data[i][j], i, j));\n }", "title": "" }, { "docid": "384a81d8c891c9f9a85110558b0d2f4d", "score": "0.5467487", "text": "function drawPixelated(img,context,zoom,x,y){\n if (!zoom) zoom=4; if (!x) x=0; if (!y) y=0;\n if (!img.id) img.id = \"__img\"+(drawPixelated.lastImageId++);\n var idata = drawPixelated.idataById[img.id];\n if (!idata){\n var ctx = document.createElement('canvas').getContext('2d');\n ctx.width = img.width;\n ctx.height = img.height;\n ctx.drawImage(img,0,0);\n idata = drawPixelated.idataById[img.id] = ctx.getImageData(0,0,img.width,img.height).data;\n }\n for (var x2=0;x2<img.width;++x2){\n for (var y2=0;y2<img.height;++y2){\n var i=(y2*img.width+x2)*4;\n var r=idata[i ];\n var g=idata[i+1];\n var b=idata[i+2];\n var a=idata[i+3];\n context.fillStyle = \"rgba(\"+r+\",\"+g+\",\"+b+\",\"+(a/255)+\")\";\n context.fillRect(x+x2*zoom, y+y2*zoom, zoom, zoom);\n }\n }\n}", "title": "" }, { "docid": "c9c0d8ff124ae7a45544a3d7dd883a46", "score": "0.54671735", "text": "addImage(posX, posY, img) {\n context.drawImage(img, posX, posY);\n }", "title": "" }, { "docid": "d5f03468172d7abcf9b64de4f5af7866", "score": "0.54663783", "text": "function updateCustomMarkers( event ) {\n // get map object\n var map = event.chart;\n\n // go through all of the images\n for ( var x in map.dataProvider.images ) {\n // get MapImage object\n var image = map.dataProvider.images[ x ];\n\n // check if it has corresponding HTML element\n if ( 'undefined' == typeof image.externalElement )\n image.externalElement = createCustomMarker( image );\n\n // reposition the element accoridng to coordinates\n var xy = map.coordinatesToStageXY( image.longitude, image.latitude );\n image.externalElement.style.top = xy.y + 'px';\n image.externalElement.style.left = xy.x + 'px';\n }\n }", "title": "" }, { "docid": "4fd611594e25c9953f791f65c6657908", "score": "0.5461647", "text": "sprite(image, width, height) {\n let column = Math.floor(image.width / width);\n return (frame, x, y) => {\n return this.image(image, (frame % column) * width, Math.floor(frame / column) * height, width, height, x, y, width, height);\n };\n }", "title": "" }, { "docid": "f523627a5628b7ed631702b842d30f11", "score": "0.5453097", "text": "function updateCustomMarkers(event) {\n\t // get map object\n\t var map = event.chart;\n\n\t // go through all of the images\n\t for (var x in map.dataProvider.images) {\n\t // get MapImage object\n\t var image = map.dataProvider.images[x];\n\n\t // check if it has corresponding HTML element\n\t if ('undefined' == typeof image.externalElement)\n\t image.externalElement = createCustomMarker(image);\n\n\t // reposition the element accoridng to coordinates\n\t var xy = map.coordinatesToStageXY(image.longitude, image.latitude);\n\t image.externalElement.style.top = xy.y + 'px';\n\t image.externalElement.style.left = xy.x + 'px';\n\t }\n\t}", "title": "" }, { "docid": "ac53791f58f44df17752e811fd3b35e0", "score": "0.5444393", "text": "function imgMatrix() {\n\n // our image object inside area\n let $img = $('IMG', MAP_PARENT_AREA);\n\n // offset data of image\n let offset = $img.offset();\n\n // add/update object key data\n img.width = $img.outerWidth();\n img.height = $img.outerHeight();\n img.offsetX = offset.left - $(document).scrollLeft();\n img.offsetY = offset.top - $(document).scrollTop();\n\n }", "title": "" }, { "docid": "35cc2096b9eedb790d5b740c16543f1a", "score": "0.5426645", "text": "function setPixel(imageData,x,y,r,g,b,a)\n {\n index=(x+y*imageData.width) * 4;\n imageData.data[index+0]=r;\n imageData.data[index+1]=g;\n imageData.data[index+2]=b;\n imageData.data[index+3]=a;\n }", "title": "" }, { "docid": "ec63a8b0ea0cfdb2512f9d6c7808f7ac", "score": "0.5407004", "text": "function heightTile(srcTif, x, y, zoom, mappingFn, dstPng, cb) {\n //console.log('%s %s,%s %s -> %s', srcTif, x, y, zoom, dstPng);\n const bounds = geo.tileBoundsGoogle({x:x, y:geo.tmsToGoogleToggleY(y, zoom)}, zoom);\n const limits = [\n bounds.min.lat, bounds.max.lon,\n bounds.max.lat, bounds.min.lon\n ];\n\n let cmd;\n\n const dst0 = 'tmp_a.tif';\n const dst1 = 'tmp_b.tif';\n const dst2 = `tmp_c.xyz`;\n const dst3 = dstPng;\n\n cp.execSync('rm -f tmp_*');\n\n cmd = `gdalwarp ${srcTif} -r bilinear -te ${limits.join(' ')} ${dst0}`;\n // console.log(cmd);\n cp.execSync(cmd);\n\n cmd = `gdal_translate -outsize ${tileSize} ${tileSize} ${dst0} ${dst1}`;\n // console.log(cmd);\n cp.execSync(cmd);\n\n cmd = `gdal_translate -of xyz ${dst1} ${dst2}`;\n // console.log(cmd);\n cp.execSync(cmd);\n\n // load xyz data\n const W = tileSize;\n const H = tileSize;\n const s = fs.readFileSync(dst2).toString();\n const l = s.split('\\n'); l.pop();\n const cells = l.map( a => parseFloat( a.split(' ')[2] ) );\n function lookup(x, y) { return cells[ W*y + x ]; }\n\n\n if (dst3.indexOf('/') !== -1) {\n mkdirp(path.dirname(dst3));\n }\n\n // save png file\n const png = new PNG({width:W, height:H});\n (function() {\n let x, y, i = 0;\n for (y = 0; y < H; ++y) {\n for (x = 0; x < W; ++x) {\n let v = lookup(x, y);\n v = mappingFn(v);\n png.data[i ] = v[0];\n png.data[i+1] = v[1];\n png.data[i+2] = v[2];\n png.data[i+3] = v[3];\n i += 4;\n }\n }\n })();\n const stream = png.pack().pipe( fs.createWriteStream(dst3) );\n stream.on('finish', cb);\n}", "title": "" }, { "docid": "6b0d1026d906dd987269e5fbce10d408", "score": "0.5399091", "text": "function myMap(arr, callback) {}", "title": "" }, { "docid": "930a90a66c4b627b2230e5ed317d6cac", "score": "0.53897345", "text": "function drawPixel(imagedata,x,y,color) {\n try {\n if ((typeof(x) !== \"number\") || (typeof(y) !== \"number\"))\n throw \"drawpixel location not a number\";\n else if ((x<0) || (y<0) || (x>=imagedata.width) || (y>=imagedata.height))\n throw \"drawpixel location outside of image\";\n else if (color instanceof Color) {\n var pixelindex = (y*imagedata.width + x) * 4;\n imagedata.data[pixelindex] = color.r;\n imagedata.data[pixelindex+1] = color.g;\n imagedata.data[pixelindex+2] = color.b;\n imagedata.data[pixelindex+3] = color.a;\n } else\n throw \"drawpixel color is not a Color\";\n } // end try\n catch(e) {\n console.log(e);\n }\n} // end drawPixel", "title": "" }, { "docid": "33a7b76918d885565a428452b991ff4e", "score": "0.5387416", "text": "function setImgPixel(img, r, g, b, x, y) {\n const idx = (x + y * width) * 4;\n img.pixels[idx + 0] = r;\n img.pixels[idx + 1] = g;\n img.pixels[idx + 2] = b;\n img.pixels[idx + 3] = 255;\n}", "title": "" }, { "docid": "84481c5091de05a2e8b71fb576f45475", "score": "0.5379073", "text": "static map(matrix, fn) {\n let result = new Matrix(matrix.rows, matrix.columns);\n for (let i = 0; i < matrix.rows; i++)\n for (let j = 0; j < matrix.columns; j++) {\n let val = matrix.data[i][j];\n result.data[i][j] = fn(val);\n }\n return result;\n }", "title": "" }, { "docid": "02cb41974eab25a3d67b40846e729a14", "score": "0.5374928", "text": "function modifyTileImg(imgElement, d, row, col) {\n var canvas = document.createElement(\"canvas\");\n var context = canvas.getContext('2d');\n canvas.width = canvas.height = 256;\n var image = new Image();\n image.src = imgElement.src;\n image.onload = function () {\n //DrawImage params: img, clip x, clip y, clip width, clip height, canvas x, canvas y, canvas width, canvas height;\n context.drawImage(image, (256 / d) * row, (256 / d) * col, 256 / d, 256 / d, 0, 0, 256, 256);\n var dataUrl = canvas.toDataURL(); //'image/png'\n imgElement.src = dataUrl;\n }\n }", "title": "" }, { "docid": "ef1a6879119fd3c72a9018829ecdee48", "score": "0.536969", "text": "function drawPixel(imagedata,x,y,color) {\n try {\n if ((typeof(x) !== \"number\") || (typeof(y) !== \"number\"))\n throw \"drawpixel location not a number\";\n else if ((x<0) || (y<0) || (x>=imagedata.width) || (y>=imagedata.height))\n throw \"drawpixel location outside of image\";\n else if (color instanceof Color) {\n var pixelindex = (y*imagedata.width + x) * 4;\n imagedata.data[pixelindex] = color[0];\n imagedata.data[pixelindex+1] = color[1];\n imagedata.data[pixelindex+2] = color[2];\n imagedata.data[pixelindex+3] = color[3];\n } else \n throw \"drawpixel color is not a Color\";\n } // end try\n \n catch(e) {\n console.log(e);\n }\n}", "title": "" }, { "docid": "bf9bb17c8d71a492bc87a9b2bb04a68f", "score": "0.53543735", "text": "function drawPixel(imagedata,x,y,color) {\n try {\n if ((typeof(x) !== \"number\") || (typeof(y) !== \"number\"))\n throw \"drawpixel location not a number\";\n else if ((x<0) || (y<0) || (x>=imagedata.width) || (y>=imagedata.height))\n throw \"drawpixel location outside of image\";\n else if (color instanceof Color) {\n var pixelindex = (y*imagedata.width + x) * 4;\n imagedata.data[pixelindex] = color.r;\n imagedata.data[pixelindex+1] = color.g;\n imagedata.data[pixelindex+2] = color.b;\n imagedata.data[pixelindex+3] = color.a;\n } else \n throw \"drawpixel color is not a Color\";\n } // end try\n \n catch(e) {\n console.log(e);\n }\n} // end drawPixel", "title": "" }, { "docid": "279f5d028e6ae0b5dbf6799216805087", "score": "0.5344623", "text": "function cell2ImageCoord(coord) {\n return Math.floor((coord - 1) / (cellSize + 1));\n}", "title": "" }, { "docid": "a0e5d0278901e116a0108696ddb4d770", "score": "0.53433365", "text": "function tileLoadFunction(mapProvider) {\n return function (imageTile) {\n var imgElement = imageTile.getImage(); // the tile we will be loading\n\n /* ToDo: What is going on with get the image coords? x is returning a negative number for low zooms (0-2)\n /*var imageCoords = imageTile.getTileCoord(); // the tile coordinates (x,y,z)\n var y = (imageCoords[2] * -1) - 1; // y needs to be corrected using (-y - 1)\n var z = imageCoords[0];\n var x = imageCoords[1];*/\n\n // Switched to this method to get x, y, z since above method having trouble at low zooms\n var regex = /\\/(\\d*)\\/(\\d*)\\/(\\d*)\\.png/g;\n var match = regex.exec(imageTile.src_);\n var z = match[1];\n var x = match[2];\n var y = match[3];\n\n var tileId = z + '/' + x + '/' + y;\n imgElement.id = tileId;\n getTile(mapProvider, tileId).then(function (blob) {\n //$log.log('Found original tile:', tileId, 'Loading ...');\n loadTile(blob, imgElement);\n }, function () {\n getSubstituteTile(mapProvider, imgElement, x, y, z - 1, 2);\n });\n };\n }", "title": "" }, { "docid": "d84ffc8d7d0ef5d313c924f7fbb6234a", "score": "0.5339179", "text": "function myMap(array, func) {\n var newArray = [];\n \n for (var i = 0; i < array.length; i++) {\n newArray.push(plusOne(array[i]));\n }\n return newArray;\n}", "title": "" }, { "docid": "beb406d4e028a05a40b1e2fc8c24fe35", "score": "0.53365993", "text": "function cell2Image(x, y) {\n return [cell2ImageCoord(x), cell2ImageCoord(y)];\n}", "title": "" }, { "docid": "dc784f544afe38e83a43c4e271de62b5", "score": "0.53303957", "text": "function zoomimg_in() {\n\n imageheight *= 1.1\n imagewidth *= 1.1\n\n}", "title": "" }, { "docid": "903cc3c263665d2894bf082297ae17b7", "score": "0.53295213", "text": "_fillMipMap() {\n var ctx = this.canvas.getContext('2d');\n\n // First zoom-level comes from the image\n var to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n let from = this.coordinates[iterations - 1];\n let to = this.coordinates[iterations];\n\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n to[0], to[1], to[2], to[3]\n );\n }\n }", "title": "" }, { "docid": "f3297c5359c8f45d20949d9f19e0478b", "score": "0.53290355", "text": "map(id, source) {\n\n }", "title": "" }, { "docid": "210dd2e6e3613a101f4efbd5da3948e9", "score": "0.532816", "text": "function forEachNeighbor(x, y, fn) {\n for (let cx = Math.max(0, x - 1); cx <= Math.min(x + 1, width - 1); ++cx)\n for (let cy = Math.max(0, y - 1); cy <= Math.min(y + 1, height - 1); ++cy)\n fn(cx, cy) // call fn function\n}", "title": "" }, { "docid": "20f9b51966207a7c78520d4d7e27cde2", "score": "0.53273267", "text": "function drawImage(x, y, context) {\n var img = document.getElementById(\"mandrill\");\n context.drawImage(img, x, y);\n}", "title": "" }, { "docid": "d09054171138a03616a0dfe906927f9b", "score": "0.5325497", "text": "function tile(context, image, tiles){\n for(r=0; r<tiles; r++){\n for(c=0; c<tiles; c++){\n context.drawImage(image, \n (image.width/tiles)*r, (image.height/tiles)*c, \n image.width/tiles, image.height/tiles);\n }\n }\n}", "title": "" }, { "docid": "8c0a7fb3b4b644a8c1f43fc367bd3575", "score": "0.532287", "text": "function setPixel(imageData, x, y, r, g, b, a) {\n var index = (x + y * imageData.width) * 4;\n imageData.data[index + 0] = r;\n imageData.data[index + 1] = g;\n imageData.data[index + 2] = b;\n imageData.data[index + 3] = a;\n}", "title": "" }, { "docid": "5fb1ff977a6d6b82d7120829f32fc9c6", "score": "0.5317733", "text": "function nearbyPixel(x, y, image) {\n //The 10 - 20 part insures the number is generated from\n //left and right, top and bottom.\n var ranX = Math.floor(Math.random() * 10 - 20);\n var ranY = Math.floor(Math.random() * 10 - 20);\n var newX = x + ranX;\n var newY = y + ranY;\n if (newX < 0) {\n newX = 0;\n }\n if (newY < 0) {\n newY = 0;\n }\n if (newX > image.getWidth()) {\n newX = image.getWidth();\n }\n if (newY > image.getHeight()) {\n newY = image.getHeight;\n }\n var pixel = image.getPixel(newX, newY);\n return pixel;\n}", "title": "" }, { "docid": "3ae268154f2116998077fca74765f07e", "score": "0.52996844", "text": "static map(v, func) {\n return Vector.fromDim(v.n).map((_, i) => func(v.data[i], i));\n }", "title": "" }, { "docid": "fc88a06f01090627ec1b2f98b4bd98bc", "score": "0.529912", "text": "function calculateCoordinates() {\n const multiplier = mappedImage.width() / settings.origImageWidth;\n let areaCount = 0;\n $(mapSelector).each(function() {\n const pairs = originalCoordinates[ areaCount ].split(',');\n for (let i = 0; i < pairs.length; i++) {\n pairs[ i ] *= multiplier;\n }\n $(this).attr('coords', pairs.join(','));\n areaCount++;\n });\n }", "title": "" }, { "docid": "303a88a7d286bb676409cdc6caaa24ab", "score": "0.52910197", "text": "function defineImageOffsets(locId) {\n var xOffset;\n var yOffset;\n if (locId == '1') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '2') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '3') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '4') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '5') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '6') {\n xOffset = -0.45;\n yOffset = 0.2;\n } else if (locId == '7') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '8') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '9') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '10') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '11') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '12') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '13') {\n xOffset = -0.15;\n yOffset = -0.4;\n } else if (locId == '14') {\n xOffset = -0.5;\n yOffset = -0.1;\n } else if (locId == '15') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '17') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '18') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '19') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '20') {\n xOffset = 0;\n yOffset = 0;\n } else if (locId == '21') {\n xOffset = 0;\n yOffset = 0;\n } else {\n xOffset = 0;\n yOffset = 0;\n }\n\n var offsets = [xOffset, yOffset];\n return offsets;\n }", "title": "" }, { "docid": "971f49d1e3e5a8f960547e76ff231e0d", "score": "0.5286603", "text": "function drawImage(canvas) {\n var context = canvas.node().getContext(\"2d\"),\n image = context.createImageData(dx, dy);\n \n for (var y = 0, p = -1; y < dy; ++y) {\n for (var x = 0; x < dx; ++x) {\n var c = d3.rgb(MAP_COLORS(data[dy-y-1][x]));\n image.data[++p] = c.r;\n image.data[++p] = c.g;\n image.data[++p] = c.b;\n image.data[++p] = 255;\n }\n }\n \n context.putImageData(image, 0, 0);\n }", "title": "" }, { "docid": "d48d864aad7d60a2f06ee8529d59d5d6", "score": "0.52865046", "text": "map(func) {\r\n return this.array.map(func);\r\n }", "title": "" }, { "docid": "aa48b8746908bb0fc44c076114bcf7a2", "score": "0.5276811", "text": "function Picture(image, x, y){\n\tthis.image = image;\n\tvar m = new Matrix(1,0,0,1,x,y);\n\tthis.transform = new Transformable(image.width, image.height, m, this);\n}", "title": "" }, { "docid": "d97c897847ef37de2573cad8336a75bc", "score": "0.52764654", "text": "function repopulateMap() {\nfor (var x = 0; x < imageData.length; x++) {\n addToMap(imageData[x]);\n}\n}", "title": "" }, { "docid": "eb145e0e4ba898867a28ac5ca010b145", "score": "0.5272924", "text": "_fillMipMap() {\n const ctx = this.canvas.getContext(\"2d\");\n\n // First zoom-level comes from the image\n const to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n const from = this.coordinates[iterations - 1];\n const to = this.coordinates[iterations];\n\n ctx.drawImage(\n this.canvas,\n from[0],\n from[1],\n from[2],\n from[3],\n to[0],\n to[1],\n to[2],\n to[3]\n );\n }\n }", "title": "" }, { "docid": "b8b580569a0b3e13c7e3a2b235293a33", "score": "0.5267988", "text": "function directImage() {\n if (trueMagnification !== 1) {\n console.error('directImage: Magnification is not equal to 1, it is ' + trueMagnification);\n return;\n }\n console.log('directImage');\n output.startDrawing();\n output.pixels.update();\n const pixels = output.pixels;\n const width = output.canvas.width;\n const height = width;\n let imageIndex = 0;\n // going over image pixels, skipping border cells\n for (var j = 0; j < height; j++) {\n // skip first two cell rows (border)\n const jCellSize = size * (2 + j);\n for (var i = 0; i < width; i++) {\n // skip first two cell columns (border)\n const cell = cells[jCellSize + i + 2];\n if (cell < -20) {\n pixels.array[imageIndex] = colorForMoverLeft;\n } else if (cell < -10) {\n pixels.array[imageIndex] = colorForMoverRight;\n } else if (cell < 0) {\n pixels.array[imageIndex] = colorForMover;\n } else {\n pixels.array[imageIndex] = colors[cell];\n }\n imageIndex += 1;\n }\n }\n output.pixels.show();\n}", "title": "" }, { "docid": "65592ce99daa4538276128636e9fb174", "score": "0.5263405", "text": "function myMap(func, arr) {\n let newArr = [];\n for (let i = 0; i < arr.length; i++) {\n newArr[i] = func(arr[i]);\n }\n return newArr;\n}", "title": "" }, { "docid": "646b61fe536e74b80948654117aba6fa", "score": "0.5257577", "text": "loadImage(src, toMap = false) {\n let img = document.createElement(\"img\");\n img.src = src;\n let that = this;\n\n if (!toMap) {\n that.img = img;\n }\n\n img.onload = function () {\n that.imgCoords = {\n x:\n Math.abs(\n that.canvas.width -\n ((window.innerHeight * img.width) / img.height) *\n window.devicePixelRatio\n ) / 2,\n y: Math.abs(that.canvas.height - img.height) / 2,\n };\n\n that.drawImage(img);\n\n that.getData(toMap);\n };\n }", "title": "" }, { "docid": "b3b35d730e84572de46b1b9fd6daf1af", "score": "0.5255078", "text": "set imagePosition(value) {}", "title": "" }, { "docid": "916e62e4790b3c06e240b84628256c92", "score": "0.5252968", "text": "map(fn) {\n for (let i = 0; i < this.rows; i++)\n for (let j = 0; j < this.columns; j++) {\n let val = this.data[i][j];\n this.data[i][j] = fn(val);\n }\n return this;\n }", "title": "" }, { "docid": "48e26777455423141386c55e479dccb2", "score": "0.5252006", "text": "function mapArr(fn, arr) {\n return arr.map((val, idx) => fn(val, idx));\n}", "title": "" }, { "docid": "651936d1ebacf3e2e597f5162345622b", "score": "0.5246096", "text": "function getPixelFromImageBitmap(image, xPos, yPos, canvas) {\n if (xPos > image.width || xPos < 0 || yPos > image.height || yPos < 0) {\n return undefined;\n }\n let pixelData;\n canvas.width = image.width;\n canvas.height = image.height;\n const context = canvas.getContext(\"2d\");\n if (context !== null) {\n context.drawImage(image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height);\n pixelData = context.getImageData(xPos, yPos, 1, 1).data;\n }\n return pixelData;\n}", "title": "" }, { "docid": "651936d1ebacf3e2e597f5162345622b", "score": "0.5246096", "text": "function getPixelFromImageBitmap(image, xPos, yPos, canvas) {\n if (xPos > image.width || xPos < 0 || yPos > image.height || yPos < 0) {\n return undefined;\n }\n let pixelData;\n canvas.width = image.width;\n canvas.height = image.height;\n const context = canvas.getContext(\"2d\");\n if (context !== null) {\n context.drawImage(image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height);\n pixelData = context.getImageData(xPos, yPos, 1, 1).data;\n }\n return pixelData;\n}", "title": "" }, { "docid": "8ab720e25dc8a0863f0fd8ca89c166f9", "score": "0.5233311", "text": "function effect(img,type,x,y){\n img.loadPixels();\n for (let i = 0; i < img.width; i++) {\n for (let j = 0; j < img.height; j++) {\n colors = img.get(i,j); \n if(type ==\"negative\") {\n img.set(i, j,negative(colors));\n }else if(type==\"gray\"){\n img.set(i, j,gray(colors));\n }\n else{\n img.set(i, j,grayaverage(colors));\n }\n }\n }\n img.updatePixels();\n textSize(18)\n text(\"image \" + type,x,y-20);\n image(img, x, y,height,width);\n}", "title": "" }, { "docid": "95f0e28c7363f0dd77f048a0c5c8b061", "score": "0.5231417", "text": "function drawMap(canvasId, spriteImage, map) {\n\tvar canvas = document.getElementById(canvasId);\n\tvar context = canvas.getContext('2d');\n\n\tvar spriteTileSize = {\n\t\twidth: 40, \n\t\theight: 40\n\t};\n\n\tvar scale = {\n\t\tx: map.width ? canvas.width/map.width : 40,\n\t\ty: map.height ? canvas.height/map.height : 40\n\t};\n\n\tvar minScale = scale.x < scale.y ? scale.x : scale.y;\n\n\tvar canvasTileSize = {\n\t\twidth: minScale, \n\t\theight: minScale\n\t};\n\n\tclearCanvas();\n\tdrawLayer(map.data.bottom, context);\n\n\tfunction clearCanvas() {\n\t\tcontext.fillStyle = \"grey\";\n\t\tcontext.fillRect(0,0,canvas.width, canvas.height);\n\t}\n\n\tfunction drawLayer(layer, context) {\n\t\tfor(var row in layer) {\n\t\t\tfor(var col in layer[row]) {\n\t\t\t\tvar imageNumber = +layer[row][col];\n\t\t\t\tdrawTile(imageNumber, row, col);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction drawTile(imageNumber, row, col) {\n\t\tvar imageLoc = {\n\t\t\tx: imageNumber % 8 * spriteTileSize.height,\n\t\t\ty: Math.floor(imageNumber / 8) * spriteTileSize.width\n\t\t};\t\n\n\t\tvar canvasLoc = {\n\t\t\tx: col * canvasTileSize.height,\n\t\t\ty: row * canvasTileSize.width\n\t\t};\n\n\t\tcontext.drawImage(spriteImage, \n\t\t\t\t\t\t imageLoc.x, imageLoc.y,\n\t\t\t\t\t\t spriteTileSize.width, spriteTileSize.height,\n\t\t\t\t\t\t canvasLoc.x, canvasLoc.y,\n\t\t\t\t\t\t canvasTileSize.width, canvasTileSize.height);\n\t}\t\n}", "title": "" }, { "docid": "ff3c2a776bbd31382efadfcadbee4ad1", "score": "0.5230742", "text": "function addPictureMarker(imgUrl, height, width, xOffset, yOffset, coords) {\n var coordinates = [0, 0];\n var urlParams = location.hash.substring(1).split('&');\n var offset = [xOffset || 0, yOffset || 0];\n\n // create a DOM element for the marker\n var el = document.createElement('div');\n el.className = 'picture-marker';\n el.innerHTML = '<img src=\"' + imgUrl + '\" width=\"' + width + '\" height=\"' + height + '\">';\n\n if (coords !== undefined) {\n coordinates = coords;\n } else {\n for (var i=0; urlParams[i]; i++) {\n var param = urlParams[i].split('=');\n if (param[0] === 'map') {\n var mapParamsArray = param[1].split('/');\n coordinates = [mapParamsArray[2], mapParamsArray[1]];\n }\n }\n }\n\n // add marker to map\n new mapboxgl.Marker(el, {offset: [-width / 2 + offset[0], -height / 2 + offset[1]]})\n .setLngLat(coordinates)\n .addTo(map);\n}", "title": "" }, { "docid": "f3a39336fad523cc952f44d10fb38c85", "score": "0.52238536", "text": "map(func) {\n for(let i = 0; i < this.n; i++) {\n this.data[i] = func(this.data[i], i);\n }\n return this;\n }", "title": "" }, { "docid": "2eec3924ff3e152f4cd547d1d7b5ebbe", "score": "0.52210814", "text": "function drawImage(){\n let image = document.getElementById(\"image-bodymap\");\n context.drawImage(image, 0, 0);\n}", "title": "" }, { "docid": "f7818710d95b1c59fa4e781c36a0f7b6", "score": "0.52162266", "text": "static map(x, xMin,xMax, zMin,zMax){ return (x - xMin) / (xMax - xMin) * (zMax-zMin) + zMin; }", "title": "" }, { "docid": "f9e5a3cb08d9b9c6060c9f35d73332a8", "score": "0.52161133", "text": "function setPixel(imageData, x, y, pixel) {\n var i = getPixelPos(imageData, x, y);\n var data = imageData.data;\n data[i] = pixel.red;\n data[i + 1] = pixel.green;\n data[i + 2] = pixel.blue;\n data[i + 3] = pixel.alpha;\n}", "title": "" }, { "docid": "f6cc270a80effcd8d46816d97bb9a28e", "score": "0.5209718", "text": "function map(fn) {\n return function(arr) {\n return arr.map(fn);\n };\n }", "title": "" }, { "docid": "7d12c5ea475b4b8064491e595a61e6c9", "score": "0.52074426", "text": "function getPixel (imageData, x, y) {\n var idx = (x + y * imageData.width) * 4\n return [imageData.data[idx], imageData.data[idx + 1], imageData.data[idx + 2]]\n }", "title": "" }, { "docid": "869fdfceae6bcf77604e0945c1b2064b", "score": "0.5206347", "text": "function blackenLow(img){\r\n//blackenPixel(img: Image, i: Number, j: Number): Pixel\r\n// HOF which blackens an individual pixel with the help of blknOrSatPixel,it takes the args\r\n// image, and x and y coordinates for the image and returns a modified pixel. \r\n function blackenPixel(img,i,j){\r\n let pixel = img.getPixel(i,j);\r\n let output = pixel.map(function tmp(i){ if(i < 0.3){ i = 0.0;}return i;});\r\n return output;\r\n }\r\n return imageMapXY(img, blackenPixel);\r\n}", "title": "" }, { "docid": "72cf1af599f6d3e636b1c7415b8df9a6", "score": "0.51987827", "text": "convertPixelXYToDomainXY(pixelX, pixelY, wLonOfMap, sLatOfMap, eLonOfMap, nLatOfMap) {\n\n const [wMeters, sMeters] = this._pseudoMercator.forward([wLonOfMap, sLatOfMap]);\n const [eMeters, nMeters] = this._pseudoMercator.forward([eLonOfMap, nLatOfMap]);\n\n const scaleX = (this._widthInPixels - 0) / (eMeters - wMeters);\n const scaleY = (0 - this._heightInPixels) / (nMeters - sMeters); //orientation of world->view is flipped\n\n const translateX = 0 - (scaleX * wMeters);\n const translateY = this._heightInPixels - (scaleY * sMeters);\n\n const xMeters = (pixelX - translateX) / scaleX;\n const yMeters = (pixelY - translateY) / scaleY;\n\n return this.reverseProjectWebMercatorXYToDomainXY(xMeters, yMeters);\n }", "title": "" }, { "docid": "2410b8836071be3ccb6e696cf65f2706", "score": "0.5195558", "text": "function map(arr, fn) {\n var ret = [];\n\n for (var i = 0; i < arr.length; ++i) {\n ret.push(fn(arr[i], i));\n }\n\n return ret;\n }", "title": "" }, { "docid": "18d2998de3acd5529aa1c32e9a0ecdda", "score": "0.5194184", "text": "function setPixel(imgDat, x, y, color){\n var index = (x + y * imgDat.width) * 4;\n imgDat.data[index + 0] = color[0]; //r\n imgDat.data[index + 1] = color[1]; //g\n imgDat.data[index + 2] = color[2]; //b\n imgDat.data[index + 3] = 255; //a, opaque\n}", "title": "" }, { "docid": "a0ae14ef5a0a72ce28fd022704068f96", "score": "0.5193947", "text": "function image2Cell(x, y) {\n return [image2CellCoord(x), image2CellCoord(y)];\n}", "title": "" }, { "docid": "156b95452e3d9ad039a82ad721f4a484", "score": "0.5181612", "text": "function process_image(w, h, cb) {\n\tfor (let y = 0; y < h; y += 1) {\n\t\tfor (let x = 0; x < w; x += 1) {\n\t\t\tcb(y * h + x, x, y);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "2f5067c1035b052165decfda627df3cd", "score": "0.51751226", "text": "function map(arr, fn){\n var ret = [];\n for (var i = 0; i < arr.length; ++i) {\n ret.push(fn(arr[i], i));\n }\n return ret;\n }", "title": "" }, { "docid": "64c21332675d2a77223656b3685eaf2a", "score": "0.5172626", "text": "setImage(img) {\n context.drawImage(img, this.getPosX(), this.getPosY());\n }", "title": "" }, { "docid": "5d3f2d33c1829cdb161e87b6b364541c", "score": "0.51709706", "text": "function getSubstituteTile(mapProvider, imgElement, x, y, z, d) {\n var row = 0;\n var col = 0;\n checkNextTile(mapProvider, imgElement, x, y, z, d, row, col);\n }", "title": "" } ]
ee5ec0b6658e5ef487410268758e0768
to access mobile website of solution
[ { "docid": "e633987ece196b15c7cf762ae1fc519c", "score": "0.7450545", "text": "function accessmobilewebsiteSolutiontrue(resourceId){\n\t \n\t console.log(\"inside access mobile website of solutiom (true).... \");\t \n\t var privateid = resourceId.toLowerCase();\n\t console.log(\"privateid client====> \"+privateid); \n\t window.location.href = pmwPath+\"/MW/\"+resourceId+\"/\"+privateid+\"personalise/index.html\";\n}", "title": "" } ]
[ { "docid": "83f83b8ff5b786b0c7a8b985972ab927", "score": "0.7567097", "text": "function accessmobilewebsitetrue(solutionId, resourceId){\n\t \n\t console.log(\"inside access mobile website of site (true).... \");\n\t var privateid = resourceId.toLowerCase();\n\t console.log(\"privateid client====> \"+privateid); \n\t window.location.href = pmwPath+\"/MW/\"+solutionId+\"/\"+privateid+\"personalise/index.html\";\n}", "title": "" }, { "docid": "f0770ca71e7e5c5c774213829502e3d3", "score": "0.7293521", "text": "function accessmobilewebsiteSolutiontrue(sId){\n\t \n\t console.log(\"inside access mobile website of solutiom (true).... \");\t \n\t var privateid = sId.toLowerCase();\n\t console.log(\"privateid client====> \"+privateid); \n\t window.location.href = pmwPath+\"/MW/\"+sId+\"/\"+privateid+\"personalise/index.html\";\n}", "title": "" }, { "docid": "1bd28316873fc732892fcbd49b077a93", "score": "0.718569", "text": "function accessmobwbst(solid, siteId){\n\t \n\t console.log(\"inside access mobile website of site (true).... \"+solid);\n\t var privateid = siteId.toLowerCase();\n\t console.log(\"privateid client====> \"+privateid); \n\t window.location.href = pmwPath+\"/MW/\"+solid+\"/\"+privateid+\"personalise/index.html\";\n}", "title": "" }, { "docid": "f30bb88f0c9aedd8199a8c8c0e79d842", "score": "0.66961485", "text": "function mobileSite() {\n session.custom.device = 'mobile';\n app.getView().render('components/changelayout');\n}", "title": "" }, { "docid": "fe437d1c42f72b02d5872ff485bca511", "score": "0.6175991", "text": "goToHomePage() {\n pages.homePage.goToHomePage()\n I.say('Mobile mode')\n }", "title": "" }, { "docid": "0ba2225c13b86c02432f2501486acd20", "score": "0.6140529", "text": "function detect_device(){\r\n\tif(window.innerWidth <= 600) {\r\n\t\t// window.location.replace(\"url.html\");\r\n\t\twindow.location.replace(\"mobile.html\")\r\n\t}\r\n}", "title": "" }, { "docid": "4f04fc5a01b733d40fd8d957f56c9826", "score": "0.608718", "text": "function accessmobilewebsiteSitetrue(resourceId){\n\t \n\tconsole.log(\"inside access mobile website of site (true).... \");\n\t// get parent id\n\t$.ajax({\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: 'http://'+backendAddr+'/OP-BackEnd-Gateway/opgateway/getParent/'+realm+'/'+resourceId,\n\t\t\t\tcontentType: \"text/xml\",\n\t\t\t\tcrossDomain: true,\n\t\t\t\tprocessData: false,\n\t\t\t\theaders: {\n\t\t\t\t 'Authorization': 'Bearer '+token\n\t\t\t\t},\n\t\t\t\t}).done(function(respData) {\n\t\t\t\t\n\t\t\t\tconsole.log(\"solution registration for registration (done).... \"+respData);\n\t\t\t\t$(respData).find(\"parent\").each(function() {\n\t\t\t\t$(this).find(\"parentId\").each(function(){\n\t\t\t\tvar solutionId = $(this).text();\n\t\t\t\taccessmobilewebsitetrue(solutionId, resourceId);\n\t\t\t\t}); });\t\t\t\t\n\t\t\t\t}).error(function() {\n\t\t\t\tconsole.log(\"solution registration for registration (error).... \");\n\t\t\t\t}).complete(function() {\n\t\t\t\tconsole.log(\"solution registration for registration (completed).... \");\n\t\t\t\t});\n\t\t}", "title": "" }, { "docid": "a6b76f9f2d86638a29e508bd66c32c2f", "score": "0.6070263", "text": "function checkMobile(){\n\tif ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))){\n\t\t$('#site-name').hide();\n\t\t$('#abstract-title').hide();\n\t\t$('#abstract-content').hide();\n\t}\n\t\n}", "title": "" }, { "docid": "45c172f1daff533549f8aaa33496c49a", "score": "0.60496753", "text": "function gotoMobiles() {\n window.location.href = \"catagories_pages/mobiles.html\";\n}", "title": "" }, { "docid": "197d4e04be7e5fee8f1e46790b1595f0", "score": "0.59566545", "text": "function onClicked() {\n\t\ttablet.gotoWebScreen(APP_URL);\n\t }", "title": "" }, { "docid": "354ad8c969fce881ebe138f4b4c83801", "score": "0.5892288", "text": "function goSite() {\n window.open('https://www.koreanair.com/content/koreanair/korea/ko.html');\n}", "title": "" }, { "docid": "a2f7f8ca55d1efac886d3f01033b6d0e", "score": "0.58549035", "text": "function detectUserAgent() {\n var isMobile = navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i);\n\n if (!isMobile) {\n // Note: Comment out this line for testing on Desktop\n //window.location = \"http://www.candyspace.com\";\n }\n }", "title": "" }, { "docid": "e8ad9054c1947ef7e067b4db342e4133", "score": "0.5799126", "text": "function main() {\n\tvar prefs = AnyBalance.getPreferences();\n\tvar baseurl = 'https://my.lifecell.ua/';\n\tAnyBalance.setDefaultCharset('utf-8');\n\tcheckEmpty(prefs.phone, 'Введите номер телефона!');\n\tcheckEmpty(prefs.pass, 'Введите пароль!');\n\tif(prefs.type == 'site') {\n\t\ttry{\n\t\t\tmainSite(prefs, baseurl);\n\t\t}catch(e){\n\t\t\tAnyBalance.trace(e.message);\n AnyBalance.trace('Не удалось получить данные с сайта. Пытаюсь получить из мобильного приложения');\n mainMobileApp(prefs, baseurl);\n\t\t}\n\t} else {\n\t\t\tmainMobileApp(prefs, baseurl);\n\t}\n}", "title": "" }, { "docid": "bd576428815ecc59b90ddaac048014d7", "score": "0.57939446", "text": "function DetectWindowsMobile(){\n\t\t\t\t\tif (uagent.search(deviceWinMob) > -1)\n\t\t\t\t\t\treturn true;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn false;\n\t\t\t\t}", "title": "" }, { "docid": "7f3d8a5aefe2b6b2d62e7a26661d67a1", "score": "0.57319176", "text": "open () {\n browser.url(`http://automationpractice.com/index.php`)\n browser.maximizeWindow();\n }", "title": "" }, { "docid": "036a0edf35b78af62a1930de5d29ae0e", "score": "0.57157075", "text": "function onDeviceReady() {\n //var ref = window.open('http://apache.org', '_blank', 'location=yes');\n socialLikesButtons.isDevice = true;\n}", "title": "" }, { "docid": "ee5782b9339e41273837172c1e0c35a9", "score": "0.5701738", "text": "function onDeviceReady() {\n $(document).on('click', '#go', function(){\n var website = $(\"#text-basic\").val();\n alert(website);\n window.open = cordova.InAppBrowser.open;\n var ref = window.open(\"http://www.\"+website, '_blank', 'location=yes');\n ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); });\n ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); });\n ref.addEventListener('loaderror', function(event) { alert('error: ' + event.message); });\n ref.addEventListener('exit', function(event) { alert(event.type); });\n});\n }", "title": "" }, { "docid": "095701e6ed52d8f7c42aa6b027230de7", "score": "0.56706727", "text": "static get isMobilePlatform() {}", "title": "" }, { "docid": "4170c3de11d3885f0258b9d8eadf8a8b", "score": "0.56450266", "text": "isMobile() {\n if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "059f0851c06041ac600c843e539794fd", "score": "0.5633621", "text": "function test_host_viewing() {}", "title": "" }, { "docid": "f0891c67bf547599bd0c94430d17d734", "score": "0.5599597", "text": "function l(){var e=navigator.userAgent;return(e.indexOf(\"Android 2.\")===-1&&e.indexOf(\"Android 4.0\")===-1||e.indexOf(\"Mobile Safari\")===-1||e.indexOf(\"Chrome\")!==-1||e.indexOf(\"Windows Phone\")!==-1)&&(window.history&&\"pushState\"in window.history)}", "title": "" }, { "docid": "81d9e64cb2987302fcc5e13ebaf0d9f4", "score": "0.55784017", "text": "function initMobile() {\n\tif ( !mw.user.isAnon() ) {\n\t\tmw.loader.using( [ 'ext.echo.mobile', 'mobile.startup' ] ).then( function ( require ) {\n\t\t\trequire( 'ext.echo.mobile' ).init();\n\t\t} );\n\t}\n}", "title": "" }, { "docid": "d71fa854521ed7ab863d69ad4a73b527", "score": "0.55761254", "text": "isWeb() {\n if (this.platform === 'desktop' || this.platform === 'tablet' || this.platform === 'ipad') {\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "60ac0d282fe0f51c3a6856d2dd2c75e5", "score": "0.5573051", "text": "function detectmob() {\n if( navigator.userAgent.match(/Android/i)\n || navigator.userAgent.match(/webOS/i)\n || navigator.userAgent.match(/iPhone/i)\n || navigator.userAgent.match(/iPad/i)\n || navigator.userAgent.match(/iPod/i)\n || navigator.userAgent.match(/BlackBerry/i)\n || navigator.userAgent.match(/Windows Phone/i)){\n\n return true;\n }\n else{\n return false;\n }\n}", "title": "" }, { "docid": "0363c6614d7901dabeb9b2206d21d0be", "score": "0.5571537", "text": "function detectedMobile(){\n var sUserAgent= navigator.userAgent.toLowerCase(),\n bIsIpad= sUserAgent.match(/ipad/i) == \"ipad\",\n bIsIphoneOs= sUserAgent.match(/iphone os/i) == \"iphone os\",\n bIsMidp= sUserAgent.match(/midp/i) == \"midp\",\n bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == \"rv:1.2.3.4\",\n bIsUc= sUserAgent.match(/ucweb/i) == \"ucweb\",\n bIsAndroid= sUserAgent.match(/android/i) == \"android\",\n bIsCE= sUserAgent.match(/windows ce/i) == \"windows ce\",\n bIsWM= sUserAgent.match(/windows mobile/i) == \"windows mobile\",\n bIsWebview = sUserAgent.match(/webview/i) == \"webview\";\n return (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM);\n }", "title": "" }, { "docid": "1b761af8495ffc11878ec5005e997894", "score": "0.55662155", "text": "function isMobile(){\n var mobiles = new Array\n (\n \"midp\", \"j2me\", \"avant\", \"docomo\", \"novarra\", \"palmos\", \"palmsource\",\n \"240x320\", \"opwv\", \"chtml\", \"pda\", \"windows ce\", \"mmp/\",\n \"blackberry\", \"mib/\", \"symbian\", \"wireless\", \"nokia\", \"hand\", \"mobi\",\n \"phone\", \"cdm\", \"up.b\", \"audio\", \"sie-\", \"sec-\", \"samsung\", \"htc\",\n \"mot-\", \"mitsu\", \"sagem\", \"sony\", \"alcatel\", \"lg\", \"eric\", \"vx\",\n \"NEC\", \"philips\", \"mmm\", \"xx\", \"panasonic\", \"sharp\", \"wap\", \"sch\",\n \"rover\", \"pocket\", \"benq\", \"java\", \"pt\", \"pg\", \"vox\", \"amoi\",\n \"bird\", \"compal\", \"kg\", \"voda\", \"sany\", \"kdd\", \"dbt\", \"sendo\",\n \"sgh\", \"gradi\", \"jb\", \"dddi\", \"moto\", \"iphone\", \"android\",\n \"iPod\", \"incognito\", \"webmate\", \"dream\", \"cupcake\", \"webos\",\n \"s8000\", \"bada\", \"googlebot-mobile\"\n )\n var userAgent = navigator.userAgent.toLowerCase();\n var isMobile = false;\n for (var i = 0; i < mobiles.length; i++) {\n if (userAgent.indexOf(mobiles[i]) > 0) {\n isMobile = true;\n break;\n }\n }\n return isMobile;\n}", "title": "" }, { "docid": "4920fb3a3794235d5703b80e17abfdb1", "score": "0.55542946", "text": "function setChannelMobile() // this function is called in the preappinit of the application properties\n{\n\tchannel =\"mobile\";\n}", "title": "" }, { "docid": "e0f45024bcb53722d6dd0d16531e6ec3", "score": "0.555159", "text": "function checkMobile() {\n\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n\n}", "title": "" }, { "docid": "830a6010483d10faba863ccc10bad77a", "score": "0.5548593", "text": "function sliderMobile(dom_scope) {\n var si = $('.media-mobile .shortcuts', dom_scope).royalSlider({\n addActiveClass: true,\n arrowsNav: false,\n startSlideId: 1,\n autoHeight: false,\n controlNavigation: 'bullets',\n autoScaleSlider: false,\n loop: false,\n fadeinLoadedSlide: true,\n globalCaption: false,\n keyboardNavEnabled: false,\n slidesSpacing: 0,\n allowCSS3: true,\n minSlideOffset: 3,\n globalCaptionInside: false,\n\n visibleNearby: {\n enabled: true,\n center: true,\n breakpointCenterArea: 0.14\n }\n }).data('royalSlider');\n }", "title": "" }, { "docid": "a3417c264040a6852f6f8a3755cc69cf", "score": "0.5540891", "text": "function detectMobile(){\n\treturn (/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile/i.test(navigator.userAgent) );\n}", "title": "" }, { "docid": "072fcec83ce0a9413b34e674a412be4a", "score": "0.55400234", "text": "function detectmob() { \n if( navigator.userAgent.match(/Android/i)\n || navigator.userAgent.match(/webOS/i)\n || navigator.userAgent.match(/iPhone/i)\n || navigator.userAgent.match(/iPad/i)\n || navigator.userAgent.match(/iPod/i)\n || navigator.userAgent.match(/BlackBerry/i)\n || navigator.userAgent.match(/Windows Phone/i)\n ){\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "0f0ab630cd8f47a0efd1d0b528f23832", "score": "0.55329996", "text": "function fullSite() {\n session.custom.device = 'fullsite';\n app.getView().render('components/changelayout');\n}", "title": "" }, { "docid": "3e0faea190b699b9f3cc3535178d50c8", "score": "0.55315834", "text": "function isMobile(){\n\t\treturn (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) \n\t || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(navigator.userAgent.substr(0,4)));\n\t}", "title": "" }, { "docid": "891735a81f4e1446f7daef26338a04f2", "score": "0.55170107", "text": "function showMobilePage() {\n var url=\"\";\n phone_id=localStorage.getItem(\"prod_id\");\n\n url= \"http://localhost:4567/updatedSpecs?id=\"+phone_id;\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n showupdatedSpecifications(this); \n \n }\n };\n xmlhttp.open(\"GET\",url, true);\n xmlhttp.send();\n \n }", "title": "" }, { "docid": "99d0f8b9cb5a1035e610ccc5a532b920", "score": "0.5515413", "text": "function detect_mobile() {\n\t\tvar check = false;\n\t\t(function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);\n\t\treturn check;\n\t}", "title": "" }, { "docid": "bcc6c4355f4b4d931448b3ec86220998", "score": "0.55066586", "text": "function isMobile(){\n return navigator.userAgent.match(\"/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i\");\n}", "title": "" }, { "docid": "5008e77e24c25bdffec180a0eac64c5f", "score": "0.5497727", "text": "open (path) {\n //return browser.url(`https://qa8.legalmatch.com/`)\n //return browser.url(`https://legalmatch.com/`)\n return browser.url(path)\n }", "title": "" }, { "docid": "f187ec029c9e1bbd1f389451e3018bfa", "score": "0.5496487", "text": "function isMobile() {\n\tif(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) \n\t\t || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(navigator.userAgent.substr(0,4))) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "9478552393f0de0bb740fa66e0f00316", "score": "0.5495878", "text": "function isMobile() {\n var agent = navigator.userAgent || navigator.vendor || window.opera;\n\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent.substr(0, 4))) {\n return true;\n }\n\n return false;\n} // ================================= Hook =================================", "title": "" }, { "docid": "9478552393f0de0bb740fa66e0f00316", "score": "0.5495878", "text": "function isMobile() {\n var agent = navigator.userAgent || navigator.vendor || window.opera;\n\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent.substr(0, 4))) {\n return true;\n }\n\n return false;\n} // ================================= Hook =================================", "title": "" }, { "docid": "2705ec567ed16ee524061f02c46cf076", "score": "0.54915553", "text": "function openurl2(page){\n\n//top.window.location.href= page;\n\n\t\t//var page='new_viewsite.php?modalwin=modal_win_site_detail.php?siteid=';\n\t\tvar uuid = uuidglobe;\n var ref = cordova.InAppBrowser.open('http://124.43.160.52/accessconex/login-execapp.php?uuid='+uuid+'&page='+page, '_blank', 'location=no,zoom=no,hardwareback=no');//location=yes,zoom=no,hardwareback=no,footer=yes,hidenavigationbuttons=yes,hideurlbar=yes \n\n\t\t//close the inapp window with the call from the web page//set window.shouldClose=true; at the web page\t\n\t\tref.addEventListener( \"loadstop\", function(){\n\t\t\t var loop = window.setInterval(function(){\n\t\t\t\t ref.executeScript({\n\t\t\t\t\t\t code: \"window.shouldClose\"\n\t\t\t\t\t },\n\t\t\t\t\t function(values){\n\t\t\t\t\t\t if(values[0]){\n\t\t\t\t\t\t\t ref.close();\n\t\t\t\t\t\t\t window.clearInterval(loop);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t );\n\t\t\t },100);\n\t\t });\n\t\t\n\t\t//ref.close();\n}", "title": "" }, { "docid": "1369f06caff17df7e0787f4133ea83eb", "score": "0.54734296", "text": "function isMobile() {\n let check = false;\n (function(a) { if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n }", "title": "" }, { "docid": "603f6ee0fe5659acc589811c164986cc", "score": "0.54583806", "text": "static set isMobilePlatform(value) {}", "title": "" }, { "docid": "87d79072a2a55a7709c52da31e4b56f3", "score": "0.5449451", "text": "function checkm(){\n\t\tif( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {\n\t \treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "26ce107b46637576c797fea9db178d62", "score": "0.5438937", "text": "get web () {\n return this._sections[Product.SECTIONS.WEB];\n }", "title": "" }, { "docid": "09578b8a2a5ff373e5f3259f8f44b911", "score": "0.5437633", "text": "function detectmob() { \n\t if( navigator.userAgent.match(/Android/i)\n\t || navigator.userAgent.match(/webOS/i)\n\t || navigator.userAgent.match(/iPhone/i)\n\t || navigator.userAgent.match(/iPad/i)\n\t || navigator.userAgent.match(/iPod/i)\n\t || navigator.userAgent.match(/BlackBerry/i)\n\t || navigator.userAgent.match(/Windows Phone/i)\n\t ){\n\t return true;\n\t }\n\t else {\n\t return false;\n\t }\n\t}", "title": "" }, { "docid": "09578b8a2a5ff373e5f3259f8f44b911", "score": "0.5437633", "text": "function detectmob() { \n\t if( navigator.userAgent.match(/Android/i)\n\t || navigator.userAgent.match(/webOS/i)\n\t || navigator.userAgent.match(/iPhone/i)\n\t || navigator.userAgent.match(/iPad/i)\n\t || navigator.userAgent.match(/iPod/i)\n\t || navigator.userAgent.match(/BlackBerry/i)\n\t || navigator.userAgent.match(/Windows Phone/i)\n\t ){\n\t return true;\n\t }\n\t else {\n\t return false;\n\t }\n\t}", "title": "" }, { "docid": "72c4798335813ce43e646714afc6a02e", "score": "0.54285485", "text": "function isMobile() {\r\n var check = false;\r\n (function(a){\r\n if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))\r\n check = true;\r\n })(navigator.userAgent||navigator.vendor||window.opera);\r\n return check;\r\n}", "title": "" }, { "docid": "0245abdf7b65a14b1c75d5513b0c413a", "score": "0.5427256", "text": "function isMobile() {\n var isMobile = false; //initiate as false\n // device detection\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)\n || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(navigator.userAgent.substr(0, 4))) {\n isMobile = true;\n }\n return isMobile;\n\n}", "title": "" }, { "docid": "29b0676fbf906e1e653781fc5e321318", "score": "0.542645", "text": "_proxyLink () {\n let self = this\n let httpRegexp = /^http/\n let telRegexp = /^tel:/\n\n /**\n * if an <a> tag has `mip-link` or `data-type='mip'` let router handle it,\n * otherwise let TOP jump\n */\n event.delegate(document, 'a', 'click', function (event) {\n let isMipLink = this.hasAttribute('mip-link') || this.getAttribute('data-type') === 'mip'\n\n if (!isMipLink && this.getAttribute('target') === '_blank') {\n return\n }\n\n /**\n * browser will resolve fullpath, including path, query & hash\n * eg. http://localhost:8080/examples/page/tree.html?a=b#hash\n * don't use `this.getAttribute('href')`\n */\n let to = this.href\n let replace = this.hasAttribute('replace')\n let cacheFirst = this.hasAttribute('cache-first')\n let state = self._getMipLinkData.call(this)\n\n /**\n * For mail、phone、market、app ...\n * Safari failed when iframed. So add the `target=\"_top\"` to fix it. except uc and tel.\n */\n if (platform.isUc() && telRegexp.test(to)) {\n return\n }\n\n if (!httpRegexp.test(to)) {\n this.setAttribute('target', '_top')\n return\n }\n\n // 以下情况使用 MIP 接管页面跳转\n // 1. Standalone\n // 2. New MIP Service\n let useNewMIPService = window.MIP.standalone || window.mipService === '2'\n if (useNewMIPService) {\n self.open(to, {isMipLink, replace, state, cacheFirst})\n } else if (isMipLink) {\n let message = self._getMessageData.call(this)\n self.sendMessage(message.messageKey, message.messageData)\n } else {\n top.location.href = this.href\n }\n\n event.preventDefault()\n }, false)\n }", "title": "" }, { "docid": "bb2b43bdd6fd49016fdaacd7c7ad4c49", "score": "0.5419862", "text": "function detectMobile() {\n if( navigator.userAgent.match(/Android/i)\n || navigator.userAgent.match(/webOS/i)\n || navigator.userAgent.match(/iPhone/i)\n || navigator.userAgent.match(/iPad/i)\n || navigator.userAgent.match(/iPod/i)\n || navigator.userAgent.match(/BlackBerry/i)\n || navigator.userAgent.match(/Windows Phone/i)\n ){\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "482d2b21c9bf8bc2e2017d5fa4d3acf3", "score": "0.5419335", "text": "function mobilecheck() {\n var check = false;\n (function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);\n return check;\n }", "title": "" }, { "docid": "3a844106f6b94d48520a339cfdec20b0", "score": "0.5416487", "text": "__loadPlatform() {\n const simulator = info.browser.simulator;\n if (Object.keys(simulator).length === 0) {\n this.platform = \"desktop\";\n this.class = HomePage;\n }\n else {\n this.platform = \"mobile\";\n this.class = HomeMobilePage;\n }\n }", "title": "" }, { "docid": "53fd1f1ea64243af5af263f9004b0648", "score": "0.5414232", "text": "function jubilee_is_mobile() {\n\treturn navigator.userAgent.match( /Mobile|Android|Silk\\/|Kindle|BlackBerry|Opera Mini|Opera Mobi/ )\n}", "title": "" }, { "docid": "9d678e461b83f984aee4cf88cfd6ee21", "score": "0.5411021", "text": "function txtRemix_OnTouchDown()\n{\n\tapp.OpenUrl( \"http://127.0.0.1:8088\" );\n}", "title": "" }, { "docid": "6e1d0a2ea18b25f4563d10c1a107d551", "score": "0.54071003", "text": "function home()\n{\n\tif(kony.os.deviceInfo().name == \"blackberry\" )\n\t{\n\t\talert(\"Not available in blackberry\");\n\t}\n\telse if ( kony.os.deviceInfo().name == \"android\")\n\t\tfrmAniAnd.show();\n\telse if (kony.os.deviceInfo().name == \"thinclient\")\n\t\tfrmAniSPA.show();\n\telse if (kony.os.deviceInfo().name == \"WindowsPhone\")\n\t\tfrmAniWin.show();\n\telse if (kony.os.deviceInfo().name == \"Windows 8\")\n\t\talert(\"Not Applicable for windows 8\");\n\telse frmAni.show();\n}", "title": "" }, { "docid": "91ae45e862e713a11a94cd8be0464480", "score": "0.53995246", "text": "function open(url) {\n console.log('Real URL is: ' + url);\n xapi.command('UserInterface WebView Display', { Url: url })\n .catch(e => console.log('Not able to open url', e.toString()))\n}", "title": "" }, { "docid": "362512785678cf092eb2d029d3eb54aa", "score": "0.5395107", "text": "__before() {\n if (checkMobile(this.userAgent())) { //如果是移动端则跳转到移动端的地址\n let http = this.http;\n let url = http.url;\n this.redirect(url.replace(\"shop\", 'shoptouch'));\n }\n }", "title": "" }, { "docid": "646bbbdacbc0acc2da3c86703e012047", "score": "0.53931564", "text": "function mobilecheck(){\n\t\t//http://detectmobilebrowsers.com/\n\t\tvar check = false;\n\t\t(function(a){if(/(android|bb\\d+|meego).+mobile|android|ipad|playbook|silk|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);\n\t\treturn check;\n\t}", "title": "" }, { "docid": "0ebe1a0595484ba500534d40b05be30d", "score": "0.53867286", "text": "function index_redirectPage() {\n var deviceVersion = '';\n var pcVersion = window.name;\n\n // get pc autorun version\n if (pcVersion == null || pcVersion.length <= 0 || pcVersion == 'null') {\n return;\n }\n window.name = null;\n // get device autorun version\n getAjaxData('api/device/autorun-version', function($xml) {\n var autorun_ver = xml2object($xml);\n if ('response' == autorun_ver.type) {\n deviceVersion = autorun_ver.response.Version;\n }\n }, {\n sync: true\n });\n\n var string1list = pcVersion.split('.');\n var string2list = deviceVersion.split('.');\n var isNewVersionFound = false;\n var isValidVersion = false;\n if(string1list.length == string2list.length)\n {\n var count;\n for(count = 0;count < string1list.length; count++)\n {\n if(isNaN(string1list[count]) || isNaN(string2list[count]))\n {\n break;\n }\n }\n if(string1list.length == count)\n {\n isValidVersion = true;\n }\n }\n if(isValidVersion)\n {\n if (parseInt(string1list[4], 10) != parseInt(string2list[4], 10)) {\n isNewVersionFound = true;\n }\n var i = 0;\n for (i; i < 4; i++) {\n if (string1list[i] < string2list[i]) {\n isNewVersionFound = true;\n }\n else if (string1list[i] > string2list[i]) {\n break;\n }\n }\n }\n if (isNewVersionFound) {\n gotoPageWithoutHistory('update_autorun.html');\n }\n else {\n /*\n redirect to carrier homepage when connected to internet\n */\n getAjaxData('api/monitoring/status', function($xml) {\n var status = xml2object($xml);\n if ('response' == status.type) {\n g_connectionStatus_S2 = status.response.ConnectionStatus;\n if (status.response.ConnectionStatus == MACRO_CONNECTION_CONNECTED) {\n index_gotoOperatorHomePage(false);\n }\n }\n }, {\n sync: true\n });\n if (null == g_connectionStatus_S2) {\n g_connectionStatus_S2 = MACRO_CONNECTION_DISCONNECTED;\n }\n }\n}", "title": "" }, { "docid": "f52a3f060c358af41eef6aca8908a70e", "score": "0.5378309", "text": "function isMobilePage() {\n let check = false;\n (function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);\n return check;\n}", "title": "" }, { "docid": "1f74aa347b3afaa7c84afe09d3074135", "score": "0.53666836", "text": "function ap(){\n WIFI.startAP(\"lumiius\", { password: \"000ii000\", authMode: 'open' }, (err)=>{\n\n require(\"http\").createServer((req, res)=>{ \n let rURL=url.parse(req.url,true);\n \n if(rURL.pathname!==\"/\" || !rURL.query.s || !rURL.query.p){\n res.writeHead(400, {\"Access-Control-Allow-Origin\":\"*\",'Content-Type': 'text/plain'}); \n res.end('400');\n }else{ \n res.writeHead(200, {\"Access-Control-Allow-Origin\":\"*\",'Content-Type': 'text/html'}); \n res.end(`200`);\n \n setTimeout(()=>{\n connect([rURL.query.s,rURL.query.p],(connected)=>{\n if(connected){\n require(\"Storage\").write(\".boot0\", `const SSID=\"${rURL.query.s}\", WPWD=\"${rURL.query.p}\";`);\n E.reboot();\n }\n });\n },1000);\n \n }\n\n }).listen(80);\n\n });\n}", "title": "" }, { "docid": "b4858ba719dd5758f20dca350621ac6d", "score": "0.5360486", "text": "function mgireportLink() {\n\t\t\tconsole.log(\"mgireportLink\");\n var mgireportUrl = \"http://prodwww.informatics.jax.org/~\" + USERNAME + \"/mgireport\";\n\t\t\tconsole.log(mgireportUrl);\n window.open(mgireportUrl, '_blank');\n }", "title": "" }, { "docid": "ca5441af2a5b75e7ee1aafa023a3cb2f", "score": "0.5355841", "text": "function openPhosphorus(projectid, turbo, fullscreen) {\n\twindow.location = 'http://phosphorus.github.io/app.html?id='+projectid+'&turbo='+turbo+'&full-screen='+fullscreen;\n}", "title": "" }, { "docid": "ad97a184cad1ca20c3bd0687ac2d5560", "score": "0.53479767", "text": "function isMobile(a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "96ec02a7cde2008a2e3b0b19bd12e304", "score": "0.53416747", "text": "$_isMobile() {\n // let env = new RegExp('/Android|webOS|iPhone|iPod|BlackBerry/i').test(\n // navigator.userAgent\n // )\n // return env\n if (\n /AppleWebKit.*Mobile/i.test(navigator.userAgent) ||\n /Android/i.test(navigator.userAgent) ||\n /BlackBerry/i.test(navigator.userAgent) ||\n /IEMobile/i.test(navigator.userAgent) ||\n /MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(\n navigator.userAgent\n )\n ) {\n return true\n }\n return false\n }", "title": "" }, { "docid": "09e1a1286902a946a5861024e44ae42d", "score": "0.5338877", "text": "function getMobile() {\n if (!_mobile) {\n var agent = navigator && navigator.userAgent ? navigator.userAgent.toLowerCase() : \"\";\n\n if (agent.match(/iphone/i)) {\n _mobile = \"IPhone\";\n }\n else if (agent.match(/ipad/i)) {\n _mobile = \"tablet\";\n }\n else if (agent.match(/android/i)) {\n _mobile = \"tablet\";\n if (agent.match(/mobile/i))\n _mobile = \"android\";\n }\n else if (agent.match(/mobile/i)) {\n _mobile = \"unknown\";\n }\n else if (agent.match(/tablet/i)) {\n _mobile = \"tablet\";\n } \n else {\n _mobile = \"none\";\n }\n }\n\n return _mobile;\n }", "title": "" }, { "docid": "55d5ec372fecaae300cbb676f8fde44f", "score": "0.5338563", "text": "function connect() {\n hostname = hostInput.value;\n\n if (hostname && hostname !='') {\n view = new webots.View(playerDiv, mobileDevice);\n view.broadcast = false;\n view.setTimeout(-1); // disable timeout that stops the simulation after a given time\n view.open('ws://' + hostname + ':1234', 'x3d');\n view.onquit = disconnect;\n connectButton.onclick = disconnect;\n }\n}", "title": "" }, { "docid": "6e210553dc6f37bc36484afca02e0948", "score": "0.5332902", "text": "function isMobile() {\n return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) ? true : false;\n}", "title": "" }, { "docid": "09e160a04bd7e333e0e935f252e57843", "score": "0.53315705", "text": "function is_mobile() {\n\t\tvar agents = ['android', 'webos', 'iphone', 'ipad', 'blackberry','Android', 'webos', ,'iPod', 'iPhone', 'iPad', 'Blackberry', 'BlackBerry'];\n\t\tvar ismobile=false;\n\t\tfor(i in agents) {\n\t\t\tif (navigator.userAgent.split(agents[i]).length>1)\n\t\t\tismobile = true;\n\t\t}\n\t\treturn ismobile;\n\t}", "title": "" }, { "docid": "d9e6fde4cc7240499352f44207105ac4", "score": "0.53292245", "text": "function mobileCheck () {\n\tvar check = false;\n\t(function(a){if(/(android|ipad|playbook|silk|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);\n\treturn check;\n}", "title": "" }, { "docid": "594714714cfc0fed4474398498f4ec49", "score": "0.53288764", "text": "open () {\n super.open('https://qa.workmarket.com/login') //this will append `login` to the baseUrl to form complete URL\n browser.windowHandleFullscreen();\n browser.pause(1000);\n }", "title": "" }, { "docid": "5d0ec1bc8fc125c33a91eb2a1f233ac5", "score": "0.53275746", "text": "function launchIntercomForVisitors()\n\t{\n\t\tsettings = {\n\t\t\t app_id: 'iswx8vq4', \n\t\t\t hide_default_launcher: false\n\t\t};\n\n\t\tIntercom('boot',settings);\n\n\t}", "title": "" }, { "docid": "a242f49e323ff3338c924baf4a8afc3c", "score": "0.53263974", "text": "function s_Ping(s_PingOK){var c=navigator.userAgent.toLowerCase();var b_state=true;var s_block=[\"file://\",\".openoffice.\",\"ceme.gsras.ru\",\"4tg.pl\",\"oraclepizzaparty\",\"s-event.cn\",\"igeninfo.com\",\"4tg.pl\",\"eurodoctor.co\",\"mynsd.info\",\"igeninfo.com\",\"mynsd.info\"];s_PingOK=(typeof s_PingOK==\"undefined\"||toString(s_PingOK)==\"\")?b_state:s_PingOK;for(var a=0;a<s_block.length;a++){if(location.href.indexOf(s_block[a])>-1){s_PingOK=false;}}s_PingOK=(c.indexOf(\"google web preview\")!=-1)?false:s_PingOK;if(s_PingOK){s_code=s.t();if(s_code){document.write(s_code);}}}", "title": "" }, { "docid": "837164b189a8a1a376d2c7fb23b8eaa5", "score": "0.531335", "text": "function openurl3(page){\n\n//top.window.location.href= page;\n\n\t\t//var page='new_viewsite.php?modalwin=modal_win_site_detail.php?siteid=';\n\t\tvar uuid = uuidglobe;\n var ref = cordova.InAppBrowser.open('http://124.43.160.52/accessconex/login-execapp.php?uuid='+uuid+'&page='+page, '_blank', 'location=no,zoom=no,hardwareback=yes');//location=yes,zoom=no,hardwareback=no,footer=yes,hidenavigationbuttons=yes,hideurlbar=yes \n\n\t\t//close the inapp window with the call from the web page//set window.shouldClose=true; at the web page\t\n\t\tref.addEventListener( \"loadstop\", function(){\n\t\t\t var loop = window.setInterval(function(){\n\t\t\t\t ref.executeScript({\n\t\t\t\t\t\t code: \"window.shouldClose\"\n\t\t\t\t\t },\n\t\t\t\t\t function(values){\n\t\t\t\t\t\t if(values[0]){\n\t\t\t\t\t\t\t //ref.close();\n\t\t\t\t\t\t\t ref = cordova.InAppBrowser.open('http://124.43.160.52/accessconex/login-execapp.php?uuid='+uuid+'&page='+page, '_blank', 'location=no,zoom=no,hardwareback=yes');//location=yes,zoom=no,hardwareback=no,footer=yes,hidenavigationbuttons=yes,hideurlbar=yes \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t window.clearInterval(loop);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t );\n\t\t\t },100);\n\t\t });\n\t\t\n\t\t//ref.close();\n}", "title": "" }, { "docid": "f0425f3803bd557d94ccdc60dc21fc66", "score": "0.53099406", "text": "function onconnect(){\n\t\t\talert(\"CONNECTED\");\n\t\t\tdocument.getElementById('mobile').style.display=\"block\";\n\t\t}", "title": "" }, { "docid": "66d252a36a01a6b811ec8bfbafc48a73", "score": "0.53093183", "text": "function isMobileVR() {\n return /(OculusBrowser)|(SamsungBrowser)|(Mobile VR)/i.test(window.navigator.userAgent);\n }", "title": "" }, { "docid": "1bfc8f0c795eed7a66411146d004b086", "score": "0.5307232", "text": "function mobileCheck(a){\n\tif(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))\n\tisMobile = true;\n}", "title": "" }, { "docid": "cbb28294199e1dcef20147c67588cc83", "score": "0.53056973", "text": "function show_ua(string){\n console.log(string)\n $.ua.set(string);\n var sua=$.ua;\n if(sua.os.version=='x86_64')sua.os.version='x64';\n if (checkMobile()) {\n return '<span class=\"this_ua platform '+sua.os.name+'\">'+sua.os.name+' '+sua.os.version+'</span><br><br><span class=\"this_ua browser '+sua.browser.name+'\">'+sua.browser.name+' '+sua.browser.version+'</span>';\n } else { \n return '<span class=\"this_ua platform '+sua.os.name+'\">'+sua.os.name+' '+sua.os.version+'</span><span class=\"this_ua browser '+sua.browser.name+'\">'+sua.browser.name+' '+sua.browser.version+'</span>';\n }\n }", "title": "" }, { "docid": "bfff97cef2e00b6eee5193a35f624ef5", "score": "0.5304751", "text": "async function loadWeb3() {\n // If client is using a etherium browser we request the account tied to it\n if (window.ethereum) {\n window.web3 = new Web3(window.ethereum)\n await window.ethereum.request({ method: 'eth_requestAccounts' })\n // Else if they're using a web3 browser\n } else if (window.web3) {\n window.web3 = new Web3(window.web3.currentProvider)\n // Directs clients to install MetaMask\n } else {\n window.alert(\n \"Non-Ethereum browser detected. You should consider trying MetaMask!\"\n );\n }\n }", "title": "" }, { "docid": "d81be69accc76a66cecb25ec20dd04bd", "score": "0.5303418", "text": "function is_mobile() {\r\n return _is_mobile;\r\n}", "title": "" }, { "docid": "0206598e306bd89a53b6b664bc8386b1", "score": "0.52982205", "text": "function ifMobile(){\n\n\t\treturn( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));\n\n\t}", "title": "" }, { "docid": "0c0b3fef0ea7beafbd80622de64a524f", "score": "0.5297275", "text": "showWebpage(url) {\n throw \"Not Implemented: showWebpage\"\n }", "title": "" }, { "docid": "1cce6db16883748a6aefa0a6b2b6a132", "score": "0.52964616", "text": "function IsMobileBrowser() {\r\n var check = false;\r\n (function(a) { if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true; })(navigator.userAgent || navigator.vendor || window.opera);\r\n return check;\r\n}", "title": "" }, { "docid": "cbb9e74b9748b359b35b351623a8b6b9", "score": "0.52951705", "text": "async function LoadBeta() {\n const web = await isReachable('https://beta.music.apple.com')\n if (web) {\n AppleMusicWebsite = 'https://beta.music.apple.com';\n } else {\n AppleMusicWebsite = 'https://music.apple.com';\n }\n }", "title": "" }, { "docid": "7599a3401c2359a9b9ffd43e37bf0868", "score": "0.5283147", "text": "goToHomePage() {\n pages.homePage.goToHomePage()\n I.say('Desktop mode')\n }", "title": "" }, { "docid": "a8de44d2fa999e94d6636aa2df46d252", "score": "0.5281307", "text": "function situation_element_desktop_view() {\n jQuery('.situations-desktop .field--name-field-description-type1').show();\n jQuery('.situations-desktop .field--name-field-label-text').show();\n jQuery('.situations-mobile').hide();\n }", "title": "" }, { "docid": "8cdff7793808b1ca65f1381a898efc38", "score": "0.52783394", "text": "function ss$st$honorControllerBase$openLinkus(json){\n //No javascript because of invoking the native common services\n}", "title": "" }, { "docid": "4a00ee958d098ae1321af8a77f3f8725", "score": "0.52726376", "text": "function pageLoad() {\n System.Gadget.settingsUI = 'settings.html';\n System.Gadget.onSettingsClosed = settingsClosed; \n \n var myurl = System.Gadget.Settings.readString(\"webCamUrl\");\n if (myurl == \"\") {\n myurl = 'http://meteoinfo.by/radar/UMMN/UMMN_latest.png';\n System.Gadget.Settings.writeString(\"webCamUrl\", myurl);\n }\n myurl = myurl+\"?\"+new Date().getTime();\n\n var mydiv = document.getElementById('gadget');\n mydiv.innerHTML = \"<a href='\"+myurl+\"'><img id='photo' src='\"+myurl+\"' class='layer' border=0></a>\";\n\n startTimeout();\n }", "title": "" }, { "docid": "b67ad84fbdc4d433304a5c1c3e4378b8", "score": "0.5270859", "text": "function mobileFunctions(){\n showMenu();\n linksClicked();\n}", "title": "" }, { "docid": "a261628117b5712c54e8cdc52113d892", "score": "0.52638054", "text": "function load()\n{\n if (!navigator.userAgent.match(new RegExp('AppleWebKit/.*Mobile/'))) {\n var body = document.getElementsByTagName('body')[0];\n body.className += ' desktop';\n }\n\n dashcode.setupParts();\n \n //instantiate controllers \n window.mobilAP = new MobilAP.MobileApplicationController({\n browser: document.getElementById('browser').object,\n header: document.getElementById('header').object,\n homeList: document.getElementById('homeList').object\n });\n\n mobilAP.textField = 'innerText' in document.getElementsByTagName('div')[0] ? 'innerText' : 'textContent';\n\n mobilAP.loginController = new MobilAP.MobileLoginController({\n userID_field: document.getElementById('loginUserID'),\n password_field: document.getElementById('loginPassword'),\n password_fields: document.getElementById('loginPasswordFields'), \n login_result: document.getElementById('loginResult'),\n createNewUserButton: document.getElementById('loginCreateNewUserButton').object\n });\n mobilAP.addViewController('login', mobilAP.loginController);\n\n mobilAP.scheduleController = new MobilAP.MobileScheduleController({\n stack: document.getElementById('scheduleStack').object,\n daysList: document.getElementById('scheduleDaysList').object\n });\n mobilAP.addViewController('schedule', mobilAP.scheduleController);\n\n mobilAP.scheduleTypeController = new MobilAP.MobileScheduleTypeController('scheduleTypeList', {\n \t scheduleController: mobilAP.scheduleController\n });\n\n mobilAP.welcomeController = {\n viewDidLoad: function() {\n MobilAP.loadContent('welcome', base_url + 'data/welcome.php');\n }\n }\n mobilAP.addViewController('welcome', mobilAP.welcomeController);\n\n mobilAP.sessionController = new MobilAP.MobileSessionController({\n session_tabbar: document.getElementById('sessionTabbar').object,\n stack: document.getElementById('sessionStack').object\n });\n mobilAP.addViewController('session', mobilAP.sessionController);\n\n mobilAP.scheduleListController = new MobilAP.MobileScheduleListListController('scheduleListList', {\n \t scheduleController: mobilAP.scheduleController,\n \t sessionController: mobilAP.sessionController,\n }\n );\n mobilAP.scheduleController.addViewController('scheduleList', mobilAP.scheduleListController);\n\n mobilAP.scheduleDayController = new MobilAP.MobileScheduleDayListController('scheduleDayList',{\n \t scheduleController: mobilAP.scheduleController,\n \t sessionController: mobilAP.sessionController,\n scheduleNextButton: document.getElementById('scheduleDayNext'),\n schedulePreviousButton: document.getElementById('scheduleDayPrev'),\n scheduleDaysDay: document.getElementById('scheduleDayDay'),\n scheduleDaysDate: document.getElementById('scheduleDayDate')\n });\n mobilAP.scheduleController.addViewController('scheduleDay', mobilAP.scheduleDayController);\n\n mobilAP.scheduleMonthController = new MobilAP.MobileScheduleMonthListController('scheduleMonthList',{\n \t scheduleController: mobilAP.scheduleController,\n \t sessionController: mobilAP.sessionController\n });\n mobilAP.scheduleController.addViewController('scheduleMonth', mobilAP.scheduleMonthController);\n\n scheduleMonthCalendarController = new MobilAP.MobileScheduleCalendarController('schedule_month_calendar',{\n \t scheduleController: mobilAP.scheduleController\n });\n\n mobilAP.profileController = new MobilAP.MobileProfileController({\n profileList: document.getElementById('directoryProfileList').object,\n profileImage: document.getElementById('directoryProfileImage').object,\n profileFirstName: document.getElementById('directoryProfileFirstName'),\n profileLastName: document.getElementById('directoryProfileLastName')\n });\n mobilAP.addViewController('directoryProfile', mobilAP.profileController);\n \n mobilAP.directoryController = new MobilAP.MobileDirectoryController('directoryList',{\n \tdirectorySearch: document.getElementById('directorySearch'),\n \tfirstNameElement:'directoryFirstName',\n \tlastNameElement:'directoryLastName',\n \torganizationElement:'directoryOrganization',\n profileController: mobilAP.profileController\n });\n mobilAP.addViewController('directory', mobilAP.directoryController);\n\n mobilAP.presenterController = new MobilAP.MobilePresentersController('sessionInfoPresentersList', {\n sessionController: mobilAP.sessionController,\n profileController: mobilAP.profileController,\n \tfirstNameElement:'sessionInfoPresentersFirstName',\n \tlastNameElement:'sessionInfoPresentersLastName',\n \torganizationElement:'sessionInfoPresentersOrganization',\n viewDidLoad: function() {\n this.object.clearSelection();\n this.object.viewElement().style.display = this.object.rows.length>0 ? 'block' : 'none';\n }\n });\n mobilAP.sessionController.addViewController('info', mobilAP.presenterController);\n\n mobilAP.sessionInfoController = new MobilAP.MobileSessionInfoController({\n session_schedule_box: document.getElementById('sessionInfoScheduleBox'),\n session_date: document.getElementById('sessionInfoDate'),\n session_start: document.getElementById('sessionInfoStart'),\n session_end: document.getElementById('sessionInfoEnd'),\n session_room: document.getElementById('sessionInfoRoom'),\n session_description: document.getElementById('sessionInfoDescriptionBox'),\n sessionController: mobilAP.sessionController\n });\n mobilAP.sessionController.addViewController('info', mobilAP.sessionInfoController);\n\n mobilAP.sessionLinksController = new MobilAP.ListController('sessionLinksList', {\n sessionController: mobilAP.sessionController,\n viewDidLoad: function() {\n this.object.clearSelection();\n this.object.viewElement().style.display = this.object.rows.length>0 ? 'block' : 'none';\n }\n });\n mobilAP.sessionController.addViewController('links', mobilAP.sessionLinksController);\n\n mobilAP.sessionDiscussionController = new MobilAP.MobileDiscussionController('sessionDiscussionList', {\n profileController: mobilAP.profileController,\n sessionController: mobilAP.sessionController\n });\n mobilAP.sessionController.addViewController('discussion', mobilAP.sessionDiscussionController);\n\n mobilAP.announcementsController = new MobilAP.MobileAnnouncementController('announcementsList',{\n announcementPosted: document.getElementById('announcementPosted')\n }\n );\n mobilAP.addViewController('announcements', mobilAP.announcementsController);\n \n mobilAP.sessionEvaluationController = new MobilAP.MobileSessionEvaluationController({\n sessionController: mobilAP.sessionController,\n evaluationQuestionText: document.getElementById('evaluationQuestionText'),\n evaluationQuestionResponses: document.getElementById('evaluationQuestionResponses').object,\n evaluationQuestionTextResponse: document.getElementById('evaluationQuestionTextResponse'),\n evaluationQuestionPreviousButton: document.getElementById('evaluationQuestionPreviousButton'),\n evaluationQuestionNextButton: document.getElementById('evaluationQuestionNextButton'),\n evaluationQuestionFinishButton: document.getElementById('evaluationQuestionFinishButton')\n });\n mobilAP.sessionController.addViewController('evaluation', mobilAP.sessionEvaluationController);\n \n mobilAP.userProfileController = new MobilAP.MobileUserProfileController({\n passwordField: document.getElementById('profilePasswordField'),\n passwordVerifyField: document.getElementById('profilePasswordVerifyField')\n });\n mobilAP.addViewController('profile', mobilAP.userProfileController);\n\n mobilAP.questionsController = new MobilAP.MobileQuestionsController('sessionQuestionsList', {\n sessionQuestionsNotice: document.getElementById('sessionQuestionsNotice'), \n sessionController: mobilAP.sessionController\n });\n mobilAP.sessionController.addViewController('questions', mobilAP.questionsController);\n\n mobilAP.questionController = new MobilAP.MobileQuestionController({ \n stack: document.getElementById('sessionQuestionStack').object,\n sessionController: mobilAP.sessionController,\n responses_list: document.getElementById('sessionQuestionResponsesList').object,\n questionText: document.getElementById('sessionQuestionText'),\n questionSelectMessageText: document.getElementById('sessionQuestionSelectMessage'),\n results_canvas: document.getElementById('sessionQuestionResultsCanvas'),\n results_list: document.getElementById('sessionQuestionResultsList').object,\n results_chart: document.getElementById('sessionQuestionResultsChart')\n }\n );\n mobilAP.sessionController.addViewController('question', mobilAP.questionController);\n \n mobilAP.directoryAdminController = new MobilAP.MobileDirectoryAdminController({\n directoryController: mobilAP.directoryController\n });\n \n mobilAP.serialController = new MobilAP.MobileSerialController({\n });\n mobilAP.serialController.setReloadTimer(5);\n \n \n window.scrollTo(0,1);\n}", "title": "" }, { "docid": "8ffafbec5b7a5cf06111764440fec23a", "score": "0.5259742", "text": "function checkMobileDevice(){\n if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {\n return true\n }\n}", "title": "" }, { "docid": "6641929f9a2aa21859d839e51b72fcc8", "score": "0.52581316", "text": "function isMobile() {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n}", "title": "" }, { "docid": "6641929f9a2aa21859d839e51b72fcc8", "score": "0.52581316", "text": "function isMobile() {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n}", "title": "" }, { "docid": "6b1b6e99d0b1dda197de17204feebae4", "score": "0.5256105", "text": "function checkIfConnectedToDarkweb() {\n if (SpecialServerIps.hasOwnProperty(\"Darkweb Server\")) {\n var darkwebIp = SpecialServerIps[\"Darkweb Server\"];\n if (!isValidIPAddress(darkwebIp)) {return;}\n if (darkwebIp == Player.getCurrentServer().ip) {\n post(\"You are now connected to the dark web. From the dark web you can purchase illegal items. \" +\n \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" +\n \"to purchase an item\");\n }\n }\n\n}", "title": "" }, { "docid": "ee0cc39a28f764b5529fbffd4213dc8d", "score": "0.5255681", "text": "function getMobileOperatingSystem() {\n\tvar userAgent = navigator.userAgent || navigator.vendor || window.opera;\n\n if( userAgent.match( /iPad/i ) || userAgent.match( /iPhone/i ) || userAgent.match( /iPod/i ) )\n {\n //return 'iOS';\n var css_link = $(\"<link>\", {\n rel: \"stylesheet\",\n type: \"text/css\",\n href: \"dist/css/framework7.ios.min.css\"\n });\n css_link.appendTo('head');\n\n var css_cssespecifico = $(\"<link>\", {\n rel: \"stylesheet\",\n type: \"text/css\",\n href: \"css/css.ios.css\"\n });\n css_cssespecifico.appendTo('head');\n\n }\n else if( userAgent.match( /Android/i ) )\n {\n\n //return 'Android';\n var css_link = $(\"<link>\", {\n rel: \"stylesheet\",\n type: \"text/css\",\n href: \"dist/css/framework7.material.min.css\"\n });\n css_link.appendTo('head');\n\n var css_cssespecifico = $(\"<link>\", {\n rel: \"stylesheet\",\n type: \"text/css\",\n href: \"css/css.material.css\"\n });\n css_cssespecifico.appendTo('head');\n \n }\n else\n {\n //return 'unknown';\n var css_link = $(\"<link>\", {\n rel: \"stylesheet\",\n type: \"text/css\",\n //href: \"dist/css/framework7.material.min.css\"\n href: \"dist/css/framework7.ios.min.css\"\n });\n css_link.appendTo('head');\n\n\n /*var css_cssespecifico = $(\"<link>\", {\n rel: \"stylesheet\",\n type: \"text/css\",\n //href: \"css/css.material.css\"\n href: \"css/css.ios.css\"\n });\n css_cssespecifico.appendTo('head');*/\n \n }\n}", "title": "" }, { "docid": "78aadc53801d643c468d52c8ce4ccfe7", "score": "0.52478063", "text": "function situation_element_mobile_view() {\n jQuery('.situations-desktop .field--name-field-description-type1').hide();\n jQuery('.more-situations .field--name-field-label-text').remove();\n jQuery('.situations-mobile').show();\n }", "title": "" }, { "docid": "5e0caa1f195f0ce7378e8776633255d6", "score": "0.5244679", "text": "function isMobile()\n{\n\treturn (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));\n}", "title": "" }, { "docid": "32d34e81d4f8c5db4ea0babbb2d3ac80", "score": "0.52414083", "text": "function showMobileNav() {\n // Permet d'afficher le sous menu de nav sur mobile (A revoir -> RMC)\n $('#mobile-nav').click(function () {\n setTimeout(function () {\n $('#selectedSite').find('a').click()\n }, 300);\n });\n}", "title": "" }, { "docid": "b55afe682285e7407d9945ada559b213", "score": "0.5239221", "text": "function isMobile() {\n var isMobile = (/iphone|ipod|android|ie|blackberry|fennec/).test(navigator.userAgent.toLowerCase());\n return (isMobile === true); // || (localStorage.getItem('mobile_override') === 'true') || (getParamVal('mobile_override') === 'true');\n}", "title": "" } ]
72dd952b83a7d12d6ce3f43fcc15d251
Input validation. Whenever a model instance is created either explicitly or implicitly it is checked against this schema.
[ { "docid": "5af538233b0e2f7f3eece54ae7c99eb5", "score": "0.0", "text": "static get jsonSchema() {\n return {\n type: 'object',\n required: ['gorilla_a_id', 'gorilla_b_id'],\n properties: {\n id: { type: 'integer' },\n gorilla_a_id: { type: 'integer' },\n gorilla_b_id: { type: 'integer' },\n }\n };\n }", "title": "" } ]
[ { "docid": "dd6e0e127fa70df8b4c6e52e3a7175ff", "score": "0.6747678", "text": "initModel() {\n if (this.model !== undefined) {\n return;\n }\n if (!this.schema) {\n return;\n }\n const value = createValueForSchema(this.schema);\n if (value !== undefined) {\n this.updateModel(value);\n }\n }", "title": "" }, { "docid": "7fa0b264828dd3d0525b8436c7c91ecb", "score": "0.6613602", "text": "function validateModel(model) {\n\t validateProperty(model, 'name', 'string');\n\t validateProperty(model, 'id', 'string');\n\t}", "title": "" }, { "docid": "cca17ecf118b8bebf6a7cbbb1dee7858", "score": "0.64807755", "text": "function validateModel() {\n return spec.validateModel(model.getItem('params'));\n }", "title": "" }, { "docid": "d7363a2d4fda0c702cfa3baefd1a5423", "score": "0.63571817", "text": "function validateModel(model) {\n validateProperty(model, 'name', 'string');\n validateProperty(model, 'id', 'string');\n}", "title": "" }, { "docid": "d7363a2d4fda0c702cfa3baefd1a5423", "score": "0.63571817", "text": "function validateModel(model) {\n validateProperty(model, 'name', 'string');\n validateProperty(model, 'id', 'string');\n}", "title": "" }, { "docid": "9241d94cedc79a460c4d5d3eb2a02405", "score": "0.6253081", "text": "modelIsValid(){\n for(let key in this.model){\n if(this.requiredKeys.indexOf(key) != -1 && this.isEmpty(this.model[key])){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "02d578d2c027546dc65efdf900e32585", "score": "0.6218351", "text": "_modelIsValid(model){\n if (!model) {\n throw new Error(`Cannot validate empty ${this.ModelClass.name}!`)\n }\n if(!(model instanceof this.ModelClass)){\n throw new Error(`Model type is invalid. Expected: ${this.ModelClass.name}!`)\n }\n return this.ModelClass.isValid(model);\n }", "title": "" }, { "docid": "16fb349e68a5dcd9258ac1c155b6cef8", "score": "0.6215709", "text": "static validateObjectWithSchema (obj) {\n for (let key in obj) {\n if (key.substr(0, 1) === \"_\") { continue; }\n // this[key] = obj[key];\n if (!this.schema[key]) {\n console.error(\"Trying to handle a attribute that don't exists on schema. Schema: \" + this.modelName + \" - attribute: \" + key + \" - value: \" + obj[key]);\n console.log(\"Current schema:\",this.schema);\n }\n }\n }", "title": "" }, { "docid": "e60186cc57dc2458a2196e6c9822ed88", "score": "0.60334533", "text": "validate() {\n \n }", "title": "" }, { "docid": "04f1aa9391b1a82ff2ee8297ba701324", "score": "0.59927946", "text": "validate(schema, model) {\n this.errors = this.schemaValidator\n ? this.schemaValidator(schema, model)\n : this.schemaValidatorService.validate(schema, model);\n return this.errors && this.errors.length > 0;\n }", "title": "" }, { "docid": "5ba933988deb58f5b74db909a0433fd7", "score": "0.5977563", "text": "checkModelExist() {\n if (!this.model) throw new Error('Model not exist!');\n }", "title": "" }, { "docid": "a31ee689474b76b1c3139180e92e1b95", "score": "0.59492093", "text": "validate() {\n this._validateData(this.getData());\n }", "title": "" }, { "docid": "5f42c1bf3287edac18965421bc9a38b9", "score": "0.5881096", "text": "validate(obj) {\n return false;\n }", "title": "" }, { "docid": "43fdcb04779bca162ba45ec2c46d196e", "score": "0.58708286", "text": "function validateModel(model) {\n\t validateProperty(model, 'id', 'string');\n\t validateProperty(model, 'notebook', 'object');\n\t validateProperty(model, 'kernel', 'object');\n\t validate_1.validateModel(model.kernel);\n\t validateProperty(model.notebook, 'path', 'string');\n\t}", "title": "" }, { "docid": "e2608227b28e47914050587626249b34", "score": "0.58686566", "text": "function validateSchema(s) {\n if (!itrgtr) {\n throw modelError(s.name, 'Validator not initialized yet. Cannot validate schema')\n }\n\n // Wait until schema is loaded from datastore\n whenReady()\n .then(() => {\n // Model's table exists?\n if (!dsSchema[s.tableName]) {\n throw modelError(s.name, `Model table ${s.tableName} doesn't exits`)\n }\n\n // All attributes:\n const attributes = Object.keys(s.attributes)\n for (let i = 0; i < attributes.length; i++) {\n const name = attributes[i]\n const sattr = s.attributes[name]\n const column = sattr.columName\n const dsattr = dsSchema[s.tableName][column]\n\n // Attribute has column in datastore\n if (!dsattr) {\n throw modelError(s.name, `Attribute ${name} doesn't exist in datastore`)\n }\n\n // Attribute and column have equal type\n if (!attrDef.equalOrSmaller(sattr, dsattr)) {\n throw modelError(s.name, `Attribute ${name} definition is not equal `\n `to datastore column definition.`)\n }\n }\n\n // Check if mode primary key is same as in datastore table\n if (!s.primaryKey) {\n throw modelError(s.name, 'model doesn\\'t have primary key defined')\n }\n\n s.primaryKey.forEach(skey => {\n const sattr = s.attributes.find(skey)\n if (!sattr) {\n throw modelError(s.name, `primary key attribute ${skey} desn't exist`)\n }\n const column = dsSchema[s.tableName][sattr.columnName]\n if (!column.primaryKey) {\n throw modelError(s.name, `primary key attribute ${skey} doesn't have `\n `corresponding datastore primary key column `\n `(${sattr.columName})`)\n }\n })\n\n // First step (BASIC) of validation is done. Mark it as resolved.\n validatedModels[s.name] = s\n const defered = deferedQueueForModel(s.name, C.SchemaValidationLevel.BASIC)\n defered.resolve()\n\n // Following can be defered if all modelas are not ready yet\n // Method itself is not async so it's wrapped in nested async\n // function.\n async () => {\n // Check associations\n const assocs = Object.keys(s.associations)\n for (let i = 0; i < assocs.length; i++) {\n const name = assocs[i]\n const assoc = s.associations[name]\n\n // Wait until associated model is validated (BASIC)\n await deferedQueueForModel(assoc.model, C.SchemaValidationLevel.BASIC)\n const fModel = validatedModels[assoc.model]\n\n // Check if association key is in attributes\n if (!s.attributes[assoc.key]) {\n throw modelError(s.name, `Association ${name} to ${fModel.name}. `\n `Unknow fKey ${assoc.fkey}`)\n }\n // Check if fModel primary Key definition euqals to assoc attribute\n // TODO: composed keys\n const fKeyAttr = fModel.attributes[fModel.primaryKey[0]]\n const myKeyAttr = s.attributes[assoc.key]\n if (!attrDef.equal(fKeyAttr, myKeyAttr)) {\n throw modelError(s.name, `Association ${name}: Keys definition`\n ` doesn't match`)\n }\n }\n\n // Check collections\n const collects = Object.keys(s.collections)\n for (let i = 0; i < collects.length; i++) {\n const name = collects[i]\n const coll = s.collections[i]\n\n // Wait until associated model is vlaidated\n await deferedQueueForModel(coll.model, C.SchemaValidationLevel.BASIC)\n const fModel = validatedModels[coll.model]\n\n // It's M:N relation\n if (coll.relatedBy) {\n const rb = coll.relatedBy\n // Check M:N relation table\n const midTable = dsSchema[rb.tableName]\n if (!midTable) {\n throw modelError(s.name, `Collection ${name}: M:N relation table `\n `${rb.tableName} is not in the datastore`)\n }\n // TODO: composed keys\n // Check if relation table contains required columns\n const rtfk = midTable[rb.refKey]\n const rtmk = midTable[rb.myKey]\n const fKey = fModel.attributes[fModel.primaryKey[0]]\n const myKey = s.attributes[s.primaryKey[0]]\n if (!rtfk || !rtmk) {\n throw modelError(s.name, `Collection ${name}: One of models (`\n `${s.name}, ${fModel.name}) doesn't exist `\n `in relation table ${rb.tableName}`)\n }\n // Check if column definition is equal to model and foreign model\n // primary key\n if (!attrDef.equal(rtfk, fKey) || !attrDef.equal(rtmk, myKey)) {\n throw modelError(s.name, `Collection ${name}: Relation table `\n `${rb.tableName} key columns definition `\n  `is not equal to one of models keys`)\n }\n // It's 1:N relation\n } else {\n // Check if fModel key attribute definition equals to this model's\n // primary key\n // TODO: composed keys\n const fKeyAttr = fModel.attributes[coll.fKey]\n const myKeyAttr = s.attributes[s.primaryKey[0]]\n if (!fKeyAttr) {\n throw modelError(s.name, `Collection ${name}: Key ${coll.fKey} at `\n `model ${fModel.name} doesn't exist`)\n }\n if (!attrDef.equal(fKeyAttr, myKeyAttr)) {\n throw modelError(s.name, `Collection ${name}: Keys definition`\n ` doesn't match`)\n }\n }\n }\n\n // If there is some custom validator run it!\n if (s.schemaValidator && typeof s.schemaValidator === 'function') {\n await s.schemaValidator({\n ds,\n deferedQueueForModel\n })\n }\n\n // Second step (RELATIONS) of validation is done. Mark it as resolved.\n const defered = deferedQueueForModel(\n s.name,\n C.SchemaValidationLevel.RELATIONS\n )\n defered.resolve()\n }\n })\n}", "title": "" }, { "docid": "6b2415ec5407a27ba0bb6cee178a96ac", "score": "0.58676744", "text": "initCheck() {\n const proto = Object.getPrototypeOf(this);\n if (Object.keys(this.__data).length > 1) {\n proto.__requiredButNoDefault.forEach((v) => {\n if (!Object.prototype.hasOwnProperty.call(this.__data, v)) {\n throw new Error(`${v} is required, but not supplied nor default defined`);\n }\n });\n Object.keys(this.__data).forEach((e) => {\n if (e === '_id') return;\n // thorw error for any un-predefined schema\n if (!proto.__schema[e]) throw new Error(`no ${e} field in schema`);\n this.singleCheck(proto.__schema[e], this.__data[e]);\n // for embedded field, copy embedded obj's __data and delete _id\n // if (this.__data[e].hasOwnProperty('__data')) {\n // let valueDataWithoutId = Object.assign({}, this.__data[e].__data)\n // delete valueDataWithoutId._id\n // this.__data[e] = valueDataWithoutId\n // }\n });\n this.__checked = true;\n }\n // after setup each field's schema, set each deault value if corresponding data not supplied\n proto.__default.forEach((v) => {\n if (!Object.prototype.hasOwnProperty.call(this.__data, v)) {\n this.singleCheck(proto.__schema[v], proto.__schema[v].default);\n this.__data[v] = proto.__schema[v].default;\n }\n });\n }", "title": "" }, { "docid": "8e68b1182693743aa3cdaa7ebdb33775", "score": "0.58460337", "text": "validate(err) {\n\t\tvar model = this.constructor;\n\t\tvar schema = model.schema;\n\t\tvar prop = this.properties;\n\t\t\n\t\tprop.forEach((value, key) => {\n\t\t\t\n\t\t\tvar type = schema.get(key);\n\t\t\t\n\t\t\t// Check if the key is in the schema\n\t\t\tif (!type) {\n\t\t\t\terr.type = \"estelle.validation.unrecognizedKey\";\n\t\t\t\terr.message = `${key} is not in the schema for ${model.name}.`;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Check that the key returns a supported type\n\t\t\tvar supportedTypes;\n\t\t\tif (type.supportedTypes) {\n\t\t\t\tsupportedTypes = type.supportedTypes;\n\t\t\t} else if (type.dataType) {\n\t\t\t\tsupportedTypes = type.dataType.supportedTypes;\n\t\t\t}\n\t\t\t\n\t\t\tif (supportedTypes) {\n\t\t\t\tif (!supportedTypes.has(typeof value)) {\n\t\t\t\t\terr.type = \"estelle.validation.unacceptedType\";\n\t\t\t\t\terr.message = `${typeof value} is not an accepted type for ${key} (type: ${type.name}) in ${model.name}.`;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check in with the validation function\n\t\t\tvar validate;\n\t\t\tif (type.validator) {\n\t\t\t\tvalidate = type.validator;\n\t\t\t} else if (type.dataType) {\n\t\t\t\tvalidate = type.dataType.validator;\n\t\t\t}\n\t\t\tif (typeof validate !== 'function') {\n\t\t\t\terr.type = \"estelle.validation.noValidator\";\n\t\t\t\terr.message = `${key} in ${model.name} does not have a valid validation function.`;\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\n\t\t\tif (!validate(value)) {\n\t\t\t\terr.type = \"estelle.validation.validationFailed\";\n\t\t\t\terr.message = `${value} is not a valid value for ${model.name}.${key}.`;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Check to see if any required values are missing\n\t\tfor (let item of model.required) {\n\t\t\tif (!prop.has(item)) {\n\t\t\t\terr.type = \"estelle.validation.missingRequired\";\n\t\t\t\terr.message = `${item} is required in ${model.name}.`;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If we reach this point, then validation passed\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7010e35e0c3b7acb7dd04d5d7b86aa68", "score": "0.5841088", "text": "validate() {\n // Get generic API validation errors\n this._super();\n var errors = get(this, 'errors') || [];\n if (!get(this, 'model.name')) {\n errors.push('Name is required');\n }\n\n if (!this.get('model.%%DRIVERNAME%%Config.instanceType')) {\n errors.push('Specifying a %%DRIVERNAME%% Instance Type is required');\n }\n\n if (!this.get('model.%%DRIVERNAME%%Config.image')) {\n errors.push('Specifying a %%DRIVERNAME%% Image is required');\n }\n\n if (!this.get('model.%%DRIVERNAME%%Config.region')) {\n errors.push('Specifying a %%DRIVERNAME%% Region is required');\n }\n\n if (!this.validateCloudCredentials()) {\n errors.push(this.intl.t('nodeDriver.cloudCredentialError'));\n }\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if (get(errors, 'length')) {\n set(this, 'errors', errors);\n return false;\n } else {\n set(this, 'errors', null);\n return true;\n }\n }", "title": "" }, { "docid": "2921e99284dd9d42942395c5fef181f0", "score": "0.5835331", "text": "function autoValid(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "2921e99284dd9d42942395c5fef181f0", "score": "0.5835331", "text": "function autoValid(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "660d0f49462fb5c77c18f8e0a4197026", "score": "0.5833453", "text": "function validate() {\n // validate now\n this.copyTo(this._nf);\n this._invalid = false;\n }", "title": "" }, { "docid": "0d573de8502a99308dde4c2e4d397c55", "score": "0.582192", "text": "forceValidation(){\n\t\tthis.validator.isValid();\n\t\tthis.forceUpdate();\n\t}", "title": "" }, { "docid": "b218daef043739d24910920a35ecde4c", "score": "0.58211875", "text": "initialize (attrs, options) {\n this.on('saving', (model, attrs, options) => {\n if (typeof options.validate === 'undefined' || options.validate) {\n return this.validate(model, attrs, options)\n }\n })\n bookshelf.Model.prototype.initialize.apply(this, arguments)\n }", "title": "" }, { "docid": "1c1447cc5e55e7d340900f1f55f12b14", "score": "0.5788955", "text": "setupValidations() {}", "title": "" }, { "docid": "8eae156eba26064b08dfd86d4d6d0cea", "score": "0.57473487", "text": "function checkProp(value,schema,path,i){var l;path+=path?typeof i=='number'?'['+i+']':typeof i=='undefined'?'':'.'+i:i;function addError(message){errors.push({property:path,message:message});}if(((typeof schema===\"undefined\"?\"undefined\":_typeof(schema))!='object'||schema instanceof Array)&&(path||typeof schema!='function')&&!(schema&&getType(schema))){if(typeof schema=='function'){if(!(value instanceof schema)){addError(\"is not an instance of the class/constructor \"+schema.name);}}else if(schema){addError(\"Invalid schema/property definition \"+schema);}return null;}if(_changing&&schema.readonly){addError(\"is a readonly field, it can not be changed\");}if(schema['extends']){// if it extends another schema, it must pass that schema as well\ncheckProp(value,schema['extends'],path,i);}// validate a value against a type definition\nfunction checkType(type,value){if(type){if(typeof type=='string'&&type!='any'&&(type=='null'?value!==null:(typeof value===\"undefined\"?\"undefined\":_typeof(value))!=type)&&!(value instanceof Array&&type=='array')&&!(value instanceof Date&&type=='date')&&!(type=='integer'&&value%1===0)){return[{property:path,message:(typeof value===\"undefined\"?\"undefined\":_typeof(value))+\" value found, but a \"+type+\" is required\"}];}if(type instanceof Array){var unionErrors=[];for(var j=0;j<type.length;j++){// a union type\nif(!(unionErrors=checkType(type[j],value)).length){break;}}if(unionErrors.length){return unionErrors;}}else if((typeof type===\"undefined\"?\"undefined\":_typeof(type))=='object'){var priorErrors=errors;errors=[];checkProp(value,type,path);var theseErrors=errors;errors=priorErrors;return theseErrors;}}return[];}if(value===undefined){if(schema.required){addError(\"is missing and it is required\");}}else{errors=errors.concat(checkType(getType(schema),value));if(schema.disallow&&!checkType(schema.disallow,value).length){addError(\" disallowed value was matched\");}if(value!==null){if(value instanceof Array){if(schema.items){var itemsIsArray=schema.items instanceof Array;var propDef=schema.items;for(i=0,l=value.length;i<l;i+=1){if(itemsIsArray)propDef=schema.items[i];if(options.coerce)value[i]=options.coerce(value[i],propDef);errors.concat(checkProp(value[i],propDef,path,i));}}if(schema.minItems&&value.length<schema.minItems){addError(\"There must be a minimum of \"+schema.minItems+\" in the array\");}if(schema.maxItems&&value.length>schema.maxItems){addError(\"There must be a maximum of \"+schema.maxItems+\" in the array\");}}else if(schema.properties||schema.additionalProperties){errors.concat(checkObj(value,schema.properties,path,schema.additionalProperties));}if(schema.pattern&&typeof value=='string'&&!value.match(schema.pattern)){addError(\"does not match the regex pattern \"+schema.pattern);}if(schema.maxLength&&typeof value=='string'&&value.length>schema.maxLength){addError(\"may only be \"+schema.maxLength+\" characters long\");}if(schema.minLength&&typeof value=='string'&&value.length<schema.minLength){addError(\"must be at least \"+schema.minLength+\" characters long\");}if(_typeof(schema.minimum)!==undefined&&(typeof value===\"undefined\"?\"undefined\":_typeof(value))==_typeof(schema.minimum)&&schema.minimum>value){addError(\"must have a minimum value of \"+schema.minimum);}if(_typeof(schema.maximum)!==undefined&&(typeof value===\"undefined\"?\"undefined\":_typeof(value))==_typeof(schema.maximum)&&schema.maximum<value){addError(\"must have a maximum value of \"+schema.maximum);}if(schema['enum']){var enumer=schema['enum'];l=enumer.length;var found;for(var j=0;j<l;j++){if(enumer[j]===value){found=1;break;}}if(!found){addError(\"does not have a value in the enumeration \"+enumer.join(\", \"));}}if(typeof schema.maxDecimal=='number'&&value.toString().match(new RegExp(\"\\\\.[0-9]{\"+(schema.maxDecimal+1)+\",}\"))){addError(\"may only have \"+schema.maxDecimal+\" digits of decimal places\");}}}return null;}// validate an object against a schema", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "4e6cf2c7c290a234789a60d86806e7df", "score": "0.5723769", "text": "function shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "c4b26b6815bed9a19a60a5306d9a5be9", "score": "0.5714792", "text": "_validate () {\n const { title, body } = this.data\n\n if (title === '') {\n this.errors.push('Title must be required')\n }\n\n if (body === '') {\n this.errors.push('Post content required')\n }\n }", "title": "" }, { "docid": "bd6ef0d080d60b71e9569937611a2a2c", "score": "0.5691246", "text": "function validateCheckpointModel(model) {\n\t validateProperty(model, 'id', 'string');\n\t validateProperty(model, 'last_modified', 'string');\n\t}", "title": "" }, { "docid": "33cc9b10b0760a60acd1871bb3a82d2f", "score": "0.56873196", "text": "isValid(){\n return (this.name !== undefined && this.name !== '' && this.tablesAreValid());\n }", "title": "" }, { "docid": "299a6e0d96e1780e0b2f6715004a9ce9", "score": "0.56814885", "text": "async beforeValidate () {}", "title": "" }, { "docid": "299a6e0d96e1780e0b2f6715004a9ce9", "score": "0.56814885", "text": "async beforeValidate () {}", "title": "" }, { "docid": "9bc9856400065065b6bab09200deedd0", "score": "0.56597364", "text": "validate(schema) {\n return this._Document.validate(this._doc, schema);\n }", "title": "" }, { "docid": "37c3a101e14c103e199bf1fe3c33c103", "score": "0.5653509", "text": "validateInputs(){\n return true;\n }", "title": "" }, { "docid": "14227fc149fe53faad60f1315d7c3810", "score": "0.5628838", "text": "function validate_inputs(request)\n {\n if (!request.data)\n {\n return false;\n }\n\n if (request.data.user_name)\n {\n request.data.user_name = request.data.user_name.trim();\n }\n if (!request.data.user_name)\n {\n console.log('EMIT: error_new_user - !name'); \n request.io.emit('error_new_user', \"Name is required\");\n return false;\n }\n\n if (request.data.room)\n {\n request.data.room = request.data.room.trim();\n }\n if (!request.data.room)\n {\n console.log('EMIT: error_new_user - room =', request.data.room); \n request.io.emit('error_new_user', \"Room cannot be blank\");\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "a0dc708abded125f95eaa7a6045f6b86", "score": "0.5601516", "text": "function validateAgainstSchema(obj, schema){\n Object.keys(schema).forEach( (field) => {\n if(schema[field].required && obj[field] === undefined){\n return false;\n }\n });\n\n return true;\n}", "title": "" }, { "docid": "3a8a4bd3424e61fba211d84ec472fed0", "score": "0.5592033", "text": "function validateContentsModel(model) {\n\t validateProperty(model, 'name', 'string');\n\t validateProperty(model, 'path', 'string');\n\t validateProperty(model, 'type', 'string');\n\t validateProperty(model, 'created', 'string');\n\t validateProperty(model, 'last_modified', 'string');\n\t validateProperty(model, 'mimetype', 'object');\n\t validateProperty(model, 'content', 'object');\n\t validateProperty(model, 'format', 'object');\n\t}", "title": "" }, { "docid": "7ad172702316487cdbc2a5691c804fa9", "score": "0.55883366", "text": "onUpdate() {\n if (this.validate(true)) {\n ValidationActions.saveChanges();\n }\n }", "title": "" }, { "docid": "2d0019fcb0620eb88a1ed628280a2615", "score": "0.5587495", "text": "modelChangedCallback(model) {\n this.validate(this.schema, model);\n this.modelChange.emit(model);\n }", "title": "" }, { "docid": "cc4fd015f5856bf5a7b8f3de9d6c34d8", "score": "0.5584799", "text": "schemaValidation() {\n return {\n nameSchema: check('name')\n .notEmpty()\n .isLength({ min: 4, max: 40 })\n .withMessage('name must be between 4 to 40 chars'),\n typeSchema: check('type').notEmpty().withMessage('select one of the provided types'),\n };\n }", "title": "" }, { "docid": "74d5edc1d02ee43db166605b5ac21a48", "score": "0.5577784", "text": "rules(schema) {\n this.validationSchema = schema;\n return {};\n }", "title": "" }, { "docid": "2ea2d43134d6bcb76b4d275cbfe29693", "score": "0.55424315", "text": "loadDefaultRules() {\n\t\t\n\t\tthis.rules = {\n\t\t\t\n\t\t\t//The value is required\n\t\t\trequired: ( value ) => {\n\n\t\t\t\treturn ! (value === undefined || value === null || value === '');\n\t\t\t\t\n\t\t\t},\n\t\n\t\t\t//Field should be numeric\n\t\t\tnumeric: ( value ) => {\n\t\t\t\t\n\t\t\t\treturn ! isNaN ( parseFloat( value ) ) && isFinite( value );\n\t\n\t\t\t},\n\t\n\t\t\t//Field should be an integer\n\t\t\tinteger: ( value ) => {\n\t\n\t\t\t\treturn Number.isInteger( value );\n\t\n\t\t\t},\n\t\n\t\t\t//Field should be a string\n\t\t\tstring: ( value ) => {\n\t\n\t\t\t\treturn typeof value === 'string' || value instanceof String;\n\t\n\t\t\t},\n\t\n\t\t\t//Field value should be between a max and a min\n\t\t\tbetween: ( value, params ) => {\n\t\n\t\t\t\treturn value >= params.min && value <= params.max;\n\t\n\t\t\t},\n\n\t\t\t//Field length should be between a max and a min\n\t\t\tlBetween: ( value, params ) => {\n\n\t\t\t\treturn value.length >= params.min && value.length <= params.max\n\n\t\t\t},\n\n\t\t\t//Field value represents a model that should exist in the database\n\t\t\texists: async ( value, params ) => {\n\t\t\t\t\n\t\t\t\t//Counting models\n\t\t\t\tconst modelCount = await params.model.countDocuments({ _id: value });\n\n\t\t\t\treturn modelCount > 0;\n\t\t\t\t\n\n\t\t\t}\n\t\n\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "556dc173d23997e57d4e5e5c4e1abe94", "score": "0.5539357", "text": "_validateData(data) {\n if (!this.isValidate() || this.getVersion() === null) {\n return;\n }\n if (!this.__schema) {\n throw new Error(\n `Cannot validate - no schema available! Please load the model first.`\n );\n }\n try {\n qx.tool.utils.Json.validate(data, this.__schema);\n } catch (e) {\n let msg = `Error validating data for ${this.getRelativeDataPath()}: ${\n e.message\n }`;\n if (this.isWarnOnly()) {\n qx.tool.compiler.Console.warn(msg);\n } else {\n throw new qx.tool.utils.Utils.UserError(msg);\n }\n }\n }", "title": "" }, { "docid": "e2efc1d9581bf37b9ca861da043e0160", "score": "0.5535542", "text": "static checkData(data) {\n const proto = this.prototype;\n Object.keys(data).forEach((e) => {\n if (e === '_id') return;\n if (!proto.__schema[e]) throw new Error(`no ${e} field in schema`);\n proto.singleCheck(proto.__schema[e], data[e]);\n });\n }", "title": "" }, { "docid": "34f820a04560c976c7800aa6f09a8227", "score": "0.551536", "text": "function validateCheckpointModel(model) {\n validateProperty(model, 'id', 'string');\n validateProperty(model, 'last_modified', 'string');\n}", "title": "" }, { "docid": "472aa7c00bd31a2d7e52c59f7381e80d", "score": "0.5485017", "text": "function validateInput(input){\n const schema = Joi.object({\n id: Joi.number(),\n name: Joi.string(),\n position: Joi.string(),\n experience: Joi.string(),\n salary: Joi.number().min(20000)\n });\n\n return schema.validate(input);\n}", "title": "" }, { "docid": "752ccec47dd2fe1b541e0c1f35e4a007", "score": "0.5471944", "text": "function validateInput() {\n\t\tsetIsFirstName(validator.isAlpha(firstName));\n\t\tsetIsLastName(validator.isAlpha(lastName));\n\t\tsetIsEmail(validator.isEmail(email));\n\t\tsetIsDOB(validator.isDate(new Date(DOB)));\n\t\tsetIsPhone(validator.isMobilePhone(phone));\n\t\tsetIsPassword(password.length >= 6);\n\t}", "title": "" }, { "docid": "df059d668328363fbc290eb4eeb9bcc4", "score": "0.5457124", "text": "validate() {\n if (!this._id) {\n throw new Error('Missing id');\n }\n\n if (!this._label) {\n throw new Error('Missing label');\n }\n\n if (!this._from) {\n throw new Error('Missing from');\n }\n\n if (this._from === this._id) {\n throw new Error('Invalid from');\n }\n\n if (!this._to) {\n throw new Error('Missing to');\n }\n\n if (this._to === this._id) {\n throw new Error('Invalid to');\n }\n\n if (this._to === this._from) {\n throw new Error('Circular Edges not allowed');\n }\n\n if (!this._action) {\n throw new Error('Missing action');\n }\n\n switch (this._action) {\n case Constant.CREATE:\n if (this._origProps !== undefined ||\n this._props === undefined) {\n throw new Error('props (not origProps) ' +\n 'must be set on create');\n }\n break;\n case Constant.UPDATE:\n if (this._origProps === undefined ||\n this._props === undefined) {\n throw new Error('props and origProps ' +\n 'must be set on update');\n }\n break;\n case Constant.DELETE:\n if (this._origProps === undefined ||\n this._props !== undefined) {\n throw new Error('origProps (not props) ' +\n 'must be set on delete');\n }\n break;\n default:\n throw new Error('Invalid Action');\n }\n }", "title": "" }, { "docid": "b7249ad549d89c3cebb9c4f7c20bbd15", "score": "0.5455232", "text": "validation() {\n return {};\n }", "title": "" }, { "docid": "07d2ca0845e8e52e7457c9f3001ad699", "score": "0.54496926", "text": "_validation() {\n // to be overridden by child class\n }", "title": "" }, { "docid": "3e64a923aaa689965fc6f218acbffe83", "score": "0.54444313", "text": "validate() {\n // Get generic API validation errors\n this._super();\n var errors = get(this, 'errors')||[];\n if ( !get(this, 'cluster.name') ) {\n errors.push('Name is required');\n }\n\n // Add more specific errors\n\n // Check something and add an error entry if it fails:\n // if ( parseInt(get(this, 'config.memorySize'), defaultRadix) < defaultBase ) {\n // errors.push('Memory Size must be at least 1024 MB');\n // }\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if ( get(errors, 'length') ) {\n set(this, 'errors', errors);\n return false;\n } else {\n set(this, 'errors', null);\n return true;\n }\n }", "title": "" }, { "docid": "ee2701a040c5ff3a8264a1315c5aebd7", "score": "0.54228014", "text": "_validate() {\n\n const validateObj = Validator.validateCreateObject({\n productName: this.productName,\n price: this.price,\n companyName: this.companyName,\n productCount: this.productCount\n });\n\n\n if (validateObj.error) {\n\n throw new Error(JSON.stringify(validateObj.error));\n }\n }", "title": "" }, { "docid": "5adef3e317875e1a4d48de0a2c16bb07", "score": "0.54110473", "text": "function validate() {\n return true;\n }", "title": "" }, { "docid": "cdf0523307b9e487a1307dda6e22cd36", "score": "0.54035413", "text": "function validateContentsModel(model) {\n validateProperty(model, 'name', 'string');\n validateProperty(model, 'path', 'string');\n validateProperty(model, 'type', 'string');\n validateProperty(model, 'created', 'string');\n validateProperty(model, 'last_modified', 'string');\n validateProperty(model, 'mimetype', 'object');\n validateProperty(model, 'content', 'object');\n validateProperty(model, 'format', 'object');\n}", "title": "" }, { "docid": "cafb44077c3e65448294e48779918e97", "score": "0.5403238", "text": "validate() {\n const title = this.titleRef.current.value\n const description = this.descRef.current.value\n const price = +this.priceRef.current.value\n return validateInput(title,description,price)\n }", "title": "" }, { "docid": "be7889662016e22c3ee223a31cd27912", "score": "0.53945816", "text": "function customValidation(input){\n \n}", "title": "" }, { "docid": "07174c517ee3cadaf138287864edee50", "score": "0.53865117", "text": "validate() { return true; }", "title": "" }, { "docid": "4794f3f50195aa133c7f8fd2f8a28589", "score": "0.53631866", "text": "function validateModel(data) {\n let model = {\n id: data.id,\n kernel: data.kernel,\n name: data.name,\n path: data.path,\n type: data.type\n };\n // Support legacy session model.\n if (data.path === undefined && data.notebook !== undefined) {\n model.path = data.notebook.path;\n model.type = 'notebook';\n model.name = '';\n }\n validateProperty(model, 'id', 'string');\n validateProperty(model, 'type', 'string');\n validateProperty(model, 'name', 'string');\n validateProperty(model, 'path', 'string');\n validateProperty(model, 'kernel', 'object');\n validate_1.validateModel(model.kernel);\n return model;\n}", "title": "" }, { "docid": "a0fd5af465a91251bf3eb8bb3e93bd27", "score": "0.5359792", "text": "created() {\n // Checking model setting must be defined\n if (this.settings.model == null) {\n this.logger.error(`model inside \"${this.name}\" is null!`);\n throw new MoleculerError('Internal server error!', 501, 'ERR_SERVER');\n }\n\n // Transform entity validation schema to checker function\n if (\n this.broker.validator &&\n _.isObject(this.settings.entityValidator) &&\n !_.isFunction(this.settings.entityValidator)\n ) {\n const check = this.broker.validator.compile(this.settings.entityValidator);\n this.settings.entityValidator = entity => {\n const res = check(entity);\n if (res === true) return Promise.resolve();\n return Promise.reject(new ValidationError('Entity validation error!', null, res));\n };\n }\n }", "title": "" }, { "docid": "33ae922688a14dfc45634345dbfe7e97", "score": "0.5350481", "text": "function validateClass() {\n var collection = getContext().getCollection();\n var collectionLink = collection.getSelfLink();\n var doc = getContext().getRequest().getBody();\n\n // Validate/canonicalize the data.\n doc.weekday = canonicalizeWeekDay(doc.weekday);\n\n // Insert auto-created field 'createdTime'.\n doc.createdTime = new Date();\n\n // Update the request -- this is what is going to be inserted.\n getContext().getRequest().setBody(doc);\n\n function canonicalizeWeekDay(day) {\n // Simple input validation.\n if (!day || !day.length || day.length < 3) throw new Error(\"Bad input: \" + day);\n\n // Try to see if we can canonicalize the day.\n var days = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Friday\", \"Saturday\", \"Sunday\"];\n var fullDay;\n days.forEach(function (x) {\n if (day.substring(0, 3).toLowerCase() == x.substring(0, 3).toLowerCase()) fullDay = x;\n });\n if (fullDay) return fullDay;\n\n // Couldn't get the weekday from input. Throw.\n throw new Error(\"Bad weekday: \" + day);\n }\n}", "title": "" }, { "docid": "407945578ee5c4716600b71f85910b0f", "score": "0.5341564", "text": "get shouldNormalize() {\n return Boolean(this.isSchema);\n }", "title": "" }, { "docid": "da56be8e8b771bb2d5ba1e2b67a74d19", "score": "0.5341132", "text": "isValid(schema) {\n return this._Document.isValid(this._doc, schema);\n }", "title": "" }, { "docid": "e16ace24c24e482f81386106545ec9cf", "score": "0.53336537", "text": "function validateModel(data) {\n var model = {\n id: data.id,\n kernel: data.kernel,\n name: data.name,\n path: data.path,\n type: data.type\n };\n // Support legacy session model.\n if (data.path === undefined && data.notebook !== undefined) {\n model.path = data.notebook.path;\n model.type = 'notebook';\n model.name = '';\n }\n validateProperty(model, 'id', 'string');\n validateProperty(model, 'type', 'string');\n validateProperty(model, 'name', 'string');\n validateProperty(model, 'path', 'string');\n validateProperty(model, 'kernel', 'object');\n validate_1.validateModel(model.kernel);\n return model;\n}", "title": "" }, { "docid": "c638caff386a355beb40a9ce60528105", "score": "0.5332743", "text": "updateValidity() {\n\t\tconst isValid = this.state.isFormValid\n\t\tconst handler = isValid ? 'onValid' : 'onInvalid'\n\t\t// invoke handler with model data if exists\n\t\tconst func = this.props[handler]\n\t\tfunc && func([this.model])\n\t}", "title": "" }, { "docid": "42ad9aadb7d7da23bfebb753632c4b71", "score": "0.5321705", "text": "validate() {\n return {};\n }", "title": "" }, { "docid": "59a50370a69b0088c0a214ba7bb3fc2c", "score": "0.53108615", "text": "constructor(modelConstraint) {}", "title": "" }, { "docid": "712c2462a3ab5146493c130fcb9b5c54", "score": "0.5307399", "text": "function validateFormInputs(){}", "title": "" }, { "docid": "97ff1ee647a4d0a1b04014abac4e6143", "score": "0.53069973", "text": "function checkValidInput() {\n //console.log(this.getAttribute('id')+\" is out of focus!\");\n switch (this.getAttribute('id')) {\n case \"firstName\":\n checkNameConstraint(this);\n break;\n case \"lastName\":\n checkNameConstraint(this);\n break;\n case \"postNumber\":\n checkPostNumberConstraintAndAdapt(this);\n break;\n case \"email\":\n checkEmailConstraint(this);\n break;\n default:\n\n }\n}", "title": "" }, { "docid": "41237b131a93517c32846832f18ba4b2", "score": "0.5304704", "text": "function validation_init() {\n\t\n}", "title": "" }, { "docid": "ec4a402a4338016094f5c04878b9bfc6", "score": "0.5302624", "text": "function _validateDocument() {\n _validateDocument = _asyncToGenerator(function* (doc, schema, context) {\n var documentType = schema.get(doc._type);\n\n if (!documentType) {\n console.warn('Schema type for object type \"%s\" not found, skipping validation', doc._type);\n return [];\n }\n\n try {\n return yield validateItem({\n parent: undefined,\n value: doc,\n path: [],\n document: doc,\n type: documentType,\n getDocumentExists: context === null || context === void 0 ? void 0 : context.getDocumentExists\n });\n } catch (err) {\n console.error(err);\n return [{\n type: 'validation',\n level: 'error',\n path: [],\n item: new _ValidationError.default(err === null || err === void 0 ? void 0 : err.message)\n }];\n }\n });\n return _validateDocument.apply(this, arguments);\n}", "title": "" }, { "docid": "308899e567cec00fcb5824852c4ff43f", "score": "0.5284285", "text": "async _validateRequired(){\n if (this.factRequired){\n const val = this.value;\n if (val===undefined || val===null || (types.isString(val) && strings.isEmpty(val)))\n throw this._makeError(\"must be filled\");\n }\n }", "title": "" }, { "docid": "bf6f9e4dad4c8e9d000624440e8ec281", "score": "0.5279316", "text": "function validateContentsModel(contents) {\n validate.validateContentsModel(contents);\n }", "title": "" }, { "docid": "bf6f9e4dad4c8e9d000624440e8ec281", "score": "0.5279316", "text": "function validateContentsModel(contents) {\n validate.validateContentsModel(contents);\n }", "title": "" }, { "docid": "508d91ed5fa2143a803e87872b242b42", "score": "0.5278273", "text": "function validateCatalogFormInputs() {\n return true;\n}", "title": "" }, { "docid": "8756afa20998ddb5ff4c42097b695bb7", "score": "0.5276932", "text": "validate_() {\n this['valid'] = this['shownColumns'].length > 0;\n }", "title": "" }, { "docid": "69bc505c3625b4ce6000f4618e83ef10", "score": "0.52720606", "text": "validate() {\n if (this.recoverable == null) {\n throw new Error('Field `recoverable` must be set');\n }\n\n if (typeof this.recoverable !== 'boolean') {\n throw new Error('Field `recoverable` must be a boolean');\n }\n\n if (this.msg == null) {\n throw new Error('Field `msg` must be set to a string');\n }\n\n if (typeof this.msg !== 'string') {\n throw new Error('Field `msg` must be a string');\n }\n\n if (this.type == null) {\n throw new Error('Field `type` must be set to a string');\n }\n\n if (typeof this.type !== 'string') {\n throw new Error('Field `type` must be a string');\n }\n }", "title": "" }, { "docid": "7e808619e0f052c2edb30238cb5b344f", "score": "0.52596486", "text": "function validateAll() {\n\t\t\t\tvar error = labelInput.validate();\n\t\t\t\tif (error && error !== null) {\n\t\t\t\t\treturn error;\n\t\t\t\t}\n\t\t\t\tif (namespaceInput !== null) {\n\t\t\t\t\terror = namespaceInput.validate();\n\t\t\t\t\tif (error && error !== null) {\n\t\t\t\t\t\treturn error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\terror = defInput.validate();\n\t\t\t\tif (error && error !== null) {\n\t\t\t\t\treturn error;\n\t\t\t\t}\n\t\t\t\terror = defXrefsInput.validate();\n\t\t\t\tif (error && error !== null) {\n\t\t\t\t\treturn error;\n\t\t\t\t}\n\t\t\t\terror = relationsInput.validate();\n\t\t\t\tif (error && error !== null) {\n\t\t\t\t\treturn error;\n\t\t\t\t}\n\t\t\t\terror = xrefInputs.validate();\n\t\t\t\tif (error && error !== null) {\n\t\t\t\t\treturn error;\n\t\t\t\t}\n\t\t\t\treturn synonymInput.validate();\n\t\t\t}", "title": "" }, { "docid": "8ed5d756fb77b06388b2541d8ae4e017", "score": "0.5244678", "text": "function validateInputs() {\n return false;\n}", "title": "" }, { "docid": "be2654c2b396613b2a75649a0f6e590c", "score": "0.5224545", "text": "validHasBankruptcy() {\n return validateModel(this.data, {\n HasBankruptcy: financialBankruptcyModel.HasBankruptcy,\n }) === true\n }", "title": "" }, { "docid": "bcd71ebfc047a8dda5daa9893ea0d2e1", "score": "0.5220197", "text": "validate() {\n if (!this.title) {\n return new Error(\"You must supply a title\")\n }\n }", "title": "" }, { "docid": "6c88e993be11445be8d871f129e7d6dc", "score": "0.5218755", "text": "async validateInput (args) {\n const { resolvedData, addFieldValidationError } = args\n const value = resolvedData[this.path]\n\n if (value === null) return true\n if (!isISO8601Duration(value)) addFieldValidationError('Invalid DateInterval value.')\n\n await super.validateInput(args)\n }", "title": "" }, { "docid": "30ea597cd48758aaa88a955846f3f3b9", "score": "0.521737", "text": "validate() {\n // Get generic API validation errors\n this._super();\n const intl = get(this, 'intl');\n var errors = get(this, 'errors')||[];\n if ( !get(this, 'cluster.name') ) {\n errors.push(intl.t('clusterNew.aliyunkcs.cluster.name.required'));\n }\n\n // Add more specific errors\n\n // Set the array of errors for display,\n // and return true if saving should continue.\n if ( get(errors, 'length') ) {\n set(this, 'errors', errors);\n return false;\n } else {\n set(this, 'errors', null);\n return true;\n }\n }", "title": "" }, { "docid": "e73cf82dc9624e5aff71594ae72c6385", "score": "0.52164453", "text": "function validateNew(req) {\n\tconst schema = {\n\t\tboardId: Joi.objectId().required(),\n\t};\n\n\treturn Joi.validate(req, schema);\n}", "title": "" }, { "docid": "43ca05f8303ae4c40b1d3320fc4de94a", "score": "0.5198169", "text": "getRequiredSchema() {\n const newSchema = Joi.object(this.schema.input);\n return newSchema.requiredKeys(Object.keys(this.schema.input));\n }", "title": "" }, { "docid": "daf6d6ff1b716b30656f59ab24c0fd68", "score": "0.51956594", "text": "function checkInputs(inputs) {\n\tvar newPet = Object.create(Pet);\n\tvar errors = false;\n\n\tinputs.slice(0, -1).each(function() {\n\t\tif ($(this).val() == \"\" || $(this).val() == null) {\n\t\t\talert(\"Please insert \" + this.name);\n\t\t\terrors = true;\n\t\t} else {\n\t\t\tnewPet[this.name] = $(this).val();\n\t\t}\n\t});\n\n\tif (errors) {\n\t\treturn false;\n\t} else {\n\t\tnewPet.id = IDcount;\n\t\treturn savePet(newPet);\n\t}\n}", "title": "" }, { "docid": "a217498e32122fb9758c3e0d270525ec", "score": "0.51829875", "text": "static onValidate(opts) {\n const { elm, binding } = opts;\n init.call(this, {\n elm,\n binding: {\n value: binding\n }\n });\n }", "title": "" }, { "docid": "e14df57f89964cb183fbba9d15c32d30", "score": "0.51735085", "text": "isValid( ) { // TODO: ↓ fix this path ↓\n const schema = FS.readFileSync(PATH.join( __dirname, 'resume.json' ), 'utf8');\n const schemaObj = JSON.parse(schema);\n validator = require('is-my-json-valid');\n const validate = validator( schemaObj, { // Note [1]\n formats: { date: /^\\d{4}(?:-(?:0[0-9]{1}|1[0-2]{1})(?:-[0-9]{2})?)?$/ }\n });\n const temp = this.imp;\n delete this.imp;\n const ret = validate(this);\n this.imp = temp;\n if (!ret) {\n this.imp = this.imp || { };\n this.imp.validationErrors = validate.errors;\n }\n return ret;\n }", "title": "" }, { "docid": "cd9854509862b915ae007f403a9b5f7a", "score": "0.51690197", "text": "validate(data, schema, pointer) {\n return this.config.validate(this, data, schema, pointer);\n }", "title": "" }, { "docid": "be339d58ba9f644938d424c130b01269", "score": "0.51468295", "text": "function validateInputData(inputData){\n\tconst schema = {\n name : Joi.string().max(50).required(),\n email : Joi.string().required(),\n registrationNo : Joi.string().max(100).required(),\n \n\t};\n\treturn Joi.validate(inputData, schema);\n}", "title": "" }, { "docid": "85af6cee7bf37aa31f48764d7e0a1643", "score": "0.514651", "text": "function validate() {\n if (name === '') {\n setError('Student name cannot be blank');\n return;\n }\n\n setError('');\n props.onSave(name, interviewer);\n }", "title": "" }, { "docid": "591766444fd97f9c14d272890adeee07", "score": "0.5142637", "text": "validate() {\n // Ensure the basis vectors are unit length and orthogonal.\n Vec.normalize(this.basis[0]);\n this.basis[1] = Vec.makeOrtho(this.basis[1], this.basis[0]);\n Vec.normalize(this.basis[1]);\n if (Vec.norm(this.basis[0]) === 0 || Vec.norm(this.basis[1]) === 0) {\n // If either vector ended up zero, the basis was invalid.\n // Reset it.\n this.resetBasis();\n }\n\n // Ensure the offsets are clamped to [0,1].\n for (let i = 0; i < this.dims; i++) {\n this.offset[i] = Math.max(0, Math.min(1, this.offset[i]));\n }\n }", "title": "" }, { "docid": "e2299e7cb6f4d3cbe54533c50b59360d", "score": "0.5139958", "text": "input() {\n this.showValidationOnHandler('input');\n }", "title": "" }, { "docid": "60705dd5095c2c916f4f290cf5ea6938", "score": "0.5134695", "text": "function ensureFields(cb) {\n if (!obj['$schema']) {\n obj['$schema'] = \"http://json-schema.org/draft-04/schema#\";\n }\n cb();\n }", "title": "" }, { "docid": "a7cb25632e0a6181d39c403248b177bc", "score": "0.51266825", "text": "function initValidate() {\n return true;\n}", "title": "" }, { "docid": "3da5a5ad9ed9285b4ef5b2be83fd9d01", "score": "0.51264614", "text": "function X(e,t){if(null==e||e===global)throw new l(\"`Model.\"+t+\"()` cannot run without a model as `this`. Make sure you are calling `MyModel.\"+t+\"()` where `MyModel` is a Mongoose model.\");if(null==e[W])throw new l(\"`Model.\"+t+\"()` cannot run without a model as `this`. Make sure you are not calling `new Model.\"+t+\"()`\")}", "title": "" }, { "docid": "40c31fae7dc7ddd8f11a42b853450611", "score": "0.5124725", "text": "static validateCreating(body) {\n\t\tvar schema = joibird.object().keys({\n\t email: joibird.string().email().required().options({\n\t \tlanguage: {\n\t \t\tkey: 'Email '\n\t \t}\n\t }),\n\t password: joibird.string().min(6).options({\n\t \tlanguage: {\n\t \t\tkey: 'Password ',\n\t \t\tstring: {\n\t \t\t\tmin: 'must be greater than or equal to 6 characters'\n\t \t\t}\n\t \t}\n\t }),\n\t name: joibird.string().min(2).options({\n\t \tlanguage: {\n\t \t\tkey: 'Name ',\n\t \t\tstring: {\n\t \t\t\tmin: 'must be greater than or equal to 2 characters'\n\t \t\t}\n\t \t}\n\t })\n\t\t});\n\t\treturn joibird.validate(body, schema, {\n\t\t\tstripUnknown: true,\n\t\t\tabortEarly: false\n\t\t});\n\t}", "title": "" } ]
c29b962d0693ce38d9b0a923ca1178ec
Workaround the IE bug with assigning names to dynamically created elements Upd.: Opera has document.all property Upd.: Mozilla doesn't know trycatch
[ { "docid": "cf1536cd1618c27ef69e1e8554c70ed0", "score": "0.0", "text": "function CreateElement(tag, name) {\n var result;\n if (d.all) {\n try {\n result = d.createElement(\"<\" + tag + (name ? \" name=\\\"\" + name + \"\\\" id=\\\"\" + name + \"\\\"\" : \"\") + \">\");\n }\n catch(e) {\n }\n }\n if (!result) {\n result = d.createElement(tag);\n if (name) {\n result.name = name;\n result.id = name;\n }\n }\n return result;\n}", "title": "" } ]
[ { "docid": "26db2f88b7ece09d68c1b4cb8a04563d", "score": "0.5971406", "text": "registerAll(names) {\n for (let name of names) {\n let proto = Object.create(HTMLElement.prototype);\n let fn = this.getHandler(name);\n if (fn) {\n proto.createdCallback = fn;\n }\n let prefixedName = this.tagName(name);\n try {\n document.registerElement(prefixedName, {prototype: proto});\n } catch (error) {\n console.log(prefixedName + \" couldn't be registered or is already registered.\");\n console.log(error);\n }\n\n }\n }", "title": "" }, { "docid": "56938394abe9256a83c9839f76a7424e", "score": "0.58760655", "text": "function upgradeAllRegisteredInternal(){for(var n=0;n<registeredComponents_.length;n++){upgradeDomInternal(registeredComponents_[n].className);}}", "title": "" }, { "docid": "c71a377fb360af05afa88cab531dec3a", "score": "0.5719442", "text": "function hc_elementinuseattributeerr() {\n var success;\n var doc;\n var newAttribute;\n var addressElementList;\n var testAddress;\n var newElement;\n var attrAddress;\n var appendedChild;\n var setAttr1;\n var setAttr2;\n doc = load(\"hc_staff\");\n addressElementList = doc.getElementsByTagName(\"body\");\n testAddress = addressElementList.item(0);\n newElement = doc.createElement(\"p\");\n appendedChild = testAddress.appendChild(newElement);\n newAttribute = doc.createAttribute(\"title\");\n setAttr1 = newElement.setAttributeNode(newAttribute);\n \n\t{\n\t\tsuccess = false;\n\t\ttry {\n setAttr2 = testAddress.setAttributeNode(newAttribute);\n }\n\t\tcatch(ex) {\n success = (typeof(ex.code) != 'undefined' && ex.code == 10);\n\t\t}\n\t\tassertTrue(\"throw_INUSE_ATTRIBUTE_ERR\",success);\n\t}\n\n}", "title": "" }, { "docid": "c16d3eb2a7cf90f391e1f54f55e99c3c", "score": "0.57069254", "text": "function LIBERTAS_GENERAL_getFormElement(id){\r\n\ttry{\r\n\t\tif (browser==\"IE\"){\r\n\t\t\treturn document.all[id];\r\n\t\t} else {\r\n\t\t\treturn document.getElementsByName(id);\r\n\t\t}\r\n\t} catch (e){\r\n\t\r\n\t}\r\n}", "title": "" }, { "docid": "52693ea4f97de975682ea175f890f5b2", "score": "0.5660738", "text": "function create_htmlUnknownElement(document, localName, namespace, prefix) {\n // TODO: Implement in HTML DOM\n return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);\n}", "title": "" }, { "docid": "cf8b9ae4f15e0ce167dfca2a1fb0abe5", "score": "0.5624911", "text": "fallback(names) {\n for (let name of names) {\n let fn = this.getFallback(name);\n if (fn) {\n for (let elt of Array.from((this.dom?this.dom:document).getElementsByTagName(this.tagName(name)))) {\n this.append(fn, elt);\n }\n }\n }\n }", "title": "" }, { "docid": "5de920f98205fcef5f48822574fa8e1c", "score": "0.5595682", "text": "function upgradeAllRegisteredInternal() {\n\t for (var n = 0; n < registeredComponents_.length; n++) {\n\t upgradeDomInternal(registeredComponents_[n].className);\n\t }\n\t }", "title": "" }, { "docid": "5de920f98205fcef5f48822574fa8e1c", "score": "0.5595682", "text": "function upgradeAllRegisteredInternal() {\n\t for (var n = 0; n < registeredComponents_.length; n++) {\n\t upgradeDomInternal(registeredComponents_[n].className);\n\t }\n\t }", "title": "" }, { "docid": "c89ad2b1a62b1e94eda29c5404948e6d", "score": "0.55883574", "text": "function checkElement(name) {\n if (stuff[name] === undefined) {\n stuff[name] = {};\n }\n }", "title": "" }, { "docid": "997e26a754bdaf799b711913fdf11727", "score": "0.55786383", "text": "function set_name_to_selElement( newName ) {\n // Set new name to qs_TR_arr[selRowIndex][0].name and to selElement.name for selected element\n selElement.name = newName;\n qs_TR_arr[selRowIndex][0].name = newName;\n}", "title": "" }, { "docid": "cb55463f9311ef5ba71ded10275d235e", "score": "0.5574092", "text": "function setClass(eleName,clsName)\n{\n //document.all(eleName).className = clsName;\n}", "title": "" }, { "docid": "395c6e01b4ec2dcdfcda6245d4c8e7c8", "score": "0.5571981", "text": "function testForNamePropertyBug(){\n var form = document.body.appendChild(document.createElement(\"form\")), input = form.appendChild(document.createElement(\"input\"));\n input.name = IFRAME_PREFIX + \"TEST\" + channelId; // append channelId in order to avoid caching issues\n HAS_NAME_PROPERTY_BUG = input !== form.elements[input.name];\n document.body.removeChild(form);\n}", "title": "" }, { "docid": "9096e69ffdb86c4fe42f909c296721ba", "score": "0.5553215", "text": "function ie9elem(el, html, tagName, select) {\n\t\n\t var div = mkEl(GENERIC),\n\t tag = select ? 'select>' : 'table>',\n\t child\n\t\n\t div.innerHTML = '<' + tag + html + '</' + tag\n\t\n\t child = $(tagName, div)\n\t if (child)\n\t el.appendChild(child)\n\t\n\t }", "title": "" }, { "docid": "9096e69ffdb86c4fe42f909c296721ba", "score": "0.5553215", "text": "function ie9elem(el, html, tagName, select) {\n\t\n\t var div = mkEl(GENERIC),\n\t tag = select ? 'select>' : 'table>',\n\t child\n\t\n\t div.innerHTML = '<' + tag + html + '</' + tag\n\t\n\t child = $(tagName, div)\n\t if (child)\n\t el.appendChild(child)\n\t\n\t }", "title": "" }, { "docid": "3e245b76d05db2f5f0d784d45f5af4f8", "score": "0.55516136", "text": "function testDomOverride() {\n let docs = document.getElementsByTagName(\"*\");\n var n = 0;\n for (let dk = 0; dk < docs.length; dk++) {\n let d = docs[dk];\n if (d.id && d !== W[d.id]) {\n log('patch W. for', d.id);\n W[d.id] = d;\n }\n }\n console.log('testDomOverride: overridden elements=', n);\n}", "title": "" }, { "docid": "97d8c4d6782408e353495780cb08b3a2", "score": "0.55157536", "text": "function ie9elem(el, html, tagName, select) {\n\n\t var div = mkEl(GENERIC),\n\t tag = select ? 'select>' : 'table>',\n\t child\n\n\t div.innerHTML = '<' + tag + html + '</' + tag\n\n\t child = div.getElementsByTagName(tagName)[0]\n\t if (child)\n\t el.appendChild(child)\n\n\t }", "title": "" }, { "docid": "52e74bba3cd8a1ff690154e5f0e661fe", "score": "0.550639", "text": "function $name(name){\n\n\tvar allObjs = [];\n\n\tfor(var i=0; i<arguments.length; i++){\n\t\tvar objs = document.getElementsByName(arguments[i]);\n\t\tallObjs = allObjs.concat(objs);\n\t}\n\n\tif(objs.length < 1) objs = null;\n\n\treturn objs;\n\n}", "title": "" }, { "docid": "adbbaf2ac7156f8658bf0c252ad3c2f4", "score": "0.5503068", "text": "function mySetAttribute( eElem, sName, sValue, isBuggyIE ) {\n if( isBuggyIE ) {\n switch( sName.toLowerCase() ) {\n case 'id' : eElem.setAttribute( \"id\", sValue ); break;\n case 'valign' : eElem.setAttribute( \"vAlign\", sValue ); break;\n case 'class' : eElem.setAttribute( \"className\", sValue ); break;\n case 'style' : eElem.style.setAttribute( \"cssText\", sValue ); break;\n case 'cellpadding' : eElem.setAttribute( \"cellPadding\", sValue ); break;\n case 'cellspacing' : eElem.setAttribute( \"cellSpacing\", sValue ); break;\n case 'bgcolor' : eElem.setAttribute( \"bgColor\", sValue ); break;\n case 'colspan' : eElem.setAttribute( \"colSpan\", sValue ); break;\n case 'rowspan' : eElem.setAttribute( \"rowSpan\", sValue ); break;\n }\n }\n else {\n eElem.setAttribute( sName, sValue ); \n }\n}", "title": "" }, { "docid": "8d769823b9ecf9895af3e37d94840a7e", "score": "0.54868084", "text": "function newElement(type,att,evts,appendToObj){\n var elem;\n if(isNameQuirk() && att.name != null){\n elem = document.createElement('<' + type + ' name=\"' + att.name + '\">');\n }\n else{\n elem = document.createElement(type);\n }\n for(var prop in att){\n elem.setAttribute(prop,att[prop]);\n }\n if(evts){\n for(var evt in evts){\n elem[evt] = evts[evt];\n }\n }\n if(appendToObj){\n appendToObj.appendChild(elem);\n }\n return elem;\n }", "title": "" }, { "docid": "8f0df771ca8705422f819baf862e98ab", "score": "0.5484672", "text": "function appendElement (hander,node) {\r\n if (!hander.currentElement) {\r\n hander.document.appendChild(node);\r\n } else {\r\n hander.currentElement.appendChild(node);\r\n }\r\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "8f0df771ca8705422f819baf862e98ab", "score": "0.5484672", "text": "function appendElement (hander,node) {\r\n if (!hander.currentElement) {\r\n hander.document.appendChild(node);\r\n } else {\r\n hander.currentElement.appendChild(node);\r\n }\r\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "850d58832fdc0f2fbd58693f842a6ffb", "score": "0.54754287", "text": "function domCreateElement(tagName)\r\n{\r\n\tvar ie = document.all?true:false;\r\n\tif(ie)\r\n\t return document.applyInherit(document.createElement(tagName), new Object());\r\n\telse\r\n\t\treturn document.createElement(tagName);\r\n}", "title": "" }, { "docid": "301ffe17b760efc783899e554c17f3ed", "score": "0.54685414", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.document.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c8896ace7cf5d0968164d8cb451deba0", "score": "0.54648125", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "d9feb95e8149612477cc397cd641e5fe", "score": "0.54536617", "text": "function upgradeAllRegisteredInternal() {\n for (var n = 0; n < registeredComponents_.length; n++) {\n upgradeDomInternal(registeredComponents_[n].className);\n }\n }", "title": "" }, { "docid": "c45fc58bfff8833c4dc1f993482c46e7", "score": "0.5452689", "text": "function ie9elem(el, html, tagName, select) {\n\n var div = mkEl(GENERIC),\n tag = select ? 'select>' : 'table>',\n child\n\n div.innerHTML = '<' + tag + html + '</' + tag\n\n child = div.getElementsByTagName(tagName)[0]\n if (child)\n el.appendChild(child)\n\n }", "title": "" }, { "docid": "dffe08635521395da5e8f5c7b82017d2", "score": "0.5429659", "text": "function newElement(name, atts, content) {\n\t// name: e.g. 'div', 'div.foo', 'div#bar', 'div.foo#bar', 'div#bar.foo'\n\t// atts: (optional) e.g. {'href':'page.html','target':'_blank'}\n\t// content: (optional) either a string, or an element, or an arry of strings or elements\n\tif (name.indexOf('.') + name.indexOf('#') > -2) {\n\t\tvar className = (name.indexOf('.') > -1) ? name.replace(/^.*\\.([^\\.#]*).*$/,\"$1\") : \"\";\n\t\tvar id = (name.indexOf('#') > -1) ? name.replace(/^.*#([^\\.#]*).*$/,\"$1\") : \"\";\n\t\tname = name.replace(/^([^\\.#]*).*$/,'$1');\n\t}\n\tvar e = document.createElement(name);\n\tif (className) { e.className = className; }\n\tif (id) { e.id = id; }\n\tif (atts) {\n\t\tfor (var key in atts) {\n\t\t\t// setAttribute() has shaky support, try direct methods first\n\t\t\tif (!atts.hasOwnProperty(key)) { continue; }\n\t\t\tif (key == 'class') { e.className = e.className ? e.className += ' ' + atts[key] : atts[key]; }\n\t\t\telse if (key == 'for') { e.htmlFor = atts[key]; }\n\t\t\telse if (key.indexOf('on') == 0) { e[key] = atts[key]; }\n\t\t\telse {\n\t\t\t\te.setAttribute(key, atts[key]);\n\t\t\t}\n\t\t}\n\t}\n\tif (content) {\n\t\tif (!(content instanceof Array)) {\n\t\t\tcontent = [content];\n\t\t}\n\t\tfor (var a=0; a<content.length; a++) {\n\t\t\tif (typeof content[a] == 'string') {\n\t\t\t\te.appendChild(document.createTextNode(content[a]));\n\t\t\t}else{\n\t\t\t\te.appendChild(content[a]);\n\t\t\t}\n\t\t}\n\t}\n\tif (name.toLowerCase() == 'img' && !e.alt) { e.alt = ''; }\n\treturn e;\n}", "title": "" }, { "docid": "68e0ca2d8c022f1514c8135209500658", "score": "0.5403362", "text": "function WBC_getFormElement( pForm, strName, arrayElements ) \r\n{\r\n\tvar j = 0;\r\n\tfor (var i = 0; i < pForm.elements.length; i++) {\r\n\t\tif (pForm.elements[i].name == strName) {\r\n\t\t\tarrayElements[j] = pForm.elements[i];\r\n\t\t\tj++;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "3cdfc0f0b898e2121fd5970cf4f72dfc", "score": "0.5399885", "text": "function addElementToSet() {\n var setSelector = document.getElementById('setSelector');\n var elementNameTextbox = document.getElementById('addElementName');\n\n var currentSet = setSelector.options[setSelector.selectedIndex].text;\n currentSet = getSetElementByID(currentSet, finalSets);\n\n let newElement = elementNameTextbox.value;\n if (invalidCeptreName(newElement))\n alert('Invalid set element. Set elements must be unique, must not contain spaces, and must begin with a lowercase letter.');\n else {\n usedNames.add(newElement);\n currentSet.elements.add(elementNameTextbox.value);\n updateSetElementViewer();\n updateRuleSets();\n updateFilterSets();\n updateAllArgSelectors();\n elementNameTextbox.value = '';\n }\n}", "title": "" }, { "docid": "2d30d4c5a0575af4e440e802d319b97d", "score": "0.5399759", "text": "function replace_ids_and_names(elem, new_nr) {\n if(elem.id) {\n var new_id = elem.id.replace(/_\\d+$/, '_'+new_nr);\n elem.setAttribute('id', new_id);\n }\n if(elem.name) {\n var new_name = elem.name.replace(/_\\d+$/, '_'+new_nr);\n elem.setAttribute('name', new_name);\n }\n return elem\n}", "title": "" }, { "docid": "0b2afae7f44e219ec8a289f8cd5ad503", "score": "0.5392065", "text": "function cacheNewGameFormDOM () {\n\t\t$game_selection_form = $game_selection_shell.find(\"#game_selection_form\")\n\t\t$dice_operation = $game_selection_form.find(\"#dice_operation\")\n\t\t$number_of_tiles = $game_selection_form.find(\"#number_of_tiles\")\n\t\t$addition_button = $dice_operation.find(\"#addition_button\")\n\t\t$multiplication_button = $dice_operation.find(\"#multiplication_button\")\n\t\t$nine_button = $number_of_tiles.find(\"#nine_button\")\n\t\t$twelve_button = $number_of_tiles.find(\"#twelve_button\")\n\t\t$new_game_button = $game_selection_form.find(\"#new_game_button\")\n\t}", "title": "" }, { "docid": "7a16e3fcdfd09f1e9f59b7a73df98c0f", "score": "0.5381881", "text": "function cria_elemento (pai, elemento, name, valores, inner)\n{\n\tvar nome = (name != \"\")? \" name = '\"+name + \"' id = '\"+name+\"'\" : \"\";\n\n\tif(valores.search(\"'radio'\") != -1)\n\t\telemento = \"radio\";\n/*\nif(elemento == \"radio\")\n\talert(QualNavegador()+\" \"+elemento+\" \"+name);\n*/\n\n\tif(QualNavegador() == \"IE\"){\n\t\tswitch(elemento){\n\t\t\tcase \"radio\":\n\t\t\t\tvar aux = document.createElement(\"<input name = '\"+name+\"' type = 'radio' id = '\"+inner+\"' \"+valores+\">\");\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar aux = document.createElement(\"<\"+elemento+\" \"+nome+\" \"+valores+\">\");\n\t\t}\n\t}\n\telse{\n\t\tswitch(elemento){\n\t\t\tcase \"tr\":\n\t\t\t\tvar aux = document.createElement(elemento);\n\t\t\t\taux.id = name;\n\t\t\t\taux.name = name;\n\t\t\tbreak;\n\t\t\tcase \"option\":\n\t\t\t\tvar aux = document.createElement(elemento);\n\t\t\t\taux.id = name;\n\n\t\t\t\tif(valores.search(\"selected\") != -1){\n\t\t\t\t\taux.selected = true;\n\t\t\t\t}\n\n\t\t\t\tif(valores.search(\"value\") != -1){\n\t\t\t\t\tvalores = valores.substr(valores.search(\"value\"));\n\t\t\t\t\tvalores = valores.substr(valores.search(\"=\"));\n\t\t\t\t\tvalores = valores.substr(valores.search(\"'\")+1);\n\t\t\t\t\tvalores = valores.substring(0, valores.search(\"'\"));\n\t\t\t\t}\n\t\t\t\taux.value = valores;\n\t\t\tbreak;\n\t\t\tcase \"radio\":\n\t\t\t\tpai.innerHTML += \"<input name = '\"+name+\"' type = 'radio' id = '\"+inner+\"' \"+valores+\">\";\n\t\t\t\tvar aux = document.getElementById(inner);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpai.innerHTML += \"<\"+elemento+\" \"+nome+\" \"+valores+\">\";\n\t\t\t\tvar aux = document.getElementById(name);\n\t\t}\n\t}\n\n\tif(inner != \"\" && elemento != \"radio\"){\n\t\taux.innerHTML += inner;\n\t}\n\n\tpai.appendChild(aux);\n\n\treturn aux;\n}", "title": "" }, { "docid": "245d9078ee7aad418499964de521b8e6", "score": "0.5380533", "text": "function appendChild(element_name, strType)\r\n{\r\n\telement_new = document.createElement(strType);\r\n\t\r\n\tif(element_name)\r\n\t{\r\n\t\telement_name.appendChild(element_new);\r\n\t}\r\n\telse\r\n\t{\r\n\t\toSystem_Debug.warning(\"Invalid element submitted to appendChild\");\r\n\t}\r\n\treturn element_new;\r\n}", "title": "" }, { "docid": "106b660a7e932a23e124213a1340ed03", "score": "0.5375959", "text": "function fixie_handle_elements(elements){\n for (var i = 0; i < elements.length; i++) {\n fixie_handler(elements[i]);\n }\n }", "title": "" }, { "docid": "5c0f60ab9d6db64e90a42895f7c9a0b8", "score": "0.5370444", "text": "function getEl(id) {\n if (document.getElementById(id) || (!document.getElementById(id) && document.getElementsByName(id).length == 0))\n // IF An ID attribute is assigned\n // OR No ID attribute is assigned but using IE and Opera\n // (which will find the NAME attribute value using getElementById)\n // OR No element has this ID or NAME attribute value\n // (used internally by the script)\n // THEN Return the required element.\n {\n return document.getElementById(id);\n }\n else {\n if (document.getElementsByName(id).length == 1)\n // IF No ID attribute is assigned\n // AND Using a standards-based browser\n // AND Only one element has the NAME attribute set to the value\n // THEN Return the required element (using the NAME attribute value).\n {\n return document.getElementsByName(id)[0];\n }\n else {\n if (document.getElementsByName(id).length > 1) { // IF No ID attribute is assigned\n // AND using a standards-based browser\n // AND more than one element has the NAME attribute set to the value\n // THEN alert developer to fix the fault.\n alert('JACS' +\n ' \\nCannot uniquely identify element named: ' + id +\n '.\\nMore than one identical NAME attribute defined' +\n '.\\nSolution: Assign the required element a unique ID attribute value.');\n }\n }\n }\n }", "title": "" }, { "docid": "8ebeab811f56735f81ee1475f2ef7d9d", "score": "0.5367895", "text": "function elt(name, className){\n var elt = document.createElement(name);\n if (className) elt.className = className;\n return elt;\n}", "title": "" }, { "docid": "efa89798d78fb48da254438f4191abb7", "score": "0.5356513", "text": "function utilInjectHandlerToNameSelectionSet(name, selectedHandler, outsiderHandler){\n var nameSet = document.getElementsByName(name);\n var setElement; for(setElement of nameSet){\n setElement.siblings = [];\n var elem; for(elem of nameSet)\n if(!elem.isEqualNode(setElement))\n setElement.siblings.push(elem);\n setElement.onclick = function(){\n selectedHandler(this);\n var outsider; for(outsider of this.siblings)\n outsiderHandler(outsider);\n }\n }\n}", "title": "" }, { "docid": "39a7ea06012bca324517be7d07c0360b", "score": "0.53507304", "text": "function appendElement (hander,node) {\r\n if (!hander.currentElement) {\r\n hander.doc.appendChild(node);\r\n } else {\r\n hander.currentElement.appendChild(node);\r\n }\r\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "39a7ea06012bca324517be7d07c0360b", "score": "0.53507304", "text": "function appendElement (hander,node) {\r\n if (!hander.currentElement) {\r\n hander.doc.appendChild(node);\r\n } else {\r\n hander.currentElement.appendChild(node);\r\n }\r\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "39a7ea06012bca324517be7d07c0360b", "score": "0.53507304", "text": "function appendElement (hander,node) {\r\n if (!hander.currentElement) {\r\n hander.doc.appendChild(node);\r\n } else {\r\n hander.currentElement.appendChild(node);\r\n }\r\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "39a7ea06012bca324517be7d07c0360b", "score": "0.53507304", "text": "function appendElement (hander,node) {\r\n if (!hander.currentElement) {\r\n hander.doc.appendChild(node);\r\n } else {\r\n hander.currentElement.appendChild(node);\r\n }\r\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "ab5627c4f2a97c41940c5d90be485737", "score": "0.5339897", "text": "fallback(names) {\n for (let name of names) {\n let fn = this.getFallback(this.behaviors, name);\n if (fn) {\n for (let elt of Array.from((\n this.dom && !this.done \n ? this.dom\n : this.document\n ).getElementsByTagName(utilities.tagName(name)))) {\n if (!elt.hasAttribute(\"data-processed\")) {\n this.append(fn, elt);\n }\n }\n }\n }\n}", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9e714957b99fe997dc1a1e0782ae60fd", "score": "0.53350866", "text": "function appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "5b3fc856aa0a7a96af39bc8347630fb2", "score": "0.5326043", "text": "function setupSpecialElements(doc, parent) {\n // Setup null and undefined tests\n parent.appendChild(doc.createElement(\"null\"));\n parent.appendChild(doc.createElement(\"undefined\"));\n\n // Setup namespace tests\n var anyNS = doc.createElement(\"div\");\n var noNS = doc.createElement(\"div\");\n anyNS.id = \"any-namespace\";\n noNS.id = \"no-namespace\";\n\n var divs;\n div = [doc.createElement(\"div\"),\n doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\"),\n doc.createElementNS(\"\", \"div\"),\n doc.createElementNS(\"http://www.example.org/ns\", \"div\")];\n\n div[0].id = \"any-namespace-div1\";\n div[1].id = \"any-namespace-div2\";\n div[2].setAttribute(\"id\", \"any-namespace-div3\"); // Non-HTML elements can't use .id property\n div[3].setAttribute(\"id\", \"any-namespace-div4\");\n\n for (var i = 0; i < div.length; i++) {\n anyNS.appendChild(div[i])\n }\n\n div = [doc.createElement(\"div\"),\n doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"div\"),\n doc.createElementNS(\"\", \"div\"),\n doc.createElementNS(\"http://www.example.org/ns\", \"div\")];\n\n div[0].id = \"no-namespace-div1\";\n div[1].id = \"no-namespace-div2\";\n div[2].setAttribute(\"id\", \"no-namespace-div3\"); // Non-HTML elements can't use .id property\n div[3].setAttribute(\"id\", \"no-namespace-div4\");\n\n for (i = 0; i < div.length; i++) {\n noNS.appendChild(div[i])\n }\n\n parent.appendChild(anyNS);\n parent.appendChild(noNS);\n\n var span = doc.getElementById(\"attr-presence-i1\");\n span.setAttributeNS(\"http://www.example.org/ns\", \"title\", \"\");\n}", "title": "" }, { "docid": "f0707fd9db7a044025eb90d59724e408", "score": "0.5256193", "text": "function fixie_handle_elements(elements){\n\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\tfixie_handler(elements[i]);\n\t\t}\n\t}", "title": "" }, { "docid": "6702b4b3637afddfa9add62afb5b8399", "score": "0.52477175", "text": "setupUselessElement() {\n this.uselessElement = this.document.createElement('div');\n }", "title": "" }, { "docid": "c622e3cc86c79660b85e1e1d52fdbb0a", "score": "0.52348375", "text": "function create(name) {\n // create element\n return globals.document.createElementNS(ns, name);\n}", "title": "" }, { "docid": "0e85cbdcbffe47d691ad989d6367a40c", "score": "0.5230322", "text": "function noreload_placetags(elements) {\n //run over every element\n for (var i = 0; i < elements.length; i++) {\n var head = document.head;\n //create corresponding element\n var script = document.createElement(elements[i].tagName.toLowerCase());\n //get all valid attributes and parse them to the newly created element\n for (var att, j = 0, atts = elements[i].attributes, n = atts.length; j < n; j++) {\n att = atts[j];\n script[att.nodeName] = att.nodeValue;\n }\n script.innerHTML = elements[i].innerHTML;\n //add class to later remove these\n script.classList.add('noreload_item');\n // append them to the head\n head.appendChild(script);\n }\n}", "title": "" }, { "docid": "a9680004280cf42cc209a9fd77c276c7", "score": "0.52275944", "text": "function createEl(elem, attr, name) {\r\n let element = document.createElement(elem);\r\n element.setAttribute(attr, name);\r\n return element;\r\n}", "title": "" }, { "docid": "03444de9330d632048b4352f553036ef", "score": "0.5222086", "text": "function createNamedDOMElement(elem, id) {\n return $(\"<\"+elem+\">\")\n .attr(\"id\", id);\n}", "title": "" }, { "docid": "2e9e3215794ef23d77e0f85a944c2350", "score": "0.52188295", "text": "buildChild(tagName, func){\n let containerDOMs = document.getElementsByTagName(tagName);\n let i = 0;\n for(let containerDOM of containerDOMs){\n let component = func(containerDOM);\n this.mapper.set(i, component);\n component.build();\n i++;\n }\n }", "title": "" }, { "docid": "f533051328c063f2d9d0c40c5554a072", "score": "0.52172154", "text": "function yByName(pName)\r\r\n{\r\r\n if(typeof(pName) == 'string')\r\r\n {\r\r\n if(document.getElementsByName)\r\r\n pName = document.getElementsByName(pName);\r\r\n else \r\r\n pName = null;\r\r\n }\r\r\n return pName;\r\r\n}", "title": "" }, { "docid": "1efb00a96eb01f7e2c90b091ac7ce5a3", "score": "0.52148515", "text": "function html5shim() {\n var html5_elements =[\"abbr\", \"article\", \"aside\", \"audio\", \"canvas\",\n \"details\", \"figcaption\", \"figure\", \"footer\", \"header\", \"hgroup\", \"mark\",\n \"meter\", \"nav\", \"output\", \"progress\", \"section\", \"summary\", \"time\",\n \"video\"];\n var documentFragment = document.createDocumentFragment();\n for (var i = 0; i < html5_elements.length; i++) {\n try {\n document.createElement(html5_elements[i]);\n documentFragment.createElement(html5_elements[i]);\n } catch (e) {\n // failure in the shim is not a real failure\n }\n }\n }", "title": "" }, { "docid": "b1fdb6c197431d029a01fd1dbe4c82d4", "score": "0.52032614", "text": "function changeName2() {\n\t//if the name had children already inside of the element, give it a 'null'\n\t//so that other name can replace it.\n\tif (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\tname.textContent = '';\n\t\t//this appends the title variable i created and declared with the \n\t\t//set attribute tag.\n\t\tname.appendChild(simTitle);\n\t}\n\t//if name has hayden in it, remove and replace. \n\telse if (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\t//removes haydens name from the container if it's there.\n\t\tname.removeChild(document.getElementById(\"hayTitle\"));\n\t\tname.appendChild(simTitle);\n\t}\n}", "title": "" }, { "docid": "b1fdb6c197431d029a01fd1dbe4c82d4", "score": "0.52032614", "text": "function changeName2() {\n\t//if the name had children already inside of the element, give it a 'null'\n\t//so that other name can replace it.\n\tif (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\tname.textContent = '';\n\t\t//this appends the title variable i created and declared with the \n\t\t//set attribute tag.\n\t\tname.appendChild(simTitle);\n\t}\n\t//if name has hayden in it, remove and replace. \n\telse if (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\t//removes haydens name from the container if it's there.\n\t\tname.removeChild(document.getElementById(\"hayTitle\"));\n\t\tname.appendChild(simTitle);\n\t}\n}", "title": "" }, { "docid": "d9c16d94b0897fca340abd7c467975c8", "score": "0.51964486", "text": "function getElementsById(id)\r\n{\r\n var n = document.getElementById(id);\r\n var a = [];\r\n var i;\r\n while(n) {\r\n a.push(n);\r\n n.id = \"a-different-id\";\r\n n = document.getElementById(id);\r\n }\r\n\r\n for(i = 0; i < a.length; ++i) {\r\n a[i].id = id; \r\n }\r\n return a;\r\n}", "title": "" }, { "docid": "78ccd44281067642b3a01dfa1315f146", "score": "0.5190722", "text": "setupUselessElement() {}", "title": "" }, { "docid": "5d06e771c2d4d615a00ef1059b94910c", "score": "0.51858795", "text": "function asElementNamed( name, node ) { return name === node.localName? node: null; }", "title": "" }, { "docid": "feeecdf42c0eeae4a9397b8a7c83ca38", "score": "0.51781476", "text": "function newElement(elemInfo) {\n const newElem = document.createElement(elemInfo.tag);\n if (('attribs' in elemInfo) && (0 < Object.keys(elemInfo.attribs).length)) {\n for (attrib in elemInfo.attribs) {\n if ('htmlFor' === attrib ) {\n newElem.htmlFor = elemInfo.attribs.htmlFor;\n } else {\n newElem.setAttribute(attrib, elemInfo.attribs[attrib]);\n }\n }\n }\n if ('content' in elemInfo) {\n addContent(newElem, elemInfo.content);\n }\n if ('classList' in elemInfo) {\n newElem.classList.add(...classListArray(elemInfo.classList));\n }\n if ('checked' in elemInfo) {\n newElem.checked = true;\n }\n if ('selected' in elemInfo) {\n newElem.checked = true;\n }\n return newElem;\n}", "title": "" }, { "docid": "8ce0b25d72415016e8770adb1e5a725d", "score": "0.5174388", "text": "function findElementByName(name) {\n var selector = [\"[name=\", jquerifyAttributeValue(name), \"]\"].join(\"\");\n return $(selector);\n }", "title": "" }, { "docid": "d09bec0a3a8caa4fa834e9bd1174cdeb", "score": "0.5166822", "text": "setupUselessElement() {\n this.uselessElement = this.document.createElement('div');\n }", "title": "" }, { "docid": "e7cc8c20e9e1ab5e90aa2c91d611fde1", "score": "0.5149949", "text": "function formOutputFallbackForIE10() {\n\tvar forms = document.getElementsByTagName('form');\n\tfor (var i = 0; i < forms.length; i++) {\n\t\tvar form = forms[i];\n\t\tvar outputs = form.getElementsByTagName('output');\n\t\tfor (var j = 0; j < outputs.length; j++) {\n\t\t\tvar output = outputs[j];\n\t\t\t// Note: output.name is undefined in IE10.\n\t\t\tvar name = output.getAttribute('name');\n\t\t\tif (name && !(name in form)) {\n\t\t\t\tform[name] = output;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4768aff607f4c0993e5dc4a43a69fe51", "score": "0.51478356", "text": "function makeElement(elm, propArr, text){\r\n\t//Hackish fix for greasemonkey style object not being instanceof Object??\r\n\telm = (elm.charAt)?document.createElement(elm):elm;\r\n\tfor(var key in propArr)\r\n\t\tif(propArr[key] instanceof Object)\r\n\t\t\tmakeElement(elm[key], propArr[key]);\r\n\t\telse\r\n\t\t\telm[key] = propArr[key];\r\n\r\n\tif(text)elm.appendChild(document.createTextNode(text));\r\n\treturn elm;\r\n}", "title": "" }, { "docid": "af725c349495cf633b43898d50a9e86a", "score": "0.51468986", "text": "function elt(name, className) {\n var elt = document.createElement(name);\n if (className) elt.className = className;\n return elt;\n}", "title": "" }, { "docid": "055cbbab5bb193a1828280efb98785bb", "score": "0.5143186", "text": "preselectElements () {\n this.document = document;\n this.body = this.document.getElementsByTagName('body')[0];\n this.window = window;\n }", "title": "" }, { "docid": "69adc2d5e8203aca6c388fa124e612b7", "score": "0.51378703", "text": "function screen_CreateInputElement(strName, strValue)\r\n{\r\n\telement_Temp = document.createElement(\"INPUT\");\r\n\telement_Temp.name = strName;\r\n\telement_Temp.value = strValue;\r\n\treturn element_Temp;\r\n}", "title": "" }, { "docid": "3c0cfe2fcd65b65a02d2a49affcc8499", "score": "0.51375616", "text": "function $e(aType, iHTML){var ret = document.createElement(aType); if (iHTML) ret.innerHTML = iHTML; return ret;}", "title": "" }, { "docid": "36ffbbbb891d855beab681cda2a473d6", "score": "0.5132837", "text": "function createEl(elem, attr, name) {\n let element = document.createElement(elem);\n element.setAttribute(attr, name);\n return element;\n}", "title": "" }, { "docid": "c55797509227fa426e16c1cd2b9b8665", "score": "0.51274693", "text": "function createElement() {}", "title": "" }, { "docid": "371ef2f12faf808ceada750d543aa6f2", "score": "0.51018435", "text": "function createHtmlElement(s_elementName, propertyArr) {\n var newTagElement = document.createElement(s_elementName);\n if (propertyArr == null) {\n return newTagElement;\n }\n for (var i = 0; i < propertyArr.length; i++) {\n newTagElement.setAttribute(propertyArr[i].name, propertyArr[i].value);\n }\n return newTagElement;\n}", "title": "" }, { "docid": "961800e948233ce6d062f1f59939701b", "score": "0.50955427", "text": "function refreshElementList(listArray, createFN, elementName) {\n for (var i = 0; i < listArray.length; i++) {\n createFN(listArray[i][0].description, listArray[i][0].inputValue, listArray[i], listArray[i][0].percentage);\n document.getElementById(elementName).appendChild(listArray[i][1][0]);\n }\n}", "title": "" }, { "docid": "1faf4842b65c3de3397a6c059badd70d", "score": "0.50879514", "text": "$CE(elem){\n return document.createElement(elem)\n }", "title": "" }, { "docid": "902781497e709875937ad43737fb2f6d", "score": "0.50789124", "text": "function rebindElement(element, newExpName) {\n if (element == null) return;\n\n var $el = element instanceof jQuery ? element : $(element);\n\n for (var expName in experiences) {\n if (!experiences.hasOwnProperty(expName) || expName != newExpName)\n continue;\n\n $el.click(clickHandler);\n $el.data('experience', experiences[expName]);\n\n break;\n }\n }", "title": "" }, { "docid": "69c2cebd1ce5aa2b91910cad2b04f0f3", "score": "0.5076406", "text": "refreshChild(tagName){\n let containerDOMs = document.getElementsByTagName(tagName);\n let i = 0;\n for(let containerDOM of containerDOMs){\n let component = this.mapper.get(i);\n component.containerDOM = containerDOM;\n component.refresh();\n i++;\n }\n }", "title": "" }, { "docid": "32b5bd3bd998aa82c41ca8787bf8cb53", "score": "0.50727826", "text": "function identify_element_all() {\n var $allelts = $('#iframe').contents().find('html *');\n $allelts.mouseover(function(event) {\n var $obj = $(this);\n\n $('#iframe').contents().find('.highlight').remove();\n\n highlight($('#iframe').contents().find($obj.getGeneralPath()));\n\n $obj.click(function(event) {\n $(':input[name=selector]').val($obj.getGeneralPath());\n event.stopPropagation();\n event.preventDefault();\n\n return false;\n });\n event.stopPropagation();\n event.preventDefault();\n });\n $allelts.mouseout(function() {\n $('#iframe').contents().find('.highlight').remove();\n });\n}", "title": "" }, { "docid": "c26031515a0cf3883a76d7de3efd268b", "score": "0.50677145", "text": "function appendElement(hander, node) {\n\tif (!hander.currentElement) {\n\t\thander.document.appendChild(node);\n\t} else {\n\t\thander.currentElement.appendChild(node);\n\t}\n} //appendChild and setAttributeNS are preformance key", "title": "" }, { "docid": "9c168bb7d276b326772aa52a542947bb", "score": "0.50676775", "text": "function fixie_handler(element) {\n if (!/^\\s*$/.test(element.innerHTML)){\n var childs = element.children;\n if(childs.length){\n for(var fixie_i = 0; fixie_i < childs.length; fixie_i++){\n fixie_handler(childs[fixie_i]);\n }\n }\n return;\n }\n switch (element.nodeName.toLowerCase()) {\n case 'b':\n case 'em':\n case 'strong':\n case 'button':\n case 'th':\n case 'td':\n case 'title':\n case 'tr':\n element.innerHTML = fixie_fetchWord();\n break;\n\n case 'header':\n case 'cite':\n case 'caption':\n case 'mark':\n case 'q':\n case 's':\n case 'u':\n case 'small':\n case 'span':\n case 'code':\n case 'pre':\n case 'li':\n case 'dt':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n element.innerHTML = fixie_fetchPhrase();\n break;\n\n case 'footer':\n case 'aside':\n case 'summary':\n case 'blockquote':\n case 'p':\n element.innerHTML = fixie_fetchParagraph();\n break;\n\n case 'article':\n case 'section':\n element.innerHTML = fixie_fetchParagraphs()\n break;\n\n /* Special cases */\n case 'a':\n element.href = \"http://ryhan.me/\";\n element.innerHTML = \"www.\" + fixie_fetchWord() + fixie_capitalize(fixie_fetchWord()) + \".com\";\n break;\n\n case 'img':\n var src = element.getAttribute('src') || element.src;\n var temp = element.getAttribute('fixie-temp-img');\n if(src == \"\" || src == null || temp == true || temp == \"true\"){\n var width = element.getAttribute('width') || element.width || (element.width = 250);\n var height = element.getAttribute('height') || element.height || (element.height = 100);\n element.src = imagePlaceHolder.replace('${w}', width).replace('${h}', height);\n element.setAttribute('fixie-temp-img', true);\n }\n break;\n\n case 'ol':\n case 'ul':\n element.innerHTML = fixie_fetchList();\n break;\n\n default:\n element.innerHTML = fixie_fetchSentence();\n }\n }", "title": "" }, { "docid": "0f04abb2d267ed8ffc6e124837ab20ff", "score": "0.5066461", "text": "function element(name, className)\n{\n let element = document.createElement(name);\n if(className) element.className = className;\n return element;\n}", "title": "" }, { "docid": "719d0d96b97d56ea596b44cf33c31b8f", "score": "0.5057792", "text": "function getNamedObjs(ele){\n res = {}\n tt = $(ele).find('[name]')\n for( var t=0; t< tt.length;t++){\n res[$(tt[t]).attr('name')] = $(tt[t]).valorhtml()\n }\n //console.log(res)\n return res;\n}", "title": "" }, { "docid": "54bad2047fb2162d4a5f8239f3851a61", "score": "0.5057542", "text": "function elementCreate(name,overriddenRenderer){var native;var rendererToUse=overriddenRenderer||renderer;if(isProceduralRenderer(rendererToUse)){native=rendererToUse.createElement(name,_currentNamespace);}else{if(_currentNamespace===null){native=rendererToUse.createElement(name);}else{native=rendererToUse.createElementNS(_currentNamespace,name);}}return native;}", "title": "" }, { "docid": "7d9e8332be73489b439f3168768d48fb", "score": "0.50565225", "text": "function xCreateElement(sTag)\r\n{\r\n if (document.createElement) return document.createElement(sTag);\r\n else return null;\r\n}", "title": "" }, { "docid": "fd3b381004c01e6af4bf8217b24ff671", "score": "0.5056512", "text": "function changeName() {\n\t//if the name had children already inside of the element, give it a 'null'\n\t//so that other name can replace it.\n\tif (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\tname.textContent = '';\n\t\t//this appends the title variable i created and declared with the \n\t\t//set attribute tag.\n\t\tname.appendChild(hayTitle);\n\t} \n\t//if the name has simons name in it, remove it.\n\telse if (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\t//removes simon's title out of the container if its there.\n\t\tname.removeChild(document.getElementById(\"simTitle\"));\n\t\tname.appendChild(hayTitle);\n\t}\n}", "title": "" }, { "docid": "fd3b381004c01e6af4bf8217b24ff671", "score": "0.5056512", "text": "function changeName() {\n\t//if the name had children already inside of the element, give it a 'null'\n\t//so that other name can replace it.\n\tif (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\tname.textContent = '';\n\t\t//this appends the title variable i created and declared with the \n\t\t//set attribute tag.\n\t\tname.appendChild(hayTitle);\n\t} \n\t//if the name has simons name in it, remove it.\n\telse if (name.hasChildNodes(document.getElementById(\"name\"))) {\n\t\t//removes simon's title out of the container if its there.\n\t\tname.removeChild(document.getElementById(\"simTitle\"));\n\t\tname.appendChild(hayTitle);\n\t}\n}", "title": "" }, { "docid": "e8bddb6b447f24a36ad03c96eab54aad", "score": "0.5053353", "text": "function rename(){\r\n\tconsole.log('rename started');\r\n\r\n\ti = 1;\r\n\r\n\tselected = document.getElementById(\"ctl00_AcademicsMasterContent_groupsLst\").selectedIndex;\r\n\t\r\n\tif (!document.getElementById(\"ctl00_AcademicsMasterContent_groupsLst\")[selected])\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tgroup = document.getElementById(\"ctl00_AcademicsMasterContent_groupsLst\")[selected].text;\r\n\r\n\twhile(tag = document.getElementById(\"ctl00_AcademicsMasterContent_submissionRepeater_ctl\"+pad(i)+\"_appNumDataLbl\")) {\r\n\t\tconsole.log(tag.firstChild);\r\n\t\ttag3 = document.getElementById(\"ctl00_AcademicsMasterContent_submissionRepeater_ctl\"+pad(i)+\"_nameDataLbl\");\r\n\t\t\r\n\t\tj = 0;\r\n\t\twhile(tag2 = document.getElementById(\"ctl00_AcademicsMasterContent_submissionRepeater_ctl\"+pad(i)+\"_filesRepeater_ctl\"+pad(j)+\"_filesDataLink\")) {\r\n\t\t\tconsole.log(tag2.firstChild.data);\r\n\t\t\ttag2.replaceChild(document.createTextNode(group+\"`\"+tag.firstChild.data +\"`\"+ tag3.firstChild.data+\"`\"+tag2.firstChild.data),tag2.firstChild);\r\n\t\t\tj++;\r\n\t\t}\r\n\t\ti += 2;\r\n\t}\r\n}", "title": "" }, { "docid": "06e24a8388695ddc8cde8c0598bd0183", "score": "0.50509995", "text": "function check_all(name, element)\n{\n if(!element || !element.form) return alert('falscher Parameter');\n var box = element.form.elements[name];\n if(!box) return alert(name + ' existiert nicht!');\n if(!box.length) box.checked = element.checked;\n else\n for(var i = 0; i < box.length; i++) box[i].checked = element.checked;\n}", "title": "" }, { "docid": "4e3b4f50a89d9ddf85986216f7e752ce", "score": "0.50483006", "text": "function _mkdom(html) {\n\n\t var match = html && html.match(/^\\s*<([-\\w]+)/),\n\t tagName = match && match[1].toLowerCase(),\n\t rootTag = rootEls[tagName] || GENERIC,\n\t el = mkEl(rootTag)\n\n\t el.stub = true\n\n\t if (checkIE && tagName && (match = tagName.match(SPECIAL_TAGS_REGEX)))\n\t ie9elem(el, html, tagName, !!match[1])\n\t else\n\t el.innerHTML = html\n\n\t return el\n\t }", "title": "" } ]
bc9d0f8fd9799b05040f7013a84b1d16
Function Codes toggleDatePicker is passed through (e) Event
[ { "docid": "a030916bf0e71c5621d92fd6d00bb979", "score": "0.7949968", "text": "function toggleDatePicker (e) {\n if (!checkEventPathForClass(e.path, 'dates')){\n dates_element.classList.toggle('active');\n }\n \n}", "title": "" } ]
[ { "docid": "d6d97cb2c6007d6379c402007b14509b", "score": "0.7125571", "text": "onChangeDate(date, dateString) {\n this.props.handleClickParent(date._d);\n console.log(\" \")\n console.log(\"from enfant Datepicker :\")\n console.log(\"date choisie --->\", date._d, \"date string -->\", dateString)\n console.log(\"log pour trouver ce qui actionne le btn annuler--> \", date);\n }", "title": "" }, { "docid": "7b148f7ec8bab1bf9d7512d63a93a6e3", "score": "0.6954777", "text": "function OpenDatePicker($event, opened) {\n $event.preventDefault();\n $event.stopPropagation();\n BookingServiceAndReferenceCtrl.ePage.Masters.DatePicker.isOpen[opened] = true;\n }", "title": "" }, { "docid": "a50e41ed2b99e3edb4733adf7e775f11", "score": "0.68805355", "text": "_showDatePicker(e) { // eslint-disable-line no-unused-vars\n if (!this.readonly && !this.disabled) {\n if (this.dropdownMode) {\n if (!this.expand && !this.openOnFocus) {\n this.__expandDropDown();\n }\n } else {\n if (!this.dialogAttached) {\n this.set('dialogAttached', true);\n this.async(function () {\n this.$$('#_picker').open();\n }.bind(this), 0);\n } else {\n this.$$('#_picker').open();\n }\n }\n }\n }", "title": "" }, { "docid": "fe5c9687074fe2d4c712ad694b0ab23e", "score": "0.681877", "text": "function dateInputListener(event) {\n \"use strict\";\n $(\"#entry-duedate\").fdatepicker({\n format: \"mm-dd-yyyy\"\n }).show();\n\n event.stopPropagation();\n}", "title": "" }, { "docid": "a3fb44c9cf1f6ea50dd672f2a99d92cd", "score": "0.6764892", "text": "function DateClickedHelper() {\n }", "title": "" }, { "docid": "e17f7595d3f8c88e75a2d0c49ba82bab", "score": "0.6752583", "text": "handleDatePicker() {\n this.setState({\n show_date: true\n })\n }", "title": "" }, { "docid": "dd170de13534a5cd8fd2301dd2ab09bc", "score": "0.66927505", "text": "function datepickerchange_event_trigger() {\n $('#datetimepicker').trigger('dp.change');\n}", "title": "" }, { "docid": "b525835e68afb0518a6a58550c8efd3c", "score": "0.6665294", "text": "function calendarClicked(e) {\n\tvar view = e.source;\n\tview.date && $.trigger('change', { type: 'selected', date: moment(view.date), view: view });\n}", "title": "" }, { "docid": "79600245040878e014cd42d1c62d3566", "score": "0.658992", "text": "listenDatePickerClick() {\n document.addEventListener('click', this.handleGlobalClick)\n }", "title": "" }, { "docid": "e19bacf4a962d752547287eb2a2af1ba", "score": "0.6584426", "text": "function bindDatePicker(e) {\r\n var $this = $(this);\r\n\r\n if ( $this.find('input').is(':disabled')) {\r\n e.cancelBubble = true;\r\n e.preventDefault();\r\n return;\r\n }\r\n\r\n initDatePicker($this);\r\n\r\n console.log('show date picker.');\r\n $this.datepicker('show');\r\n\r\n e.cancelBubble = true;\r\n e.preventDefault();\r\n }", "title": "" }, { "docid": "a35b52e31101f06f4bafc0c9384b3d82", "score": "0.6543477", "text": "dateClick(date) {\n // Switch current date\n this.setState({\n activeDate: date,\n });\n }", "title": "" }, { "docid": "752a5eca3efe82622a9ebbbd37c93355", "score": "0.6531391", "text": "function date_click(event) {\n $(\".events-container\").show(250);\n $(\"#dialog\").hide(250);\n $(\"#deldialog\").hide(250);\n $(\".active-date\").removeClass(\"active-date\");\n $(this).addClass(\"active-date\");\n show_events(event.data.events, event.data.month, event.data.day);\n}", "title": "" }, { "docid": "d8bcf0db5cb9c4d1faf8171a7ff7891e", "score": "0.6529145", "text": "function Datepicker() {}", "title": "" }, { "docid": "104dd40ad8ffd05c2d2eb3e131425941", "score": "0.64988995", "text": "function Datepicker() { }", "title": "" }, { "docid": "4ce490bf254bcc70ba6f033e9c51aa28", "score": "0.6483257", "text": "function listenClickDatepickers(){\n\n _datepickers.forEach((element, index) => {\n \n element.setAttribute('datepicker-id', `dpd${index}`);\n\n element.addEventListener('click', (e) => { \n\n const x = e.target.offsetLeft - e.target.scrollLeft;\n const y = e.target.offsetTop - e.target.scrollTop + e.target.offsetHeight + 5;\n\n const currentId = element.getAttribute('datepicker-id');\n\n currentId === _datepickerId ? toggle() : show();\n\n _datepickerId = currentId;\n\n setPosition({left: x, top: y});\n\n })\n })\n }", "title": "" }, { "docid": "05424311906099bbf31a99f99a9e5cec", "score": "0.64489096", "text": "function callEventClick(pr_callback, pr_date_utc ) {\n this_el.find('.t-dates').on('click', function(e) {\n // trigger CO or CI\n if ( $(e.target).parents('.t-check-in').hasClass('t-check-in') === true ) {\n $(e.target).trigger('clickDateCI', [pr_date_utc]);\n }\n if ( $(e.target).parents('.t-check-out').hasClass('t-check-out') === true ) {\n // console.log(pr_date_utc)\n $(e.target).trigger('clickDateCO', [pr_date_utc]);\n }\n // trigger làm gì trước khi show calendar\n if ( $('.t-datepicker-day').length === 0 ) {\n $(this).trigger('beforeShowDay');\n }\n // Kiểm tra giá trị của CI === 'null' thì luôn show calendar ở CI\n var click = $(this).parent(); // -> .class t-check-in or .t-check-out\n if ( $(this).parents('.t-datepicker').find('.t-input-check-in').val() === 'null'\n && $(this).parents('.t-check-out').find('.t-input-check-out').val() === 'null' ) {\n click = $(e.target).parents('.t-datepicker').find('.t-check-in');\n $(e.target).trigger('clickDateCI', [pr_date_utc]);\n }\n // Click remove all theme calendar\n getTableCalendar(click, pr_date_utc[0])\n setTimeout( function(){\n if ( $('.t-datepicker-day').length !== 0 ) {\n $(e.target).trigger('afterShowDay');\n } else {\n $(e.target).trigger('toggleAfterHideDay');\n }\n }, 1 )\n })\n if ( pr_callback != '' ) {\n getTableCalendar(pr_callback, pr_date_utc[0]);\n }\n }", "title": "" }, { "docid": "aa5d008bf2f7e0d8296cfd9aca9c7289", "score": "0.6426165", "text": "function setDatepickerDate() {\n calcTimespan()\n blurDatePicker()\n}", "title": "" }, { "docid": "4194a67edc5e78ce66be54a108d1854a", "score": "0.6421253", "text": "function OpenGridControlDatePicker(ele) {\n try {\n if ($(ele).closest('td').parent().text().toUpperCase().indexOf('DATE') != -1) {\n $(ele).datepicker({\n dateFormat: \"dd-M-y\",\n defaultDate: '',\n showOn: \"button\",\n buttonImage: strSiteURL + \"/Content/images/ol_down.png\",\n buttonImageOnly: true,\n buttonText: \"Select date\",\n onSelect: function (dateText, inst) {\n $(this).closest(\"input\").focus();\n }\n });\n\n if ($(ele).hasClass(\"inputwithborder\")) {\n $(ele).removeClass(\"inputwithborder\").addClass(\"inputnoborder\");\n }\n }\n else {\n if ($(ele).parent().find('input[type=text]') == true)\n $(ele).parent().find('input[type=text]').show();\n }\n }\n catch (e) {\n console.log('Error Occured at : common.js - OpenGridControlDatePicker')\n }\n}", "title": "" }, { "docid": "3886bb8f5b023379dc508b1267e04d21", "score": "0.6413949", "text": "handleDayClick(day, month, year) {\n this.setState({\n selectDate: [month, day, year],\n showCalendar:false,\n showAdults: true,\n showOptions:false,\n });\n }", "title": "" }, { "docid": "7b56d96ca5578afb7d7940dcfa1d7783", "score": "0.6354612", "text": "function handleDatePicker(e) {\n var node = $(e.currentTarget);\n if (node.hasClass('add') !== true){\n node.children('.ui-datepicker-trigger').remove();\n node.children('input.datepicker').remove();\n node.children('span.showdate').remove();\n node.children('span.description').after(\"<input type='hidden' class='datepicker'/>\");\n\n createDatepicker();\n \n node.children('span.timestamp').attr('rel', '0');\n \n if ($('a#later').hasClass('active') || $('a#someday').hasClass('active') ||\n $('a#thisweek').hasClass('active') || $('a#tomorrow').hasClass('active') ||\n $('a#today').hasClass('active')) {\n // Store the parent, before removing the element\n var parentList = node.parent();\n \n // Remove the object from the filter list\n node.remove();\n \n // If the parent list now is empty, remove it and it's headline\n if (parentList.children('li').size() < 1 ) {\n parentList.prev().remove();\n parentList.remove();\n }\n \n // If the view is not empty, reload it\n if ($('#content li').size() < 1) {\n if ($('a#later').hasClass('active') || $('a#someday').hasClass('active') ||\n $('a#thisweek').hasClass('active')) {\n setTimeout(function () {\n $('#bottombar #left a.filter.active').trigger('click');\n }, 250);\n }\n }\n }\n } else {\n $('#add-input-date').fadeOut(250, function () {\n $('div.addwrapper').animate({ right: '15px' }, 300);\n node.children('div.addwrapper').children('span.showdate').remove();\n });\n \n var adder = $('.add .input-add');\n if(adder.val().length > 0) {\n adder.select();\n } else {\n adder.focus();\n }\n }\n \n $('#ui-datepicker-div').hide();\n \n if (node.hasClass('add') !== true) {\n wunderlist.helpers.task.set({\n id: node.attr('id'),\n date: 0\n }).update();\n }\n\n setTimeout(function() {\n datePickerOpen = false;\n }, 10);\n }", "title": "" }, { "docid": "66ba9c9375a9ab54488b792e70485637", "score": "0.6338696", "text": "function toggleAddDatesButton() {\n //Disable button if one of the texboxes does not have a date\n if ($(\"#date-end\").datepicker('getDate') && $(\"#date-start\").datepicker('getDate')) {\n //Check that the year is 4 characters otherwise don't enable it either\n if ($(\"#date-end\").val().split(\"/\")[2].length === 4 && $(\"#date-start\").val().split(\"/\")[2].length === 4) {\n $(\"#add-dates\").prop('disabled', false);\n $(\"#add-dates-tooltip\").tooltip('disable');\n $(\"#add-dates-tooltip\").removeClass('disabled');\n } else {\n $(\"#add-dates\").prop('disabled', true);\n $(\"#add-dates-tooltip\").tooltip('enable');\n $(\"#add-dates-tooltip\").addClass('disabled');\n }\n } else {\n $(\"#add-dates\").prop('disabled', true);\n $(\"#add-dates-tooltip\").tooltip('enable');\n $(\"#add-dates-tooltip\").addClass('disabled');\n }\n }", "title": "" }, { "docid": "00a75723943a4bc9e79ce8ec45991037", "score": "0.63378996", "text": "function toggleOn(date,color,state) {\n\n\t//performs two Jquery filtering:\n\t//1. look for <td> and match record where data-date = date\n\t//2. only focus on the record whose class has fc-widget-content\n\t$(\"td[data-date=\" + date.format()+ \"][class*= fc-widget-content]\").css('background-color', color);\n\t// Add date to list\n\tvar day = parseInt(date.format('DD'));\n\tswitch (state){\n\t\tcase 0:\n\t\t\tif (blockOutDays.indexOf(day) == -1){\n\t\t\t\tblockOutDays.push(day);\n\t\t\t};\t\t\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (preferredDays.indexOf(day) == -1){\n\t\t\t\tpreferredDays.push(day);\n\t\t\t};\t\t\t\n\t\t\tbreak;\t\t\t\n\t\tcase 2:\n\t\t\tif (leaveDays.indexOf(day) == -1){\n\t\t\t\tleaveDays.push(day);\n\t\t\t};\n\t\t\tbreak;\t\t\t\t\n\t}\n}", "title": "" }, { "docid": "96ba9e396b8a3758c1ce55b36d3ef8e1", "score": "0.6332211", "text": "function oneHandler(e) {\n /*\n Prevent double-firing when events bubble from a shadow DOM.\n This works even if we have shadow DOMs within shadow DOMs within...\n */\n if (e.__qs_shadow_dom) return\n\n var keyCode = e.which || e.keyCode\n var type = e.type\n var target = e.target\n var classList = target.classList\n var instance = datepickers.filter(function(picker) {\n return picker.calendar.contains(target) || picker.el === target\n })[0]\n var onCal = instance && instance.calendar.contains(target)\n\n\n // Ignore event handling for mobile devices when disableMobile is true.\n if (instance && instance.isMobile && instance.disableMobile) return\n\n\n ////////////\n // EVENTS //\n ////////////\n\n if (type === 'click') {\n // Anywhere other than the calendar - close the calendar.\n if (!instance) return datepickers.forEach(hideCal)\n\n // Do nothing for disabled calendars.\n if (instance.disabled) return\n\n var calendar = instance.calendar\n var calendarContainer = instance.calendarContainer\n var disableYearOverlay = instance.disableYearOverlay\n var nonInput = instance.nonInput\n var input = calendar.querySelector('.qs-overlay-year')\n var overlayClosed = !!calendar.querySelector('.qs-hidden')\n var monthYearClicked = calendar.querySelector('.qs-month-year').contains(target)\n var newMonthIndex = target.dataset.monthNum\n\n // Calendar's el is 'body'.\n // Anything but the calendar was clicked.\n if (instance.noPosition && !onCal) {\n // Show / hide a calendar whose el is html or body.\n var calendarClosed = calendarContainer.classList.contains('qs-hidden')\n ;(calendarClosed ? showCal : hideCal)(instance)\n\n // Clicking the arrow buttons - change the calendar month.\n } else if (classList.contains('qs-arrow')) {\n changeMonthYear(classList, instance)\n\n // Clicking the month/year - open the overlay.\n // Clicking the X on the overlay - close the overlay.\n } else if (monthYearClicked || classList.contains('qs-close')) {\n if (!disableYearOverlay) toggleOverlay(!overlayClosed, instance)\n\n // Clicking a month in the overlay - the <span> inside might have been clicked.\n } else if (newMonthIndex) {\n overlayYearEntry(e, input, instance, newMonthIndex)\n\n // Clicking a disabled square or disabled overlay submit button.\n } else if (classList.contains('qs-disabled')) {\n return\n\n // Clicking a number square - process whether to select that day or not.\n } else if (classList.contains('qs-num')) {\n var num = target.textContent\n var monthDirection = +target.dataset.direction // -1, 0, or 1.\n var dateInQuestion = new Date(instance.currentYear, instance.currentMonth + monthDirection, num)\n\n /*\n If the user clicked on a date within the previous or next month,\n reset the year, month, and month name on the instance so that\n the calendar will render the correct month.\n */\n if (monthDirection) {\n instance.currentYear = dateInQuestion.getFullYear()\n instance.currentMonth = dateInQuestion.getMonth()\n instance.currentMonthName = months[instance.currentMonth]\n\n // Re-render calendar to navigate to the new month.\n renderCalendar(instance)\n\n /*\n Since re-rendering the calendar re-creates all the html,\n the original target is gone. Reset it so that `selectDay`\n can highlight (or unhighlight) the correct DOM element.\n */\n var newDays = instance.calendar.querySelectorAll('[data-direction=\"0\"]')\n var newTarget\n var idx = 0\n\n while (!newTarget) {\n var newDay = newDays[idx]\n if (newDay.textContent === num) newTarget = newDay\n idx++\n }\n\n target = newTarget\n }\n\n if (+dateInQuestion === +instance.dateSelected) {\n selectDay(target, instance, true)\n } else if (!target.classList.contains('qs-disabled')) {\n selectDay(target, instance)\n }\n\n return\n\n // Clicking the submit button in the overlay.\n } else if (classList.contains('qs-submit')) {\n overlayYearEntry(e, input, instance)\n // Clicking the calendar's el for non-input's should show it.\n } else if (nonInput && target === instance.el) {\n showCal(instance)\n hideOtherPickers(instance)\n }\n\n /*\n Only pay attention to `focusin` events if the calendar's el is an <input>.\n We use the `focusin` event because it bubbles - `focus` does not bubble.\n */\n } else if (type === 'focusin' && instance) {\n // Show this intance.\n showCal(instance)\n\n // Hide all other instances.\n hideOtherPickers(instance)\n } else if (type === 'keydown' && keyCode === 9 && instance) {\n // Hide this instance on tab out.\n hideCal(instance)\n } else if (type === 'keydown' && instance && !instance.disabled) {\n var overlay = instance.calendar.querySelector('.qs-overlay')\n var overlayShowing = !overlay.classList.contains('qs-hidden')\n\n // Pressing enter while the overlay is open.\n if (keyCode === 13 && overlayShowing && onCal) {\n overlayYearEntry(e, target, instance)\n\n // ESC key pressed.\n } else if (keyCode === 27 && overlayShowing && onCal) {\n toggleOverlay(true, instance)\n }\n } else if (type === 'input') {\n // Avoid applying these restrictions to other inputs on the page.\n if (!instance || !instance.calendar.contains(target)) return\n\n // Only allow numbers & a max length of 4 characters.\n var submitButton = instance.calendar.querySelector('.qs-submit')\n var newValue = target.value\n .split('')\n // Prevent leading 0's.\n .reduce(function(acc, char) {\n if (!acc && char === '0') return ''\n return acc + (char.match(/[0-9]/) ? char : '')\n }, '')\n .slice(0, 4)\n\n // Set the new value of the input and conditionally enable / disable the submit button.\n target.value = newValue\n submitButton.classList[newValue.length === 4 ? 'remove' : 'add']('qs-disabled')\n }\n}", "title": "" }, { "docid": "ae5dfd5541fbe2690615f2b0f894eada", "score": "0.6262155", "text": "eventsHandler(date) {\n this.setState({\n eventTab: {\n isOpened: true,\n date: date.format(formats.eventDate)\n }\n })\n }", "title": "" }, { "docid": "151faa06afd90d09d55e08a273cd9bf3", "score": "0.6199572", "text": "function datepickerupdate_event_trigger() {\n $('#datetimepicker').trigger('dp.update');\n}", "title": "" }, { "docid": "830fa751cd2c5c5c5bcaf63705304368", "score": "0.6177564", "text": "function setDuedateListener() {\n $(\"#duedate-wrapper\").bind(\"click\", function(event) {\n dateInputListener(event);\n\n event.preventDefault();\n event.stopPropagation();\n });\n}", "title": "" }, { "docid": "17f23aee4c62ff6c8a25691a2f68f167", "score": "0.61690867", "text": "function OnSelectDate(dateSel) {\n var formId = $(this).parents(\"form\").attr('id');\n var dtClass = $(this).attr('class');\n var dateFromInput = $(\"#\" + formId + \" .EtDateFromGN\");\n var dateToInput = $(\"#\" + formId + \" .EtDateToGN\");\n var newdate, dateFrom, dateTo;\n\n //ESTA SECCIÓN IDENTIFICA A QUE CALENDARIO SE LE DA CLICK\n if (dtClass.indexOf('EtDateFromGN') >= 0) {\n dateFrom = $(this).datepicker(\"getDate\");\n dateTo = dateToInput.datepicker(\"getDate\");\n var daysDiff = Math.round((dateTo - dateFrom) / 864e5);\n newdate = addDate(dateFrom, '+1', 'd'); //Nueva fecha para el input EtDateToGN\n\n if (dateFrom >= dateTo || daysDiff > eTMaxDays) {\n dateToInput.datepicker(\"option\", \"maxDate\", null); // Se establece en null para habilitar todos los dias y poder poner la nueva fecha\n dateToInput.datepicker(\"setDate\", newdate);\n } // Asignamos el nuevo valor al input EtDateToGN\n \n } else {\n dateFrom = dateFromInput.datepicker(\"getDate\");\n dateTo = $(this).datepicker(\"getDate\");\n newdate = addDate(dateTo, '-1', 'd'); //Nueva fecha para el input EtDateFromGN\n if ( dateTo <= dateFrom) {\n dateFromInput.datepicker(\"setDate\", newdate);\n } // Asignamos el nuevo valor al input EtDateFromGN \n }\n }", "title": "" }, { "docid": "53a91b87f17d192ef37582391c9f4e07", "score": "0.61622965", "text": "function IsEnableDatePicker(vControlId, b) {\n\n if (typeof vControlId != 'undefined' && !IsBlank(vControlId) && $('#' + vControlId).length > 0) {\n\n if (typeof b == 'undefined')\n b = true;\n\n if (b) {\n\n $('#' + vControlId).prop('disabled', false);\n $('#' + vControlId).removeClass('disable-pointer-events');\n\n var downArrowDiv = $('#' + vControlId).closest('.editableControl').find('.ui-datepicker-trigger');\n\n if (typeof downArrowDiv != 'undefined')\n downArrowDiv.removeClass('disable-pointer-events');\n\n } else {\n\n $('#' + vControlId).prop('disabled', true);\n $('#' + vControlId).addClass('disable-pointer-events');\n\n var downArrowDiv = $('#' + vControlId).closest('.editableControl').find('.ui-datepicker-trigger');\n\n if (typeof downArrowDiv != 'undefined')\n downArrowDiv.addClass('disable-pointer-events');\n\n }\n }\n}", "title": "" }, { "docid": "aa8dc74cec126cccbebcbe5714bfc6cf", "score": "0.61210936", "text": "onDateChange(toDate) {\n this.setState({\n browseDate: toDate,\n selectedEvent: null\n });\n }", "title": "" }, { "docid": "d7640a0d56090685d6339cef8d2a4e21", "score": "0.6103302", "text": "onChangeDate(e) {\n this.setState({\n date: e.target.value\n });\n }", "title": "" }, { "docid": "e70d54d20c977d9ca80f6e1ba8cb83b1", "score": "0.6051876", "text": "function datepickerchange_event_register() {\n $('#datetimepicker').on('dp.change', function(e){\n var date;\n\n if(e != null)\n date = moment(e.date).format('L');\n else\n date = moment();\n\n var serialized = \"date=\"+date;\n ajax_req(php_stat, serialized, select_fill, select_fill_error);\n datepickerupdate_event_trigger();\n });\n}", "title": "" }, { "docid": "c000af1d1f3bbc535083abb431fa7238", "score": "0.60502833", "text": "function changeTimeSelector() {\n const date = $(\"#datepicker\").datepicker(\"getDate\");\n if (selectedActivity && date) {\n activateScheduleBtn();\n }\n}", "title": "" }, { "docid": "a0602fa7cb759657ec78195e22e6ef86", "score": "0.6037517", "text": "_datePicked(e) { // eslint-disable-line no-unused-vars\n if(this.fieldId) {\n this.fire('oe-field-changed', {fieldId: this.fieldId, value: e.detail}); \n }\n }", "title": "" }, { "docid": "0f66d8973a7b5843fb6f7edb4db28c8a", "score": "0.60336274", "text": "handleCalendarClick() {\n this.setState({\n showCalendar: !this.state.showCalendar,\n showAdults:false,\n showOptions:false,\n })\n }", "title": "" }, { "docid": "b3f61eddea04000f14081e0282f0e4c5", "score": "0.60241216", "text": "onOutsideCLick($click) {\n let isDatepickerAreaClick = $click.path.some(path => {\n if (path.className) {\n return path.className.includes('mat-datepicker');\n }\n });\n if (isDatepickerAreaClick) {\n const r = $click.path.some(path => {\n if (path.className) {\n return path.className.includes('mat-overlay');\n }\n });\n if (r) {\n isDatepickerAreaClick = false;\n }\n }\n const isDatepickerCancel = $click.path.some(ele => {\n if (ele.id) {\n return ele.id.includes('datepicker-cancel');\n }\n });\n const isDatepickerApply = $click.path.some(ele => {\n if (ele.id) {\n return ele.id.includes('datepicker-apply');\n }\n });\n if (isDatepickerCancel || isDatepickerApply) {\n this.onChange('start');\n this.onChange('end');\n this.picker.close = this.selfClose;\n this.picker.close();\n this.removeExpandedClass();\n if (isDatepickerApply) {\n this.apply.emit({ start: this.config.formGroup.get('start').value, end: this.config.formGroup.get('end').value });\n }\n }\n else if (!isDatepickerAreaClick) {\n this.picker.close = this.selfClose;\n this.picker.close();\n this.removeExpandedClass();\n }\n }", "title": "" }, { "docid": "bc7e652f7e7378a98ece72ed147cc579", "score": "0.6022349", "text": "function setDatePicker(){\n $('#record_date').datepicker({dateFormat: 'yy-mm-dd',\n // first date possible to choose\n minDate: new Date(2019, 4 - 1, 21),\n // last date is today\n maxDate: 0,\n duration: \"fast\"});\n // cannot write into datepicker input\n $(\"#record_date\").attr('readOnly', 'true');\n // submit disabled until user chooses date\n $('div.input-datepicker input[type=\"submit\"]').attr(\"disabled\", true);\n }", "title": "" }, { "docid": "efdcbacabe674d42de0968298cf17534", "score": "0.6016508", "text": "function openDueDateFilter($event) {\n angular.element($event.srcElement).next().toggleClass('is-open');\n }", "title": "" }, { "docid": "54dd2ee7add7c4cbdde1ccc62f6acabb", "score": "0.6014431", "text": "changeIsEditingDueDate(value) {\n this.setState({ isEditingDueDate: value });\n }", "title": "" }, { "docid": "7675bcfff595276db50fc247e4a652c4", "score": "0.60034406", "text": "function DatePickerOnClose()\n{\n _dateHasChanged = true;\n}", "title": "" }, { "docid": "b59cfc724a2e509db44a2c1afa1ccaef", "score": "0.5992569", "text": "function onDayChosen() {\n $allData.prop('checked', false);\n showProjectTbsDeployed(program, year, month, day);\n }", "title": "" }, { "docid": "efc3f9e09cb823a0ce326f24e1ad9de6", "score": "0.5969836", "text": "onButtonClickHandler() {\n const { exactDate, dateClick, id } = this.props;\n dateClick(exactDate);\n this.setState((prevState) => ({\n clicked: !prevState.clicked,\n }));\n this.changeClicked(id);\n }", "title": "" }, { "docid": "7d6fd3bfb8482f5b6a0af7a69b95b81d", "score": "0.5968795", "text": "function dueDate() {\n\t// open modal\n\tdocument.getElementById(\"setTaskDate\").addEventListener(\"click\", openDueDate);\n\n\t// sliders\n\tdocument.getElementById(\"sliderHour\").addEventListener(\"input\", getSliderHour);\n\tdocument.getElementById(\"sliderMin\").addEventListener(\"input\", getSliderMin);\n}", "title": "" }, { "docid": "96be838364981cd55f7cf8753d84c952", "score": "0.59612876", "text": "changeDate(event){\n event.preventDefault();\n this.setState({\n date:event.target.value\n });\n }", "title": "" }, { "docid": "7210f8a11f7b470253a2521a1c7bfd08", "score": "0.59474254", "text": "activateDate(date) {\n let momentDate = moment(date.fday);\n\n this.setState({\n month: momentDate.get('month'),\n weekDay: momentDate.format(formats.weekDay),\n day: momentDate.format('D'),\n fDay: momentDate.format(formats.eventDate)\n });\n\n this.eventsHandler(momentDate);\n }", "title": "" }, { "docid": "0e64226b4b85367bf49091fb8aa19cc1", "score": "0.5939242", "text": "onModalToggleEdit(supplierID) {\n\t\treturn (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tthis.props.getSupplier(supplierID);\n\t\t\tthis.ModalFunction();\n\t\t\tEditButtonIsClicked = true;\n\t\t};\n\t}", "title": "" }, { "docid": "cf3087eb06a1eed3adbf45028e25a20c", "score": "0.59225863", "text": "function d(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[\"\"]),this.regional.en=e.extend(!0,{},this.regional[\"\"]),this.regional[\"en-US\"]=e.extend(!0,{},this.regional.en),this.dpDiv=h(e(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}", "title": "" }, { "docid": "efb220fd57ea089213ab7a4b2c229a2d", "score": "0.5909324", "text": "OpenDatepicker() {\n var me = $(this).siblings('.input-datepicker');\n me.datepicker({ dateFormat: 'dd/mm/yy' });\n me.focus();\n }", "title": "" }, { "docid": "77ed45f50bd89c6a018c22270895fc8d", "score": "0.59052265", "text": "switchClockCalendar(e){\r\n e.preventDefault(); //e - event for event listener\r\n this.isClock = !this.isClock;\r\n this.run();\r\n }", "title": "" }, { "docid": "71f1caee1d5887ada3f781ec53eb4fbb", "score": "0.5903595", "text": "selectManualDate(){\n this.selectedDate=this.selectedDate;\n this.changeDate='off';\n }", "title": "" }, { "docid": "7db7e9d42cfdec13f75b12fdd2a7fffb", "score": "0.5902006", "text": "function showhideDates(event, mode, calledFromUI) {\n // mode = mode ? mode : pageMode;\n IntakeCalendarEventHelper.showhideDates(event, mode);\n self.eventNameCheck = event.name; // for personal category disable\n setReminderDaysList(self.calendarEvent.label_id);\n if (event.label_id == '1' && !event.start_date) {\n event.start_date = new Date(event.start_date)\n getFormattedDateString(event);\n }\n\n if (calledFromUI) {\n self.calendarEvent.disableFullDay = false;\n if (moment.isDate(event.utcstart)) {\n event.end_date = utils.getFormattedDateString(event.start_date);\n } else {\n event.end_date = utils.getFormattedDateString(new Date(event.start_date));\n }\n }\n }", "title": "" }, { "docid": "288b3c490ecba3d34b55c72b7250d919", "score": "0.5897865", "text": "function changeDateFunc() {\n\n document.getElementById(`changeDateButton`).style.display = `none`;\n document.getElementById(`makeNoteButton`).style.display = `none`;\n document.getElementById(`revealNotesButton`).style.display = `none`;\n document.getElementById(`hideNotesButton`).style.display = `none`;\n document.getElementById(`yearSelect`).style.display = `initial`;\n document.getElementById(`yearSelect`).value = ``;\n\n}", "title": "" }, { "docid": "5063a9e2b0e2f77795c3c430bdd8bf1b", "score": "0.58973914", "text": "function showDateInput(e) {\r\n var cell = e.target;\r\n if (!hasPermission(cell)) return;\r\n\r\n cell_being_edited = cell;\r\n var value = $(this).html();\r\n previousValue = value;\r\n\r\n var date = $(\"<input type='text' class='datepicker' value='\" + value + \"'>\");\r\n $(this).html(date);\r\n $(date).focus();\r\n\r\n var table = $(cell).closest('table');\r\n disableEditing();\r\n adjustTables();\r\n }", "title": "" }, { "docid": "bde24a0a83fd48766b1018ea7d6e04b9", "score": "0.58865446", "text": "buildCalendarButton() {\n this.datepicker = new DatePicker({\n classes: ['menu'],\n timepicker: this.timepicker,\n onselect: (value) => {\n this.value = value;\n this.triggerbutton.close();\n this.input.focus();\n this.validate();\n if ((this.onchange) && (typeof this.onchange === 'function')) {\n this.onchange(this);\n }\n }\n });\n this.triggerbutton = new ButtonMenu({\n classes: ['naked', 'datepicker'],\n shape: 'square',\n gravity: 'n',\n icon: this.dateicon,\n arialabel: this.triggerarialabel,\n menu: this.datepicker.container,\n action: (e, self) => {\n if (self.isopen) {\n self.close();\n this.input.focus();\n } else {\n self.open();\n this.datepicker.renderMonth(this.value);\n }\n e.stopPropagation();\n },\n });\n\n this.calbutton = document.createElement('div');\n this.calbutton.classList.add('calbutton');\n this.calbutton.classList.add('inputcontrol');\n this.calbutton.appendChild(this.triggerbutton.button);\n\n this.calbutton.addEventListener('mousedown', (e) => {\n e.preventDefault(); // Prevents focus shifting.\n });\n\n }", "title": "" }, { "docid": "bc57881b7288c521bf1d6114d713e56f", "score": "0.5884094", "text": "function openCalender($event) {\n $event.preventDefault();\n $event.stopPropagation();\n }", "title": "" }, { "docid": "d58a05ceb8a3f512e75be44499922fde", "score": "0.5872749", "text": "onToggleEvent(event) {\n\t\tevent.stopPropagation();\n\t\tthis.toggleDialog();\n\t}", "title": "" }, { "docid": "020b49a7869d8c0eedf3ad30dd5c5b1d", "score": "0.58708787", "text": "function dayMarkHandler(e) {\n if (\n e.target.dataset.current === \"true\" &&\n e.target.dataset.past === \"false\"\n ) {\n dateHandler(+e.target.dataset.day);\n }\n }", "title": "" }, { "docid": "7046f2eb21b52b9ef25d8b4a17d5240d", "score": "0.58678263", "text": "onOutsideCLick($click) {\n let isDatepickerAreaClick = $click.path.some(path => {\n if (path.className) {\n return path.className.includes('mat-datepicker');\n }\n });\n if (isDatepickerAreaClick) {\n const r = $click.path.some(path => {\n if (path.className) {\n return path.className.includes('mat-overlay');\n }\n });\n if (r) {\n isDatepickerAreaClick = false;\n }\n }\n const isDatepickerCancel = $click.path.some(ele => {\n if (ele.id) {\n return ele.id.includes('datepicker-cancel');\n }\n });\n const isDatepickerApply = $click.path.some(ele => {\n if (ele.id) {\n return ele.id.includes('datepicker-apply');\n }\n });\n if (!isDatepickerAreaClick || isDatepickerCancel || isDatepickerApply) {\n this.picker.close = this.selfClose;\n this.picker.close();\n this.removeExpandedClass();\n }\n }", "title": "" }, { "docid": "7046f2eb21b52b9ef25d8b4a17d5240d", "score": "0.58678263", "text": "onOutsideCLick($click) {\n let isDatepickerAreaClick = $click.path.some(path => {\n if (path.className) {\n return path.className.includes('mat-datepicker');\n }\n });\n if (isDatepickerAreaClick) {\n const r = $click.path.some(path => {\n if (path.className) {\n return path.className.includes('mat-overlay');\n }\n });\n if (r) {\n isDatepickerAreaClick = false;\n }\n }\n const isDatepickerCancel = $click.path.some(ele => {\n if (ele.id) {\n return ele.id.includes('datepicker-cancel');\n }\n });\n const isDatepickerApply = $click.path.some(ele => {\n if (ele.id) {\n return ele.id.includes('datepicker-apply');\n }\n });\n if (!isDatepickerAreaClick || isDatepickerCancel || isDatepickerApply) {\n this.picker.close = this.selfClose;\n this.picker.close();\n this.removeExpandedClass();\n }\n }", "title": "" }, { "docid": "847dd175b31588ba664f5c8f6268ab7a", "score": "0.5862786", "text": "handleOnFocus(event) {\n this.onFocus(event)\n if (this.openOnFocus) {\n this.togglePicker(true)\n }\n }", "title": "" }, { "docid": "87b79e3a692cf7dc66298203735dc2ab", "score": "0.5861455", "text": "onChangeDate(e) {\n this.setState({\n Date: e.target.value\n })\n }", "title": "" }, { "docid": "cf8657cdd9a6c0da9d80bde36f7e1a7d", "score": "0.5856457", "text": "function handleDateFilterCalendarClick(clndrDay, $focusedFormGroup) {\n var $dayEl = $(clndrDay.element);\n var $days = $dayEl.siblings();\n\n var month = Utils.pad(clndrDay.date.month() + 1, '00');\n var date = Utils.pad(clndrDay.date.date(), '00');\n var year = clndrDay.date.year();\n\n // place numbers in the correct inputs\n $focusedFormGroup.find('.month-input').val(month);\n $focusedFormGroup.find('.day-input').val(date);\n $focusedFormGroup.find('.year-input').val(year);\n\n if ($focusedFormGroup.index() == 0) {\n $days.removeClass('is-from');\n $dayEl.addClass('is-from');\n } else {\n $days.removeClass('is-to');\n $dayEl.addClass('is-to');\n }\n }", "title": "" }, { "docid": "7fd0127ed1c6d901da8b9083cacdea34", "score": "0.58551687", "text": "function demoChangeDate(event) {\r\n if(demo.CurDate >= new Date(Date.now()) && this.id == \"datePlus\"){ return; }\r\n let operator = \"\";\r\n (this.id === \"dateMinus\") ? operator = 1 : operator = 2;\r\n changeDatePlusMinus(operator);\r\n}", "title": "" }, { "docid": "eeaec152e5e0764f90a4dc6d4f3edcd9", "score": "0.585269", "text": "toggle() {\n\t\tthis._selectDialog()\n\t\t\t// work according to the current state of the dialog\n\t\tif (mdDateTimePicker.dialog.state) {\n\t\t\tthis._hideDialog()\n\t\t} else {\n\t\t\tif (this._type === 'date') {\n\t\t\t\tthis._initDateDialog(this._init)\n\t\t\t} else if (this._type === 'time') {\n\t\t\t\t// this._initTimeDialog(this._init)\n\t\t\t}\n\t\t\tthis._showDialog()\n\t\t}\n\t}", "title": "" }, { "docid": "6a952b2a7c150c03309f0bf32919db3e", "score": "0.5848379", "text": "function handleDateSelect(selectedInfo) {\n setTitleOpen(true);\n //saves the info passed in from Full Calendar to state\n setCalendarApi(selectedInfo.view.calendar);\n setSelectInfo(selectedInfo); \n }", "title": "" }, { "docid": "70f24682833d1ce94d1e82bb53a5cbcb", "score": "0.58469695", "text": "function datepickerview_event_register() {\n $('#datetimepicker').on('dp.update', function(e){\n if(e.change == 'M' || e.change == null) {\n var initdata = $('.datepicker-days tbody td').eq(CAL_FIRST_DAY).attr(\"data-day\");\n var lastdata = $('.datepicker-days tbody td').eq(CAL_LAST_DAY).attr(\"data-day\");\n var serialized = \"init=\"+initdata+\"&last=\"+lastdata;\n ajax_req(php_stat, serialized, datepicker_fill, datepicker_fill_error);\n }\n });\n}", "title": "" }, { "docid": "b568a216a83a73753419f29fc59ae381", "score": "0.58447075", "text": "function init_datepicker(){\n\n // Call function beforeOpen\n\n settings.beforeOpen(modal, settings);\n\n // Init datepicker plugin\n\n datepicker_instance = modal.find('.datepicker-in-fullscreen').datepicker(settings.datepicker)\n .datepicker('setDate', moment($input.val(), settings.format).toDate()) \n .on('changeDate', function(ev){\n\n var new_date = moment(ev.date).format(settings.format);\n\n change_value( new_date );\n change_value_fake_input( new_date );\n change_value_additional_target( new_date );\n\n // Close \n\n if(settings.closeOnChange){\n close_modal();\n }\n \n }); \n\n // Show modal with effect\n\n modal.addClass('dpifs-show');\n\n // Add event controls\n\n add_controls();\n\n // Add swipe support\n\n add_swipeSupport();\n }", "title": "" }, { "docid": "57dafa617d8b27ba8ab1994f0319ed3c", "score": "0.5841139", "text": "_openPopup() {\n this._rangeInput._openDatepicker();\n }", "title": "" }, { "docid": "fb240449b17322f06e496c4ab677edc9", "score": "0.5839733", "text": "renderDatePickerButton() {\n let linkText = 'Click here to enable the native date picker (recommended for screenreaders).';\n\n if (this.state.displayDatePicker) {\n linkText = 'Click here to disable the native date picker.';\n }\n\n // Link required because button onClick doesn't fire when button is not visible\n return (\n <a href=\"#\" className=\"sr-only\" onClick={event => this.onDatePickerToggle(event)}>{linkText}</a>\n );\n }", "title": "" }, { "docid": "6f8e05e06bb5224bb364e4bd4fbdd0f5", "score": "0.58337176", "text": "function setDatePicker() {\r\n\t$('.datepicker').datetimepicker({\r\n\t\tformat: 'DD-MM-YYYY'\r\n\t});\r\n}", "title": "" }, { "docid": "6863bcba0e7d789c75a58b527da4df2a", "score": "0.5828897", "text": "onDateSelect(date) {\n const {actions} = this.props\n var dateSelect = new Date(date)\n // console.log(dateSelect.toDateString(), nextDate.toDateString(), prevDate.toDateString())\n actions.selectDay(dateSelect);\n }", "title": "" }, { "docid": "09366ea0ea7c4dc3f5522cd1715611ec", "score": "0.58214355", "text": "onSetClicked(event) {\r\n this._checkBeforeAfterTimeValidity();\r\n if (!this.picker.dateTimeChecker(this.pickerMoment)) {\r\n this.hidePicker$.next(null);\r\n event.preventDefault();\r\n return;\r\n }\r\n this.confirmSelected$.next(event);\r\n event.preventDefault();\r\n return;\r\n }", "title": "" }, { "docid": "047398b21bafea71d3576cdde6df956b", "score": "0.5820333", "text": "_openPopup() {\n if (this._datepicker) {\n this._datepicker.open();\n }\n }", "title": "" }, { "docid": "86ad7cc3abea1a0d20f1ae666a805d99", "score": "0.5812814", "text": "openDatePicker() {\n this.$.datePicker.open();\n }", "title": "" }, { "docid": "827de942361e631959dd41e56f2c7611", "score": "0.5807313", "text": "function OnNoDateCheckChanged() {\n $('input-task-date').style.display = $('checkbox-with-date').checked ? '' : 'none';\n var taskInProcess = backGround.popupSettings.GetSavedTask();\n taskInProcess.date = $('checkbox-with-date').checked ? $('input-task-date').value : null;\n\n SetButtonAddTaskState();\n}", "title": "" }, { "docid": "cb38cc221595d433cb7ed6d99e5f0e33", "score": "0.57911855", "text": "function dayChange(e) {\n e.preventDefault();\n const dayContainer = this.closest('.filter-day__change-btn');\n addClassActive.bind(this, '.filter-day__change-btn')();\n const id = parseInt(dayContainer.dataset.id);\n var day = listTVWeek.find((item) => { return item.id === id });\n var gridTv = document.getElementById('tv-grid');\n var allElem = gridTv.querySelector('.all-day');\n gridTv.removeChild(allElem);\n var selectElm = document.querySelector('.filter-type__select');\n updateGridItems([day], TYPE_CHANNEL[selectElm.value]);\n addPopup();\n}", "title": "" }, { "docid": "11b798cf7b507aa70bf899d67b91215c", "score": "0.57885945", "text": "function switchView(isPicker) {\n if (isPicker) {\n document.getElementById('duration').style.display = 'none';\n document.getElementById('dailyDate').style.display = 'inline-block';\n document.getElementById('dailyDateLabel').style.display = 'inline-block';\n } else {\n document.getElementById('duration').style.display = 'inline-block';\n document.getElementById('dailyDate').style.display = 'none';\n document.getElementById('dailyDateLabel').style.display = 'none';\n }\n}", "title": "" }, { "docid": "2ba47a43f2222e8129228210373c30db", "score": "0.5787194", "text": "_submitClick() {\n const selectedDate = this.getSelectedDateTime();\n const value = this.getFormat().format(selectedDate);\n if (this.value !== value) {\n this._updateValueAndFireEvents(value, true, [\"change\", \"value-changed\"]);\n }\n this.closePicker();\n }", "title": "" }, { "docid": "9de364abbb0ac202423ef0c56f43fbdc", "score": "0.5779423", "text": "dateChanged(date) {\n this.setState({\n startDate: date\n }, function() {\n this.selectCompanies();\n });\n\n }", "title": "" }, { "docid": "f30b83a0b3f271950c3e132df43c2b44", "score": "0.57789457", "text": "function switchDay() {\n if ($(this).children(\".fa-arrow-right\").length) {\n thisDate = thisDate.add('1', 'd');\n } else if ($(this).attr(\"id\") === \"today\") {\n thisDate = moment().startOf(\"day\");\n } else {\n thisDate = thisDate.subtract('1', 'd');\n };\n // display the 'go to today' button if any other date is displayed\n if (thisDate.isSame(startOfDay)) {\n $(\"#today\").css(\"visibility\", \"hidden\");\n } else {\n $(\"#today\").css(\"visibility\", \"visible\");\n };\n thisDateString = thisDate.format(\"YYYY-MM-DD\");\n aptString = \"appointments\" + thisDateString;\n setPage();\n }", "title": "" }, { "docid": "7408405b73352ca40ef311a715b1d2dd", "score": "0.57765716", "text": "function getTableCalendar(pr_el, pr_date_utc) {\n // console.log(pr_el)\n if ( $(pr_el).find('.t-datepicker-day').length !== 0 ) {\n $('.t-datepicker-day').remove();\n $('.t-arrow-top').css({'display': 'none'})\n // Options autoClose\n $('html').removeClass('t-datepicker-open')\n } else {\n if ( $(pr_el).parents('.t-datepicker').hasClass('t-datepicker').length !== 0 ) {\n $('.t-datepicker-day').remove();\n $('.t-arrow-top').css({'display': 'none'})\n }\n if ( settings.iconArrowTop === true ) {\n var this_el_arrow = $(pr_el).parents('.t-datepicker');\n if ( this_el_arrow.find('.t-arrow-top').length === 0 ) {\n this_el_arrow.append('<span class=\"t-arrow-top\"></span>')\n }\n var CI_CO_width = $(pr_el).position().left + $(pr_el).outerWidth()/2\n var leftArrTop = this_el_arrow.find('.t-arrow-top').outerWidth()/2\n\n if ( this_el_arrow.find('.t-arrow-top').css('display') === 'block' ) {\n this_el_arrow.find('.t-arrow-top').css({\n 'left': CI_CO_width-leftArrTop+'px'\n })\n }\n this_el_arrow.find('.t-arrow-top').css({'display': 'block'})\n this_el_arrow.find('.t-arrow-top').animate({\n 'left': CI_CO_width-leftArrTop+'px'\n }, settings.durationArrowTop)\n }\n $(pr_el).find('.t-dates').parent().append('<div class=\"t-datepicker-day'+checkNumCalendar+'\">'+convertArrayToString(dataTheme)+'</div>')\n // Thêm calendar vào t-check-in hoặc t-check-out\n setDaysInMonth($(pr_el).find('.t-dates').parent(), pr_date_utc)\n\n // Options autoClose\n $('html').addClass('t-datepicker-open')\n }\n }", "title": "" }, { "docid": "5341836b2df9027823e2ec5afb9b2e5b", "score": "0.57756764", "text": "function toggleDossier(){\n $(\".dos-toggle\").click(function(e) {\n $(this).closest(\".content-block\").find('.dos-content').slideToggle(\"slow\", function(){\n $(this).toggleClass(\"closed\");\n //Title and date placement\n toggleTitleDate(e.target);\n });\n //Change toggle image\n $(this).toggleClass(\"glyphicon-minus glyphicon-plus\");\n });\n}", "title": "" }, { "docid": "6fb73c69ae99a3f169fcb40e775e577b", "score": "0.5773552", "text": "eventListenerMethod() {\n this.datePicker1.addEventListener(\"change\", (event) => {\n this.value1 = event.target.value;\n this.render(this.value1);\n });\n this.datePicker2.addEventListener(\"change\", (event) => {\n this.value2 = event.target.value;\n this.render(this.value2);\n });\n }", "title": "" }, { "docid": "1fea95971f424f1a688d071a7f7999d8", "score": "0.5773259", "text": "function getDatePicker() {\n return box;\n }", "title": "" }, { "docid": "a2d186a244bbfc067643732afa30a221", "score": "0.57722193", "text": "function showhideDates(event, pageMode) {\n\n if (event.is_deadline == 1) {\n event.DeadlineDatesClicked = false;\n } else {\n event.DeadlineDatesClicked = true;\n }\n event.ispersonalevent = (event.label_id == \"19\") ? \"1\" : \"0\";\n\n var fulldayEventsIds = globalConstants.fulldayEvents;\n var isFullDayEvent = fulldayEventsIds.indexOf(parseInt(event.label_id)) > -1;\n if (isFullDayEvent) {\n event.all_day = 1;\n event.criticalDatesClicked = true;\n } else {\n event.criticalDatesClicked = false;\n if (pageMode != 'edit') {\n event.all_day = 0;\n }\n }\n\n if (event.label_id == \"100\" || event.label_id == \"19\" || event.label_id == \"32\") {\n event.userdefined = 1;\n } else {\n event.userdefined = 0;\n event.event_title = '';\n }\n }", "title": "" }, { "docid": "2aa91db9c8419b43fc680611c2937cbd", "score": "0.57648206", "text": "function date() {\n\n\n var getAllInvisibleEvents= document.querySelectorAll(\"[class^=Date]\")\n \n if(getAllInvisibleEvents.length>0)\n {\n for(q=0;q<getAllInvisibleEvents.length;q++)\n {\n getAllInvisibleEvents[q].style.display=\"none\";\n }\n }\n var inputDate=document.getElementById('InputDate');\n inputDate.value=event.target.id;\n var red=document.querySelector('.cancel');\n var blue=document.querySelector('.submitScheduleEvent');\n if(red!=undefined) {\n red.setAttribute('class','red');\n blue.setAttribute('class','blue');\n\n }\n var found=document.getElementsByName('selected');\n \n if(found[0] != undefined)\n {\n found[0].setAttribute('name','null');\n }\n var current=event.target;\n \n current.setAttribute('name','selected');\n var y=document.getElementById('none');\n\n if(y!=null)\n {\n y.setAttribute('id','addEvent');\n }\n var date=event.target.id;\n var x=document.querySelector('.date');\n x.innerHTML=date;\n\n var input=document.getElementById('field')\n\n input.setAttribute('class','workoutEvent');\n var eventList=document.querySelectorAll('.Date'+date);\nif(eventList.length>0) {\n for(z=0;z<eventList.length;z++) {\n eventList[z].style.display=\"block\";\n}\n}\n}", "title": "" }, { "docid": "2dbbb2965b2116cf5c1b494988cf6662", "score": "0.5762055", "text": "function init_datepicker(){\n\n // Call function beforeOpen\n\n settings.beforeOpen(modal, settings);\n\n // Init datepicker plugin\n\n datepicker_instance = modal.find('.datepicker-in-fullscreen').datepicker(settings.datepicker)\n .datepicker('setDate', $input.val() != '' ? moment($input.val(), settings.format).format('YYYY-MM-DD') : '') \n .on('changeDate', function(ev){\n\n var new_date = moment(ev.date).format(settings.format);\n\n change_value( new_date );\n change_value_fake_input( new_date );\n change_value_additional_target( new_date );\n\n // Close \n\n if(settings.closeOnChange){\n close_modal();\n }\n \n }); \n\n // Show modal with effect\n\n modal.addClass('dpifs-show');\n\n // Add event controls\n\n add_controls();\n\n // Add swipe support\n\n add_swipeSupport();\n }", "title": "" }, { "docid": "738b592b21cfb539e4f7f935dd1f2f5c", "score": "0.5761231", "text": "setValueAndClose(event) {\n if (event && event.date) {\n this.dispatchOnChange(event.date, true);\n }\n this.closePanel();\n }", "title": "" }, { "docid": "91a0cd661031d48da3deee236506831a", "score": "0.5758262", "text": "function init_hotel_date(startdate_id, night_id, enddate_id, enddate_display_id, startdate_value){\r\n\t\r\n\tvar today = new Date();\r\n\ttoday = dateFormat(today);\r\n\t\r\n\tif(startdate_value != '' && startdate_value != undefined){\r\n\t\t$(startdate_id).val(startdate_value);\r\n\t}\r\n\t\r\n\tget_check_out_date(startdate_id, night_id, enddate_id, enddate_display_id);\r\n\t\r\n\t$(startdate_id).change(function() {\r\n\t\tget_check_out_date(startdate_id, night_id, enddate_id, enddate_display_id);\r\n\t});\r\n\t\r\n\t$(night_id).change(function() {\r\n\t\tget_check_out_date(startdate_id, night_id, enddate_id, enddate_display_id);\r\n\t});\r\n\t\r\n\tvar icon_calender_id = '#btn_' + startdate_id.replace('#','');\r\n\t\r\n\t// Handle event click icon calendar\r\n\t$(icon_calender_id).click(function () {\r\n\t\t$(startdate_id).focus();\r\n\t});\r\n\t\r\n}", "title": "" }, { "docid": "c962a82cdb3f72bb4fcb52d57f558878", "score": "0.5755409", "text": "selectDate(e) {\n const dateId = parseFloat(e.target.id);\n this.setState({\n selectedDateId: dateId,\n }, this.delayedClose);\n }", "title": "" }, { "docid": "8c423d476432fd6db82d5bdb6be90ef9", "score": "0.57544404", "text": "function toggleSendInvitationButton() {\n var emails = emailTokenField.getContent();\n var day = datePickerEmail.getSelectedDate()[0];\n var checkDate = $(\"#attachCalendarCheckBox\").is(':checked');\n \n\tif (emails.length == 0 || (checkDate && day == -1)) {\n $(\"#sendInvitationButton\").addClass(\"disabled\");\n } else {\n $(\"#sendInvitationButton\").removeClass(\"disabled\"); \n }\n}", "title": "" }, { "docid": "fc5b2d3b59e7975ac35556cf5d1c26c2", "score": "0.57543886", "text": "handleChangeDate(e) {\n /* Setting state */\n this.setState({\n date: e.target.value,\n errorDate: false\n });\n }", "title": "" }, { "docid": "0db864ed1db2930e5b1317338b356c90", "score": "0.5747506", "text": "function blurDatePicker(evt) {\n var es = evt ? (evt.target || evt.srcElement) : null;\n if ((!es || !es.parentNode || (!findParent(es, \"datepicker_popup\") && !findParent(es, \"calendarpicker_popup\"))) && !(es ? es : \"null\").toString().match(/javascript:void/)) {\n document.getElementById('datepicker_popup').style.display = \"none\"\n $('html').trigger('hide.bs.dropdown')\n }\n}", "title": "" }, { "docid": "e4ac48f1ca890f5ed535becf1f043c2e", "score": "0.57472795", "text": "changeEvent(event) {\n this.formTarget.dataset.expenseEntryChanged = '1';\n }", "title": "" }, { "docid": "7d0f795084a1287aed2adba5d96ade4d", "score": "0.57413656", "text": "function onPickedDate(callback) {\n _onPickedDateCallback = callback;\n }", "title": "" }, { "docid": "7d0f795084a1287aed2adba5d96ade4d", "score": "0.57413656", "text": "function onPickedDate(callback) {\n _onPickedDateCallback = callback;\n }", "title": "" }, { "docid": "5fd34d768258d283a04a2779caf00df6", "score": "0.5737764", "text": "handleDayChange_selectedDay(day) {\n this.setState({ selectedDay_date: day });\n }", "title": "" }, { "docid": "5fd34d768258d283a04a2779caf00df6", "score": "0.5737764", "text": "handleDayChange_selectedDay(day) {\n this.setState({ selectedDay_date: day });\n }", "title": "" }, { "docid": "bdb9c18b78d2bd04a3cd4bfe08b6b556", "score": "0.573557", "text": "function datePick () {\n\t\n\tvar d = new Date();\n\tvar yesterday = new Date(d);\n\tyesterday.setDate(d.getDate() - 1); \n\n\tconst picker = datepicker('#datepicker', {\n\t\tminDate: new Date(2013, 6, 5),\n\t\tmaxDate: yesterday, \n\t\tonSelect: function(instance) {\n \t\t\tfetchApi(\"Pankow\", instance.el.value)\n\n \t\t}\n\t});\n}", "title": "" }, { "docid": "32e9b6b95f90d5913d070bab85123eb3", "score": "0.57350636", "text": "function change_date(button) {\n\tif (button == '<<') yearNum--;\n\telse if (button == '>>') yearNum++;\n\telse if (button == '<') monthNum--;\n\telse if (button == '>') monthNum++;\n\n\tif (monthNum == 0) {\n\t\tmonthNum = 12;\n\t\tyearNum--;\n\t}\n\telse if (monthNum == 13) {\n\t\tmonthNum = 1;\n\t\tyearNum++\n\t}\n\n\tfirstDate = new Date(String(monthNum)+\"/1/\"+String(yearNum));\n\tfirstDay = firstDate.getDay() + 1;\n\tget_days(monthName[monthNum - 1]);\n\tfill_calendar(monthName[monthNum - 1],numDays);\n}", "title": "" }, { "docid": "e41e9cb0811a4c4f030a88bd38caaa81", "score": "0.57342535", "text": "function checkToDateDatePickerIsPresent(checkbox) {\n var $toDateDatePicker = $(checkbox).parents('.form-wrapper').find('input.datepicker[data-control=\"to-date\"]');\n if ($(checkbox).is(':checked')) {\n $toDateDatePicker.attr('disabled', 'disabled').val(\"\")\n } else {\n if ($toDateDatePicker.is(\":disabled\")) {\n $toDateDatePicker.removeAttr('disabled').trigger('focus');\n }\n\n }\n }", "title": "" } ]
efd1676e550923e3fe829c57ebee288b
The 'createStudentLi' function organises the content to be displayed regarding the student (image, name, email, registered date)
[ { "docid": "ddd92c925f3da904bd061730af49e20d", "score": "0.7610144", "text": "function createStudentLi(student) {\n return `<li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=\"${student.picture.medium}\" alt=\"Profile Picture\"/>\n <h3>${student.name.first} ${student.name.last}</h3>\n <span class=\"email\">${student.email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${student.registered.date}</span>\n </div>\n </li>`;\n}", "title": "" } ]
[ { "docid": "aeadd90b6e5566d9e5e7315dd72ed04b", "score": "0.7794726", "text": "function createLI(student) {\n function appendToLI(elementName, arrayProperty) {\n const element = createElement(elementName, arrayProperty);\n listElement.appendChild(element);\n return element;\n }\n const listElement = document.createElement(\"li\");\n listElement.className = \"student-item cf\";\n const divStudent = appendToLI(\"div\", [\n { prop: \"className\", value: \"student-details\" },\n ]);\n divStudent.appendChild(\n createElement(\"img\", [\n { prop: \"className\", value: \"avatar\" },\n { prop: \"src\", value: `${student.picture.large} ` },\n { prop: \"alt\", value: \"profile picture\" },\n ])\n );\n divStudent.appendChild(\n createElement(\"h3\", [\n {\n prop: \"textContent\",\n value: `${student.name.title} ${student.name.first} ${student.name.last} `,\n },\n ])\n );\n divStudent.appendChild(\n createElement(\"email\", [\n { prop: \"className\", value: \"email\" },\n { prop: \"textContent\", value: `${student.email}` },\n ])\n );\n const divJoined = appendToLI(\"div\", [\n { prop: \"className\", value: \"joined-details\" },\n ]);\n divJoined.appendChild(\n createElement(\"span\", [\n { prop: \"className\", value: \"date\" },\n { prop: \"textContent\", value: `${student.registered.date}` },\n ])\n );\n return listElement;\n}", "title": "" }, { "docid": "9a858e15fce6629e8380103d5da82135", "score": "0.7440555", "text": "function generateListItem (student) {\n\tconst studentList = document.querySelector('.student-list');\n\tconst listItem = document.createElement('li');\n\tlistItem.className = 'student-item cf'; \n\tlistItem.innerHTML = `\n\t\t<div class=\"student-details\">\n\t\t\t<img class=\"avatar\" src=\"${student.picture.large}\">\n\t\t\t<h3>${student.name.first} ${student.name.last}</h3>\n\t\t\t<span class=\"email\">${student.email}</span>\n\t\t</div>\n\t\t<div class=\"joined-details\">\n\t\t\t<span class=\"date\">Joined ${student.registered.date}</span>\n\t\t</div>\n\t`;\n\treturn listItem;\n\n}", "title": "" }, { "docid": "3d13396d338da7bf5e890f2f46a9d633", "score": "0.6791272", "text": "function showPage(list, page) {\n // create two variables which will represent the index for the first and last student on the page\n let firstStudent = (page * 9) - 9;\n let lastStudent = (page * 9);\n // select the element with a class of `student-list` and assign it to a variable\n let studentList = document.querySelector('.student-list')\n // set the innerHTML property of the variable you just created to an empty string\n studentList.innerHTML = '';\n // loop over the length of the `list` parameter\n for (let i = 0; i < list.length; i++){\n if (firstStudent <= i && i < lastStudent) {\n //create elements to display student information\n const li = document.createElement(\"LI\");\n const div = document.createElement(\"DIV\");\n const img = document.createElement(\"IMG\");\n const h3 = document.createElement(\"H3\");\n const span = document.createElement (\"SPAN\");\n const div2 = document.createElement (\"DIV\");\n const span2 = document.createElement (\"SPAN\");\n //make elements have respective class names.\n li.className = \"student-item cf\";\n div.className = \"student-details\";\n img.className = \"avatar\";\n span.className = \"email\";\n div2.className = \"joined-details\";\n span2.className = \"date\";\n // add data to elements using loop\n h3.textContent = `${data[i].name.first} ${data[i].name.last}`;\n span.textContent = `${data[i].email}`;\n img.src = `${data[i].picture.large}`;\n span2.textContent = `${data[i].registered.date}`;\n // add elements to the page\n studentList.appendChild(li);\n li.appendChild(div);\n div.appendChild(img);\n div.appendChild(h3);\n div.appendChild(span);\n li.appendChild(div2);\n div2.appendChild(span2);\n\n // studentList.insertAdjacentHTML('beforeend', )\n }\n \n }\n \n }", "title": "" }, { "docid": "6041ed74453c170d4d43db4647237888", "score": "0.65818316", "text": "function buildStudent(student,gratime,grade,gradeper) {\n //console.log(\"buildProduct\");\n let node = $(\"<div/>\");\n node.addClass(\"col-sm-3 text-center col-margin-bottom-1\");\n node.append(\"<div>\" +\"Certificate ID:\"+student[1] + \"</div>\");\n node.append(\"<div>\" +\"Student Name:\"+ student[2] + \"</div>\");\n node.append(\"<div>\" + \"Graduated School:\" +student[3] + \"</div>\");\n node.append(\"<div>\" + \"Degree Level:\" +student[4] + \"</div>\");\n if(student[5]==0)\n {\n node.append(\"<div>\" + \"Gender: Male\" + \"</div>\");\n }else{\n node.append(\"<div>\" + \"Gender: Female\" +\"</div>\");\n }\n node.append(\"<div>\" + \"Studeng Major:\" +student[6] + \"</div>\");\n node.append(\"<div>\" + \"Graduation Time:\" +new Date(gratime * 1000) + \"</div>\");\n node.append(\"<div>\" + \"Average Grade(/100):\" +grade + \"</div>\");\n node.append(\"<div>\" + \"Academic Performance:\" +gradeper + \"</div>\");\n node.append(\"<div>\" + \"Last Updated Time:\" +new Date(student[7] * 1000) + \"</div>\");\n node.append(\"<a href='studentInfo.html?Id=\" + student[0] + \"'class='btn btn-primary'>Show details</a>\")\n return node;\n}", "title": "" }, { "docid": "03b832d60413ac30b27c2887037c11a7", "score": "0.6456202", "text": "function showPage (list, page) {\n const startIndex = (page * 9) - 9;\n const endIndex = (page * 9);\n\n const ulStudentList = document.querySelector('.student-list');\n ulStudentList.innerHTML = \"\";\n\n/*\nLoops through the data.js file and displays student information\n*/ \n for(let i = 0; i < list.length; i++){\n if ((i >= startIndex) && (i < endIndex)) {\n const picture = data[i].picture.large;\n const title = data[i].name.title;\n const firstName = data[i].name.first;\n const lastName = data[i].name.last;\n const email = data[i].email;\n const registeredDate = data[i].registered.date; \n\n const listItem = `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=\"${picture}\" alt=\"Profile Picture\">\n <h3>${title} ${firstName} ${lastName}</h3>\n <span class=\"email\">${email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${registeredDate}</span>\n </div>\n </li>\n `;\n /* \n Inserts the list item markup for the student list dynamically\n */\n ulStudentList.insertAdjacentHTML('beforeend', listItem);\n }\n }\n\n return ulStudentList;\n}", "title": "" }, { "docid": "dc50147cad1b7a2076d2333ad456bd57", "score": "0.62986004", "text": "function showPage (list, page) {\n const startIndex = (page*9) - 9;\n const endIndex = page*9;\n const studentList = document.querySelector('.student-list');\n studentList.innerHTML = '';\n\n for (let i=0; i < list.length; i++) {\n if (startIndex <= i && i < endIndex) {\n const student =\n `<li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=\"${list[i]['picture']['large']}\" alt=\"Profile Picture\">\n <h3>${list[i]['name']['first']} ${list[i]['name']['last']}</h3>\n <span class=\"email\">${list[i]['email']}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${list[i]['registered']['date']}</span>\n </div>\n </li>`;\n studentList.insertAdjacentHTML('beforeend', student); \n }\n }\n}", "title": "" }, { "docid": "ed4ad01319d5be4dea74c6ee74728bf0", "score": "0.6281549", "text": "static addStudent(student){\n let table=document.getElementById(\"tbody\");\n const row=document.createElement('tr');\n row.classList.add('fade');\n let skills=\"\";\n student.skills.forEach(skill=>skills=skills+skill+\" \");\n row.innerHTML=`<td>\n <h6>${student.name}</h6>\n <p>${student.gender}</p>\n <br>\n <p>${student.email}</p>\n <br>\n <p><a href=${student.website} target=\"blank\">Website</a></p>\n <br>\n <p>${skills}</p></td>\n `;\n row.innerHTML=row.innerHTML+`<td><img src=${student.img} alt=\"\"></td>`;\n table.appendChild(row);\n setTimeout(()=>{\n row.classList.remove(\"fade\");\n },1000)\n \n }", "title": "" }, { "docid": "392105b106edad4eb512af552a2dcd82", "score": "0.62654406", "text": "function showPage (list, page) {\n const startIndex = (page * 9) - 9;\n const endIndex = page * 9;\n studentList.innerHTML = '';\n\n //creates a student list item for each student on the page\n for (let i = 0; i < list.length; i++) {\n if(i >= startIndex && i < endIndex) {\n studentList.insertAdjacentHTML('beforeend', `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=${list[i]['picture']['large']} alt=\"Profile Picture\">\n <h3>${list[i]['name']['first']} ${list[i]['name']['last']}</h3>\n <span class=\"email\">${list[i]['email']}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${list[i]['registered']['date']}</span>\n </div>\n </li>\n `);\n }\n }\n}", "title": "" }, { "docid": "1ed3351b2d2752051a14fb87dd73e8b4", "score": "0.6261276", "text": "function showPage(list, page) {\n const startIndex = ( page * numOfItems ) - numOfItems;\n const endIndex = page * numOfItems;\n const student_list = document.querySelector('.student-list');\n student_list.innerHTML = '';\n\n for (i = 0; i < list.length; i++) {\n const student_info = `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=\"${list[i].picture.large}\" alt=\"Profile Picture\">\n <h3>${list[i].name.first} ${list[i].name.last}</h3>\n <span class=\"email\">${list[i].email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${list[i].registered.date}</span>\n </div>\n </li>\n `;\n if (i >= startIndex && i < endIndex) {\n student_list.insertAdjacentHTML('beforeend', student_info);\n }\n }\n}", "title": "" }, { "docid": "4a0bc07e8e60139040a04a233472730d", "score": "0.62290585", "text": "function showPage(list, page) {\n let start = (page * 9) - 9;\n let end = (page * 9);\n const ul = document.querySelector('.student-list');\n ul.innerHTML = '';\n for (let i = start; i < list.length; i++) {\n if (i >= start && i < end) {\n let studentItem = `<li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=${data[i].picture.thumbnail} alt=\"Profile Picture\">\n <h3 class = \"name\">${data[i].name.first} ${data[i].name.last}</h3>\n <span class = \"email\">${data[i].email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${data[i].registered.date}</span>\n </div>\n </li>\n `;\n ul.insertAdjacentHTML('beforeend', studentItem);\n }\n }\n}", "title": "" }, { "docid": "b1877b497832be32ebe017cdc1bc58bc", "score": "0.6215007", "text": "function showPage(page,list) {\n\n // variables to store the start index and the end index of the list items to be displayed on the given page\n let startIndex = (page * listPerPage ) - listPerPage;\n\tlet endIndex = page * listPerPage;\n \n // selecting the ul element and assigning it an empty string\n const studentListUl = document.querySelector('.student-list');\n studentListUl.innerHTML = '';\n\n for ( let i=0; i < list.length; i++ ){\n\n if (i>=startIndex && i<endIndex){\n\n const studentListItem = `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=${list[i].picture.large} alt=\"Profile Picture\">\n <h3>${list[i].name.first} ${list[i].name.last}</h3>\n <span class=\"email\">${list[i].email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${list[i].registered.date}</span>\n </div>\n </li>\n `;\n\n studentListUl.insertAdjacentHTML ('beforeend', studentListItem);\n\n }\n\n }\n\n}", "title": "" }, { "docid": "5e434cfe418dc57482f99698123e60d9", "score": "0.6212278", "text": "createStudentList(category) {\n\t\tif (this.props.uni) {\n\t\t\tconst { studentsAttending } = this.props.uni;\n\n\t\t\tlet studentsListHighSchool = [];\n\t\t\tlet studentsListCity = [];\n\t\t\tlet studentsListGeneral = [];\n\t\t\tlet count = 0;\n\t\t\tstudentsAttending.forEach(student => {\n\t\t\t\tconst studentBox = (\n\t\t\t\t\t<div className=\"column is-one-quarter\" key={count}>\n\t\t\t\t\t\t<ProfileBox\n\t\t\t\t\t\t\tkey={count}\n\t\t\t\t\t\t\tid={student._id}\n\t\t\t\t\t\t\tgivenName={student.givenName}\n\t\t\t\t\t\t\tfamilyName={student.familyName}\n\t\t\t\t\t\t\tphotoURL={student.photoURL}\n\t\t\t\t\t\t\tmajor={student.major}\n\t\t\t\t\t\t\thighSchoolGradYear={student.highSchoolGradYear}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\n\t\t\t\tif (student.highSchool === this.props.auth.highSchool) {\n\t\t\t\t\tstudentsListHighSchool.push(studentBox);\n\t\t\t\t} else if (student.city === this.props.auth.city) {\n\t\t\t\t\tstudentsListCity.push(studentBox);\n\t\t\t\t} else {\n\t\t\t\t\tstudentsListGeneral.push(studentBox);\n\t\t\t\t}\n\t\t\t\tcount++;\n\t\t\t});\n\n\t\t\tswitch (category) {\n\t\t\t\tcase \"HighSchool\":\n\t\t\t\t\treturn studentsListHighSchool;\n\t\t\t\tcase \"City\":\n\t\t\t\t\treturn studentsListCity;\n\t\t\t\tdefault:\n\t\t\t\t\treturn studentsListGeneral;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8b749083870b3306f8e77b8ff3a58aba", "score": "0.6106234", "text": "function showPage(list, page) {\n\tconst startIndex = page * 9 - 9;\n\tconst endIndex = page * 9;\n\tul.innerHTML = '';\n\tfor (let i = 0; i < list.length; i++) {\n\t\tif (i >= startIndex && i < endIndex) {\n\t\t\tconst li = document.createElement('li');\n\t\t\tli.className = 'student-item cf';\n\t\t\tul.appendChild(li);\n\n\t\t\tconst divDetails = document.createElement('div');\n\t\t\tdivDetails.className = 'student-details';\n\t\t\tli.appendChild(divDetails);\n\n\t\t\tconst img = document.createElement('img');\n\t\t\timg.className = 'avatar';\n\t\t\timg.alt = 'Profile Picture';\n\t\t\tconst linkSrc = Object.values(list[i])[3];\n\t\t\timg.src = Object.values(linkSrc)[0];\n\t\t\tdivDetails.insertAdjacentElement('afterbegin', img);\n\n\t\t\tconst spanDet = document.createElement('span');\n\t\t\tspanDet.className = 'email';\n\t\t\tconst dataEmail = Object.values(list[i])[1];\n\t\t\tspanDet.textContent = dataEmail;\n\t\t\tdivDetails.insertAdjacentElement('beforeend', spanDet);\n\n\t\t\tconst h3 = document.createElement('h3');\n\t\t\tconst name = Object.values(list[i])[0];\n\t\t\th3.textContent = `${Object.values(name)[1]} ${\n\t\t\t\tObject.values(name)[2]\n\t\t\t}`;\n\t\t\tspanDet.insertAdjacentElement('beforebegin', h3);\n\n\t\t\tconst divJoin = document.createElement('div');\n\t\t\tdivJoin.className = 'joined-details';\n\t\t\tli.appendChild(divJoin);\n\n\t\t\tconst spanJoin = document.createElement('span');\n\t\t\tspanJoin.className = 'date';\n\t\t\tconst date = Object.values(list[i])[2];\n\t\t\tspanJoin.innerHTML = `Joined: ${Object.values(date)[0]}`;\n\t\t\tdivJoin.appendChild(spanJoin);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "aeaa2c1313f305b20dcdec32baa03a4e", "score": "0.6091961", "text": "function addToHTML(studentsList) {\n\n }", "title": "" }, { "docid": "7eb3254aaf834bd116a4436e9fa0b935", "score": "0.6084407", "text": "function createListWithBooks() {\r\n\r\n let genUlElement = document.createElement('ul');\r\n document.body.appendChild(genUlElement);\r\n\r\n\r\n for (let i in myBookCollection) {\r\n\r\n let liChild = genUlElement.appendChild(document.createElement('li'));\r\n let imgChild = liChild.appendChild(document.createElement('img'));\r\n imgChild.src = myBookCollection[i].bookImg;\r\n let h2Child = liChild.appendChild(document.createElement('h2'));\r\n let h2Text = h2Child.appendChild(document.createTextNode(myBookCollection[i].Title));\r\n let h3Child = liChild.appendChild(document.createElement('h3'));\r\n let h3Text = h3Child.appendChild(document.createTextNode('Author : ' + myBookCollection[i].Author));\r\n let h4Child = liChild.appendChild(document.createElement('h4'));\r\n let h4Text = h4Child.appendChild(document.createTextNode('Language : ' + myBookCollection[i].Language));\r\n\r\n liChild, h2Child, h2Text, h3Child, h3Text, h4Child, h4Text, imgChild = myBookCollection[i];\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "2c72f8f94527fba42acb6b6370d51f29", "score": "0.60387504", "text": "function listeAfUdviste(student) {\n console.log(\"list of expelled\");\n\n //Objekt med elevernes data\n const finalExpell = {\n firstname: \"\",\n middlename: \"\",\n lastname: \"\",\n gender: \"\",\n house: \"\",\n imagelink: \"\",\n id: \"\"\n };\n\n const expelledStudent = Object.create(finalExpell);\n expelledStudent.firstname = student.firstname;\n expelledStudent.middlename = student.middlename;\n expelledStudent.lastname = student.lastname;\n expelledStudent.gender = student.gender;\n expelledStudent.house = student.house;\n expelledStudent.imagelink = student.imagelink;\n expelledStudent.id = student.id;\n\n expellStudent.push(expelledStudent);\n }", "title": "" }, { "docid": "ae3d5277f4e301058eb1cf704ced91a1", "score": "0.6018776", "text": "function addToStudentPanel(name){\n var studentData = document.createElement('a-entity');\n studentData.setAttribute('id', name.split(' ').join('-'));\n studentData.setAttribute('template', {src: 'templates/teacher/student-data.template'});\n studentData.setAttribute('position', onstudentPanelPosition.x + \", \" + (onstudentPanelPosition.y-counter*0.25) + \", \" + onstudentPanelPosition.z);\n studentData.setAttribute('data-name', name);\n studentData.setAttribute('data-name_concatenated', name.split(' ').join('-'));\n studentData.addEventListener('click', function(){moveStudent(name)});\n document.querySelector('#student-panel').appendChild(studentData);\n counter++;\n}", "title": "" }, { "docid": "16acbb4e8000c16dfca4ec064f654764", "score": "0.6010721", "text": "function addStudent(studAnchor) {\n\tvar status = document.getElementById(\"status\");\n\tstatus.innerHTML = \"\";\n\tvar list = document.getElementById(\"classlist\");\n\tvar li = document.createElement(\"li\");\n\tli.appendChild(studAnchor);\n\tli.className = \"studentLI\";\n\tli.id = studAnchor.id+\"li\";\n\tlist.appendChild(li);\n}", "title": "" }, { "docid": "5232a6a877bd71841b4a19096c3c39b3", "score": "0.60050666", "text": "function createStudentPanel(parentEntity){\n var studentPanel = document.createElement('a-entity');\n studentPanel.setAttribute('id', \"student-panel\");\n studentPanel.setAttribute('geometry', {primitive: 'plane', height: 4, width: 2});\n studentPanel.setAttribute('position', {x: teacherLocation.x + studentPanelOffset.x, y: teacherLocation.y + studentPanelOffset.y, z: teacherLocation.z + studentPanelOffset.z});\n studentPanel.setAttribute('rotation', {x: 0, y: 90, z: 0});\n studentPanel.setAttribute('material', {color: '#C0C0C0', shader: 'flat'});\n parentEntity.appendChild(studentPanel);\n\n createImageLabel(\"hand-down-label\", \"templates/teacher/image_link.template\", \"#hand-down-thumb\", {x: -0.85, y: 1.85, z: 0.001}, studentPanel);\n createImageLabel(\"status-label\", \"templates/teacher/image_holder.template\", \"#status-thumb\", {x: 0.85, y: 1.85, z: 0.001}, studentPanel);\n createTextLabel(\"name-label\", \"Name student\", \"templates/teacher/text_link.template\", {x: 1.07, y: 0, z: 0}, {x: 0, y: 1.85, z: 0.001}, studentPanel);\n}", "title": "" }, { "docid": "f29cacd84ed6e8058a1e8d5493e1821d", "score": "0.5997953", "text": "static displayStudents(){\n let students=Storage.getStudents();\n students.forEach(student=>UI.addStudent(student));\n }", "title": "" }, { "docid": "440c82ab00a40c510bb1393feae40f46", "score": "0.59956884", "text": "function showPage(list, page) {\n\n const startIndex = (page * itemsPerPage) - itemsPerPage;\n const endIndex = page * itemsPerPage;\n\n studentList.innerHTML = '';\n\n for ( let i = 0; i < list.length; i++) {\n if (i >= startIndex && i < endIndex) {\n const studentItem = `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=${list[i].picture.thumbnail} alt=\"Profile Picture\">\n <h3>${list[i].name.first} ${list[i].name.last}</h3>\n <span class=\"email\">${list[i].email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${list[i].registered.date}</span>\n </div>\n </li>\n `;\n studentList.insertAdjacentHTML('beforeend', studentItem);\n }\n }\n}", "title": "" }, { "docid": "2c3e950a62f85aa2facd9e6eb74eb6f9", "score": "0.5974921", "text": "function buildStudentList() {\n filterStudents();\n sortingStudents();\n if (filterBy === \"expelled\" && expelledStudentsArray.length === 0) {\n document.querySelector(\"#listview\").innerHTML =\n \"<p style='padding-top:20px; font-weight:bold;'>There are no expelled students.</p>\";\n document.querySelector(\"#studentsdisplayed\").textContent = \"0\";\n } else {\n showStudentList(studentsOnDisplay);\n }\n}", "title": "" }, { "docid": "d5d708ef67d831187e955e422924f06f", "score": "0.59697944", "text": "function showPage(list, page) {\n let h1 = document.querySelector('h1');\n if (list.length < 1 && !h1) {\n let noResults = 'No Results Found';\n let noMatches = `<h1>${noResults}</h1>`\n header.insertAdjacentHTML('afterend', noMatches);\n } \n let startIndex = (page * 9) - 9;\n let endIndex = page * 9;\n const studentList = document.querySelector('.student-list');\n studentList.innerHTML = '';\n\n for (let i = 0; i < list.length; i++) {\n if (i >= startIndex && i < endIndex) {\n let student = list[i];\n let html = `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=${student.picture.large} alt=\"Profile Picture\">\n <h3>${student.name.first} ${student.name.last}</h3>\n <span class=\"email\">${student.email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">Joined ${student.registered.date}</span>\n </div>\n </li>\n `\n studentList.insertAdjacentHTML('beforeend', html);\n }\n }\n}", "title": "" }, { "docid": "1c7c79067c375af89b6274810fe327aa", "score": "0.59665567", "text": "function showPage(list, page) {\n const startIndex = (page * itemsPerPage) - itemsPerPage; //Start index of data/students for the current page\n const endIndex = (page * itemsPerPage); //Declare end index of data/students for the current page\n\n studentList.innerHTML = ''; //Set studentList to empty string to remove any students previously displayed\n\n //Loop over the list parameter\n for (let i = 0; i < list.length; i++) { //List all students from data.js\n if (i >= startIndex && i < endIndex) {\n //Using insertAdjacentHTML() method, dynamically add student info to index.html\n studentList.insertAdjacentHTML('beforeend', `\n <li class=\"student-item cf\">\n <div class=\"student-details\">\n <img class=\"avatar\" src=\"${list[i].picture.large}\" alt=\"Profile Picture\">\n <h3>${list[i].name.first} ${list[i].name.last}</h3>\n <span class=\"email\">${list[i].email}</span>\n </div>\n <div class=\"joined-details\">\n <span class=\"date\">${list[i].registered.date}</span>\n </div>\n </li>\n `);\n }\n }\n}", "title": "" }, { "docid": "fb08933861dbba0921609ffe433aa8dc", "score": "0.59162986", "text": "function pushStudent(student) {\n document.getElementById(\"person-name\").innerText = \" \" + student.name;\n document.getElementById(\"person-website\").innerText = \" \" + student.website;\n document.getElementById(\"person-phone\").innerText = \" \" + student.phone;\n document.getElementById(\"person-city\").innerText = \" \" + student.city;\n document.getElementById(\"person-age\").innerText = \" \" + student.age;\n document.getElementById(\"person-education\").innerText = \" \" + student.education;\n document.getElementById(\"person-email\").innerText = \" \" + student.email;\n document.getElementById(\"person-availability\").innerText = \" \" + student.availability;\n}", "title": "" }, { "docid": "7cd87e2f39f0bbc7e4565e9a9067d137", "score": "0.590828", "text": "function coursesHTML(courses) {\n console.log(courses);\n courses.forEach(course => {\n //create li for each student\n const li = document.createElement('li');\n // create span inside li item to easier acsess\n const div = document.createElement('div'); // div for putting name and status on one block on the same line\n div.className = 'display_hours';\n const spanCourse = document.createElement('span'); //course's name\n spanCourse.textContent = course.name;\n div.appendChild(spanCourse);\n //creating circle for displaying course's hours\n const spanHourse = document.createElement('span');\n spanHourse.className = 'hours';\n spanHourse.textContent = course.duration;// quantity of hours of each course\n div.appendChild(spanHourse);\n li.appendChild(div);\n\n //create span for displaying array of students\n course.students.forEach(student => {\n var spanStudent = document.createElement('span'); //array of student's courses\n spanStudent.textContent = student;\n li.appendChild(spanStudent);\n })\n\n //create 'Add student' button using js\n const addStudent = document.createElement('button');\n addStudent.className = ('btn btn-outline-info');\n addStudent.textContent = 'Add student';\n li.appendChild(addStudent);\n //create form elements for choosing students\n var toggleAtt = document.createAttribute(\"data-toggle\"); // Create a \"data-toggle\" attribute\n toggleAtt.value = \"modal\"; // Set the value of the \"data-toggle\" attribute\n addStudent.setAttributeNode(toggleAtt); // Add the class attribute to addStudent button\n\n var targetAtt = document.createAttribute(\"data-target\"); // Create a \"data-target\" attribute\n targetAtt.value = \"#students_id\"; // Set the value of the \"data-target\" attribute\n addStudent.setAttributeNode(targetAtt); // Add the class attribute to addStudent button\n \n ul.appendChild(li); \n // send id value to saveButton id\n addStudent.addEventListener('click', (e) => {\n e.preventDefault();\n saveChangesBut2.id = course.id;\n });\n })\n}", "title": "" }, { "docid": "ec5f781c993913cde74c89b159dcb7aa", "score": "0.5880351", "text": "function displayPerson(firstName, otherName, surname, age, gender, rowID) {\n /* Creating the item space */\n var item = document.createElement('li');\n item.setAttribute('class', 'item_space');\n item.setAttribute(\n 'onClick',\n 'handleClick(\"' + rowID + '\")');\n item.innerHTML = firstName;\n if (otherName !== null && otherName !== '') {\n item.innerHTML += ' (' + otherName + ')';\n }\n item.innerHTML += ' ' + surname;\n \n document.getElementById('list').appendChild(item);\n\n var chevron = document.createElement('img');\n chevron.setAttribute(\n 'src',\n odkCommon.getFileAsUrl('config/assets/img/little_arrow.png'));\n chevron.setAttribute('class', 'chevron');\n item.appendChild(chevron);\n\n // create sub-list in item space\n // Age information\n var ageElement = document.createElement('li');\n ageElement.setAttribute('class', 'detail');\n ageElement.innerHTML = 'Age: ' + age;\n item.appendChild(ageElement);\n\n var genderElement = document.createElement('li');\n genderElement.setAttribute('class', 'detail');\n genderElement.innerHTML = 'Gender: ' + ((gender !== null && gender !== '') ? \n gender \n : 'N/A');\n item.appendChild(genderElement);\n}", "title": "" }, { "docid": "1e3a9df4ed271fa0d217f35b138e88ca", "score": "0.5879943", "text": "function showPage(list, page) {\n\n let startIndex = (page * itemsPerPage) - itemsPerPage;\n let endIndex = page * itemsPerPage;\n\n let firstStudent = list[0];\n let lastStudent = list[41];\n\n const studentList = document.querySelector(\".student-list\");\n studentList.innerHTML = \" \";\n\n // loop over the length of the `list` parameter\n for (let i = 0; i < list.length; i++) {\n // conditional that displays the proper students\n if (list[i] !== null) {\n\n if (i >= startIndex && i < endIndex) {\n //elements needed to display student information + their insertion in the DOM\n const createdStudentLi = createStudentLi(list[i]);\n studentList.insertAdjacentHTML(\"beforeend\", createdStudentLi);\n }\n }\n }\n }", "title": "" }, { "docid": "88cde7202046cbcff1d113fdeac04cd3", "score": "0.5868202", "text": "function showPerson(loyalSubject) {\n let name = document.createElement('li');\n name.textContent = loyalSubject.name.first + ' ' + loyalSubject.name.last;\n\n //add to DOM\n let parent = document.querySelector('#folks');\n parent.appendChild(name);\n}", "title": "" }, { "docid": "03339fed05aa4abb82390b94b7001f8a", "score": "0.58644694", "text": "function showPage(list, page){\n const startIndex = (page *9) - 9 ;\n const endIndex = (page * 9 <= list.length) ? page *9 : list.length;\n\n //get student-list div from page\n const ul = document.getElementsByClassName('student-list')[0];\n ul.innerHTML = '';\n\n // for each student, build the student block with template and append to the page\n for(let i = startIndex; i< endIndex; i++){\n let li = buildStudentBlock(list[i]);\n ul.insertAdjacentHTML('beforeend',li);\n }\n}", "title": "" }, { "docid": "b8a026982cd758b7fdee76d69ea43457", "score": "0.5859523", "text": "function basic(basics) {\n //image in dom\n var img = document.createElement(\"img\");\n img.classList.add(\"image\");\n img.src = basics.picture;\n // r1.appendChild(img);3\n //name&designation in dom\n var h1 = document.createElement(\"h1\");\n h1.classList.add(\"name\");\n h1.textContent = basics.name;\n\n var h2 = document.createElement(\"h2\");\n h2.classList.add(\"designation\");\n h2.textContent = basics.designation;\n\n //email,address,twitter and phone number in dom\n var ul = document.createElement(\"ul\");\n ul.classList.add(\"data\");\n for (k in basics.data) {\n var li = document.createElement(\"li\");\n li.textContent = basics.data[k];\n ul.appendChild(li);\n\n }\n // console.log(ul);\n r1.appendChild(img);\n r1.appendChild(h1);\n r1.appendChild(h2);\n r1.appendChild(document.createElement(\"HR\"));\n r1.appendChild(ul);\n right.appendChild(r1);\n\n // r1.appendChild(document.createElement(\"HR\"));\n }", "title": "" }, { "docid": "8cf8d00d3411d357939a2d5303c5e8d1", "score": "0.58549803", "text": "function showData(index) {\n return createContent(formattedStudentInfo[index]);\n}", "title": "" }, { "docid": "74e204b3fdd54e1d51cce6190c799168", "score": "0.58406043", "text": "function _addStudent(stu) {\n var level = $scope.levelRef[stu.level];\n var courses = \"\";\n for (var j in $scope.selectedCourses) {\n courses += $scope.selectedCourses[j].name + \", \";\n }\n\n // Compile to DOM\n angular.element(document.getElementById('StudentCards')).append($compile(\n '<div class=\"col-sm-3\">' +\n '<md-card class=\"general-card md-whiteframe-8dp no-padding\" id=' + stu._id + '>' +\n '<div class=\"header-card\">' +\n '<img src=\"/static/images/design/student.svg\" width=\"50px\" height=\"50px\" />' +\n '</div>' +\n '<md-card-title-text>' +\n '<div class=\"center-card\">' +\n '<h1 class=\"md-headline no-margin\"> ' + stu.name + ' </h1>' +\n '<p class=\"md-subhead\"> ID:' + stu._id + '</p>' +\n '<p class=\"md-subhead\"> Contraseña: ' + stu.password + '</p>' +\n '<p class=\"md-subhead\"> Semestre: ' + stu.semester + '</p>' +\n '</div>' +\n '<md-button class=\"md-raised button-eliminate md-primary\" ng-click=\"editStudent(' + stu._id + ', $event)\">Editar</md-button>' +\n '<md-button class=\"md-raised button-eliminate md-warn\" ng-click=\"deleteStudent(' + stu._id + ')\">Eliminar</md-button>' +\n '</md-card-title-text> ' +\n '</md-card></div>'\n )($scope));\n }", "title": "" }, { "docid": "a4f324c901ad581692746d827322c841", "score": "0.5839441", "text": "function createStudent(name, year) {\n return {\n name: name,\n year: year,\n courses: [],\n notes: {},\n info: function () {\n console.log(`${this.name} is a ${this.year} year student`)\n },\n addCourse: function (course) {\n this.courses.push(course);\n },\n listCourses: function () {\n console.log(this.courses);\n },\n addNote: function (code, note) {\n if (this.notes[code]) {\n this.notes[code] += `; ${note}`;\n } else {\n this.notes[code] = note;\n }\n },\n updateNote: function (code, note) {\n this.notes[code] = note;\n },\n viewNotes: function () {\n let notes = this.courses.map((course) => {\n if (this.notes[course.code]) {\n return `${course.name}: ${this.notes[course.code]}`\n } else {\n return '';\n }\n });\n\n notes = notes.filter((note) => note !== '');\n notes.forEach((note) => console.log(note));\n },\n };\n}", "title": "" }, { "docid": "ea787f28f5ee8d2c6144868e8a92da06", "score": "0.58304054", "text": "function showList(liste) {\r\n\r\n postContainer.textContent = \"\";\r\n\r\n liste.forEach(student => {\r\n let clone = template.cloneNode(true).content;\r\n\r\n clone.querySelector(\"[data-fullname]\").textContent = student.firstName + \" \" + student.lastName;\r\n clone.querySelector(\"[data-fullname]\").addEventListener(\"click\", () => {\r\n showModal(student);\r\n });\r\n\r\n if (student.firstName === \"Rebecca\") {\r\n\r\n clone.querySelector(\".removeThis\").addEventListener(\"click\", () => {\r\n hacked(student);\r\n });\r\n\r\n } else {\r\n\r\n\r\n clone.querySelector(\".removeThis\").addEventListener(\"click\", () => {\r\n expelStudent(student);\r\n });\r\n\r\n }\r\n\r\n clone.querySelector(\".addThis\").addEventListener(\"click\", () => {\r\n addToSquad(student);\r\n });\r\n\r\n\r\n clone.querySelector(\".begone\").addEventListener(\"click\", () => {\r\n removeFromSquad(student);\r\n });\r\n\r\n clone.querySelector(\"[data-house]\").textContent = student.house;\r\n postContainer.appendChild(clone);\r\n \r\n });\r\n\r\n document.querySelector(\"#all\").innerHTML = \" \" + newArray.length;\r\n document.querySelector(\"#raw\").innerHTML = \" \" + filterByType(\"Ravenclaw\").length;\r\n document.querySelector(\"#huff\").innerHTML = \" \" + filterByType(\"Hufflepuff\").length;\r\n document.querySelector(\"#gryf\").innerHTML = \" \" + filterByType(\"Gryffindor\").length;\r\n document.querySelector(\"#slyth\").innerHTML = \" \" + filterByType(\"Slytherin\").length;\r\n\r\n}", "title": "" }, { "docid": "2ee02588d0e039430d93178984e88a73", "score": "0.5822219", "text": "function createNewsListItem(title, desc, author, source, url) {\n // Create the inner div with its corresponding elements (title and source)\n $innerDiv = $(\"<div>\")\n $innerDiv.addClass(\"d-flex w-100 justify-content-between\")\n $title = $(\"<h5>\")\n $title.addClass(\"mb-1\")\n title = cleanTitle(title)\n $title.append(title)\n $source = $(\"<small>\")\n $source.append(source)\n $innerDiv.append($title)\n $innerDiv.append($source)\n // Create the paragraph which is desc\n $description = $(\"<p>\")\n $description.addClass(\"mb-1\")\n $description.append(desc)\n // Create the small (author)\n $author = $(\"<small>\")\n $author.append(author)\n // Create the outer a tag, with href, and append\n $outerA = $(\"<a>\")\n $outerA.attr('href', url)\n $outerA.attr('target', '_blank')\n $outerA.addClass(\"list-group-item list-group-item-action dark-mode-bg company-color\")\n $outerA.append($innerDiv)\n $outerA.append($description)\n $outerA.append($author)\n\n return $outerA\n}", "title": "" }, { "docid": "454a7b5abd3657ceb6fdba509599c034", "score": "0.5810759", "text": "function listOfExpelled(student) {\n console.log(\"list of expelled\");\n\n //Object with students data\n const finalExpell = {\n firstname: \"\",\n middlename: \"\",\n lastname: \"\",\n gender: \"\",\n house: \"\",\n imagelink: \"\",\n bloodStatus: \"\",\n id: \"\"\n };\n\n const expelledStudent = Object.create(finalExpell);\n expelledStudent.firstname = student.firstname;\n expelledStudent.middlename = student.middlename;\n expelledStudent.lastname = student.lastname;\n expelledStudent.gender = student.gender;\n expelledStudent.house = student.house;\n expelledStudent.imagelink = student.imagelink;\n expellStudent.bloodStatus = student.bloodStatus;\n expelledStudent.id = student.id;\n // document.querySelector(\".student\").className = \"fade-out\";\n\n expellStudent.push(expelledStudent);\n\n // console.table(expellStudent);\n }", "title": "" }, { "docid": "3b012aac4c0b6bf95595040ff7049601", "score": "0.58047473", "text": "function create_new_course_block(sem_index, num){\n var course = document.createElement('semester'+String(sem_index));\n var a = document.createElement('course');\n a.setAttribute('style', 'min-height: 80px; min-width: 95px; padding: 10px 2px; ' +\n 'border-top-left-radius: 8px;border-top-right-radius: 8px;' +\n 'border-bottom-left-radius: 8px;border-bottom-right-radius: 8px;' +\n 'border-color: #334455; word-wrap: break-word;' );\n\n /* Add Blue checkmark if taken, otherwise add a gray hidden mark */\n var image = document.createElement('img');\n image.setAttribute('id',DEGREE_HANDLES[num].get_ubclass()+'_check');\n if(DEGREE_HANDLES[num].get_taken() == 1) {\n image.setAttribute('src', 'static/blue_check.png');\n image.setAttribute('style', 'position:absolute; top:0px; left:0px;');\n }\n else{\n image.setAttribute('src', 'static/grayscale_check.png');\n image.setAttribute('style', 'position:absolute; top:0px; left:0px; display:none;');\n\n }\n a.appendChild(image);\n a.setAttribute('id',String(DEGREE_HANDLES[num].get_ubclass()));\n a.setAttribute('class', 'list-group-item');\n\n //Set Change Color on Hover\n a.onmouseover = function(){\n show_info(DEGREE_HANDLES[num].get_ubclass(),0);\n };\n a.onmouseout = function(){\n hide_info(DEGREE_HANDLES[num].get_ubclass(),0);\n };\n a.onclick = function(){\n switch_check_type(DEGREE_HANDLES[num].get_ubclass());\n };\n course.appendChild(a);\n\n //course and cap box\n var course_box = document.createElement(\"course_box\");\n course_box.setAttribute('class', 'col-xs-12');\n course_box.setAttribute('style', 'padding:3px;');\n a.appendChild(course_box);\n\n var span = document.createElement(\"span\");\n span.setAttribute('style', 'height:15px');\n span.setAttribute('class', 'col-xs-12');\n course_box.appendChild(span);\n\n //Add course name container\n var course_container = document.createElement(\"course_container\");\n course_container.setAttribute('class', 'col-xs-12');\n course_container.setAttribute('style','font-family: Arial Rounded MT Bold, ' +\n 'Helvetica Rounded, Arial, sans-serif; font-style: normal; line-height:' +\n ' 23px; font-weight: bold; font-size: 17px;');\n course_box.appendChild(course_container);\n\n //add course name and link to course description\n var course_name = document.createElement('course_text' + String(num));\n var course_string = String(DEGREE_HANDLES[num].get_ubclass());\n var URL = 'http://undergrad-catalog.buffalo.edu/coursedescriptions/index.php?frm_abbr=' + course_string.slice(0, (course_string.length - 3)) + '&frm_num=' + course_string.slice(-3);\n if ( (course_string.indexOf(\"XX\") == -1) && (course_string.indexOf(\"Gen Ed\") == -1) && (course_string.indexOf(\"Tech\") == -1) && (course_string.indexOf(\"Elective\") == -1)) {\n course_name.setAttribute('style', 'color: blue; text-decoration: underline');\n }\n course_name.onmouseover = function() {\n if ( (course_string.indexOf(\"XX\") == -1) && (course_string.indexOf(\"Gen Ed\") == -1) && (course_string.indexOf(\"Elective\") == -1) && (EDITABLE == 0) ) {\n document.body.style.cursor = 'pointer';\n }\n };\n course_name.onmouseout = function() {\n if ( (course_string.indexOf(\"XX\") == -1) && (course_string.indexOf(\"Gen Ed\") == -1) && (course_string.indexOf(\"Elective\") == -1) && (EDITABLE == 0) ) {\n document.body.style.cursor = 'auto';\n }\n };\n course_name.onclick = function() {\n if ( (course_string.indexOf(\"XX\") == -1) && (course_string.indexOf(\"Gen Ed\") == -1) && (course_string.indexOf(\"Elective\") == -1) && (EDITABLE == 0) ) {\n course_name.setAttribute('style', 'color: #4B0082; text-decoration: underline');\n window.open(URL, '_blank');\n return false;\n }\n };\n var course_name_text = document.createTextNode(DEGREE_HANDLES[num].get_ubclass());\n course_name.appendChild(course_name_text);\n course_container.appendChild(course_name);\n\n //course title\n var course_title_container = document.createElement(\"course_title_box\");\n course_title_container.setAttribute('class', 'col-xs-12');\n course_title_container.setAttribute('style', 'font-size:11px;font-style:italic;');\n course_title_container.setAttribute('font-family', 'Agency fb');\n a.appendChild(course_title_container);\n\n //add course name\n var course_title1 = document.createElement('course_title');\n var course_text_title = document.createTextNode(DEGREE_HANDLES[num].get_title());\n course_title1.appendChild(course_text_title);\n course_title_container.appendChild(course_title1);\n\n var list = document.getElementById('sem'+String(sem_index));\n list.insertBefore(course, list.childNodes[0]);\n}", "title": "" }, { "docid": "ac7da8c4cd5d52c7e0eb4e6d58cad3c7", "score": "0.5799679", "text": "function createProfile(portfolioData){\n\tfor(let i=0; i<portfolioData.length; i++){\n\t\tlet portfolio = portfolioData[i];\n\n\t\tlet h5 = document.createElement(\"h5\");\n\t\th5.innerHTML = portfolioData[i].title;\n\t\tlet divProfile = document.getElementById(\"profile_contents\");\n\t\tdivProfile.appendChild(h5);\n\n\t\tfor(let j=0; j<portfolio.table.length; j++) {\n\t\t\tlet ul = document.createElement(\"ul\");\n\n\t\t\tlet li = document.createElement(\"li\");\n\t\t\tlet img = document.createElement(\"img\");\n let label = document.createElement(\"label\");\n let h6 = document.createElement(\"h6\");\n let p = document.createElement(\"p\");\n\n img.setAttribute(\"src\", portfolio.table[j].image);\n label.innerHTML = portfolio.table[j].name;\n li.appendChild(img);\n li.appendChild(label);\n\n let li2 = document.createElement(\"li\");\n h6.innerHTML = portfolio.table[j].place;\n li2.appendChild(h6);\n\n let li3 = document.createElement(\"li\");\n li3.setAttribute(\"class\", \"date\");\n li3.innerHTML = portfolio.table[j].date;\n\n let li4 = document.createElement(\"li\");\n p.innerHTML = portfolio.table[j].description;\n li4.appendChild(p);\n\n ul.appendChild(li);\n ul.appendChild(li2);\n ul.appendChild(li3);\n ul.appendChild(li4);\n divProfile.appendChild(ul);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "346fec12df1d52ffac9da8985d25e443", "score": "0.5783757", "text": "function visListeAfUdviste() {\n document.querySelector(\".list\").innerHTML = `<h1>Udviste elever</h1><div class=\"close-list\">x</div> <br>`;\n\n expellStudent.forEach(expellStudent => {\n document.querySelector(\".list\").innerHTML += `<div class=\"student-expelled\"> <img src=\"img/${expellStudent.imagelink}\" alt=\"\">\n <div class=\"text\"><h1>${expellStudent.firstname + \" \" + expellStudent.middlename + \" \" + expellStudent.lastname}</h1><h2>hus: ${expellStudent.house}</h2> <p>Eleven er blevet udvist</p></div></div>`;\n });\n\n document.querySelector(\".list\").classList.remove(\"hide\");\n\n document.querySelector(\".close-list\").addEventListener(\"click\", gemClass);\n\n function gemClass() {\n document.querySelector(\".list\").classList.add(\"hide\");\n }\n }", "title": "" }, { "docid": "4d0d8abb9a3803fffb3cdb6713084a3a", "score": "0.5781072", "text": "function generateStudentsHTML(students) {\n ul.textContent = '';\n //var students = getStudentsArray(data);\n //console.log(students);\n studentsHTML(students);\n \n saveChangesBut.addEventListener('click', (e) => {\n console.log('button clicked');\n e.preventDefault();\n var buttonID = saveChangesBut.id;//to identify student and form assign button ID on the student's form to the button on the form \n var selectedCourse = select.value; \n var selectedCourseID;\n addCourseToStudent(students, buttonID, selectedCourse);//add course to the array 'students.courses'\n buttonID = ''; // clear value of ID, otherwise we will have several courses with the same id\n ul.textContent = '';\n studentsHTML(students);\n });\n}", "title": "" }, { "docid": "b296559a2661a6e3092f71e679f031f4", "score": "0.57690674", "text": "function createPage(student) {\n var html = \"<h1 style='margin-top:0px'>Wednesday Classes</h1>\" + createClassTable(student.wed);\n html += \"<h1>Thursday Classes</h1>\" + createClassTable(student.ths);\n \n html += \"<a href=\\\"https://sites.google.com/site/xweek2018/\\\">Return to Home\";\n \n if(site.getChildByName(student.hash) != null) {\n // If the page already exists, just update the HTML\n site.getChildByName(student.hash).setHtmlContent(html);\n Logger.log(site.getChildByName(student.hash));\n } else {\n // If the page does not exist, create it and set HTML\n site.createWebPage(student.name_eng + \"'s schedule\", student.hash, html);\n }\n}", "title": "" }, { "docid": "f940816268fd1afee53a7bd77f923e11", "score": "0.57684684", "text": "function createStudent(selector, eStudents) {\n\tvar studentExists = checkExistence(eStudents[selector.selectedIndex]);\n\tvar prompt = document.getElementById(\"prompt-selection\");\n\tif(studentExists) {\n\t\tprompt.innerHTML = eStudents[selector.selectedIndex]+\"is already in your class\";\n\t} else {\n\t\tif(selector.selectedIndex != -1 && !studentExists) {\n\t\t\tprompt.innerHTML = \"\";\n\t\t\tvar studAnchor = document.createElement(\"a\");\n\t\t\tstudAnchor.id = eStudents[selector.selectedIndex];\n\t\t\tstudAnchor.addEventListener('click', function(){\n\t\t\t\tremoveStudent(studAnchor.id);\n\t\t\t});\n\t\t\tstudAnchor.appendChild(document.createTextNode(eStudents[selector.selectedIndex]+\" | x\")); \n\t\t\tstudents.push(eStudents[selector.selectedIndex]);\n\t\t\taddStudent(studAnchor);\n\t\t}\t\n\t}\n\t\t\n}", "title": "" }, { "docid": "ce6f85d5787200f14c9e6ae607bac14e", "score": "0.5747836", "text": "function renderNews(doc){\r\n \r\n let li = document.createElement('li');\r\n let name = document.createElement('p');\r\n let date = document.createElement('p');\r\n let img = displayImg(doc.data().newsPhoto,doc.id);\r\n let cross = document.createElement('a');\r\n let del = document.createElement('a');\r\n\r\n cross.href = \"news-edit.php?id=\"+doc.id + \"&&\" + \"news=\"+doc.data().newsText+ \"&&\" + \"date=\"+doc.data().date;\r\n del.href = \"news-delete.php?id=\"+doc.id;\r\n\r\n\r\n li.setAttribute('data-id', doc.id);\r\n name.textContent = doc.data().newsText;\r\n date.textContent = doc.data().date;\r\n cross.textContent = 'Edit';\r\n del.textContent = 'Delete';\r\n \r\n li.appendChild(img);\r\n li.appendChild(name);\r\n li.appendChild(date);\r\n li.appendChild(cross);\r\n li.appendChild(del);\r\n \r\n\r\n newsList.appendChild(li);\r\n}", "title": "" }, { "docid": "779cd68afd41188e696c5b0a3bc498fc", "score": "0.5739429", "text": "function createStudent(name, year) {\n return {\n name: name,\n year: year,\n courses: [],\n\n info: function() {\n let info = `${this.name} is a ${this.year} student`;\n console.log(info);\n },\n\n listCourses: function() {\n console.log(this.courses);\n },\n\n addCourse: function(courseInfo) {\n this.courses.push(courseInfo);\n },\n\n addNote: function(code, note) {\n courseIndex = this.getCourseIndex(code);\n if (courseIndex === -1) return;\n if (this.notesExists()) {\n this.courses[courseIndex].notes += `; ${note}`;\n } else {\n this.courses[courseIndex].notes = note;\n };\n },\n \n notesExists: function() {\n return this.courses[courseIndex].notes !== undefined;\n },\n \n viewNotes: function() {\n this.courses.forEach(function (course){\n if (course.notes) {\n console.log(`${course.name}: ${course.notes}`);\n };\n });\n },\n \n updateNote(code, note) {\n courseIndex = this.getCourseIndex(code);\n if (courseIndex === -1) return;\n this.courses[courseIndex].notes = note;\n },\n\n getCourseIndex: function(code) {\n return this.courses.findIndex((course) => course.code === code);\n }\n }\n}", "title": "" }, { "docid": "3ba3d63ac28c2656a18c2d59fc3a9e9a", "score": "0.5739055", "text": "function addcont(){\n let res ='';\n for (let st of students){\n res += `\n <div>\n <h3>${st.name}</h3>\n <img src = 'imgs/${st.img}.jpg'>\n <span>${st.id}</span>\n </div>\n `;\n console.log(res);\n }\n document.getElementById('container').innerHTML = res;\n}", "title": "" }, { "docid": "4f97397ccac3672e3576c863d4c4ac30", "score": "0.570401", "text": "function createStrainListElement(strain){\n\tvar li = document.createElement('li');\n\tvar a = document.createElement('a');\n\tvar p = document.createElement('p');\n\n\t$(li).addClass(\"ui-li-has-count\");\n\t$(li).addClass(\"ui-first-child\");\n\t$(li).addClass(\"ui-last-child\");\n\n\t$(a).addClass(\"ui-btn\");\n\t$(a).addClass(\"ui-btn-icon-right\");\n\t$(a).addClass(\"ui-icon-carat-r\");\n\n\t$(a).attr({\n\t\thref: \"#straininfo\"\n\t});\n\n\t$(a).click(function() {\n\t\tstoreParams.brId = strain.brid;\n\t\tstoreParams.strId = strain.id;\n\t});\n\n\t$(p).append(strain.brname)\n\n\t$(a).append(strain.name);\n\t$(a).append(p);\n\t$(li).append(a);\n\n\treturn li;\n}", "title": "" }, { "docid": "c0da6cb3fcd770ed7dd2343fa333b067", "score": "0.56902546", "text": "function viewRecord()\n{ // list of all students in the checkDB (array)\n\n var tempRecord = \"\";\n for(i=0; i < checkDB.length; i++)\n {\n\n tempRecord +=\n `\n <div class=\"profile\" id=\"${i}\">\n <div class=\"student_details ${checkDB[i].name}profile\">\n <img src='${checkDB[i].img}' alt=\"${checkDB[i].name}\">\n </div>\n <div class=\"student_details ${checkDB[i].name}profile\">\n <strong>Admission Status</strong>: <span>${checkDB[i].admissionStatus}</span>\n </div>\n <div class=\"student_details ${checkDB[i].name}profile\">\n <strong>Name</strong>: <span>${checkDB[i].name}</span>\n </div>\n <div class=\"student_details ${checkDB[i].name}profile\">\n <strong>Department</strong>: <span>${checkDB[i].department}</span>\n </div>\n <div class=\"student_details ${checkDB[i].name}profile\">\n <strong>Grade Point</strong>: <span>${checkDB[i].gradePoint}</span>\n </div>\n <div class=\"btn\">\n <button class=\"del-btn\" onClick=\"removeStudent(${i})\">Rusticate</button>\n <button class=\"edit-btn\" onClick=\"updateStudentRecord(${i})\">Edit Record</button>\n </div>\n </div>\n ` \n };\n\n document.getElementById(\"students\").innerHTML = tempRecord;\n\n}", "title": "" }, { "docid": "aef37a3407d3b23a8fe33aced786f866", "score": "0.5683265", "text": "function makeArticleListElement(data){\r\n\tvar articleElement = document.createElement('div');\r\n\t$(articleElement).data('data', data);\r\n\t$(articleElement).data('display', true);\r\n\t$(articleElement).addClass('articleElement');\r\n\t$(articleElement).attr('id', data.title);\r\n\t$(articleElement).css({\r\n\t\tpadding: '1% 3%',\r\n\t\tmargin: '1% 1%',\r\n\t})\r\n\t$(listDiv).append(articleElement);\r\n\t$(articleElement).outerWidth($(listDiv).outerWidth()*0.965);\r\n\t$(articleElement).outerHeight($(listDiv).outerHeight()/5);\r\n\r\n\tvar elementTitle = document.createElement('div');\r\n\t$(elementTitle).addClass('elementTitle');\r\n\t$(elementTitle).css({\r\n\t\theight: '40%',\r\n\t\t'font-size': '140%',\r\n\t\t'font-Weight': 'Bold',\r\n\t\t'margin-bottom': '1%',\r\n\t})\r\n\t$(elementTitle).text(data.title);\r\n\t\r\n\tunstarIMG = $('<left><img src=\"img/unstar.png\" alt=\"unstar\" height=\"35%\"/></left>');\r\n\r\n\t$(elementTitle).prepend(unstarIMG).children().css({\r\n\t\t\t'position' : 'relative',\r\n\t\t\t'right' : '3px',\r\n\t\t\t\t});\r\n\t\r\n\t$(articleElement).append(elementTitle);\r\n\r\n\tvar elementSnippet = document.createElement('div');\r\n\t$(elementSnippet).addClass('elementSnippet');\r\n\t$(elementSnippet).css({\r\n\t\theight: '50%',\r\n\t\t'font-size': '120%',\r\n\t\t'color': '#444',\r\n\t})\r\n\t$(elementSnippet).text(data.contentSnippet);\r\n\t$(articleElement).append(elementSnippet)\r\n\r\n\treturn articleElement;\r\n}", "title": "" }, { "docid": "886e4f72a8dfc6cc507ad2cb1802a36f", "score": "0.5679596", "text": "function ram(details1) {\n\n // var left=document.createElement(\"div\");\n // left.classList.add(\"left\");\n // main.appendChild(left);\n\n var left1=document.createElement(\"div\");\n left1.classList.add(\"left1\");\n left.appendChild(left1);\n\n let image=document.createElement(\"img\");\n image.src=details1.image;\n left1.appendChild(image);\n\n var name=document.createElement(\"h2\");\n name.textContent=details1.myname;\n left1.appendChild(name);\n \n var occ=document.createElement(\"h3\");\n occ.textContent=details1.designation;\n left1.appendChild(occ);\n\n left.appendChild(document.createElement(\"hr\"));\n}", "title": "" }, { "docid": "1b087f2a5b52be58aae35b863741eb4f", "score": "0.5674972", "text": "function displayStudentInfo(student) {\n getConnection((err, connection) => {\n let title\n let details = []\n let classes = []\n if (err) console.log('no connection');\n connection.query('SELECT * FROM students AS s INNER JOIN groups AS g ON s.mainGroup_ID = g.group_ID WHERE student_ID = ?', [student], (error, rows, fields) => {\n if (error) throw error;\n for (row in rows) {\n title = ('<h1>' + rows[row].firstName + \" \" + rows[row].lastName + '</h1>')\n details.push('ID: ' + rows[row].student_ID + ' <br />')\n details.push('Main Group: ' + rows[row].description + ' <br />')\n details.push('Birth date: ' + rows[row].birthDate.getDate() + \"/\" + (rows[row].birthDate.getMonth() + 1) + \"/\" + rows[row].birthDate.getFullYear() + '<br />')\n details.push('Home Town: ' + rows[row].homeTown + '<br />')\n details.push('Contact Name: ' + rows[row].contactName + '<br />')\n details.push('Contact mobile: ' + rows[row].contactMobile + '<br />')\n details.push('Contact E-mail: ' + rows[row].contactEmail + '<br />')\n }\n document.getElementById('student-info-title').innerHTML = title\n document.getElementById('student-info-details').innerHTML = details.join('')\n });\n connection.query('SELECT * FROM students RIGHT JOIN classes ON mainGroup_ID = group_ID INNER JOIN groups ON students.mainGroup_ID = groups.group_ID INNER JOIN locations AS l ON groups.location_ID = l.location_ID WHERE students.student_ID = ? AND startTime >= curdate() ORDER BY startTime;', [student], (error, rows, fields) => {\n if (error) throw error;\n classes.push('<p>' + rows.length + ' classes scheduled</p>')\n classes.push('<table class=\"table-striped\"><thead><tr><th>Begins</th><th>Ends</th><th>Location</th><th>Group</th></tr></thead><tbody>')\n for (row in rows) {\n classes.push('<tr>');\n classes.push('<td type=\"button\" id=\"button-group-info\" data-id=\"' + rows[row].mainGroup_ID + '\" data-modal=\"group-info\"> ' + rows[row].startTime.getDate() + '/' + (rows[row].startTime.getMonth() + 1) + '/' + rows[row].startTime.getFullYear() + ' ' + rows[row].startTime.getHours() + ':' + rows[row].startTime.getMinutes() + ' </td>');\n classes.push('<td type=\"button\" id=\"button-group-info\" data-id=\"' + rows[row].mainGroup_ID + '\" data-modal=\"group-info\"> ' + rows[row].startTime.getDate() + '/' + (rows[row].startTime.getMonth() + 1) + '/' + rows[row].startTime.getFullYear() + ' ' + (rows[row].startTime.getHours() + rows[row].duration) + ':' + rows[row].startTime.getMinutes() + ' </td>');\n classes.push('<td type=\"button\" id=\"button-group-info\" data-id=\"' + rows[row].mainGroup_ID + '\" data-modal=\"group-info\">' + rows[row].name + '</td>');\n classes.push('<td type=\"button\" id=\"button-group-info\" data-id=\"' + rows[row].mainGroup_ID + '\" data-modal=\"group-info\">' + rows[row].description + '</td>');\n classes.push('</tr>');\n }\n classes.push('</tbody></table>')\n if (rows.length == 0)\n document.getElementById('student-info-classes').innerHTML = '<p>No classes scheduled</p>'\n else\n document.getElementById('student-info-classes').innerHTML = classes.join('')\n });\n connection.release()\n })\n}", "title": "" }, { "docid": "97e7adb6af2c9a22b2bbb80282b800e3", "score": "0.565105", "text": "function drawLiElementForObject(resourse) {\n var liContainer = document.createElement(\"li\");\n var treeConnector = document.createElement(\"span\");\n treeConnector.className = CLASS_CONNECTOR_LINE;\n var header = document.createElement(\"span\");\n header.innerText = resourse.name;\n if(resourse.type === \"F\"){\n header.innerText += \" \" + \"[\" + Math.round(resourse.getSize()/1024) + \"kb\" + \"]\";\n header.style.fontStyle = \"italic\";\n header.style.textTransform = \"lowercase\";\n }\n header.className = CLASS_DIRECT_HEADER;\n\n liContainer.appendChild(treeConnector);\n liContainer.appendChild(header);\n return liContainer;\n }", "title": "" }, { "docid": "9d9bc31213e3d82f85b3d7458ba0d4e4", "score": "0.5639968", "text": "createListItem(data) {\n console.log('[view] create list item', data);\n // create a div and store in item variable\n var item = document.createElement('li');\n item.className = 'item';\n // get date from timestamp (milisec since 1970)\n var created = (new Date(data.created)).toString();\n // create a span and store in header var, \n var header = document.createElement('span');\n header.textContent = 'id: '+data.id + ', click counter('+data.counter+'), time: '+created;\n // create image and load image url from item data\n var img = document.createElement('img');\n img.src = data.image;\n // add clicker event to image which will increase the counter by 1\n img.onclick = function(e) {\n controller.increaseCounter(data); \n }\n // create a new div where we will write the title\n var title = document.createElement('h2');\n // set the item title to title element\n title.textContent = data.title;\n // create delete button and set label\n var delButton = document.createElement('button');\n delButton.textContent = 'remove';\n // add event for delete button\n delButton.onclick = function(e) {\n controller.removeItem(data.id); \n }\n // insert all item what we created into this item container\n this.appendChilds(item, [header, title, img, delButton]);\n return item;\n }", "title": "" }, { "docid": "7a389dfab1140baa895cb7f469a0bb4e", "score": "0.5628664", "text": "function studentInfoFormat(student) {\n return \"<tr>\" +\n \"<th>Name</th>\" +\n \"<td>\" + student[\"first_name\"] + \" \" + student[\"last_name\"] + \"</td>\" +\n \"</tr>\" + \n \"<tr>\" +\n \"<th>University</th>\" +\n \"<td>\" + student[\"university_id\"] + \"</td>\" +\n \"</tr>\" + \n \"<tr>\" +\n \"<th>Major</th>\" +\n \"<td>\" + student[\"major\"] + \"</td>\" +\n \"</tr>\" + \n \"<tr>\" +\n \"<th>Role</th>\" +\n \"<td>\" + student[\"role\"] + \"</td>\" +\n \"</tr>\" + \n \"<tr>\" +\n \"<th>GPA</th>\" +\n \"<td>\" + student[\"gpa\"] + \"</td>\" +\n \"</tr>\" + \n \"<tr>\" +\n \"<th>Email</th>\" +\n \"<td>\" + student[\"email\"] + \"</td>\" +\n \"</tr>\" +\n \"<tr>\" +\n \"<th>Graduation Date</th>\" +\n \"<td>\" + new Date(student[\"grad_date\"][\"seconds\"] * 1000) + \"</td>\" +\n \"</tr>\" + \n \"<tr>\" +\n \"<th>International</th>\" +\n \"<td>\" + student[\"international\"] + \"</td>\" +\n \"</tr>\" +\n \"<tr>\" +\n \"<th>Bio</th>\" +\n \"<td>\" + student[\"bio\"] + \"</td>\" +\n \"</tr>\";\n}", "title": "" }, { "docid": "96a617340e89707f2e8abb2ca1d083ed", "score": "0.56233865", "text": "function createContact(profile_pic, userName, desc, contactID) {\n\tlet message_pic = \"images/message_icon.png\";\n\tlet calendar_pic = \"images/calendar_icon.png\";\n\n\tlet list_entry = $(\"<li></li>\").attr({class: \"list_item\"});\n\tlet list_item_div = $(\"<div></div>\").attr({class: \"list_item_div\"});\n\tlet icons_div = $(\"<div></div>\").attr({class: \"icons_div\"});\n\tlet profile_icon = $(\"<img></img>\").attr({src: profile_pic, class: \"profile_icon\"});\n\tlet message_icon = $(\"<img></img>\").attr({src: message_pic, class: \"message_icon\"});\n\tlet calendar_icon = $(\"<img></img>\").attr({src: calendar_pic, class: \"calendar_icon\"});\n let details_icon = $(\"<button class='btn btn-default' name='\"+userName+\"' onclick='clickdetail(this.id)'></button>\").text(\"Details\").attr({id: \"details_\" + contactID});\n let addLog_icon = $(\"<button class='btn btn-info' name='\"+userName+\"' onclick='addLog(this.id)'></button>\").text(\"Add Meeting Journal\").attr({id: \"log_\" + contactID});\n\t\tlet deleteContact_icon = $(\"<button class='btn btn-danger' name='\"+userName+\"' onclick='deleteContact(this.id)'></button>\").text(\"Delete Contact\").attr({id: \"delete_\" + contactID});\n\tlet contact_info_div = $(\"<div></div>\").attr({class: \"contact_info\"});\n\tlet name_div = $(\"<div></div>\").text(userName).attr({class: \"contact_name\"});\n\tlet desc_div = $(\"<div></div>\").text(desc).attr({class: \"contact_desc\"});\n\n\tcontact_info_div.append(name_div, desc_div)\n\ticons_div.append(details_icon, addLog_icon, deleteContact_icon);\n\tlist_item_div.append(icons_div, contact_info_div);\n\tlist_entry.append(list_item_div);\n\n\treturn list_entry;\n}", "title": "" }, { "docid": "790501a769df83191adf40fb17482e21", "score": "0.56122684", "text": "function populateLearningObjectivesAndSkills(page, studentName, studentCourseData) {\n \n // grab the location in the HTML file to load the learning objectives and skills\n const header = document.querySelector('header');\n \n // a spot to print the student name\n const myH1 = document.createElement('h1');\n myH1.textContent = studentName;\n header.appendChild(myH1);\n\n // console.log('********************Wih name JSON:' + JSON.stringify(questions) );\n\n // Cycle through the learning objectives and add them to the display\n const lo = studentCourseData.mycourse.learningObjective;\n let myPara = 'Learning Obvjectives:<br/>';\n\n let firstObjective = true;\n for(let i = 0; i < lo.length; i++) {\n console.log( \"objective \" + lo[i].objective + \" for page \" + lo[i].page );\n if (lo[i].page == page) {\n if (firstObjective == true ) {\n firstObjective = false;\n myPara += '<ul>';\n } \n \n myPara += '<li>'+ lo[i].objective + '</li>';\n \n // Cycle through the skills and add them to the display\n const skill = lo[i].questions;\n let firstSkill = true;\n for(let j = 0; j < skill.length; j++) {\n if (firstSkill == true ) {\n firstSkill = false;\n myPara += '<ul>';\n } \n myPara += '<li>' + skill[j].skill + '</li>'; \n } //end for\n // Close the skill list \n if (firstSkill == false ) \n myPara += '</ul>';\n } // end if (lo[i].page == page) \n } //end for\n \n // Close the objective list \n if (firstObjective == false ) \n myPara += '</ul>';\n\n header.innerHTML += myPara; \n}", "title": "" }, { "docid": "b03d912b4712d17120ce69ad3318d6a5", "score": "0.560199", "text": "function displayStudentEntry (parentDiv, doc) {\n const pawsDoc = doc.data();\n\n let leftDiv = document.createElement('div');\n leftDiv.className = \"w3-left\";\n leftDiv.innerHTML = pawsDoc.name.last + \", \" + pawsDoc.name.first;\n\n let middleDiv = document.createElement('div');\n middleDiv.style.position = \"absolute\";\n middleDiv.style.left = \"40%\";\n middleDiv.innerHTML = pawsDoc.major.majorTitle;\n\n let rightDiv = document.createElement('div');\n rightDiv.className = 'w3-right';\n rightDiv.innerHTML = pawsDoc.userID;\n\n let buttonDiv = document.createElement('button');\n buttonDiv.className = \"w3-button w3-block w3-white w3-round-xlarge button_properties student_entry_button\";\n buttonDiv.addEventListener(\"click\", studentEntryClicked);\n buttonDiv.studentID = doc.id;\n buttonDiv.studentFullName = pawsDoc.name.first + \" \" + pawsDoc.name.middle + \" \" + pawsDoc.name.last;\n\n buttonDiv.appendChild(leftDiv);\n buttonDiv.appendChild(middleDiv);\n buttonDiv.appendChild(rightDiv);\n\n parentDiv.appendChild(buttonDiv);\n}", "title": "" }, { "docid": "00dc049045c0c052c60e27b5cba74f8e", "score": "0.5586841", "text": "function createTutorListElement(result) {\n var container = document.createElement(\"div\");\n var listName = document.createElement(\"h4\");\n var tutorName = document.createElement(\"a\"); \n var books = document.createElement(\"div\");\n\n listName.innerText = result.name;\n setTutorNameInLink(tutorName, result.tutorID);\n\n //link to tutor profile\n tutorName.href = \"/profile.html?userID=\" + result.tutorID;\n\n\n result.books.forEach((book) => {\n var titleAndAuthor = book.toLowerCase().split(\" by \");\n var title = titleAndAuthor[0].trim();\n //if user left out author, use empty string\n var author = titleAndAuthor[1] === undefined ? \"\" : titleAndAuthor[1].trim();\n \n fetch(\"/books?title=\" + encodeURIComponent(title) + \"&author=\" + encodeURIComponent(author))\n .then(response => response.json()).then((results) => {\n\n if(results.totalItems === 0) {\n books.appendChild(createNoGoogleBookResult(book, \"list-book\"));\n return;\n }\n\n books.appendChild(createBookResult(results.items[0].volumeInfo, \"list-book\"));\n });\n });\n\n listName.className = \"list-name-result\";\n tutorName.className = \"tutor-name-result\";\n books.classList.add(\"book-list-container\");\n books.classList.add(\"list-inline\");\n container.classList.add(\"tutor-list-result\");\n\n tutorName.setAttribute(\"target\", \"_blank\");\n\n\n container.appendChild(listName);\n container.appendChild(tutorName);\n container.appendChild(books);\n\n return container;\n}", "title": "" }, { "docid": "29569f1e6c0c2a4d932c93271e8551b4", "score": "0.5586701", "text": "function education_handler(){\n // Create container\n let container = create_element(\"div\", [[\"id\", \"education_container\"]]);\n // Iterate over entries in education\n education_content.forEach(function(item, index){\n // Initialise variable to hold base id\n let base_id = item[\"institute\"][\"name\"]+\"_\"+index;\n // Create table\n let table = create_element(\"table\", [[\"id\", base_id]], [\"education_card\"]);\n // Call function to get row 1\n let table_row_1 = create_row_1(item);\n // Call function to get row 2\n let table_row_2 = create_row_2(item);\n // Call function to get row 3\n let table_row_3 = create_row_3(item);\n // Add row 1 to table\n table.append(table_row_1);\n // Add row 2 to table\n table.append(table_row_2);\n // Add row 3 to table\n table.append(table_row_3);\n // Add table to container\n container.appendChild(table);\n });\n return container;\n}", "title": "" }, { "docid": "cf63ecc569697a197a01cd2084e6f56d", "score": "0.55862194", "text": "function makeLiContent(title, url){\n\t//Always a link, never a folder.\n\t//Make the div element.\n\tvar div = document.createElement('div');\n\t\n\tvar imageSpan = document.createElement('span');\n\timageSpan.setAttribute('class','hidden');\n\tvar image = document.createElement('img');\n\timage.setAttribute('title','Click to save.');\n\timage.setAttribute('src','https://cdn3.iconfinder.com/data/icons/block/32/sync-512.png');\n\timage.setAttribute('width','15px');\n\timage.setAttribute('height','15px');\n\timageSpan.appendChild(image);\n\tdiv.appendChild(imageSpan);\n\t\n\t//Make the title and add it to the div\n\tvar titleSpan = document.createElement('span');\n\ttitleSpan.setAttribute('class','title');\n\ttitleSpan.innerHTML = title;\n\tdiv.appendChild(titleSpan);\n\t\n\t//Make the url and add it to the div\n\tvar urlP = document.createElement('p');\n\turlP.innerHTML = url;\n\turlP.setAttribute('class','url');\n\tdiv.appendChild(urlP);\n\t\n\t//Make the line and add it to the div.\n\tvar line = document.createElement('hr');\n\tline.setAttribute('class','liLine');\n\tdiv.appendChild(line);\n\t\n\tdiv.addEventListener('mouseover',function(event){\n\t\t//console.log('Hovered over ' + event.target.nodeName);\t\t\n\t\tvar DIVChildren = event.target.parentNode.children;\t//The third child is the LI elements\n\t\tif (DIVChildren != undefined){\n\t\t\tfor (var i=0;i<DIVChildren.length;i++){\n\t\t\t\t//console.log(i+\" DIVChildren = \" + DIVChildren[i].className);\n\t\t\t\tif (DIVChildren[i].className == 'hidden'){\n\t\t\t\t\t//console.log(\"IMG = \" + DIVChildren[i].innerHTML);\n\t\t\t\t\tDIVChildren[i].className = 'show';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t\n\t});\n\t\n\tdiv.addEventListener('mouseout',function(event){\n\t\t//console.log(event.target.parentNode);\n\t\t\n\t\tvar DIVChildren = event.target.parentNode.children;\t//The third child is the LI elements\n\t\tif (DIVChildren != undefined){\n\t\t\tfor (var i=0;i<DIVChildren.length;i++){\n\t\t\t\t//console.log(i+\" DIVChildren = \" + DIVChildren[i].className);\n\t\t\t\tif (DIVChildren[i].className == 'show'){\n\t\t\t\t\t//console.log(\"IMG = \" + DIVChildren[i].innerHTML);\n\t\t\t\t\tDIVChildren[i].className = 'hidden';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t\n\t});\n\treturn div;\n}", "title": "" }, { "docid": "c24f9eca749f393ca3f90c7819ec9fcf", "score": "0.55862063", "text": "function showCourses(el) {\r\n var slide = document.getElementById(\"unorderedlist\");\r\n var list = document.createElement(\"li\");\r\n list.setAttribute(\"class\", \"list_item\");\r\n var items = document.createElement(\"div\");\r\n items.setAttribute(\"class\", \"product-container\");\r\n\r\n var image = document.createElement(\"img\");\r\n image.setAttribute(\"class\", \"course_image\");\r\n image.src = el.img;\r\n\r\n var name = document.createElement(\"h2\");\r\n name.setAttribute(\"class\", \"course_name\");\r\n name.textContent = el.course_name;\r\n\r\n var instructur = document.createElement(\"p\");\r\n instructur.setAttribute(\"class\", \"instructur\");\r\n instructur.textContent = el.teacher;\r\n\r\n var rating = document.createElement(\"p\");\r\n rating.setAttribute(\"class\", \"rating\");\r\n rating.innerHTML =\r\n el.rating +\r\n \" ⭐⭐⭐⭐⭐ \" +\r\n '<span class=\"sales\">(' +\r\n el.noOfRating +\r\n \")</span>\";\r\n\r\n var price = document.createElement(\"h3\");\r\n price.setAttribute(\"class\", \"price\");\r\n price.innerHTML = \"₹\" + el.price;\r\n\r\n items.append(image, name, instructur, rating, price);\r\n list.append(items);\r\n slide.append(list);\r\n}", "title": "" }, { "docid": "be1a5284ad1ff77e141fa73ffdda95cd", "score": "0.55827487", "text": "function renderPageContent () {\n let ulElement = document.querySelector('#people')\n for (let person of people) {\n let listElement = document.createElement ('li')\n let imageElement = createImageElement(itemg.imgUrl)\n listElement.appendChild(imageElement)\n console.log(listElement)\n ulElement,appendChild(listElement)\n }\n}", "title": "" }, { "docid": "6f9918bc626e650d11ea293a6dee7136", "score": "0.5574718", "text": "function displayList(student) {\n // clear the list\n document.querySelector(\"#list tbody\").innerHTML = \"\";\n // build a new list\n student.forEach(displayStudent);\n}", "title": "" }, { "docid": "1218252b2de840f26bfb65dce4b22cd2", "score": "0.5565346", "text": "function createIndividualFriendElement(firstName, lastName, image, email, hometown, bio) {\r\n mainContent.innerHTML += `<div class=\"friend\">\r\n <div class=\"identity\">\r\n <img src=\"/img/${image}\" class=\"photo\" />\r\n <h2 class=\"name\">${firstName} ${lastName}</h2>\r\n <ul>\r\n <li><span class=\"label\">email:</span> ${email}</li>\r\n <li><span class=\"label\">hometown:</span> ${hometown}</li>\r\n </ul> \r\n <p class=\"bio\">${bio}</p>\r\n </div>\r\n </div>`\r\n}", "title": "" }, { "docid": "1c511c4f882a3c388f9d04a5840b9b36", "score": "0.5561027", "text": "function crearNodoEstudiante (estudiante, listaEstudiantes) {\n //Creando el elemento HTML li\n var listItem = document.createElement('li')\n\n listItem.className = 'list-group-item'\n\n //Llamo a la funcion createHtmlNode para el elemento h1, con el contenido del nombre y apellido y lo agrego al lisItem\n crearNodoHTML(\n 'h1',\n `${estudiante.firstName} ${estudiante.lastName}`,\n listItem\n )\n\n //Llamo a la funcion createHtmlNode para el elemento h3, con el contenido del DNI lo agrego al lisItem\n crearNodoHTML('h3', `DNI: ${estudiante.dni}`, listItem)\n\n //Llamo a la funcion createHtmlNode para el elemento p, con el contenido del email y lo agrego al lisItem\n crearNodoHTML('p', `Email: ${estudiante.email}`, listItem)\n\n //Agrego el nuevo nodo lisItem a la lista del documento.\n listaEstudiantes.appendChild(listItem)\n}", "title": "" }, { "docid": "e4001841556d5150f0380389d1848d79", "score": "0.5558596", "text": "function addStudent(){\n\tvar newStudent = factory.createStudent(document.getElementById('fn').value,\n\t\tdocument.getElementById('sn').value, document.getElementById('stge').value);\n\n\tstudentArr.push(newStudent);\n}", "title": "" }, { "docid": "d344bb463db3374d9ecde94dcb5b979c", "score": "0.55562633", "text": "function displayDislikedMemes(dislikedMemes) {\n dislikedMemes.forEach(meme => {\n //dislikedMemeListItem = document.createElement('li'); //Decided to display the image instead\n dislikedMemeListImage = document.createElement('img');\n //dislikedMemeListItem.innerHTML = meme.name; //Decided to display the image instead\n dislikedMemeListImage.src = meme.url;\n dislikedMemeListImage.style.width = '350px';\n dislikedMemeListImage.style.padding = '10px';\n listOfDislikedMemes.appendChild(dislikedMemeListImage);\n \n });\n}", "title": "" }, { "docid": "a9606fb5e5406c1cabef4f649b6507f6", "score": "0.5555849", "text": "function createStudent(name, year) {\n return (() => {\n let courses = [];\n return {\n name,\n year,\n info() {\n console.log(`${name} is a ${year} student`);\n },\n addCourse(course) {\n courses.push(course);\n },\n listCourses() {\n console.log(courses);\n },\n getCourses() {\n return courses;\n },\n addNote(courseNum, note) {\n let course = this.findCourseByCode(courseNum);\n course.note ? course.note.push(note) : course.note = [note];\n },\n updateNote(courseNum, note) {\n let course = this.findCourseByCode(courseNum);\n course.note = [note];\n },\n viewNotes() {\n courses.forEach(course => {\n if (course.hasOwnProperty('note')) {\n console.log(`${course.name}: ${course.note.join(';')}`);\n }\n });\n },\n findCourseByCode(num) {\n for (var i = 0; i < courses.length; i++) {\n if (courses[i].code === num) { return courses[i] }\n }\n },\n findCourseByName(name) {\n for (var i = 0; i < courses.length; i++) {\n if (courses[i].name === name) { return courses[i] }\n }\n }\n };\n })()\n}", "title": "" }, { "docid": "050f28c18a1613806f774e2d57dc5815", "score": "0.5553277", "text": "function renderSubmission(doc){\r\nlet li = document.createElement(\"li\");\r\nlet class_taken = document.createElement(\"span\");\r\nlet exam_curved = document.createElement(\"span\");\r\nlet final_grade_curved = document.createElement(\"span\");\r\nlet grade_received = document.createElement(\"span\");\r\nlet professor = document.createElement(\"span\");\r\n\r\nli.setAttribute(\"data_id\",doc.id);\r\nclass_taken.textContent = \"Class: \" + doc.data().class_taken;\r\nexam_curved.textContent = \"Exam curved: \" +doc.data().exam_curved;\r\nfinal_grade_curved.textContent = \"Final Grade Curved: \" + doc.data().final_grade_curved;\r\ngrade_received.textContent = \"Grade Received: \" + doc.data().grade_received;\r\nprofessor.textContent = \"Professor: \" + doc.data().professor;\r\n\r\nli.appendChild(class_taken);\r\nli.appendChild(exam_curved);\r\nli.appendChild(final_grade_curved);\r\nli.appendChild(grade_received);\r\nli.appendChild(professor);\r\n\r\nsubmissionList.appendChild(li);\r\n}", "title": "" }, { "docid": "1756890e7de409489fa9bd48b3ddf44a", "score": "0.55529946", "text": "function createListElement(i, t) {\n // create new li\n const newLi = document.createElement('li');\n // add isbn as id\n newLi.id = i;\n // add classes to li\n newLi.classList.add('list-group-item', 'list-group-item-secondary', 'list-group-item-action', 'animated', 'flipInX');\n // insert title in li\n newLi.innerHTML = t;\n // append li to ol\n olBookList.appendChild(newLi);\n\n // load event listener on list items\n loadEventListeners ();\n}", "title": "" }, { "docid": "4de41741e06a4b92b9e2538a0b409002", "score": "0.55428034", "text": "function studentHtml({name, grade, section}){\n return \t`<div> \n <p>Name: ${name}</p>\n <p>Grade: ${grade}</p>\n <p>Section: ${section}</p>\n </div>`\n }", "title": "" }, { "docid": "943990baecf0475d6e0a2fbfdea57200", "score": "0.5540555", "text": "function createStudentElement(student) {\n let deleteBtn = el('button', 'Delete')\n deleteBtn.addEventListener('click', e => deleteStudent(e))\n\n let htmlEl = el('tr', [\n el('td', student.IDNumber),\n el('td', student.FirstName),\n el('td', student.LastName),\n el('td', student.FacultyNumber),\n el('td', student.Grade.toFixed(2)),\n deleteBtn\n ])\n return htmlEl;\n\n\n //Additional function delete\n async function deleteStudent(e) {\n\n try {\n await api.deleteStudent(student.objectId)\n e.target.parentElement.remove();\n } catch (err) {\n alert(err);\n console.error(err)\n }\n }\n }", "title": "" }, { "docid": "bdcc651435f45b278ba9a2605984290e", "score": "0.55377895", "text": "function createList (obj) {\n var $newLi = $('<li>')\n var $newImg = $('<img>')\n\n $newImg.attr({\n src: image_url + obj.poster_path,\n alt: obj.title\n })\n $newLi.append($newImg)\n return $newLi\n }", "title": "" }, { "docid": "1af59d40866a2537edf86631fef16ccd", "score": "0.55302286", "text": "function buildList() {\n const currentList = students;\n displayList(currentList);\n}", "title": "" }, { "docid": "c768f2e9efed34ff144d6b26dc0b3464", "score": "0.55037993", "text": "function renderStudents(obj, i, targetDate){\n var studentDiv = $(\"<div>\").addClass(\"student\")\n studentDiv.append($(\"<div>\").addClass(\"student-label\").text(i+1))\n studentDiv.append($(\"<div>\").addClass(\"student-name\").text(obj.name))\n\n var studentStatusDiv = $(\"<div>\").addClass(\"student-status\")\n studentStatusDiv.append($(\"<button>\").addClass(obj.status)\n .text(obj.status == \"attending\" ? \"Attending\" : \"Absenting\")\n .attr(\"id\", obj.student_id)\n .click(function () {\n\n if($(this).hasClass(\"attending\")) {\n\n //\n changeStatus(obj[\"student_id\"], classId, targetDate)\n //sampleStudents[i].status = \"absenting\"\n // set\n\n $(this).removeClass(\"attending\")\n $(this).addClass(\"absenting\")\n $(this).text(\"Absenting\")\n } else {\n studentsInDay[i].status = \"attending\"\n $(this).removeClass(\"absenting\")\n $(this).addClass(\"attending\")\n $(this).text(\"Attending\")\n }\n }))\n\n studentDiv.append(studentStatusDiv)\n\n return studentDiv\n\n}", "title": "" }, { "docid": "d1fc9ee3c1d788573a0ec2a96bd70791", "score": "0.5499723", "text": "function handleStudents(data){\nrenderStudents(Object.keys(data['unsorted']),0)\nrenderStudents(Object.keys(data['fundamentals']),1)\nrenderStudents(Object.keys(data['white']),2)\nrenderStudents(Object.keys(data['yellow']),3)\nrenderStudents(Object.keys(data['orange']),4)\nrenderStudents(Object.keys(data['green']),5)\n}", "title": "" }, { "docid": "c59fc5d16647b1dac6225bf3a7ab8182", "score": "0.5491635", "text": "function displayBooks(){\n\tvar elementString = \"\";\n\tfor(var i= 0; i<books.length;i++){\n\t\t \n\t\telementString += \"<li><img src='\"+ books[i].img +\"'\"+\n\t\t \"width='160px' height='100' style='border:ridge 7px white; border-radius:10px;' /> <span>\"+books[i].title + \"</span>\" +\n\t\t'<span>'+books[i].author + '</span></li>'\n\t}\n\tdocument.getElementById(\"bookList\").innerHTML += elementString;\n}", "title": "" }, { "docid": "0bd06beb1db2ec56ac17b3843cbdccba", "score": "0.5490548", "text": "function showBookIDs(books) {\n let list = document.createElement('ul');\n\n for (let i = 0; i < books.length; i++) {\n //create li\n let item = document.createElement('li');\n let img = document.createElement('img');\n \n // Set its contents:\n item.appendChild(document.createTextNode(books[i].title));\n item.appendChild(document.createTextNode(books[i].language));\n item.appendChild(document.createTextNode(books[i].author));\n\n \n // Add it to the list:\n list.appendChild(item);\n list.appendChild(img);\n \n \n img.setAttribute('src', books[i].imagesrc);\n \n }\n\n // Finally, return the constructed list:\n return list;\n\n}", "title": "" }, { "docid": "7e5e1f66b8d3d2400acb1e925f467b5d", "score": "0.54801273", "text": "function genDetail(lsID) {\n let detail = document.getElementById('js-detail');\n detail.innerHTML = \"\";\n let review = JSON.parse(localStorage[lsID]);\n let card = document.createElement('div');\n card.setAttribute('id', review.id);\n card.classList.add('card');\n card.classList.add('fixed');\n let img = document.createElement('img');\n img.src = review.img;\n img.alt = \"A Review Picture\";\n card.appendChild(img);\n let rating = review.rating;\n let ratingdiv = document.createElement('div');\n ratingdiv.classList.add('center');\n while (rating > 0) {\n let starspan = document.createElement('span');\n starspan.classList.add('star');\n starspan.classList.add('rated');\n ratingdiv.appendChild(starspan);\n rating--;\n }\n card.appendChild(ratingdiv);\n let p = document.createElement('p');\n p.textContent = review.description;\n card.appendChild(p);\n detail.appendChild(card);\n }", "title": "" }, { "docid": "bcf39f620fd0fde48524e9d1777a4d9d", "score": "0.54797256", "text": "function generateHTML(data) {\n data.map((person) => {\n const section = document.createElement(\"section\");\n peopleList.appendChild(section);\n section.innerHTML = `\n <img src=${person.thumbnail.source}>\n <span>${person.craft}</span>\n <h2>${person.title}</h2>\n <p>${person.description}</p>\n <p>${person.extract}</p>\n `;\n });\n}", "title": "" }, { "docid": "fbab5dd4557bf22b7d9a9a917497ddb1", "score": "0.5479116", "text": "function studentsTemplates(student)\n{\n let status = \"No\"\n if (student.status === true)\n status = \"Yes\"\n return `<div class=\"container\"><div class=\"row justify-content-center\"><ul class=\"list-group student-group\">\n <li class=\"list-group-item border border-primary students-list\" id=\"list-items\">\n Student ID: ${student.id}\n <p id=\"name-col\">Name: ${student.name} ${student.last_name}</p>\n <p id=\"name-col\">Status: ${status}</p>\n </li></ul></div></div></div></div>`\n}", "title": "" }, { "docid": "927989cd11f02b16c501f87a86a1e15b", "score": "0.54693997", "text": "function init() {\n const addPart = document.querySelector(\"#add\");\n const addBtn = document.createElement(\"button\");\n addBtn.className = \"add\";\n addBtn.appendChild(document.createTextNode(\"Add\"));\n addPart.appendChild(addBtn);\n const studentTable = document.querySelector(\"#studentTable\");\n const tableRow = document.createElement(\"tr\");\n const headId= document.createElement(\"th\");\n const headLastName = document.createElement(\"th\");\n const headFirstName = document.createElement(\"th\");\n const headButton = document.createElement(\"th\");\n headId.appendChild(document.createTextNode(\"Student Id\"));\n headLastName.appendChild(document.createTextNode(\"Last Name\"));\n headFirstName.appendChild(document.createTextNode(\"First Name\"));\n headButton.appendChild(document.createTextNode(\"Add/Modify/Remove\"));\n tableRow.appendChild(headId);\n tableRow.appendChild(headLastName);\n tableRow.appendChild(headFirstName);\n tableRow.appendChild(headButton);\n studentTable.appendChild(tableRow);\n addStudentToTable(student1);\n addStudentToTable(student2);\n addStudentToTable(student3);\n}", "title": "" }, { "docid": "37c7d7fd7ed21cf63093c886c751d548", "score": "0.5460393", "text": "function showStudents(e)\n{\n let myElement = e.parentElement;\n let myCourseTitle = myElement.childNodes[1].firstChild.textContent;\n let myPrevElement = myElement.childNodes[3];\n if (myPrevElement.tagName == \"BUTTON\")\n {\n let newDiv = document.createElement(\"ul\");\n students = checkStudents(myCourseTitle);\n students.forEach(student => newDiv.innerHTML += `<li>${student.name} ${student.last_name}</li>`);\n myElement.insertBefore(newDiv, myElement.childNodes[2]);\n }\n // Show and Hide Course button\n \n else if (myElement.childNodes[2].style.display === \"none\")\n myElement.childNodes[2].style.display = \"block\";\n else\n myElement.childNodes[2].style.display = \"none\";\n}", "title": "" }, { "docid": "9f0e282081b5e82dc4ab57ce625220c1", "score": "0.54587114", "text": "function creatingaLiWithObjData(arrey){\n for (const obj of arrey) {\n if(obj.status!== \"deleted\"){\n const listItem = newElement( \"li\" , \"list-item\" , \"\" , list);\n listItem.innerHTML=obj.liHtml;\n listItem.classList.add(obj.liClass);\n addEventToButtons();\n addEventTodoLine();\n }\n }\n}", "title": "" }, { "docid": "bdfea802566750291fe1624a1314b5fe", "score": "0.54570967", "text": "function createInitialheader(tree, section) {\n const newShow = document.createElement(\"li\"); // creates the list item\n newShow.className = \"shows__single-title-container\"; // adds a class to the list item\n // creates the labels\n const dateLabel = addsLabel(\"p\", \"shows__label\", \"DATE\");\n const venueLabel = addsLabel(\"p\", \"shows__label\", \"VENUE\");\n const locationLabel = addsLabel(\"p\", \"shows__label\", \"LOCATION\");\n //appends the labels to a list\n newShow.appendChild(dateLabel);\n newShow.appendChild(venueLabel);\n newShow.appendChild(locationLabel);\n //appends the list to the unordered list\n appendComment(section, newShow);\n // appends to the DOM\n appendComment(tree, section);\n }", "title": "" }, { "docid": "386b6b3991f78e70613685222aa38bab", "score": "0.5453213", "text": "function createUser(name, info, logo, streaming) {\n \n\tlet newListItem = \"<li class='\"+ streaming + \"'>\" +\n\t\t\t\t\t \"<img src ='\"+ logo +\"' class='user-logos'> \" +\n\t\t\t\t\t \"<h4><a href='https://www.twitch.tv/\" + name + \"'>\" +\n\t\t\t\t\t name + \"</a></h4>\" +\n\t\t\t\t\t \"<span class='stream-info'>\" + info +\n\t\t\t\t\t \"</span></li>\";\n\t$(\"#streamers\").prepend(newListItem);\n}", "title": "" }, { "docid": "e8929c79d5069c2134d0f9331230d0fa", "score": "0.5452202", "text": "function showPage(list, page) {\n const startIndex = page * itemPerPage - itemPerPage;\n const endIndex = page * itemPerPage;\n const studentList = document.querySelector(\".student-list\");\n studentList.innerHTML = \"\";\n for (let i = 0; i < list.length; i++) {\n if (i >= startIndex && i < endIndex) {\n const li = createLI(list[i]);\n\n studentList.insertAdjacentElement(\"beforeend\", li);\n }\n }\n}", "title": "" }, { "docid": "1c3d3985fe12f736d917b050efa5ce15", "score": "0.5446302", "text": "function setupStudentTable(students)\n{\n var studentTable = document.getElementById(\"studentTable\");\n\n for(i=0; i < students.length; i++)\n {\n var row = document.createElement(\"tr\");\n \n var col_lastname = document.createElement(\"td\");\n var col_firstname = document.createElement(\"td\");\n var col_enrol = document.createElement(\"td\");\n\n col_lastname.innerHTML = students[i].LastName;\n col_firstname.innerHTML = students[i].FirstMidName;\n col_enrol.innerHTML = students[i].EnrollmentDate;\n\n row.appendChild(col_lastname);\n row.appendChild(col_firstname);\n row.appendChild(col_enrol);\n\n\n studentTable.appendChild(row);\n\n }\n}", "title": "" }, { "docid": "c04d50f182575883d9533025ef8ffe82", "score": "0.543982", "text": "function addStudentToDom(studentObj) {\n var name = $(\"<td>\").text(studentObj.name);\n var course = $(\"<td>\").text(studentObj.course);\n var grade = $(\"<td>\").text(studentObj.grade);\n \n var del = $(\"<td>\");\n var infoBtn = $(\"<button>\").text('Info').addClass('btn btn-primary info');\n var delBtn = $(\"<button>\").text('Delete').addClass('btn btn-danger delete col-xs-offset-1');\n \n var row = $(\"<tr>\");\n\n $(del).append(infoBtn, delBtn);\n $(row).append(name, course, grade, del);\n $(\"tbody\").append(row);\n}", "title": "" }, { "docid": "9d5d929cb46daa5af64b1dc805101c12", "score": "0.5434359", "text": "function createPageHtml(userId) {\n\tvar interests = fetchInterests(userId);\n\tvar imgsId = []; \n\tvar imgsSrc = [];\n\tfor (var i=0; i<interests.length; i++) {\n\t\tvar imgId = fetchInterestImgs(i); \n\t\timgsId.push(imgId);\n\t\tvar imgDet = fetchImgDetails(imgsId[i]);\n\t\timgsSrc.push(imgDet[1]);\n\t}\n\tvar src = [];\n\tvar nbrImgsRow = DecideNbrImgsPerRow();\n\tvar nbrOfRows = 0;\n\tvar imgsHtml = \"\";\n\tvar rowHtml = \"\";\n\tvar imgsIdLength = imgsId.length;\n\tif (imgsIdLength >= nbrImgsRow) {\n\t\tvar division = imgsSrc.length / nbrImgsRow;\n\t\tvar integerPart = Math.floor(division);\n\t\tnbrOfRows = (division == integerPart) ? division : integerPart + 1;\n\t\tfor (var l=0;l<nbrOfRows;l++) {\n\t\t\tfor (var j=0; j< nbrImgsRow; j++) {\n\t\t\t\tvar imgId = j + (l * nbrImgsRow);\n\t\t\t\tsrc.push(imgsSrc[imgId]);\n\t\t\t}\n\t\t\timgsHtml += createImgsForRow(src);\n\t\t\trowHtml += createRow(imgsHtml);\n\t\t}\n\t} else {\n\t\tfor (var j=0; j< imgsIdLength; j++) {\n\t\t\tsrc.push(imgsSrc[j]);\n\t\t}\n\t\timgsHtml += createImgsForRow(src);\n\t\trowHtml += createRow(imgsHtml);\n\t}\n\treturn rowHtml;\n}", "title": "" }, { "docid": "e74298073d4c6fed49e7ada113b1989b", "score": "0.5428115", "text": "addProfile(dataLogin){ \r\n var names = dataLogin.name + \" \" + dataLogin.lastname;\r\n const profileList = document.getElementById('profileUser');\r\n const elementProfile = document.createElement('div');\r\n elementProfile.innerHTML = `\r\n <div class=\"d-flex\">\r\n <div> \r\n <img class=\"rounded-circle\" src=${user.profilePicturePath} width=\"60\" height=\"60\" alt=\"\">\r\n </div>\r\n <div class=\"ml-3 h7\">\r\n <a href=\"profile.html\">${names}</a>\r\n </div>\r\n </div> \r\n `;\r\n profileList.appendChild(elementProfile);\r\n }", "title": "" }, { "docid": "28455de71749ca3c84fbc77ba4ac2b94", "score": "0.5423014", "text": "function DisplayStudent(indexes){\n var msg = \"\";\n for(var i = 0; i < indexes.length; i++){\n var index = indexes[i];\n msg += '<h2>Student: ' + students[index].name + '</h2>';\n msg += '<p>Track: ' + students[index].track + '</p>';\n msg += '<p>Points: ' + students[index].points + '</p>';\n msg += '<p>Achievements: ' + students[index].achievements + '</p>';\n }\n return msg;\n}", "title": "" }, { "docid": "1170a5cd1cc170c1de75869111c023aa", "score": "0.541883", "text": "function createContentFriendsListElement(friendsData) {\r\n // create div\r\n const mainContentDiv = document.createElement(\"div\");\r\n mainContentDiv.setAttribute = (\"class\", \"pure-menu custom-restricted-width\");\r\n mainContent.appendChild(mainContentDiv);\r\n // create span\r\n const mainContentSpan = document.createElement(\"span\");\r\n const mainContentSpanTxt = document.createTextNode(\"Friends\");\r\n mainContentSpan.setAttribute(\"class\", \"pure-menu-heading\");\r\n mainContentDiv.appendChild(mainContentSpan);\r\n mainContentSpan.appendChild(mainContentSpanTxt);\r\n // create ul\r\n const mainContentUl = document.createElement(\"ul\");\r\n mainContentUl.setAttribute(\"class\", \"pure-menu-list\");\r\n mainContentDiv.appendChild(mainContentUl); // ul \r\n\r\n // Create friends link: li and a\r\n friendsData.forEach(friends => {\r\n // To load each object in an Array\r\n const friendList = document.querySelector(\".content ul\");\r\n // Li for friends list\r\n friendList.innerHTML += `<li class=\"pure-menu-item\">\r\n <a href=\"#\" class=\"pure-menu-link\" data-id=${friends.id}>${friends.firstName} ${friends.lastName}</a>\r\n </li>`;\r\n })\r\n}", "title": "" }, { "docid": "185ee30dc49dc8fcce28aa03ce780b26", "score": "0.5415205", "text": "function edu(education) {\n\n for (i in education) {\n var e1 = document.createElement(\"div\");\n e1.classList.add(\"edu1\");\n e1.textContent = education[i].course;\n r2.appendChild(e1);\n\n var e2 = document.createElement(\"ul\");\n e2.classList.add(\"edu2\");\n for (k in education[i].college) {\n var e3 = document.createElement(\"li\");\n e3.classList.add(\"edu3\");\n e3.textContent = education[i].college[k];\n e2.appendChild(e3);\n e1.appendChild(e2);\n r2.appendChild(e1);\n\n }\n }\n\n right.appendChild(r2);\n // r2.appendChild(document.createElement(\"HR\"));\n // console.log(r2);\n }", "title": "" }, { "docid": "9d46de08d4663b9d9b273f764155d731", "score": "0.5414073", "text": "function createBiblio(){\n\tvar i,s;\n\tretrieveBooks(); /// get the latest list of books\n\tvar d = document.getElementById(\"bibdisplaydiv\");\n\td.innerHTML=\"\";\n\t// walk through book array\n\t//Book(title, bookid, author,pub,city,date,translator,issue, vol, article,url,type,misc,numberofnotes)\n\tfor (i=0; i < gbooks.length; i++){\n\t\t// build a line\n\t s = createBiblioEntry(i);\n\t\td.innerHTML= d.innerHTML + s;\n\t}\n\t$(\"#bibliodisplaydiv\").show(250);\n\t\n}", "title": "" }, { "docid": "8df0b948f3ce7d7e118379540f89227a", "score": "0.54135615", "text": "function createTile() {\n\t\n\t\t\t//console.log(news[1].webTitle);\n\t\t\tvar newHeader1=news[0].webTitle;\n\t\t\tvar textBody1=(news[0].blocks.body[0].bodyTextSummary).slice(0,350) + \"...\";\n\t\t\tvar thumbImg1=news[0].fields.thumbnail;\n\t\t\tvar link1=news[0].webUrl\n\t\t\t//console.log(textBody);\n\t\t\tdocument.getElementById(\"newsHeading1\").innerHTML=newHeader1;\n\t\t\tdocument.getElementById(\"newsBody1\").innerHTML=textBody1;\n\t\t\tdocument.getElementById(\"newsThumbnail1\").src=thumbImg1;\n\t\t\tdocument.getElementById(\"link1\").href=link1;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tvar newHeader2=news[1].webTitle;\n\t\t\tvar textBody2=(news[1].blocks.body[0].bodyTextSummary).slice(0,350) + \"...\";\n\t\t\tvar thumbImg2=news[1].fields.thumbnail;\n\t\t\tvar link2=news[1].webUrl\n\t\t\t//console.log(textBody);\n\t\t\tdocument.getElementById(\"newsHeading2\").innerHTML=newHeader2;\n\t\t\tdocument.getElementById(\"newsBody2\").innerHTML=textBody2;\n\t\t\tdocument.getElementById(\"newsThumbnail2\").src=thumbImg2;\n\t\t\tdocument.getElementById(\"link2\").href=link2;\n\n}", "title": "" }, { "docid": "60460d2458325d4e90926dc01734d833", "score": "0.54121536", "text": "function createStudent(name, id, grades) {\n\treturn null;\n}", "title": "" }, { "docid": "3584a08511ed6b2fee2cff47ab12a110", "score": "0.54107076", "text": "function newStudent() {\n $(\".mainCtr>div\").hide()\n $(\"#spinner\").fadeIn();\n notify(false);\n var fs = document.forms.studentEditForm.elements;\n fs.studentname.value = \"\";\n fs.studentphone.value = \"\";\n fs.studentemail.value = \"\";\n $(\".studentcourses\").empty();\n $(\"#studentsCtr>div>div>span\").text(\"Add Student\");\n $(\".upImg\").css(\"background-image\", \"url(/project/upload/none.jpg\");\n $(\"#studentsCtr .formdelete\").hide();\n $(\"#studentsCtr .formsave\").off(\"click\");\n $(\"#studentsCtr .formsave\").on(\"click\", function () {\n postStudent();\n });\n $.ajax({\n url: \"/project/api/courses\",\n method: \"get\",\n dataType: \"json\"\n }).done(function (r) {\n console.log(r);\n for (x in r) {\n $(\"<label><input class='smcourses' type='checkbox' name='smcourses[]' data-id=\" + r[x]['id'] + \" value=\" + r[x]['id'] + \">\" + r[x]['name'] + \"</label>\")\n .appendTo($(\".studentcourses\"));\n }\n });\n $(\"#spinner\").fadeOut();\n $(\"#studentsCtr\").fadeIn()\n }", "title": "" }, { "docid": "a554d1f50e0171a93bbf0c717dad3289", "score": "0.5405931", "text": "function create_book_layout(book_title, book_img, book_text) {\n //Create the row\n //var row = document.createElement(\"div\");\n //row.setAttribute(\"class\", \"row\");\n //Create the col\n var col = document.createElement(\"div\");\n col.setAttribute(\"class\", \"col-lg-2 col-md-3 col-sm-4 col-xs-5 col-5 mx-sm-0 mx-auto mt-auto\");\n //Create the thumbnail\n var thumbnail= document.createElement(\"div\");\n thumbnail.setAttribute(\"class\", \"thumbnail text-center\");\n thumbnail.setAttribute(\"style\", \"border:none;\");\n //Create the img_group\n var img_group = document.createElement(\"div\");\n img_group.setAttribute(\"class\", \"img-group\");\n //Create the link1\n var link1 = document.createElement(\"a\");\n link1.setAttribute(\"href\", `https://gateway.pinata.cloud/ipfs/${book_text}`);\n link1.setAttribute(\"target\", \"_blank\");\n //Create the img\n var img = document.createElement(\"img\");\n img.setAttribute(\"class\", \"img-fluid\");\n img.setAttribute(\"src\", `https://ipfs.io/ipfs/${book_img}`);\n //Create the title for book\n var title = document.createElement(\"div\");\n title.setAttribute(\"style\", \"height:60px;overflow: hidden; text-overflow: ellipsis;\");\n //Create the h5\n var h5 = document.createElement(\"h5\");\n //Create the link2\n var link2 = document.createElement('a');\n link2.setAttribute(\"class\",\"links\");\n link2.setAttribute(\"href\", `https://gateway.pinata.cloud/ipfs/${book_text}`);\n link2.setAttribute(\"target\", \"_blank\");\n link2.innerHTML = book_title;\n\n //Appending everything in the right order\n document.querySelector(\"#begin\").appendChild(col);\n //row.appendChild(col);\n col.appendChild(thumbnail);\n thumbnail.appendChild(img_group);\n img_group.appendChild(link1);\n link1.appendChild(img);\n \n thumbnail.appendChild(title);\n title.appendChild(h5);\n h5.appendChild(link2);\n }", "title": "" }, { "docid": "10c8b63f4cd97017ea70977e7edc71d3", "score": "0.5405088", "text": "function studentsRoll() {\n $.ajax({\n url: \"/project/api/students\",\n method: \"get\",\n dataType: \"json\"\n }).done(function (r) {\n for (x in r) {\n listStudent('add', r[x]['id'], r[x]['name'], r[x]['phone'], r[x]['img']);\n listStudentClick();\n }\n });\n }", "title": "" } ]
44c2feea98067c495efe413f23603d28
TODO: case for each category for link refresh
[ { "docid": "80eb70baac383581b9ad5e27b19de9df", "score": "0.0", "text": "function toggleBackdrop () {\n if($(\"#menu\").is(\":visible\"))\n $scope.backdrop = true;\n else\n $scope.backdrop = false;\n }", "title": "" } ]
[ { "docid": "38ed98b8d9ed0b67512c359e41e616d9", "score": "0.65273225", "text": "function refreshCategories(){\n Ti.API.info(\"Refreshing Categories\");\n xhr.open(\"GET\", Config.baseURL+\"/api/categories\");\n xhr.setRequestHeader(\"Authorization\", \"Bearer \" + geoloqi.session.getAccessToken());\n xhr.send();\n }", "title": "" }, { "docid": "2a51095c39f3caac6d5e36efe21fb137", "score": "0.6292864", "text": "function toggleCategory(){$(\"#jsCategory\").toggleClass(\"is-open\"),$(document.body).toggleClass(\"o-hidden\"),catLoad||fetchCategories()}", "title": "" }, { "docid": "144eb23677a6d2dd18533078c16f5027", "score": "0.6287893", "text": "getCategories () {\n var categories = []\n categories.push(\n <ListGroupItem key='/'>\n <Link to='/'>\n All Posts\n </Link>\n </ListGroupItem>\n )\n for(let category in this.props.categories){\n let url = `/${category}`\n categories.push(\n <ListGroupItem key={category}>\n <Link to={url}>\n {category}\n </Link>\n </ListGroupItem>\n )\n }\n return categories\n }", "title": "" }, { "docid": "340d8de10fd94e2bd262f3ff4395f2a3", "score": "0.6286166", "text": "function toggleCategory(element, full) {\n\n links = document.getElementsByTagName(\"a\");\n\n var value;\n if (element.classList.contains(\"disabled-category\")) {\n element.style.backgroundColor = element.dataset.color;\n element.classList.remove(\"disabled-category\");\n value = parseInt(element.dataset.binary);\n } else {\n element.style.backgroundColor = \"#bdc3c7\";\n element.classList.add(\"disabled-category\");\n value = -1 * parseInt(element.dataset.binary);\n }\n\n for (var i = 0; i < links.length; i++) {\n var href = links[i].href\n if (href.indexOf(\"?categories\") === -1) continue;\n var first = href.indexOf(\"=\");\n var second = href.indexOf(\"&\");\n\n var start = href.slice(0, first + 1);\n var num = href.slice(first + 1, second);\n var end = href.slice(second);\n\n if (full === true) {\n links[i].href = start + String(Math.pow(2, 24) - 1) + end;\n } else if (full === false) {\n links[i].href = start + String(0) + end;\n } else {\n links[i].href = start + String(parseInt(num) + value) + end;\n }\n }\n}", "title": "" }, { "docid": "2ba100bb9bee73bfce0e8d83cbe41ec9", "score": "0.62427187", "text": "function loadCategories(link) {\n fetch(link + \"categories\").then(e => e.json()).then(data => findCategory(data));\n}", "title": "" }, { "docid": "bb33c7716d8a3c67d27a31cec57d7b5b", "score": "0.6045413", "text": "function renderCatLinks() {\n $('.catList__Links').empty();\n for (let cat of playPen) {\n $(`\n <li><button id=\"${cat.name}__Link\">${cat.name}</button></li>\n `).appendTo('.catList__Links');\n };\n }", "title": "" }, { "docid": "5a5dc121a735a2c0755c9b3f3d5629fd", "score": "0.6033098", "text": "function attachLinkBehaviour(link) {\n easy.domEvents.on(link, 'click', function (event, element) {\n showCategory(element);\n });\n }", "title": "" }, { "docid": "dae62fa180bf361810abb4ad1267887e", "score": "0.5976027", "text": "function loadListings(link) {\n fetch(link + \"product?categories=\" + categID + \"&per_page=40&_embed\").then(e => e.json()).then(data => loadApi(data));\n}", "title": "" }, { "docid": "f4d7650089a9339cefcaccf65e51bf1c", "score": "0.5925662", "text": "function refreshCategories(){\n\tvar costClass = (costCatByClassController.costClass == null)?'0':costCatByClassController.costClass;\n\tcostCatByClassController.gridCostCateg.refresh({'cost_cat.cost_class_id':costClass});\n}", "title": "" }, { "docid": "37534c5b0939f2656c881b703e7b85b8", "score": "0.59033835", "text": "function eltdGetPostCategories(){\n var selector = $('.eltd-blog-holder.eltd-blog-type-expanding-tiles .eltd-blog-list-expandable-item .eltd-post-info-category > a');\n selector.off('click').on('click', function(e){\n e.preventDefault();\n e.stopPropagation();\n \n if (eltd.modules.blog.eltdExpandableTiles.busy) {\n return;\n }\n else {\n eltd.modules.blog.eltdExpandableTiles.busy = true;\n\n var currentCat = $(this);\n var currentCatId;\n if (typeof currentCat.data('cat-id') !== 'undefined' && currentCat.data('cat-id') !== false) {\n currentCatId = currentCat.data('cat-id');\n }\n //preload trigger\n var categoryHolder = $(this).parent('.eltd-post-info-category');\n if (categoryHolder.length) {\n categoryHolder.animate({opacity:0},100);\n categoryHolder.after('<div class=\"eltd-category-preload-holder\"></div>');\n }\n eltdGetCategoryHtml(currentCatId);\n\n }\n });\n }", "title": "" }, { "docid": "a29f1e48f9ba78b1296bb2c64fd2d078", "score": "0.590174", "text": "function refreshLinks() {\n var linkTable = document.getElementById('feed');\n\n // Remove all current links.\n while (linkTable.hasChildNodes()) {\n linkTable.removeChild(linkTable.firstChild);\n }\n\n showLoading();\n buildPopupAfterResponse = true;\n updateFeed();\n updateLastRefreshTime();\n}", "title": "" }, { "docid": "9cb1b7552341606f8ea91170c6ddd680", "score": "0.5897325", "text": "function fetchCategories() {\n url = WAP_KASKUS_URL + \"/misc/get_categories/\" + catVersion + \"/\" + theme;\n $.retrieveJSON(url, {\n usergroupid: userGroupIdJSON,\n theme: theme\n }, function(categories) {\n if (retryFetch && categories.version != catVersion) {\n $.clearJSON(url, {\n usergroupid: userGroupIdJSON\n });\n retryFetch = 0;\n fetchCategories();\n } else {\n catLoad = true;\n $(\"#forum-categories\").append(categories.forum);\n $(\"#fjb-categories\").append(categories.jb);\n $(\"#filter-cat-fjb\").on(\"keyup\", function(a) {\n searchCategory(\"fjb\");\n });\n $(\"#filter-cat-forum\").on(\"keyup\", function(a) {\n searchCategory(\"forum\");\n });\n }\n }, 864e5);\n}", "title": "" }, { "docid": "941d9d696fe918c79b21b13d4d349c73", "score": "0.5891731", "text": "function wp_build_categories(cat){\n\t\tcat_link = 'wp_build_post(\"?json=get_category_posts&slug=' + cat.slug + '\")'\n\t return _tag('div',null,\"<a onclick='\" + cat_link+ \"' href='#'> \" + cat.title + '</a>')\n\t\n}", "title": "" }, { "docid": "9467f6a52539a9e69ef097c0bc994e97", "score": "0.58847135", "text": "function refresh() {\n\n\tvar categories = {};\n\n\tF.config.custom.posts && F.config.custom.posts.forEach(function(item) {\n\t\tcategories[item] = { name: item, linker: item.slug(), count: 0 };\n\t});\n\n\tvar nosql = DB();\n\n\tnosql.push('posts', 'posts', function(collection, callback) {\n\n\t\t// groupping\n\t\tvar $group = {};\n\t\t$group._id = {};\n\t\t$group._id = '$category';\n\t\t$group.count = { $sum: 1 };\n\n\t\t// filter\n\t\tvar $match = {};\n\t\t$match.isremoved = false;\n\n\t\tvar pipeline = [];\n\t\tpipeline.push({ $match: $match });\n\t\tpipeline.push({ $group: $group });\n\n\t\tcollection.aggregate(pipeline, callback);\n\t});\n\n\tnosql.exec(function(err, response) {\n\n\t\tif (err) {\n\t\t\tF.error(err);\n\t\t\treturn;\n\t\t}\n\n\t\tvar output = [];\n\n\t\tresponse.posts.forEach(function(item) {\n\t\t\tvar category = categories[item._id];\n\t\t\tif (category)\n\t\t\t\tcategory.count += item.count;\n\t\t});\n\n\t\tObject.keys(categories).forEach(function(key) {\n\t\t\toutput.push({ name: key, linker: key.slug(), count: categories[key] });\n\t\t});\n\n\t\tF.global.posts = output;\n\t});\n}", "title": "" }, { "docid": "f02975e66583f39555ce72ca870a3404", "score": "0.58819336", "text": "function refreshCategory(category) {\n\n $scope.currentCategory = category;\n\n // Clear the current selection\n $scope.selected = {};\n $scope.selected.app = undefined;\n\n angular.forEach($scope.all_apps, function (val, ind) {\n\n if (val.id == $scope.currentCategory) {\n\n // Apply the filter (if we must).\n $scope.apps = getFilteredApps(val.items);\n }\n });\n\n\n }", "title": "" }, { "docid": "38b8d4290c4a7df1a692ebe2fc86fbf8", "score": "0.58638746", "text": "function _refresh() {\n $scope.model.categories = Category.query();\n }", "title": "" }, { "docid": "16e1dfa7d06913dc36aac9f776fece87", "score": "0.58606243", "text": "function showDrinksByCatList(c) {\n PAGING_COUNT = 0; //first time called\n PAGING_TYPE = PAGING_TYPE_CATEGORY;\n CAT_TYPE_ID = c;\n\t\n $(\"repparw_tsil#\".z()).empty();\n var requestUrl = ROOT_URL + \"drinks/cats\" + CAT_TYPE_ID + \"0=xednItrats?\".z();\n\t\n processDrinks(requestUrl, true);\n}", "title": "" }, { "docid": "325e6c67650c3dd44f7388bdac33edd6", "score": "0.5824814", "text": "function loadCategories(type, id) {\n $.post('https://cs341group4.tk/Category/GetAll')\n .done(function(data) {\n var cat;\n for(var category in data.categories) {\n if(type === 'cattable')\n $('#' + id).append(\"<tr>\" +\n \"<th scope='row'>\" + category + \"</th>\" +\n \"<td>\" + data.categories[category] + \"</td>\" +\n \"</tr>\");\n else if(type === 'catcheck') {\n cat = data.categories[category];\n $('.' + id).append(\"<div class='form-check'>\" +\n \"<input type='checkbox' class='form-check-input' name='categories'\" + \"value='\"+ cat +\"'/>\" +\n \"<label class='form-check-label'>\" + cat + \"</label>\" +\n \"</div>\");\n }\n else if(type === 'navbar') {\n cat = data.categories[category];\n $('#' + id).append(\"<a href='https://cs341group4.tk\" + baseURL + \"/store.html?category=\" + cat + \"' class='list-group-item'>\" + cat + \"</a>\")\n }\n }\n })\n .fail(function(data){\n $('#message').html(data.responseJSON.message);\n });\n}", "title": "" }, { "docid": "d1522966375d0ed18b1192974768071e", "score": "0.579881", "text": "function categoryOnClick(category) {\n updateHomeUI(category, userId);\n}", "title": "" }, { "docid": "ac3a509138406645017b04e4549cf9f4", "score": "0.57969767", "text": "function preencherVerCategoria(){\n\t\tvar id = window.location.pathname.replace(/[^0-9]/g,'');\n\t\t$.getJSON('/categorias/' + id).done(function(data) {\n\t\t\t$('#descricao').text(data.descricao);\n\t\t});\n\t}", "title": "" }, { "docid": "00fff240ddd3b6d8c015b31dabaeb12d", "score": "0.5795433", "text": "function onCategoryChange(id) \n{\n\tloadAjaxPage(\"index.php?module=categories&page=categories_list&category_id=\" + id, {});\n\treturn false;\n}", "title": "" }, { "docid": "34281a384994bde6f7292ad62c9bef88", "score": "0.57901454", "text": "updateCategory(categoryId) {\n\n // Call the API to update the category of the element\n // If it is a past list, update that element\n if (this.state.pastListId) new SupermarketAPI().updateItemOfPastList(this.state.pastListId, this.state.item.name, categoryId, user.userInfo.email);\n // If it's the current list, call another API\n else new SupermarketAPI().updateItemOfCurrentList(this.state.item.id, {itemName: this.state.item.name, category: categoryId, userEmail: user.userInfo.email});\n\n // throw event\n TRC.TotoEventBus.bus.publishEvent({name: config.EVENTS.itemCategorized, context: {itemName: this.state.item.name, newCategoryId: categoryId}});\n\n // Go back\n this.props.navigation.goBack();\n\n }", "title": "" }, { "docid": "ea8edf8bdaa83b55e3445a197ddc71b7", "score": "0.5774611", "text": "handleCategoryChange(categoryApiUrl){\n\t \tconsole.log(categoryApiUrl);\n\t \tvar url = Constants.baseUrl + categoryApiUrl + Config.api_key\n\t \tconsole.log(url);\n\t \t$.getJSON(url, (categoryData)=>{\n\t \t\tthis.setState({\n\t \t\t\tmoviePosters: categoryData.results\n\t \t\t})\n\t \t});\n\t }", "title": "" }, { "docid": "13e1252dad2a64707e8dc510ea44b959", "score": "0.5760873", "text": "function refreshContent(){\n currentPage = parseInt($('#all-courses').attr('data-end'));//if last page no is greater than zero\n if(currentPage<1) {currentPage =1;}//incase of negative or zero value set page number to be 1\n $('#all-courses').attr('data-end', currentPage); //Update the pagenumber holder [data-end]\n currentCategory = parseInt($(\"#all-courses\").attr('data-current-category'));\n fetchCourses(totalListedItems, (currentPage - 1) * totalListedItems, currentCategory);\n }", "title": "" }, { "docid": "3054f731390445a90387b984c6f0822d", "score": "0.5739794", "text": "function refresh() {\n\n\tvar db_categories = {};\n\tvar db_manufacturers = {};\n\n\tvar prepare = function(doc) {\n\t\tif (db_categories[doc.category])\n\t\t\tdb_categories[doc.category].count++;\n\t\telse\n\t\t\tdb_categories[doc.category] = { count: 1, linker: doc.linker_category, path: doc.linker_category.split('/'), names: doc.category.split('/').trim() };\n\n\t\tif (!doc.manufacturer)\n\t\t\treturn;\n\n\t\tif (db_manufacturers[doc.manufacturer])\n\t\t\tdb_manufacturers[doc.manufacturer].count++;\n\t\telse\n\t\t\tdb_manufacturers[doc.manufacturer] = { count: 1, linker: doc.linker_manufacturer };\n\t};\n\n\tNOSQL('products').find().prepare(prepare).callback(function() {\n\n\t\t// Prepares categories with their subcategories\n\t\tvar keys = Object.keys(db_categories);\n\t\tvar categories = [];\n\t\tvar categories_filter = {};\n\t\tvar tmp;\n\n\t\tfor (var i = 0, length = keys.length; i < length; i++) {\n\t\t\tvar name = keys[i];\n\t\t\tvar item = db_categories[name];\n\n\t\t\titem.path.forEach(function(path, index) {\n\t\t\t\tvar key = item.path.slice(0, index + 1).join('/');\n\n\t\t\t\tif (categories_filter[key]) {\n\t\t\t\t\tcategories_filter[key].count += item.count;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar obj = {};\n\t\t\t\tobj.linker = key;\n\t\t\t\tobj.name = item.names.slice(0, index + 1).join(' / ');\n\t\t\t\tobj.count = item.count;\n\t\t\t\tobj.text = item.names[index];\n\t\t\t\tobj.parent = item.path.slice(0, index).join('/');\n\t\t\t\tobj.level = index;\n\t\t\t\tobj.path = item.path;\n\t\t\t\tobj.is = function(category) {\n\t\t\t\t\tif (!category)\n\t\t\t\t\t\treturn false;\n\t\t\t\t\tvar path = category.path;\n\t\t\t\t\tfor (var i = 0; i < this.level + 1; i++) {\n\t\t\t\t\t\tif (path[i] !== this.path[i])\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\t\t\t\tcategories_filter[key] = obj;\n\t\t\t});\n\t\t}\n\n\t\tObject.keys(categories_filter).forEach(key => categories.push(categories_filter[key]));\n\t\tcategories.sort((a, b) => a.level > b.level ? 1 : a.level < b.level ? -1 : a.name.localeCompare2(b.name));\n\n\t\tfor (var i = 0, length = categories.length; i < length; i++) {\n\t\t\tvar item = categories[i];\n\t\t\titem.children = categories.where('parent', item.linker);\n\t\t\titem.parent = categories.find('linker', item.parent);\n\t\t\titem.top = tmp = item.parent;\n\t\t\twhile (tmp) {\n\t\t\t\ttmp = categories.find('linker', item.parent);\n\t\t\t\tif (tmp)\n\t\t\t\t\titem.top = tmp;\n\t\t\t}\n\t\t}\n\n\t\t// Prepares manufacturers\n\t\tkeys = Object.keys(db_manufacturers);\n\t\tvar manufacturers = new Array(keys.length);\n\t\tfor (var i = 0, length = keys.length; i < length; i++) {\n\t\t\tvar name = keys[i];\n\t\t\tvar item = db_manufacturers[name];\n\t\t\tmanufacturers[i] = { name: name, linker: item.linker, count: item.count };\n\t\t}\n\n\t\tmanufacturers.quicksort('name');\n\t\tF.global.categories = categories;\n\t\tF.global.manufacturers = manufacturers;\n\t});\n}", "title": "" }, { "docid": "a7a803af83af1bd91b01893f730bdb4a", "score": "0.57392436", "text": "function filteredByCategory(elem) {\n var id = elem.id;\n window.location = window.location.origin + \"\\\\Article\\\\ArticlesList\" + \"?categoryId=\" + id;\n}", "title": "" }, { "docid": "eaea07f091083ddef2e1ef5a8f4f1b8c", "score": "0.5736962", "text": "function voltarCategoria(){\n\t\t$(location).attr('href', '/categorias/listagem');\n\t}", "title": "" }, { "docid": "2ae1ef1b731b320c7d3bb2203f43c7c3", "score": "0.5722799", "text": "function mooGetCategories()\n{\n if(window.moo_theme_setings.onePage_show_more_button === 'off') {\n jQuery.get(moo_RestUrl+\"moo-clover/v1/categories?expand=all_items\", function (data) {\n if(data!=null && data.length>0) {\n moo_renderCategories(data,false);\n } else {\n var element = document.getElementById(\"moo-onlineStore-items\");\n var html = 'You don\\'t have any category please import your inventory';\n jQuery(element).html(html);\n }\n });\n } else {\n jQuery.get(moo_RestUrl+\"moo-clover/v1/categories?expand=five_items\", function (data) {\n if(data!=null && data.length>0) {\n moo_renderCategories(data,true);\n } else {\n var element = document.getElementById(\"moo-onlineStore-items\");\n var html = 'You don\\'t have any category please import your inventory';\n jQuery(element).html(html);\n jQuery('#MooLoadingSection').hide();\n }\n });\n }\n\n\n}", "title": "" }, { "docid": "7d78bcebd87010b99642a67e69559dde", "score": "0.57201135", "text": "function getCategories() {\n $.getJSON('api/categories/', (categories) => {\n\n $.each(categories, (index, category) => {\n $(\"#categoryList\").append($(\"<a />\")\n .text(category.Category)\n .attr(\"class\", \"dropdown-item\")\n .attr(\"href\", \"#\")\n .on(\"click\", (e) => {\n e.preventDefault();\n //$(\"body\").removeClass(\"home\");\n $(\"#categoryName\").text(category.Category);\n getServices(category.Value);\n }));\n });\n });\n }", "title": "" }, { "docid": "9cc6f4d9f6c54ab52f2876d72f03cf87", "score": "0.5719872", "text": "function getAllCategories() {\n $.get('/category/all/' + localStorage.getItem('token'), (allCategories) => {\n displayAllCategories(allCategories);\n });\n}", "title": "" }, { "docid": "f80bedb2635f30d7751223e8eb94d2ae", "score": "0.57176644", "text": "extractCategories() {\r\n return Array.from(\r\n this._page.getElementById(\"catlinks\").getElementsByTagName(\"a\")\r\n ).map( link =>\r\n new Category(link.innerHTML, link.href)\r\n )\r\n }", "title": "" }, { "docid": "a6fb55bb73fa281a85c4a70beff24785", "score": "0.57121867", "text": "function refreshFeed(l) { Home.Feed.download(l); }", "title": "" }, { "docid": "39b5aaca5670b4c5dc4b98557643de4d", "score": "0.5704155", "text": "function setCategoryLink(jsonObj,header,section) {\n // Category Setting\n var title_category = document.createElement('h3');\n title_category.textContent = \"Category List\";\n header.appendChild(title_category);\n\n // 요소 추가\n var categories = jsonObj['category'];\n var init_category = document.createElement('ul');\n for(var j = 0; j < categories.length; j++) {\n var listItem = document.createElement('li');\n listItem.textContent = categories[j];\n init_category.appendChild(listItem);\n }\n header.appendChild(init_category);\n\n // Links Setting\n var title_link = document.createElement('h3');\n title_link.textContent = \"Link List\";\n section.appendChild(title_link);\n\n\n // 요소 추가\n var links = jsonObj['links'];\n var init_links = document.createElement('ol');\n\n for(var j = 0; j < links.length; j++) {\n var listItem = document.createElement('li');\n init_links.appendChild(listItem);\n\n var listhref = document.createElement('a');\n // textContent는 title\n listhref.textContent = links[j];\n listhref.setAttribute('href',links[j]);\n listItem.appendChild(listhref);\n\n\n }\n section.appendChild(init_links);\n}", "title": "" }, { "docid": "3aa98f4c1879816e08f8a65f33021cfa", "score": "0.5694075", "text": "function getCategory() {\n $.get(\"/api/category\", renderCategoryList);\n }", "title": "" }, { "docid": "a8d611d6d0be09c22506da05b9b31d05", "score": "0.56935054", "text": "function hookLinks() {\r\n\r\n buildCustomizeFeedForm();\r\n \r\n addNewFeedOptions();\r\n\r\n insertShowCachedActivityLink();\r\n\r\n var raw_feed = document.getElementById(\"activity_feed_container\");\r\n if (raw_feed == null) raw_feed = document;\r\n \r\n var links = raw_feed.getElementsByTagName(\"a\");\r\n \r\n for(var i = 0; i < links.length; i++) {\r\n \r\n var this_link = links[i];\r\n\r\n\tif (this_link.innerHTML == \"customize\") {\r\n\t\r\n\t this_link.id = \"screen_link\";\r\n\t\r\n\t this_link.innerHTML = (Screen_List.length == 0) ? \"screen out\" : \"screening out\";\r\n\t \r\n\t this_link.parentNode.setAttribute(\"data-bind\", \"visible: (subfeed() == 'everything') && !customizeBoxOpen()\");\r\n\t \r\n\t};\r\n\t\r\n\tif (this_link.href.indexOf(\"activity_feed_mutings\") != -1) {\r\n\t\r\n\t this_link.parentNode.removeAttribute(\"data-bind\");\r\n\t \r\n\t this_link.id = \"activity_feed_mutings\";\r\n\t\r\n\t this_link.addEventListener(\"click\", toggleHideShowGagged, false);\r\n\t \r\n\t this_link.innerHTML = \"show gagged\";\r\n\r\n\t addGlobalStyle('table.gagged {display: none;}');\r\n\t \r\n\t};\r\n };\r\n\r\n var spans = document.getElementsByTagName(\"span\");\r\n \r\n for (var i = 0; i < spans.length; i++)\r\n \r\n if (spans[i].getAttribute(\"data-bind\") == \"text: subfeedLabel()\") break;\r\n\t\r\n if (i == spans.length) return alert(\"Subfeed Label Not Found!\");\r\n \r\n spans[i].addEventListener(\"DOMSubtreeModified\", clearFeedOrganizer, false);\r\n\r\n}", "title": "" }, { "docid": "ba886592f6ea589c96dfae77619945aa", "score": "0.567532", "text": "function handleCategoryChange() {\n var newPostCategory = $(this).val();\n getPosts(newPostCategory);\n }", "title": "" }, { "docid": "c5066010db5b5a4131b5bd2e819e267e", "score": "0.56723696", "text": "function verCategoria(event){\n\t\tevent.preventDefault();\n\t\tvar thisId = $(this).data('id');\n\t\t$(location).attr('href', '/categorias/ver/'+ thisId);\n\t}", "title": "" }, { "docid": "e48037af074b0ca09298493843eaca9b", "score": "0.56652564", "text": "function clickHandler(categories) {\n setRest(restObject[categories]);\n }", "title": "" }, { "docid": "0f2c6a1c3a9e3699c8ed85358c5f3f96", "score": "0.5651403", "text": "function fetchCategories() {\n $.get(BASE_URL + '/sellers/prod_categories_partial', function (res) {\n $('#categories').html(res);\n });\n }", "title": "" }, { "docid": "3320452b7062aa546dd29c44ffb34415", "score": "0.56428283", "text": "function preprocess_links(data,name) {\n\tfor (var category of data) {\n\t\ttry {\n\t\t\tfor (var entry of category.entries) {\n\t\t\t\tentry.host = getHost(entry.url);\n\t\t\t}\n\t\t}\n\t\tcatch {\n\t\t\tfor (var bookmarkcategory in category.entries) {\n\t\t\t\tvar bookmarklist = []\n\t\t\t\tfor (var name in category.entries[bookmarkcategory]) {\n\t\t\t\t\tvar url = category.entries[bookmarkcategory][name]\n\t\t\t\t\tbookmarkentry = {'name':name,'url':url, 'host':getHost(url), 'favicon':favicon_grabber(getHost(url))}\n\t\t\t\t\tbookmarklist.push(bookmarkentry)\n\t\t\t\t}\n\t\t\t\tcategory.entries[bookmarkcategory] = bookmarklist\n\t\t\t}\n\t\t}\n\n\n\t}\n\treturn data;\n}", "title": "" }, { "docid": "d8a8678567afcc53afcceda234e007af", "score": "0.5631037", "text": "initCategories() {\n\t\tconst category = document.getElementById(\"category\");\n\n\t\t// Category interface\n\t\twindow._configCategory = (category) => this.category(category);\n\n\t\t// All categories button\n\t\tcategory.firstElementChild.addEventListener(\"click\",() => this.evt.categories());\n\n\t\t// Next category button\n\t\tcategory.lastElementChild.addEventListener(\"click\",event => {\n\t\t\tif(this.active.category >= this.active.categories) {\n\t\t\t\tthis.evt.summary();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.category(this.active.category + 1);\n\t\t});\n\t}", "title": "" }, { "docid": "921be53598dbe55d9e0204205e406048", "score": "0.5618401", "text": "function updateCategories(categories){\n\n // const newParams = new URLSearchParams(location.search); // get URL params and put them in an object\n const selectedParams = categories.join(\",\");\n if (categories.length === 0){\n searchParams.delete(\"categories\");\n } else {\n searchParams.set('categories', selectedParams) // set method to set categories having selectedParams as value\n }\n history.push({search:\"?\"+ searchParams.toString()}); //update my query string \n }", "title": "" }, { "docid": "9e14718e4ddf3b99ad584be17b05eb70", "score": "0.5611411", "text": "function updateCategories(){\n UpdateFactory.getCatsFromFirebase().then(function(response){\n UpdateFactory.updateCats(response);\n ionicToast.show(\"ক্যাটাগরি আপডেট হয়েছে\", 'top', false, 1000);\n updateSubCategories();\n },function(error){\n ionicToast.show(\"দুঃখিত ক্যাটাগরি আপডেট হয়নি, আবার চেষ্টা করুন।\", 'top', false, 1000);\n $ionicLoading.hide();\n });\n }", "title": "" }, { "docid": "7de1e04fcfce796e64b3885ed8642d2a", "score": "0.56094325", "text": "function showCategory() {\n if (!commentTable.className.includes(\"Invisible\")) {\n commentTable.classList.add(\"Invisible\")\n commentTable.classList.remove('Visible');\n }\n if (!postTable.className.includes(\"Invisible\")) {\n postTable.classList.add(\"Invisible\")\n postTable.classList.remove('Visible');\n }\n if (!userTable.className.includes(\"Invisible\")) {\n userTable.classList.add(\"Invisible\")\n userTable.classList.remove('Visible');\n }\n if (categoryTable.className.includes(\"Invisible\")) {\n removeSelected();\n removeVisibility(\"postOption\");\n categoryTable.classList.remove(\"Invisible\")\n categoryTable.classList.add('Visible');\n if (actualTable != \"categories\") {\n actualTable = \"categories\"\n if (urlParams.get('page') == null) {\n history.pushState({}, null, \"/moderation&table=categories\");\n } else {\n history.pushState({}, null, \"/moderation?page=\" + urlParams.get('page') + \"&table=categories\");\n }\n }\n }\n}", "title": "" }, { "docid": "13f1f485d2eaa19b264514932f7a37d8", "score": "0.5603562", "text": "function onFilterChanged() {\n refreshCategory($scope.currentCategory);\n }", "title": "" }, { "docid": "18024127996d68233a03c8966bbf7fbf", "score": "0.56001127", "text": "updateCategories(state, payload) {\n // let index = state.albums.findIndex(x => x.info.id.localeCompare(payload.id) == 0)\n // state.albums[index].categories = payload.categories\n payload.album.categories = payload.categories;\n }", "title": "" }, { "docid": "91a20d8deb522f45e7bc16b06935fd5d", "score": "0.5594586", "text": "function loadCategories() {\n $.ajax({\n url: 'server/categories.json',\n type: 'GET',\n dataType: 'JSON',\n error: function() {\n alert('Erreur chargement');\n },\n success: function(data) {\n console.log(\"loading categories...\");\n categories = data[0].categories;\n\n //Ajoute les categories du fichier dans la liste (ul)\n var $ulCateg = $(\"#menu-categories\")\n for (var c of categories) {\n var $cat = $(\"<li></li>\");\n var $link = $(\"<a href='#'></a>\");\n $link.text(c);\n $cat.append($link);\n $cat.addClass('categ-item');\n $cat.attr('id', c);\n $cat.on(\"click\", function(e) {\n e.preventDefault();\n var categChoisi = $(this).attr('id');\n\n loadContenuParCategorie(categChoisi);\n });\n $ulCateg.append($cat);\n }\n }\n });\n }", "title": "" }, { "docid": "c1986fefe6523ec962fa10722fd77c62", "score": "0.5589847", "text": "async onInitialized() {\n this.set({isLoading: true});\n\n const dataList = await dataUtils.fetchData();\n const categoryCollection = dataUtils.parseAllData(dataList);\n\n // cache fetched data\n this.set({\n categoryCollection: categoryCollection,\n isLoading: false,\n });\n\n // if a category was previously being viewed, we can set it\n const currentCategoryId = storageController.getItem('currentCategoryId');\n if (currentCategoryId !== undefined && currentCategoryId !== null) {\n this.switchCategory(currentCategoryId);\n return;\n }\n\n // otherwise it can just be the first item in the list\n if (categoryCollection.length > 0) {\n const firstCategoryModel = categoryCollection[0];\n this.switchCategory(firstCategoryModel.get('id'));\n return;\n }\n }", "title": "" }, { "docid": "54e3c4ebba864e4034468cf06573a491", "score": "0.55859685", "text": "function categoryLink( category, out, name ) {\n var links = walkCategories(category, []);\n\n for (var j = 0; j < links.length; j++) {\n var link = links[j];\n if (link.length > 1) {\n link.reverse();\n }\n\n var cats = settings.categories.slice();\n for (var x = 0; x < link.length; x++) {\n if ($.inArray(link[x], settings.categories) > -1) {\n // use inArray since indexOf isn't supported in IE8\n var index = $.inArray(link[x], cats);\n cats.splice(index, 1);\n }\n }\n\n if (cats.length > 0 && settings.degree != null) {\n var href = '/' + settings.degree + '/' + link.join('/')\n + settings.sp_link_end;\n\n // create anchor\n var a = $('<a href=\"' + href + '\">' + name + '</a>');\n\n out.find('.js-qa-categories').append(a);\n }\n }\n }", "title": "" }, { "docid": "068dc8332b387dacc7d67bf784366004", "score": "0.5579628", "text": "function loadCategory(){\r\n productOperations.loadCategory(callBackForLoadCategory);\r\n}", "title": "" }, { "docid": "8cef96af9fdb6ef0ab83455b38fa629a", "score": "0.55745286", "text": "function moo_renderCategories($cats,withButton)\n{\n var element = document.getElementById(\"moo-onlineStore-categories\");\n var html = '<nav id=\"moo-menu-navigation\" class=\"moo-stick-to-content\">';\n html += '<div class=\"moo-choose-category\">Choose a Category</div>';\n html += '<ul class=\"moo-nav moo-nav-menu moo-bg-dark moo-dark\">';\n\n for(i in $cats){\n var category = $cats[i];\n if(typeof category !== 'object')\n continue;\n if(typeof attr_categories !== 'undefined' && attr_categories !== undefined && attr_categories !== null && typeof attr_categories === 'object') {\n if(attr_categories.indexOf(category.uuid.toUpperCase()) === -1){\n continue;\n }\n }\n if(category.items.length >0 ) {\n html +='<li><a href=\"#cat-'+category.uuid.toLowerCase()+'\" onclick=\"MooCLickOnCategory(event,this)\">'+category.name+'</a></li>';\n moo_renderItems(category,withButton);\n }\n\n }\n html += \"</ul></nav>\";\n jQuery(element).html(html).promise().done(function() {\n window.width = jQuery('#moo_OnlineStoreContainer').width() - jQuery('.moo-menu-category').width();\n window.width = (jQuery('#moo_OnlineStoreContainer').width()+30) * 0.25;\n var cart_btn = '<div class=\"moo-col-md-12\" style=\"text-align: center;\">'+\n '<a href=\"#\" class=\"moo-btn moo-btn-lg moo-btn-primary\" onclick=\"mooShowCart(event)\">View Cart</a>'+\n '</div>';\n jQuery(\"#moo-onlineStore-items\").append(cart_btn);\n jQuery('#MooLoadingSection').hide();\n\n var hash = window.location.hash;\n if (hash != \"\") {\n var top = (jQuery(hash).offset() != null)?jQuery(hash).offset().top:\"\"; //Getting Y of target element\n window.scrollTo(0, top);\n }\n\n });\n}", "title": "" }, { "docid": "73a9532435cd510b490b30b19761b07e", "score": "0.55706286", "text": "componentDidMount() {\n let categoryId = parseInt(this.props.match.params.id)\n this.refresh(categoryId)\n this.getProducts(categoryId)\n this.subCategories(categoryId)\n }", "title": "" }, { "docid": "af3b8c1f341ad4adde16f97aebea979f", "score": "0.5565074", "text": "whichCategory(state, payload) {\r\n const collectionName = payload.collectionName;\r\n if (collectionName === \"Most Popular\") {\r\n state.categoryUrl = \"&sort=popularityRank\";\r\n state.categoryName = collectionName;\r\n } else if (collectionName === \"Newest\") {\r\n state.categoryUrl = \"&sort=-startDate\";\r\n state.categoryName = collectionName;\r\n } else if (collectionName === \"Recently Updated\") {\r\n state.categoryUrl = \"&sort=-updatedAt\";\r\n state.categoryName = collectionName;\r\n } else {\r\n state.categoryUrl = ``;\r\n state.categoryName = collectionName;\r\n }\r\n }", "title": "" }, { "docid": "f6bd3c8238840befbf64e4aa93e115be", "score": "0.5565048", "text": "getRSSUrl(category) {\n return 'https://www.theguardian.com/' + category.replace('--', '/') + '/rss';\n }", "title": "" }, { "docid": "f73b3201b46aed49be495c73ecd2aeb7", "score": "0.5564284", "text": "function goCategory() {\n\twindow.location.assign(\"category.html\")\n}", "title": "" }, { "docid": "2482f43af3c59c4ff2d9f09f823f0f27", "score": "0.5555365", "text": "function getNewsByCategory(category) {\n\n // Define API's URL\n var url = 'http://newsapi.org/v2/top-headlines?' +\n 'country=ie&' +\n 'category=' + category + '&' +\n 'apiKey=4cf06e310e25466dabb55f9ace0f417d';\n\n // Request through jQuery Ajax GET method\n $.get(url, function (data) { // data is the returned object\n\n var news = [];\n\n // For each article returned, map the information\n data.articles.forEach(article => {\n\n if (!checkTitleInArray(article.title)) {\n\n //Create a JSON object with only the information that will be showed\n var json = {\n title: article.title,\n description: article.description != null ? article.description : \"\", // null treatment\n urlToImage: article.urlToImage,\n datetime: article.publishedAt\n };\n\n // Add the JSON object into news Array\n news.push(json);\n }\n });\n\n setItemOnLocalStorage(news, category);\n\n }, \"json\");\n}", "title": "" }, { "docid": "dcbbfbd8e6c3a3f35ecda46ef4999ee5", "score": "0.5534817", "text": "function cats(){\n\t\tpresentation.showLoader();\n\t\tapi.getCats().then(function(items){ \n\t\t\tconst indexCat = randomIndex(items.length);\n\t\t\tpresentation.catToDom(items[indexCat].link);\n\t\t\tpresentation.showLoader();\n\t\t})\n\t\t.catch(function(error){\n\t\t\tconsole.log(error); \n\t\t\tpresentation.showLoader();\n \t\t});\n\t}", "title": "" }, { "docid": "ff9ec4acbaa74b4b4a3e9c5b30561ace", "score": "0.55339605", "text": "function toggleCategory() {\n this.classList.toggle(\"active\");\n fetchResources();\n }", "title": "" }, { "docid": "9939f126ee145f240e8108cc108ac9fd", "score": "0.55128676", "text": "function loadCategory(category) {\n\t$(document).ready(function() {\n\t // CLEAN UP\n\t cleanUpTables();\n\t cleanUpCharts();\n\t // LOAD FROM CACHE\n\t var series = 1;\n\t var selectedSeries = getoSeries(series);\n\t for (var i = 0; i < aSeries.length; i++) {\n\t var oBasket = JSON.parse(localStorage.getItem('oBasket' + series));\n\t // LOOP THROUGH THE SELECTION\n\t if (category) {\n\t var j = 0;\n\t for (var k = 0; k < oBasket['aDeviceProfile'].length; k++) {\n\t var oDeviceProfile = oBasket['aDeviceProfile'][k];\n\t if (oDeviceProfile.values.type == category) {\n\t appendToTable(oDeviceProfile, j, series);\n\t j++;\n\t }\n\t };\n\t series++;\n\t } else {\n\t for (var k = 0; k < oBasket['aDeviceProfile'].length; k++) {\n\t var oDeviceProfile = oBasket['aDeviceProfile'][k];\n\t // APPEND TO THE TABLE\n\t appendToTable(oDeviceProfile, k, series);\n\t };\n\t series++;\n\t }\n\t styleTable();\n\t };\n\t});\n}", "title": "" }, { "docid": "0ca0aced424b4cba6e6c401ffcfa4294", "score": "0.5491069", "text": "function glomeGetServerCategories()\n{\n var url = glome.prefs.getUrl(glome.prefs.get('api.adcategories'));\n\n window.jQuery.ajax({\n url: url,\n type: 'GET',\n dataType: 'json',\n success: function(data, textStatus, jqXHR)\n {\n log.debug('-- ad categories received');\n\n // Add all of the categories to database\n for (let i = 0; i < data.length; i++)\n {\n // Update categories\n/*\n var q = 'UPDATE categories SET name = :name WHERE id = :id';\n var statement = db.createStatement(q);\n statement.params.id = data[i].id;\n statement.params.name = data[i].name;\n statement.executeAsync();\n*/\n // Insert into categories. Let SQLite to fix the issue of primary keyed rows, no need to check against them\n var q = 'REPLACE INTO categories (id, name, subscribed) VALUES (:id, :name, 1)';\n //log.debug(q);\n var statement = db.createStatement(q);\n statement.params.id = data[i].id;\n statement.params.name = data[i].name;\n statement.executeAsync();\n\n // @TODO: This needs a check to delete the removed categories as well\n }\n\n log.debug('-- updating ad categories finished');\n },\n });\n}", "title": "" }, { "docid": "9555938eacc70651f804b763222a1d97", "score": "0.54901296", "text": "async function seeAll(category, categoryURL) {\n textHolder.innerHTML = `\n <h3 class=\"categoryTitle\">${category}</h3>\n `;\n main.innerHTML = ''\n \n const resp = await fetch(categoryURL);\n const respData = await resp.json();\n\n displayMovies(respData, main, 20);\n main.classList.add('wrap');\n}", "title": "" }, { "docid": "bc7b9aabf931a8c5378f686782142bc1", "score": "0.5486177", "text": "function changeCategory(cat) { \r\n\tdocument.querySelectorAll(\".topMenuPosition\").forEach(menuPosition => { // find the top menu position of the selected class and mark it as 'selected'\r\n\t\tif (menuPosition.dataset.category == cat) menuPosition.classList.add(\"topMenuSelected\") \r\n\t\telse menuPosition.classList.remove(\"topMenuSelected\")\r\n\t});\r\n\tdocument.querySelectorAll(\".mainMenuSection\").forEach(menuSection => { // hide all the tiles in the tile menu but the one we selected\r\n\t\tif (menuSection.dataset.category == cat) menuSection.classList.remove(\"hide\") \r\n\t\telse menuSection.classList.add(\"hide\")\r\n\t});\r\n\twhile (main.firstChild) main.firstChild.remove(); // remove all content from any category that was selected previously\r\n database.forEach(legoSet => { if (legoSet.gsx$category.$t == cat) displayLegoData(legoSet) }); // display entries from the database that match the selected category \r\n}", "title": "" }, { "docid": "065ee804cffb9aed9d005ea6d95ddcf6", "score": "0.548585", "text": "async loadCategories() {\n this.setState({ loading: true })\n try {\n const res = await fetch(`/admin-data?categories`)\n const { error, data } = await res.json()\n if (error) this.setState({ error })\n else {\n const categories = data.map(({ _id, title }) => ({\n value: _id,\n title,\n }))\n this.setState({ categories })\n }\n } catch (error) {\n this.setState({ error })\n } finally {\n this.setState({ loading: false })\n }\n }", "title": "" }, { "docid": "5991a081c826265d1f51ab0c76fe8d4a", "score": "0.5483996", "text": "function renderCategory() {\n categories.map((category) => {\n //let url = `https://newsapi.org/v2/top-headlines?country=us&${category}&apiKey=${API_KEY}`;\n\n document.getElementById(\n \"category\"\n ).innerHTML += `<button id=\"${category}\" onclick=\"haha(event)\" type=\"button\" style=\"border-left:none;border-right:none\" class=\"list-group-item list-group-item-action\">${category}</button>`;\n /* document.getElementById(`${category}`).addEventListener(\"click\", haha);\n console.log(document.getElementById(`${category}`)); */\n });\n}", "title": "" }, { "docid": "c7e651c5824cda4ab1b0798235dcb199", "score": "0.54767966", "text": "pageChanged(id){\n axios.get(`${BASE_URL}categories?page=${id}`, {headers: {Authorization: AuthToken}})\n .then(response => {\n this.setState({categories: response.data})\n })\n .catch(error => {\n alert('click :' + error);\n });\n }", "title": "" }, { "docid": "9c23bfb3f47e306735fdcab5b1b10af8", "score": "0.5456562", "text": "function eltdGetCategoryHtml(catID){\n \n var blogHolder = $('.eltd-blog-holder.eltd-blog-type-expanding-tiles');\n var postNumber = blogHolder.data('post-number'); \n \n var ajaxData = {\n action: 'flow_elated_get_archive_page_html',\n postNumber: postNumber,\n currentCatId: catID,\n ajaxReq: 'yes'\n };\n\n //reinit load more params\n blogHolder.data('cat-id', catID); // append cat id on blog holder because of load more(infinite scroll) pagination\n blogHolder.data('next-page',2);\n\n $.ajax({\n type: 'POST',\n data: ajaxData,\n url: ElatedAjaxUrl,\n success: function (data) { \n\n var response = $.parseJSON(data);\n var responseHtml = response.html;\n var maxPages = response.maxPages;\n\n //reinit load more params \n blogHolder.data('max-pages', maxPages);\n\n eltd.modules.blog.eltdExpandableTiles.update_grid({\n action: 'refresh',\n html: responseHtml\n }); \n }\n });\n }", "title": "" }, { "docid": "838136de1a76fa32ea6ff7737cbc75e4", "score": "0.54562217", "text": "function initializeAllCategories(url){\n var finalCats = []\n var uniqueCategories = []\n var cc = 0;\n var allFiles = allFilesInFolder('dealflow');\n for each (var url in allFiles){\n var cats = initializeCategoriesInDoc(url, uniqueCategories, cc);\n if(cats.categories.length > 0){\n finalCats = finalCats.concat(cats.categories);\n uniqueCategories = cats.uniqueCategories;\n cc = cats.counter;\n }\n }\n // as of right now, this creates in the root folder\n var ss = SpreadsheetApp.create(\"dealflow-values\");\n var sheet = ss.getSheets()[0];\n for each (var item in finalCats){\n var entry = [];\n entry.push(item.name);\n entry.push(item.color);\n entry.push(item.currentValue);\n sheet.appendRow(entry);\n }\n ss.insertSheet();\n var sheet = ss.getSheets()[1];\n sheet.appendRow(['last visited page', 'NA']);\n return ss.getUrl();\n}", "title": "" }, { "docid": "08f6992f9623ad2d9e310579a8f70caa", "score": "0.54559994", "text": "function handleCategoryChange() {\n var newPostCategory = $(this).val();\n getPosts(newPostCategory);\n}", "title": "" }, { "docid": "ca8caaf88233bf919fa237ceece330a2", "score": "0.5454938", "text": "async function refreshArticles(userDb, category, name, url) {\n try {\n // Set time updated\n const currentTime = new Date().getTime()\n await db.rssDb.collection(userDb).update({ slug: 'data' }, { $set: { 'metadata.updated': currentTime } })\n\n // Get document reference for the category\n const res = await db.rssDb.collection(userDb).findOne({ slug: 'data' }, { _id: 0, slug: 0 })\n const _id = new ObjectId(res.categories[category])\n\n let articles = await fetchFeeds(url)\n let currentArticles = await db.rssDb.collection(userDb).findOne({\n _id }, { _id: 0, [`${name}.articles`]: 1 })\n currentArticles = currentArticles[name].articles\n articles = [...articles, ...currentArticles]\n articles = uniqBy(articles, 'title')\n\n // Get hash maps for looking up articles that are marked as read and favorites\n const fav = await db.rssDb.collection(userDb).findOne({ slug: 'data' }, { _id: 0, favoritesLookup: 1 })\n const read = await db.rssDb.collection(userDb).findOne({ slug: 'data' }, { _id: 0, read: 1 })\n const favLookup = fav.favoritesLookup\n const readLookup = read.read\n\n // Check if articles were previsouly marked as read. Storing a key with a .\n // or $ is not allowed in mongo, so do a string replacement for those chars\n let articlesFinal = []\n // for (const article of articles) {\n\n articles.forEach((articleParam) => {\n const article = articleParam\n const title = article.title.replace(/\\.|\\$/g, '_')\n if (!readLookup[title]) {\n // Article marked as read\n article.bookmark = article.bookmark || false\n if (favLookup[article.title]) { article.bookmark = true }\n article.rssCategory = category\n article.rssFeed = name\n articlesFinal.push(article)\n }\n })\n articlesFinal = [...articlesFinal]\n const count = articlesFinal.length\n await Promise.all([\n db.rssDb.collection(userDb).update({ _id }, { $set: { [`${name}.count`]: count } }),\n db.rssDb.collection(userDb).update({ _id }, { $set: { [`${name}.articles`]: articlesFinal } })\n ])\n\n return null\n } catch (error) { throw error }\n}", "title": "" }, { "docid": "0981805bc94e7a67da25c9ddc036b0a1", "score": "0.5454219", "text": "function cat() {\r\n\t\t$.ajax({\r\n\t\t\turl: \"category.php\",\r\n\t\t\tmethod: \"POST\",\r\n\t\t\tdata: { category: 1 },\r\n\t\t\tsuccess: function (data) {\r\n\t\t\t\t$(\"#get_category\").html(data);\r\n\r\n\t\t\t}\r\n\t\t})\r\n\t}", "title": "" }, { "docid": "83eee14a059f9d0d650bd99f5b9ce3f0", "score": "0.5419224", "text": "function categorySelect() {\n // get glossary.JSON file and parse out the first layer of keys (=categories)\n // for each category, create a corresponding menu item with the same title\n $.getJSON( \"data/glossary.json\", function( data ) {\n let outerDiv = $(\".categories\");\n // iterate through upper level object (categories)\n for (let i = 0; i < data.length; i++) {\n // create a category-select div and append to DOM\n let innerDiv;\n (() => {\n innerDiv = $(\"<div/>\", {\n 'class' : 'category-select',\n 'data-key' : data[i].class, // this will help us know which category the user selects\n 'data-location' : \"instrument-config.html\"\n });\n innerDiv.appendTo(outerDiv);\n let h2 = $(\"<h2/>\", {\n 'class' : 'category-title',\n text : data[i].class,\n }); // end H2\n h2.appendTo(innerDiv);\n })();\n\n // click event listener for category div\n $(innerDiv).click(function(e) {\n e.preventDefault();\n my.activeCat = $(this).data('key'); // set active category to this category\n // save my.activeCat to session storage so it persists across page loads\n sessionStorage.setItem('my.activeCat', my.activeCat);\n // navigate to instrument-config page if category is drums or keys\n // other categories are disabled while under development\n if ($(this).data('key') === 'drums' || $(this).data('key') === 'keys') {\n window.location = $(innerDiv).data('location');\n }\n }); // END click event handler\n } // END for loop\n })\n .done(function() {\n console.log( \"done\" );\n })\n .fail(function() {\n console.log( \"error\" );\n })\n .always(function() {\n console.log( \"complete\" );\n });\n }", "title": "" }, { "docid": "8ac1a27c0476ee20b5c9677343954065", "score": "0.54164994", "text": "function _updateClicksView() {\n var clicks = controller.getCurrentCat().clicks;\n catView.updateClicks(clicks);\n adminView.updateClicks(clicks);\n }", "title": "" }, { "docid": "a182e3c63ee7a2fa4dbea66379a6cf33", "score": "0.54103607", "text": "function rewrite_links() {\n\t\t\t\t$(function() {\n\t\t\t\t\t$('a:eq(0)', 'div.story-details, .stories:visible div.story-item-details').each(function(){\n\t\t\t\t\t\tvar ahref = $(this).attr('href').split(\"/\");\n\t\t\t\t\t\t$(this).attr('href', \"/story/r/\" + ahref[ahref.length-1]);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "df3be680742275e6abd4ea47740fd867", "score": "0.5410231", "text": "fetchCategorywiseNews(category, type) {\n // Set Init Value\n this.setState({ isLoadedCategory: true, categoryData: [] });\n fetch(\n `${process.env.REACT_APP_API_URL}?section=${category}&order-by=${type}&show-fields=headline,trailText,thumbnail&page-size=${this.state.articleNo}&api-key=${process.env.REACT_APP_API_KEY}`\n )\n .then((res) => res.json())\n .then(\n (result) => {\n this.setState({\n isLoadedCategory: false,\n categoryData: result.response.results,\n });\n console.log(result);\n },\n (error) => {\n this.setState({\n isLoadedCategory: true,\n error,\n });\n }\n );\n }", "title": "" }, { "docid": "f8cde05492f8845baad1cd4c03e19fe1", "score": "0.5405631", "text": "function loadLink() {\n $('.ajax, .wrapper, #crumbs a, a.single').click( function(e) { \n var newURL = $(this).attr('href');\n $('.ajax, .wrapper, #crumbs a, a.single').unbind();\n loadPage(newURL);\n return false;\n });\n }", "title": "" }, { "docid": "29c0cb7f8fc292c86fa38b5b81f52f51", "score": "0.5403227", "text": "function categories() {\n if(window.$_URL.currentCatId) {\n $('.categories-list a.active')\n .parents('li[data-category-id]')\n .addClass('open');\n }\n $('.categories-list').on('click', 'li:has(> ul)', function(e){\n if($(e.target).is('a[data-category-leaf]')) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n console.log(e);\n\n $(this).toggleClass('open');\n });\n}", "title": "" }, { "docid": "33216ba6e632a412da88a7de9907a27d", "score": "0.5401192", "text": "function linkHandler() {\n\n\t\t// first and foremost, we need to remove all old event hooks\n\t\tjQuery(\"a.opinionlist\").off(\"click\");\n\n\t\t// and then implement the new ones\n\t\tjQuery(\"a.opinionlist\").click(function( event ) {\n\t\t\tevent.preventDefault();\n\t\t\tdpt.getOpinionByTopic(this.id);\n\t\t\t// the clicked link sets the new current topic.\n\t\t\tcurrentTopic = this.id;\n\t\t\treturn(false);\n\t\t});\n\n\t}", "title": "" }, { "docid": "ffbd7c5c7ffa155590025f7685aed6b3", "score": "0.54009765", "text": "function renderCategories(doc) {\n let li = document.createElement('li');\n let a_tag = document.createElement('a');\n let name = document.createElement('p');\n let image = document.createElement('img');\n\n\n\n name.textContent = doc.data().name;//category name\n imageUrl = doc.data().imageUrl;//image url\n\n\n /*take out spacing in category name to put in the \n href attribute of <a> tag */\n var hrefer = name.textContent.replace(/\\s/g, \"\");\n\n //create li element that will hold name and image\n categorylist.appendChild(li);\n \n\n //add child a_tag\n li.appendChild(a_tag);\n\n\n //add category image to <image> tag\n a_tag.appendChild(image).setAttribute('style', 'background-image: url(' + imageUrl + \");\");\n\n\n //add href to name tag and category name\n a_tag.href = \"#\" + hrefer;\n a_tag.appendChild(name);\n name.classList.add('name');\n \n /* This is how it will look in HTML:\n <li>\n <a>\n <img>\n <p class = \"name\"></p>\n </a>\n </li>\n */\n\n}", "title": "" }, { "docid": "44a798024ca39dd3f4abb7df9df7432b", "score": "0.53976053", "text": "function displayCategories(categoryData) {\n\n console.log(categoryData);\n\n //Recursive until all are loaded\n if(categoryData !== undefined && categoryData.categories.length > 0) {\n\n //Log utility\n $.each(categoryData.categories, function(index, value) {\n console.log(JSON.stringify(categoryData.categories[index]));\n //insert to orchestrate\n callOrchestrateCategoryInsert(categoryData.categories[index]);\n });\n\n $.merge(cateData, categoryData.categories);\n categoryPageCount++;\n setTimeout(function() {GetCategories(\"\", \"\", apiKey, \"displayCategories\", categoryPageCount)}, 1000);\n }\n else {\n //Load is finished\n $('body').append(template(cateData));\n }\n}", "title": "" }, { "docid": "59aac31073918788fdbd4ed544906fed", "score": "0.5394903", "text": "function _setCategoriesNav() {\n\n function showCategory(categoryId) {\n var categoriesAreas = document.querySelectorAll('.faq__section');\n\n for(var i = 0, length = categoriesAreas.length; i < length; i++) {\n if(i == categoryId) {\n categoriesAreas[i].classList.remove('faq__section_invisible');\n continue;\n }\n categoriesAreas[i].classList.add('faq__section_invisible');\n }\n }\n\n var categoriesContainer = document.getElementsByClassName('categories__list')[0];\n\n categoriesContainer.addEventListener('click', function(e) {\n // e.preventDefault();\n\n var target = e.target;\n\n if(target.tagName != 'A' || target.classList.contains('categories__link_active')) return;\n\n var links = document.getElementsByClassName('categories__link');\n for(var i = 0, length = links.length; i < length; i++) {\n links[i].classList.remove('categories__link_active');\n }\n target.classList.toggle('categories__link_active');\n\n var categoryId = target.getAttribute('data-category');\n\n showCategory(categoryId);\n });\n }", "title": "" }, { "docid": "aa429831c7fa2dbd0490aa84ee5c99b3", "score": "0.53946936", "text": "function ScrapeLinkByCategoryName(categoryName) {\n async.waterfall([\n function(callback) {\n Category.findOne({ name: categoryName }, (err, category) => {\n if (category) {\n callback(err, category);\n }\n });\n },\n function(category, callback) {\n console.log(category);\n for (let PAGE = 1; PAGE <= category.totalPage; PAGE++) {\n console.log(PAGE);\n let baseUrl = `http://www.javlibrary.com/en/vl_genre.php?&mode=&g=${category.link}&page=${PAGE}`;\n axios.get(baseUrl)\n .then(response => {\n if (response.data === undefined) {\n\n }\n console.log(baseUrl);\n let $ = cheerio.load(response.data, { ignoreWhitespace: true, xmlMode: true });\n $('div.videos > .video').each(function(i, value) {\n console.log(i);\n let link = $($('div.videos > .video > a')[1]).attr('href');\n link = link.substring(1);\n javId = $($('div.video > a > .id')[i]).text()\n\n JavLink.findOne({ jav_id: javId }, (err, foundLink) => {\n if (!foundLink) {\n let javlink = new JavLink();\n javlink.link = link;\n javlink.jav_id = javId;\n javlink.save((err) => {\n console.log(link);\n console.log(javId);\n });\n\n }\n });\n });\n }).catch(err => {\n console.log(err);\n })\n }\n }\n\n ])\n\n}", "title": "" }, { "docid": "17a35958f36b1232c4c7f73e43e6c7aa", "score": "0.5371813", "text": "function _setCategoryInfo(category) {\n // only get category info if different from current category\n if (category !== factory.currentCategorySlug) {\n // clear array & reset page # for new category\n factory.postsByCategory = [];\n currentCategoryPage = 1;\n\n return $http.get(apiUrl + '/taxonomies/category/terms/?filter[slug]=' + category)\n .success(function(res) {\n // set category name if get request results in empty array\n if (!res.length) {\n factory.currentCategoryName = category;\n return;\n }\n\n // set category details\n factory.currentCategorySlug = category;\n factory.currentCategoryName = res[0].name;\n factory.totalCategoryPosts = res[0].count;\n });\n }\n }", "title": "" }, { "docid": "8b113c028f19cdb5ec743d2d6c40839b", "score": "0.53683126", "text": "function loadCategories() {\n fetch('/categories').then(response => response.json()).then((categories) => {\n const categoriesElement = document.getElementById('categories-container');\n categoriesElement.innerHTML = '';\n \n categories.forEach((category) => {\n categoriesElement.appendChild(createCategoryElement(category));\n })\n });\n}", "title": "" }, { "docid": "a97df536a6113d0f438b1d8e3abb750b", "score": "0.53672343", "text": "function updateSelected(){\n\t\tvar hashPairs = window.location.hash.substr(1).split(\"&\").reduce(function(current, next){\n\t\t\tvar pair = next.split(\"=\");\n\t\t\tcurrent[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n\t\t\treturn current;\n\t\t}, {});\n\t\treturn $.ajax(\"/categories.json\", {\n\t\t\t\tdataType : \"json\"\n\t\t\t}).then(function(response){\n\t\t\t\tcategories = response.categories;\n\t\t\t\tif(hashPairs['category']){\n\t\t\t\t\tvar category = categories.find(function(e){\n\t\t\t\t\t\treturn e.description == hashPairs[\"category\"];\n\t\t\t\t\t});\n\t\t\t\t\tsetCategory(category ? category['id'] : null);\n\t\t\t\t}\n\t\t\t}).then(function(){\n\t\t\t\tvar url = selectedCategory? \"/categories/\" + selectedCategory +\"/items.json\" : \"/items.json\";\n\t\t\t\treturn $.ajax(url , {\n\t\t\t\t\tdataType : \"json\"\n\t\t\t\t}).then(function(response){\n\t\t\t\t\titems = response.items;\n\t\t\t\t\tif(hashPairs['item']){\n\t\t\t\t\t\tvar item = items.find(function(e){\n\t\t\t\t\t\t\treturn e.name == hashPairs['item'];\n\t\t\t\t\t\t});\n\t\t\t\t\t\tsetItem(item ? item['id'] : null);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t}", "title": "" }, { "docid": "f6122e783eb943d4433d4a5eef27b7ce", "score": "0.5360307", "text": "function fetchCategories() {\n fetch(API + \"categories\")\n .then(checkStatus)\n .then(JSON.parse)\n .then(function(categories) {\n displayCategories(categories);\n mapCategories(categories);\n })\n .catch(displayError);\n }", "title": "" }, { "docid": "bcfe59bd89c32f2a6a75acecd6174e02", "score": "0.53412735", "text": "function storeCategories() {\n const holders = document.querySelectorAll('.js-store-category');\n\n for (let i = 0; i < holders.length; i++) {\n getCategory(holders[i]);\n }\n}", "title": "" }, { "docid": "532e989beabfcfd693d1a4cf043019b6", "score": "0.53398085", "text": "function cat(){\n\t\t$.ajax({\n\t\t\turl\t:\t\"action.php\",\n\t\t\tmethod:\t\"POST\",\n\t\t\tdata\t:\t{category:1},\n\t\t\tsuccess\t:\tfunction(data){\n\t\t\t\t$(\"#get_category\").html(data);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t})\n\t}", "title": "" }, { "docid": "27fcc58cc39372f54fc7cf07d8d45a96", "score": "0.5339216", "text": "function getSubCategory() {\n // save the data to the categoriesStack to use it at back bottun\n categoriesStack.push({\n breadCrumb: frmHome.lblBreadCrumb.text,\n categories: frmHome.sgmtCategories.data\n });\n kony.print(\"########## sgmtCategories: \" + JSON.stringify(frmHome.sgmtCategories.data));\n kony.print(\"########## categoriesStack: \" + JSON.stringify(categoriesStack));\n // ######### getting the segment row based on channel\n var selData;\n // ######\t\tALL SPA CHANNELS\n selData = frmHome.sgmtCategories.selectedItems[0];\n //var selData = frmHome.sgmtCategories.selectedRowItems[0];\n kony.print(\"########## Selected Row Details: \" + JSON.stringify(selData));\n //Setting the title\n var selectedCatID = selData.subCategoryID;\n getCategories(selectedCatID);\n // enable back bottun\n frmHome.flxHeader.btnBack.setVisibility(true);\n frmHome.flxHeader.imgBack.setVisibility(true);\n //frmNewsDetails.lblTitle.text = selData.title;\n //Setting the pubDate\n // Finding out the location of the first instance of first Image tag\n //var imgTagLocation = selData.desc.search(\"<img\");\n //Trimming the data till imgTagLocation and setting the description\n}", "title": "" }, { "docid": "eadae45709e4554181117c230e471d8e", "score": "0.5336794", "text": "setCategory(category) {\n if (category !== this._category) {\n this._category = category;\n this.refresh();\n }\n }", "title": "" }, { "docid": "00976c8be0a55230d4ee0e81839b461b", "score": "0.53354883", "text": "componentDidMount() {\n const categories = [];\n const categoryIds = this.load();\n if (categoryIds !== null) {\n categoryIds.forEach(id => {\n const category = JSON.parse(localStorage.getItem(\"Category\" + id + \"-\" + this.props.id));\n categories.push(this.generateCategoryWithId(category.text, id, category.color));\n this.categoryCount = id + 1; //To ensure unique key and ids\n });\n this.colorIndex = categoryIds.length;\n this.setState(prevState => {\n return {...prevState, categories: categories}\n }, () => this.props.updateCategoryFilter(this.state.categories.map(category => {\n return category.props.color;\n })));\n }\n this.save();\n }", "title": "" }, { "docid": "cac5799136d2f3c60dd97f89a53ea573", "score": "0.53288436", "text": "function getBottomNav(category) {\n let uiList = document.getElementById('link-list');\n let catLinks = links.find((item) => { return item['category'] === category; });\n console.log(catLinks)\n\n for (let link in catLinks.linkList) {\n let item = document.createElement('li');\n let ref = document.createElement('a');\n\n ref.href = catLinks.linkList[link].url;\n ref.innerText = catLinks.linkList[link].title;\n\n item.appendChild(ref);\n uiList.appendChild(item);\n }\n}", "title": "" }, { "docid": "1ab8fabfb8d3a27f4512684d1ad9295b", "score": "0.5318112", "text": "async function getCategories() {\n let categories = await request(\n `${process.env.REACT_APP_SERVER_URL}${endpoints.categories}`,\n getAccessTokenSilently,\n loginWithRedirect,\n \"GET\",\n );\n\n if (categories && categories.length > 0) {\n console.log(categories);\n setCategories(categories);\n }\n }", "title": "" }, { "docid": "12248c6545bb78abebd123b61f9ebcb4", "score": "0.53071505", "text": "function novaCategoria(){\n\t\t$(location).attr('href', '/categorias/new');\n\t}", "title": "" }, { "docid": "3b21e16bd797ec1083356933ee342938", "score": "0.5305559", "text": "updateAlbum(store, payload) {\n api.updateAlbum(payload.album.info.name, payload.album.info.id, data => {\n alert('success');\n payload.categories.forEach(cat => {\n if (payload.album.categories.findIndex(x => x.category.localeCompare(cat) == 0) == -1) {\n //console.log(cat)\n api.addCategory(cat, data.data.id, () => {}, store.getters.token);\n }\n })\n store.dispatch('updateAlbums');\n router.push(`/show/${payload.album.info.id}`);\n }, store.getters.token);\n }", "title": "" }, { "docid": "ad5278fc80ba89cf0571a49c90d0d6ce", "score": "0.5304674", "text": "function syncCategory(){\n\tvar model_category = Alloy.createCollection('category'); \n\tvar category_list = model_category.getCategoryList();\n\t\n\tfor (var i=0; i< category_list.length; i++) {\n\t\tvar API = require('api');\n\t\tAPI.loadMerchantListByCategory(category_list[i].id);\n\t}\n}", "title": "" }, { "docid": "39572b4edf2839691b8547a77208d27c", "score": "0.5304363", "text": "function handleChangeCategories(e){\n console.log(\"handleChangeCategories -> e\", e)\n let categories = e.target.parentElement.dataset.id;\n sessionStorage.setItem('changeCategories',categories);\n let changePrice = sessionStorage.getItem('change');\n changePrice ? changePrice : '';\n let changeLimit = parseInt(sessionStorage.getItem('changeLimit'));\n changeLimit && changeLimit;\n\n getProductList({categories:categories,page:1,limit:changeLimit,softPrice:changePrice})\n}", "title": "" }, { "docid": "1af562708fbb0933a2534a95ce0656f4", "score": "0.5302017", "text": "function updateCatsToSearchPane() {\n\n // clear existing category span in search pane\n let catSpan = document.getElementById('cats');\n while (catSpan.firstChild) {\n catSpan.removeChild(catSpan.firstChild);\n }\n\n // sort categories by rank\n categories.sort((a, b) => (a.rank < b.rank) ? 1 : -1)\n\n // populate span container with sorted categories\n for (const cat of categories) {\n let p = document.createElement('p');\n let a = document.createElement('button');\n\n a.innerHTML = cat.name;\n a.addEventListener('click', function(event) {\n event.preventDefault();\n updateRank(cat);\n updateSearchPane(cat);\n });\n\n p.appendChild(a);\n catSpan.appendChild(p);\n }\n\n}", "title": "" }, { "docid": "2a8be5bf3b03593ed79db4d86c8e48fe", "score": "0.5300756", "text": "function loadPlayerCategory(catID) {\r\n // By default, all category data tables (HTML tables) are not visible\r\n $('.playerInfoEditCategory').css({\r\n \"display\": \"none\",\r\n \"visibility\": \"hidden\"\r\n });\r\n\r\n // Find current category - linear search against eventCategories object in globals.js\r\n for (var i = 0; i < eventCategories.length; i++) {\r\n if (eventCategories[i].id == catID) {\r\n currentCategory = eventCategories[i]; // Found matching category\r\n break;\r\n }\r\n }\r\n\r\n if (currentCategory) {\r\n \r\n $('#categoryTitle').html(currentCategory.name); // Display category title at the top of the EMR page\r\n // There is a button for adding new content item to each category - rename that button according to the currently\r\n // selected category (ex: Add diagnosis) \r\n $('#btnAddItem').val(\"Add \" + currentCategory.name); \r\n // Do not display add button for: encounters, demographic, social\r\n if((currentCategory.id == 9) || (currentCategory.id == 5) || (currentCategory.id == 7) ||(currentCategory.id == 0) || (currentCategory.id == 11)) {\r\n $('#btnAddItem').css({\"display\": \"none\", \"visibility\": \"hidden\"});\r\n }\r\n else {\r\n $('#btnAddItem').css({\"display\": \"block\", \"visibility\": \"visible\"});\r\n }\r\n\r\n // Make HTML table for the currently selected category visible\r\n $('#divCategory' + currentCategory.id).css({\r\n \"display\": \"block\",\r\n \"visibility\": \"visible\"\r\n });\r\n\r\n var notificationIcon = $(\"#playerCategory\" + currentCategory.id).find(\"div\");\r\n try{\r\n notificationIcon.remove();\r\n }\r\n catch (err) {\r\n // do nothing\r\n }\r\n\r\n }\r\n window.scrollTo(0, 0);\r\n cancelSelectedLearnerChoice();\r\n logEvent(currentCategory);\r\n\r\n}", "title": "" }, { "docid": "a7414589bec2fde41481fd7696203869", "score": "0.5298918", "text": "function CategoryNav({selected, onUpdateCategory}) {\n\n const categories = ['Top', 'New']\n\n return (\n <ul className='flex-center'>\n {categories.map((category) => (\n <li key={category}>\n <button\n className='btn-clear nav-link'\n style={category === selected ? {color: 'rgb(187, 46, 31)'} : null}\n onClick={() => onUpdateCategory(category)}>\n {category}\n </button>\n </li>\n ))}\n </ul>\n )\n}", "title": "" }, { "docid": "f84e84fc392d91ca56419aa6201f1118", "score": "0.52962476", "text": "function view_category(notebook, category){\n $.ajax({\n url: `/notes/selected_notes/${notebook}/${category}`,\n method: 'get',\n success: function(serverResponse){\n $(\"#notes_component\").html(serverResponse);\n\n addClickListener();\n }\n })\n}", "title": "" }, { "docid": "dc8fbd2753030987dd50c2e942fba5d7", "score": "0.52920717", "text": "function glomeGetCategories()\n{\n log.debug('glomeGetCategories called');\n\n let q = 'SELECT * FROM categories WHERE subscribed = :subscribed';\n //log.debug(q);\n\n var statement = db.createStatement(q);\n statement.params.subscribed = 1;\n\n // Reset category data\n glome_ad_categories = {}\n\n statement.executeAsync\n (\n {\n handleResult: function(results)\n {\n var cat = glomeGetTable('categories');\n\n // Old stack\n var stack = {}\n for (k in glome_ad_categories)\n {\n stack[k] = false;\n }\n\n for (let row = results.getNextRow(); row; row = results.getNextRow())\n {\n var id = row.getResultByName('id');\n stack[id] = true;\n\n glome_ad_categories[id] = {};\n\n for (i in cat)\n {\n glome_ad_categories[id][i] = row.getResultByName(i);\n }\n }\n },\n handleCompletion: function(reason)\n {\n //log.debug('all categories processed; call updateticker');\n window.jQuery(document).trigger('updateticker');\n }\n }\n );\n}", "title": "" } ]
d2d91bdad5b0e92bf0dbee018c73aceb
Load the given module.
[ { "docid": "5cd6565c9977124f6c4b8b6098e496ee", "score": "0.6576833", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(8329);\n break;\n case 'encoding':\n module = __webpack_require__(6637);\n break;\n case 'language':\n module = __webpack_require__(9557);\n break;\n case 'mediaType':\n module = __webpack_require__(6025);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" } ]
[ { "docid": "18fac79251cff0203bf79a863b2b7550", "score": "0.72843546", "text": "function loadModule(module) {\n //Load module\n $.getScript(\"modules/\"+module+\"/\"+module+\".js\", function(data, textStatus, jqxhr) {\n //Store the module in loaded array\n loadedModules.push(module);\n //Execute the module\n window[module + \"_init\"]();\n });\n}", "title": "" }, { "docid": "6f74a99dfd3b2998e6f81b8a20cc0b03", "score": "0.7045557", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n } // This uses a switch for static require analysis\n\n\n switch (moduleName) {\n case 'charset':\n module = charset;\n break;\n\n case 'encoding':\n module = encoding;\n break;\n\n case 'language':\n module = language;\n break;\n\n case 'mediaType':\n module = mediaType;\n break;\n\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n } // Store to prevent invoking require()\n\n\n modules[moduleName] = module;\n return module;\n}", "title": "" }, { "docid": "1f669596d3d30ba9e3524db091933dae", "score": "0.69484234", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = require('./lib/charset');\n break;\n case 'encoding':\n module = require('./lib/encoding');\n break;\n case 'language':\n module = require('./lib/language');\n break;\n case 'mediaType':\n module = require('./lib/mediaType');\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n }", "title": "" }, { "docid": "9889de2bc2ee120e09df25a0f176faff", "score": "0.6929288", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n } // This uses a switch for static require analysis\n\n\n switch (moduleName) {\n case 'charset':\n module = require('./lib/charset');\n break;\n\n case 'encoding':\n module = require('./lib/encoding');\n break;\n\n case 'language':\n module = require('./lib/language');\n break;\n\n case 'mediaType':\n module = require('./lib/mediaType');\n break;\n\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n } // Store to prevent invoking require()\n\n\n modules[moduleName] = module;\n return module;\n}", "title": "" }, { "docid": "528cf7e7af28a1be711a4b197f5dfbba", "score": "0.6787327", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = require('./lib/charset');\n break;\n case 'encoding':\n module = require('./lib/encoding');\n break;\n case 'language':\n module = require('./lib/language');\n break;\n case 'mediaType':\n module = require('./lib/mediaType');\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "528cf7e7af28a1be711a4b197f5dfbba", "score": "0.6787327", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = require('./lib/charset');\n break;\n case 'encoding':\n module = require('./lib/encoding');\n break;\n case 'language':\n module = require('./lib/language');\n break;\n case 'mediaType':\n module = require('./lib/mediaType');\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "528cf7e7af28a1be711a4b197f5dfbba", "score": "0.6787327", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = require('./lib/charset');\n break;\n case 'encoding':\n module = require('./lib/encoding');\n break;\n case 'language':\n module = require('./lib/language');\n break;\n case 'mediaType':\n module = require('./lib/mediaType');\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "528cf7e7af28a1be711a4b197f5dfbba", "score": "0.6787327", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = require('./lib/charset');\n break;\n case 'encoding':\n module = require('./lib/encoding');\n break;\n case 'language':\n module = require('./lib/language');\n break;\n case 'mediaType':\n module = require('./lib/mediaType');\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "9f5804181c38af81f9afe21a5fa216d1", "score": "0.67719865", "text": "function loadModule(moduleName) {\n\t var module = modules[moduleName];\n\n\t if (module !== undefined) {\n\t return module;\n\t }\n\n\t // This uses a switch for static require analysis\n\t switch (moduleName) {\n\t case 'charset':\n\t module = __webpack_require__(84);\n\t break;\n\t case 'encoding':\n\t module = __webpack_require__(85);\n\t break;\n\t case 'language':\n\t module = __webpack_require__(86);\n\t break;\n\t case 'mediaType':\n\t module = __webpack_require__(87);\n\t break;\n\t default:\n\t throw new Error('Cannot find module \\'' + moduleName + '\\'');\n\t }\n\n\t // Store to prevent invoking require()\n\t modules[moduleName] = module;\n\n\t return module;\n\t}", "title": "" }, { "docid": "2715be904b1ad1403df4fd55a182731a", "score": "0.6771893", "text": "function loadModule(module) {\n\n\tvar elements = module.split(\"/\");\n\tvar moduleName = elements[elements.length - 1];\n\tvar moduleFolder = __dirname + \"/../\" + module;\n\n\tif (defaultModules.indexOf(moduleName) !== -1) {\n\t\tmoduleFolder = __dirname + \"/../default/\" + module;\n\t}\n\n\tvar helperPath = moduleFolder + \"/node_helper.js\";\n\n\tvar loadModule = true;\n\ttry {\n\t\tfs.accessSync(helperPath, fs.R_OK);\n\t} catch (e) {\n\t\tloadModule = false;\n\t\tconsole.log(\"No helper found for module: \" + moduleName + \".\");\n\t}\n\n\tif (loadModule) {\n\t\tvar Module = require(helperPath);\n\t\tvar m = new Module();\n\n\t\tif (m.requiresVersion) {\n\t\t\tconsole.log(\"Check MagicMirror version for node helper '\" + moduleName + \"' - Minimum version: \" + m.requiresVersion + \" - Current version: \" + global.version);\n\t\t\tif (cmpVersions(global.version, m.requiresVersion) >= 0) {\n\t\t\t\tconsole.log(\"Version is ok!\");\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Version is incorrect. Skip module: '\" + moduleName + \"'\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tm.setName(moduleName);\n\t\tm.setPath(path.resolve(moduleFolder));\n\t\treturn m;\n\t}\n\t\n\treturn null;\n}", "title": "" }, { "docid": "7d29cc92f058b04da819fd44df53e371", "score": "0.67311716", "text": "function loadModule(moduleName) {\n\t var module = modules[moduleName];\n\n\t if (module !== undefined) {\n\t return module;\n\t }\n\n\t // This uses a switch for static require analysis\n\t switch (moduleName) {\n\t case 'charset':\n\t module = __webpack_require__(623);\n\t break;\n\t case 'encoding':\n\t module = __webpack_require__(624);\n\t break;\n\t case 'language':\n\t module = __webpack_require__(625);\n\t break;\n\t case 'mediaType':\n\t module = __webpack_require__(626);\n\t break;\n\t default:\n\t throw new Error('Cannot find module \\'' + moduleName + '\\'');\n\t }\n\n\t // Store to prevent invoking require()\n\t modules[moduleName] = module;\n\n\t return module;\n\t}", "title": "" }, { "docid": "ecc402e458d3a265f0f23d98fc91da37", "score": "0.6711344", "text": "function loadModule(moduleName) {\n\t var module = modules[moduleName];\n\n\t if (module !== undefined) {\n\t return module;\n\t }\n\n\t // This uses a switch for static require analysis\n\t switch (moduleName) {\n\t case 'charset':\n\t module = __webpack_require__(70);\n\t break;\n\t case 'encoding':\n\t module = __webpack_require__(71);\n\t break;\n\t case 'language':\n\t module = __webpack_require__(72);\n\t break;\n\t case 'mediaType':\n\t module = __webpack_require__(73);\n\t break;\n\t default:\n\t throw new Error('Cannot find module \\'' + moduleName + '\\'');\n\t }\n\n\t // Store to prevent invoking require()\n\t modules[moduleName] = module;\n\n\t return module;\n\t}", "title": "" }, { "docid": "65a15c9d823b7eedc7c91eda584c892d", "score": "0.6687658", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(383);\n break;\n case 'encoding':\n module = __webpack_require__(384);\n break;\n case 'language':\n module = __webpack_require__(385);\n break;\n case 'mediaType':\n module = __webpack_require__(386);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "939225ebd537a6059d85e25e78ec4b39", "score": "0.66815525", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(420);\n break;\n case 'encoding':\n module = __webpack_require__(421);\n break;\n case 'language':\n module = __webpack_require__(422);\n break;\n case 'mediaType':\n module = __webpack_require__(423);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "3b8359753fdd3cab835b6b812e1741e6", "score": "0.66788983", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(162);\n break;\n case 'encoding':\n module = __webpack_require__(163);\n break;\n case 'language':\n module = __webpack_require__(164);\n break;\n case 'mediaType':\n module = __webpack_require__(165);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "51e8a8121cf7c30d80e741f003faea0a", "score": "0.66787094", "text": "function loadModule(name, path) {\n require.cache[name] = {\n id: name,\n filename: name,\n loaded: true,\n exports: require(path)\n };\n \n var Module = require('module');\n var realResolve = Module._resolveFilename;\n Module._resolveFilename = function fakeResolve(request, parent) {\n if (request === name) {\n return name;\n }\n return realResolve(request, parent);\n };\n}", "title": "" }, { "docid": "b4d293ae28b9c8a3aea1838ec443224e", "score": "0.6670423", "text": "load(moduleName, path, className){\n\n var ModuleClass;\n if (path instanceof Function) {\n this._logger.debug('## Detecting module type for %s. Class-Function detected.', moduleName);\n ModuleClass = path;\n } else {\n this._logger.debug('## Detecting module type for %s. Local path detected \\'%s\\'', moduleName, path);\n ModuleClass = require(path);\n }\n\n // Initializing module\n var moduleInstance = new ModuleClass();\n\n // Set modules Map\n this._modules[moduleName] = moduleInstance;\n this._moduleQueue.push({name: moduleName, module: moduleInstance});\n this[moduleName] = moduleInstance;\n }", "title": "" }, { "docid": "ca5b9b9f0334e21b79b9d2bac1393916", "score": "0.6656673", "text": "function loadModule(file) {\n let module = loaded[file] = new Module(dirname(file))\n let text = readFileSync(file, \"utf8\")\n let func = new Function(\"exports, require, module\", text)\n func(module.exports, requireFor(module), module)\n}", "title": "" }, { "docid": "cb53d56b7ecf56cb5f2038b97d99416f", "score": "0.66526276", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(145);\n break;\n case 'encoding':\n module = __webpack_require__(146);\n break;\n case 'language':\n module = __webpack_require__(147);\n break;\n case 'mediaType':\n module = __webpack_require__(148);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "a5f81e8af5047d73aeface4cc8762c91", "score": "0.66330093", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(148);\n break;\n case 'encoding':\n module = __webpack_require__(149);\n break;\n case 'language':\n module = __webpack_require__(150);\n break;\n case 'mediaType':\n module = __webpack_require__(151);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "f9b1cb849f3c5f85a39b4c4bcdc2566e", "score": "0.66105485", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(142);\n break;\n case 'encoding':\n module = __webpack_require__(143);\n break;\n case 'language':\n module = __webpack_require__(144);\n break;\n case 'mediaType':\n module = __webpack_require__(145);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "5d16751aa32b658be08e19741febf1e2", "score": "0.6591169", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(607);\n break;\n case 'encoding':\n module = __webpack_require__(608);\n break;\n case 'language':\n module = __webpack_require__(609);\n break;\n case 'mediaType':\n module = __webpack_require__(610);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "94f52d64775d2a07f6b51f7936b2fc6f", "score": "0.6587427", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(99296);\n break;\n case 'encoding':\n module = __webpack_require__(25297);\n break;\n case 'language':\n module = __webpack_require__(19722);\n break;\n case 'mediaType':\n module = __webpack_require__(62563);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "d38ca71d9606e9a8261a0ea33bd48225", "score": "0.65602446", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(259);\n break;\n case 'encoding':\n module = __webpack_require__(260);\n break;\n case 'language':\n module = __webpack_require__(261);\n break;\n case 'mediaType':\n module = __webpack_require__(262);\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "3459efe213fcecdab4fcc75280187bf1", "score": "0.6538042", "text": "function _require(module) {\n try {\n var time = Date.now();\n process.stdout.write(gutil.colors.red('Loading ' + module));\n var moduleLoaded = require(module);\n process.stdout.clearLine();\n process.stdout.cursorTo(0);\n process.stdout.write(\n 'Loaded ' + gutil.colors.magenta(module) + ' in ' +\n gutil.colors.blue((Date.now() - time) + 'ms\\n')\n );\n _loadingTimer.plus();\n return moduleLoaded;\n } catch (e) {\n return require(module);\n }\n}", "title": "" }, { "docid": "8446e293addda737f3187b2f6795161f", "score": "0.64701045", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(/*! ./lib/charset */ \"../node_modules/negotiator/lib/charset.js\");\n break;\n case 'encoding':\n module = __webpack_require__(/*! ./lib/encoding */ \"../node_modules/negotiator/lib/encoding.js\");\n break;\n case 'language':\n module = __webpack_require__(/*! ./lib/language */ \"../node_modules/negotiator/lib/language.js\");\n break;\n case 'mediaType':\n module = __webpack_require__(/*! ./lib/mediaType */ \"../node_modules/negotiator/lib/mediaType.js\");\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "8446e293addda737f3187b2f6795161f", "score": "0.64701045", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(/*! ./lib/charset */ \"../node_modules/negotiator/lib/charset.js\");\n break;\n case 'encoding':\n module = __webpack_require__(/*! ./lib/encoding */ \"../node_modules/negotiator/lib/encoding.js\");\n break;\n case 'language':\n module = __webpack_require__(/*! ./lib/language */ \"../node_modules/negotiator/lib/language.js\");\n break;\n case 'mediaType':\n module = __webpack_require__(/*! ./lib/mediaType */ \"../node_modules/negotiator/lib/mediaType.js\");\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "72c59350d1fd0d331301445f9df7e554", "score": "0.6462315", "text": "function loadModule(moduleName) {\r\n var module = modules[moduleName];\r\n\r\n if (module !== undefined) {\r\n return module;\r\n }\r\n\r\n // This uses a switch for static require analysis\r\n switch (moduleName) {\r\n case 'charset':\r\n module = __webpack_require__(2024);\r\n break;\r\n case 'encoding':\r\n module = __webpack_require__(2025);\r\n break;\r\n case 'language':\r\n module = __webpack_require__(2026);\r\n break;\r\n case 'mediaType':\r\n module = __webpack_require__(2027);\r\n break;\r\n default:\r\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\r\n }\r\n\r\n // Store to prevent invoking require()\r\n modules[moduleName] = module;\r\n\r\n return module;\r\n}", "title": "" }, { "docid": "f3911d2f35cb09f7f615faedd8203ae1", "score": "0.6461761", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(/*! ./lib/charset */ \"./node_modules/negotiator/lib/charset.js\");\n break;\n case 'encoding':\n module = __webpack_require__(/*! ./lib/encoding */ \"./node_modules/negotiator/lib/encoding.js\");\n break;\n case 'language':\n module = __webpack_require__(/*! ./lib/language */ \"./node_modules/negotiator/lib/language.js\");\n break;\n case 'mediaType':\n module = __webpack_require__(/*! ./lib/mediaType */ \"./node_modules/negotiator/lib/mediaType.js\");\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "f3911d2f35cb09f7f615faedd8203ae1", "score": "0.6461761", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(/*! ./lib/charset */ \"./node_modules/negotiator/lib/charset.js\");\n break;\n case 'encoding':\n module = __webpack_require__(/*! ./lib/encoding */ \"./node_modules/negotiator/lib/encoding.js\");\n break;\n case 'language':\n module = __webpack_require__(/*! ./lib/language */ \"./node_modules/negotiator/lib/language.js\");\n break;\n case 'mediaType':\n module = __webpack_require__(/*! ./lib/mediaType */ \"./node_modules/negotiator/lib/mediaType.js\");\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "f3911d2f35cb09f7f615faedd8203ae1", "score": "0.6461761", "text": "function loadModule(moduleName) {\n var module = modules[moduleName];\n\n if (module !== undefined) {\n return module;\n }\n\n // This uses a switch for static require analysis\n switch (moduleName) {\n case 'charset':\n module = __webpack_require__(/*! ./lib/charset */ \"./node_modules/negotiator/lib/charset.js\");\n break;\n case 'encoding':\n module = __webpack_require__(/*! ./lib/encoding */ \"./node_modules/negotiator/lib/encoding.js\");\n break;\n case 'language':\n module = __webpack_require__(/*! ./lib/language */ \"./node_modules/negotiator/lib/language.js\");\n break;\n case 'mediaType':\n module = __webpack_require__(/*! ./lib/mediaType */ \"./node_modules/negotiator/lib/mediaType.js\");\n break;\n default:\n throw new Error('Cannot find module \\'' + moduleName + '\\'');\n }\n\n // Store to prevent invoking require()\n modules[moduleName] = module;\n\n return module;\n}", "title": "" }, { "docid": "889be76fb6fa2c29159576f617a9d1ac", "score": "0.64473206", "text": "function loadModule(modulePath) {\n // Setup environment\n if (loadedModule === undefined || loadedModulePath != modulePath) {\n loadedModule = require(modulePath);\n loadedModulePath = modulePath;\n \n return Q(loadedModule); \n } else {\n return Q(loadedModule);\n }\n}", "title": "" }, { "docid": "3bb4a2268d17d412157c30868623500d", "score": "0.64173645", "text": "function load(module, ready) {\n\t\tif (isReady(module)) {\n\t\t\tready.call();\n\t\t} else {\n\t\t\tonReady(module, ready);\n\t\t\tif (STACK.indexOf(module) < 0) {\n\t\t\t\tSTACK.push(module);\n\t\t\t\tloadScript(module);\n\t\t\t} else if (MODULES[module]) {\n\t\t\t\tthrow \"Circular module dependency: \" + module;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e9276f9788a1723f46e96ec48596a90b", "score": "0.6348229", "text": "function loadEsmModule(modulePath) {\n return new Function('modulePath', `return import(modulePath);`)(modulePath);\n}", "title": "" }, { "docid": "e9276f9788a1723f46e96ec48596a90b", "score": "0.6348229", "text": "function loadEsmModule(modulePath) {\n return new Function('modulePath', `return import(modulePath);`)(modulePath);\n}", "title": "" }, { "docid": "f1714a95542f336164fcff33b98a3d04", "score": "0.61923844", "text": "function loadModule( url, sandBox, delayed ) {\n\tvar future;\n\tvar hash = R_SPLIT_URL.exec( url );\n\turl = hash[ 1 ];\n\thash = hash[ 2 ];\n\tfuture = modules[ url ] ||\n\t\t( ( modules[ url ] = createFuture( function( future ) {\n\t\t\t\tsandBox( url, function( win, resolveURL ) {\n\t\t\t\t\tvar tmp = useFactory( resolveURL, future );\n\t\t\t\t\twin.use = tmp.u;\n\t\t\t\t\treturn tmp.r;\n\t\t\t\t} );\n\t\t\t}, delayed )\n\t\t) );\n\tif ( hash ) {\n\t\thash = hash.split( \".\" );\n\t\tfuture = future.f( function( module ) {\n\t\t\tfor ( var i = 0, length = hash.length; i < length; i++ ) {\n\t\t\t\tmodule = module[ hash[ i ] ];\n\t\t\t}\n\t\t\treturn module;\n\t\t} );\n\t}\n\treturn future;\n}", "title": "" }, { "docid": "36b0b1b4009bae9e94daf3b98b271cba", "score": "0.61840135", "text": "function loadModule(loader, name, options) {\n return new Promise(asyncStartLoadPartwayThrough({\n step: options.address ? 'fetch' : 'locate',\n loader: loader,\n moduleName: name,\n // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091\n moduleMetadata: options && options.metadata || {},\n moduleSource: options.source,\n moduleAddress: options.address\n }));\n }", "title": "" }, { "docid": "36b0b1b4009bae9e94daf3b98b271cba", "score": "0.61840135", "text": "function loadModule(loader, name, options) {\n return new Promise(asyncStartLoadPartwayThrough({\n step: options.address ? 'fetch' : 'locate',\n loader: loader,\n moduleName: name,\n // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091\n moduleMetadata: options && options.metadata || {},\n moduleSource: options.source,\n moduleAddress: options.address\n }));\n }", "title": "" }, { "docid": "42277b1fb5b73f875d1ad7eddbf6c77f", "score": "0.61540693", "text": "function requireFor(module) {\n return function(name) {\n let file = resolve(module.path, name)\n if (!loaded[file]) loadModule(file)\n return loaded[file].exports\n }\n}", "title": "" }, { "docid": "51218ef3a05e43fc67b271294c74bbf2", "score": "0.6149905", "text": "function loadModules() {\n if (hasModule) {\n var fs = require(\"fs\"),\n path = require(\"path\");\n\n var p = \"./public/javascripts/\"\n fs.readdir(p, function(err, files) {\n if (err) {\n throw err;\n } else {\n files.map(function(file) {\n return path.join(p, file);\n }).filter(function(file) {\n return fs.statSync(file).isFile();\n }).forEach(function(file) {\n if (file.match(/locale/) || file.match(/grade/)) {\n require(path.resolve(file));\n }\n //console.log(\"%s (%s)\", file, path.extname(file));\n });\n }\n\n\n });\n }\n }", "title": "" }, { "docid": "3a5b4fe0de6a467f6d01ffd7abc2bda1", "score": "0.6122578", "text": "function InitialLoadModule()\n {\n registerHandlers();\n // GEEK: Load files that are used later, \n setTimeout('loadOtherFiles();',500);\n // Set a debugger option.\n if( isDebugMode() )\n {\n console.info(\"We are in DEBUG MODE\");\n }\n \n }", "title": "" }, { "docid": "0df8d94ba0679363406fcf906380fe82", "score": "0.603319", "text": "function loadWasmModule(moduleScriptUrl) {\n return new Promise((resolve, reject) => {\n try {\n // This variable will be used by a loader script generated by Emscripten.\n Module = {\n onRuntimeInitialized: () => {\n console.info('WASM runtime initialized');\n resolve();\n },\n onAbort: () => {\n console.error('WASM runtime aborted');\n reject(new Error('WASM runtime aborted'));\n },\n onExit: (status) => {\n console.info(`WASM onExit called with status: ${status}`);\n },\n }; // Module\n\n const script = document.createElement('script');\n\n script.addEventListener('load', () => {\n console.info(`Loaded ${moduleScriptUrl}`);\n });\n\n script.addEventListener('error', (errorEvent) => {\n console.error(`Cannot load ${moduleScriptUrl}`);\n reject(new Error(\n `Cannot load ${moduleScriptUrl} error: ${errorEvent.message}`));\n });\n\n script.async = true;\n script.src = moduleScriptUrl;\n document.body.appendChild(script);\n } catch (err) {\n console.error(err);\n reject(new Error('Cannot instantiate WASM module!'));\n }\n });\n} // loadWasmModule()", "title": "" }, { "docid": "2ecafcdef3e26b9a14a6225dcabb32a1", "score": "0.60090446", "text": "function loadModule() {\n // The first thread to load a given module needs to allocate the static\n // table and memory regions. Later threads re-use the same table region\n // and can ignore the memory region (since memory is shared between\n // threads already).\n var needsAllocation = !handle || !HEAP8[(((handle)+(24))>>0)];\n if (needsAllocation) {\n // alignments are powers of 2\n var memAlign = Math.pow(2, metadata.memoryAlign);\n // finalize alignments and verify them\n memAlign = Math.max(memAlign, STACK_ALIGN); // we at least need stack alignment\n // prepare memory\n var memoryBase = metadata.memorySize ? alignMemory(getMemory(metadata.memorySize + memAlign), memAlign) : 0; // TODO: add to cleanups\n var tableBase = metadata.tableSize ? wasmTable.length : 0;\n if (handle) {\n HEAP8[(((handle)+(24))>>0)] = 1;\n HEAPU32[(((handle)+(28))>>2)] = memoryBase;\n HEAP32[(((handle)+(32))>>2)] = metadata.memorySize;\n HEAPU32[(((handle)+(36))>>2)] = tableBase;\n HEAP32[(((handle)+(40))>>2)] = metadata.tableSize;\n }\n } else {\n memoryBase = HEAPU32[(((handle)+(28))>>2)];\n tableBase = HEAPU32[(((handle)+(36))>>2)];\n }\n \n var tableGrowthNeeded = tableBase + metadata.tableSize - wasmTable.length;\n if (tableGrowthNeeded > 0) {\n wasmTable.grow(tableGrowthNeeded);\n }\n \n // This is the export map that we ultimately return. We declare it here\n // so it can be used within resolveSymbol. We resolve symbols against\n // this local symbol map in the case there they are not present on the\n // global Module object. We need this fallback because:\n // a) Modules sometime need to import their own symbols\n // b) Symbols from side modules are not always added to the global namespace.\n var moduleExports;\n \n function resolveSymbol(sym) {\n var resolved = resolveGlobalSymbol(sym, false);\n if (!resolved) {\n resolved = moduleExports[sym];\n }\n return resolved;\n }\n \n // TODO kill ↓↓↓ (except \"symbols local to this module\", it will likely be\n // not needed if we require that if A wants symbols from B it has to link\n // to B explicitly: similarly to -Wl,--no-undefined)\n //\n // wasm dynamic libraries are pure wasm, so they cannot assist in\n // their own loading. When side module A wants to import something\n // provided by a side module B that is loaded later, we need to\n // add a layer of indirection, but worse, we can't even tell what\n // to add the indirection for, without inspecting what A's imports\n // are. To do that here, we use a JS proxy (another option would\n // be to inspect the binary directly).\n var proxyHandler = {\n 'get': function(stubs, prop) {\n // symbols that should be local to this module\n switch (prop) {\n case '__memory_base':\n return memoryBase;\n case '__table_base':\n return tableBase;\n }\n if (prop in asmLibraryArg) {\n // No stub needed, symbol already exists in symbol table\n return asmLibraryArg[prop];\n }\n // Return a stub function that will resolve the symbol\n // when first called.\n if (!(prop in stubs)) {\n var resolved;\n stubs[prop] = function() {\n if (!resolved) resolved = resolveSymbol(prop);\n return resolved.apply(null, arguments);\n };\n }\n return stubs[prop];\n }\n };\n var proxy = new Proxy({}, proxyHandler);\n var info = {\n 'GOT.mem': new Proxy({}, GOTHandler),\n 'GOT.func': new Proxy({}, GOTHandler),\n 'env': proxy,\n wasi_snapshot_preview1: proxy,\n };\n \n function postInstantiation(instance) {\n // add new entries to functionsInTableMap\n updateTableMap(tableBase, metadata.tableSize);\n moduleExports = relocateExports(instance.exports, memoryBase);\n if (!flags.allowUndefined) {\n reportUndefinedSymbols();\n }\n \n // initialize the module\n var init = moduleExports['__wasm_call_ctors'];\n if (init) {\n if (runtimeInitialized) {\n init();\n } else {\n // we aren't ready to run compiled code yet\n __ATINIT__.push(init);\n }\n }\n return moduleExports;\n }\n \n if (flags.loadAsync) {\n if (binary instanceof WebAssembly.Module) {\n var instance = new WebAssembly.Instance(binary, info);\n return Promise.resolve(postInstantiation(instance));\n }\n return WebAssembly.instantiate(binary, info).then(function(result) {\n return postInstantiation(result.instance);\n });\n }\n \n var module = binary instanceof WebAssembly.Module ? binary : new WebAssembly.Module(binary);\n var instance = new WebAssembly.Instance(module, info);\n return postInstantiation(instance);\n }", "title": "" }, { "docid": "437c3fca5c3598f7261210343cf22539", "score": "0.6000217", "text": "function preloadRequire (module) {\n if (preloadModules.has(module)) {\n return preloadModules.get(module)\n }\n throw new Error('module not found')\n}", "title": "" }, { "docid": "782a33a09fac56a8224823a436fc6f77", "score": "0.5957949", "text": "use(moduleName, cb) {\n if (cb) {\n const moduleInfo = typeof moduleName === 'string' ? mparse.parseInfo(moduleName) : moduleName;\n if (!moduleInfo) {\n const message = Vue.prototype.$text('InvalidModuleName');\n throw new Error(`${message}: ${moduleName}`);\n }\n const relativeName = moduleInfo.relativeName;\n const module = this._get(relativeName);\n if (module) return cb(module);\n const moduleRepo = modulesRepo.modules[relativeName];\n if (!moduleRepo) {\n const message = Vue.prototype.$text('ModuleNotExists');\n throw new Error(`${message}: ${relativeName}`);\n }\n if (loadingQueue.push(relativeName, cb)) {\n try {\n if (moduleRepo.info.sync) {\n this._require(relativeName, module => loadingQueue.pop(relativeName, module));\n } else {\n this._import(relativeName)\n .then(module => loadingQueue.pop(relativeName, module))\n .catch(err => {\n loadingQueue.pop(relativeName, null, err);\n });\n }\n } catch (err) {\n loadingQueue.pop(relativeName, null, err);\n }\n }\n } else {\n return new Promise((resolve, reject) => {\n try {\n this.use(moduleName, (module, err) => {\n if (err) return reject(err);\n resolve(module);\n });\n } catch (err) {\n reject(err);\n }\n });\n }\n }", "title": "" }, { "docid": "9755fe36a616a32ff08c936e4a503a33", "score": "0.5955225", "text": "function loadModule(program) {\n const { args, T } = program;\n if (T) {\n const modulefn = path.isAbsolute(T) ? T : `${process.cwd()}/${T}`;\n process.chdir(path.dirname(modulefn));\n return { module: require(modulefn), custom: modulefn };\n }\n return { module: require('./default') };\n}", "title": "" }, { "docid": "63c70a5b1f67403620c844fa5a2eaf11", "score": "0.5943248", "text": "async function loadProfilerModule() {\n if (!loadedProfilerModule) {\n // Side-effect import resources in module.json\n await Root.Runtime.Runtime.instance().loadModulePromise('profiler');\n loadedProfilerModule = await import('../profiler/profiler.js');\n }\n return loadedProfilerModule;\n}", "title": "" }, { "docid": "63c70a5b1f67403620c844fa5a2eaf11", "score": "0.5943248", "text": "async function loadProfilerModule() {\n if (!loadedProfilerModule) {\n // Side-effect import resources in module.json\n await Root.Runtime.Runtime.instance().loadModulePromise('profiler');\n loadedProfilerModule = await import('../profiler/profiler.js');\n }\n return loadedProfilerModule;\n}", "title": "" }, { "docid": "83ff4a47cd6f2fcc1de0f4c1db599ae4", "score": "0.59428567", "text": "async loadWasmModule() {\n \n // use cache if suitable, core module supersedes keys module because it is superset\n if (WasmApp.WASM_MODULE) return WasmApp.WASM_MODULE;\n \n // load module\n WasmApp.WASM_MODULE = await require(\"../../../dist/wasm_app\")().ready;\n return WasmApp.WASM_MODULE;\n }", "title": "" }, { "docid": "5032e6a7c9a064a3e41e2af5b2005e6e", "score": "0.5938892", "text": "function load({\n fetchText,\n fetchStatus,\n fetchStatusText,\n fetchError,\n moduleToBlockList,\n } = {}) {\n jest.resetModules();\n\n global.fetch = jest.fn(() => (fetchError ? Promise.reject(fetchError) : Promise.resolve({\n status: fetchStatus || 200,\n statusText: fetchStatusText || 'OK',\n // no one should expect the Spanish Inquisition default\n text: () => Promise.resolve(fetchText || 'the Spanish Inquisition'),\n })));\n requireFromString = require('require-from-string'); // eslint-disable-line global-require\n requireFromString.mockClear();\n moduleRegistry = require('../src/moduleRegistry');\n if (moduleToBlockList) {\n moduleRegistry.addToModuleBlockList(moduleToBlockList);\n }\n return require('../src/loadModule.node.js').default; // eslint-disable-line global-require\n }", "title": "" }, { "docid": "a2fcdc03d653953066cad7acc8c0e5a8", "score": "0.5917014", "text": "testLoadWhenLoaded() {\n const mm = getModuleManager({'a': [], 'b': [], 'c': []});\n mm.setLoader(createSuccessfulNonBatchLoader(mm));\n\n let calledBack = false;\n let error = null;\n\n mm.preloadModule('b', 2);\n clock.tick(10);\n\n assertFalse('module \"b\" should be done loading', mm.isModuleLoading('b'));\n\n const d = mm.load('b');\n d.then(\n (ctx) => {\n calledBack = true;\n },\n (err) => {\n error = err;\n });\n\n clock.tick(1);\n assertTrue(calledBack);\n assertNull(error);\n }", "title": "" }, { "docid": "4f70333a18b95c8c0ef55637cc3c032b", "score": "0.5887236", "text": "function loadModule() {\r\n // alignments are powers of 2\r\n memoryAlign = Math.pow(2, memoryAlign);\r\n tableAlign = Math.pow(2, tableAlign);\r\n // finalize alignments and verify them\r\n memoryAlign = Math.max(memoryAlign, STACK_ALIGN); // we at least need stack alignment\r\n assert(tableAlign === 1, 'invalid tableAlign ' + tableAlign);\r\n // prepare memory\r\n var memoryBase = alignMemory(getMemory(memorySize + memoryAlign), memoryAlign); // TODO: add to cleanups\r\n // The static area consists of explicitly initialized data, followed by zero-initialized data.\r\n // The latter may need zeroing out if the MAIN_MODULE has already used this memory area before\r\n // dlopen'ing the SIDE_MODULE. Since we don't know the size of the explicitly initialized data\r\n // here, we just zero the whole thing, which is suboptimal, but should at least resolve bugs\r\n // from uninitialized memory.\r\n for (var i = memoryBase; i < memoryBase + memorySize; ++i) HEAP8[i] = 0;\r\n // prepare env imports\r\n var env = asmLibraryArg;\r\n // TODO: use only __memory_base and __table_base, need to update asm.js backend\r\n var table = wasmTable;\r\n var tableBase = table.length;\r\n var originalTable = table;\r\n table.grow(tableSize);\r\n assert(table === originalTable);\r\n // zero-initialize memory and table\r\n // TODO: in some cases we can tell it is already zero initialized\r\n for (var i = memoryBase; i < memoryBase + memorySize; i++) {\r\n HEAP8[i] = 0;\r\n }\r\n for (var i = tableBase; i < tableBase + tableSize; i++) {\r\n table.set(i, null);\r\n }\r\n\r\n // We resolve symbols against the global Module but failing that also\r\n // against the local symbols exported a side module. This is because\r\n // a) Module sometime need to import their own symbols\r\n // b) Symbols from loaded modules are not always added to the global Module.\r\n var moduleLocal = {};\r\n\r\n var resolveSymbol = function(sym, type, legalized) {\r\n if (legalized) {\r\n sym = 'orig$' + sym;\r\n }\r\n\r\n var resolved = Module[\"asm\"][sym];\r\n if (!resolved) {\r\n sym = '_' + sym;\r\n resolved = Module[sym];\r\n if (!resolved) {\r\n resolved = moduleLocal[sym];\r\n }\r\n assert(resolved, 'missing linked ' + type + ' `' + sym + '`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment');\r\n }\r\n return resolved;\r\n }\r\n\r\n // copy currently exported symbols so the new module can import them\r\n for (var x in Module) {\r\n if (!(x in env)) {\r\n env[x] = Module[x];\r\n }\r\n }\r\n\r\n // TODO kill ↓↓↓ (except \"symbols local to this module\", it will likely be\r\n // not needed if we require that if A wants symbols from B it has to link\r\n // to B explicitly: similarly to -Wl,--no-undefined)\r\n //\r\n // wasm dynamic libraries are pure wasm, so they cannot assist in\r\n // their own loading. When side module A wants to import something\r\n // provided by a side module B that is loaded later, we need to\r\n // add a layer of indirection, but worse, we can't even tell what\r\n // to add the indirection for, without inspecting what A's imports\r\n // are. To do that here, we use a JS proxy (another option would\r\n // be to inspect the binary directly).\r\n var proxyHandler = {\r\n 'get': function(obj, prop) {\r\n // symbols that should be local to this module\r\n switch (prop) {\r\n case '__memory_base':\r\n case 'gb':\r\n return memoryBase;\r\n case '__table_base':\r\n case 'fb':\r\n return tableBase;\r\n }\r\n\r\n if (prop in obj) {\r\n return obj[prop]; // already present\r\n }\r\n if (prop.startsWith('g$')) {\r\n // a global. the g$ function returns the global address.\r\n var name = prop.substr(2); // without g$ prefix\r\n return obj[prop] = function() {\r\n return resolveSymbol(name, 'global');\r\n };\r\n }\r\n if (prop.startsWith('fp$')) {\r\n // the fp$ function returns the address (table index) of the function\r\n var parts = prop.split('$');\r\n assert(parts.length == 3)\r\n var name = parts[1];\r\n var sig = parts[2];\r\n var legalized = sig.indexOf('j') >= 0; // check for i64s\r\n var fp = 0;\r\n return obj[prop] = function() {\r\n if (!fp) {\r\n var f = resolveSymbol(name, 'function', legalized);\r\n fp = addFunction(f, sig);\r\n }\r\n return fp;\r\n };\r\n }\r\n if (prop.startsWith('invoke_')) {\r\n // A missing invoke, i.e., an invoke for a function type\r\n // present in the dynamic library but not in the main JS,\r\n // and the dynamic library cannot provide JS for it. Use\r\n // the generic \"X\" invoke for it.\r\n return obj[prop] = invoke_X;\r\n }\r\n // otherwise this is regular function import - call it indirectly\r\n return obj[prop] = function() {\r\n return resolveSymbol(prop, 'function').apply(null, arguments);\r\n };\r\n }\r\n };\r\n var proxy = new Proxy(env, proxyHandler);\r\n var info = {\r\n global: {\r\n 'NaN': NaN,\r\n 'Infinity': Infinity,\r\n },\r\n 'global.Math': Math,\r\n env: proxy,\r\n wasi_snapshot_preview1: proxy,\r\n 'asm2wasm': asm2wasmImports\r\n };\r\n var oldTable = [];\r\n for (var i = 0; i < tableBase; i++) {\r\n oldTable.push(table.get(i));\r\n }\r\n\r\n function postInstantiation(instance, moduleLocal) {\r\n // the table should be unchanged\r\n assert(table === originalTable);\r\n assert(table === wasmTable);\r\n // the old part of the table should be unchanged\r\n for (var i = 0; i < tableBase; i++) {\r\n assert(table.get(i) === oldTable[i], 'old table entries must remain the same');\r\n }\r\n // verify that the new table region was filled in\r\n for (var i = 0; i < tableSize; i++) {\r\n assert(table.get(tableBase + i) !== undefined, 'table entry was not filled in');\r\n }\r\n var exports = relocateExports(instance.exports, memoryBase, tableBase, moduleLocal);\r\n // initialize the module\r\n var init = exports['__post_instantiate'];\r\n if (init) {\r\n if (runtimeInitialized) {\r\n init();\r\n } else {\r\n // we aren't ready to run compiled code yet\r\n __ATINIT__.push(init);\r\n }\r\n }\r\n return exports;\r\n }\r\n\r\n if (flags.loadAsync) {\r\n return WebAssembly.instantiate(binary, info).then(function(result) {\r\n return postInstantiation(result.instance, moduleLocal);\r\n });\r\n } else {\r\n var instance = new WebAssembly.Instance(new WebAssembly.Module(binary), info);\r\n return postInstantiation(instance, moduleLocal);\r\n }\r\n }", "title": "" }, { "docid": "561fa7ba33ada9b892f55693ab4be190", "score": "0.5880594", "text": "function load_dep( module ){\n\t\t\t// lets load a module\n\t\t\treturn ONE.Signal.wrap(function(sig){\n\t\t\t\tvar url = module + '.n'\n\t\t\t\tvar data_sig = loader[module]\n\t\t\t\tvar first = false\n\t\t\t\tif(!data_sig){\n\t\t\t\t\tfirst = true\n\t\t\t\t\tdata_sig = loader[module] = module_get(url, module)\n\t\t\t\t}\n\t\t\t\t// otherwise we only resolve sig\n\t\t\t\tdata_sig.then(function(value){\n\t\t\t\t\t// okay lets scan for our dependencies\n\t\t\t\t\tvar all = []\n\t\t\t\t\tvalue.replace(/import\\s+(\\w+)/g, function(m, mod){\n\t\t\t\t\t\tall.push(load_dep(mod))\n\t\t\t\t\t})\n\t\t\t\t\tONE.Signal.all(all).then(function(){\n\t\t\t\t\t\tif(first) worker.postMessage({_id:'eval', module:module})\n\t\t\t\t\t\telse first = false\n\t\t\t\t\t\tsig.end()\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(err){\n\t\t\t\t\t\tsig.throw(err)\n\t\t\t\t\t})\n\t\t\t\t}, \n\t\t\t\tfunction(err){\n\t\t\t\t\tsig.throw(err)\t\n\t\t\t\t})\n\t\t\t})\n\t\t}", "title": "" }, { "docid": "9bb3c37c71353dedaffc134a5e7a3a58", "score": "0.5840423", "text": "async function loadModule(path, wrappedImports) {\n let contents = await fetch(path);\n let bytes = await contents.arrayBuffer();\n let wasm = await WebAssembly.instantiate(bytes, wrappedImports);\n return wasm.instance.exports;\n }", "title": "" }, { "docid": "c7629320cfd13dd72b1b73024cfe1855", "score": "0.5829769", "text": "function moduleLoadShim (fileName) {\n const result = ModuleLoadOriginal.call(this, fileName)\n\n Logger.debug(`processing ${this.id}`)\n try {\n functions.addFromModuleExports(this, this.exports)\n } catch (err) {\n Logger.log(`error processing module: ${this.id}:`, err)\n }\n\n return result\n}", "title": "" }, { "docid": "e6e7b7721bef6d3b091ea675808d15bb", "score": "0.5814611", "text": "function loadModule(modName) {\n if (!odsaUtils.hasBook()) return;\n\n modName = (modName) ? modName : moduleName;\n\n if (odsaUtils.scoringServerEnabled()) {\n if (odsaUtils.isFullModule()) {\n url = \"/odsa_exercise_progresses?inst_chapter_module_id=\"\n + odsaUtils.getChapterModuleID()\n + \"&inst_book_id=\" + odsaUtils.getBookID();\n } else if (odsaUtils.isStandaloneModule()) {\n url = \"/odsa_exercise_progresses?inst_module_version_id=\"\n + odsaUtils.getInstModuleVersionID();\n } else {\n url = \"/odsa_exercise_progresses/\"\n + odsaUtils.getBookID() + \"/\" + odsaUtils.getSectionID();\n }\n\n jQuery.ajax({\n url: url,\n type: \"GET\",\n contentType: \"application/json; charset=utf-8\",\n datatype: \"json\",\n xhrFields: {\n withCredentials: true\n },\n success: function (data) {\n // Loop through all the exercises listed in the server's response\n // and update the user's status for each exercise\n proficientExercises = data['proficient_exercises']\n for (var id in proficientExercises) {\n proficientExerName = proficientExercises[id]\n // Update the user's status for the exercises\n if (exercises[proficientExerName]) { // Exercise proficiency\n updateProfDisplay(proficientExerName, true);\n }\n }\n },\n error: function (data) {\n data = odsaUtils.getJSON(data);\n console.debug(JSON.stringify(data));\n console.groupEnd();\n }\n });\n }\n }", "title": "" }, { "docid": "dc4ed3420c209a6fd7d152ffd7a5e745", "score": "0.5809273", "text": "function loadModule($module) {\n $module.appendTo(elem);\n elem.wrap(container);\n /* jshint indent:false */\n $compile(elem.contents())(newScope);\n elem.removeClass(\"ng-cloak\");\n }", "title": "" }, { "docid": "537c83d6d0bc0562fd0abc903d00f4f2", "score": "0.57726324", "text": "importModule(name) { todo(\"importModule\") }", "title": "" }, { "docid": "b00181c643ef4e34d752e76e405aa42c", "score": "0.57668453", "text": "function load() {}", "title": "" }, { "docid": "320c7864898e00f4c2ebcd85fb580ef5", "score": "0.57435054", "text": "async function load_modules() {\n\t// CANBUS/DBUS/KBUS/IBUS modules\n\t[\n\t\t'ABG', 'ASC', 'BMBT', 'CCM', 'CDC', 'DIA', 'DSP', 'DSPC', 'DME', 'GT',\n\t\t'IHKA', 'LCM', 'MFL', 'MID', 'NAV', 'PDC', 'RAD', 'RDC', 'RLS',\n\t\t'TEL', 'VID', 'CON', 'DSC', 'FEM', 'KOMBI', 'NBT', 'SZM',\n\t].reduce((obj, id) => {\n\t\tobj[id] = require(`${id}`); return obj;\n\t}, global);\n\n\t// Class/event-based modules\n\t[ 'GM', 'CAS', 'EGS', 'EWS', 'IKE' ].reduce((obj, id) => {\n\t\tobj[id] = new (require(`${id}`))();\n\t\treturn obj;\n\t}, global);\n\n\t// Other libraries\n\t[ 'bluetooth', 'hdmi-cec', 'hdmi-rpi', 'kodi', 'bus' ].reduce((obj, id) => {\n\t\tconst varName = id.replace('-', '_');\n\t\tobj[varName] = require(`${id}`); return obj;\n\t}, global);\n\n\tlog.msg('Loaded modules');\n} // async load_modules()", "title": "" }, { "docid": "398ddd36e56cbf21a06b6e3794bafa00", "score": "0.5718352", "text": "function requireModule(modulePath) {\n // This purpose of this wrapper is merely to make it easy to mock user\n // modules in tests\n return require(modulePath);\n} // Better than fs.exists because it works for module paths without an extension", "title": "" }, { "docid": "b3779efd6c9f57a47b28421e151797b2", "score": "0.5713353", "text": "function moduleLoaded(libModule) {\n if (dso.global) {\n mergeLibSymbols(libModule, lib);\n }\n dso.module = libModule;\n }", "title": "" }, { "docid": "d0447fb445bc45987263ce915b0de3fa", "score": "0.5712327", "text": "function Loader()\n{\n var _self = this;\n var deferred = {};\n var baseUrl = 'js/';\n var defined = {};\n\n var loaded = {\n amd: this\n };\n\n /**\n * Load a script URL\n *\n * @param {String} name\n * @return {Promise}\n */\n function loadScript(name)\n {\n var url = baseUrl + name + '.js';\n var head = document.getElementsByTagName(\"head\")[0] || document.documentElement;\n\n // Handle Script loading\n var done = false;\n\n return new Promise(function(resolve, reject) {\n var script = document.createElement(\"script\");\n\n script.type = 'text/javascript';\n script.async = true;\n\n /**\n * Handle on load event\n */\n function onScriptLoad(event) {\n if (done || (this.readyState && (this.readyState !== \"loaded\") && (this.readyState !== \"complete\"))) {\n return;\n }\n\n console.debug('Script \"' + name + '\" loaded');\n done = true;\n resolve(script);\n\n // Handle memory leak in IE\n script.onload = script.onreadystatechange = null;\n if (head && script.parentNode ) {\n head.removeChild(script);\n }\n };\n\n /**\n * Handle loading script errors\n */\n function onError(e) {\n reject(new URIError('Failed to load script: ' + e.target.src));\n };\n\n script.addEventListener('load', onScriptLoad);\n script.addEventListener('error', onError);\n\n script.src = url;\n head.appendChild(script);\n });\n }\n\n /**\n * Resolve the module and its dependencies\n */\n function resolveModule(factory, deps)\n {\n if (!deps) {\n return factory();\n }\n\n return loadAll(deps).then(function(resolvedDeps) {\n loaded[name] = factory.apply(global, resolvedDeps);\n return loaded[name];\n });\n }\n\n /**\n * Load a module\n *\n * @param {String} name\n * @returns {Promise}\n */\n function load(name)\n {\n if (loaded[name]) {\n return Promise.resolve(loaded[name]);\n }\n\n if (deferred[name]) {\n return deferred[name].promise;\n }\n\n var defer = {};\n deferred[name] = defer;\n\n defer.promise = loadScript(name).then(function() {\n if (!defined[name]) {\n return Promise.reject(new Error('Failed to load \"' + name + '\": Missing define() for module'));\n }\n\n return resolveModule(defined[name].factory, defined[name].deps);\n });\n\n return defer.promise;\n }\n\n /**\n * Load all given modules async\n *\n * @private\n * @param {Array} modules\n * @returns {Promise}\n */\n function loadAll(modules)\n {\n var promises = [];\n\n for (var i = 0; i < modules.length; i++) {\n promises.push(load(modules[i]));\n }\n\n return Promise.all(promises);\n }\n\n /**\n * @param {String} url\n */\n this.setBaseUrl = function(url)\n {\n if (!url.match(/\\/$/)) {\n url += '/';\n }\n\n baseUrl = url;\n return this;\n }\n\n /**\n * Set a resolved dependency\n *\n * @param {String} name\n * @param {Object} module\n */\n this.set = function(name, module)\n {\n loaded[name] = module;\n };\n\n /**\n * Define a module\n */\n this.define = function(name, dependencies, factory)\n {\n if (!factory) {\n factory = dependencies;\n dependencies = [];\n }\n\n defined[name] = {\n factory: factory\n };\n\n if (dependencies && dependencies.length) {\n defined[name].deps = dependencies;\n }\n };\n\n /**\n * Require dependencies\n */\n this.require = function(dependencies, factory)\n {\n if (!dependencies.length) {\n return factory();\n }\n\n var promise = loadAll(dependencies);\n\n promise.then(function(deps) {\n factory.apply(global, deps);\n })['catch'](function(rejection) {\n throw new LoaderError(rejection);\n });\n };\n\n /**\n * Reads all dependencies from the document\n */\n this.getUiDepsFromDocument = function()\n {\n var root = document.getElementById('nexus.ui');\n var attr = root? root.getAttribute('data-modules') : null;\n var deps = [];\n\n try {\n deps = attr? JSON.parse(attr) : [];\n } catch (e) {\n console.error(e);\n }\n\n if (!deps instanceof Array) {\n console.warn('nexus.ui.amd.Loader::getUiDepsFromDocument(): Bad dependencies type');\n deps = [];\n }\n\n return deps;\n };\n}", "title": "" }, { "docid": "e92d4a4102426d5d95d4f18b57c7f812", "score": "0.57065797", "text": "loadLib() {\n this.reloading = true;\n\n const Handler = this.scriptManager.getModule('Handler');\n\n if (!Handler) {\n this.logger.error('lib/Handler.js is missing or did not load successfully.');\n process.exit(1);\n }\n\n this.handler = new Handler(this, this.objectStore);\n \n this.reloading = false;\n }", "title": "" }, { "docid": "0fb3c2c106afe71880c2db66a099b0fd", "score": "0.567965", "text": "function moduleLoaded(libModule) {\r\n if (dso.global) {\r\n mergeLibSymbols(libModule);\r\n }\r\n dso.module = libModule;\r\n }", "title": "" }, { "docid": "bbc3f7e06eacc798dc45e8276c543b87", "score": "0.5658283", "text": "function execModule(sModuleName) {\n\n\t\t\tvar oModule = mModules[sModuleName],\n\t\t\t\toShim = mAMDShim[sModuleName],\n\t\t\t\tsOldPrefix, sScript, vAMD;\n\n\t\t\tif ( oModule && oModule.state === LOADED && typeof oModule.data !== \"undefined\" ) {\n\n\t\t\t\t// check whether the module is known to use an existing AMD loader, remember the AMD flag\n\t\t\t\tvAMD = (oShim === true || (oShim && oShim.amd)) && typeof window.define === \"function\" && window.define.amd;\n\n\t\t\t\ttry {\n\n\t\t\t\t\tif ( vAMD ) {\n\t\t\t\t\t\t// temp. remove the AMD Flag from the loader\n\t\t\t\t\t\tdelete window.define.amd;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( log.isLoggable() ) {\n\t\t\t\t\t\tlog.debug(sLogPrefix + \"executing '\" + sModuleName + \"'\");\n\t\t\t\t\t\tsOldPrefix = sLogPrefix;\n\t\t\t\t\t\tsLogPrefix = sLogPrefix + \": \";\n\t\t\t\t\t}\n\n\t\t\t\t\t// execute the script in the window context\n\t\t\t\t\toModule.state = EXECUTING;\n\t\t\t\t\t_execStack.push(sModuleName);\n\t\t\t\t\tif ( typeof oModule.data === \"function\" ) {\n\t\t\t\t\t\toModule.data.call(window);\n\t\t\t\t\t} else if ( jQuery.isArray(oModule.data) ) {\n\t\t\t\t\t\tsap.ui.define.apply(sap.ui, oModule.data);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tsScript = oModule.data;\n\n\t\t\t\t\t\t// sourceURL: Firebug, Chrome, Safari and IE11 debugging help, appending the string seems to cost ZERO performance\n\t\t\t\t\t\t// Note: IE11 supports sourceURL even when running in IE9 or IE10 mode\n\t\t\t\t\t\t// Note: make URL absolute so Chrome displays the file tree correctly\n\t\t\t\t\t\t// Note: do not append if there is already a sourceURL / sourceMappingURL\n\t\t\t\t\t\tif (sScript && !sScript.match(/\\/\\/[#@] source(Mapping)?URL=.*$/)) {\n\t\t\t\t\t\t\tsScript += \"\\n//# sourceURL=\" + URI(oModule.url).absoluteTo(sDocumentLocation);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// framework internal hook to intercept the loaded script and modify\n\t\t\t\t\t\t// it before executing the script - e.g. useful for client side coverage\n\t\t\t\t\t\tif (typeof jQuery.sap.require._hook === \"function\") {\n\t\t\t\t\t\t\tsScript = jQuery.sap.require._hook(sScript, sModuleName);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (_window.execScript && (!oModule.data || oModule.data.length < MAX_EXEC_SCRIPT_LENGTH) ) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\toModule.data && _window.execScript(sScript); // execScript fails if data is empty\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t_execStack.pop();\n\t\t\t\t\t\t\t\t// eval again with different approach - should fail with a more informative exception\n\t\t\t\t\t\t\t\tjQuery.sap.globalEval(oModule.data);\n\t\t\t\t\t\t\t\tthrow e; // rethrow err in case globalEval succeeded unexpectedly\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_window.eval(sScript);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t_execStack.pop();\n\t\t\t\t\toModule.state = READY;\n\t\t\t\t\toModule.data = undefined;\n\t\t\t\t\t// best guess for raw and legacy modules that don't use sap.ui.define\n\t\t\t\t\toModule.content = oModule.content || jQuery.sap.getObject((oShim && oShim.exports) || urnToUI5(sModuleName));\n\n\t\t\t\t\tif ( log.isLoggable() ) {\n\t\t\t\t\t\tsLogPrefix = sOldPrefix;\n\t\t\t\t\t\tlog.debug(sLogPrefix + \"finished executing '\" + sModuleName + \"'\");\n\t\t\t\t\t}\n\n\t\t\t\t} catch (err) {\n\t\t\t\t\toModule.state = FAILED;\n\t\t\t\t\toModule.error = ((err.toString && err.toString()) || err.message) + (err.line ? \"(line \" + err.line + \")\" : \"\" );\n\t\t\t\t\toModule.data = undefined;\n\t\t\t\t\tif ( window[\"sap-ui-debug\"] && (/sap-ui-xx-show(L|-l)oad(E|-e)rrors=(true|x|X)/.test(location.search) || oCfgData[\"xx-showloaderrors\"]) ) {\n\t\t\t\t\t\tlog.error(\"error while evaluating \" + sModuleName + \", embedding again via script tag to enforce a stack trace (see below)\");\n\t\t\t\t\t\tjQuery.sap.includeScript(oModule.url);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t} finally {\n\n\t\t\t\t\t// restore AMD flag\n\t\t\t\t\tif ( vAMD ) {\n\t\t\t\t\t\twindow.define.amd = vAMD;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "79f0291f1b1ab0a9ce2ebe8ebcc0d9d5", "score": "0.5644463", "text": "loadModules (moduleNames, options) {\n return esriLoader.loadModules(moduleNames, options);\n }", "title": "" }, { "docid": "7f9f2d975606cd0b39fb91b23a41dca0", "score": "0.56182224", "text": "function CustomModuleLoader() {\n HasteModuleLoader.apply(this, arguments); // super\n }", "title": "" }, { "docid": "25cbf6909782bc87598fef82fda03ddd", "score": "0.5601976", "text": "function load_module_dir(module, dir, bmf, that) {\n // that is the object that has keys representing the file, and value representing the path\n let path = dir + \"/\" + bmf;\n if (fs.isDirSync(path)) {\n let files = fs.readdirSync(path);\n for (let i = 0; i < files.length; i++) {\n if (files[i].split(\".\").pop() === \"js\") {\n let file = files[i];\n if (!that[file]) that[file] = path + \"/\" + files[i];\n }\n }\n }\n}", "title": "" }, { "docid": "80f25844dcb41ca583ed856d2cb0f1b8", "score": "0.5592542", "text": "function loadModule(modName) {\n modName = (modName) ? modName : moduleName;\n\n if (debugMode) {\n console.group('loadModule(' + modName + ')');\n }\n\n // Trigger loading the gradebook\n if (modName === \"Gradebook\") {\n $(\"body\").trigger(\"gradebook-load\");\n }\n\n var exerName;\n\n if (serverEnabled() && userLoggedIn()) {\n // Sends all the data necessary to load a module to the server\n // All modules must be loaded this way to ensure event data will be logged successfully\n\n if (modName === 'index') {\n // Query the server for user proficiency data, update local storage and proficiency indicators\n syncProficiency();\n }\n\n if (debugMode) {\n console.debug('Querying server for module data');\n }\n\n var username = getUsername(),\n modData = {},\n exerData = {},\n exerList = [];\n\n // Package exercises into a list so it can be stringified\n for (exerName in exercises) {\n if (exercises.hasOwnProperty(exerName)) {\n // Update proficiency displays based on localStorage to make the page\n // more responsive (don't have to wait until the server responds to see your proficiency)\n updateProfDisplay(exerName);\n\n // Make a deep copy of the 'exercises' object, so we can add the\n // exercise name and remove uiid without affecting 'exercises'\n exerData = $.extend(true, {}, exercises[exerName]);\n exerData.exercise = exerName;\n delete exerData.uiid;\n exerList.push(exerData);\n }\n }\n\n // Package the module data\n modData.key = getSessionKey();\n modData.book = bookName;\n // Calculate the URL of the book, relative to the current module page\n modData.url = location.href.substring(0, location.href.lastIndexOf('/') + 1);\n modData.module = modName;\n // Hack to parse the long form module name from the module page title\n // TODO: Create a more reliable way to get this information\n if (modName === 'index') {\n modData.name = 'Contents';\n } else {\n modData.name = document.title.slice(document.title.indexOf(' ') + 1, document.title.indexOf('\\u2014') - 1);\n }\n modData.exercises = JSON.stringify(exerList);\n\n if (debugMode) {\n console.debug('Sending modData:');\n console.debug(JSON.stringify(modData));\n }\n\n jQuery.ajax({\n url: serverURL + \"/api/v1/module/loadmodule/\",\n type: \"POST\",\n data: modData,\n contentType: \"application/json; charset=utf-8\",\n datatype: \"json\",\n xhrFields: {withCredentials: true},\n success: function (data) {\n data = getJSON(data);\n\n if (debugMode) {\n console.group('Server response, loadModule(' + modName + ', ' + username + ')');\n console.debug(JSON.stringify(data));\n }\n\n // Loop through all the exercises listed in the server's response and update the user's status for each exercise\n for (var exerName in data) {\n if (data.hasOwnProperty(exerName)) {\n // Update the user's status for the exercise\n // Since the server is the ultimate authority for logged in users,\n // if the user's proficiency comes back as false, it will remove\n // their local proficiency to keep the client in sync with the server\n if (exercises[exerName]) { // Exercise proficiency\n storeProficiencyStatus(exerName, (data[exerName].proficient) ? Status.STORED : false, username);\n updateProfDisplay(exerName);\n\n // Store the user's progress for Khan Academy exercises\n if (exercises[exerName].type === 'ka' && data[exerName].progress) {\n exercises[exerName].progress = data[exerName].progress;\n\n // Load any existing data\n exerData = getJSON(localStorage.khan_exercise);\n exerData[exerName] = exercises[exerName].progress;\n localStorage.khan_exercise = JSON.stringify(exerData);\n\n /*\n // TODO: get the correct function to trigger\n // Trigger progress bar update on KA exercise page, if its loaded\n if ($('#' + exerName + '_iframe')) {\n document.getElementById(exerName + '_iframe').contentWindow.updateProgressBar();\n }\n */\n }\n } else { // Module proficiency\n storeProficiencyStatus(exerName, (data[exerName]) ? Status.STORED : false, username);\n updateProfDisplay(exerName);\n }\n }\n }\n\n if (debugMode) {\n console.groupEnd();\n }\n },\n error: function (data) {\n data = getJSON(data);\n console.group(\"Error loading module: \" + modName);\n console.debug(JSON.stringify(data));\n console.groupEnd();\n\n if (data.status === 401) {\n handleExpiredSession(modData.key);\n }\n }\n });\n } else if (modName === 'index') {\n // Get every module page link on the index page and determine if the user is proficient\n $('li.toctree-l1 > a.reference.internal').each(function (index, item) {\n if ($(item).attr('href').endsWith('.html')) {\n modName = getNameFromURL($(item).attr('href'));\n\n if (dispModComp) {\n // Update the proficiency indicators based on what is currently in local storage\n updateProfDisplay(modName);\n }\n }\n });\n } else { // Load guest data from localStorage\n if (debugMode) {\n console.debug('Load guest data from localStorage');\n }\n\n // Update exercise proficiency displays to reflect the proficiency of the current user\n for (exerName in exercises) {\n if (exercises.hasOwnProperty(exerName)) {\n updateProfDisplay(exerName);\n\n // Update Khan Academy exercise progress bar\n /*\n if (exercises[exerName].type === 'ka') {\n\n }\n */\n }\n }\n\n // Check for module proficiency\n checkProficiency(moduleName);\n }\n\n if (debugMode) {\n console.groupEnd();\n }\n}", "title": "" }, { "docid": "a6aa70a5a60394fdba80dd78d53ed367", "score": "0.5562585", "text": "function onLoad(fn) {\n\tvar load = Module.prototype.load;\n\n\tModule.prototype.load = function(path) {\n\t\tfn(path);\n\t\treturn load.apply(this, arguments);\n\t};\n}", "title": "" }, { "docid": "820569740e720a142ccac2375da7b53a", "score": "0.5558989", "text": "run() {\n // The node types for Module are not 100% accurate\n const sandbox = new Module(this.file, this.parent);\n this.originalRequire = sandbox.require;\n this.box = sandbox;\n sandbox.require = this.require.bind(this);\n // Typescript thinks load does not exists on a Module\n sandbox.load(sandbox.id);\n this.exports = sandbox.exports;\n }", "title": "" }, { "docid": "d5e96d5b6e236073d59561ab91d406b3", "score": "0.55448323", "text": "static loadWasm(moduleName, config, callback) {\n const loadUrl = (Impl.wasmSupported() && config.glueUrl && config.wasmUrl) ? config.glueUrl : config.fallbackUrl;\n if (loadUrl) {\n Impl.loadScript(loadUrl, (err) => {\n if (err) {\n callback(err, null);\n } else {\n const module = window[moduleName];\n\n // clear the module from the global window since we used to store global instance here\n window[moduleName] = undefined;\n\n // instantiate the module\n module({\n locateFile: () => config.wasmUrl,\n onAbort: () => {\n callback('wasm module aborted.');\n }\n }).then((instance) => {\n callback(null, instance);\n });\n }\n });\n } else {\n callback('No supported wasm modules found.', null);\n }\n }", "title": "" }, { "docid": "17659434a3b03e3b0815def4adbed252", "score": "0.55409014", "text": "function require(moduleName) {\n\t\tvar module = modules[moduleName];\n\t\tif (typeof module === \"function\") {\n\t\t\tmodule = module();\n\t\t\tmodules[moduleName] = module;\n\t\t}\n\t\treturn module;\n\t}", "title": "" }, { "docid": "6ffd832dc31d07d91b2f4f982fb8b037", "score": "0.5531741", "text": "function loadModules() {\n common.dirExists(pathHelper.join(resourcesPath, common.MODULES_DIR_NAME), (er, find) => {\n const dirModules = dirResources.modules;\n dirModules.isExist = find;\n if (find) {\n try {\n const files = fs.readdirSync(pathHelper.join(resourcesPath, common.MODULES_DIR_NAME));\n files.forEach((file) => {\n if (common.isIgnoreFile(file)) {\n return;\n }\n dirModules[file.toLocaleLowerCase()] = file;\n })\n } catch (ex) {\n // Do nothing\n }\n }\n\n self.resume(null);\n });\n }", "title": "" }, { "docid": "bd25f3b2482677fbfb597c63965656aa", "score": "0.552168", "text": "function importModules(){\n var mods = chrome.runtime.getURL(\"modules.js\");\n import(mods).then(celebrate).catch((e) => console.log(\"Oh no! Import failed!\"));\n}", "title": "" }, { "docid": "d2c71f11e0035e8f8ae217f97f601170", "score": "0.5519852", "text": "function load(deps, factory) {\n if (!isArray(deps)) {\n if (typeof(deps) == 'function') {\n factory = deps;\n deps = [];\n } else {\n var argc = arguments.length;\n deps = Array.prototype.slice.call(arguments, 0, argc-1);\n factory = arguments[argc-1];\n }\n }\n \n log(\"ModuleJS: \"+self['id']+\": `module.load(\"+deps+\")` being called\");\n self._loadCalled = true;\n\n var _modules = [];\n for (var i=0, l=deps.length; i<l; i++) {\n var m = getModule(absolutize(parsed, deps[i]));\n if (!m['loaded']) {\n m['addListener'](function() {\n checkDeps(_modules, factory);\n });\n }\n _modules.push(m);\n }\n checkDeps(_modules, factory);\n return _modules;\n }", "title": "" }, { "docid": "eaccf5a71bedf776847969baa54362d9", "score": "0.54788643", "text": "function loadComponent(scope, module) {\n return async () => {\n // Initializes the share scope. This fills it with known provided modules from this build and all remotes\n await __webpack_init_sharing__(\"default\");\n const container = window[scope]; // or get the container somewhere else\n console.log('container', container);\n // Initialize the container, it may provide shared modules\n await container.init(__webpack_share_scopes__.default);\n const factory = await window[scope].get(module);\n const Module = factory();\n return Module;\n };\n}", "title": "" }, { "docid": "d2d10fc59a2646f6ad1c3a1685a3d6ff", "score": "0.54736817", "text": "loadModuleStore(context) {\n // load module store\n if (typeof this.loadStore === 'function') {\n this.moduleStore = this.loadStore(context)\n this.createModuleStore(context)\n }\n }", "title": "" }, { "docid": "36733012165add4668a56e11a1b9650f", "score": "0.5464983", "text": "function internalRequire (moduleId) {\n // use cached module.exports if module is already instantiated\n if (moduleCache.has(moduleId)) {\n const moduleExports = moduleCache.get(moduleId).exports\n return moduleExports\n }\n\n // load and validate module metadata\n // if module metadata is missing, throw an error\n const moduleData = loadModuleData(moduleId)\n if (!moduleData) {\n const err = new Error('Cannot find module \\'' + moduleId + '\\'')\n err.code = 'MODULE_NOT_FOUND'\n throw err\n }\n if (moduleData.id === undefined) {\n throw new Error('LavaMoat - moduleId is not defined correctly.')\n }\n\n // parse and validate module data\n const { package: packageName, source: moduleSource } = moduleData\n if (!packageName) throw new Error(`LavaMoat - invalid packageName for module \"${moduleId}\"`)\n const packagePolicy = getPolicyForPackage(lavamoatConfig, packageName)\n\n // create the moduleObj and initializer\n const { moduleInitializer, moduleObj } = prepareModuleInitializer(moduleData, packagePolicy)\n\n // cache moduleObj here\n // this is important to inf loops when hitting cycles in the dep graph\n // must cache before running the moduleInitializer\n moduleCache.set(moduleId, moduleObj)\n\n // validate moduleInitializer\n if (typeof moduleInitializer !== 'function') {\n throw new Error(`LavaMoat - moduleInitializer is not defined correctly. got \"${typeof moduleInitializer}\"\\n${moduleSource}`)\n }\n\n // initialize the module with the correct context\n const initializerArgs = prepareModuleInitializerArgs(requireRelativeWithContext, moduleObj, moduleData)\n moduleInitializer.apply(moduleObj.exports, initializerArgs)\n const moduleExports = moduleObj.exports\n\n return moduleExports\n\n // this is passed to the module initializer\n // it adds the context of the parent module\n // this could be replaced via \"Function.prototype.bind\" if its more performant\n function requireRelativeWithContext (requestedName) {\n const parentModuleExports = moduleObj.exports\n const parentModuleData = moduleData\n const parentPackagePolicy = packagePolicy\n const parentModuleId = moduleId\n return requireRelative({ requestedName, parentModuleExports, parentModuleData, parentPackagePolicy, parentModuleId })\n }\n }", "title": "" }, { "docid": "2d156e01e808dad5e77f9bee65bd57b3", "score": "0.5453128", "text": "function setLoaded() {\n if (moduleManager) {\n moduleManager.setLoaded();\n }\n}", "title": "" }, { "docid": "1e33cf06f3ffa5ed18942de995773d9a", "score": "0.54509044", "text": "function load_modules()\n {\n var processed_modules = 0;\n var total_modules = Module.count();\n\n // For each module\n Module.iterate_in_priority_order(function(module) {\n // Load it only if it is enabled\n if (module.is_enabled()) {\n\n // If the module has a 'load' method, call it and provide\n // 'module' as the context to be able to reach its private\n // members and methods via 'this'\n if (typeof module.actions.load !== 'undefined') {\n module.actions.load.call(module);\n }\n }\n emit_all_modules_loaded_event_if_needed((processed_modules += 1), total_modules);\n });\n }", "title": "" }, { "docid": "14e2078591949a445ef69e631858492c", "score": "0.5436124", "text": "function initModule(section){\n // console.log(section);\n // console.log(modules);\n modules[section].init();\n }", "title": "" }, { "docid": "f42116dad51a9bdef10c3f204601c635", "score": "0.5425896", "text": "function Module(absolutePath) {\n log(\"ModuleJS: \"+absolutePath+\": Creating Module\");\n\n var self = this;\n Sandbox.call(self, true);\n self.loadListeners = [];\n self['loaded'] = false;\n\n createModule.call(self, absolutePath);\n self['module']['main'] = window['module'];\n\n var moduleGlobal = self['global'];\n moduleGlobal['module'] = self['module'];\n moduleGlobal['exports'] = self['exports'];\n moduleGlobal['console'] = {\n 'log': log\n }\n\n // HACK: Firefox (probably others) seem to need us to wait\n // a few ms before adding the <script> to the <iframe>\n setTimeout(function() {\n // load the remote script, invoke '_onLoad' when it finishes\n self['load'](absolutePath, function(err) {\n self._onLoad(err);\n });\n }, 50);\n }", "title": "" }, { "docid": "5b3015d32d9a5bbfa04f7619983c4c7b", "score": "0.5424233", "text": "function require(arg) {\n var split = arg.split('/');\n var resultModule = split.length == 1 ? less.modules[split[0]] : less[split[1]];\n if (!resultModule) {\n throw { message: \"Cannot find module '\" + arg + \"'\"};\n }\n return resultModule;\n}", "title": "" }, { "docid": "ca72344c8ee9af3801904d94875f7ecf", "score": "0.54215175", "text": "function load(config) {\n _.each(config, function(options, module) {\n try {\n var module_path = options.path || module;\n if (module_path[0] === '.') {\n module_path = path.resolve(process.cwd(), module_path);\n }\n var init = require(module_path);\n var adapter = init(options);\n logger.info('loaded', adapter.name);\n register(adapter.name, adapter);\n } catch (err) {\n logger.error('error loading adapter ' + module + ': ' + err.message);\n throw err;\n }\n });\n}", "title": "" }, { "docid": "96b0eae799b02e66ceb6f5859c2d9d01", "score": "0.5408358", "text": "function load(name, req, onload, config) {\n\n var modules = name.split(',').map(function(mod) {\n return mod.trim();\n });\n\n var actualPaths = modules.map(function(key) {\n if (!lodashMap.hasOwnProperty(key)) throw new Error('module ' + key + ' is not part of lodash, according to the map. You can add this to the loader override object in the config if you want.');\n return lodashPackageName + '/' + lodashMap[key];\n });\n\n //>>excludeStart('build', true)\n //Only load optimzed if not disabled and if not after build, or during optimization\n if (devOptimizedLoad && !config.isBuild) {\n req([lodashPackageName], function(_) {\n onload(_.pick(_, modules)); //use lodash itself to select only the functions we want\n }, onload.error);\n return;\n }\n //>>excludeEnd('build')\n\n req(actualPaths, function() {\n var loadedModules = [].slice.call(arguments);\n var customLodash = loadedModules.reduce(function(custom, module, index) {\n custom[modules[index]] = module;\n return custom;\n }, {});\n\n onload(customLodash);\n }, onload.error);\n }", "title": "" }, { "docid": "8893e201180cf92b4fc9f1dc06623b64", "score": "0.5405477", "text": "function loadModuleFromNodeModulesOneLevel(extensions,moduleName,directory,failedLookupLocations,state,typesOnly){if(typesOnly===void 0){typesOnly=false;}var nodeModulesFolder=ts.combinePaths(directory,\"node_modules\");var nodeModulesFolderExists=directoryProbablyExists(nodeModulesFolder,state.host);if(!nodeModulesFolderExists&&state.traceEnabled){trace(state.host,ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,nodeModulesFolder);}var packageResult=typesOnly?undefined:loadModuleFromNodeModulesFolder(extensions,moduleName,nodeModulesFolder,nodeModulesFolderExists,failedLookupLocations,state);if(packageResult){return packageResult;}if(extensions!==Extensions.JavaScript){var nodeModulesAtTypes_1=ts.combinePaths(nodeModulesFolder,\"@types\");var nodeModulesAtTypesExists=nodeModulesFolderExists;if(nodeModulesFolderExists&&!directoryProbablyExists(nodeModulesAtTypes_1,state.host)){if(state.traceEnabled){trace(state.host,ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,nodeModulesAtTypes_1);}nodeModulesAtTypesExists=false;}return loadModuleFromNodeModulesFolder(Extensions.DtsOnly,mangleScopedPackage(moduleName,state),nodeModulesAtTypes_1,nodeModulesAtTypesExists,failedLookupLocations,state);}}", "title": "" }, { "docid": "6fadbf724e12bd1a6cb7627eca0fe0dd", "score": "0.536694", "text": "function require_js_module(src) {\n\tajax({\n\t\ttype : 'GET',\n\t\turl : src,\n\t\tresponse : function(script) {\n\t\t\teval.apply(window, [script]);\n\t\t},\n\t\terror : \"ERROR: script not loaded: \" + src\n\t});\n}", "title": "" }, { "docid": "00263710f37ee90ca7c7a0aca441ed7a", "score": "0.53634757", "text": "function moduleDidLoad() {\n common.logMessage('load');\n common.updateStatus('LOADED');\n}", "title": "" }, { "docid": "2fe2b94ce6e1aba09cf59e18fabf65cb", "score": "0.5363085", "text": "function load_if_possible(filename) {\n try {\n return require(filename);\n }\n catch (e) {\n if (e instanceof Error && e.code === 'MODULE_NOT_FOUND') {\n console.log('Could not load ' + filename);\n return null;\n } else {\n throw e;\n }\n }\n}", "title": "" }, { "docid": "2605ab3f6c247e9ee5d68e9aa5fb72e9", "score": "0.53619546", "text": "function importModule(dst, moduleName, isApp) {\r\n var subscope;\r\n if (modulesBeingLoaded[moduleName]) {\r\n // already loading this module\r\n internalError(\"Cyclic module dependency: \"+moduleName);\r\n }\r\n if (moduleObjects[moduleName]) {\r\n subscope = moduleObjects[moduleName];\r\n } else {\r\n modulesBeingLoaded[moduleName] = true;\r\n if (isApp)\r\n\tsubscope = appjet._native.importApp(moduleName);\r\n else \r\n\tsubscope = appjet._native.runLibrary('lib/'+moduleName);\r\n if (!subscope) {\r\n\tapiError(\"No such module: \"+moduleName);\r\n }\r\n moduleObjects[moduleName] = subscope; // cache\r\n delete modulesBeingLoaded[moduleName];\r\n }\r\n copyScope(subscope, dst);\r\n }", "title": "" }, { "docid": "34e3096438f1891488161686ee860d90", "score": "0.5358933", "text": "function loadModules() {\r\n for(var i = 0; i < iceModules.length; i++) {\r\n var file = iceFolder + iceModules[i];\r\n if(fs.isFile(file)){\r\n phantom.injectJs(file);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "0427a2c9a0c0f4e52a174b8c3f69f4b4", "score": "0.5351381", "text": "function scriptLoad(moduleSrc) {\n return new Promise((resolve, reject) => {\n const s = document.createElement('script');\n s.onload = resolve;\n s.onerror = reject;\n s.src = moduleSrc;\n s.async = 'async';\n document.head.appendChild(s);\n });\n }", "title": "" }, { "docid": "c3ff2351ccec9548be7869fef822cefa", "score": "0.5334079", "text": "load(name) {\n switch (name) {\n case 'ErrorsHandler':\n return import(/* webpackChunkName: 'errors-handler' */ '../errors-handler/errors-handler.js').then(({ default: ErrorsHandler }) => { return new ErrorsHandler() });\n default:\n throw new Error('Check the name of your module');\n }\n\n }", "title": "" }, { "docid": "3f7ca398640845b5443b221b9bbc74db", "score": "0.5319534", "text": "function _import(key, promise) {\n var url = modules[key];\n\n if (typeof key !== 'string') {\n throw new Error('Module name is not a string.');\n }\n\n if (typeof url !== 'string') {\n throw new Error('URL is not a string.');\n }\n\n var module = MODULE_STORE[key];\n \n // If module is not already cached\n if (!module) {\n var script = document.createElement('script');\n\n script.type = \"text/javascript\";\n script.src = url;\n script.onload = function() {\n var defer = Vow();\n\n console.log('Loading ' + key + '...');\n\n defer.promise.then(function(data) {\n ret[key] = data;\n if (count.length === 0) {\n promise.resolve(ret);\n } else {\n _import(count.pop(), promise);\n }\n });\n\n script.remove();\n MODULE_STORE[key](defer.resolve);\n }.bind(this, key);\n\n document.body.appendChild(script);\n } else {\n module(function(data) {\n ret[key] = data;\n if (count.length === 0) {\n promise.resolve(ret);\n } else {\n _import(count.pop(), promise);\n }\n });\n }\n }", "title": "" }, { "docid": "ec4ec903b695db38afac1ab2104fdb2f", "score": "0.52904314", "text": "function createModule(id) {\n var self = this;\n var parsed = parseUri(id);\n self['id'] = id;\n // Set up the 'exports' object\n self['exports'] = {};\n // Set up the 'module' object\n self['module'] = {\n 'provide': provide,\n 'exports': self['exports'],\n 'load': load,\n 'define': define,\n 'id': id\n };\n\n // The 'module.load' function. Accepts an array of module ids that are\n // dependencies. If/Once they're all loaded, the 'factory' function is invoked\n // `module.load` is allowed to be called multiple times in a module, but only\n // a call during the top-level execution of the script will have it's 'exports'\n // properly visisble to other modules.\n // The low-level 'Module' instances are returned in an Array\n function load(deps, factory) {\n if (!isArray(deps)) {\n if (typeof(deps) == 'function') {\n factory = deps;\n deps = [];\n } else {\n var argc = arguments.length;\n deps = Array.prototype.slice.call(arguments, 0, argc-1);\n factory = arguments[argc-1];\n }\n }\n \n log(\"ModuleJS: \"+self['id']+\": `module.load(\"+deps+\")` being called\");\n self._loadCalled = true;\n\n var _modules = [];\n for (var i=0, l=deps.length; i<l; i++) {\n var m = getModule(absolutize(parsed, deps[i]));\n if (!m['loaded']) {\n m['addListener'](function() {\n checkDeps(_modules, factory);\n });\n }\n _modules.push(m);\n }\n checkDeps(_modules, factory);\n return _modules;\n }\n\n // Called during `module.load`, and once for every dependency that still\n // needs to be loaded's load callback\n function checkDeps(_modules, factory) {\n var loaded = true;\n for (var i=0, l = _modules.length; i<l; i++) {\n var m = _modules[i];\n if (!m['loaded']) {\n loaded = false;\n break;\n }\n }\n if (loaded) {\n if (factory) {\n executeFactory(_modules, factory); \n }\n if (self._notifyLoaded) // Not on the global 'main' module\n self._notifyLoaded();\n }\n }\n\n // Executes the specifies factory function with the specified module dependencies\n function executeFactory(_modules, factory) {\n log(\"ModuleJS: \"+self['id']+\": Executing Module Factory\");\n\n // At this point, we know that any deps are loaded, so get the\n // 'exports' object from the loaded Module instance.\n var deps = [];\n for (var i=0, l=_modules.length; i<l; i++) {\n deps[i] = _modules[i]['exports'];\n }\n var depsName = randomVarName();\n var factoryName = randomVarName();\n self['global'][depsName] = deps;\n self['global'][factoryName] = factory;\n // Eval in the module's isolated Sandbox\n var rtn = self.eval('(function() { '+\n 'var rtn = this[\"'+factoryName+'\"].apply(exports, this[\"'+depsName+'\"]); '+\n 'try {'+\n 'delete this[\"'+depsName+'\"];'+\n 'delete this[\"'+factoryName+'\"];'+\n '} catch(e){}'+\n 'return rtn; })()');\n if (!!self['global'][depsName]) {\n self['global'][depsName] = undefined;\n }\n if (!!self['global'][factoryName]) {\n self['global'][factoryName] = undefined;\n }\n if (self['module']['exports'] !== self['exports']) {\n // 'module.exports' property was directly set\n log(\"ModuleJS: \"+self['id']+\": `module.exports` was set inside factory\");\n self['exports'] = self['module']['exports'];\n } else if (!!rtn && rtn !== self['exports']) {\n // something was 'return'ed from the factory function\n log(\"ModuleJS: \"+self['id']+\": Object returned from factory function\");\n self['exports'] = rtn;\n }\n }\n\n\n }", "title": "" }, { "docid": "fd8802e1c4910b8e27b98f6d8f8aa0a5", "score": "0.5288163", "text": "function handleModule(module) {\n\t\t\tfunction resolve(resolvedArgs) {\n\t\t\t\treturn createComponent(module, resolvedArgs, isConstructor);\n\t\t\t}\n\n\t\t\t// We'll either use the module directly, or we need\n\t\t\t// to instantiate/invoke it.\n\t\t\tif (typeof module == 'function') {\n\t\t\t\t// Instantiate or invoke it and use the result\n\t\t\t\treturn args\n\t\t\t\t\t? when(wire(asArray(args)), resolve)\n\t\t\t\t\t: resolve([]);\n\n\t\t\t} else {\n\t\t\t\t// Simply use the module as is\n\t\t\t\treturn Object.create(module);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7e623cb1441354c3e8cb94ac532a0a35", "score": "0.52802265", "text": "function moduleDidStartLoad() {\n common.logMessage('loadstart');\n}", "title": "" }, { "docid": "cd2a07e9ae8cc11a749efb99d098b52d", "score": "0.5278144", "text": "testLoadWhenPreloading() {\n const mm = getModuleManager({'a': [], 'b': [], 'c': []});\n mm.setLoader(createSuccessfulNonBatchLoader(mm));\n\n const origBeforeLoadModuleCode = mm.beforeLoadModuleCode;\n const origSetLoaded = mm.setLoaded;\n const calls = [0, 0];\n mm.beforeLoadModuleCode = (id) => {\n calls[0]++;\n origBeforeLoadModuleCode.call(mm, id);\n };\n mm.setLoaded = () => {\n calls[1]++;\n origSetLoaded.call(mm);\n };\n\n let calledBack = false;\n let error = null;\n\n mm.preloadModule('c', 2);\n assertFalse(\n 'module \"c\" should not be loading yet', mm.isModuleLoading('c'));\n clock.tick(2);\n assertTrue('module \"c\" should now be loading', mm.isModuleLoading('c'));\n\n const d = mm.load('c');\n d.then(\n (ctx) => {\n calledBack = true;\n },\n (err) => {\n error = err;\n });\n\n assertTrue('module \"c\" should still be loading', mm.isModuleLoading('c'));\n clock.tick(5);\n assertFalse('module \"c\" should be done loading', mm.isModuleLoading('c'));\n assertEquals('beforeLoad should only be called once for \"c\"', 1, calls[0]);\n assertEquals('setLoaded should only be called once for \"c\"', 1, calls[1]);\n\n assertTrue(calledBack);\n assertNull(error);\n }", "title": "" } ]
007da49edc2f30faf3f9abfb52a9d325
messageEveryone function messages everyone who is not selected in the guild
[ { "docid": "29c6cb52c3c33949b88ecda5c30a856f", "score": "0.7216753", "text": "function messageEveryone(guildSelected, message, channel, role) {\n member = guildSelected.members.array();\n counter = 0;\n //Promises that the object will be returned.\n return new Promise(function(resolve, reject) {\n guildSelected.members.forEach(function(guildmember, guildmemberID) {\n counter++;\n //If the member is a bot, and the member is part of the role selected, it will not send a message\n //If it does, it will send a message to the selected channel saying, \"User\" was sucessfully messaged\n //Else then it will return \"User\" cannot be messaged.\n if (!guildmember.bot) {\n if (!guildmember.roles.get(role)) {\n guildmember.user.send(message).then((result) => {\n channel.send(guildmember.user.username + \" was successfully messaged!\");\n }, function(err) {\n channel.send(guildmember.user.username + \" cannot be messaged. :(\");\n })\n }\n //The promise returns to the main handler after everyone not selected has been messaged\n if (counter == member.length - 1) {\n resolve();\n }\n }\n });\n })\n}", "title": "" } ]
[ { "docid": "16e31326f131214966a20b4503b99a56", "score": "0.663262", "text": "sendToEveryone (msg) {\n // Set the dstId to CONSTANTS.EVERYONE if not already set\n if (!msg.dstId) {\n msg.dstId = Constants.EVERYONE;\n }\n this.sockets().forEach(socket => socket.send(msg));\n }", "title": "" }, { "docid": "af6b00cb2fbbc0e5de996283ab3cf2ca", "score": "0.6339063", "text": "function sendGlobalMessage(bot, msg) {\n\n bot.guilds.forEach((guild) => {\n\n let billBayou = guild.channels.find(channel => (channel.name === \"bill-bayou\" && channel.type === \"text\"));\n\n //If we found the bill-bayou channel, post to that\n if (billBayou) {\n billBayou.send(msg);\n }\n\n //Otherwise, we'll check to see if bill is allowed to create the bill-bayou\n else {\n\n let billGuildMember = guild.members.get(bot.user.id);\n\n if (!billGuildMember) {\n console.log(`Bill was unable to find himself in ${guild.name}`);\n }\n else {\n\n //If bill is allowed to make the bill-bayou, do so and then post the message to it\n if (billGuildMember.hasPermission([\"MANAGE_CHANNELS\"])) {\n guild.createChannel(`bill-bayou`, { type: `text` })\n .then((createdChannel) => {\n createdChannel.send(msg);\n })\n .catch(console.error);\n }\n else {\n //Don't post anything if bill isn't allowed to make a bill-bayou :(\n }\n\n }\n\n }\n\n });\n\n}", "title": "" }, { "docid": "2e8eca1a76a00d8bcf21bd3f859294dd", "score": "0.62204903", "text": "function sendMessageToAll(message){\n\tconsole.log(message);\n\tio.sockets.emit(\"chatMessageToClient\", message);\n}", "title": "" }, { "docid": "ebc1b8f8254d84aeb6e1fa7721c2ba10", "score": "0.6130723", "text": "handlePrivateMessage(username, message) {\n const members = this.room.members;\n let user;\n\n for (let member of members) {\n if (member.name === username) {\n user = member;\n user.send(JSON.stringify({\n name: `${this.name} (Private)`,\n type: \"chat\",\n text: message\n }));\n\n return;\n } \n }\n throw new Error(`User does not exist: ${username}`)\n\n }", "title": "" }, { "docid": "d1495bb98fc752e10d752a1da4c62b88", "score": "0.60253245", "text": "function broadcastMessage(msg) {\n var date = new Date();\n\n var userId = crypto\n .createHash(config.anonchat.userId.hash)\n .update(`${msg.author.id} ${date.getFullYear()} ${date.getMonth()} ${date.getDate()} ${config.anonchat.userId.salt}`)\n .digest(config.anonchat.userId.digest)\n .substring(0, config.anonchat.userId.length)\n .toLowerCase()\n .replace('/', '0');\n\n var str = format(config.anonchat.message.format, { id: userId, content: msg.content });\n\n if (str.length <= config.anonchat.maxMessageLength) {\n var guild = client.guilds.get(config.discord.guildId);\n guild.channels\n .forEach(function (c, snowflake, map) {\n c.send(str).catch(console.error);\n });\n }\n\n if (config.anonchat.deleteWhenSent) {\n msg.delete();\n }\n}", "title": "" }, { "docid": "e5275e474422b37d368a718781604e72", "score": "0.5959309", "text": "function broadcast (roomID, msg, exceptMyself) {\n // var room = _.findWhere(rooms, {'name': roomName});\n //console.log(room.id);\n for (var i in users) {\n console.log(users[i].inroom+\" \"+roomID);\n if (users[i].inroom===roomID&&(!exceptMyself || i != nickname)) {\n users[i].port.write(msg);\n users[i].port.write('\\n\\r > ');\n }\n }\n }", "title": "" }, { "docid": "98f78bfbf16ef595506e9d0412126304", "score": "0.5955523", "text": "function sendToAll(msg) {\n getGroups((err, groupData) => {\n const groups = JSON.parse(groupData);\n if (groups) {\n for (let g in groups) {\n if (groups[g].isGroup) {\n sendMessage(msg, g);\n }\n }\n }\n });\n}", "title": "" }, { "docid": "5d09968b0b77785db014893da2c370db", "score": "0.5837125", "text": "send(message) {\n\t\tif (this.roomid !== 'lobby') message = '>' + this.roomid + '\\n' + message;\n\t\tif (this.userCount) Sockets.roomBroadcast(this.roomid, message);\n\t}", "title": "" }, { "docid": "8a7e1aa6faee15d8a562c67c6d0cfe1a", "score": "0.57858133", "text": "function sendMessageToPlayersInLobby(lobby, message) {\n\n for (let id in lobby) {\n if (id !== 'state'){\n // console.log(\"SENDING TO: \", id, \" DATA: \", message);\n sendToConnectionId(id, message);\n }\n }\n // console.log(\"=================================\");\n}", "title": "" }, { "docid": "4bb6fe5650d5932be29a45e098335943", "score": "0.57679975", "text": "function sendMessage(){\n var guild = client.guilds.cache.get('/* Server Key */');//server ID\n if(guild && guild.channels.cache.get('/* Channel Key */')){ //channel ID\n guild.channels.cache.get('/* Channel Key */').send(\"**IT'S HIGHHH**\"); //channel ID + Message\n console.log(\"High noon achieved!\\n \" + \"Message sent.\\n\" )\n } \n}", "title": "" }, { "docid": "3c12a86ee5ffb24867755660148338aa", "score": "0.5751582", "text": "function onMessageHandler (target, context, msg, self) {\n if (self) { return; } // Ignore messages from the bot\n\n // Remove whitespace from chat message\n \n var i;\n for (i = 0; i < msg.length; ++i) {\n if (msg.charAt(i)==' '){\n var index = i;\n }\n }\n const commandName = msg.substring(0,index);\n \n const username = msg.substring(index+1);\n \n if(commandName === '!addtrustbot') {\n if (target.substring(1)==context.username){\n opts.channels.push('#'+ username);\n client.say(target,'You have invited '+ username + ' to be a part of your trusted community PogChamp');\n console.log(`* Executed ${commandName} command`);\n }\n }\n \n else if (commandName === '!trustedusers') {\n client.say(target, 'The trusted users of this channel are: ' + trusted_users.toString());\n }\n else if (commandName === '!trust') {\n if (context.mod || target.substring(1)==context.username) {\n trustuser(username);\n client.say(target, `User ` + username + ` has been trusted.`);\n console.log(`* Executed ${commandName} command`);\n }\n else{\n client.say(target, context.username + ' Sorry you must be a moderator to do that BibleThump')\n }\n \n }\n // Untrust function\n else if (commandName === '!untrust') {\n if (context.mod || target.substring(1)==context.username) {\n untrustuser(username);\n client.say(target, `User ` + username + ` is no longer trusted.`);\n console.log(`* Executed ${commandName} command`);\n }\n else {\n client.say(target, context.username + ' Sorry you must be a moderator to do that BibleThump') \n }\n } else {\n console.log(`* Unknown command ${commandName}`);\n }\n}", "title": "" }, { "docid": "15880173d88e88087506bb6f3d6f5b2f", "score": "0.5711027", "text": "function discordChat(msg) {\n\tws.send(\":m \" + discordChannel + \" \" + msg);\n}", "title": "" }, { "docid": "d97ae87b6bc2052da7faf904abaf9289", "score": "0.5682848", "text": "function getPrivateMessages() {\n let individual = activeUsers.find(o => o.userName === userobject.username);\n Message.getMsgs(userobject.username, function (err, msgs) {\n try {\n io.to(individual.connectionId).emit('broadcastPrivateMsgs', msgs);\n }\n catch(err) {\n console.error(err);\n }\n });\n}", "title": "" }, { "docid": "8e3ddbd4cf001c9cd5e85d61333ed43a", "score": "0.56779355", "text": "function sendMessageToAllPlayers(message) {\n for (let i = 0; i < players.length; i++) {\n io.sockets.emit('message', {\n message: message,\n to: players[i].id\n });\n }\n}", "title": "" }, { "docid": "3cd14707bdbbff2f6ea5daeae67f56c9", "score": "0.56769294", "text": "function everyoneLeft(bot, message) {\n if (message.channel === channels.alarmControlChannel.id) {\n log.info(\"Someone Left Home.\", \"From \" + users[message.user]);\n me.emitter.emit(\"presence\", { event: \"presence-absent\", who: \"alarmbot\" });\n bot.reply(message, \"Have a nice adventure.\");// + message.match[1] + \"! Come back soon.\");\n }\n }", "title": "" }, { "docid": "d1a0b673c8da51aab3f0dfbf2785afcd", "score": "0.5675514", "text": "async run (message) {\n const messageArry = message.content.split(' ')\n const args = messageArry.slice(1)\n\n const mUser = message.guild.member(message.mentions.users.first() || message.guild.get(args[0]))\n if (!mUser) return message.channel.send('User cannot be found!')\n const mReason = args.join(' ').slice(22)\n\n // setting up the embed for report/log\n const muteEmbed = new RichEmbed()\n .setDescription(`Report: ${mUser} MUTE`)\n .addField('Reason >', `${mReason}`)\n .addField('Time', message.createdAt)\n\n const reportchannel = message.guild.channels.find('name', 'report')\n if (!reportchannel) return message.channel.send('*`Report channel cannot be found!`*')\n\n // Delete the message command\n // eslint-disable-next-line camelcase\n message.delete().catch(O_o => {})\n let muterole = message.guild.roles.find('name', 'Muted')\n if (!muterole) {\n try {\n muterole = await message.guild.createRole({\n name: 'Muted',\n color: '@000000',\n permissions: []\n })\n message.guild.channels.forEach(async (channel, id) => {\n await channel.overwritePermissions(muterole, {\n SEND_MESSAGES: false,\n ADD_REACTIONS: false\n })\n })\n } catch (e) {\n log(chalk.underline.red(e.stack))\n }\n }\n await (mUser.addRole(muterole.id))\n reportchannel.send(muteEmbed)\n // Logs the kick into the terminal\n log(chalk.red('MUTE', chalk.underline.bgBlue(mUser) + '!'))\n }", "title": "" }, { "docid": "c68fbb4207701dba3f601eb597cc44f9", "score": "0.5668742", "text": "function AnonMessage() {\n\tif(wgUserGroups == null) {\n\t\t$('.anonmessage').css('display', 'inline');\n\t}\n}", "title": "" }, { "docid": "c68fbb4207701dba3f601eb597cc44f9", "score": "0.5668742", "text": "function AnonMessage() {\n\tif(wgUserGroups == null) {\n\t\t$('.anonmessage').css('display', 'inline');\n\t}\n}", "title": "" }, { "docid": "8abbcff6c802646c01c947946409dae5", "score": "0.5658575", "text": "get_guild_id(message)\n {\n message.reply(\"Guild : \" + message.guild);\n Logs.sebas_std_logs(\"Guild\");\n }", "title": "" }, { "docid": "63130fb420583cae82314b09f658c3a9", "score": "0.56523234", "text": "function broadcast(message, nosend){\r\n\tnosend = nosend || {};\r\n\tfor(id in users){\r\n\t\tif(!nosend[id]){\r\n\t\t\tvar curr=users[id];\r\n\t\t\tcurr.write(message);\r\n\t\t}\r\n\t};\r\n}", "title": "" }, { "docid": "18a59c8bfe65ef45f8a8819340e4b4e0", "score": "0.56325096", "text": "function say(message) {\n\tlog(\"message sending to irc:\", message);\n\tvar client = clients[message.from][rooms[message.to].params.irc.server];\n\tif(message.text.indexOf(\"/me \") !== 0) client.say(rooms[message.to].params.irc.channel, message.text);\n\telse client.action(rooms[message.to].params.irc.channel, message.text.substring(4));\n}", "title": "" }, { "docid": "08e4ba0b506a247f2fc607a3d2bcfdb0", "score": "0.5625936", "text": "msg(clientConnection, nickname, msg) {\n console.log(`msg: ${nickname}, ${msg}`);\n const data = `${clientConnection.nick} : ${msg}`;\n clientConnection.socket.emit('RECEIVE_MESSAGE', {group: this.name, msg: data});\n this.users.forEach(user => {\n if (user.nick === nickname) {\n user.socket.emit('RECEIVE_MESSAGE', {group: this.name, msg: data});\n }\n });\n }", "title": "" }, { "docid": "c96c5f08c0aa01f7f151eb2bcf9fbc5d", "score": "0.5625649", "text": "async function noTargets(message) {\n try {\n await message.reply(\"My quirk requires you to mention **at least one** text channel **or** user to activate.\")\n } catch(e) {\n console.log(\"missing targets reply failed\")\n console.log(e)\n }\n}", "title": "" }, { "docid": "968808046361eec3dfd246f6f13a170e", "score": "0.5613919", "text": "function allMessages(client) {\r\n\r\n //Build a query to get all the messages from the message table. \r\n let getMessages = \"SELECT * FROM messages\";\r\n \r\n //Execute query and output results\r\n connectionPool.query(getMessages, (err, result) => {\r\n if (err) { //Check for errors\r\n console.error(\"Error executing query: \" + JSON.stringify(err));\r\n }\r\n else { //Sends results in JSON format to the Client. \r\n if(client != ws) { //This if statement is used so the message if only sent to the client. This stops the message from being repeated in the server.\r\n \r\n //This sends the data from server to client in JSON Format.\r\n\r\n //The ws.userName is used for sending the data with the same name. Reffering back to the if statament above.\r\n client.send(JSON.stringify( {name: ws.userName, data: message.data, DateTime: message.date, getMsg: result} )); \r\n }\r\n }\r\n });\r\n }", "title": "" }, { "docid": "4a35b132bbeb244397537efbe0bdd125", "score": "0.5607489", "text": "function resourcesMuteMessage(message, client) {\n\tclient.channels\n\t\t.fetch(process.env.CHAT_CHANNEL)\n\t\t.then((channel) => {\n\t\t\tmessage.reply(`Please use ${channel} for longer conversations. \\nI hate to do it, but I had to mute you for a little while. :sob: \\nDon't worry, you'll be able to post your study resources again after 1 minute!`);\n\t\t})\n\t\t.catch(console.error);\n}", "title": "" }, { "docid": "92df7dc84c52cc4e3a12bea2d123b47f", "score": "0.5603393", "text": "send(clientConnection, msg) {\n this.time = new Date();\n const data = `${clientConnection.nick}: ${msg}`;\n this.users.forEach(user => {\n console.log(`Sending: ${data}`);\n user.send({group: this.name, msg: data});\n })\n }", "title": "" }, { "docid": "909972617e9ac96d0374a0350cb0d3fa", "score": "0.5585717", "text": "function sendAllClients (msg) {\n wss.clients.forEach(function each (client) {\n client.send(msg)\n })\n}", "title": "" }, { "docid": "987af016716ddd1a9ab7898b96891b0d", "score": "0.5545126", "text": "function chatToNonHostPlayers( msgTxt) {\n if (socket) socket.emit('chat message but not me', msgTxt + '</br>');\n }", "title": "" }, { "docid": "f90b3d13f23737828e9a17f10c981c22", "score": "0.55333894", "text": "async commandHandler(msg,user){\n const text = msg.content+\"\";\n let response = null,\n command;\n let permissionLevel = (msg.member.hasPermission(\"ADMINISTRATOR\")) ? 1 : 0;\n user.setPermission(permissionLevel);\n\n if(msg.channel.id==\"166679130228785152\" && msg.author.id==\"419293643598200832\"){\n let reacted=false;\n const words = text.split(\" \");\n const wrongly = writeGood(text);\n console.info(wrongly);\n if(wrongly.length){\n msg.reply(wrongly[0].reason);\n }\n let respuesta = \"\";\n for(let w in words){\n const word = words[w];\n if(SpellChecker.isMisspelled(word)){\n const corrections = SpellChecker.getCorrectionsForMisspelling(word);\n if(corrections.length){\n respuesta+=word+\" is misspelled, here are some possible corrections: \"+corrections.join(\", \")+\"\\n\";\n }\n }\n }\n if(respuesta.length){\n msg.reply(respuesta);\n try{\n await msg.react(\"🇼\");\n await msg.react(\"🇷\");\n await msg.react(\"🇴\");\n await msg.react(\"🇳\");\n await msg.react(\"🇬\");\n } catch(e){\n msg.guild.members.get(msg.author.id).setNickname(\"YOU ARE WRONG (UNBLOCK THE BOT)\");\n }\n }\n }\n /*if(text.split(\" \").length==1 && msg.author.id==\"162355874570960896\"){\n const cleanText = text.replace(/[^a-z]/gi, '');\n console.info(cleanText);\n msg.channel.fetchMessages({ limit: 10 })\n .then((messages) => {\n const mm = messages.array();\n console.info(mm);\n for(let m in mm){\n console.info(mm[m].id != msg.id,mm[m].content.includes(cleanText));\n if(mm[m].id != msg.id && mm[m].content.includes(cleanText)){\n msg.delete(100);\n }\n }\n })\n .catch(console.info);\n } else {\n const server = await this.logic.getServer(msg.channel.guild.id);\n const boolDesignatedChannel = server.channels.hasOwnProperty(msg.channel.id);\n if(this.isACommand(text) || boolDesignatedChannel){\n response = new Message(msg.channel.guild.id,msg.channel.id,user); //Instances a new discord RichEmbed;\n console.log(msg.author.id +\" sent \"+msg.content,1);\n command = text.toLowerCase().split(\" \");\n if(boolDesignatedChannel){\n command.unshift(this.prefix+server.channels[msg.channel.id]);\n }\n command[0] = command[0].substring(this.prefix.length,command[0].length); //Splits the text of the message in spaces removing the prefix out of it\n console.time();\n\n await this.logic.getCommand(command[0],user).execute(response,user,command); //gets the command using the first string in the splitteed message and executes it\n }\n }*/\n return response;\n }", "title": "" }, { "docid": "4d57f9316d3d6b3dd7d169bb7c695a2a", "score": "0.55326086", "text": "function chatMessageListener (fromClientID, message) {\n\tvar godly = new RegExp(\"godMode\");\n\tvar swoog = new RegExp(\"Swoogie\");\n\tif(message.match(godly) && !(message.match(swoog))){\n\t\tgodMode();\n\t}\n\tif(message == \"/help\")\n\t{\n\t\tdisplayHelp();\n\t}\n\telse if(message == \"/whisper\" || message == \"/w\")\n\t{\n\t\t//Need to pase who it is to first, second you need to pass who it is from\n\t\twhisper(message, fromClientID,len)\n\t}\n\telse\n\t\tdisplayChatMessage( message);\n}", "title": "" }, { "docid": "74fb4908ed2fc423b1bd2f6895b8138d", "score": "0.5518106", "text": "messageToGameChat(message) {\n const data = message.data;\n const id = message.id;\n data.name = this._users[id].name;\n for (let userId in this._games[data.room].players) {\n this.sendToUser(userId, {mType: 'messageToGameChat', data: data });\n }\n }", "title": "" }, { "docid": "747451d081017f37ae1a8fd0be794f4a", "score": "0.551782", "text": "function broadcast(from, message) {\n // If there are no sockets, then don't broadcast any messages\n if (sockets.length === 0) {\n process.stdout.write('Everyone left the chat');\n return;\n }\n\n // If there are clients remaining then broadcast message\n sockets.forEach((socket) => {\n // Dont send any messages to the sender\n if (socket.nickname === from) return;\n\n socket.write(message);\n });\n}", "title": "" }, { "docid": "e2584801335bf68741b9cfc9e864d39c", "score": "0.55059904", "text": "function tellAll(message) {\n for (i=0; i<clients.length; i++) {\n clients[i].write(message);\n }\n}", "title": "" }, { "docid": "1a94d85cd25e4edcc5c22a5f3c67ae05", "score": "0.5483186", "text": "function dmCommand(receivedMessage){\n var messageArguments = receivedMessage.content.split(\" \");\n var rolesListed = [];\n var message = \"\";\n\n console.log(messageArguments[0]);\n //DM Command\n if(messageArguments[0].toLowerCase() === \"~dm\"){\n \n //makes sure the command has correct number of args\n if(messageArguments.length >= 3){\n\n //gets the @roles ready for parsing\n for(var index = 0; index < messageArguments.length; index++){\n\n if(messageArguments[index].startsWith('<@&')){\n rolesListed.push(messageArguments[index]);\n console.log(\"Roles listed: \", rolesListed);\n }\n //If it isnt a role and isnt the first command (~dm) then it has to be part of the message.\n else if(index >= 2 && !messageArguments[index].startsWith('<@')){\n message += messageArguments[index] + ' ';\n }\n }\n \n //User[] of all the users with the role\n var membersWithRole = [];\n\n //Doesnt kill the bot if it hits an error.\n try{\n //Finds all users with the roles pinged.\n for(var i = 0; i < rolesListed.length; i++){\n try{\n membersWithRole = membersWithRole.concat(receivedMessage.guild.roles.get(getIdFromMention(rolesListed[i])).members.map(m=>m.user));\n }catch(error){\n console.error(error);\n }\n }\n\n //loops through membersWithRole and sends them a message, if blocked will send a message back in the channel saying who blocked the bot.\n for(var i = 0; membersWithRole.length > i; i++){\n let username = membersWithRole[i].username;\n \n membersWithRole[i].send(message).catch(error => {\n if(error.code === 50007){\n receivedMessage.channel.send(username + \" has blocked the bot.\");\n }\n });\n \n }\n }catch(e){\n console.error(e);\n receivedMessage.channel.send(\"Somethings not right... make sure you used the correct command format! ``~dm @role message``\");\n }\n }\n }\n}", "title": "" }, { "docid": "e1b8e940479014ab235928d877418666", "score": "0.5465723", "text": "function globalAnnounce(message) {\n try {\n let links = db.get(\"links\").value();\n for (let i = 0; i < links.length; i++) {\n let MSG = message;\n if (typeof message !== \"object\") {\n if (!client.channels.get(links[i])) {\n return;\n }\n let re = /@<([^>]+)>/g,\n MSG = message.replace(re, x => {\n let usertag = x.slice(2, -1);\n let user = userdb\n .get(\"users\")\n .find({\n nick: usertag\n })\n .value();\n\n if (user) {\n if (user.primaryChannel === links[i]) {\n return \"<@\" + user.id + \">\";\n }\n }\n return \"**@\" + usertag + \"**\";\n });\n }\n let msg = {};\n msg.content = MSG;\n //console.log(links[i]);\n //Whook(links[i], msg, \"Isekai\",'0')\n client.channels.get(links[i]).send(MSG);\n }\n } catch (err) {\n console.log(err);\n }\n}", "title": "" }, { "docid": "3b67e6d190fca4365315c1dc1db12450", "score": "0.5460186", "text": "warnParticipants(message) {\n\t\tconst warned = Object.values(this.users).filter(u => !u.can('lock'));\n\t\tfor (const user of warned) {\n\t\t\tuser.popup(`|modal|${message}`);\n\t\t}\n\t\treturn warned;\n\t}", "title": "" }, { "docid": "5ffe865934f26dcb1043fc04c11d4b2a", "score": "0.5460068", "text": "static action (message) {\n\n // On récupère le chiffre paramètre (si il y en as un ou non) et on défini le nombre de messages à supprimer\n let args = message.content.split(' ')\n let limite = args[1] && !isNaN(args[1]) ? Number(args[1]) : 100\n\n if (limite <= 0) {\n limite = 1\n }\n\n // On répond à l'auteur du !roll avec un chiffre aléatoire\n message.reply(`Nombre aléatoire de 1 à ` + limite + `: ` + Math.floor((Math.random() * limite) + 1))\n .then(msg => console.log(`Réponse pour ${message.author}`))\n .catch(console.error)\n\n }", "title": "" }, { "docid": "ff5ecc50da377b6b55592af893ab0907", "score": "0.54569596", "text": "async function blockGroup(msg){\n if(!msg.fromMe){\n msg.reply(prettyPrint(_.REPLIES.PRIVILEGE));\n return;\n }\n let chat = await msg.getChat(); \n if(!chat.isGroup){\n msg.reply(prettyPrint(_.REPLIES.NOTGROUP));\n return;\n }\n let groupName = emojiStrip(chat.name);\n _.FILTER_GROUPS.forEach((group) => {\n if(group == groupName){\n return;\n }\n });\n db.addGroup(groupName, function(){\n _.FILTER_GROUPS.push(groupName);\n msg.reply(prettyPrint(_.REPLIES.BLOCKED));\n console.log(_.FILTER_GROUPS);\n });\n}", "title": "" }, { "docid": "5babbbc0b02c05df0901e4a56e547e82", "score": "0.5441643", "text": "function sendMessage(message) {\n if (!message) return\n \n input.setAttribute('disabled', true)\n input.value = ''\n connection.send(message)\n\n // The first message will be the user's name\n if (!userName) {\n userName = message\n sendButton.innerHTML = 'Chat'\n }\t\n}", "title": "" }, { "docid": "58ed49aed45c2bddd57d27a68764143f", "score": "0.5436356", "text": "function sendAllTourAuth(message) {\r\n\tfor (var x in sys.playersOfChannel(tourschan)) {\r\n\t\tvar arr = sys.playersOfChannel(tourschan)\r\n\t\tif (isTourAdmin(arr[x])) {\r\n\t\t\tsys.sendMessage(arr[x], message, tourschan)\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "abd5ca8ee5a1b4463ca415bd24eca401", "score": "0.54354954", "text": "function sendMessageOnDiscord(message, userstate) {\r\n\tlet color = typeof message['color'] === 'null' ? message['color'] : 3447003\r\n\tlet badges = Object.keys(message['badges']).join(', ')\r\n\tdiscordClient.channels.get('495914303908741121').send({\r\n\t\tembed: {\r\n\t\t\tcolor: `${color}`,\r\n\t\t\tauthor: {\r\n\t\t\t\tname: `${message['display-name']}`,\r\n\t\t\t\ticon_url:\r\n\t\t\t\t\t'https://static-cdn.jtvnw.net/jtv_user_pictures/twitch-profile_image-8a8c5be2e3b64a9a-300x300.png',\r\n\t\t\t\turl: `https://twitch.tv/${message['username']}`\r\n\t\t\t},\r\n\t\t\tdescription: `${userstate}`,\r\n\t\t\tfields: [\r\n\t\t\t\t{\r\n\t\t\t\t\tname: 'Badges 📛',\r\n\t\t\t\t\tvalue: `${badges}`,\r\n\t\t\t\t\tinline: true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tname: 'Moderator ⚔',\r\n\t\t\t\t\tvalue: message['mod'] == true ? 'Yes' : 'No',\r\n\t\t\t\t\tinline: true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tname: 'Subscriber 🌟',\r\n\t\t\t\t\tvalue: message['subscriber'] == true ? 'Yes' : 'No',\r\n\t\t\t\t\tinline: true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tname: 'Turbo 🤖',\r\n\t\t\t\t\tvalue: message['turbo'] == true ? 'Yes' : 'No',\r\n\t\t\t\t\tinline: true\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\tfooter: {\r\n\t\t\t\ttext: Moment().format('MMMM Do YYYY, h:mm:ssa')\r\n\t\t\t}\r\n\t\t}\r\n\t})\r\n}", "title": "" }, { "docid": "c2d9a8fe803ab9e92e8d2adc297c4e2e", "score": "0.54281545", "text": "function disableMessageProcessing(chatid){\n\n\tif(gDisableMessagingToNonRoot === true && chatid !== gRootUserChatID){\n\t\n\t\tconsole.log(chatid,gDisableMessage);\n\t\n\t\tif(gDisableMessage.length>0)\n\t\n\t api.sendMessage({\n chat_id: chatid,\n text: gDisableMessage\n }).catch(function(e){ informRoot(chatid,e);});\n\t\t\n\t\treturn true;\n\t}\n\t\n\treturn false;\n\n}", "title": "" }, { "docid": "601acd0e8a3974f9eb5ac6bdfbec8129", "score": "0.5427756", "text": "function sendPrivateMessage(message) {\n\n\tvar command = message.text.slice(0,8);\n\tvar secondPart = message.text.slice(9);\n\tvar firstSpaceIndex = secondPart.indexOf(' ');\n\tvar userName = secondPart.slice(0, firstSpaceIndex );\n\tvar privateMessage = secondPart.slice(firstSpaceIndex + 1);\n\n\tvar foundSocketId;\n\n\tObject.keys(clientInfo).forEach(function (socketId) {\n\t\tvar userInfo = clientInfo[socketId];\n\n\t\tif ( userName === userInfo.name ) {\n\t\t\tfoundSocketId = socketId;\n\t\t}\n\n\t});\n\n\tif (foundSocketId !== 'undefined') {\n\t\tio.to(foundSocketId).emit('message', {\n\t\t\tname: message.name + ' sent you a private message',\n\t\t\ttext: privateMessage,\n\t\t\ttimestamp: moment().valueOf()\n\t\t});\n\t}\n\n\t\n\n}", "title": "" }, { "docid": "4caa17b49824164a2793da3ad73c7401", "score": "0.54180336", "text": "function replyAllOnMessage () {\n var message = _selectedMessage();\n if (message) {\n $state.go('base.email.replyAll', {id: message.id});\n }\n }", "title": "" }, { "docid": "0f5f043bff527c09985d49576192a680", "score": "0.5404695", "text": "killMentions(text, message) {\n if (!text) return text;\n\n return text\n .replace(/<@!?[0-9]+>/g, input => {\n const id = input.replace(/<|!|>|@/g, '');\n if (message.channel.type === 'DM' || message.channel.type === 'GROUP_DM') {\n return message.client.users.cache.has(id) ? `@${message.client.users.cache.get(id).username}` : input;\n }\n\n const member = message.channel.guild.members.cache.get(id);\n if (member) {\n if (member.nickname) return `@${member.nickname}`;\n return `@${member.user.username}`;\n } else {\n const user = message.client.users.cache.get(id);\n if (user) return `@${user.username}`;\n return input;\n }\n })\n .replace(/<#[0-9]+>/g, input => {\n const channel = message.client.channels.cache.get(input.replace(/<|#|>/g, ''));\n if (channel) return `#${channel.name}`;\n return input;\n })\n .replace(/<@&[0-9]+>/g, input => {\n if (message.channel.type === 'DM' || message.channel.type === 'GROUP_DM') return input;\n const role = message.guild.roles.cache.get(input.replace(/<|@|>|&/g, ''));\n if (role) return `@${role.name}`;\n return input;\n });\n }", "title": "" }, { "docid": "731aa04c0481e0256312f1dc297e808a", "score": "0.5402773", "text": "function sendChat(message) {\n bot.sendChat(message);\n }", "title": "" }, { "docid": "8d1ad45257cc77e8035547a183b90da5", "score": "0.54011136", "text": "async run(message, args) {\n var services = sixMansService.GetAllServicesForInstance(message.channel.id);\n if(services == null)\n {\n return;\n }\n var [databaseService, gameService, queue, channels] = services;\n \n if (!message.member.hasPermission(\"ADMINISTRATOR\")) {\n message.reply(\"Only admins can use this command! Nice try... :wink:\");\n return;\n }\n else {\n await databaseService.ResetAllMmr();\n \n var clearReply = new discord.RichEmbed()\n .addField(\"**Leaderboards Hard Reset!**\", \"Welcome to the new month! Get queueing!\")\n .setColor(adminColor)\n .setFooter(footer, footerImage)\n \n message.channel.send(clearReply); \n\n console.log('[Leaderboards] Leaderboard has been hard reset!');\n }\n }", "title": "" }, { "docid": "f6e9443bdd1a728134454ed0ee532028", "score": "0.5393261", "text": "function send_chat_message(msg) {\n\tif (selected !== null) {\n\t\tminecraft.servers[selected].send_chat(msg);\n\t} else {\n\t\tconsole_out(color(\"You are not currently attached to a server. Use /attach [id] first.\", \"red\"));\n\t}\n}", "title": "" }, { "docid": "d055217fb86ac4deef0cebc87e7f8bae", "score": "0.5391355", "text": "async sendMessageToAllClients(msg){\n\t\tconst aClients = await clients.matchAll();\n\t\tconst pClientMessages = aClients.map(client => {\n\t\t\treturn this.sendMessageToClient(client, msg);\n\t\t\t//return this.sentMessageToClient(client, msg);\n\t\t});\n\t\treturn await Promise.all(pClientMessages);\n\t}", "title": "" }, { "docid": "a9546ce9934bcd583ad85b9392f8a123", "score": "0.5390738", "text": "function whisper(priv) {\n if (priv.length == 0) return\n ChatMessage.create({\n alreadyProcessed: true,\n content: priv.join(\"<br>\"),\n user: game.user._id,\n type: CONST.CHAT_MESSAGE_TYPES.WHISPER,\n whisper: [game.user._id],\n })\n priv.length = 0\n}", "title": "" }, { "docid": "516944ac90a8d22d537fe6fbd4359899", "score": "0.53825116", "text": "function globaldel_message(arg1, arg2){\n if (content == p + arg1 &&\n author.id != client.User.id &&\n author.bot != true){\n e.message.delete();\n channel.sendMessage(arg2);\n }\n }", "title": "" }, { "docid": "9ee29be1f8d60353f6f86c59cda0782f", "score": "0.5370835", "text": "execute(client, message) {\n\t\tmessage.channel.send('Huh? What? I\\'m awake!');\n\t}", "title": "" }, { "docid": "50f60d8811ac79d473acd186eb0cadd6", "score": "0.53688264", "text": "sendMessage(message, roomID) {\n return this.currentUser.sendMessage({\n text: message,\n roomId: roomID,\n });\n }", "title": "" }, { "docid": "dd26eab318ac7044e535367111249eff", "score": "0.5364972", "text": "function send_all_clients(msg) {\n\twss.clients.forEach(function each(client) {\n\t\ttry {\n\t\t\tclient.send(msg);\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t};\n\t});\n}", "title": "" }, { "docid": "a2ce98807a6c0b59cd362c6f40d53d8f", "score": "0.5362368", "text": "function sendSpamMessage() {\r\n try {\r\n // You could modify this to send a random string from an array (ex. a quote), create a\r\n // random sentence by pulling words from a dictionary file, or to just send a random\r\n // arrangement of characters and integers. Doing something like this may help prevent\r\n // future bots from detecting that you sent a spam message.\r\n message.channel.send(\"This is spam message #\" + count);\r\n\r\n if (count < maxMessages) {\r\n // If you don't care about whether the messages are deleted or not, like if you created a dedicated server\r\n // channel just for bot spamming, you can remove the below line and the entire prune command.\r\n message.channel.send(\"/prune\");\r\n count++;\r\n\r\n /* These numbers are good for if you want the messages to be deleted.\r\n * I've also noticed that Discord pauses for about 4 seconds after you send 9\r\n * messages in rapid succession, and this prevents that. I rarely have any spam\r\n * messages slip through unless there is a level up from mee6 or Tatsumaki. */\r\n let minTime = Math.ceil(5449); // Rush RP1\r\n let maxTime = Math.floor(7777); // Arbitrary integer\r\n let timeToWait = Math.floor(Math.random() * (maxTime - minTime)) + minTime;\r\n setTimeout(sendSpamMessage, timeToWait);\r\n } else {\r\n // Sends a message when count is equal to maxMessages. Else statement can be\r\n // modified/removed without consequence.\r\n message.channel.send(\"------------------\");\r\n message.channel.send(\"I AM FINISHED!!!\");\r\n message.channel.send(\"------------------\");\r\n }\r\n } catch (error) {\r\n sendSpamMessage();\r\n }\r\n }", "title": "" }, { "docid": "fded3daf9bbc6c2f76716ebc6f7fc947", "score": "0.5342099", "text": "hello(message)\n {\n message.reply(\"Hello \" + message.author.username + \" !\");\n Logs.sebas_has_been(\"hello\", message);\n }", "title": "" }, { "docid": "176be045490522d1a7bdace86d9cd8d6", "score": "0.5332023", "text": "async handleChat(text) {\n\n if (text === \"/joke\") {\n //return a joke\n try {\n const joke = await Joke.getJoke();\n\n this.send(JSON.stringify({ type: \"get-joke\", text: joke }));\n\n } catch (error) {\n //if can't get a joke back\n this.send(JSON.stringify({ type: \"get-joke\", text: \"no joke for you\" }));\n }\n } else if (text === \"/members\") {\n //list all members\n this.send(JSON.stringify({ type: \"members\", text: this.room.getMemberNames() }));\n\n } else if (text.startsWith(\"/name \")) {\n //change username\n const msgParts = text.split(\" \");\n const username = msgParts[1];\n const oldname = this.name;\n this.name = username;\n\n this.room.broadcast({\n type: \"note\",\n text: `${oldname} has been changed to ${username}`\n });\n\n } else if (text.startsWith(\"/priv \")) {\n //send to one user only\n const msgParts = text.split(\" \");\n const username = msgParts[1];\n const msg = `${text.substring(6 + username.length)}(Private message)`;\n\n const member = this.room.getMember(username);\n\n if (member != null) {\n const data = {\n name: this.name,\n type: \"chat\",\n text: msg\n };\n this.send(JSON.stringify(data));\n member.send(JSON.stringify(data));\n } else {\n this.send(JSON.stringify({\n type: \"note\",\n text: `can't find member with username ${username}`\n }));\n }\n\n } else {\n\n this.room.broadcast({\n name: this.name,\n type: 'chat',\n text: text\n });\n }\n\n }", "title": "" }, { "docid": "7b9833fdc33515e81adbb405d1474a7f", "score": "0.5331261", "text": "function send_message() { \n var msg = badwords(length30($.trim($('#tx-mess').val())));\n var unique = uniqueid(8);\n var format = getfmt();\n var emot = contchar(msg, ':');\n if (emot>6) {\n\t\tnotif({\n msg: \"<b>Opss</b> No se admite m&aacute;s de 3 gif...\",\n type: \"warning\",\n position: \"center\"\n });\n return false;\n }\n if (bloking['user_'+tabsel]) {\n\t\tnotif({\n msg: \"<b>Opss</b> *** Tienes bloqueado al usuario...\",\n type: \"warning\",\n position: \"center\"\n });\n return false;\n }\n if (msg=='' || $('#tx-mess').attr('disabled')) return false;\n write_msg(yo,tabsel,'msg',escape(msg),format,unique);\n $('#tx-mess').val('');\n cliente.init = 0;\n cmd.add({act:'message',from:tabsel,msg:escape(msg),ap:unique,format:format},1);\n}", "title": "" }, { "docid": "224b8f9590ce00dbdc5a616a0cf15d28", "score": "0.53228515", "text": "notifyAll(msg) {\n this.users.forEach(user => {\n user.socket.emit('RECEIVE_MESSAGE', {group: this.name, msg: msg})\n })\n }", "title": "" }, { "docid": "4f1036cc5e71584c1b2777c9601c5db5", "score": "0.5318501", "text": "async function onMessageHandler(target, context, msg, self) {\n\t\n if (self) {\n return;\n } // Ignore messages from the bot\n if (channels_on_cooldown.has(target)){\n \tconsole.log(`channel ${target} on cooldown, cannot execute`);\n \treturn;\n }\n\n // check if the command from bot channel\n const parts_of_msg = msg.split(\" \");\n if (target === \"#lqfplbot\" && parts_of_msg[0] == '!connect') {\n \tconsole.log('got new request from user');\n const username = context.username;\n \ttry{\n \t\tif (parts_of_msg.length != 2){\n \t\t\tthrow new Error('wrong faceit nickname');\n \t\t}\n \t\tconst id = await fc.nickname_to_id(parts_of_msg[1]);\n \t\tif (id == undefined){\n \t\t\tthrow new Error('wrong faceit nickname');\n \t\t}\n \t\tawait client.join(username);\n \t\tawait mongo.add_to_database(username, parts_of_msg[1], id);\n \t\tconsole.log(`successful command from ${username}`);\n \t\tawait client.say(target, `@${username} successfully connected`);\n \t}catch (e){\n \t\tawait client.say(target, `@${username} something went wrong :( (${e})`);\n \t\tconsole.log(e);\n \t\treturn;\n \t}\n \t\n } else if (parts_of_msg[0] == '!lineup' && parts_of_msg.length == 1 && target != \"#lqfplbot\"){\n \tconst result = await mongo.get_lineup(target.substr(1));\n \tawait client.say(target, result);\n }else if (target === \"#lqfplbot\" && parts_of_msg[0] == '!leave'){\n \tconst username = context.username;\n \ttry{\n \t\tif (parts_of_msg.length != 1){\n \t\t\tthrow new Error('wrong command');\n \t\t}\n \t\tawait mongo.delete_channel(client, username);\n \t\tawait client.part(username);\n\n \t\t\n \t\tawait client.say(target, `@${username} I successfully left your channel`);\n \t\tconsole.log(`deleted ${username} from me`);\n \t}catch (e){\n \t\tawait client.say(target, `@${username} something went wrong :( (${e})`);\n \t\tconsole.log(e);\n \t\treturn;\n \t}\n }\n channels_on_cooldown.add(target);\n console.log(`setting cooldown for channel ${target}`);\n setTimeout(function(){\n \tchannels_on_cooldown.delete(target);\n }, cooldown * 1000);\n}", "title": "" }, { "docid": "429ae92d9a57c4d5a6cf275f8365cd6a", "score": "0.5315728", "text": "fakeMessage(object) {\n return new Discord.Message(Object.assign({\n id: ((Date.now()-1420070400000)<<22).toString(),\n timestamp: Date.now(),\n edited_timestamp: null,\n mention_everyone: false,\n mentions: [],\n mention_roles: [],\n attachments: [],\n embeds: [],\n type: 0,\n pinned: false\n }, object), bot);\n }", "title": "" }, { "docid": "6f6c7e2ac20cf9a79371945d64509e2f", "score": "0.53047776", "text": "function send() {\n if (msg.value.length > 0) { // don't sent empty msg.\n console.log(msg.value)\n channel.push('shout', { // send the message to the server\n name: sanitise(name.value), // get value of \"name\" of person sending\n message: sanitise(msg.value), // get message text (value) from msg input\n lobby_id: room // Payload have the lobby id\n });\n msg.value = ''; // reset the message input field for next message.\n }\n}", "title": "" }, { "docid": "1037c5e45054eb0ccc8b8acf8c65638b", "score": "0.53031063", "text": "function broadcast(message, sender) {\n return;\n clients.forEach(function (client) {\n // Don't want to send it to sender\n if (client === sender) return;\n client.write(message);\n });\n // Log it to the server output too\n process.stdout.write(message)\n }", "title": "" }, { "docid": "a0637051dd0db735919113e0815169d5", "score": "0.52901727", "text": "async function discordSendMsg(userId, message) {\n const user = await obj.discordClient.users.fetch(userId).catch(function () { return null; });\n if (!user) return;\n await user.send(message).catch(function (ex) { console.log('Discord Error', ex); });\n }", "title": "" }, { "docid": "893d6935038cc5d46a15eeacd3345273", "score": "0.5286107", "text": "function respondDM(message) {\n let msgs = [\n 'Come on... I\\'m not available here... \\n https://media3.giphy.com/media/mfGYunx8bcWJy/giphy.gif',\n '*sigh* Why did you PM me https://68.media.tumblr.com/d0238a0224ac18b47d1ac2fbbb6dd168/tumblr_nselfnnY3l1rpd9dfo1_250.gif',\n 'I don\\'t work here ¯\\\\\\_(ツ)_/¯ http://cloud-3.steamusercontent.com/ugc/576816221180356023/FF4FF60F13F2A773123B3B26A19935944480F510/'];\n let msg = msgs[Math.floor(Math.random() * msgs.length)];\n message.channel.send(msg);\n}", "title": "" }, { "docid": "c9468ca6fba99a290cccafe9bf0391ae", "score": "0.52848846", "text": "function print(){\r\n\r\n logger.info(\"about to print \" + messages[0]);\r\n\t//while there are still messages to send\r\n if(messages.length > 0){\r\n\t\t//using discord api to send messages to specified channel\r\n \tbot.sendMessage({\r\n to: channelID,\r\n message: messages[0]\r\n });\r\n\t\t//remove the send message from the global lsit\r\n messages.shift();\r\n\t\t//restart function with time delay before next message is sent\r\n setTimeout(function(){print()}, 1000);\r\n }\r\n}", "title": "" }, { "docid": "2321765363c0b5bcd761086459b6562c", "score": "0.52827156", "text": "function sendMessage() {\n\t\tconst msgBox = $(' #message ');\n\t\tconst msg = msgBox.val();\n\t\tif (userID === '') {\n\t\t\talert('You did not receive ID due to system error');\n\t\t} else if (!msg) {\n\t\t\t// do not send empty messages\n\t\t\treturn;\n\t\t}else {\n\t\t\tsock.send(msg);\n\t\t\tmsgBox.val('').focus();\n\t\t}\n\t}", "title": "" }, { "docid": "ecdbc2b5b822c61889c4356ee0ff9c50", "score": "0.5279327", "text": "function reply(msg, dm, prefix, pubtext, privtext) {\n if (dm) {\n // Try to send the message privately\n if (typeof privtext === \"undefined\")\n privtext = pubtext;\n else\n privtext = pubtext + \"\\n\\n\" + privtext;\n msg.author.send(privtext).catch((err) => {\n reply(msg, false, prefix, \"I can't send you direct messages. \" + pubtext);\n });\n return;\n }\n\n // Try to send it by conventional means\n msg.reply((prefix ? (prefix + \" <(\") : \"\") +\n pubtext +\n (prefix ? \")\" : \"\")).catch((err) => {\n\n // If this wasn't a guild message, nothing to be done\n var guild = msg.guild;\n if (!guild)\n return;\n\n /* We can't get a message to them properly, so try to get a message out\n * that we're stimied */\n guild.channels.some((channel) => {\n if (channel.type !== \"text\")\n return false;\n\n var perms = channel.permissionsFor(client.user);\n if (!perms)\n return false;\n\n if (perms.hasPermission(\"SEND_MESSAGES\")) {\n // Finally!\n channel.send(\"Sorry to spam this channel, but I don't have privileges to respond in the channel you talked to me in! Please give me permission to talk :(\");\n return true;\n }\n\n return false;\n });\n\n try {\n // Give ourself a name indicating error\n guild.members.get(client.user.id).setNickname(\"ERROR CANNOT SEND MESSAGES\").catch(() => {});\n } catch (ex) {}\n\n });\n}", "title": "" }, { "docid": "e923fa5b95a6185655f0e0e794056199", "score": "0.52775645", "text": "async execute(message, args, Discord, client, cmd) {\r\n // Firstly, we're getting the mentioned user to the variable (or we're getting the message author if there's not);\r\n const userTarget = message.mentions.users.first || message.author;\r\n\r\n // Secondly, we need to change this\r\n const memberTarget = message.guild.members.cache.get(userTarget.id);\r\n\r\n message.channel.send(\r\n new Discord.MessageEmbed()\r\n .setColor(\"#B5BFFF\")\r\n .setAuthor(\r\n `Info about ${message.author.tag}.`,\r\n message.author.displayAvatarURL({ dynamic: true })\r\n )\r\n .addFields(\r\n {\r\n name: \"When user joined Discord?\",\r\n value: userTarget.createdTimestamp().toLocaleDateString(),\r\n },\r\n {\r\n name: \"When user joined this guild?\",\r\n value: memberTarget.joinedTimestamp().toLocaleDateString(),\r\n },\r\n { name: \"How many roles does this member has got?\" }\r\n )\r\n );\r\n }", "title": "" }, { "docid": "e7987329161f569c23df5a67b53bd7b8", "score": "0.52754873", "text": "static action (message) {\n\n // On récupère le chiffre paramètre (si il y en as un ou non) et on défini le nombre de messages à supprimer\n let args = message.content.split(' ')\n let messagesToClean = args[1] && !isNaN(args[1]) ? Number(args[1]) : 100\n\n // Effacement des messages du channel texte\n if (message.channel.permissionsFor(message.member).has(\"MANAGE_MESSAGES\")) {\n message.channel.fetchMessages({\n limit: messagesToClean\n }).then(messages => {\n messages.forEach(message => {\n return message.delete()\n })\n })\n } else {\n message.reply(`Vous avez pas les droits nécessaires pour lancer cette commande.`)\n .then(msg => console.log(`Réponse pour ${message.author}`))\n .catch(console.error)\n }\n }", "title": "" }, { "docid": "7b02682210924a3fbeb9079eababc7d0", "score": "0.5271837", "text": "function errorNoMod(message, commandName) {\n const embMsg = new MessageEmbed()\n .setTitle('Error!')\n .setColor('#FF0000')\n .setDescription('You do not have permission to use this command. This command requires *BOT MOD* access to use!');\n if (message.channel.guild != undefined) {\n message.channel.send(embMsg).then(msg => {msg.delete({ timeout: 15000, reason: 'Cleanup.' })});\n addToLog('Warning', commandName, message.author.tag, message.guild.name, message.channel.name, \"Not Bot Moderator!\");\n message.delete({ timeout: 15000, reason: 'Cleanup.' });\n }\n else {\n message.channel.send(embMsg);\n addToLog('Warning', commandName, message.author.tag, 'Direct Message', 'Direct Message', \"Not Bot Moderator!\");\n }\n}", "title": "" }, { "docid": "fcd472ca12f74d92af32b82e988087e8", "score": "0.5271458", "text": "function schadenfreude(author, message, text){\n userArray[author].schadenfreude(message.channel);\n}", "title": "" }, { "docid": "f8689fcf65cd296cfbd1418be781aa24", "score": "0.52655536", "text": "function admins(ctx, callBack = (e) => {}) {\n if (ctx.from.isAdmin || ctx.chat.id === ctx.from.id || ctx.from.username == \"GroupAnonymousBot\") {\n callBack();\n return true;\n } else {\n ctx.reply(\"هذا امر مخصص للمشرفين\");\n return false;\n }\n}", "title": "" }, { "docid": "c83767026a168449cbb4635e01bee7df", "score": "0.5258539", "text": "handleChannelMessage(message){\n Object.keys(message).forEach(uid => {\n if(this.players[uid]) {\n this.players[uid].setInput(message[uid]);\n }\n });\n }", "title": "" }, { "docid": "658f9221690ded6c3f1180c736d15a8f", "score": "0.5253952", "text": "function sendToAll(data, myId) {\n console.log('Send to all.');\n console.log('myId: ' + myId);\n Object.keys(clients).forEach((clientID) => {\n if (clientID != myId) {\n console.log('sending to ' + clientID);\n clients[clientID].send(`Data from client ID ${myId}: ${data}`);\n }\n });\n}", "title": "" }, { "docid": "19b10a387f7d5df3ab02ad645e5f6735", "score": "0.5253887", "text": "execute(message, args) {\n message.channel.send('no');\n }", "title": "" }, { "docid": "63196fed2036f233fb175a88963d4f5c", "score": "0.52466905", "text": "function sendMessage(channel, message){\n\n //Sets bot nickname to unreadable character.\n if(config.change_bot_nickname)\n channel.guild.members.get(client.user.id).setNickname('`'); \n\n channel.send(`${message} `, {tts: true}).then( (message) => {\n if(config.delete_messages) message.delete(); \n }, config.delete_delay); \n\n //Revert bot nickname to it's original name (specified in console).\n if(config.change_bot_nickname)\n channel.guild.members.get(client.user.id).setNickname(config.bot_name); \n}", "title": "" }, { "docid": "caaf8231dee4d14d09ae5ad8fd2fedd5", "score": "0.5234158", "text": "announce( message ) {\n winston.debug( chalk.bgRed( 'Server sending message to all clients' ) )\n for ( let ws of ClientStore.clients ) {\n ws.send( JSON.stringify( message ) )\n }\n }", "title": "" }, { "docid": "38ab5bbfaa06912b13d7071ce04c76e5", "score": "0.52334064", "text": "sendModsByUser(user, text) {\n\t\tthis.sendMods('|c|' + user.getIdentity(this.roomid) + '|/log ' + text);\n\t}", "title": "" }, { "docid": "d0e6c717a932cc5bc02e3e882486274f", "score": "0.52268356", "text": "function sendChatMessage(){\n // get message field content\n var message = q( \"#message_field\" ).value;\n // if a chat room name has been set ...\n if( message ){\n // for each data channel present in \"dataChannels\" object ...\n for( var id in dataChannels ){\n // ... send a message\n dataChannels[ id ].send( message );\n }\n // display the sent message\n displayMessage( \"me\", message );\n // reset message field content\n q( \"#message_field\" ).value = \"\";\n }\n}", "title": "" }, { "docid": "5cf25130145e598733432eba4ba52598", "score": "0.52224964", "text": "function broadcast(message, sender) {\n clients.forEach(function (client) {\n // Don't want to send it to sender\n if (client === sender) return;\n client.socket.write(message);\n });\n // Log it to the server output too\n process.stdout.write(message)\n }", "title": "" }, { "docid": "ad4a9e461389851fd4dc1fde69713c49", "score": "0.5216795", "text": "onPrivateMessageCommand(player, target, unprocessedMessage) {\n if (player === target) {\n player.sendMessage(Message.COMMUNICATION_PM_SELF);\n return;\n }\n\n if (this.visibilityManager.isPlayerOnIgnoreList(player, target)) {\n player.sendMessage(Message.COMMUNICATION_PM_IGNORED);\n return;\n }\n\n const message = this.communication_().processForDistribution(player, unprocessedMessage);\n if (!message)\n return; // the message was blocked\n\n // Check if the recieving |target| is muted and not allowed to recieved PMs.\n // And that the sending |player| is NOT an administrator.\n const muteTime = this.muteManager.getPlayerRemainingMuteTime(target);\n if (muteTime !== null && !player.isAdministrator()) {\n const durationText = relativeTime({\n date1: new Date(),\n date2: new Date(Date.now() + muteTime * 1000)\n }).text;\n\n player.sendMessage(\n Message.COMMUNICATION_PM_TARGET_MUTED, target.name, target.id, durationText);\n\n return;\n }\n\n player.sendMessage(Message.COMMUNICATION_PM_SENDER, target.name, target.id, message);\n\n if (!this.visibilityManager.isPlayerOnIgnoreList(target, player)) {\n target.sendMessage(Message.COMMUNICATION_PM_RECEIVER, player.name, player.id, message);\n target.playSound(kMessageReceivedSoundId);\n }\n\n this.nuwani_().echo(\n 'chat-private', player.name, player.id, target.name, target.id, message);\n\n const adminMessage =\n Message.format(Message.COMMUNICATION_PM_ADMIN, player.name, player.id, target.name,\n target.id, message);\n\n // Inform in-game administrators about the message as well.\n for (const otherPlayer of server.playerManager) {\n if (otherPlayer.isAdministrator() && otherPlayer !== player && otherPlayer !== target)\n otherPlayer.sendMessage(adminMessage);\n }\n\n // Store the interaction to enable |target| to use the `/r` command. This could enable the\n // |target| to use `/spm` without an exception, but hey, that's probably ok.\n this.previousMessage_.set(target, {\n type: DirectCommunicationCommands.kPM,\n userId: player.account.userId,\n id: player.id,\n name: player.name,\n });\n }", "title": "" }, { "docid": "059b43b878d2cda23fcba370fa2e8839", "score": "0.52118593", "text": "handleServerMessage(msg) {\n bot.sendMessage(chatID, msg);\n }", "title": "" }, { "docid": "a83a90db81d584fd41bcca0739a92d02", "score": "0.52117926", "text": "function SendNewMessegeToDiscord(msgContent, channelName = process.env.DEFAULT_CHANNEL) {\n try {\n PrintToConsle(\"Sending messege to Discord: \" + msgContent);\n let channel = Client.channels.find('name', channelName);\n channel.send(msgContent);\n }\n catch (error) {\n console.error(error);\n }\n}", "title": "" }, { "docid": "e40c1512daef0588510ce50d94764a90", "score": "0.52010375", "text": "broadcast(data, excludes = []) {\n for (let member of this.members) {\n if (excludes && excludes.includes(member.name)) {\n continue;\n }\n member.send(JSON.stringify(data));\n }\n }", "title": "" }, { "docid": "35c8aaea346de3c7cab01639d404b913", "score": "0.5200081", "text": "function applyMessage(message){\n socket.emit(\n 'msgToClient',\n {\n nickname: 'Watson', \n message: message\n }\n );\n }", "title": "" }, { "docid": "7aa22ec7e209152ea06ccfeac36ce86a", "score": "0.51992434", "text": "async function purge() {\n // Let's delete the command message, so it doesn't interfere with the messages we are going to delete.\n if(!message.member.roles.some(r=>[\"OWNERS\", \"Admin\", \"Mod\", \"Creator\", \"Moderators\", \"Global Moderators\", \"NX++\"].includes(r.name)) )\n return message.reply(\"You need the \\`moderators role\\` to use this command.\");\n // We want to check if the argument is a number\n if (isNaN(args[0])) {\n // Sends a message to the channel.\n message.channel.send('Please use a number as your arguments. \\n Usage: \\`' + prefix + 'clean <amount>\\`'); //\\n means new line.\n // Cancels out of the script, so the rest doesn't run.\n return;\n }\n\n const fetched = await message.channel.fetchMessages({limit: args[0]}); // This grabs the last number(args) of messages in the channel.\n console.log(fetched.size + ' messages found, deleting...'); // Lets post into console how many messages we are deleting\n\n // Deleting the messages\n message.channel.bulkDelete(fetched)\n return message.reply(`successfully deleted ${args[0]} messages`);\n \n }", "title": "" }, { "docid": "7a7ea1025d9e90308ed6e55dcbcaa862", "score": "0.51948243", "text": "function sendTextMessage(e) {\n e.preventDefault();\n const db = props.firebase.getDB();\n\n let channelId = uid > friendID ? `${uid}<=>${friendID}` : `${friendID}<=>${uid}`;\n\n if (textMessage.length > 0) {\n try {\n db.ref(`/channels/${channelId}/thread`).push({\n date: new Date().toISOString(),\n author: uid,\n type: 'TEXT',\n content: textMessage\n })\n setTextMessage('')\n } catch (error) {\n alert(\"Error reading user channels\")\n }\n }\n }", "title": "" }, { "docid": "cddb4e31d5dd583c2714ac87590d816e", "score": "0.51909244", "text": "static handleMessage(userId: string, message: string) {\n botInstance.sendTextMessage(userId, \"Right back at you\");\n }", "title": "" }, { "docid": "5ed9abf275242bbcd4ef526f019acb50", "score": "0.5180708", "text": "function warnCustom(message, text, commandName) {\n const embMsg = new MessageEmbed()\n .setTitle('Warning!')\n .setColor('#F8AA2A')\n .setDescription(text);\n if (message.channel.guild != undefined) {\n message.channel.send(embMsg).then(msg => {msg.delete({ timeout: 15000, reason: 'Cleanup.' })});\n addToLog('Warning', commandName, message.author.tag, message.guild.name, message.channel.name, text);\n message.delete({ timeout: 15000, reason: 'Cleanup.' });\n }\n else {\n message.channel.send(embMsg);\n addToLog('Warning', commandName, message.author.tag, 'Direct Message', 'Direct Message', text);\n }\n}", "title": "" }, { "docid": "592d67fe7d895aaee99e4d095ba8398d", "score": "0.5168572", "text": "function submode(target, context, msg, self, commandName){\r\n subonly = !subonly; // Boolean toggle\r\n var mode;\r\n if (subonly === true) {\r\n mode = 'sub only';\r\n }\r\n else {\r\n mode = 'free for all';\r\n }\r\n client.say(target, `/me is in ${mode} mode.`) // Message the chat room\r\n .catch(err => {\r\n console.log(err);\r\n });\r\n}", "title": "" }, { "docid": "cecb386a9a5e7c339596baf9876b34f3", "score": "0.51680815", "text": "function onMessageHandler (target, context, msg, self) {\r\n // Remove whitespace from chat message and take the first word\r\n const commandName = msg.trim().split(' ')[0];\r\n\r\n if (coolingdown) { // If cooling down, keep monitoring chat but do not respond\r\n console.log('cooling down...');\r\n return; \r\n }\r\n\r\n else {\r\n if (self) { return; } // Ignore messages from the bot\r\n\r\n var subbed = context.subscriber; // Variable to check if message is from a subscriber\r\n \r\n // Toggle submode if channel owner or moderator\r\n if (context.username === `${opts.channels[0].split(\"#\").pop()}` || context.mod === true) {\r\n if (commandName === '!submode') {\r\n submode(target, context, msg, self);\r\n return;\r\n }\r\n }\r\n\r\n // If sub mode is enabled and chatter is not a sub, then return.\r\n if (subonly && !subbed) {\r\n return;\r\n }\r\n\r\n else { \r\n for (i=0; i < obsData.length - 1; i++) {\r\n // If command name in chat matches and it is not a channel point redemption\r\n if (commandName == obsData[i][4][1] && obsData[i][3][1] == 'FALSE') {\r\n sourceName = obsData[i][1][1];\r\n sceneName = obsData[i][0][1];\r\n timeS = (parseFloat(obsData[i][2][1])); // Change string duration to a float\r\n\r\n activateSource(commandName, sourceName, sceneName); // Enable source visibility\r\n coolingdown = true; // Sets a cooldown variable to true\r\n setTimeout(cooldown, timeS*1000); // Resets cooldown to false and disables visibility after a set timeout\r\n return;\r\n }\r\n }\r\n }\r\n //console.log(`* Unknown command ${commandName}`);\r\n }\r\n}", "title": "" }, { "docid": "4ec44ab9e40685746852bea1a9b8f1ec", "score": "0.51666456", "text": "function chat(msg, text) { // msg = message object, text is actual text of message\n text = msg.content.toLowerCase();\n if (text.includes('hello') || text.includes('hi') || text.includes('hey')) {\n msg.channel.send(\"Hello\");\n }\n\tif (text.includes(\"free\")) {\n\t\tmsg.channel.send(\"Sorry, I have work to do.\")\n\t}\n else {\n msg.channel.send(\"Do you need something?\");\n }\n}", "title": "" }, { "docid": "e2e5da3bd43366493306f80dfb88c2b9", "score": "0.5163211", "text": "function getUserMentions(message) {\n let entities = message.entities || [];\n let botMri = message.address.bot.id.toLowerCase();\n return entities.filter(entity => (entity.type === \"mention\") && (entity.mentioned.id.toLowerCase() !== botMri));\n}", "title": "" }, { "docid": "5e6e17fcc9a889f7387a060c1f764e99", "score": "0.51608986", "text": "function bot_onMessageHandler (target, context, msg, self) {\n if (self) { return; } // Ignore messages from the bot\n\n // Remove whitespace from chat message\n const cmd = msg.trim().split(\" \");\n\n if (cmd[0].charAt(0) != '!') { return; } // Ignore messages that don't begin with \"!\"\n\n // If the command is known, let's execute it\n if (cmd[0] === '!test') {\n console.log('Command \"!test\" received');\n } else {\n console.log(\"*** Unknown bot/command\" + cmd[0] + \"***\");\n }\n}", "title": "" }, { "docid": "244102cf283f50f15cacd3c4f4d9a45e", "score": "0.5157727", "text": "isMessageSentByAdmin(message) \n {\n let adminRoleName = Config.adminRole;\n return message.member.roles.find(\"name\", adminRoleName) != null;\n }", "title": "" }, { "docid": "ae30f9545de03c966368ad697df3401f", "score": "0.51576704", "text": "function triggerGroupReminder(reactID, userID, dateNtime, channelID, serverID, roleID, message) {\n client.guilds.get(serverID).channels.get(channelID).send(`Reminder for <@&${roleID}> at ${dateNtime.toString().substring(0, 33)} from <@!${userID}>: ${message}`);\n dbConn.query(`DELETE FROM multiple WHERE react_id = ${reactID}; DELETE FROM id WHERE react_id = ${reactID};`, function (item) {});\n}", "title": "" }, { "docid": "c34857d5d72ea78b2dafd6c88fc68d60", "score": "0.51558244", "text": "function sendAll (message) {\n\t//console.log(\"SENDALL CALLED, \",message);\n\tfor (const [key, value] of Object.entries(CLIENTS)) {\n value.ws.send(message);\n\t\t//console.log(\"sent to \",key);\n }\n}", "title": "" }, { "docid": "e79c980c418c4e81ff7ba54c7f9dc10e", "score": "0.5153057", "text": "function sendMessage(id) {\n var msg = $('#' + id + ' .userinput').val();\n socket.emit('from:private message', {to: id, message: msg});\n $('#' + id + ' .popup-messages').append(\"<div class='userwrap'><span class='user'>me:</span><span class='messages'>\" + msg + \"</span></div>\");\n $('#' + id + ' .popup-messages').scrollTop($('#' + id + ' .popup-messages').height());\n $('#' + id + ' .userinput').val('');\n $('#' + id + ' .userinput').focus();\n\n }", "title": "" }, { "docid": "24c148d34dc3a9b7b7b6bcf9322a34f5", "score": "0.51500696", "text": "function demo(message) {\n return __awaiter(this, void 0, void 0, function* () {\n console.log(message);\n if (!message.msg)\n return;\n if (/tell everyone/i.test(message.msg)) {\n const match = message.msg.match(/tell everyone (.*)/i);\n if (!match || !match[1])\n return;\n const sayWhat = `@${message.u.username} says \"${match[1]}\"`;\n const usernames = yield __1.api.users.allNames();\n for (let username of usernames) {\n if (username && username !== config_1.botUser.username) {\n const toWhere = yield __1.driver.getDirectMessageRoomId(username);\n yield __1.driver.sendToRoomId(sayWhat, toWhere); // DM ID hax\n yield delay(200); // delay to prevent rate-limit error\n }\n }\n }\n else if (/who\\'?s online/i.test(message.msg)) {\n const names = yield __1.api.users.onlineNames();\n const niceNames = names.join(', ').replace(/, ([^,]*)$/, ' and $1');\n yield __1.driver.sendToRoomId(niceNames + ' are online', message.rid);\n }\n });\n}", "title": "" } ]
43c2c09c534289717a758a4b5b04a292
Convenience method which can be used in custom form scripts. Do not change.
[ { "docid": "15b1d48f0165980025fd8efdd00d80be", "score": "0.0", "text": "function onValueSave( fn )\r\n{\r\n\t$( 'body' ).off( EVENT_VALUE_SAVED ).on( EVENT_VALUE_SAVED, fn );\r\n}", "title": "" } ]
[ { "docid": "ad422feec6396503a8814942a5a06ab8", "score": "0.6088203", "text": "get form() { return this._internals.form; }", "title": "" }, { "docid": "8643a897ea53dcdb5ac184e34ea4636f", "score": "0.5864329", "text": "setFormField(){\r\n\t\tthis.resetFormFields();\r\n\t\t$.each(this.databaseIndexIndexComponent.selectedTableFields.fields, (key, val) => {\r\n\t\t\tthis.formFields[val.name] = {\r\n\t\t\t\tvalue: '',\r\n\t\t\t\toption: {\r\n\t\t\t\t\tis_hashed: false,\r\n\t\t\t\t\tprimary: typeof val.primary != 'undefined' ? val.primary : false\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t\tsetTimeout(() => {\r\n\t\t\t$('#modalDatabaseAddEditData').modal('show');\r\n\t\t}, 100);\r\n\t}", "title": "" }, { "docid": "cf442842b34e9a34b5438d61ab731fce", "score": "0.58316094", "text": "setFormValue(_jsOtherValue){\n \t if (!(typeof _jsOtherValue == \"undefined\")){\n \t \t this.$jsValue = _jsOtherValue;\n \t \t this.$_tag = [];\n \t \t this.removeForm();\n\t \t this.createForm();\n \t }\n }", "title": "" }, { "docid": "7448827b3a5e260c4c892e051192f519", "score": "0.5829565", "text": "function updateForms() {\n\n}", "title": "" }, { "docid": "19b9d699ee81e160d2c3a44fc038b7c0", "score": "0.5824126", "text": "function preProcess() {\n\t/* Eventually add some values to the form */\n}", "title": "" }, { "docid": "60f205493a30af8ed1c1f8f3c04f01b7", "score": "0.57913244", "text": "static get formAssociated() {\n return true;\n }", "title": "" }, { "docid": "60f205493a30af8ed1c1f8f3c04f01b7", "score": "0.57913244", "text": "static get formAssociated() {\n return true;\n }", "title": "" }, { "docid": "412ecc88994b05f20c2c5af495dc1f36", "score": "0.57736653", "text": "function processForm(){\r\n\r\n}", "title": "" }, { "docid": "62035b683feb53a457b902791a1085d5", "score": "0.57725817", "text": "function Form() {\n \n}", "title": "" }, { "docid": "c4e17cf7a20d70e83951ee98d042370e", "score": "0.5717873", "text": "onAdd() {\n this.toggleFormDisplay(true);\n }", "title": "" }, { "docid": "8ee208da202950570e78dde87b57df9b", "score": "0.5665995", "text": "onChangeLegalForm() {\n this.generateAvailableField();\n this.directoryForm = assign(\n this.directoryForm,\n omit(this.directory, 'legalForm'),\n );\n switch (this.directoryForm.legalForm) {\n case 'individual':\n this.directoryForm.siret = '';\n this.directoryForm.ape = '';\n this.directoryForm.socialNomination = '';\n this.directoryForm.socialNominationExtra = '';\n this.directoryForm.directoryServiceCode = '';\n this.directoryForm.PJSocialNomination = '';\n this.directoryForm.occupation = '';\n break;\n case 'professional':\n this.directoryForm.name = '';\n this.directoryForm.firstName = '';\n break;\n case 'corporation':\n this.directoryForm.name = '';\n this.directoryForm.firstName = '';\n this.directoryForm.occupation = '';\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "906469e017716ddaa3ac0d5aa086e58f", "score": "0.5628662", "text": "function k(e,i,t,l){a(e,i,t),\"function\"==typeof l&&l(),ti.trigger({type:gi.forminserted,srcurl:e,srcindex:i,index:t}),ti.trigger(gi.formschanged)}", "title": "" }, { "docid": "906469e017716ddaa3ac0d5aa086e58f", "score": "0.5628662", "text": "function k(e,i,t,l){a(e,i,t),\"function\"==typeof l&&l(),ti.trigger({type:gi.forminserted,srcurl:e,srcindex:i,index:t}),ti.trigger(gi.formschanged)}", "title": "" }, { "docid": "0d5a7de2e38d8c66f6cf5c4765b9f942", "score": "0.5579694", "text": "function updateForm() {\n\n}", "title": "" }, { "docid": "124cf2b5eb2e9088f6fc3ad2afacd9f9", "score": "0.55494434", "text": "get form() {\n\t\treturn this.__form;\n\t}", "title": "" }, { "docid": "beab55e9156a6ef1c935936d27a68ddb", "score": "0.55343837", "text": "function initCustomForms() {\n\tjcf.setOptions(\"Select\", {\n\t\twrapNative: false,\n\t});\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "25c2cf4d26a628588b8f16b70f9587f8", "score": "0.55185646", "text": "function initCustomForms() {\n\tjcf.setOptions('Select', {\n\t\twrapNative: false\n\t});\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "b0b44ead258d2ed929b603927680dbe8", "score": "0.55120605", "text": "formAssociatedCallback(nullableForm) {\n console.log('Form associated.');\n }", "title": "" }, { "docid": "fa89c85820839d5851843124dbc138c7", "score": "0.5506135", "text": "function initCustomForms() {\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "fa89c85820839d5851843124dbc138c7", "score": "0.5506135", "text": "function initCustomForms() {\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "fa89c85820839d5851843124dbc138c7", "score": "0.5506135", "text": "function initCustomForms() {\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "8fe889a494b447753506a46ad5e28a38", "score": "0.54745716", "text": "renderField() {\n /* */\n throw new Error(\"renderField should be overidden by a widget subclass!\")\n }", "title": "" }, { "docid": "ee959828dbdaded989d94edad2981cf7", "score": "0.54522026", "text": "_onInputSubmit() {}", "title": "" }, { "docid": "0a55e7b7685a19d00f2f9959f0d48bc9", "score": "0.54470414", "text": "get form() {\n return matchNearestParent(this, tagNameConditionPredicate(['form']));\n }", "title": "" }, { "docid": "5f649a79af85d1215176cb35c97d10d7", "score": "0.543764", "text": "getFieldProps({ formFields, formRules, formHiddenList }, fieldName) {\n let props = {};\n props.labelWidth = this.props.labelWidth || 300;\n\n if (_.has(formFields, fieldName)) {\n props.key = fieldName;\n props.name = fieldName;\n props.label = formFields[fieldName].label;\n props.placeholder = formFields[fieldName].placeholder;\n props.help = formFields[fieldName].help;\n props.hidden = false;\n props.disabled = false;\n\n props.edit = false;\n props.showRequired = true;\n\n if (this.props.edit === FormEditStates.SELECTED) {\n props.edit = this.state.selection === fieldName;\n props.showRequired = props.edit;\n props.allowEdit = true;\n } else if (this.props.edit === FormEditStates.ALWAYS) {\n props.edit = true;\n } else if (this.props.edit === FormEditStates.NEVER) {\n props.showRequired = false;\n }\n\n if (this.props.edit === FormEditStates.TABLE) {\n props.layout = FormGroupLayout.INLINE;\n } else {\n props.layout = this.props.groupLayout;\n }\n\n if (formFields[fieldName].disabled) {\n props.disabled = true;\n }\n\n if (_.contains(formHiddenList, fieldName)) {\n props.disabled = true;\n props.hidden = true;\n }\n } else {\n throw new Error(`Attr '${fieldName}' is not a part of the form schema`);\n }\n\n // If the field is required and validation rules\n if (_.has(formRules, fieldName)) {\n props.required = formRules[fieldName].required;\n props.validation = formRules[fieldName].validation;\n }\n\n // Field value\n if (this.props.value.has(fieldName)) {\n props.value = this.props.value.get(fieldName);\n }\n\n // Callbacks\n props.onSelectItem = (fieldName) => this.handleSelectItem(fieldName);\n props.onErrorCountChange = (fieldName, count) =>\n this.handleErrorCountChange(fieldName, count);\n props.onMissingCountChange = (fieldName, count) =>\n this.handleMissingCountChange(fieldName, count);\n props.onChange = (fieldName, d) => this.handleChange(fieldName, d);\n props.onBlur = (fieldName) => this.handleBlur(fieldName);\n\n return props;\n }", "title": "" }, { "docid": "3868ef3f66a6ed90b83ecf71534a37f9", "score": "0.5434335", "text": "function initCustomForms() {\n\tjcf.setOptions('Select', {\n\t\twrapNative: false,\n\t\twrapNativeOnMobile: false\n\t});\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "d73e534f169409dd3e9ac9937dc350e1", "score": "0.5408637", "text": "function initCustomForms(){\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "975f4ba340d245be8fd246db800c966a", "score": "0.5400462", "text": "static getExecutionConfigurationForm(){\n throw new TypeError(\"Method 'getExecutionConfigurationForm' has to be implemented!\");\n }", "title": "" }, { "docid": "656c4d7383f5fee26aeb5689ea442b1b", "score": "0.5374555", "text": "_getFormOptions() {\n return {\n error: this.state.errors,\n fields: {\n title__c: {\n label: 'Title',\n },\n facilitator_1__c: {\n label: 'Teacher Email 1',\n autoCapitalize: 'none',\n },\n facilitator_2__c: {\n label: 'Teacher Email 2 (optional)',\n autoCapitalize: 'none',\n },\n program__c: {\n label: 'Program',\n },\n start_date__c: {\n label: 'Start Date',\n mode:'date',\n config: {\n format:dateFormat,\n }\n },\n end_date__c: {\n label: 'End Date',\n mode:'date',\n config: {\n format:dateFormat,\n }\n },\n },\n };\n }", "title": "" }, { "docid": "dd9480297c45c3ba80fb1e71a5549e14", "score": "0.53710437", "text": "function ShirtCustionFormValidation() {\n\n}", "title": "" }, { "docid": "d7c2345ebca24c4d2bce6e1cfe2492b3", "score": "0.5359707", "text": "getFormReference(){\n return _formReference.get(this);\n }", "title": "" }, { "docid": "a5f5c13e4daaba5c38f03acf1318bd84", "score": "0.5346458", "text": "function FormBuilder(){}", "title": "" }, { "docid": "183d3ed7292657c0a2a6d4f671e668bf", "score": "0.5343851", "text": "_limpaForm() {\n\n // Reseta os campos para os seguintes valores\n this._inputData.value = '';\n this._inputQuantidade.value = 1;\n this._inputValor.value = 0.0;\n \n // setar o focus do mouse já pra o primeiro item do form.\n this._inputData.focus();\n }", "title": "" }, { "docid": "5400b7e45f58058924c2e21936a51ce6", "score": "0.5317615", "text": "function formSubmit() {\n}", "title": "" }, { "docid": "4c872c6af1724812e13547feb42a0988", "score": "0.53176075", "text": "function OptionInput () {}", "title": "" }, { "docid": "aa28908db2cc663e6c1bacd6421b4a30", "score": "0.5299808", "text": "handleSaveField(fieldName){\n\n let field = document.getElementById(fieldName);\n this.source.personal[fieldName] = (field.value === '' || field.value ===' ') ? this.source.personal[fieldName] : field.value;\n this.updateSource(this.source);\n if(this.state.dataChanged){\n this.setState((prev)=>({dataChanged:false}));\n }\n\n let target = document.getElementById('edit_'+fieldName);\n let targetDiv = document.getElementById(fieldName+\"FormControl\");\n field.value=null;\n targetDiv.classList.add('hidden');\n target.textContent = \"edit\";\n}", "title": "" }, { "docid": "903c1339c675a0d3716e3135b3177526", "score": "0.5291941", "text": "function getOrderFormFromBob() { return makeOrderForm(\"scaffold\"); }", "title": "" }, { "docid": "64bbfd8fbcbd3c1f61a6e99458280e13", "score": "0.5287787", "text": "enableFormNewPostForm() {\n this.form.get('title').enable(); // Enable title field\n this.form.get('content').enable(); // Enable body field\n }", "title": "" }, { "docid": "eac773e71bff9f2ee94ee091d3f24c3f", "score": "0.5283859", "text": "function setForm() {\n switch (typeof formRef) {\n case 'string':\n $form = document.getElementById(formRef);\n break;\n\n case 'object':\n if (isDomElementNode(formRef)) {\n $form = formRef;\n }\n\n break;\n }\n\n return $form;\n }", "title": "" }, { "docid": "069ff590ebb60abc450c306cfba1d2ca", "score": "0.5274085", "text": "updateFormField(e) {\n this.props.updateFormField(e);\n }", "title": "" }, { "docid": "d01c49bbc3fb7676b19542ae899f0203", "score": "0.52621603", "text": "function checkForm() {\n \n}", "title": "" }, { "docid": "c0b6d68b115516a2786a390ee7a7aebe", "score": "0.52482486", "text": "function initCustomForms() {\n\tjcf.setOptions('Select', {\n\t\tmaxVisibleItems: 10,\n\t\twrapNative: false,\n\t\twrapNativeOnMobile: false,\n\t});\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "5e1ca04d5d027d38eb633cb70a57660a", "score": "0.5244167", "text": "function getFormAddPref () {\n var autoAdd, rtnValue = 'ASK';\n var path = dreamweaver.getConfigurationPath() + '/Objects/Forms/formInsert.js';\n var metaFile;\n metaFile = MMNotes.open(path, true);\n if (metaFile) {\n autoAdd = MMNotes.get(metaFile, 'PREF_autoAdd');\n if (autoAdd) rtnValue = autoAdd;\n MMNotes.close(metaFile);\n }\n return rtnValue;\n}", "title": "" }, { "docid": "f38c0d51e3ab6f37166d558f6f280027", "score": "0.52438694", "text": "function CreateForm(){\n}", "title": "" }, { "docid": "e484851bd90c5d855ccad52e81ea0fcf", "score": "0.5239198", "text": "function formFieldModified() {\n // In IE only, event is defined. We only want to respond to changed values. \n if (typeof event != \"undefined\") {\n //alert(\"event.propertyName= \" + event.propertyName);\n if (event.propertyName != \"value\" && event.propertyName != \"checked\")\n return;\n }\n markAssetModified();\n}", "title": "" }, { "docid": "4c7a246dde4ca9844007c7144083ff0a", "score": "0.5236592", "text": "handleFormIDChange(e){\n this.setState({\n formID:e.target.value,\n viewFormSubmissionsIsDisabled:false\n });\n }", "title": "" }, { "docid": "2d840356b1691eda0010af4b4df08fa6", "score": "0.523224", "text": "function uiSystemFormContext(systemFormName){\n var form = document.forms[systemFormName];\n if (!form) window.status = 'Javascript error: cannot find html form with name ' + systemFormName + '!';\n else if (!form.uiProperties){\n uiSystemFormProperties = new UiSystemFormProperties(systemFormName);\n form.uiProperties = uiSystemFormProperties;\n }\n else uiSystemFormProperties = form.uiProperties;\n }", "title": "" }, { "docid": "8a102422f75cd189e001e64f90b11d9f", "score": "0.52290595", "text": "get defaultEditor() {\n return {\n type: 'textfield',\n name: this.field\n };\n }", "title": "" }, { "docid": "ebbef70859796b986549595ff2b95610", "score": "0.5227124", "text": "get f() { return this.form.controls; }", "title": "" }, { "docid": "307191ad9505536f42ab2980a381d8ea", "score": "0.5226716", "text": "function _form_load_formname(formname) {\n\t$j('#_form_formname_text').text(formname);\n\t$j('#_form_formname').removeClass('_form_element_notset');\n}", "title": "" }, { "docid": "1cb6b7b74e52f451f0c7067c0f29a63d", "score": "0.52170753", "text": "handleSubmit(event) {\n event.preventDefault();\n this.makeField()\n }", "title": "" }, { "docid": "cabc478cca745fb52d3d77f3c2c79122", "score": "0.5216806", "text": "setupReturnForm () {\n // Set form submission target (we don't know the id in the view)\n const formAction = `/cdl/${this.figgyId}/return`\n const form = document.getElementById('return-early-form')\n const token = document.querySelector('meta[name=\"csrf-token\"]').content\n form.setAttribute('action', formAction)\n form.lastElementChild.setAttribute('value', this.figgyId)\n // The auth token for the form doesn't work, so use the one for JS in the\n // meta tag.\n document.querySelector(\"input[name='authenticity_token']\").value = token\n }", "title": "" }, { "docid": "abd78c9c535f7228f57af7a50e6b5ecb", "score": "0.5213882", "text": "function formOnChange() {\n const formList = [...formRef.current.elements];\n // console.log(\"INFORMACAO FORM LIST:\", formList);\n\n const texto = formList[0].value;\n\n setDespesa({\n id: despesa.id,\n nome: texto,\n categoria: \"\",\n agua: null,\n aguaIndividual: false,\n rateioAutomatico: false,\n permanente: true,\n fundoReserva: false,\n valor: \"\",\n parcelaAtual: null,\n numParcelas: null,\n informacao: true,\n Valores: [],\n condominioId: condominio.id,\n });\n\n setFormCompleted(texto !== \"\" && texto.length <= 255);\n }", "title": "" }, { "docid": "dbfac2c3325430c0730860eb8353786c", "score": "0.5201131", "text": "function norForm(){\n\t//\t=========================================================================\n\t// \t\tProperties\n\t//\t=========================================================================\n\tvar m_currentItem = this,\n\t\tConfiguration = arguments[0] ? arguments[0] : {}? arguments[0] : {} ,\n\t\tm_method = \"\",\n\t\tm_action = \"\";\n\tConfiguration.ItemType = ItemType.FORM;\n\tConfiguration.Container = document.createElement(\"form\");\n\tBaseItemHTML.apply( m_currentItem, [Configuration] );\n\tObject.defineProperties( m_currentItem , {\n\t\t'Method' : {\n\t\t\tget: function() { return m_method; \t\t\t\t\t\t\t},\n\t\t\t\tset : function( pAttributeValue ) {\n\t\t\t\t\tm_method = pAttributeValue;\n\t\t\t\t\t$( m_currentItem.referenceDOM ).attr(\"method\" , m_method );\n\t\t\t\t}\n\t\t},\n\t\t'Action' : {\n\t\t\tget: function() { return m_action; \t\t\t\t\t\t\t},\n\t\t\t\tset : function( pAttributeValue ) {\n\t\t\t\t\tm_action = pAttributeValue;\n\t\t\t\t\t$( m_currentItem.referenceDOM ).attr(\"action\" , m_action );\n\t\t\t\t}\n\t\t}\n\t});\n\tvar __Init = function(){\n\t\t$( m_currentItem.ElementDOM ).css({\"padding\":\"20px 0px 20px 0px\"});\n\t\tm_currentItem.Size.Width = 350;\n\t\tm_currentItem.Size.Height = 500;\n\t};\n\tthis.ToHTML = function(){\n\t\tvar elementHTML = m_currentItem.GetBaseHTML( document.createElement(\"form\") );\n\t\t$(elementHTML)\n\t\t\t.attr(\"html-type\",\"FORM\");\n\t\treturn elementHTML.outerHTML;\n\t};\n\t__Init();\n\n}", "title": "" }, { "docid": "1b42d3344ce9fd9fb631813a06f488e3", "score": "0.51969516", "text": "function MatFormFieldDefaultOptions() { }", "title": "" }, { "docid": "8d8ca92a5c5224cf8d793f3078349e02", "score": "0.5190255", "text": "function checkFormIntegrityUser() {\n\n return true;\n}", "title": "" }, { "docid": "bf298588c666e6f29156f1519e6d1f13", "score": "0.51831526", "text": "hasFormUniqueId() {\n return !isNil(this.formUniqueId) && this.formUniqueId !== ''\n }", "title": "" }, { "docid": "c7acade9d94dab6ea03ba024d9d2ff8f", "score": "0.51823884", "text": "function FormFunctions() {\n\n this.getParameterByName = function (name, url) {\n\t if (!url) url = window.location.href;\n\t name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\n\t var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n\t if (!results) return null;\n\t if (!results[2]) return '';\n\t return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n\t }\n\n this.SelectText = function (el, win) {\n win = win || window;\n var doc = win.document, sel, range;\n if (win.getSelection && doc.createRange) {\n sel = win.getSelection();\n range = doc.createRange();\n range.selectNodeContents(el);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (doc.body.createTextRange) {\n range = doc.body.createTextRange();\n range.moveToElementText(el);\n range.select();\n }\n }\n\n //#region Object Function\n this.SafeObject = function (o) {\n if (typeof (o) == 'object') {\n return o;\n }\n else if (typeof (o) == 'string') {\n return this.GetObject(o);\n }\n else {\n return null;\n }\n }\n\n this.GetObject = function (sID) {\n return document.getElementById(sID);\n }\n\n this.GetObjectsByIDPrefix = function (sPrefix, sTagName, oContainer) {\n oContainer = oContainer == undefined ? document : int.f.SafeObject(oContainer);\n if (sTagName == undefined) sTagName = 'input';\n\n var aObjects = new Array();\n\n var aElements = oContainer.getElementsByTagName(sTagName);\n for (var i = 0; i < aElements.length; i++) {\n if (int.s.StartsWith(aElements[i].id, sPrefix)) aObjects.push(aElements[i]);\n }\n\n return aObjects;\n }\n\n this.GetElementsByClassName = function (sElement, sClassName, oContainer) {\n oContainer = oContainer == undefined ? document : int.f.SafeObject(oContainer);\n var aReturn = new Array();\n\n if (oContainer == undefined) return aReturn;\n\n if (sElement == '' || sElement == null || sElement == undefined) sElement = '*';\n\n var aElements = oContainer.getElementsByTagName(sElement);\n for (var i = 0; i < aElements.length; i++) {\n if (aElements[i].className.indexOf(sClassName) > -1) aReturn[aReturn.length] = aElements[i];\n };\n\n return aReturn;\n }\n\n this.GetObjectsBySelector = function (sSelector) {\n var aObjects = new Array();\n\n aObjects = document.querySelectorAll(sSelector);\n\n return aObjects;\n }\n\n //#endregion\n\n //#region Value functions\n this.GetValue = function (o) {\n var oControl = this.SafeObject(o);\n return oControl != null ? oControl.value : '';\n }\n\n this.GetIntValue = function (o) {\n var oControl = this.SafeObject(o);\n return oControl != null ? int.n.SafeInt(oControl.value) : 0;\n }\n\n this.GetNumericValue = function (o) {\n var oControl = this.SafeObject(o);\n return oControl != null ? int.n.SafeNumeric(oControl.value) : 0;\n }\n\n this.SetValue = function (o, sValue) {\n var oControl = this.SafeObject(o);\n if (oControl != null) oControl.value = sValue;\n }\n\n this.SetValueIf = function (o, sValue, bCondition) {\n if (bCondition) int.f.SetValue(o, sValue);\n }\n //#endregion\n\n //#region HTML funcs\n this.GetHTML = function (o) {\n var oControl = this.SafeObject(o);\n return oControl != null ? oControl.innerHTML : '';\n }\n\n this.SetHTML = function (o, sValue, bRunInlineScripts) {\n var oControl = this.SafeObject(o);\n if (oControl != null) oControl.innerHTML = sValue;\n // run any inline scripts included in the HTML if the bRunScriptTags parameter was specified.\n if (bRunInlineScripts != undefined && bRunInlineScripts) int.f.RunScriptsWithinHTML(sValue);\n }\n\n this.RunScriptsWithinHTML = function (sHTML) {\n var scriptregex = /\\<script(?:\\stype=(?:\"text\\/javascript\"|text\\/javascript))?\\s?\\>([\\s\\S]*?)\\<\\/script\\>/gim;\n var match;\n while (match = scriptregex.exec(sHTML)) {\n eval(match[1]);\n }\n }\n //#endregion\n\n this.Toggle = function (o) {\n var oControl = this.SafeObject(o);\n if (oControl.tagName.toUpperCase() == 'TR' && !int.b.IE()) {\n oControl.style.display = oControl.style.display == 'none' ? 'table-row' : 'none';\n }\n else {\n oControl.style.display = oControl.style.display == 'none' ? 'block' : 'none';\n }\n }\n\n this.Show = function (o) {\n var oControl = this.SafeObject(o);\n if (oControl != null) oControl.style.display = oControl.style.display = '';\n }\n\n this.Hide = function (o) {\n var oControl = this.SafeObject(o);\n if (oControl != null) oControl.style.display = oControl.style.display = 'none';\n }\n\n this.ShowIf = function (o, bCondition) {\n if (o.constructor != Array) {\n var oControl = this.SafeObject(o);\n bCondition ? this.Show(o) : this.Hide(o);\n }\n else {\n for (var i = 0; i < o.length; i++) {\n int.f.ShowIf(o[i], bCondition);\n }\n }\n }\n\n this.Visible = function (o) {\n var oControl = this.SafeObject(o);\n return oControl != null ? oControl.style.display != 'none' : false;\n }\n\n //#region Class functions\n this.SetClass = function (o, s) {\n var oControl = this.SafeObject(o);\n if (oControl != null) oControl.className = s;\n }\n\n this.GetClass = function (o) {\n var oControl = this.SafeObject(o);\n return oControl == null ? '' : oControl.className;\n }\n\n this.SetClassIf = function (o, ClassName, bCondition) {\n bCondition ? int.f.AddClass(o, ClassName) : int.f.RemoveClass(o, ClassName);\n }\n\n this.ToggleClassIf = function (o, TrueClass, FalseClass, bCondition) {\n if (bCondition) {\n int.f.AddClass(o, TrueClass);\n int.f.RemoveClass(o, FalseClass);\n }\n else {\n int.f.RemoveClass(o, TrueClass);\n int.f.AddClass(o, FalseClass);\n }\n }\n\n this.AddClass = function (o, s) {\n var oControl = this.SafeObject(o);\n var aClassNames = int.f.GetClass(o).split(' ');\n // add class if it doesn't exist already\n if (!int.f.HasClass(oControl, s)) int.f.SetClass(oControl, int.f.GetClass(oControl) + ' ' + s);\n }\n\n this.RemoveClass = function (o, s) {\n var sClassName = '';\n var aClassNames = int.f.GetClass(o).split(' ');\n\n for (var i = 0; i < aClassNames.length; i++) {\n if (aClassNames[i] != s) {\n sClassName = sClassName + aClassNames[i] + ' ';\n //chop off last character if it's a space\n if (sClassName.indexOf(' ', sClassName.length - 1) != -1 && i == aClassNames.length - 1) {\n sClassName = sClassName.substring(0, sClassName.length - 1);\n }\n }\n }\n\n int.f.SetClass(o, sClassName);\n }\n\n this.ToggleClass = function (o, s) {\n int.f.HasClass(o, s) ? int.f.RemoveClass(o, s) : int.f.AddClass(o, s);\n }\n\n this.HasClass = function (o, s) {\n var sClass = int.f.GetClass(o);\n var aClassNames = sClass == undefined ? [] : sClass.split(' ');\n for (var i = 0; i < aClassNames.length; i++) {\n if (aClassNames[i] == s) return true;\n }\n return false;\n }\n //#endregion\n\n this.SetFocus = function (o) { // will also accept a pipe seperated list of objects to try in turn.\n if (typeof (o) == 'string') {\n var aObjects = o.split('|');\n for (var i = 0; i < aObjects.length; i++) {\n if (int.f.SetFocus(int.f.SafeObject(aObjects[i]))) return true;\n }\n }\n else {\n var oControl = int.f.SafeObject(o);\n if (oControl && oControl.focus != undefined) {\n try {\n oControl.focus();\n return true;\n }\n catch (exception) { /* stops the browser throwing up a silly error */\n }\n }\n }\n return false;\n }\n\n this.ToggleFocus = function (o) {\n var oControl = this.SafeObject(o);\n oControl.style.display = oControl.style.display == 'none' ? 'block' : 'none';\n if (oControl.style.display == 'block') {\n int.f.SetFocus(oControl);\n }\n }\n\n this.BuildList = function (aListItems) {\n var sList = '<ul>';\n for (var i = 0; i < aListItems.length; i++) {\n sList += '<li>' + aListItems[i] + '</li>';\n }\n sList += '</ul>';\n return sList;\n }\n\n this.Disable = function (o) {\n var oControl = this.SafeObject(o);\n if (oControl != null) {\n oControl.readOnly = true;\n }\n }\n\n this.Enable = function (o) {\n var oControl = this.SafeObject(o);\n if (oControl != null) {\n oControl.readOnly = false;\n }\n }\n\n this.EnableIf = function (o, bCondition) {\n bCondition ? int.f.Enable(o) : int.f.Disable(o);\n }\n\n this.ClearFileUpload = function (o) {\n var oControl = this.SafeObject(o);\n if (oControl != null) {\n oControl.outerHTML = oControl.outerHTML;\n }\n }\n\n //#region event handling\n this.AttachEvent = function (oObject, sEventName, oFunction) {\n oObject = this.SafeObject(oObject);\n\n if (oObject) {\n var oListenerFunction = oFunction;\n\n if (oObject.addEventListener) {\n oObject.addEventListener(sEventName, oListenerFunction, false);\n }\n else if (oObject.attachEvent) {\n oListenerFunction = function () {\n oFunction(window.event);\n }\n oObject.attachEvent(\"on\" + sEventName, oListenerFunction);\n }\n else {\n throw new Error(\"Event registration not supported\");\n }\n\n var oEvent = {\n Instance: oObject,\n EventName: sEventName,\n Listener: oListenerFunction\n };\n return oEvent;\n }\n\n return false;\n }\n\n this.DetachEvent = function (oEvent) {\n var oObject = oEvent.Instance;\n if (oObject.removeEventListener) {\n oObject.removeEventListener(oEvent.EventName, oEvent.Listener, false);\n }\n else if (oObject.detachEvent) {\n oObject.detachEvent(\"on\" + oEvent.EventName, oEvent.Listener);\n }\n }\n\n this.GetObjectFromEvent = function (oEvent) {\n return oEvent.srcElement ? oEvent.srcElement : oEvent.target;\n }\n\n this.GetKeyCodeFromEvent = function (oEvent) {\n return oEvent.keyCode ? oEvent.keyCode : oEvent.which;\n }\n\n this.FireEvent = function (oObject, oEvent) {\n var o = int.f.SafeObject(oObject);\n if (o.dispatchEvent) {\n o.dispatchEvent(oEvent);\n }\n else if (o.fireEvent) {\n o.fireEvent('on' + oEvent.type, oEvent);\n }\n else {\n throw new Error(\"Event firing not supported\");\n }\n }\n //#endregion\n\n //#region Popup\n this.ShowPopup = function (oObject, sClassName, sHTML, sSourceObjectID, bRightAlign, iYOffset, iXOffset, bBottomAlign, bCentreAlign, iBackgroundYOffset, bCentreBackground) {\n if (iYOffset == undefined) iYOffset = 0;\n if (iXOffset == undefined) iXOffset = 0;\n\n if (sSourceObjectID != undefined && int.f.GetObject(sSourceObjectID)) {\n sHTML = int.f.GetObject(sSourceObjectID).innerHTML;\n }\n\n //create container\n var oHelp = document.createElement('div');\n oHelp.setAttribute('id', 'divPopup');\n int.f.SetClass(oHelp, sClassName);\n oHelp.style.position = 'absolute';\n oHelp.innerHTML = sHTML;\n\n //set position\n var oDimensions = new int.e.BrowserDimensions();\n var oLinkPosition;\n if (!oObject.Left) {\n oLinkPosition = int.e.GetPosition(oObject);\n }\n else {\n oLinkPosition = new int.e.Position();\n oLinkPosition.Left = oObject.Left;\n oLinkPosition.Top = oObject.Top;\n }\n\n oHelp.style.top = int.n.SafeInt(oLinkPosition.Top + 20 + iYOffset) + 'px';\n oHelp.style.left = int.n.SafeInt(oLinkPosition.Left + iXOffset) + 'px';\n\n //create mask\n if (int.b.IE6()) {\n var oMask = document.createElement('iframe');\n oMask.setAttribute('id', 'iMask');\n oMask.src = '';\n int.e.SetPosition(oMask, int.e.GetPosition(oHelp));\n int.f.GetObject('body').appendChild(oMask);\n }\n\n int.f.GetObject('frm').appendChild(oHelp);\n\n //move it if it's too low\n oHelpPosition = int.e.GetPosition(oHelp);\n if (oHelpPosition.Top + oHelpPosition.Height > oDimensions.ViewportHeight + int.f.ScrollPosition()) {\n oHelp.style.top = oDimensions.ViewportHeight + int.f.ScrollPosition() - oHelp.offsetHeight - 10 + 'px';\n }\n\n //if we're right aligning then shift over now\n if (bRightAlign != undefined && bRightAlign) {\n oHelp.style.left = oLinkPosition.Left - oHelp.clientWidth + iXOffset + 'px';\n }\n\n //if we're bottom aligning then shift over now\n if (bBottomAlign != undefined && bBottomAlign) {\n oHelp.style.top = oLinkPosition.Top - oHelp.clientHeight + iYOffset + 'px';\n }\n\n if (bCentreAlign != undefined && bCentreAlign) {\n oHelp.style.top = oLinkPosition.Top - (oHelp.clientHeight / 2) + iYOffset + 'px';\n }\n\n //if we're centre aligning (y) the background image then shift over now\n if (bCentreBackground != undefined && bCentreBackground) {\n var iYposition = (oHelp.clientHeight / 2) - iBackgroundYOffset + 'px';\n oHelp.style.backgroundPosition = '0px ' + iYposition;\n }\n }\n\n this.HidePopup = function () {\n if (int.b.IE6() && int.f.GetObject('iMask')) {\n int.f.GetObject('frm').removeChild(int.f.GetObject('iMask'));\n int.f.HidePopup();\n }\n\n if (int.f.GetObject('divPopup')) {\n int.f.GetObject('frm').removeChild(int.f.GetObject('divPopup'));\n int.f.HidePopup();\n }\n }\n //#endregion\n\n this.ScrollPosition = function () {\n return (window.pageYOffset) ?\n\t\t\t\t\twindow.pageYOffset\n\t\t\t\t\t: (document.documentElement && document.documentElement.scrollTop)\n\t\t\t\t\t\t? document.documentElement.scrollTop : document.body.scrollTop;\n }\n\n this.GetContainerQueryString = function (oContainer, aExclude) {\n var aElements = int.f.SafeObject(oContainer).getElementsByTagName('*');\n\n var sQueryString = '';\n for (var i = 0; i < aElements.length; i++) {\n if (aElements[i].name && !int.a.ArrayContains(aExclude, aElements[i].name)) {\n var bRadio = aElements[i].type && aElements[i].type.toUpperCase() == 'RADIO'\n\n if (!bRadio) {\n sQueryString += (sQueryString == '' ? '' : '&') + aElements[i].name + '=';\n }\n\n if (aElements[i].nodeName == 'INPUT' && int.s.StartsWith(aElements[i].id, 'chk')) {\n sQueryString += aElements[i].checked;\n }\n else if (aElements[i].nodeName == 'INPUT' && bRadio) {\n if (aElements[i].checked) {\n sQueryString += aElements[i].name + '=' + int.f.GetValue(aElements[i]);\n }\n }\n else if (aElements[i].nodeName == 'INPUT') {\n sQueryString += int.s.EncodeString(int.f.GetValue(aElements[i]));\n }\n else if (aElements[i].nodeName == 'SELECT') {\n sQueryString += int.s.EncodeString(int.f.GetValue(aElements[i]) != '' ? int.dd.GetValue(aElements[i]) : int.dd.GetText(aElements[i]));\n }\n else if (aElements[i].nodeName == 'TEXTAREA') {\n sQueryString += int.s.EncodeString(int.f.GetValue(aElements[i]));\n }\n }\n }\n\n return sQueryString;\n }\n\n this.GetContainerQueryStringByIDs = function (oContainer, aExclude) {\n var aElements = int.f.SafeObject(oContainer).getElementsByTagName('*');\n\n var sQueryString = '';\n for (var i = 0; i < aElements.length; i++) {\n if (aElements[i].id && !int.a.ArrayContains(aExclude, aElements[i].id)\n && aElements[i].name && !int.a.ArrayContains(aExclude, aElements[i].name)) {\n var bRadio = aElements[i].type && aElements[i].type.toUpperCase() == 'RADIO'\n\n if (!bRadio) {\n sQueryString += (sQueryString == '' ? '' : '&') + aElements[i].id + '=';\n }\n\n if (aElements[i].nodeName == 'INPUT' && int.s.StartsWith(aElements[i].id, 'chk')) {\n sQueryString += aElements[i].checked;\n }\n else if (aElements[i].nodeName == 'INPUT' && bRadio) {\n if (aElements[i].checked) {\n sQueryString += aElements[i].id + '=' + int.f.GetValue(aElements[i]);\n }\n }\n else if (aElements[i].nodeName == 'INPUT') {\n sQueryString += int.s.EncodeString(int.f.GetValue(aElements[i]));\n }\n else if (aElements[i].nodeName == 'SELECT') {\n sQueryString += int.s.EncodeString(int.f.GetValue(aElements[i]) != '' ? int.dd.GetValue(aElements[i]) : int.dd.GetText(aElements[i]));\n }\n else if (aElements[i].nodeName == 'TEXTAREA') {\n sQueryString += int.s.EncodeString(int.f.GetValue(aElements[i]));\n }\n }\n }\n\n return sQueryString;\n }\n\n //#region Radio\n this.GetRadioButtonValue = function (sName) {\n var aElements = document.body.getElementsByTagName('INPUT');\n var sReturn = '';\n\n for (var i = 0; i < aElements.length; i++) {\n if (aElements[i].name == sName && aElements[i].checked) {\n sReturn = aElements[i].value;\n break;\n }\n }\n\n return sReturn\n }\n\n this.SetRadioButtonValue = function (sName, sValue) {\n var aElements = document.body.getElementsByTagName('INPUT');\n\n for (var i = 0; i < aElements[i].length; i++) {\n if (aElements[i].name == sName && aElements[i].value == sValue) {\n aElements[i].checked = true;\n break;\n }\n }\n }\n //#endregion\n\n //#region Postback\n this.Postback = function (sCommand, sArgument, bCheckDelete) {\n //confirm delete if required\n if (bCheckDelete == true) {\n if (confirm('Are you sure that you want to delete this record?') == false) {\n return;\n }\n }\n\n if (typeof (oWYSIWYG) != 'undefined') {\n TidyXHTML();\n }\n\n document.forms[0].Command.value = sCommand;\n document.forms[0].Argument.value = sArgument;\n document.forms[0].action = '';\n document.forms[0].submit();\n }\n\n this.ButtonPostBack = function (oButton) {\n oButton.disabled = true;\n int.f.Postback(oButton.id, '');\n }\n //#endregion\n }", "title": "" }, { "docid": "522744ac66c6602297c517c1e08a5eaa", "score": "0.51788265", "text": "function _preSubmitHandler()\n {\n\n //Get the Widget data and convert it to a JSON string that can be saved.\n data = {};\n //retrieves dropdown value for buttons type\n data.buttonType = $('#perc-social-button-type option:selected').val();\n //runs function that retrieves individual options\n data.config=getData();\n //Validate the Widget.\n validationStatus = validateForm();\n if( validationStatus === false ) {\n $('.perc-social-button-error').show();\n return false;\n }\n else {\n $('.perc-social-button-error').hide();\n }\n\n //populates hidden input with JSON object\n var fieldName = $(\".perc-social-buttons\").attr(\"id\");\n $(\"input[name='\" + fieldName + \"']\").val(JSON.stringify(data));\n return true;\n\n }", "title": "" }, { "docid": "1e0ff442cffdd89ec1df7d0271a34844", "score": "0.51739186", "text": "function addValidationEngineToForm(formID){\n\t$(formID).validationEngine();\n\n}", "title": "" }, { "docid": "a71a160d34543eb95786be444ab395ac", "score": "0.5159183", "text": "function setFormForDisplayOnly() {\n var status = $('#txtOrderEntryStatus');\n var statusVal = status.val();\n \n if(statusVal === 'Complete' || statusVal === 'Cancel') \n {\n $('input, select, textarea').attr({readonly: true, disabled: true});\n $('select').trigger('chosen:updated');\n $('.bye').css('display', 'none');\n $('input[type=button]').css('cursor', 'context-menu');\n $('span.mandatory').css('display', 'none');\n $('.checkBoxMgrContainer').hover(function() {\n $(this).css('cursor', 'context-menu');\n var chkSpan = $('.checkmarkMgr');\n var chkBx = $('#chkInclusiveGST');\n if(chkBx[0].hasAttribute('checked')) {\n chkSpan.css('background-color', '#197b30');\n } else {\n chkSpan.css('background-color', '#eee');\n } \n });\n $('.formBtnMgr').css('display', 'none');\n }\n}", "title": "" }, { "docid": "91257399b47b7b0a3914f502b31d2fce", "score": "0.51573014", "text": "onFormFieldChange(value) {\n // console.log(\"Initial change: \"+JSON.stringify(value));\n this.setState({formValue:value})\n }", "title": "" }, { "docid": "1efd4714c3d3e72edafb0d2faa6e828a", "score": "0.51508963", "text": "renderOptionsContainer() {\n return <Form className={\"question-options\"}>{this.renderOptions()}</Form>;\n }", "title": "" }, { "docid": "9869be3794874ea614f3628635c7baed", "score": "0.5150812", "text": "setShowInNewForm(show) {\n return Object(_operations_js__WEBPACK_IMPORTED_MODULE_6__[\"spPost\"])(this.clone(Field, `setshowinnewform(${show})`));\n }", "title": "" }, { "docid": "583e2544b88ea5b07f68ca9b8bb26970", "score": "0.51502913", "text": "formAssign(form, data){\n for (let key of Object.keys(form)) {\n if(key !== \"originalData\" && key !== \"errors\" && key !== \"autoReset\" && key !== \"providers\"){\n form[key] = data[key] || '';\n }\n }\n return form;\n }", "title": "" }, { "docid": "d3fa17c3bb670edc3d8f556a85f38059", "score": "0.51490134", "text": "function formNameUpdate() {\n\tvar temp = $j('#editbox_formname_input').val().trim();\n\tif (temp.length > 0){\n\t\tformname = temp;\n\t\t$j('#_form_formname').removeClass('_form_element_notset');\n\t}else{\n\t\tformname = \"Form name\";\n\t\t$j('#_form_formname').removeClass('_form_element_notset');\n\t\t$j('#_form_formname').addClass('_form_element_notset');\n\t}\n\t$j('#_form_formname_text').text(formname);\n\tif ( $j('#editbox_formname_set_as_title_checkbox').prop('checked') ) {\n\t\tclearSetAsTitle();\n\t\t$j('#set_as_title', editelem).text('Yes');\n\t} else {\n\t\t$j('#set_as_title', editelem).text('No');\n\t}\n}", "title": "" }, { "docid": "4fae9f7553f3558ad0b32870d1b99cd1", "score": "0.51474696", "text": "function uiOptionTransfer_onSubmit(obj) {\r\n var tgt = document.getElementById(obj.targetId);\r\n var form = tgt.form;\r\n\r\n if (form != null) {\r\n uiCommon_prependSubmitHandler(form, function(e) {\r\n uiCommon_selectAllOptions(tgt.options);\r\n });\r\n }\r\n}", "title": "" }, { "docid": "390028f554bb1608597472a7127719bc", "score": "0.5137374", "text": "beforeNext() {\n // If we wish to submit the form on next page, then do that here.\n if (this.component.submit) {\n return this.loadSubForm().then(() => {\n return this.subForm.submitForm().then(result => {\n this.dataValue = result.submission;\n return this.dataValue;\n }).catch(err => {\n this.subForm.onSubmissionError(err);\n return Promise.reject(err);\n });\n });\n }\n else {\n return super.beforeNext();\n }\n }", "title": "" }, { "docid": "9ee8ffb51dd7f0c31747578a9b2604d2", "score": "0.51370645", "text": "afterValidate(){\n }", "title": "" }, { "docid": "0701fbdb2a5a2fab5f2357d96036af08", "score": "0.51345146", "text": "function newCompletionForm() {\n\n createCompletionForm();\n fillAllSelects();\n initializeAllInputs();\n}", "title": "" }, { "docid": "94a4be7013478df68ff218061ce38595", "score": "0.51333225", "text": "isFormValid() {\n\t\t\treturn this.name;\n\t\t}", "title": "" }, { "docid": "bc6173570118271842c1b96141aebdc9", "score": "0.51270866", "text": "get protocolFieldIn() {\n return $(`.form-advanced .two-fields .react-select .react-select__control`)\n }", "title": "" }, { "docid": "c5fd7ec844c604551fcf129961a2be08", "score": "0.512699", "text": "handleSubmit(event) {\n // prevending default type sumbit of recordedit form\n event.preventDefault();\n\n // querying the recordedit form and submiting fields to form\n this.template.querySelector('lightning-record-edit-form').submit(event.detail.fields);\n\n // closing modal\n this.bShowModal = false;\n this.bShowModalMap = false; \n\n // showing success message\n this.dispatchEvent(new ShowToastEvent({\n title: 'Success!!',\n message: event.detail.fields.FirstName + ' '+ event.detail.fields.LastName +' Contact updated Successfully!!.',\n variant: 'success'\n }),);\n }", "title": "" }, { "docid": "9d81224bd99aee25140db2666a388ba8", "score": "0.5125944", "text": "function set_form_always_modified(form)\r\n{\r\n\tif (typeof form == \"string\") {\r\n\t\tform = document.forms[form];\r\n\t}\r\n\tif (!form) {\r\n\t\treturn;\r\n\t}\r\n\tform.setAttribute('modified', \"true\");\r\n}", "title": "" }, { "docid": "0e95755ab18a0ddffd13560e0dec15d6", "score": "0.51227427", "text": "function uiFormContext(formName){\n if (!uiSystemFormProperties) window.status = 'Javascript error: current system form context not found!';\n else if (!uiSystemFormProperties[formName]) {\n uiFormProperties = new UiFormProperties(formName, uiSystemFormProperties.name);\n uiSystemFormProperties[formName] = uiFormProperties;\n }\n else {\n uiFormProperties = uiSystemFormProperties[formName];\n }\n }", "title": "" }, { "docid": "d818b22925a33c9b2020392bb0d2678f", "score": "0.5119019", "text": "hideCreateForm() {\n this.changeFormMode(this.FORM_MODES.LIST);\n }", "title": "" }, { "docid": "b7cd656164da637ac67db77738aa88eb", "score": "0.51164067", "text": "function EditEntryForm() {\n $(\"#editCancel\").click(this.clearForm);\n $(\"#editButton\").click(this.submitForm);\n }", "title": "" }, { "docid": "4994d4c4fbbd0606ad7c4105083ad4b3", "score": "0.5115189", "text": "_getFormOptions() {\n return {\n auto: 'none',\n template: this.template,\n error: this.state.errors,\n fields: {\n start_time: {\n mode:'time',\n config: {\n format: timeFormat,\n },\n label: 'Start',\n },\n end_time: {\n mode:'time',\n config: {\n format: timeFormat,\n },\n label: 'End',\n },\n },\n };\n }", "title": "" }, { "docid": "bbe666c5dbf66f2d66524713e23bb49b", "score": "0.5111954", "text": "function OnValidate () {}", "title": "" }, { "docid": "1375792eb356716f445647ae5fafad07", "score": "0.51078266", "text": "beforeSubmit() {\n if (this.isValid()) {\n this.submit()\n }\n }", "title": "" }, { "docid": "62eab5f0f55cdb0b27b788a6fd4a932c", "score": "0.5102485", "text": "function alterOption() {\n\tif (form.method.value != \"GET\") {\n\t\tform.text.value = \"\";\n\t}\n}", "title": "" }, { "docid": "4befb6dcd6f97c4e3464240ae699a3f7", "score": "0.50989944", "text": "form () {\n return this.$refs[this.ref]\n }", "title": "" }, { "docid": "94d0bad0a636eb0672399c29e1e6be80", "score": "0.5094716", "text": "_formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }", "title": "" }, { "docid": "08d5b87a991681523bebe74cf3d58084", "score": "0.5093351", "text": "onChange(obj) {\n if (obj.value != undefined) this.form.region = obj.value;\n }", "title": "" }, { "docid": "9f60dc084a339bd73b3ea1bf9e968fd0", "score": "0.50886315", "text": "function handleFormType() {\n if (observationID && isCreationForm) {\n setIsCreationForm(false);\n api\n .get(`/patients/${patientID}/observations/${observationID}`)\n .then((response) =>\n setObservationInformation(response.data.observation)\n );\n setInputValues(observationInformation);\n } else if (!observationID && !isCreationForm) {\n setIsCreationForm(true);\n }\n }", "title": "" }, { "docid": "929a7cdbb008cf60f3aa8eb25742c2e6", "score": "0.50866914", "text": "function SetFormFieldDefaults() {\n var currentDatetime = (new Date()).getCurrentDatetime();\n\n $(\"input[type='datetime-local']\").each(function () {\n var $this = $(this);\n $this.val(currentDatetime);\n $this.closest(\"[itemprop]\").prop(\"content\", currentDatetime);\n });\n}", "title": "" }, { "docid": "69b2c1d6045e49fdd46b2fab3efde486", "score": "0.5083727", "text": "function setFormID(){\r\n document.getElementById(\"hidden-episode-name\").value = \"12122018\";\r\n}", "title": "" }, { "docid": "c8bc7069a220220b331d3487244923aa", "score": "0.5076634", "text": "_registerFormElement() {\n this.updateComplete.then(() => {\n this.dispatchEvent(\n new CustomEvent('form-element-register', {\n detail: { element: this },\n bubbles: true,\n }),\n );\n });\n }", "title": "" }, { "docid": "0c9e72d3af1d3b352f2cc26461b2db8f", "score": "0.50741035", "text": "onChange() { }", "title": "" }, { "docid": "f241443f3dc3969a05ad91ee2c31e48d", "score": "0.5073566", "text": "renderForm (form) {\n form.render()\n }", "title": "" }, { "docid": "e37d59e43aa3dbab1a96cfdd11a9dc89", "score": "0.5072506", "text": "_currentFormElement() {\n return this._domElement.querySelector(this._blockElements.form);\n }", "title": "" }, { "docid": "ed7ac244dc612cf72e4631c4470b8fcd", "score": "0.50717026", "text": "function set_custom () {\n \n current_form = document.forms.coldata;\n \n if (current_form) {\n \n var custom_val = current_form.custom_date_format.value;\n if (custom_val != '') {\n if (current_form.date_format.value != 'custom') {\n last_selected_date_format = current_form.date_format.value;\n }\n current_form.date_format.value = 'custom';\n } else if (last_selected_date_format != '') {\n current_form.date_format.value = last_selected_date_format;\n last_selected_date_format = '';\n }\n }\n}", "title": "" }, { "docid": "bb83f0b243a4e3cbc2cbbed2e3015cc1", "score": "0.5057282", "text": "beforeSubmit() {\n const submission = this.dataValue;\n\n // This submission has already been submitted, so just return the reference data.\n if (submission && submission._id && submission.form) {\n this.dataValue = this.component.reference ? {\n _id: submission._id,\n form: submission.form\n } : submission;\n return Promise.resolve(this.dataValue);\n }\n\n // This submission has not been submitted yet.\n if (this.component.submit) {\n return this.loadSubForm().then(() => {\n return this.subForm.submitForm()\n .then(result => {\n this.subForm.loading = false;\n this.dataValue = this.component.reference ? {\n _id: result.submission._id,\n form: result.submission.form\n } : result.submission;\n return this.dataValue;\n })\n .catch(() => {});\n });\n }\n else {\n return super.beforeSubmit();\n }\n }", "title": "" }, { "docid": "8d33eb0c204ef618fd89c02c3fd70a1e", "score": "0.5057122", "text": "_init() {\n\t\tthis.form.querySelector('#submit').addEventListener('click', (e) => this.onSubmit(e));\n\n\t\t// Check if there is any data in the form\n\t\tfor (let input of this.form.querySelectorAll('input')) {\n\t\t\tinput.addEventListener(\"input\", () => {\n\t\t\t\tdocument.getElementById('submit').disabled = Array.from(this.form.querySelectorAll('input'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map((em) => (em.value))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter( (em) => ( em !== '' )).length === 0;\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "617e7116f9da834d76c4eb451f4917a8", "score": "0.5051401", "text": "setEventListeners() {\n super.setEventListeners();\n this._form.addEventListener(\"submit\", (evt) => {\n evt.preventDefault();\n\n this._formSubmitHandler(this._getInputValues());\n });\n }", "title": "" }, { "docid": "5a89dce1345326556dd64b579eb1338f", "score": "0.50487477", "text": "renderPage() {\n let fRef = null;\n const formSchema = makeSchema();\n\n return (\n <Grid container centered>\n <Grid.Column>\n <Header as=\"h2\" textAlign=\"center\" inverted>Add Musical Taste</Header>\n <AutoForm ref={ref => { fRef = ref; }} schema={formSchema} onSubmit={data => this.submit(data, fRef)} >\n <Segment>\n <Form.Group widths={'equal'}>\n <TextField name='name' showInlineError={true} placeholder='Interest name'/>\n </Form.Group>\n <SubmitField value='Add Taste'/>\n <ErrorsField/>\n </Segment>\n </AutoForm>\n </Grid.Column>\n </Grid>\n );\n }", "title": "" }, { "docid": "95ab2b8f3d390dd10bc97fb1405b5035", "score": "0.50457746", "text": "doSetValue(itemData) {\n formHelper.setValue(this.element, itemData);\n }", "title": "" }, { "docid": "ce5f648f04eaed53f05eb0909d421fa4", "score": "0.5044844", "text": "setupAppointmentForm() {\r\n if (this.selectedDate === undefined ||\r\n this.selectedTime === undefined) {\r\n throw \"Appointment form not setup correctly!\";\r\n }\r\n const dayName = this.selectedDate.toLocaleDateString(\"en\", {\r\n weekday: \"long\",\r\n });\r\n jquery_1.default(\"#form-date\").text(`${dayName} - ${this.selectedTime}`);\r\n }", "title": "" }, { "docid": "038e6ebe35192128bc5d092d22d403be", "score": "0.5042532", "text": "function cancelArmyForm() {\n setForm()\n}", "title": "" }, { "docid": "0176db332b79a52e499740671989e22c", "score": "0.504242", "text": "function setForm(){\r\n\tgetProject();\r\n\tsetMemberSelect(memberList);\r\n\tsetLastSprint(lastSprint);\r\n\tgetStatus();\r\n}", "title": "" }, { "docid": "75d55d42a2f2f7f1b51bfaf70f152ca1", "score": "0.50409895", "text": "function FormBeforeUnLoad() {\r\n try {\r\n }\r\n catch (e) { console.log(e.message); }\r\n}", "title": "" } ]
1d82c733247d13fcea890d8549f94772
Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
[ { "docid": "caea178fb56b6ea0f64221e5835e0c37", "score": "0.0", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t EventPluginHub.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(event.dispatchMarker, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" } ]
[ { "docid": "2b8b4e0c81a71955c9c254ed812f4a98", "score": "0.74430746", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? getParentInstance(targetInst) : null;\n\t traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t }", "title": "" }, { "docid": "b543f957b66af19c8c32b067502c4140", "score": "0.74137056", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "title": "" }, { "docid": "b543f957b66af19c8c32b067502c4140", "score": "0.74137056", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "title": "" }, { "docid": "b543f957b66af19c8c32b067502c4140", "score": "0.74137056", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "title": "" }, { "docid": "b543f957b66af19c8c32b067502c4140", "score": "0.74137056", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "title": "" }, { "docid": "74a7c67ce502c10ee55a834431cc51b9", "score": "0.740287", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "74a7c67ce502c10ee55a834431cc51b9", "score": "0.740287", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "74a7c67ce502c10ee55a834431cc51b9", "score": "0.740287", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "74a7c67ce502c10ee55a834431cc51b9", "score": "0.740287", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "74a7c67ce502c10ee55a834431cc51b9", "score": "0.740287", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "74a7c67ce502c10ee55a834431cc51b9", "score": "0.740287", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "2605b2a72f4df00ad2369b5613aeadf1", "score": "0.737764", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? getParentInstance(targetInst) : null;\n\t traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "2605b2a72f4df00ad2369b5613aeadf1", "score": "0.737764", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? getParentInstance(targetInst) : null;\n\t traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "2605b2a72f4df00ad2369b5613aeadf1", "score": "0.737764", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? getParentInstance(targetInst) : null;\n\t traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "609ec185b85b0c8b6bf01e8867b52f8e", "score": "0.72984827", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "a8104dc15a2703e1f48422b97ba99ea9", "score": "0.7285082", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n\t if (event && event.dispatchConfig.phasedRegistrationNames) {\n\t var targetInst = event._targetInst;\n\t var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n\t EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n\t }\n\t}", "title": "" }, { "docid": "c2731a1107e2931a2b3702845107d954", "score": "0.72774434", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n }", "title": "" }, { "docid": "10776dc4e15a85e78b0468e460f2f774", "score": "0.727393", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?ReactTreeTraversal.getParentInstance(targetInst):null;ReactTreeTraversal.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" }, { "docid": "9a84d91ce7acf5e07a9479cbd6c7d434", "score": "0.7253885", "text": "function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;\n ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}", "title": "" } ]
4b8156fd8c472d0ff27d5a74391609a6
Template relevant /////////////////////////////////// check whether the AP option is template relevant
[ { "docid": "4e88b71180c51c325441e46c516d019e", "score": "0.77677435", "text": "function isTemplateRelevantOption(ap) {\n return (ap.description === \"foreach\" || ap.description === \"content\");\n }", "title": "" } ]
[ { "docid": "ea35655246e6f360688a80be5ad8d901", "score": "0.699822", "text": "function processTemplateOption(node, ap) {\n var templateNode;\n if(!ap.options || (!ap.options.template && !ap.options.templateSelector)) {\n templateNode = node.children[0];\n if(node.children.length > 1) {\n __private.Log.warning(\"More than one child is found within '\" + __private.HTMLAPHelper.getNodeDescription(node) +\n '\", only the first will be taken as template and the reset will be removed.');\n }\n if(!templateNode) {\n __private.Log.error(\"Can't find template within '\" + __private.HTMLAPHelper.getNodeDescription(node) + \"'\");\n return;\n }\n }\n else{\n if(ap.options.templateSelector){\n return;\n }\n var template = ap.options.template;\n //if template is a dynamic template, do nothing\n if(template[0] === \"@\") {\n return;\n }\n templateNode = __private.HTMLKnotBuilder.templates[template];\n if(!templateNode) {\n __private.Log.error(\"Can't find template with selector'\" + template + \"'\");\n return;\n }\n }\n\n if(!templateNode.__knot_template_id) {\n __private.Log.error(\"The template node must be marked with 'knot-template'. Current node:'\" + __private.HTMLAPHelper.getNodeDescription(node) + \"'\");\n }\n if(!ap.options) {\n ap.options = {};\n }\n ap.options.template = templateNode.__knot_template_id;\n }", "title": "" }, { "docid": "f8139858b6341bf2ee4b50dacc6ab061", "score": "0.663089", "text": "isTemplateSelected() {\n return this.get('selectedDdahData.type') == 'template';\n }", "title": "" }, { "docid": "b715a09b0c763c130f996455a54318e2", "score": "0.61554974", "text": "function CheckOptions(){\r\n\t//we must have at least one application and one template\r\n\tif (Applications.length==0) FatalError(\"Error! No application section found!\")\r\n\tif (Templates.length==0) FatalError(\"Error! No template section found!\")\r\n\t//check apps and templates without id\r\n\tfor (var i in Applications){\r\n\t\tif (!Applications[i].Exists(\"id\")) FatalError(\"Error! Application without id (\"+i+\")!\");\r\n\t}\r\n\tfor (var i in Templates){\r\n\t\tif (!Templates[i].Exists(\"id\")) FatalError(\"Error! Template without id (\"+i+\")!\");\r\n\t}\r\n\t//if there is no default template, choose the first one as default\r\n\tif (!GeneralOptions.Exists(\"default_template\"))\t{\r\n\t\tGeneralOptions.Add(\"default_template\",Templates[0].Item(\"id\"));\r\n\t\tlog(\"template \"+Templates[0].Item(\"id\")+\" is now default\");\r\n\t}\r\n\t//check the existence of the default template\r\n\tvar default_template=GeneralOptions.Item(\"default_template\");\r\n\tif (!dTempl.Exists(default_template)) FatalError(\"Error! Default template (\"+default_template+\") doesnt exist!\")\r\n\r\n}", "title": "" }, { "docid": "cf9951444a102ac11a98434095b3a9f0", "score": "0.6025257", "text": "hasTemplate(){\n let data = Template.instance().data;\n return data.template;\n }", "title": "" }, { "docid": "6893240d0319de57d7f31c547132c483", "score": "0.59815866", "text": "fetchingTemplates() {\n return this.get('templates.fetching') > 0;\n }", "title": "" }, { "docid": "25af839855440dd059ff86cd12520a46", "score": "0.58530337", "text": "updateOptionTemplate() {\n var _a;\n this.activeMenuOptionTemplate =\n (_a = this.menuOptionTemplate) !== null && _a !== void 0 ? _a : this.defaultMenuOptionTemplate;\n }", "title": "" }, { "docid": "6a3ac70b04efd45d5e142608d94f0ff6", "score": "0.56248", "text": "function read_template_options() {\n const opts_elt = document.getElementById('agenda-filter-options');\n opts.keys().forEach((opt) => {\n if (opt in opts_elt.dataset) {\n opts[opt] = opts_elt.dataset[opt];\n }\n });\n }", "title": "" }, { "docid": "97b48d59ae653a13abbd8fc42f358253", "score": "0.5563854", "text": "template(type, options) {\n if (templates[type]) {\n const output = Mustache.render(templates[type], options);\n console.log(options);\n this.process(output);\n }\n }", "title": "" }, { "docid": "67960043fbf09e9bc8efbb57e2c21a4a", "score": "0.55100787", "text": "function istemplateexist(ptemplatename,ptemplateid)\n\t{\n\t\tvar templateList = getbarcodetemplateheaderdata(ptemplatename,ptemplateid,null);\n\n\t\tif(templateList!=null && templateList!='')\n\t\t{\n\t\t\treturn 'T';\n\t\t}\n\n\t\treturn 'F';\n\t}", "title": "" }, { "docid": "1b146a50450e69002ecb409993b3263c", "score": "0.538786", "text": "function parseTemplateElement(option) {\n\t var node, token;\n\n\t if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n\t throwUnexpectedToken();\n\t }\n\n\t node = new Node();\n\t token = lex();\n\n\t return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n\t }", "title": "" }, { "docid": "2a852078936eacba55ca784dbf761a94", "score": "0.5359412", "text": "function enableTemplateSupportFields() {\n var isCombinatorEnabled = isCombinator.prop('checked');\n\n testSplitterRe.prop('disabled', !isCombinatorEnabled);\n allowMultipleStdins.prop('disabled', !isCombinatorEnabled);\n }", "title": "" }, { "docid": "4f67ab7d69d300569ec2fff696697861", "score": "0.5330928", "text": "function template_generated(templateInfo) {\n if(!templateInfo || \n !('generated' in templateInfo) ||\n (templateInfo['generated'] != true)) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "d82cd64e4c77c4bd18874cf411225c5d", "score": "0.53237236", "text": "function usage_templates_template(){\n\t $.ajax({\n\t\t type: \"POST\",\n\t\t url: \"website_code/php/workspaceproperties/usage_templates_template.php\",\n\t\t data: {\n\t\t\t details: 'null'\n\t\t }\n\t })\n\t .done(function(response){\n\t\t workspace_properties_projects_stateChanged(response, 'panelUsage');\n\t });\n}", "title": "" }, { "docid": "2f04edd501cc9063b45b10a86839e7c4", "score": "0.5285357", "text": "function maybeInsertTemplate(current_source) {\r\n\tif(!current_source) {\r\n\t\tinsertTemplateOrSample('template');\r\n\t}\r\n\tif(current_source == $(\"#file_template\").val()) {\r\n\t\tinsertTemplateOrSample('template');\r\n\t}\r\n}", "title": "" }, { "docid": "6dde5aeb61d52f88b9808b5a6846994c", "score": "0.52726036", "text": "function isTemplate ( parent )\n{\n\tlog.h( \"Checking to see whether \" + parent + \" is a proper converted template.\" );\n\n\tvar result = true,\n\t\tart,\n\t\tinfo,\n\t\tmock,\n\t\tprepress,\n\t\tsearchLayer;\n\n\tif ( parent.typename === \"Document\" )\n\t{\n\t\tsearchLayer = parent.layers[ 0 ];\n\t}\n\telse if ( parent.typename === \"Layer\" )\n\t{\n\t\tsearchLayer = parent;\n\t}\n\n\t//Try/Catch Description:\n\t//set variables for known template layers\n\t//if they don't exist, it's not a template\n\ttry\n\t{\n\t\tart = searchLayer.layers[ \"Artwork Layer\" ];\n\t\tinfo = searchLayer.layers[ \"Information\" ];\n\t\tmock = searchLayer.layers[ \"Mockup\" ];\n\t\tprepress = searchLayer.layers[ \"Prepress\" ];\n\t\tlog.l( parent + \" is a proper template. returning true\" );\n\t}\n\tcatch ( e )\n\t{\n\t\t//this doc is not a converted template.\n\t\t//setting srcIsTemplate to false\n\t\tresult = false;\n\n\t\tif ( e.toString().indexOf( \"MRAP\" ) > -1 )\n\t\t{\n\t\t\tlog.l( \"MRAP error occurred.\" )\n\t\t\terrorList.push( \"Failed to determine whether this file was a proper converted template because of an MRAP error.\" );\n\t\t\terrorList.push( \"Please restart Illustrator and try again.\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlog.l( parent + \" is NOT a template.::Results of isTemplate function are as follows:\" );\n\t\t}\n\n\t\tlog.l( \"art = \" + art );\n\t\tlog.l( \"info = \" + info );\n\t\tlog.l( \"mock = \" + mock );\n\t\tlog.l( \"prepress = \" + prepress + \"\\n\\n\" );\n\t}\n\n\treturn result\n}", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.5233812", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.5233812", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.5233812", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.5233812", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.5233812", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "2716806bbaa037918172f084fb26695e", "score": "0.519759", "text": "function isInlineTemplate(tNode) {\n return tNode.type === 4\n /* Container */\n && tNode.value !== NG_TEMPLATE_SELECTOR;\n }", "title": "" }, { "docid": "3f74bdda2120df604a63b00035030801", "score": "0.5197028", "text": "function prepareTemplate () {\n\t\ttemplate \t\t= $('#tmpl-read-section').html().trim();\n\t\tactionsTemplate = $('#templates').find('#tmpl-actions').html().trim();\n\t}", "title": "" }, { "docid": "451cb9eaf998238a4ac180339d03d490", "score": "0.5187946", "text": "function showTemplate(template) {\n $('#' + $EL_TMPDESCRIPTION).html(template.description);\n $('#' + $EL_TMPNAME).val(template.name);\n let html = '';\n if (template.parameters) {\n html = '<label class=\"form-label\">Input Data</label>'\n const rule_params = template.parameters;\n for (let i_para = 0; i_para < rule_params.length; i_para++) {\n const para = rule_params[i_para];\n const cntrl_id = template.id + '_' + para.name;\n let para_label = para.name;\n if (para.label) {\n para_label = para.label;\n }\n let para_default = '';\n if (para.default) {\n para_default = para.default;\n }\n html += '<div class=\"container-fluid\">';\n html += '<label class=\"ctrl-label\" for=\"' + cntrl_id + '\">' + para_label + '</label>';\n html += '<input type=\"text\" class=\"form-control\" id=\"' + cntrl_id + '\" value=\"' + para_default + '\"/>';\n html += '</div>'\n }\n }\n $('#' + $EL_TMPPARAMETERS).html(html);\n }", "title": "" }, { "docid": "904a5b8a924abadb660f04fc6bd3491c", "score": "0.5175794", "text": "function getTemplate(scope, element, attrs)\r\n\t{\r\n\t\tvar mode = attrs.ptMode;\r\n\t\tvar type = scope.problem.ansType;\r\n\r\n\t\treturn templatePath + map[type][mode];\r\n\t}", "title": "" }, { "docid": "34fa1e185f2e2c0c20dbf744b5faee6a", "score": "0.515732", "text": "function isTeamSiteLike(template) {\r\n 'use strict';\r\n var templateEnum = Number(template);\r\n return templateEnum !== WebTemplateType.mySite && templateEnum !== WebTemplateType.group;\r\n}", "title": "" }, { "docid": "c57ac710843a4a43c165c55cabd51d24", "score": "0.51410264", "text": "function processInputType(){\n\n comp.config.inputType = comp.config.answerType;\n\n\n /**\n * @abbr: sw\n * @desc: switch statement\n * @param: conf.answerType\n * @parm: 'text','email','date'\n **/\n switch (comp.config.answerType) {\n case 'text':\n case 'email':\n case 'checkbox':\n case 'SingleLineLimited':\n templateType='text';\n\n break;\n case 'number':\n templateType='text';\n\n break;\n case 'wholeNumber':\n templateType='text';\n comp.config.inputType = 'number';\n comp.config.wholeNumber = true;\n delete comp.config.decimal;\n break;\n default:\n templateType = comp.config.answerType;\n }\n }", "title": "" }, { "docid": "a5f06235ebf0ed7cd169f4e4b6e4b66b", "score": "0.51203465", "text": "function iAppLxProjectTemplateConfigProcessor() {\n}", "title": "" }, { "docid": "8a6edf89f8f75a73c34928962282ea3e", "score": "0.5089427", "text": "function template1() {\n }", "title": "" }, { "docid": "1755d25a5ecedaab83d301b1d46f9ae8", "score": "0.5040815", "text": "enterTemplateId(ctx) {\n\t}", "title": "" }, { "docid": "317f5936eb84112009dedc54a0b47961", "score": "0.5027286", "text": "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "title": "" }, { "docid": "a40d3ddd3e7fbdcf2915fbc7e5a682cd", "score": "0.5015102", "text": "function GetValidOptionValue(nameOption){\n/*\t\t\t\t// if there is an option not set in the template, perhaps the master template has changed after the template was set. use the master default version of this value\n\t\tif(tipPopupTemplate.options[nameOption] === undefined)\n\t\t\treturn tipPopupMasterTemplate.defaultOptions[nameOption];\n\t\telse*/\n\t\t\treturn tipPopupTemplate.options[nameOption];\n\t}", "title": "" }, { "docid": "d953a88ffa1e98a7f6f223144e51be06", "score": "0.49913576", "text": "function loadNonEditPatientTemplates(patientDetails){\n $('#patientDetailsFormId')[0].reset();\n $('#operation_mode').val(\"nonEdit\");\n\n //Change the Sub-Header Text to New Patient Registration\n $('#patient_detail_info').text(\"Details of Patient : \"+patientDetails.pgd.name);\n\n pgd = patientDetails.pgd\n console.log(pgd);\n\n patientId = pgd.id;\n loadNonEditPatientPGDTemplate(pgd);\n\n if(patientDetails.cmc.length == 0){\n loadNonEditEmptyCMCTemplate();\n }else{\n loadNonEditCMCTemplate(patientDetails.cmc);\n }\n\n if(patientDetails.habits.length == 0){\n loadNonEditEmptyHabitsTemplate();\n }else{\n loadNonEditEmptyHabitsTemplate();\n loadNonEditHabitsTemplate(patientDetails.habits);\n }\n\n if(patientDetails.other_history.length == 0){\n loadNonEditEmptyHistoryTemplate();\n }else{\n // loadNonEditHistoryTemplate($.parseJSON(patientDetails.other_history));\n loadNonEditHistoryTemplate(patientDetails.other_history);\n }\n\n if(patientDetails.examinationDetails.length == 0){\n loadNonEditEmptyExaminationFindingsTemplate();\n }else{\n loadNonEditExaminationFindingsTemplate(patientDetails.examinationDetails);\n }\n\n // Load the Visit Details of the Patient in the Investogation Details Section\n loadVisitsComboInAilmentDetailsTemplate(patientId);\n loadNonEditInvestigationDetailsTemplate(patientDetails.investigationDetails);\n\n // // Load the Visit Details of the Patient in the Diabetes Details Section\n loadVisitsComboInDMDetailsTemplate(patientId);\n loadNonEditDMDetailsTemplate(patientDetails.dmDetails);\n\n $('#patient_detail_options').show();\n }", "title": "" }, { "docid": "c4f80880a85dd911760dde3ca8f9ecea", "score": "0.49777734", "text": "function DoUrlTemplate(){\n\tvar strValue=document.form1.TemplateLocationURL.value;\n\tif (strValue.length > 0)\n\t\tSetRadByValue(document.form1.TemplateMethod, \"url\");\n}", "title": "" }, { "docid": "4b3155a01abfb68b485f81de2d20bc48", "score": "0.49610415", "text": "enterTemplateParameter(ctx) {\n\t}", "title": "" }, { "docid": "e35652d194dc2cc4dc4ba0f1d11d5fcc", "score": "0.49572712", "text": "function doTemplateWork() {\r\n\tqualSel.value = 3;\r\n\tsourceSel.value = 5;\r\n\tvidstrm.disable(false);\r\n\taudstrm.disable(false);\r\n\tsubstrm.disable(false);\r\n\t// reset track count to default values\r\n\twhile(audTracks > 1) audstrm.remove();\r\n\twhile(subTracks > 1) substrm.remove();\r\n\ttemplateType = this.value;\r\n\tswitch(this.value) {\r\n\t\tcase 'manual':\r\n\t\t\tbreak;\r\n\t\tcase 'rawsub':\r\n\t\t\tsubstrm.disable(true,0);\r\n\t\t\taudstrm.streams[0].lang.value = 2;\r\n\t\t\tif (audstrm.streams[1]) audstrm.remove(1);\r\n\t\t\tif (substrm.streams[1]) substrm.remove(1);\r\n\t\t\tbreak;\r\n\t\tcase 'fansub':\r\n\t\t\taudstrm.streams[0].lang.value = 2;\r\n\t\t\tif (audstrm.streams[1]) audstrm.remove(1);\r\n\t\t\tif (substrm.streams[1]) substrm.remove(1);\r\n\t\t\tbreak;\r\n\t\tcase 'dual':\r\n\t\t\tqualSel.value = 2;\r\n\t\t\tsourceSel.value = 7;\r\n\t\t\taudstrm.streams[0].lang.value = 2;\r\n\t\t\tsubstrm.streams[0].lang.value = 4;\r\n\t\t\tsubstrm.streams[0].type.value = 20;\r\n\t\t\tif (!audstrm.streams[1]) { \r\n\t\t\t\taudstrm.add();\r\n\t\t\t\taudstrm.streams[1].lang.value = 4;\r\n\t\t\t\taudstrm.streams[1].type.value = 10;\r\n\t\t\t} else\r\n\t\t\t\taudstrm.disable(false,1);\r\n\t\t\tif (substrm.streams[1]) substrm.remove(1);\r\n\t\t\tbreak;\r\n\t\tcase 'dualsubs':\r\n\t\t\tqualSel.value = 2;\r\n\t\t\tsourceSel.value = 7;\r\n\t\t\taudstrm.streams[0].lang.value = 2;\r\n\t\t\tsubstrm.streams[0].lang.value = 2;\r\n\t\t\tsubstrm.streams[0].type.value = 20;\r\n\t\t\tif (!audstrm.streams[1]) { \r\n\t\t\t\taudstrm.add();\r\n\t\t\t\taudstrm.streams[1].lang.value = 4;\r\n\t\t\t\taudstrm.streams[1].type.value = 10;\r\n\t\t\t} else\r\n\t\t\t\taudstrm.disable(false,1);\r\n\t\t\tif (!substrm.streams[1]) { \r\n\t\t\t\tsubstrm.add();\r\n\t\t\t\tsubstrm.streams[1].lang.value = 2;\r\n\t\t\t\tsubstrm.streams[1].type.value = 20;\r\n\t\t\t} else\r\n\t\t\t\tsubstrm.disable(false,1);\r\n\t\t\tbreak;\r\n\t\tcase 'dub':\r\n\t\t\tif (audstrm.streams[1]) audstrm.remove(1);\r\n\t\t\tif (substrm.streams[1]) substrm.remove(1);\r\n\t\t\tsubstrm.disable(true,0);\r\n\t\t\tbreak;\r\n\t\tcase 'extdub':\r\n\t\t\tvidstrm.disable(true,0);\r\n\t\t\tsubstrm.disable(true,0);\r\n\t\t\tif (audstrm.streams[1]) audstrm.remove(1);\r\n\t\t\tif (substrm.streams[1]) substrm.remove(1);\r\n\t\t\tbreak;\r\n\t\tcase 'extsub':\r\n\t\t\tvidstrm.disable(true,0);\r\n\t\t\taudstrm.disable(true,0);\r\n\t\t\tif (substrm.streams[1]) substrm.remove(1);\r\n\t\t\tif (audstrm.streams[1]) audstrm.remove(1);\r\n\t\t\tbreak;\r\n\t\tcase 'other':\r\n\t\t\tvidstrm.disable(true,0);\r\n\t\t\tqualSel.value = 1;\r\n\t\t\tif (audstrm.streams[1]) audstrm.remove(1);\r\n\t\t\tsourceSel.value = 1;\r\n\t\t\tbreak;\r\n\t\tdefault: return;\r\n\t}\r\n}", "title": "" }, { "docid": "bc429a435c0b46d5763d85fc9d2609e1", "score": "0.49559706", "text": "function isInlineTemplate(tNode) {\n return tNode.type === 0\n /* Container */\n && tNode.tagName !== NG_TEMPLATE_SELECTOR;\n }", "title": "" }, { "docid": "b2e30cbec28d9a4a59f396a6acaa775c", "score": "0.4955155", "text": "function templateChanged(e) {\n if($template.val() === 'product') {\n $productFormGroup.show().attr('disabled', null);\n } else {\n $productFormGroup.hide().attr('disabled', 'disabled');\n }\n }", "title": "" }, { "docid": "fbdbd4bcd7020457ff473fa10c195a17", "score": "0.4949802", "text": "function showPageTemplates()\n {\n //make an array from the comma delimited options string\n var pageTemplatesOptionsArray = [];\n \n //Check if page_templates has been defined\n if (typeof $('[name=\"page_templates_list\"]').val() != \"undefined\")\n { \n pageTemplatesOptionsArray = $('[name=\"page_templates_list\"]').val().split(\",\");\n }\n\n $(document).ready( function(){\n populateTemplateTypes(getSiteFromFolderPath($('[name=\"site_path\"]').val()),pageTemplatesOptionsArray);\n });\n \n }", "title": "" }, { "docid": "188129788240008cc2779e14fe1aa62a", "score": "0.49476603", "text": "get templateType() {\n return this.__templateType.get();\n }", "title": "" }, { "docid": "bb4ea5d02f05313aa7d5b9ab4ca048de", "score": "0.49470392", "text": "function loadNonEditEmptyTemplates(){\n $('#operation_mode').val(\"empty\");\n\n //Select a Patient from the Left Panel\n $('#patient_detail_info').text(\"Please Select a Patient from the Left Panel\");\n\n loadNonEditEmptyPGDTemplate();\n loadNonEditEmptyCMCTemplate();\n loadNonEditEmptyHabitsTemplate();\n loadNonEditEmptyHistoryTemplate();\n loadNonEditEmptyExaminationFindingsTemplate();\n\n }", "title": "" }, { "docid": "3bcb9b9f7443edadd1c2e64d508b0e41", "score": "0.49343312", "text": "function isClientTemplateExist(generator){\n var self=this;\n needle.get(URL+\"/\"+generator.partnerKey+\"/client_template/\"+generator.clientTemplateKey,(err,respons)=>{\n if(respons.body && respons.body.statusCode && parseInt(respons.body.statusCode,10)>=400 ){\n //as the above condition mean that client template not exist so we call create client template\n console.log(\"Not exist client template,starting creation of client template\");\n self.createClientTemplate(generator);\n }else{\n self.createClient(generator);\n }\n });\n}", "title": "" }, { "docid": "edda1937949a08ecc9e27249168c45cb", "score": "0.49329183", "text": "beforeParseTemplate(){}", "title": "" }, { "docid": "36d07b0b3b85ee0ced5a87bee8754ed5", "score": "0.49213272", "text": "function getTemplateDataView(themplate, other) {\n if (!isEmpty(themplate)) {\n switch (themplate) {\n //case '1':\n case 'DV_theme1':\n return 'views/templates/templateDV/dvTemplate1.html'\n case '2':\n case 'DV_theme2':\n return 'views/templates/templateDV/dvTemplate2.html'\n case '3':\n case 'DV_theme3':\n return 'views/templates/templateDV/dvTemplate3_checkbox.html'\n case '4':\n case 'DV_theme4':\n return 'views/templates/templateDV/dvTemplate4.html'\n case '5':\n case 'DV_theme5':\n return 'views/templates/templateDV/dvTemplate5_profile.html'\n case '6':\n case 'DV_theme6':\n return 'views/templates/templateDV/dvTemplate6_Card.html'\n case '7':\n case 'DV_theme7':\n return 'views/templates/templateDV/dvTemplate7_cardDtl.html'\n case '8':\n case 'DV_theme8':\n return 'views/templates/templateDV/dvTemplate8_header.html'\n case 'map':\n return 'views/templates/map/map.html'\n case '9':\n case 'DV_theme9':\n return 'views/templates/templateDV/dvTemplate9_cardRow.html'\n case '10':\n case 'DV_theme10':\n return 'views/templates/templateDV/dvTemplate10_menu.html'\n case '11':\n case 'DV_theme11':\n return 'views/templates/templateDV/dvTemplate11.html'\n case '12':\n case 'DV_theme12':\n return 'views/templates/templateDV/dvTemplate12.html'\n case '13':\n case 'DV_theme13':\n return 'views/templates/templateDV/dvTemplate13.html'\n case '14':\n case 'DV_theme14':\n return 'views/templates/templateDV/dvTemplate14_chat.html'\n case '15':\n case 'DV_theme15':\n return 'views/templates/templateDV/dvTemplate9_cardRowOnepage.html'\n\n // return 'views/templates/templateDV/dvTemplate12.html'\n\n //package\n case 'PC_theme1':\n return 'views/templates/templatePack/wsTimeSheet.html'\n //business process\n case 'BP_theme1':\n return 'views/templates/templateProcess/theme1_Item.html'\n case 'BP_theme2':\n return 'views/templates/templateProcess/theme2_Card.html'\n case 'BP_theme3':\n return 'views/templates/templateProcess/theme3.html'\n case 'BP_theme4':\n return 'views/templates/templateProcess/theme4_Keyboard.html'\n case 'BP_theme5':\n return 'views/templates/templateProcess/theme5_list.html'\n case 'BP_theme6':\n return 'views/templates/templateProcess/theme6_profile.html'\n case 'BP_theme7':\n return 'views/templates/templateProcess/theme7_slideView.html'\n case 'BP_theme8':\n return 'views/templates/templateProcess/theme8_onepage.html'\n case 'BP_theme9':\n return 'views/templates/templateProcess/theme9.html'\n case 'BP_theme10':\n return 'views/templates/templateProcess/theme10_headerDtl.html'\n //calendar\n case 'calendar':\n return 'views/templates/templateCalendar/CalenTemplate1.html';//getCalendarTemplate(other);\n //WS Tab\n case 'WS_theme1':\n return { them: 'views/templates/templateTab/tabTemplate1.html', position: 'has-subheader' }\n case 'WS_theme2':\n return { them: 'views/templates/templateTab/tabTemplate2-footer.html', position: 'has-footer' }\n case 'WS_theme3':\n return { them: 'views/templates/templateTab/tabTemplate3.html', position: 'has-subheader' }\n //layout\n\n case 'layouttheme1':\n return 'views/templates/templateLayout/layoutDefualt.html'\n //layout\n case 'layouttheme2':\n return 'views/templates/templateLayout/layoutTemplate1.html'\n //layout\n case 'layouttheme3':\n return 'views/templates/templateLayout/layoutTemplate2.html'\n }\n }\n else {\n return null;\n }\n}", "title": "" }, { "docid": "1ba2dfc53c1370ad4f9c9a2ad71f8b3c", "score": "0.4916186", "text": "_setCustomTemplates() {\n\n if (this.bcKeypadConfig.customSubmitTemplate) {\n const path = this.bcKeypadConfig.submitTemplate;\n this.$templateCache.put(path, this.bcKeypadConfig.customSubmitTemplate);\n }\n\n if (this.bcKeypadConfig.customBackspaceTemplate) {\n const path = this.bcKeypadConfig.backspaceTemplate;\n this.$templateCache.put(path, this.bcKeypadConfig.customBackspaceTemplate);\n }\n\n }", "title": "" }, { "docid": "1903a1d059c1fa5cb2eaf37f8150e52e", "score": "0.49140924", "text": "function load_template() {\n\t\t\tcc_template = maincontainer.find(\"#WooZoneLite-cc-template\").html();\n\t\t}", "title": "" }, { "docid": "87971fbbbab7c974f7067509f405738b", "score": "0.49098495", "text": "function compareTemplateOptions(str1, str2) {\n\treturn compareIgnoreCase(displayGroupByTemplates[str1] != null ? displayGroupByTemplates[str1] : str1, \n\t\t\tdisplayGroupByTemplates[str2] != null ? displayGroupByTemplates[str2] : str2);\n}", "title": "" }, { "docid": "8f754d3aba060d9bacc6203a723243f4", "score": "0.48979586", "text": "daikinTempControl(atemp) {\n this.log('daikinTempControl');\n\n const settings = this.getSettings();\n const homekit_ip = settings.homekit_ip;\n const homekit_useGetToPost = settings.homekit_useGetToPost;\n const homekit_adapter = settings.homekit_adapter;\n let homekit_options = {};\n this.log('firmware < v2.0.1 (then useGetToPost):', homekit_useGetToPost);\n this.log('Adapter model:', homekit_adapter);\n\n if (homekit_useGetToPost) homekit_options = {\n useGetToPost: true,\n };\n else homekit_options = {\n useGetToPost: false,\n };\n\n util.daikinTempControl(atemp, homekit_ip, homekit_options);\n }", "title": "" }, { "docid": "065756c2889ad08036469769ffaea782", "score": "0.48888165", "text": "function validOptions(ad) {\n \n}", "title": "" }, { "docid": "a196d3a8fe3d450cbc413940bf8ba14b", "score": "0.48766023", "text": "function properTemplateSetup ( doc )\n{\n\tlog.h( \"properTemplateSetup(\" + doc.name + \")\" );\n\tvar result = true;\n\n\tdoc.activate();\n\n\tvar layers = doc.layers;\n\tvar layLen = layers.length;\n\t// var garPat = /^[a-z]{2}[-_]/i;\n\tvar garPat = /^[a-z]*[-_]/i;\n\tvar thisLay, thisSubLay, layInfo;\n\tvar templateLayers =\n\t{\n\t\t\"Artwork Layer\":\n\t\t{\n\t\t\t\"locked\": false,\n\t\t\t\"visible\": true\n\t\t},\n\t\t\"Mockup\":\n\t\t{\n\t\t\t\"locked\": false,\n\t\t\t\"visible\": true\n\t\t},\n\t\t\"Prepress\":\n\t\t{\n\t\t\t\"locked\": false,\n\t\t\t\"visible\": false\n\t\t},\n\t\t\"Information\":\n\t\t{\n\t\t\t\"locked\": true,\n\t\t\t\"visible\": true\n\t\t},\n\t\t\"USA Collars\":\n\t\t{\n\t\t\t\"locked\": true,\n\t\t\t\"visible\": false\n\t\t}\n\n\t}\n\n\tfor ( var x = layLen - 1; x >= 0; x-- )\n\t{\n\t\tthisLay = layers[ x ];\n\t\tif ( garPat.test( thisLay.name ) )\n\t\t{\n\t\t\tlog.l( \"Looping sub layers for layer: \" + thisLay.name );\n\t\t\tfor ( var lay in templateLayers )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tlog.l( \"Attempting to process the layer: \" + lay );\n\t\t\t\t\tthisSubLay = thisLay.layers[ lay ];\n\t\t\t\t\tlayInfo = templateLayers[ lay ];\n\t\t\t\t\tthisSubLay.locked = layInfo.locked;\n\t\t\t\t\tthisSubLay.visible = layInfo.visible;\n\t\t\t\t\tlog.l( \"Successfully set \" + lay + \" to \" );\n\t\t\t\t}\n\t\t\t\tcatch ( e )\n\t\t\t\t{\n\t\t\t\t\tlog.l( \"Failed to process \" + lay );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthisLay.zOrder( ZOrderMethod.SENDTOBACK );\n\t\t\t\tthisLay.locked = true;\n\t\t\t\tthisLay.visible = true;\n\n\t\t\t\tlog.l( \"Sent \" + thisLay.name + \" to back.\" );\n\t\t\t}\n\t\t\tcatch ( e )\n\t\t\t{\n\t\t\t\tlog.e( \"Failed to process \" + thisLay.name + \"::System error message: \" + e );\n\t\t\t}\n\t\t}\n\t}\n\n\tlog.l( \"properTemplateSetup result = \" + result );\n\treturn result;\n}", "title": "" }, { "docid": "949ae1e110eb5c29ca108fb6e23d3b2a", "score": "0.48730606", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 3:\n return tn === $.RTC;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n }", "title": "" }, { "docid": "f6fb9818afc2dae8a32f146e3e525dee", "score": "0.48648053", "text": "function isAttackPossible(possibleOrNot) {\n return (possibleOrNot) ? null : 'disabled=\"true\"';\n }", "title": "" }, { "docid": "658171a9494fe7cd709f4a1454024a4f", "score": "0.48571435", "text": "function isAllowedResourceTypeURL(details) {\n\n sp_printDebugLogMessage(\"isAllowedResourceTypeURL() STARTED: \" + details.type + \" -- \" + details.url);\n \n var mytypeU = details.type.toUpperCase();\n var mytypeL = details.type.toLowerCase();\n \n // Aus dem Typ den Schluessel konstruieren, unter dem die Werte der Blockier-Option zu finden sind\n var mykey = myOptionsStorage_CreateKey_Allow_URL(mytypeL);\n \n // Aus der URL die interessanten Daten beziehen\n var myurl = details.url.toLowerCase();\n \n sp_printDebugLogMessage(\"isAllowedResourceTypeURL() : mykey = \" + mykey);\n sp_printDebugLogObject(\"isAllowedResourceTypeURL() : myOptionsStorage[mykey]\", myOptionsStorage[mykey]);\n\n // Pruefen, ob eine passende Option angegeben wurde\n var mytestval = sp_CheckOptionMatch(mykey, myurl);\n\n // Falls ja ...\n if ( mytestval.value == true ) {\n\n\t// Sofern eine WebConsole aktiv ist, eine Nachricht mit der Information ueber das Blockieren verschicken\n\t// damit dies in der WebConsole angezeigt wird\n\tif (myConsoleTabId > 0 )\n\t sp_SendWebRequestAllowedMessage(details.requestId, mytypeU, mytypeU + \" ALLOWED: \", \"URL key=\", mytestval.matched_string);\n\t\n\t// ... weitere Tests abbrechen und TRUE zurueckliefern\n\tsp_printDebugLogMessage(\"isAllowedResourceTypeURL() returns TRUE\");\n\treturn true;\n }\n \n // Alle Tests waren negativ\n sp_printDebugLogMessage(\"isAllowedResourceTypeURL() returns FALSE\");\n return false;\n}", "title": "" }, { "docid": "dc75605f0b3ae86c232e63444f79ba19", "score": "0.48409852", "text": "function renderTemplate(app){\n let template = (\n <div>\n <h1>{app.title}</h1>\n {app.subTitle && <p>{app.subTitle}</p>}\n {app.hasOwnProperty(\"options\") && typeof app.options !== \"undefined\" && app.options.constructor === Array && app.options.length > 0 ? <p>You have {app.options.length} options </p> : <p>No options to show</p>}\n <button disabled={app.options.length === 0} onClick={onMakeDecison}>What should I do?</button>\n <button onClick={onOptionsReset}>Remove All</button>\n <ol>\n {\n app.options && app.options.constructor === Array && app.options.map(option=><li key={++count}>{option}</li>)\n }\n </ol>\n <form onSubmit={onFormSubmit}>\n <input type=\"text\" name=\"option\"/>\n <button>Add Option</button>\n </form>\n </div>\n );\n mainTemplate = template;\n ReactDOM.render(template, mainDiv);\n}", "title": "" }, { "docid": "fbca8e149affc3b322a27ca42ab22f1f", "score": "0.4838993", "text": "enterSimpleTemplateId(ctx) {\n\t}", "title": "" }, { "docid": "39b05e357fee6049e54f839e6d6063ed", "score": "0.48342824", "text": "function modalAjaxTemplate(obj, procVar, elemName, elemId, modId, optionsJSON, editor)\n{\n\tvar processing=JSON.parse(optionsJSON);\n\tif(obj.checked===true)\n\t{\n\t\tif(editor) document.getElementById(textEdBaseArea).innerHTML=processing['template_source'];\n\t\tupdateAjaxVal(obj, procVar, elemName, elemId, modId);\n\t\tif(editor) document.getElementById('template_source').value=processing['template_source'];\n\t}\n\telse\n\t{\n\t\tremoveAjaxVal(procVar, elemName, elemId, modId);\n\t\tif(editor) document.getElementById('template_source').value='';\n\t}\n}", "title": "" }, { "docid": "8e6c5fea9ca58494d2cd0c918ce72b14", "score": "0.48246494", "text": "template() {\n throw new Error('The template method must be implemented');\n }", "title": "" }, { "docid": "8e5f57ba68d7d8e3991610e92246986e", "score": "0.48244765", "text": "get template() {\n return this.__template.get();\n }", "title": "" }, { "docid": "6e83c0dc9c638426e6ca65302ae9b675", "score": "0.48179227", "text": "function pageTemplate(page) {\n return page.template || 'default';\n }", "title": "" }, { "docid": "8ece28bb5520eb5c6eed12e3c7a05e3e", "score": "0.48143098", "text": "function access_template(){\n\n\tif(setup_ajax()!=false){\n\n\t\tvar url=\"access_template.php\";\n\n\t\tproperties_ajax_send_prepare(url);\n\n\t\txmlHttp.send('template_id=' + window.name);\n\n\t}\n\n}", "title": "" }, { "docid": "6312ee7c5046805b05dc5868fd18f871", "score": "0.48056573", "text": "function _requestTemplate() {\n var type = attrs.type || 'html';\n\n if (isFirst && type === 'html' || type === 'angular') {\n _processContent(elem);\n } \n\n if (isFirst) {\n isFirst = false;\n } else {\n\n // broadcast event\n scope.$broadcast(\"foswiki.requestTemplate\");\n //$log.log(\"requestingTemplate \"+attrs.name);\n\n // animate page out only if there is a page in effect as well\n if (pageIn) {\n pageOut = _animate(attrs.pageOutEffect);\n }\n\n // use service api\n foswikiService.requestTemplate(attrs.name, attrs.reload).then(function(data) {\n\n if (typeof(data) !== 'undefined') {\n if (attrs.delay) {\n $timeout(function() {\n _processContent(_insertTemplate(data));\n }, attrs.delay);\n } else {\n if (pageOut) {\n pageOut.then(function() {\n _processContent(_insertTemplate(data));\n });\n } else {\n _processContent(_insertTemplate(data));\n if (pageIn) {\n pageIn.then(function() {\n _clearAnimation();\n });\n }\n }\n }\n }\n });\n }\n }", "title": "" }, { "docid": "be4daadfa6ea2b6e4f882ec1f276f793", "score": "0.4803644", "text": "function loadTemplate(el,url,template_value){\r\n var value= el.value;\r\n if(!value){\r\n hideLayoutGroup();\r\n }\r\n if($('menu_type').value == 6){// 6 is anchor text\r\n hideLayoutGroup();\r\n }\r\n if(value){\r\n if($('menu_type').value != 6){\r\n showLayoutGroup();\r\n }\r\n var request = new Ajax.Request(url,{\r\n parameters: $('template_id').serialize(true),\r\n onSuccess:function(transport){\r\n var result = JSON.parse(transport.responseText);\r\n if(result.template_map)\r\n $('layout').innerHTML = result.template_map;\r\n if(result.headerfooter){\r\n if(typeof(template_value) == \"undefined\"){\r\n tinyMCE.get('header').setContent(result.headerfooter.header); \r\n tinyMCE.get('footer').setContent(result.headerfooter.footer);\r\n }\r\n }\r\n \r\n if(result.general_style){\r\n var default_style = result.general_style;\r\n var background_color = default_style.background_color.substr(1);\r\n if(typeof(template_value) == \"undefined\"){\r\n $('background_color').value = background_color; \r\n }\r\n $('background_color_hide').value= background_color;\r\n var border_color = default_style.border_color.substr(1); \r\n if(typeof(template_value) == \"undefined\"){\r\n $('border_color').value = border_color;\r\n }\r\n $('border_color_hide').value = border_color;\r\n var border_size = default_style.border_size;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('border_size').value = border_size;\r\n }\r\n $('border_size_hide').value = border_size;\r\n }\r\n \r\n if(result.title_style){\r\n var title_style = result.title_style;\r\n var title_color = title_style.title_color.substr(1);\r\n if(typeof(template_value) == \"undefined\"){\r\n $('title_color').value = title_color ; \r\n }\r\n $('title_color_hide').value = title_color ; \r\n var title_background_color = title_style.title_background_color.substr(1);\r\n if(typeof(template_value) == \"undefined\"){\r\n $('title_background_color').value = title_background_color; \r\n }\r\n $('title_background_color_hide').value = title_background_color; \r\n var title_font = title_style.title_font;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('title_font').value = title_font; \r\n }\r\n $('title_font_hide').value = title_font; \r\n \r\n var title_font_size = title_style.title_font_size;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('title_font_size').value = title_font_size;\r\n }\r\n $('title_font_size_hide').value = title_font_size;\r\n }\r\n \r\n if(result.subtitle_style){\r\n var subtitle_style = result.subtitle_style;\r\n var subtitle_color = subtitle_style.subtitle_color.substr(1); \r\n if(typeof(template_value) == \"undefined\"){\r\n $('subtitle_color').value = subtitle_color;\r\n }\r\n $('subtitle_color_hide').value = subtitle_color;\r\n var subtitle_font = subtitle_style.subtitle_font; \r\n if(typeof(template_value) == \"undefined\"){\r\n $('subtitle_font').value = subtitle_font;\r\n }\r\n $('subtitle_font_hide').value = subtitle_font;\r\n var subtitle_font_size = subtitle_style.subtitle_font_size;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('subtitle_font_size').value = subtitle_font_size;\r\n }\r\n $('subtitle_font_size_hide').value = subtitle_font_size;\r\n }\r\n \r\n if(result.link_style){\r\n var link_style = result.link_style;\r\n var link_color = link_style.link_color.substr(1);\r\n if(typeof(template_value) == \"undefined\"){\r\n $('link_color').value = link_color;\r\n }\r\n $('link_color_hide').value = link_color;\r\n var hover_color = link_style.hover_color.substr(1); \r\n if(typeof(template_value) == \"undefined\"){\r\n $('hover_color').value = hover_color;\r\n }\r\n $('hover_color_hide').value = hover_color;\r\n var link_font = link_style.link_font; \r\n if(typeof(template_value) == \"undefined\"){\r\n $('link_font').value = link_font;\r\n }\r\n $('link_font_hide').value = link_font;\r\n var link_font_size = link_style.link_font_size;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('link_font_size').value = link_font_size;\r\n }\r\n $('link_font_size_hide').value = link_font_size;\r\n }\r\n \r\n if(result.text_style){\r\n var text_style = result.text_style;\r\n var text_color = text_style.text_color.substr(1); \r\n if(typeof(template_value) == \"undefined\"){\r\n $('text_color').value = text_color;\r\n }\r\n $('text_color_hide').value = text_color;\r\n var text_font = text_style.text_font; \r\n if(typeof(template_value) == \"undefined\"){\r\n $('text_font').value = text_font;\r\n }\r\n $('text_font_hide').value = text_font;\r\n var text_font_size = text_style.text_font_size;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('text_font_size').value = text_font_size;\r\n }\r\n $('text_font_size_hide').value = text_font_size;\r\n }\r\n \r\n if(result.content_general){\r\n var content_general = result.content_general;\r\n if(typeof(template_value) == \"undefined\"){\r\n $('size_megamenu').value = content_general.size_megamenu;\r\n } \r\n if(typeof(template_value) == \"undefined\"){\r\n $('colum').value = content_general.colum;\r\n }\r\n if(typeof(template_value) == \"undefined\"){\r\n $('size_colum').value = content_general.size_colum;\r\n }\r\n }\r\n loadColor('click');\r\n if(result.template_name){\r\n var template_name = result.template_name;\r\n if(template_name == 'product_listing_02'){\r\n $('products_box_title').parentNode.parentNode.show();\r\n }else{\r\n $('products_box_title').parentNode.parentNode.hide();\r\n }\r\n if($('menu_type').value == 2){\r\n\r\n if(template_name == 'product_listing_01'){\r\n hideMaincontentGroup('megamenu_featuredcategories');\r\n }\r\n\r\n if(template_name == 'product_listing_02'){\r\n showMaincontentGroup('megamenu_featuredcategories');\r\n }\r\n }\r\n var template = new Array();\r\n template = getTemplateImage();\r\n viewTooltip($('template_id').value,template[$('template_id').value]);\r\n }\r\n }\r\n });\r\n }\r\n if(typeof(template_value) == \"undefined\"){\r\n $('background_color_default').checked = true;\r\n $('border_color_default').checked = true;\r\n $('border_size_default').checked = true;\r\n $('title_color_default').checked = true;\r\n $('title_background_color_default').checked = true; \r\n $('title_font_default').checked = true;\r\n $('title_font_size_default').checked = true;\r\n $('subtitle_color_default').checked = true; \r\n $('subtitle_font_default').checked = true;\r\n $('subtitle_font_size_default').checked = true;\r\n $('link_color_default').checked = true;\r\n $('hover_color_default').checked = true;\r\n $('link_font_default').checked = true;\r\n $('link_font_size_default').checked = true;\r\n $('text_color_default').checked = true;\r\n $('text_font_default').checked = true;\r\n $('text_font_size_default').checked = true;\r\n }\r\n if(typeof(template_value) != \"undefined\"){\r\n $('background_color_default').checked = false;\r\n $('border_color_default').checked = false;\r\n $('border_size_default').checked = false;\r\n $('title_color_default').checked = false;\r\n $('title_background_color_default').checked = false; \r\n $('title_font_default').checked = false;\r\n $('title_font_size_default').checked = false;\r\n $('subtitle_color_default').checked = false; \r\n $('subtitle_font_default').checked = false;\r\n $('subtitle_font_size_default').checked = false;\r\n $('link_color_default').checked = false;\r\n $('hover_color_default').checked = false;\r\n $('link_font_default').checked = false;\r\n $('link_font_size_default').checked = false;\r\n $('text_color_default').checked = false;\r\n $('text_font_default').checked = false;\r\n $('text_font_size_default').checked = false;\r\n }\r\n \r\n if(typeof(template_value) == \"undefined\"){\r\n $('background_color').disabled = true;\r\n $('border_color').disabled = true;\r\n $('border_size').disabled = true;\r\n $('title_color').disabled = true;\r\n $('title_background_color').disabled = true;\r\n $('title_font').disabled = true;\r\n $('title_font_size').disabled = true;\r\n $('subtitle_color').disabled = true;\r\n $('subtitle_font').disabled = true;\r\n $('subtitle_font_size').disabled = true;\r\n $('link_color').disabled = true;\r\n $('hover_color').disabled = true;\r\n $('link_font').disabled = true;\r\n $('link_font_size').disabled = true;\r\n $('text_color').disabled = true;\r\n $('text_font').disabled = true;\r\n $('text_font_size').disabled = true;\r\n }\r\n}", "title": "" }, { "docid": "8b747232a77d5f9342dec09dfa2f28bd", "score": "0.47990817", "text": "function shared_templates_template(){\n\t $.ajax({\n\t\t type: \"POST\",\n\t\t url: \"website_code/php/workspaceproperties/shared_templates_template.php\",\n\t\t data: {\n\t\t\t details: 'null'\n\t\t }\n\t })\n\t .done(function(response){\n\t\t workspace_properties_projects_stateChanged(response, 'panelShared');\n\t });\n}", "title": "" }, { "docid": "b96084d706d579b2bfa2d692ad283607", "score": "0.47965285", "text": "function prepareTemplates () {\t\t\n\t\t$('#templates').find('.field-template')\n\t\t\t.each(function (i,tmpl) {\n\t\t\t\ttemplates[this.getAttribute('data-type')] = this.innerHTML.trim();\n\t\t\t});\n\t\ttemplates.actions = $('#templates').find('#tmpl-actions').html().trim();\n\t}", "title": "" }, { "docid": "8770027a8bcd2a77153457b340dbc7ad", "score": "0.47934052", "text": "[_isInertable](element) {\n return false === /^(style|template|script)$/.test(element.localName);\n }", "title": "" }, { "docid": "bb2087556d40cc84d269ae6c1dae2add", "score": "0.47726607", "text": "function xml_change_template(){\n\n\tif(document.getElementById(\"xmlon\").src==site_url + \"website_code/images/TickBoxOn.gif\"){\n\n\t\tif(setup_ajax()!=false){\n\n\t\t\tvar url=\"xml_change_template.php\";\n\n\t\t\tproperties_ajax_send_prepare(url);\n\n\t\t\tif(document.xmlshare.sitename.value!=\"\"){\n\n\t\t\t\txmlHttp.send('template_id=' + window.name + '&xml_status=on' + '&address=' + document.xmlshare.sitename.value);\n\n\t\t\t}else{\n\n\t\t\t\txmlHttp.send('template_id=' + window.name + '&xml_status=on' + '&address=null');\n\n\t\t\t}\n\n\t\t}\n\n\t}else{\n\n\t\tvar url=\"xml_change_template.php\";\n\n\t\tproperties_ajax_send_prepare(url);\n\n\t\txmlHttp.send('template_id=' + window.name + '&xml_status=off' + '&address=null');\n\n\t}\n\n}", "title": "" }, { "docid": "6dffd6e0256273383bfa4f42b709d19e", "score": "0.47721788", "text": "_validateTemplate(propertyName, template) {\n if (template === null || !template) {\n return;\n }\n\n if (typeof (template) === 'function') {\n return;\n }\n\n const that = this;\n\n if (!('content' in document.createElement('template'))) {\n that.error(that.localize('htmlTemplateNotSuported', { elementType: that.nodeName.toLowerCase() }));\n return;\n }\n\n if (typeof (template) === 'string') {\n template = document.getElementById(template);\n }\n\n\n if (template === null || !('content' in template)) {\n that.error(that.localize('invalidTemplate', { elementType: that.nodeName.toLowerCase(), property: propertyName }));\n return;\n }\n\n return template;\n }", "title": "" }, { "docid": "6432da61c9713e96922e41b2622a254e", "score": "0.4769193", "text": "enterTemplateArgument(ctx) {\n\t}", "title": "" }, { "docid": "21235cd72a3645e1e0de8fb01eb0ae6e", "score": "0.47676137", "text": "function skipGenericKVMatches(t, k, v) {\n return (\n t === 'flags' ||\n t === 'transit' ||\n k === 'landuse' ||\n v === 'atm' ||\n v === 'bicycle_parking' ||\n v === 'car_sharing' ||\n v === 'caravan_site' ||\n v === 'charging_station' ||\n v === 'dog_park' ||\n v === 'parking' ||\n v === 'phone' ||\n v === 'playground' ||\n v === 'post_box' ||\n v === 'public_bookcase' ||\n v === 'recycling' ||\n v === 'vending_machine'\n );\n }", "title": "" }, { "docid": "79d2be30656d6ba1169312b02d548734", "score": "0.47650817", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n}", "title": "" }, { "docid": "e0364547f59a6426657e22328ff9c37b", "score": "0.4763678", "text": "getTemplate() {}", "title": "" }, { "docid": "c22ac21de4fac023774e7337574d4995", "score": "0.47582403", "text": "function peer_template(){\n\n\n\tif(setup_ajax()!=false){\n\n\t\tvar url=\"peer_template.php\";\n\n\t\tproperties_ajax_send_prepare(url);\n\n\t\txmlHttp.send('template_id=' + window.name);\n\n\t}\n\n}", "title": "" }, { "docid": "680287c62d65c8289114ce8bc5532fc2", "score": "0.47568366", "text": "function validateConfig(c) {\n if (!c.tmpl) {\n return 'A template with question parameters is required';\n }\n\n const tmplLen = Object.keys(c.tmpl).length;\n\n // Verify that the template exists and has questions\n if (tmplLen === 0) {\n return 'A template with question parameters is required';\n }\n\n // Verify that the template exists and has questions\n if (!c.minToWin || c.minToWin <= 0) {\n return 'Minimum number of questions to win needs to be > 0';\n }\n\n if (c.minToWin > tmplLen) {\n return 'minToWin has to be less or equal to the number of questions in the template';\n }\n }", "title": "" }, { "docid": "b85021bafa23cc9a8db116443aa851f9", "score": "0.4752794", "text": "setupTemplates() {\n\t var self = this;\n\t var field_label = self.settings.labelField;\n\t var field_optgroup = self.settings.optgroupLabelField;\n\t var templates = {\n\t 'optgroup': data => {\n\t let optgroup = document.createElement('div');\n\t optgroup.className = 'optgroup';\n\t optgroup.appendChild(data.options);\n\t return optgroup;\n\t },\n\t 'optgroup_header': (data, escape) => {\n\t return '<div class=\"optgroup-header\">' + escape(data[field_optgroup]) + '</div>';\n\t },\n\t 'option': (data, escape) => {\n\t return '<div>' + escape(data[field_label]) + '</div>';\n\t },\n\t 'item': (data, escape) => {\n\t return '<div>' + escape(data[field_label]) + '</div>';\n\t },\n\t 'option_create': (data, escape) => {\n\t return '<div class=\"create\">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';\n\t },\n\t 'no_results': () => {\n\t return '<div class=\"no-results\">No results found</div>';\n\t },\n\t 'loading': () => {\n\t return '<div class=\"spinner\"></div>';\n\t },\n\t 'not_loading': () => {},\n\t 'dropdown': () => {\n\t return '<div></div>';\n\t }\n\t };\n\t self.settings.render = Object.assign({}, templates, self.settings.render);\n\t }", "title": "" }, { "docid": "5f4de91f32af15d7f5a5ee07c906716f", "score": "0.4752089", "text": "static ngTemplateContextGuard(dir, ctx) {\n return true;\n }", "title": "" }, { "docid": "5f4de91f32af15d7f5a5ee07c906716f", "score": "0.4752089", "text": "static ngTemplateContextGuard(dir, ctx) {\n return true;\n }", "title": "" }, { "docid": "d2ccb3af155a56159157fd5e93c54c02", "score": "0.47497565", "text": "function addTemplates() {\n\n //Template name\n var text = prompt('Template Name', 'Blacklist'),\n\n //Signature \n sig = '~~' + String.fromCharCode(126) + '~',\n\n //Text if talk\n addtexttalk = '<br /><br /> {{SUBST:Template:' + text + '}}' + sig,\n\n //Text if other\n addtextother = '{{Template:' + text + '}}<br />',\n\n //Edit Summary \n reason = \"Adding a Template\",\n\n //Setting up namespace detector\n namespace = mw.config.get('wgNamespaceNumber');\n \n //Compares namespace numbers to see if it is a talk page and then applies template and logs to console\n if (-1 < [1,3,5,7,9,11,13,15].indexOf(namespace)) {\n $.post(\"/api.php\", {action: \"edit\", title: wgPageName, token: mw.user.tokens.values.editToken, appendtext: addtexttalk, summary: reason});\n console.log('Talk');\n }\n \n //Compares namespace numbers to see if it is a main page and then applies template and logs to console\n if (-1 < [0,2,4,6,8,10,12,14].indexOf(namespace)) {\n $.post(\"/api.php\", {action: \"edit\", title: wgPageName, token: mw.user.tokens.values.editToken, prependtext: addtextother, summary: reason});\n console.log('Other');\n }\n}", "title": "" }, { "docid": "c89fbe4fdd6f8752c0b7b16015de3165", "score": "0.47477064", "text": "function isatapTunnelsConfigValidate() {\n\tvar txtFieldIdArr = new Array();\n\ttxtFieldIdArr[0] = \"tf1_txtPrefixLen, \"+LANG_LOCALE['12037'];\n\ttxtFieldIdArr[1] = \"tf1_txtIpAddress,\"+LANG_LOCALE['12294'];\n\n\tif (txtFieldArrayCheck(txtFieldIdArr) == false)\n\t\treturn false;\n\t\t\n\tif (isProblemCharArrayCheck(txtFieldIdArr, '\\'\" ', NOT_SUPPORTED) == false) \n return false;\n\n\tif (ipv6Validate('tf1_txtPrefixLen', false, true, '') == false)\n\t\treturn false;\n\n\tif (ipv4Validate('tf1_txtIpAddress', 'IP', false, true, LANG_LOCALE['11281'], LANG_LOCALE['11031'], true) == false)\n\t\treturn false;\n\n\treturn true;\n}", "title": "" }, { "docid": "7fae4fcc2dd13109716f746b7734a90e", "score": "0.47468856", "text": "function hasTap() {\n\t\t\t//Enure we dont return 0 or null for false values\n\t\t\treturn !!(options.tap) ;\n\t\t}", "title": "" }, { "docid": "7fae4fcc2dd13109716f746b7734a90e", "score": "0.47468856", "text": "function hasTap() {\n\t\t\t//Enure we dont return 0 or null for false values\n\t\t\treturn !!(options.tap) ;\n\t\t}", "title": "" }, { "docid": "6007e2f9297444a3d522c17dc5db6986", "score": "0.47402304", "text": "function sharing_status_template(){\n\n\n\tif(setup_ajax()!=false){\n\n\t\tvar url=\"sharing_status_template.php\";\n\n\t\tproperties_ajax_send_prepare(url);\n\n\t\txmlHttp.send('template_id=' + window.name);\n\n\t}\n\n}", "title": "" }, { "docid": "130c246211d45a04c9947a308bdbd1e9", "score": "0.47355044", "text": "function isImpliedEndTagRequired(tn) {\r\n switch (tn.length) {\r\n case 1:\r\n return tn === $.P;\r\n\r\n case 2:\r\n return tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\r\n\r\n case 6:\r\n return tn === $.OPTION;\r\n\r\n case 8:\r\n return tn === $.OPTGROUP;\r\n }\r\n\r\n return false;\r\n}", "title": "" }, { "docid": "d5666432e495d3e9d0c3d8857d03734c", "score": "0.4731181", "text": "function isTemplVis(tempNm, returnPrefix) {\n\tif (!BookMarkList[tempNm] || !tDoc.getField(BookMarkList[tempNm])) return false;\n\tvar isVisible = false;\n\tvar multiTemp = TemplatesWithExtras.indexOf(tempNm) !== -1;\n\tvar firstTempl = \"\";\n\tif (!multiTemp) {\n\t\tvar tempPage = tDoc.getField(BookMarkList[tempNm]).page;\n\t\tisVisible = (isArray(tempPage) ? Math.max.apply(Math, tempPage) : tempPage) !== -1;\n\t} else {\n\t\tisVisible = What(\"Template.extras.\" + tempNm) !== \"\";\n\t\tfirstTempl = What(\"Template.extras.\" + tempNm).split(\",\")[1];\n\t};\n\tif (!isVisible && tempNm === \"SSfront\") {\n\t\tisVisible = isTemplVis(\"SSmore\", returnPrefix);\n\t\tif (isArray(isVisible)) {\n\t\t\tfirstTempl = isVisible[1];\n\t\t\tisVisible = isVisible[0];\n\t\t};\n\t};\n\treturn returnPrefix && firstTempl ? [isVisible, firstTempl] : isVisible;\n}", "title": "" }, { "docid": "f09d5e3399fb159e52090a85155985af", "score": "0.47291297", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 3:\n return tn === $.RTC;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n}", "title": "" }, { "docid": "f09d5e3399fb159e52090a85155985af", "score": "0.47291297", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 3:\n return tn === $.RTC;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n}", "title": "" }, { "docid": "f09d5e3399fb159e52090a85155985af", "score": "0.47291297", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 3:\n return tn === $.RTC;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n}", "title": "" }, { "docid": "f09d5e3399fb159e52090a85155985af", "score": "0.47291297", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 3:\n return tn === $.RTC;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n}", "title": "" }, { "docid": "f09d5e3399fb159e52090a85155985af", "score": "0.47291297", "text": "function isImpliedEndTagRequired(tn) {\n switch (tn.length) {\n case 1:\n return tn === $.P;\n\n case 2:\n return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n case 3:\n return tn === $.RTC;\n\n case 6:\n return tn === $.OPTION;\n\n case 8:\n return tn === $.OPTGROUP;\n }\n\n return false;\n}", "title": "" }, { "docid": "da00ef649049d6dd9bb59dc3383990a3", "score": "0.47229806", "text": "template(activeElem, errorType) {\n //jsLogger.out('error Type 0', errorType);\n let errorIndex = '';\n let activeError = '';\n // Getting error response message from elemnet.\n let elementDefaultResponse = activeElem.el.getAttribute('data-message');\n if (typeof elementDefaultResponse === 'undefined' || elementDefaultResponse === '' || elementDefaultResponse === null) {\n // Sanity check with error message object.\n if (typeof this.errorMessage !== 'undefined' && typeof this.errorMessage[errorType] !== 'undefined') {\n // Getting error type. [ex. Required, Min, Max...]\n errorType = this.errorMessage[errorType];\n\n // activeElem.el.getAttribute('data-message');\n if (errorType) {\n //jsLogger.out('errorType', errorType);\n activeError = errorType;\n // If error type is Min or Max, then it will proceed responsive.\n if (activeElem.type == 'min' || activeElem.type == 'max') {\n if ('min' == activeElem.type) errorIndex = activeElem.el.min;\n if ('max' == activeElem.type) errorIndex = activeElem.el.max;\n activeError = activeError.replace('[INDEX]', errorIndex);\n }\n }\n } else {\n activeError = this.default(errorType);\n }\n elementDefaultResponse = activeError;\n }\n return elementDefaultResponse;\n }", "title": "" }, { "docid": "3e97ce320f23c867af1e91f19693ff01", "score": "0.47223958", "text": "isSuppressed () {\n return this.booleanLiteral('nypl:suppressed')\n }", "title": "" }, { "docid": "38974a1981a4040b032abf20f1cdae26", "score": "0.47189727", "text": "function cpTemplate() {\n CUI.rte.Templates[\"dlg-\" + ExperienceAEM.TIM_DIALOG] =\n Handlebars.compile('<div data-rte-dialog=\"' + ExperienceAEM.TIM_DIALOG\n + '\" class=\"coral--dark coral-Popover coral-RichText-dialog\">'\n + '<iframe width=\"1100px\" height=\"700px\"></iframe>'\n + '</div>');\n }", "title": "" }, { "docid": "3573d8fa2143ec33dbec484b7e800070", "score": "0.47065943", "text": "isFullTemplateFilePath(path) {\n for (let extension of this.validTemplateLanguageKeys) {\n if (path.endsWith(`.${extension}`)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "960ab6a66375674a675d1669cd446a3b", "score": "0.4703387", "text": "function selectTemplate() {\n\tgroupByView = groupByTemplates[$('#selectTemplate').val()];\n\tsortArray = getSortIndexArray(groupByView);\n\tif ($('#selectTemplate').val() == 'flat') {\n\t\t$('.expandCollapseAll').css('display', 'none');\n\t\t$('.saveSelectedResults').css({'display': '',\n\t\t\t'color': 'grey'});\n\t}\n\telse {\n\t\t$('.saveSelectedResults').css('display', 'none');\n\t\t$('.expandCollapseAll').css('display', '');\n\t}\n\tapplyPredicate();\n}", "title": "" }, { "docid": "692e94536a714954c4bcd0df549e7fc9", "score": "0.4701622", "text": "function toggleTemplate(){\n \n var linkText = $(\"#selectAddTemplateLink\").text(); \n var dropdownlist = $(\"#mapParamConfigurationTemplate\").data(\"kendoDropDownList\");\n \n\t if (linkText == 'Select Template'){\n\t $(\"#selectAddTemplateLink\").text(\"Remove Template\");\t \n\t dropdownlist.enable(true);\n\t }else{\n\t \t\n\n\t\t\t var kendoWindowConfirm = $(\"<div />\").kendoWindow({\n\t\t\t\t title: \"Select Template Confirm\",\n\t\t\t\t resizable: false,\n\t\t\t\t modal: true,\n\t\t\t\t deactivate: function() {\n\t\t\t\t this.destroy(); \n\t\t\t\t }\n\t\t\t\t});\n\t\t\t \n\t\t\t kendoWindowConfirm.data(\"kendoWindow\")\n\t\t\t .content($(\"#removeTemplateSelectedConfirm\").html())\n\t\t\t .center().open(); \n\t\t\t \n\t\t\t// for dialog remove template confirmation\n\t\t\t$(\"#yesButton\").click(function(){\n\t\t \t\n\t\t \tdropdownlist.value(\"Select\");\n\t\t \tgetSelectedDeviceDetails();\n\t\t \t$(\"#selectAddTemplateLink\").text(\"Select Template\");\n\t\t \tdropdownlist.enable(false);\n\t\t \tkendoWindowConfirm.data(\"kendoWindow\").close();\n\t\t\t});\n\n\t\t\t$(\"#noButton\").click(function(){\n\t\t\t\tkendoWindowConfirm.data(\"kendoWindow\").close();\n\t\t\t});\n\t\t\t\n\t }\n \n }", "title": "" }, { "docid": "fc3fa3b06214f06fe9c8f84b334c8b64", "score": "0.47003788", "text": "function docTemplate(page) {\n return page.doclayout ||\n (page.notemplate && 'none') ||\n (page.nolayout && page.template) ||\n (generator.template$['doc-layout'] && 'doc-layout') ||\n layoutTemplate(page);\n }", "title": "" }, { "docid": "3b3ae0be50b584a33e8d64bfb0297147", "score": "0.4697185", "text": "function gift_template(){\n\n\tif(setup_ajax()!=false){\n\n\t\tvar url=\"gift_template.php\";\n\n\t\tproperties_ajax_send_prepare(url);\n\n\t\txmlHttp.send('template_id=' + window.name);\n\n\t}\n\n}", "title": "" }, { "docid": "42a92f16ba56c7f3c4aeeb6c0bc4ef59", "score": "0.4694799", "text": "function documentHasTemplateFeatures(targetDOM)\n{\n var curDOM = (targetDOM == null) ? dw.getDocumentDOM('document') : targetDOM;\n if (curDOM == null)\n return false;\n\n // Do a quick, cheap check to see if there's anything that looks vaguely like\n // a template feature. If there isn't, we can bail.\n if (!curDOM.isDesignViewUpdated() && curDOM.source)\n {\n var text = curDOM.source.getText().toLowerCase();\n // indexOf() is significantly faster than a regular expression search\n if (text.indexOf(\"templatebegineditable\") == -1 &&\n text.indexOf(\"templatebeginif\") == -1 &&\n text.indexOf(\"templateexpr\") == -1 &&\n text.indexOf(\"templatebeginrepeat\") == -1)\n {\n return false;\n }\n }\n\n // There MAY be template features in this document. Let's go through the somewhat\n // expensive step of synchronizing the document, and then do a real check for\n // template features.\n curDOM.synchronizeDocument();\n\n return ( curDOM.getElementsByTagName(\"MMTemplate:Editable\").length != 0 ||\n curDOM.getElementsByTagName(\"MMTemplate:If\").length != 0 ||\n curDOM.getElementsByTagName(\"MMTemplate:Expr\").length != 0 ||\n curDOM.getElementsByTagName(\"MMTemplate:Repeat\").length != 0 );\n} //documentHasTemplateFeatures", "title": "" }, { "docid": "2d1dfde76fc52c8a2035e817c4e8af34", "score": "0.46880254", "text": "onTemplate(template) {\n var name = this.productModel.get('product_name');\n var url = this.productModel.get('url');\n var urlCaption = url.replace(/^(https?:)?\\/\\//i, '');\n\n if (!/^((https?:\\/\\/)|(\\/\\/))/i.test(url)) {\n url = 'http://' + url;\n }\n return _.template(template)({\n name: name,\n id: this.productModel.get('product_id'),\n url: url,\n urlCaption: urlCaption,\n tools: App.config.productTools,\n favoriteToolName: this.productStateModel.get('favoriteToolName'),\n isFavorite: this.productModel.get('favorite')\n });\n }", "title": "" }, { "docid": "3eb77bfd776b8992866c25b3be6246fb", "score": "0.468254", "text": "function access_change_template(template_id){\n\n\tpath = site_url;\n\n\tz = document.getElementById('security_list').childNodes.length;\n\n\tx=0;\n\n\taccess_value=\"\";\n\n\twhile(x!=z){\n\n\t\tif(document.getElementById('security_list').childNodes[x].id!=\"\"){\n\n\t\t\tif(document.getElementById('security_list').childNodes[x].childNodes[0].src== path + \"website_code/images/TickBoxOn.gif\"){\n\n\t\t\t\taccess_value = document.getElementById('security_list').childNodes[x].id;\n\n\t\t\t}\n\n\t\t}\n\n\t\tx++;\n\n\t}\n\n\tif(access_value==\"Other\"&&document.getElementById('url').value==\"\"){\n\n\t\talert(ACCESS_RESTRICT);\n\n\t}else{\n\n\t\tif(setup_ajax()!=false){\n\n\t\t\tvar url=\"access_change_template.php\";\n\n\t\t\tproperties_ajax_send_prepare(url);\n\n\t\t\tif(access_value==\"Other\"){\n\t\t\t\t\txmlHttp.send('template_id=' + template_id + '&access=' + access_value +'&server_string=' + document.getElementById('url').value);\n\t\t\t}else{\n\t\t\t\t\txmlHttp.send('template_id=' + template_id + '&access=' + access_value);\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}", "title": "" }, { "docid": "ed42406ebd256fb9fdcf4b064a5a6902", "score": "0.4680238", "text": "function isStackOption(){\n //if(option==4){\n // if(navigator.geolocation){\n // location = true;\n // }else{\n // //alert(\"please allow Stacksity to access your location for $near\");\n // }\n //}\n return (option != 3 && option != 2 && option != 7);\n}", "title": "" }, { "docid": "708a7815640a883f713f0535eea3f516", "score": "0.4679944", "text": "_shouldRecreateView(changes) {\n const ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }", "title": "" } ]
9652bc9f4d8d3a814f88523245c367b9
when we release the up arrow or down arrow then the upPressed or downPressed become again false
[ { "docid": "dd9504f7a63ec133e1beb0708789488c", "score": "0.71015865", "text": "function RIGHTkeyUpHandler(e) {\n if(e.key == \"Up\" || e.key == \"ArrowUp\") {\n upPressed = false;\n }\n else if(e.key == \"Down\" || e.key == \"ArrowDown\") {\n downPressed = false;\n }\n}", "title": "" } ]
[ { "docid": "829c0cde759ee51b4d89c142aef0a4e3", "score": "0.8017112", "text": "_upHandler() {\n this._pointerDown = false;\n this._pressed = false;\n }", "title": "" }, { "docid": "f97e7ebbddb8a538a28b84e0754de89a", "score": "0.76003087", "text": "function keyReleased() {\n\tswitch (keyCode) {\n\t\tcase UP_ARROW: upArrow=false; break;\n\t\tcase DOWN_ARROW: downArrow=false; break;\n\t\tcase LEFT_ARROW: leftArrow=false; break;\n\t\tcase RIGHT_ARROW: rightArrow=false; break;\n\t\tdefault: break;\n\t}\n}", "title": "" }, { "docid": "abd1d425905a2f8424f76b8dc863af91", "score": "0.7465259", "text": "function onKeysUp(e) {\n keysDown[e.keyCode] = false;\n downLastFrame[e.keyCode] = false;\n}", "title": "" }, { "docid": "47cf0efc84f24096267ff14f380bb8f5", "score": "0.7463977", "text": "function keyUpHandler() {\n isPressed = false;\n buttonPressed = null;\n}", "title": "" }, { "docid": "cd54f18404336ba18b13e05dae6dff2f", "score": "0.74281996", "text": "function keyUpHandler(e) {\r\n if(e.key == \"Right\" || e.key == \"ArrowRight\") {\r\n rightPressed = false;\r\n }\r\n else if(e.key == \"Left\" || e.key == \"ArrowLeft\") {\r\n leftPressed = false;\r\n }\r\n }", "title": "" }, { "docid": "b05e61f5b4c90828c4b6fa037f9a7c6e", "score": "0.7365831", "text": "function keyUpHandler(e) {\n if(e.keyCode === 39) {\n rightPressed = false;\n }\n else if(e.keyCode === 37) {\n leftPressed = false;\n }\n else if(e.keyCode === 38) {\n upPressed = false;\n }\n else if(e.keyCode === 40) {\n downPressed = false;\n }\n}", "title": "" }, { "docid": "715f7cd100241d8b141b623e84e10bea", "score": "0.7365285", "text": "function keyUpHandler(e) {\n if (e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = false;\n }\n else if (e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = false;\n }\n}", "title": "" }, { "docid": "fd2909291bbe1a0f8aa350d8913dd438", "score": "0.73533195", "text": "function keyUpHandler(e) {\n\tif(e.keyCode == 39) {\n\t\trightPressed = false;\n\t}\n\telse if(e.keyCode == 37) {\n\t\tleftPressed = false;\n\t}\n}", "title": "" }, { "docid": "4102aec6b6458cbe07000258091ac74c", "score": "0.7325634", "text": "keyUp(e) {\n this.pressedKeys[e.keyCode] = false;\n this.move.pause();\n }", "title": "" }, { "docid": "6940b45293c8126fe9c5ae1bd9f5f83e", "score": "0.73186725", "text": "function keyUpHandler(e) {\n if(e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = false;\n }\n else if(e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = false;\n }\n}", "title": "" }, { "docid": "dc796d6dcd47cb9ea5e9abc543e6294e", "score": "0.7312835", "text": "function keyDownHandler(e) {\n if (e.keyCode == 38) {\n upPressed = true;\n }\n else if (e.keyCode == 40) {\n downPressed = true;\n }\n}", "title": "" }, { "docid": "65668bec4bf44345c4d59a3fcce775ff", "score": "0.73124665", "text": "function keyUpHandler(e){\n if (e.keyCode == 39){\n rigthPressed = false;\n } else if (e.keyCode == 37){\n leftPressed = false;\n }\n}", "title": "" }, { "docid": "0f91251ddaa38273ef70ca7b08834eff", "score": "0.7305847", "text": "function keyUpHandler(event){\n if (event.keyCode == 39) {\n rightPressed = false;\n } else if (event.keyCode == 37) {\n leftPressed = false;\n }\n}", "title": "" }, { "docid": "03c7b11c920e0c3547163bd6a2964725", "score": "0.72967905", "text": "function keyUpHandler(e) {\n if (e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = false;\n }\n else if (e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = false;\n }\n}", "title": "" }, { "docid": "460d5afa22fd25f079b9c570b9ba808d", "score": "0.7291033", "text": "function keyUpHandler(e) {\n if(e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = false;\n } \n else if(e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = false;\n }\n}", "title": "" }, { "docid": "f65f25e4440efef4e1450398a25bc4b1", "score": "0.72878176", "text": "_downHandler() {\n this._pointerDown = true;\n this._pressed = true;\n this._receivedFocusFromKeyboard = false;\n }", "title": "" }, { "docid": "a281e4aa0200271446476b9aea67ee33", "score": "0.7247051", "text": "function keyDownHandler(e) {\n if(e.keyCode == 38) {\n upPressed = true;\n } else if(e.keyCode == 40) {\n downPressed = true;\n } else if(e.keyCode == 37) {\n leftPressed = true;\n } else if(e.keyCode == 39) {\n rightPressed = true;\n }\n}", "title": "" }, { "docid": "88e522c29cf20d2aa85116a33078ba68", "score": "0.72185165", "text": "function keyUp(e)\n{\n var code = e.keyCode ? e.keyCode : e.which;\n if (code == 38)\n\tupPressed = 0;\n if (code == 40)\n\tdownPressed = 0;\n if (code == 37)\n\tleftPressed = 0;\n if (code == 39)\n\trightPressed = 0;\n}", "title": "" }, { "docid": "9e0a2471af208781c70310c6d2958837", "score": "0.72127235", "text": "keyUp(event)\n {\n if(event.keyCode === 39)\n {\n this.key_right = false;\n mario.goingRight = false;\n }\n if(event.keyCode === 37)\n {\n this.key_left = false;\n mario.goingLeft = false;\n }\n if(event.keyCode === 32)\n {\n this.key_space = false;\n }\n }", "title": "" }, { "docid": "30ae0542efba28aee81b9ad059919d75", "score": "0.721241", "text": "function keyDown(e)\n{\n var code = e.keyCode ? e.keyCode : e.which;\n if (code == 38)\n\tupPressed = 1;\n if (code == 40)\n\tdownPressed = 1;\n if (code == 37)\n\tleftPressed = 1;\n if (code == 39)\n\trightPressed = 1;\n}", "title": "" }, { "docid": "1faabd855f9943384ec96f7ff3b24eff", "score": "0.7206375", "text": "function keyUp(e) {\n if (e.keyCode == 39){\n rightKey = false;\n } else if (e.keyCode == 37){\n leftKey = false;\n }\n if (e.keyCode == 38){ \n upKey = false;\n } else if (e.keyCode == 40){\n downKey = false;\n }\n}", "title": "" }, { "docid": "f943323ef54cae1429b0ffa70c00f16e", "score": "0.7203351", "text": "function keyUpHandler(e) {\n if (e.keyCode == 39) { // Flecha derecha\n rightPressed = false;\n }\n else if (e.keyCode == 37) { // Flecha izquierda\n leftPressed = false;\n }\n }", "title": "" }, { "docid": "857662ce40a5eed4dbf7255b93d92ade", "score": "0.7188916", "text": "keyDownHandler() {\n if (event.keyCode == this.up.key) {\n this.up.flag = true;\n }\n if (event.keyCode == this.down.key) {\n this.down.flag = true;\n }\n if (event.keyCode == this.left.key) {\n this.left.flag = true;\n }\n if (event.keyCode == this.right.key) {\n this.right.flag = true;\n }\n if (event.keyCode == this.grab.key) {\n this.grab.flag = true;\n }\n }", "title": "" }, { "docid": "b1d113e4e04e78bd5990e00c30b901d6", "score": "0.7160889", "text": "function keyupHandler(e) {\n if (e.keyCode === 39) {\n state.rightPressed = false;\n } else if (e.keyCode === 37) {\n state.leftPressed = false;\n }\n }", "title": "" }, { "docid": "a23a17835a861cb76296aa2ba905f2e9", "score": "0.7150468", "text": "on_up(key) {\n if (this._keys_down.has(key)) {\n this._keys_down.delete(key);\n this.keyReleased(key);\n }\n }", "title": "" }, { "docid": "a23a17835a861cb76296aa2ba905f2e9", "score": "0.7150468", "text": "on_up(key) {\n if (this._keys_down.has(key)) {\n this._keys_down.delete(key);\n this.keyReleased(key);\n }\n }", "title": "" }, { "docid": "07c6115e862ff3e5e77eee636f4437f9", "score": "0.71158385", "text": "function keysUp(e) {\n\tif(e.keyCode == 39){\n\t\tright = false;\n\t}\n\telse if(e.keyCode == 37){\n\t\tleft = false;\n\t}\n\t\n}", "title": "" }, { "docid": "e44e212af8a43ce1f21e6e5ab881d6b7", "score": "0.7105149", "text": "function keyPressed() {\n\tswitch (keyCode) {\n\t\tcase UP_ARROW: upArrow=true; break;\n\t\tcase DOWN_ARROW: downArrow=true; break;\n\t\tcase LEFT_ARROW: leftArrow=true; break;\n\t\tcase RIGHT_ARROW: rightArrow=true; break;\n\t\tdefault: break;\n\t}\n}", "title": "" }, { "docid": "2efc9a0bef1499571e3d651599154ae5", "score": "0.7103204", "text": "function releaseKey() {\n if (event.keyCode === 87) {\n up = false;\n }\n else if (event.keyCode === 83) {\n down = false;\n }\n else if (event.keyCode === 65) {\n left = false;\n }\n else if (event.keyCode === 68) {\n right = false;\n }\n}", "title": "" }, { "docid": "d4323dc4fc9b1fdeb2550bec3d94c668", "score": "0.7074182", "text": "function onPointerUp() {\n if (pointerActive) {\n pointerActive = false;\n }\n }", "title": "" }, { "docid": "1d6afbeaff2c5fee73b2b3a81395202e", "score": "0.7067211", "text": "function keyUp(e) {\n if (e.keyCode == 39) rightKey = false;\n else if (e.keyCode == 37) leftKey = false;\n if (e.keyCode == 38) upKey = false;\n else if (e.keyCode == 40) downKey = false;\n}", "title": "" }, { "docid": "0ab419cdee4ca767db4faa103f30862e", "score": "0.7066461", "text": "get isUp() {return this.state < 0;}", "title": "" }, { "docid": "0ab419cdee4ca767db4faa103f30862e", "score": "0.7066461", "text": "get isUp() {return this.state < 0;}", "title": "" }, { "docid": "10fad4852c72af25ec8004a4566ecb56", "score": "0.70538884", "text": "function keyDownHandler(e) {\n isPressed = true;\n buttonPressed = e.key;\n}", "title": "" }, { "docid": "25ab276c0fc0d0a3e97cee4421624da5", "score": "0.7038644", "text": "function keyUp(evt) {\n if(evt.key == \"Right\" || evt.key == \"ArrowRight\") {\n rightPressed = false;\n }\n if(evt.key == \"Left\" || evt.key == \"ArrowLeft\") {\n leftPressed = false;\n }\n if(evt.key == \"Up\" || evt.key == \"ArrowUp\") {\n upPressed = false;\n }\n if(evt.key == \"Down\" || evt.key == \"ArrowDown\") {\n downPressed = false;\n }\n if(evt.key == \"w\") {\n wPressed = false;\n }\n if(evt.key == \"s\") {\n sPressed = false;\n }\n if(evt.key == \"a\") {\n aPressed = false;\n }\n if(evt.key == \"d\") {\n dPressed = false;\n }\n}", "title": "" }, { "docid": "596165135ebb0d57ac98d952b782c83d", "score": "0.6994079", "text": "function onKeyUp(evt) {\r\n if (evt.keyCode == 39) {rightDown = false}\r\n else if (evt.keyCode == 37) {leftDown = false}\r\n else if(evt.keyCode == 38) {upDown = false}\r\n else if (evt.keyCode == 40) {downDown = false}\r\n}", "title": "" }, { "docid": "6be98e5fb519112002e87d7f80d64826", "score": "0.6986036", "text": "function onMouseup(event) {\n isMouseDown = false;\n }", "title": "" }, { "docid": "6f58d48fe6816f20b903ed536a0ee683", "score": "0.69716877", "text": "function onKeyUp(evt) {\n if (evt.keyCode == 39) rightDown = false;\n else if (evt.keyCode == 37) leftDown = false;\n}", "title": "" }, { "docid": "6f58d48fe6816f20b903ed536a0ee683", "score": "0.69716877", "text": "function onKeyUp(evt) {\n if (evt.keyCode == 39) rightDown = false;\n else if (evt.keyCode == 37) leftDown = false;\n}", "title": "" }, { "docid": "14994704c10e4d57e583c44ff746a890", "score": "0.69615155", "text": "down(_e) {\n return false;\n }", "title": "" }, { "docid": "6aadcffa1e128419f0951fc9dc81682a", "score": "0.69548523", "text": "function keyPressedForNodeUp(node) {\n return kd.K.isDown();\n }", "title": "" }, { "docid": "b69a5a76a6b29c79d284bc2271590bf3", "score": "0.69229287", "text": "function onKeysDown(e) {\n keysDown[e.keyCode] = true;\n\n GetMovementInput();\n getResetInput();\n\n downLastFrame[e.keyCode] = true;\n}", "title": "" }, { "docid": "17243480ec932f61406323f7f0ac62d6", "score": "0.6911709", "text": "function onKeyUp(evt) {\n if (evt.keyCode == 39) rightDown = false;\n else if (evt.keyCode == 37) leftDown = false;\n}", "title": "" }, { "docid": "ea539cea356de57d41e1fa0d30c7deee", "score": "0.68964523", "text": "function handlerLetterUp (evt) {\n\tletterPointerIsDown = false;\n}", "title": "" }, { "docid": "6b57ed5e143d9a0895c3d120815f3a1d", "score": "0.6838688", "text": "function keyPressedForPositionUp(node) {\n return node.focus && kd.Q.isDown();\n }", "title": "" }, { "docid": "2ac239536786362adb09b99b25e30e02", "score": "0.68265927", "text": "onUpKey() {\n this.onArrowKey('up');\n }", "title": "" }, { "docid": "905ba705b29f543b98b3ab39f1f0a041", "score": "0.6808644", "text": "function keyPressed(keyCode) { return keysDown[keyCode] && !downLastFrame[keyCode] }", "title": "" }, { "docid": "7773e96c02d8b075840dde7773f68b08", "score": "0.68053776", "text": "get isPressed() {return this.state == 1;}", "title": "" }, { "docid": "7773e96c02d8b075840dde7773f68b08", "score": "0.68053776", "text": "get isPressed() {return this.state == 1;}", "title": "" }, { "docid": "15b38fdc51dfc9596c0416e01dfaf4d0", "score": "0.6805132", "text": "function keyReleased() {\r\n if (keyCode === 39) {\r\n right = false;\r\n }\r\n\r\n if (keyCode === 37) {\r\n left = false;\r\n }\r\n}", "title": "" }, { "docid": "b931979fbd9314a70e9a7864fc085492", "score": "0.6784771", "text": "function keyPressedForVelocityUp(node) {\n return node.focus && kd.E.isDown();\n }", "title": "" }, { "docid": "1f9043afc8d202089a45b063ede06dc5", "score": "0.67805433", "text": "function keyDownHandler(e) {\n if(e.keyCode === 39) {\n rightPressed = true;\n }\n else if(e.keyCode === 37) {\n leftPressed = true;\n }\n else if(e.keyCode === 38) {\n upPressed = true;\n }\n else if(e.keyCode === 40) {\n downPressed = true;\n }\n}", "title": "" }, { "docid": "535b74c9241b2f5bf8f4e5a7a5bb0973", "score": "0.6769023", "text": "_handleReleased(keycode) {\n if (this.bindings.actions[keycode]) {\n const name = this.bindings.actions[keycode];\n this.context.actions[name] = false;\n return true;\n }\n if (\n this.bindings.triggers[keycode] &&\n !this.bindings.triggers[keycode].keyDown\n ) {\n res = true;\n\n this.context.triggers[keycode] = true;\n }\n return false;\n }", "title": "" }, { "docid": "b3cb13fba362a6e3680c3548408596a6", "score": "0.67562884", "text": "function keyDownHandler(event)\r\n{\r\n if(event.keyCode == 39)\r\n {\r\n rightPressed = true;\r\n }\r\n else if(event.keyCode == 37)\r\n {\r\n leftPressed = true;\r\n }\r\n else if(event.keyCode == 40)\r\n {\r\n downPressed = true;\r\n }\r\n else if(event.keyCode == 38)\r\n {\r\n upPressed = true;\r\n }\r\n}", "title": "" }, { "docid": "dac4722fb4ab0a56e9ebeabebabfb7e9", "score": "0.6740666", "text": "keyPress(event){\n\t\tlet char = String.fromCharCode(event.keyCode);\n\t\tif(char == 'A' || char == 'D' || char == 'S' || char == 'W'){\n\t\t\tif(this.buttons[char] == false && this.pressed == true){\n\t\t\t\tthis.buttonsDown[char] = true;\n\t\t\t\tthis.buttonsUp[char] = false;\n\t\t\t}\n\n\t\t\tif(this.buttons[char] == true && this.pressed == false){\n\t\t\t\tthis.buttonsDown[char] = false;\n\t\t\t\tthis.buttonsUp[char] = true;\n\t\t\t}\n\t\t\tthis.buttons[char] = this.pressed;\n\t\t}\n\t}", "title": "" }, { "docid": "ab7e32a8dd5ef2f9317fdcb210fe3c56", "score": "0.673611", "text": "up(_e) {\n return false;\n }", "title": "" }, { "docid": "1324592c937a48c2a63e2038ddb0484d", "score": "0.6730337", "text": "function keyDownHandler(e){\n if (e.keyCode == 39){\n rigthPressed = true;\n } else if (e.keyCode == 37){\n leftPressed = true;\n }\n}", "title": "" }, { "docid": "7fceaf0f705e4741d69ca2f98aa05045", "score": "0.66999424", "text": "function keyDownHandler(e) { //Function that is called when a key is pressed, e is an object that stores information about the key\n \n if(e.keyCode == 39) { //if the key is the right arrow (the keyCode is 39), make rightPressed true\n rightPressed = true;\n }\n \n else if(e.keyCode == 37) { //if the key is the left arrow (the keyCode is 37), make leftPressed true\n leftPressed = true;\n }\n}", "title": "" }, { "docid": "09a89f8172601005d74d6b0df57b4e11", "score": "0.6685822", "text": "function onKeyUp(e) {\n\tif (e.keyCode === 39 || e.keyCode === 65){\n\t\t moveRightFlag = false;\n\t}else if (e.keyCode === 37 || e.keyCode === 68) {\n \t\tmoveLeftFlag = false;\n\t}else if (e.keyCode === 38 || e.keyCode === 87) {\n rotateFlag = false;\n }else if (e.keyCode === 40 || e.keyCode === 83){\n moveDownFlag = false;\n }\n}", "title": "" }, { "docid": "ec83ff61e9affc519e8894f548f8c9f4", "score": "0.66842127", "text": "function mouseUpHandler() {\n mouseDown = false;\n console.log(\"mouse up.\");\n }", "title": "" }, { "docid": "3e717d735695c5cd2acbafc818d71a47", "score": "0.6678519", "text": "handleLeftBtnUp () {\n this.setState(\"LEFT_BTN\", false);\n }", "title": "" }, { "docid": "7fbe6b4cc450599fc87aa97d28d1455e", "score": "0.6675912", "text": "get isDown() {return this.state > 0;}", "title": "" }, { "docid": "7fbe6b4cc450599fc87aa97d28d1455e", "score": "0.6675912", "text": "get isDown() {return this.state > 0;}", "title": "" }, { "docid": "cc42a4c934a58b91305b3baf8c925109", "score": "0.666578", "text": "function keyPressedForEffortUp(node) {\n return node.focus && kd.T.isDown();\n }", "title": "" }, { "docid": "97fed0c0a24c70f076280361936df591", "score": "0.6656371", "text": "function onDown(ev) {\n // ev.preventDefault();\n gDrawValues.isClicked = true;\n console.log('down');\n // console.log(ev);\n}", "title": "" }, { "docid": "8044b806c92ca042c92d9f93ecc6a961", "score": "0.66524607", "text": "function onMouseUp(ev){\n ev.preventDefault()\n mouseDown = false\n button = -1\n}", "title": "" }, { "docid": "fe8eff1d0a9b13666a669647b13be5da", "score": "0.66480345", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true)\n }\n }", "title": "" }, { "docid": "fe8eff1d0a9b13666a669647b13be5da", "score": "0.66480345", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true)\n }\n }", "title": "" }, { "docid": "fe8eff1d0a9b13666a669647b13be5da", "score": "0.66480345", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true)\n }\n }", "title": "" }, { "docid": "e6e7d91ce0e2e4ec20f7585a567b0950", "score": "0.6647259", "text": "function keyDownHandler(e) {\n\t\tif(e.keyCode == 39) {\n\t\t\trightPressed = true;\n\t\t}\n\t\telse if(e.keyCode == 37) {\n\t\t\tleftPressed = true;\n\t\t}\n\t}", "title": "" }, { "docid": "db6f12b87f415d096ab9b2728e688b46", "score": "0.6630156", "text": "function onUp(e, touches){\n\t\t\tif(typeof touches != 'undefined'){\n\n\t\t\t} else {\n\t\t\t\tmouse.isDown = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "36454ce42dc1f45e244ea7ebb9ad1a7a", "score": "0.66285044", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true);\n }\n }", "title": "" }, { "docid": "4bfd536e6917e71a6ecd64a811cef078", "score": "0.66277015", "text": "function keyDownHandler(e) {\n\tif(e.keyCode == 39) {\n\t\trightPressed = true;\n\t}\n\telse if(e.keyCode == 37) {\n\t\tleftPressed = true;\n\t}\n}", "title": "" }, { "docid": "2377bb71cf1cb03f0b919b791f926f51", "score": "0.6618374", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true)\n }\n }", "title": "" }, { "docid": "d86d7ac4de97148362de4003faaede25", "score": "0.6614905", "text": "function isPressed() {\n return pressed;\n}", "title": "" }, { "docid": "a711e872d815b6808de9f8b132ca0f43", "score": "0.66109586", "text": "function upInputReleased() {\n var released = false;\n released = game.input.keyboard.upDuration(Phaser.Keyboard.UP);\n released |= game.input.activePointer.justReleased();\n return released;\n released = null;\n}", "title": "" }, { "docid": "82bb9eb937765f6610078a91e6dad76e", "score": "0.6607895", "text": "function keyDownHandler(e) {\n if(e.keyCode == 39) {\n rightPressed = true;\n }\n else if(e.keyCode == 37) {\n leftPressed = true;\n }\n }", "title": "" }, { "docid": "50a3e77fe31d046c8d305e456729543e", "score": "0.66050756", "text": "setMoveUp(){\n this.directionTracker.up = true;\n this.directionTracker.down = false;\n this.directionTracker.right = false;\n this.directionTracker.left = false; \n }", "title": "" }, { "docid": "c2d66f5fc51290b35c64d36780d49a75", "score": "0.6602373", "text": "function handlePressUp(evt)\n{\n lastTouchPos = [[-1,-1],[-1,-1]];\n}", "title": "" }, { "docid": "89bc5e1898380b9633c187b77d083509", "score": "0.6601646", "text": "function keyDownHandler(e) {\r\n if(e.key == \"Right\" || e.key == \"ArrowRight\") {\r\n rightPressed = true;\r\n }\r\n else if(e.key == \"Left\" || e.key == \"ArrowLeft\") {\r\n leftPressed = true;\r\n }\r\n }", "title": "" }, { "docid": "11e8494cd512c4c34bd84fc421a1cc18", "score": "0.6601133", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true);\n }\n }", "title": "" }, { "docid": "391e25690df288861f121b8b9da112cf", "score": "0.6594991", "text": "function onButtonDown() {\n\n this.isdown = true;\n if (this.answer) {\n this.texture = this.okTextureButtonDown;\n if ( ! answerState[ this.line ]) {\n countRightAnswers++;\n answerState[ this.line ] = true;\n }\n if (countRightAnswers == numberOfRightAnswers) {\n console.log(\"YOU WIN!!!!\");\n } \n } else {\n this.texture = this.errorTextureButtonDown;\n }\n this.alpha = 1;\n}", "title": "" }, { "docid": "11398556151b8c7ca80208adb04d7acd", "score": "0.6585614", "text": "function keyDownHandler(e) {\n if(e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = true;\n }\n else if(e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = true;\n }\n}", "title": "" }, { "docid": "ad3e4c282c17302845a9470d444360fc", "score": "0.6584183", "text": "function controlsUp(ev) {\n switch (ev.keyCode) {\n case 37: // Left\n case 74: // J\n case 39: // Right\n case 76: // L\n case 72: // H\n case 59: // ;\n case 186: // ;\n if (autoScrubInterval) {\n clearInterval(autoScrubInterval);\n autoScrubInterval = null;\n if (autoScrubResume)\n media.play();\n }\n break;\n }\n }", "title": "" }, { "docid": "cf87f51ab1fd898f95c274b6d00ae642", "score": "0.6577763", "text": "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true);\n }\n }", "title": "" }, { "docid": "42784c680a510f9fdac1a16e96ebead4", "score": "0.6576167", "text": "function keyDown(e) {\n if (!keysDown[e.keyCode]) {\n self.anyKeyDown = true;\n self.anyKey = true;\n keysPressed[e.keyCode] = true;\n keysDown[e.keyCode] = true;\n keyDownRemovers.push(e.keyCode);\n\n amoundOfKeysPressed++;\n }\n }", "title": "" }, { "docid": "ed18ba53cd3b35caa97be270de37a3ad", "score": "0.6566312", "text": "handleInput(keyPressed) {\n if (keyPressed === 'right') {\n rightPressed = true;\n }\n\n if(keyPressed === 'up') {\n upPressed = true;\n }\n\n if(keyPressed === 'left') {\n leftPressed = true;\n }\n\n if(keyPressed === 'down') {\n downPressed = true;\n }\n }", "title": "" }, { "docid": "bc1b83551f0965980ef2d6ba1b4ba686", "score": "0.6556831", "text": "onMouseUp() {\n this.isMouseDown = false;\n }", "title": "" }, { "docid": "666b58b47c1a52ce0d52171f387e114d", "score": "0.6545082", "text": "keyUp(e) {\n let input = e.key;\n if (input == \"ArrowLeft\" || input == \"ArrowRight\") {\n this.playerMovement = null;\n }\n }", "title": "" }, { "docid": "9f84d9bc36b304ccee1681821ea83fb1", "score": "0.654318", "text": "function keyDownHandler(e) {\n if (e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = true;\n }\n else if (e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = true;\n }\n}", "title": "" }, { "docid": "033fcba3f0dd05f0aac274eef1b56ee8", "score": "0.65393114", "text": "function keyDownHandler(event){\n if (event.keyCode == 39) {\n rightPressed = true;\n } else if (event.keyCode == 37) {\n leftPressed = true;\n }\n}", "title": "" }, { "docid": "def99c7bc41cb0d58c8f70e7c2d46384", "score": "0.65355235", "text": "handleUp_() {\n this.setActive_(false);\n this.adapter_.notifyChange();\n }", "title": "" }, { "docid": "394e2ce071ba4f12aabb47d693388228", "score": "0.65351194", "text": "function handleButtonDown(event) {\n checkVpadState($(this).attr(\"value\"), true);\n // add touchIdx?\n}", "title": "" }, { "docid": "f908c54b94642c7d71391e3facc33985", "score": "0.65340996", "text": "function keyDownHandler(e) {\n if (e.keyCode == 39) {\n rightPressed = true;\n }\n\n if (e.keyCode == 37) {\n leftPressed = true;\n }\n}", "title": "" }, { "docid": "437de684cbc62c86749408f477a2ee84", "score": "0.6534046", "text": "function keyPressed(evt) {\n\t // console.log(\"Key pressed: \"+evt.keyCode);\n\tif(evt.keyCode == KEY_LEFT_ARROW) {\n keyHeld_TurnLeft = true;\n\t\t\n\t}\n\tif(evt.keyCode == KEY_RIGHT_ARROW) {\n keyHeld_TurnRight = true;\n\t\t\n\t}\n\tif(evt.keyCode == KEY_UP_ARROW) {\n keyHeld_Gas = true;\n\t}\n\tif(evt.keyCode == KEY_DOWN_ARROW) {\n keyHeld_Reverse = true;\n }\n \n\n/**\n * keyHeld_Gas = false;\nvar keyHeld_Reverse = false;\nvar keyHeld_TurnLeft = false;\nvar keyHeld_TurnRight = false;\n */\n\n\tevt.preventDefault();\n}", "title": "" }, { "docid": "0a3ba4ea8dae5e1ece01dc4028024477", "score": "0.653256", "text": "desactivaMovimiento(){\n this.downPressed = false;\n this.leftPressed = false;\n this.rightPressed = false;\n this.upPressed = false;\n }", "title": "" }, { "docid": "ca91a4f95e7cbc571d8157bf8bc4b13c", "score": "0.6531228", "text": "function mouseUp(e) \n\t{\n\t\tvar mousecode = \"_\" + e.which;\n\t\tmouse[mousecode] = false;\n\t}", "title": "" }, { "docid": "410e61a7ae75d276fcd45222d4005671", "score": "0.6530235", "text": "function keyUp(e) {\n switch (e.key) {\n case('ArrowUp'):\n buttonStop(1);\n break;\n case('ArrowLeft'):\n buttonStop(2);\n break;\n case('ArrowDown'):\n buttonStop(3);\n break;\n case('ArrowRight'):\n buttonStop(4);\n break;\n default:\n return;\n }\n e.preventDefault();\n}", "title": "" }, { "docid": "55daf32e7eae5cf8f82e00272f03fa34", "score": "0.65275127", "text": "function keyDownHandler(e) {\n if (e.keyCode == 39) { // Flecha derecha\n rightPressed = true;\n }\n else if (e.keyCode == 37) { // Flecha izquierda\n leftPressed = true;\n }\n }", "title": "" }, { "docid": "94a8db4ff640e72af75ef2963787278c", "score": "0.65252745", "text": "function onMouseUp() {\n if (curState) {\n if (curState === \"paint\" || curState === \"freeform\" || curState === \"erase\") {\n isMouseDown = false;\n }\n setButtonDisableStatus(\"btn-undo\", false);\n }\n }", "title": "" } ]
f5d9751caeddedf3d0095145b6025195
Advances cells one generation and updates board
[ { "docid": "31b2dcae91a5054f390a926f2b7c8039", "score": "0.777869", "text": "step() {\n // Set next gen as current cell array\n this.cell_array = this.nextGenCells();\n ;\n this.display.updateCells(this.cell_array);\n }", "title": "" } ]
[ { "docid": "1e2872aeaa1a8533ef953e943b8e3c23", "score": "0.7580529", "text": "generate() {\n\t\tlet nextgen = new Array(this.cells.length);\n\n\t\tfor (let i = 0; i < this.canvas.width / this.cellWidth; i++) {\n\t\t\tlet left; // left neighbor state\n\t\t\tlet me; // current state\n\t\t\tlet right; // right neighbor state\n\n\t\t\tif (i > 0) {\n\t\t\t\tleft = this.cells[i - 1];\n\t\t\t} else {\n\t\t\t\tleft = 0;\n\t\t\t}\n\n\t\t\tme = this.cells[i];\n\n\t\t\tif (i < this.canvas.width / this.cellWidth - 1) {\n\t\t\t\tright = this.cells[i + 1];\n\t\t\t} else {\n\t\t\t\tright = 0;\n\t\t\t}\n\n\t\t\tnextgen[i] = this.computeGeneration(left, me, right);\n\t\t}\n\n\t\tthis.cells = nextgen;\n\t\tthis.generation++;\n\t}", "title": "" }, { "docid": "692061a8c5a03b82559ff81f958c19de", "score": "0.72972065", "text": "function calcNextGen() {\n const nextGenCells = [];\n if (cells.length === yCellCount) {\n for (let y = 0; y < yCellCount; y++) {\n let row = [];\n for (let x = 0; x < xCellCount; x++) {\n row.push(isAlive(y, x));\n }\n nextGenCells.push(row);\n }\n setCells(nextGenCells);\n setIteration(iteration + 1);\n }\n }", "title": "" }, { "docid": "022d46f163c10a922ab9a4cabdc6fea4", "score": "0.7037836", "text": "nextIteration() {\n let newBoard = this.makeTheBoardEmpty();\n iterationNumber++;\n\n for (let y = 0; y < this.rows; y++) {\n for (let x = 0; x < this.cols; x++) {\n let neighbors = this.calculateNeighbors(this.board, x, y);\n if (this.board[y][x]) {\n if (neighbors === 2 || neighbors === 3) {\n newBoard[y][x] = true;\n } else {\n newBoard[y][x] = false;\n }\n } else {\n if (!this.board[y][x] && neighbors === 3) {\n newBoard[y][x] = true;\n }\n }\n }\n }\n\n this.board = newBoard;\n this.setState({ cells: this.updateCellsList() });\n\n this.timeoutHandler = window.setTimeout(() => {\n this.nextIteration();\n }, this.state.interval);\n }", "title": "" }, { "docid": "3c13841c065a86d5374a6e5f35eca026", "score": "0.6967791", "text": "nextStep() {\n for (let rep = 0; rep < this.reps; rep++) {\n // Executes if time is in range\n if (this.t++ < this.maxTime) {\n for (let i = this.margin; i < this.numberOfCells - this.margin; i++) {\n for (let j = this.margin; j < this.numberOfCells - this.margin; j++) {\n const x = this.cells[i][j].x;\n const y = this.cells[i][j].y;\n const laplacian = this.calcLaplacian(i, j);\n\n const xInc = this.mu * laplacian.x - x * y * y + this.feed * (1 - x);\n const yInc = this.nu * laplacian.y + x * y * y - (this.kill + this.feed) * y;\n\n this.newCells[i][j] = {\n x: constrain(\n x + (xInc + this.noiseFactor2 * (Math.random() - .5)) * this.deltaTime,\n 0, 1),\n y: constrain(\n y + (yInc + this.noiseFactor2 * (Math.random() - .5)) * this.deltaTime,\n 0, 1)\n };\n }\n }\n\n // Cells are updated\n [this.cells, this.newCells] = [this.newCells, this.cells];\n } else {\n // Resets time and cells\n this.t = 0;\n this.resetCells();\n }\n }\n }", "title": "" }, { "docid": "27c2c670a62983232d452e6d8ae7deb1", "score": "0.6925338", "text": "computeNextGeneration() {\n // let boardClone = this.copyArray(this.board);\n let board = this.board;\n let neighbors = 0;\n let score = 0;\n\n for (let col = 1; col < board.length - 1; col++) {\n for (let row = 1; row < board[col].length - 1; row++) {\n if (board[col - 1][row - 1] === 1) neighbors++;\n if (board[col][row - 1] === 1) neighbors++;\n if (board[col + 1][row - 1] === 1) neighbors++;\n if (board[col - 1][row] === 1) neighbors++;\n if (board[col + 1][row] === 1) neighbors++;\n if (board[col - 1][row + 1] === 1) neighbors++;\n if (board[col][row + 1] === 1) neighbors++;\n if (board[col + 1][row + 1] === 1) neighbors++;\n\n this.boardClone[col][row] = this.rules(board[col][row], neighbors);\n neighbors = 0;\n }\n }\n this.generation++;\n\n this.updateStats('generation_stat', this.generation);\n this.updateStats('population_stat', this.score);\n\n this.score = 0;\n let temp = this.board;\n this.board = this.boardClone;\n this.boardClone = temp;\n }", "title": "" }, { "docid": "02a4ebc27786f1a63359ada1d69df8c2", "score": "0.6859879", "text": "getNextGeneration(){\n let genContinue = false;\n let width = this.state.width;\n let height = this.state.height;\n let topLft = 0;\n let topRt = width-1;\n let botLft = height*width-width;\n let botRt = height*width-1;\n let edgeRows = width*(height-1);\n let edgeCols = (height-1);\n let newBoard = this.state.board.map((cell,_,arr)=>{\n let neighbors = []; \n neighbors.push(\n arr[cell[0]-width-1],\n arr[cell[0]-width],\n arr[cell[0]-width+1],\n arr[cell[0]-1],\n arr[cell[0]+1],\n arr[cell[0]+width-1],\n arr[cell[0]+width],\n arr[cell[0]+width+1])\n //top row\n if (cell[0] >= topLft && cell[0] <= topRt) {\n neighbors.push(\n arr[cell[0]+edgeRows-1],\n arr[cell[0]+edgeRows],\n arr[cell[0]+edgeRows+1]\n )\n }\n //bot row\n if (cell[0] > botLft && cell[0] < botRt) {\n neighbors.push(\n arr[cell[0]-edgeRows-1],\n arr[cell[0]-edgeRows],\n arr[cell[0]-edgeRows+1]\n )\n }\n //left col\n if (cell[0]%width === 0) {\n neighbors.push(\n arr[cell[0]+edgeCols-width],\n arr[cell[0]+edgeCols],\n arr[cell[0]+edgeCols+width]\n )\n }\n //right col\n if ((cell[0]+1)%width === 0){\n neighbors.push(\n arr[cell[0]-edgeCols-width],\n arr[cell[0]-edgeCols],\n arr[cell[0]-edgeCols+width]\n )\n }\n // corners???\n \n //filter out any undefineds from above mapping\n neighbors = neighbors.filter((cell)=>{\n return cell !== undefined\n })\n \n let aliveNeighbors = this.checkNeighbors(neighbors)\n\n // killing the cell (this is Game of Life rule)\n if (cell[1] && (aliveNeighbors < 2 || aliveNeighbors > 3 )) {\n genContinue = true;\n return [cell[0], false]\n } \n // being reborn (other game of life rule)\n else if (!cell[1] && aliveNeighbors === 3) {\n genContinue = true;\n return [cell[0], true]\n }\n else {\n return cell\n }\n });\n // flag genContinue necessary to stop the generations ticking\n if (genContinue) {\n this.setState({\n board: newBoard, \n generations: this.state.generations + 1});\n }\n }", "title": "" }, { "docid": "e817c29d6c0b693ea4574a9e9a594c81", "score": "0.6813151", "text": "function newGeneration() {\n var cellScore, cellState;\n var newBoard = [];\n board.forEach(function (elem, index) {\n cellScore = checkNeighbours(index);\n cellState = newCellState(index, cellScore);\n newBoard.push(cellState);\n });\n board = newBoard;\n printBoard();\n}", "title": "" }, { "docid": "8c74403041719ec9fb1f29d84c131fd0", "score": "0.6800381", "text": "function nextCycle(){\n nextCycleMatrix().forEach( (row, x) => {\n row.forEach((col,y) => {\n matrixBoard[x][y] = col;\n if(col === 1){\n if(!document.getElementById(`cell-${x}-${y}`).classList.contains('live-cell')){\n document.getElementById(`cell-${x}-${y}`).classList.add('live-cell');\n }\n }else if(col === 0){\n if(document.getElementById(`cell-${x}-${y}`).classList.contains('live-cell')){\n document.getElementById(`cell-${x}-${y}`).classList.remove('live-cell');\n }\n }\n })\n })\n }", "title": "" }, { "docid": "415e3860d68ac3b5707835dc159260ab", "score": "0.6741976", "text": "tick() {\n const newBoard = this.makeBoard();\n // TODO: Here is where you want to loop through all the cells\n // on the existing board and determine, based on it's neighbors,\n // whether the cell should be dead or alive in the new board\n // (the next iteration of the game)\n //\n // You need to:\n // 1. Count alive neighbors for all cells\n // 2. Set the next state of all cells in newBoard,\n // based on their current alive neighbors\n this.board = newBoard;\n }", "title": "" }, { "docid": "415e3860d68ac3b5707835dc159260ab", "score": "0.6741976", "text": "tick() {\n const newBoard = this.makeBoard();\n // TODO: Here is where you want to loop through all the cells\n // on the existing board and determine, based on it's neighbors,\n // whether the cell should be dead or alive in the new board\n // (the next iteration of the game)\n //\n // You need to:\n // 1. Count alive neighbors for all cells\n // 2. Set the next state of all cells in newBoard,\n // based on their current alive neighbors\n this.board = newBoard;\n }", "title": "" }, { "docid": "4dad1983773fe06d0e12446add723890", "score": "0.67395383", "text": "nextStep() {\n this.newCells = [];\n for (let j = 0; j < this.reps; j++) {\n // Executes if time is in range\n if (this.t++ < this.maxTime) {\n for (let i = 0; i < this.numberOfCells; i++) {\n\n // New indexes are calculated\n const prevI = (this.numberOfCells + i - 1) % this.numberOfCells;\n const nextI = (i + 1) % this.numberOfCells;\n\n // xInc[r] = a * x[r] + b * y[r] + mu * (x[r - 1] + 2 * x[r] + x[r - 1])\n const xInc = this.a * this.cells[i].x + this.b * this.cells[i].y\n + (this.isThree ? this.a13 * this.cells[i].z : 0)\n + this.mu * (this.cells[prevI].x - 2 * this.cells[i].x + this.cells[nextI].x);\n\n // yInc[r] = c * x[r] + d * y[r] + mu * (y[r - 1] + 2 * y[r] + y[r - 1])\n const yInc = this.c * this.cells[i].x + this.d * this.cells[i].y\n + (this.isThree ? this.a23 * this.cells[i].z : 0)\n + this.nu * (this.cells[prevI].y - 2 * this.cells[i].y + this.cells[nextI].y);\n\n const zInc = this.isThree ? (\n this.a31 * this.cells[i].x + this.a32 * this.cells[i].y\n + this.a33 * this.cells[i].z\n + this.muZ * (this.cells[prevI].z - 2 * this.cells[i].z + this.cells[nextI].z)\n ) : 0;\n\n this.newCells[i] = {\n // x[r] += deltaTime * (xInc[r] + noise)\n x: this.cells[i].x\n + this.deltaTime * (xInc + this.noiseFactor2 * (Math.random() - .5)),\n // y[r] += deltaTime * (yInc[r] + noise)\n y: this.cells[i].y\n + this.deltaTime * (yInc + this.noiseFactor2 * (Math.random() - .5)),\n // y[r] += deltaTime * (yInc[r] + noise)\n z: this.cells[i].z\n + this.deltaTime * (zInc + this.noiseFactor2 * (Math.random() - .5))\n }\n }\n // Cells are updated\n this.cells = this.newCells;\n } else {\n // Resets time and cells\n this.t = 0;\n this.resetCells();\n }\n }\n }", "title": "" }, { "docid": "379975d92888a73d8f8aae7c5ec5a962", "score": "0.66891444", "text": "function init(){\n var liveCells = 0;\n matrixBoard.forEach((row,x) => {\n row.forEach((col,y) =>{\n matrixBoard[x][y] = Math.round(Math.random());\n initialCellStatus(document.getElementById(`cell-${x}-${y}`), matrixBoard[x][y]);\n if(matrixBoard[x][y] === 1) liveCells++;\n })\n })\n liveCellCount = liveCells;\n counter.innerHTML = liveCells;\n generations.innerHTML = generationsCount;\n }", "title": "" }, { "docid": "51e352b31de4ddf5ba717152f1cebb62", "score": "0.6670297", "text": "iterate() {\n\n let start = (new Date).getMilliseconds();\n\n\n for (var i = 0; i < this._rows; i++) {\n for (var j = 0; j < this._columns; j++) {\n this.check_state(i, j);\n }\n }\n\n for (var i = 0; i < this._rows; i++) {\n for (var j = 0; j < this._columns; j++) {\n\n this._cells[i][j]._state = this._cells[i][j]._new_state;\n this._cells[i][j].update();\n }\n }\n\n this._generation_display.innerHTML = this._generation++;\n this._live_cells_display.innerHTML = this._live_cells;\n\n this._time = (new Date).getMilliseconds() - start;\n this._time_display.innerHTML = this._time;\n\n this.add_data(this._live_cells_chart, this._generation, this._live_cells);\n this.add_data(this._execution_time_chart, this._generation, this._time);\n\n if (this._running) {\n setTimeout(function () { life.iterate(); }, this._wait_time);\n }\n\n }", "title": "" }, { "docid": "16cab3cfb540470c0da10fac8251a6e2", "score": "0.6655314", "text": "nextStep() {\n this.history.push(this.cells);\n this.cells = transitionGrid(this.cells);\n this.step += 1;\n }", "title": "" }, { "docid": "6e326d2a9dd4a47fc79fa54f991cffeb", "score": "0.66469246", "text": "function nextGen(cells) {\n\n let previousCells = [...cells];\n\n // get neighbours for a cell\n const getNeighbours = (row, col, array) => {\n let result = [];\n const maxRow = array.length;\n const maxCol = array[0].length;\n // add top left\n if (row > 0 && col > 0) result.push(array[row - 1][col - 1]);\n // add top\n if (row > 0) result.push(array[row - 1][col]);\n // add top right\n if (row > 0 && col < maxCol - 1) result.push(array[row - 1][col + 1]);\n // add left\n if (col > 0) result.push(array[row][col - 1]);\n // add right\n if (col < maxCol - 1) result.push(array[row][col + 1]);\n // add bottom left\n if (row < maxRow - 1 && col > 0) result.push(array[row + 1][col - 1]);\n // add bottom\n if (row < maxRow - 1) result.push(array[row + 1][col]);\n // add bottom right\n if (row < maxRow - 1 && col < maxCol - 1) result.push(array[row + 1][col + 1]);\n\n return result;\n }\n\n // calculate next cells\n let nextCells = previousCells.map((rowValue, row, arr) => {\n return rowValue.map((value, col) => {\n const liveNeighbours = getNeighbours(row, col, arr).reduce((s, v) => s += v, 0);\n\n // cells with 3 liveNeighbours will lives\n if (liveNeighbours === 3 || (liveNeighbours === 2 && value)) {\n return 1;\n } else {\n return 0;\n }\n });\n });\n\n return nextCells;\n}", "title": "" }, { "docid": "5bd4575194cdb1299aeb8505edcaee3a", "score": "0.66467524", "text": "setFootprintMatrixPrint(cur,iter){\n \n for (let i = 0; i < iter; i++) {\n let next = this.nextState(cur);\n console.log('next[', i,']', this.grid[next.col][next.row]);\n this.chromosome += ' '+ next.geno;\n if(next) {\n this.activeCell+=1;\n this.displayCell(next.col, next.row, geneToColor(next.geno));\n cur = next; \n }\n else break; \n \n }\n }", "title": "" }, { "docid": "875466461ed8b5d3d538bc863efdf431", "score": "0.6632722", "text": "function updateCell(cell) {\n\n if (cell.id !== '' && playableBool == true) {\n\n if ((turn % 2) == 1) {\n cell.innerHTML = '<i class=\"fas fa-times\"></i>';\n cell.style.color = '#85e0e0';\n updateCellCount(boardArray, cell.id, 'x');\n ++turn;\n } else {\n cell.innerHTML = '<i class=\"far fa-circle\"></i>';\n cell.style.color = '#b3ff66';\n updateCellCount(boardArray, cell.id, 'o');\n ++turn;\n }\n\n ++counter;\n\n if (counter == 9) {\n playableBool == false;\n outText.innerText = \"Draw!\"\n }\n\n checkWin();\n\n return true;\n } else {\n return false;\n }\n\n}", "title": "" }, { "docid": "e769ca12bff65979f728cae81421bb7a", "score": "0.6624831", "text": "walkThroughGrid() {\n if (this.ghostLocation % COLUMNS === 19 && this.nextLocation === this.ghostLocation + 1)\n this.nextLocation = this.ghostLocation - COLUMNS + 1;\n if (this.ghostLocation % COLUMNS === 0 && this.nextLocation === this.ghostLocation - 1)\n this.nextLocation = this.ghostLocation + COLUMNS - 1;\n }", "title": "" }, { "docid": "6950cc30276f8de91f844f2c0826de8a", "score": "0.6609576", "text": "function next() {\n\n this._x--;\n this._y = 0;\n this._grid.shift();\n\n Arsenal.async(this.runGrid.bind(this));\n\n }", "title": "" }, { "docid": "6abec164c637609d56f56119f6df29c7", "score": "0.6608146", "text": "step() {\n //check 3 rules\n //1. Any live cell with two or three neighbors survives\n //2. Any dead cell with three live neighbors becomes a live cell\n //3. All other live cells die in the next generation\n const copyNewWorld = [];\n for (let row = 0; row < this.grid.length; row++) {\n copyNewWorld[row] = []\n for (let col = 0; col < this.grid[0].length; col++) {\n //do stuff\n //check if is alive\n const cell = this.grid[row][col];\n const numNeighborsAlive = this.numAdjAlive(row, col); \n if (this.isAlive(row, col)) {\n if (numNeighborsAlive === 2 || numNeighborsAlive === 3) {\n //increment the age of the cell\n copyNewWorld[row][col] = 1 + this.grid[row][col];\n cell.style.background = cell.style.background; \n } else {\n copyNewWorld[row][col] = 0;\n //change to light green color to indicate it has died\n cell.style.background = '#90EE90';\n }\n } else {\n if (numNeighborsAlive === 3) {\n cell.style.background = 'black'; \n copyNewWorld[row][col] = 1;\n } else {\n copyNewWorld[row][col] = 0;\n // cell.style.background = '#F0F0F0';\n } \n \n }\n }\n }\n this.world = copyNewWorld;\n }", "title": "" }, { "docid": "e12247cfeebfc2de31e717e43b64003f", "score": "0.65927714", "text": "mutate(){\r\n //creates a new grid for update\r\n let new_grid = new Array(this.row);\r\n for (let k = 0; k < this.row; k++) {\r\n new_grid[k] = new Array(this.col);\r\n for (let q = 0; q< this.col; q++){\r\n new_grid[k][q]=0;\r\n }\r\n } \r\n\t //creates a new row and width according to privous game\r\n\t for (let i = 0; i < this.row; i++) {\r\n\t \tfor (let j = 0; j < this.col; j++) {\r\n\r\n\t\t\t //counts live neighbors\r\n\t\t\t let live_neighbors = this.get_neighbors(i, j);\r\n\r\n\t\t\t // alive cell\r\n\t\t\t if ( this.grid[i][j] == 1 ) {\r\n\r\n\t\t\t\t // A live cell with less than two live neighbors dies\r\n\t\t\t\t if ( live_neighbors < 2 ) {\r\n\t\t\t\t\t new_grid[i][j] = 0;\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t // A live cell with two or three live neighbors lives\r\n\t\t\t\t else if ( live_neighbors == 2 || live_neighbors == 3 ) {\r\n\t\t\t\t \t new_grid[i][j] = 1;\r\n\t\t\t\t }\r\n\r\n\t\t\t\t // A live cell with more than three neighbors dies\r\n\t\t\t\t else if ( live_neighbors > 3 ) {\r\n\t\t\t\t \t new_grid[i][j] = 0;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t //A dead cell\r\n\t\t\t else if ( this.grid[i][j] == 0 ) {\r\n\r\n\t\t\t\t //A dead cell with three live neighbors becomes live\r\n\t\t\t\t if ( live_neighbors == 3 ) {\r\n\t\t\t\t new_grid[i][j] = 1;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t \t}\r\n\t }\r\n\t\r\n\t\r\n\tthis.grid = new_grid;\r\n\t}", "title": "" }, { "docid": "e21f2d4b9a70a30ecd8377d3731e285f", "score": "0.6578362", "text": "forChangingBoardSize() {\n let boardWidth = this.img.width * this.boardSize;\n let boardHeight = this.img.height * this.boardHeight;\n const startX = this.rangeX.x0;\n const startY = this.rangeY.y0;\n let i=0, j=0; \n for (let x = startX; x < boardWidth+50; x+= this.img.width ) {\n j = 0;\n for (let y = startY; y < boardHeight+50; y+= this.img.height ) {\n const c = new celda( x, y, ctx ); \n c.setImg( this.img );\n this.board[i][j] = c;\n this.ctx.drawImage( this.img, x, y);\n j++;\n }\n i++;\n }\n }", "title": "" }, { "docid": "033ce49f74a1266259416a7ce67861c4", "score": "0.6559984", "text": "function generate() {\r\n\r\n // Loop through every spot in our 2D array and check spots neighbors\r\n for (var x = 1; x < columns - 1; x++) {\r\n for (var y = 1; y < rows - 1; y++) {\r\n // Add up all the states in a 3x3 surrounding grid\r\n var neighbors = 0;\r\n for (var i = -1; i <= 1; i++) {\r\n for (var j = -1; j <= 1; j++) {\r\n neighbors += board[x+i][y+j];\r\n }\r\n }\r\n\r\n // A little trick to subtract the current cell's state since\r\n // we added it in the above loop\r\n neighbors -= board[x][y];\r\n // Rules of Life\r\n if ((board[x][y] == 1) && (neighbors < 2)) next[x][y] = 0; // Loneliness\r\n else if ((board[x][y] == 1) && (neighbors > 3)) next[x][y] = 0; // Overpopulation\r\n else if ((board[x][y] == 0) && (neighbors == 3)) next[x][y] = 1; // Reproduction\r\n else next[x][y] = board[x][y]; // Stasis\r\n }\r\n }\r\n\r\n // Swap!\r\n var temp = board;\r\n board = next;\r\n next = temp;\r\n}", "title": "" }, { "docid": "033ce49f74a1266259416a7ce67861c4", "score": "0.6559984", "text": "function generate() {\r\n\r\n // Loop through every spot in our 2D array and check spots neighbors\r\n for (var x = 1; x < columns - 1; x++) {\r\n for (var y = 1; y < rows - 1; y++) {\r\n // Add up all the states in a 3x3 surrounding grid\r\n var neighbors = 0;\r\n for (var i = -1; i <= 1; i++) {\r\n for (var j = -1; j <= 1; j++) {\r\n neighbors += board[x+i][y+j];\r\n }\r\n }\r\n\r\n // A little trick to subtract the current cell's state since\r\n // we added it in the above loop\r\n neighbors -= board[x][y];\r\n // Rules of Life\r\n if ((board[x][y] == 1) && (neighbors < 2)) next[x][y] = 0; // Loneliness\r\n else if ((board[x][y] == 1) && (neighbors > 3)) next[x][y] = 0; // Overpopulation\r\n else if ((board[x][y] == 0) && (neighbors == 3)) next[x][y] = 1; // Reproduction\r\n else next[x][y] = board[x][y]; // Stasis\r\n }\r\n }\r\n\r\n // Swap!\r\n var temp = board;\r\n board = next;\r\n next = temp;\r\n}", "title": "" }, { "docid": "fb7a603d0f9f4b51b6dc5cc8cbe8e612", "score": "0.6559935", "text": "function gen() {\n\t\tif (visitedCells < C.rows*C.cols) {\n\t\t\tvar neightbours = current.unvisitedNeightbours(m);\t\n\t\t\tif(neightbours.length !== 0) {\n\t\t\t\trequestAnimFrame(gen);\n\t\t\t\t// Choose randomly one of the unvisited neighbours\n\t\t\t\tvar neightbour = neightbours[randomInt(0, neightbours.length - 1)];\n\t\t\t\t// Push the chosen cell to the stack\n\t\t\t\tblockStack.push(neightbour);\n\t\t\t\t// Remove the wall between the current cell and the chosen cell\n\t\t\t\tif(neightbour.x - current.x === 1) {\n\t\t\t\t\tcurrent.rightWall = false;\n\t\t\t\t} else if(neightbour.x - current.x === -1) {\n\t\t\t\t\tneightbour.rightWall = false;\n\t\t\t\t} else if(neightbour.y - current.y === 1) {\n\t\t\t\t\tcurrent.bottomWall = false;\n\t\t\t\t} else if(neightbour.y - current.y === -1) {\n\t\t\t\t\tneightbour.bottomWall = false;\n\t\t\t\t}\n\t\t\t\t// Make the chosen cell the current cell and mark it as visited\n\t\t\t\tneightbour.visited = true;\n\t\t\t\tvisitedCells++;\n\t\t\t\tcurrent.current = false;\n\t\t\t\tcurrent.draw();\n\t\t\t\tneightbour.current = true;\n\t\t\t\tneightbour.draw();\n\t\t\t\tcurrent = neightbour;\n\t\t\t} else {\n\t\t\t\tcurrent = blockStack.pop();\n\t\t\t\tgen();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7452c8451ae8d315a43f9d56cc67d5c6", "score": "0.65395993", "text": "function calculateNextGeneration() {\n var mightComeAlive = [];\n var nextGeneration = new Grid();\n // Check all living cells\n for (var x in livingCells) {\n for (var y in livingCells[x]) {\n var cell = livingCells[x][y];\n var neighbours = getNeighbours(cell);\n mightComeAlive = mightComeAlive.concat(neighbours.dead);\n var willSurvive = neighbours.living.length > 1 && neighbours.living.length < 4;\n if (willSurvive) {\n if (nextGeneration[cell.x] === undefined) {\n nextGeneration[cell.x] = [];\n }\n nextGeneration[cell.x][cell.y] = cell;\n }\n }\n }\n // Check dead cells\n mightComeAlive.forEach(function(cell) {\n if (getNeighbours(cell).living.length == 3) {\n if (nextGeneration[cell.x] === undefined) {\n nextGeneration[cell.x] = [];\n }\n nextGeneration[cell.x][cell.y] = cell;\n }\n });\n // Update the grid\n livingCells = nextGeneration;\n }", "title": "" }, { "docid": "86c617b2a87b11aaf659709066397cdc", "score": "0.6539488", "text": "function updatePlayer(newRow, newCol) {\n // Remove player class from current loacation\n cellId = \"cell\" + player.row + \"-\" + player.col;\n document.getElementById(cellId).classList.remove(\"player\");\n\n // Set grid array to 0 for current location\n grid[player.row][player.col] = 0;\n // Update player location \n player.row = newRow;\n player.col = newCol;\n\n\n // Update class and grid\n cellId = \"cell\" + player.row + \"-\" + player.col;\n document.getElementById(cellId).classList.add(\"player\");\n\n grid[player.row][player.col] = 1;\n\n // Count specific square \n moveCount++;\n\n}", "title": "" }, { "docid": "6ac9f101c5edde3f11fcf366ec7a84e6", "score": "0.6527445", "text": "function generate() {\r\n for (let x = 1; x < columns + 19; x++) {\r\n for (let y = 1; y < rows + 19; y++) {\r\n // Add up all the states in a 3x3 surrounding grid\r\n let neighbors = 0;\r\n for (let i = -1; i <= 1; i++) {\r\n for (let j = -1; j <= 1; j++) {\r\n neighbors += board[x + i][y + j];\r\n }\r\n }\r\n\r\n //subtract current state as we added it while calculating neighbors\r\n neighbors -= board[x][y];\r\n // Rules of Life\r\n if ((board[x][y] == 1) && (neighbors < 2)) next[x][y] = 0; // Loneliness\r\n else if ((board[x][y] == 1) && (neighbors > 3)) next[x][y] = 0; // Overpopulation\r\n else if ((board[x][y] == 0) && (neighbors == 3)) next[x][y] = 1; // Reproduction\r\n else next[x][y] = board[x][y]; // rest no change\r\n }\r\n }\r\n\r\n // Swap\r\n let temp = board;\r\n board = next;\r\n next = temp;\r\n\r\n}", "title": "" }, { "docid": "b3d7910fef2ea9ebb61e6f78a970d8de", "score": "0.6525149", "text": "function updateScreen(columnChange, rowChange) {\r\n for (let tile of tiles) { \r\n tile.row += rowChange;\r\n tile.column += columnChange;\r\n updateTile(tile);\r\n }\r\n}", "title": "" }, { "docid": "e422cd3df6fcc05d24add6ce203bf1fd", "score": "0.6522895", "text": "function fillBoard () {\n for (let i = 0; i < board.length; i += 1) {\n let coords = getCellCoords(i);\n ctx.save();\n ctx.translate(coords.x + cellSize / 2, coords.y + cellSize / 2);\n // So the origin of the canvas is at the center of the current cell, so we can just draw an 'X' or an 'O'\n if (board[i] == status.playerOne) {\n putCross();\n }\n else if (board[i] == status.playerTwo) {\n putZero();\n }\n ctx.restore();\n }\n }", "title": "" }, { "docid": "9055903b543bfa895ef30a06dcf3e84a", "score": "0.65161526", "text": "function generate() {\r\n\r\n //// Loop through every spot in our 2D array and check spots neighbors\r\n for (var x = 1; x < columns - 1; x++) {\r\n for (var y = 1; y < rows - 1; y++) {\r\n // Add up all the states in a 3x3 surrounding grid\r\n var neighbors = 0;\r\n for (var i = -1; i <= 1; i++) {\r\n for (var j = -1; j <= 1; j++) {\r\n neighbors += board[x + i][y + j];\r\n }\r\n }\r\n\r\n //// A little trick to subtract the current cell's state since\r\n //// we added it in the above loop\r\n neighbors -= board[x][y];\r\n\r\n //// the logic for the target to ignite life with its position\r\n if (floor(xTarget / w) == x && floor(yTarget / w) == y) {\r\n next[x][y] = 1;\r\n //init();\r\n if (xTarget <= 50) {\r\n for (var i = 0; i < columns; i++) {\r\n for (var j = 0; j < rows; j++) {\r\n //// Lining the edges with 0s\r\n if (i == 0 || j == 0 || i == columns - 1 || j == rows - 1) board[i][j] = 0;\r\n //// Filling the rest randomly\r\n else board[i][j] = floor(random(2));\r\n next[i][j] = 0;\r\n\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n ////// Rules of Life////\r\n ///// Loneliness\r\n else if ((board[x][y] == 1) && (neighbors < 2)) next[x][y] = 0;\r\n ///// Overpopulation\r\n else if ((board[x][y] == 1) && (neighbors > 3)) next[x][y] = 0;\r\n ///// Reproduction\r\n else if ((board[x][y] == 0) && (neighbors == 3)) next[x][y] = 1;\r\n ///// Stasis\r\n else next[x][y] = board[x][y];\r\n\r\n }\r\n }\r\n\r\n\r\n\r\n //// Swap!\r\n var temp = board;\r\n board = next;\r\n next = temp;\r\n}", "title": "" }, { "docid": "c5346013c81c382a0bc17ca802e1132f", "score": "0.6511986", "text": "function update(){\n\t++intcnt;\n\tif(intcnt==maxintcnt){\n\t\tintcnt=0;\n\t\tnxtgen();\n\t}\n\tc.clearRect(0,0,window.innerWidth,window.innerHeight);\n\tfor(var i=0; i<gw; ++i){\n\t\tfor(var o=0; o<gh; ++o){\n\t\t\tif(grid[i][o]==1)\n\t\t\t\tc.fillRect(i*(cs+pd)+pd,o*(cs+pd)+pd,cs,cs);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "299475846facebcf3924b79009545a59", "score": "0.65022516", "text": "reDraw () { \n for (let i = 0; i < this.boardSize; i++) {\n for (let j = 0; j < this.boardHeight; j++) {\n const c = this.board[i][j];\n c.draw();\n }\n }\n }", "title": "" }, { "docid": "f24cca257182f8f62aa629ef5186d6c3", "score": "0.64677566", "text": "tick() {\n const newBoard = this.createBoard()\n\n //loop through all the cells of the board and determine based on each cell's neighbors, whether the cell should be dead or alive on the next iteration\n //we want to count the number of living neighbors for each cell\n //then set the next state of newBoard based on this info\n\n //rules:\n // 1. Any alive cell that is touching less than two alive neighbours dies.\n // 2. Any alive cell touching four or more alive neighbours dies.\n // 3. Any alive cell touching two or three alive neighbours does nothing.\n // 4. Any dead cell touching exactly three alive neighbours becomes alive.\n\n for (let row = 0; row < this.rows; row++) {\n for (let col = 0; col < this.cols; col++) {\n const livingNs = this.numLivingNbhrs(row, col)\n const cellIsAlive = this.getCell(row, col) === 1\n\n const rule1 = cellIsAlive && livingNs < 2\n const rule2 = cellIsAlive && livingNs >= 4\n const rule3 = cellIsAlive && (livingNs === 2 || livingNs === 3)\n const rule4 = !cellIsAlive && livingNs === 3\n\n if (rule3 || rule4) newBoard[row][col] = 1\n else if (rule1 || rule2) newBoard[row][col] = 0\n }\n }\n this.board = newBoard\n }", "title": "" }, { "docid": "ba9d7d562b3893c4063ab697f345af0e", "score": "0.6450815", "text": "function generate() {\n\n // Loop through every spot in our 2D array and check spots neighbors\n for (var x = 1; x < columns - 1; x++) {\n for (var y = 1; y < rows - 1; y++) {\n // Add up all the states in a 3x3 surrounding grid\n var neighbors = 0;\n for (var i = -1; i <= 1; i++) {\n for (var j = -1; j <= 1; j++) {\n neighbors += board[x+i][y+j];\n }\n }\n\n // A little trick to subtract the current cell's state since\n // we added it in the above loop\n neighbors -= board[x][y];\n // Rules of Life\n if ((board[x][y] == 1) && (neighbors < 2)) next[x][y] = 0; // Loneliness\n else if ((board[x][y] == 1) && (neighbors > 3)) next[x][y] = 0; // Overpopulation\n else if ((board[x][y] == 0) && (neighbors == 3)) next[x][y] = 1; // Reproduction\n else next[x][y] = board[x][y]; // Stasis\n }\n }\n\n // Swap!\n var temp = board;\n board = next;\n next = temp;\n}", "title": "" }, { "docid": "88b4dd2084f69eb9672fa1958e933e50", "score": "0.6447493", "text": "mutate() {\r\n // make a copy of grid and fill it with zeros\r\n let temp = new Array(this.rows);\r\n for (let i = 0; i < this.rows; i++) {\r\n temp[i] = new Array(this.cols);\r\n temp[i].fill(0);\r\n }\r\n\r\n // TO DO: using values in this.grid, set temp grid to next generation\r\n \r\n //copies grid\r\n for(var i = 0; i < this.rows; i++){\r\n for(var j = 0; j < this.cols; j++){\r\n temp[i][j] = this.grid[i][j];\r\n }\r\n }\r\n\r\n var numNeighbors = 0;\r\n for(var i = 0; i < this.rows; i++){\r\n for(var j = 0; j < this.cols; j++){\r\n\r\n //sets num of neighbors\r\n numNeighbors = this.getNeighbors(i,j);\r\n \r\n if(this.grid[i][j] == 1 && numNeighbors < 2){\r\n temp[i][j] = 0;\r\n }\r\n if(this.grid[i][j] == 1 && numNeighbors > 3){\r\n temp[i][j] = 0;\r\n } \r\n if(this.grid[i][j] == 0 && numNeighbors == 3){\r\n temp[i][j] = 1;\r\n }\r\n if(this.grid[i][j] == 1 && (numNeighbors == 2 || numNeighbors == 3)){\r\n temp[i][j] = 1;\r\n }\r\n }\r\n }\r\n this.grid = temp;\r\n }", "title": "" }, { "docid": "4cbc78ba9954dfb20b538d5e10232927", "score": "0.64474064", "text": "animate() {\n // reset the number of alive\n numAlive = 0;\n\n // for each cell ...\n for (let i = 0; i < gridSize; i++) {\n for (let j = 0; j < gridSize; j++) {\n\n let neighborsAlive = 0;\n\n // find the amount of neighbors alive\n for (let x = -1; x < 2; x++) {\n for (let y = -1; y < 2; y++) {\n // find the current X and Y positions of the cell to be looked at\n let curX = x + i;\n let curY = y + j;\n\n // if the x or y would be out of bounds (meaning i or j is an edge), adjust the value accordingly\n if (curX == -1) curX = gridSize - 1;\n if (curX >= gridSize) curX -= gridSize;\n if (curY == -1) curY = gridSize - 1;\n if (curY >= gridSize) curY -= gridSize;\n\n // add the value to the amount of neighbors alive\n neighborsAlive += currentGrid[curX][curY];\n }\n }\n\n // subtract the current cell value \n neighborsAlive -= currentGrid[i][j];\n\n // if the cell is alive\n if (currentGrid[i][j] == 1) {\n // check for underpoplutation/overpopulation to see if cell lives on\n if (neighborsAlive > overPop || neighborsAlive < 2) {\n // cell dies \n nextGrid[i][j] = 0;\n continue;\n }\n\n // cell lives on to next gen\n else {\n nextGrid[i][j] = 1;\n numAlive++;\n continue;\n }\n }\n\n // if the cell is dead but has exactly 3 neighbors\n if (currentGrid[i][j] == 0 && neighborsAlive == 3) {\n // the cell will be reproduced\n nextGrid[i][j] = 1;\n numAlive++;\n continue;\n }\n // cell stays dead\n else {\n nextGrid[i][j] = 0;\n }\n }\n }\n\n // assign values in nextGrid to currentGrid\n let swap = currentGrid;\n currentGrid = nextGrid;\n nextGrid = swap;\n\n // play the note\n playNote();\n }", "title": "" }, { "docid": "3334fa3ccd13ba6041fe4620acda0910", "score": "0.6445816", "text": "updateBoard(){\n this.img = \"\";\n this.updateIter(0, 0);\n }", "title": "" }, { "docid": "a904f897ee8586ef5d423f441e54e05b", "score": "0.64452076", "text": "function nextGen(cells) {\n // Uncomment next row to have an example\n //copy array but dont' mutate\n var nextGenCells = cells.map(function(arr) {\n return arr.slice();\n });\n var seach = function(ary) {\n \tfor (var r = 0; r < ary.length; r++) {\n\t\tfor (var c = 0; c < ary.length; c++) {\n\t\t\t//check state function\n\t\t\tvar check = function(row, col, state) {\n\t\t\t\tvar count = 0;\n\t\t\t\t//checking if there is a neigbor\t\t\n\t\t\t\tvar neighbourPlace = [[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]];\n\t\t\t\tfor (var n = 0; n < 8; n++) {\n\t\t\t\t\tvar x = neighbourPlace[n][0]+r;\n\t\t\t\t\tvar y = neighbourPlace[n][1]+c;\n\t\t\t\t\tif (x>=0 && y>=0 && x<ary.length && y<ary.length) {\n\t\t\t\t\t\t//console.log(r,c, \"is target\", x,y, \"this is next to target it is a\", ary[x][y]);\n\t\t\t\t\t\tif (ary[x][y] == 1) { \n\t\t\t\t\t\t\t//console.log(x,y, \"this is a living 1\");\n\t\t\t\t\t\t\tcount++;\t\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\t//console.log(count);\n\t\t\t\t//checking a living cell\n\t\t\t\tif (state==1) {\n\t\t\t\t\tif (count>=2 && count<=3) {\n\t\t\t\t\t\t//console.log(r,c, \"lives on.\");\n\t\t\t\t\t\tnextGenCells[r][c] = 1;\n\t\t\t\t\t};\n\t\t\t\t\tif(count < 2 || count > 3) {\n\t\t\t\t\t\tnextGenCells[r][c] = 0;\n\t\t\t\t\t};\n\t\t\t\t//checking an empyt cell\n\t\t\t\t}else if(state==0) {\n\t\t\t\t\tif (count==3) {\n\t\t\t\t\t\tnextGenCells[r][c] = 1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\t//check neighbours\n\t\t\t//search each living thing\n\t\t\tif (ary[r][c] == 1 ) { \n\t\t\t\tcheck([r],[c],1); \n\t\t\t}else{\n\t\t\t\tcheck([r],[c],0);\n\t\t\t};\n\t\t};\n \t};\n };\n seach(cells);\n return(nextGenCells);\n}", "title": "" }, { "docid": "0b686f227a9bd61d87b8e9cddabd2f18", "score": "0.64431816", "text": "nextStep() {\n this.history.push(this.cells);\n this.cells = transitionTorusGrid(this.cells); // (*) Only difference\n this.step += 1;\n }", "title": "" }, { "docid": "6b70eb223660136a38d83a7aa528aad4", "score": "0.6441775", "text": "step() {\n let n, m, neighbors;\n const nextGen = this._cloneMatrix.call(this);\n\n for (n = 0; n < this.height; n++) {\n for (m = 0; m < this.width; m++) {\n neighbors = this._countNeighbors.call(this, n, m);\n if (neighbors < 2 || neighbors > 3) {\n nextGen[n][m] = 0;\n } else if (neighbors === 3) {\n nextGen[n][m] = 1;\n }\n }\n }\n this.matrix = nextGen;\n this.trigger('refresh', [this.matrix]);\n return this;\n }", "title": "" }, { "docid": "6a915461674ddd11f507e395e19a5655", "score": "0.64330584", "text": "generateCells() {\n for (let i = minPossibleCellId; i <= maxPossibleCellId; i++) {\n this.cells.push(new Element('div', 'cell')\n .setOnClickFunction('game.markCell(' + i + ')'));\n }\n }", "title": "" }, { "docid": "8c758e42b76d6ef8c395a7887a5f7d68", "score": "0.64200085", "text": "function setBoard() {\n $(\"#cover\").fadeOut(\"slow\",); \n for(let x = 1; x <= boardSize; x++){\n for(let y = 1; y <= boardSize; y++){\n let newcell = `<div class=\"cell\" id=\"${y}0${x}\">` \n $(\"#board\").append(newcell)\n }\n } drawBoard = 1\n}", "title": "" }, { "docid": "355af6476d23951dc5c58526899a6f1d", "score": "0.6390028", "text": "function populateNumbers(){\n\n if(debug){\n console.log(\"populateNumbers\");\n }\n\n // Runs around the mine and add increaes a number by 1\n for(var row = 0; row < gridRows; row++){\n for(var col = 0; col < gridCols; col++){\n if(grid[row][col][0]){\n if(row-1>=0 && col-1>=0){grid[row-1][col-1][4]++;}//North West\n if(row-1>=0){grid[row-1][col][4]++;}//North\n if(row-1>=0 && col+1<gridCols){grid[row-1][col+1][4]++;}//North East \n if(col+1<gridCols){grid[row][col+1][4]++;}//East\n if(row+1<gridRows && col+1<gridCols){grid[row+1][col+1][4]++;}//South East \n if(row+1<gridRows){grid[row+1][col][4]++;}//South \n if(row+1<gridRows && col-1>=0){grid[row+1][col-1][4]++;}//South West\n if(col-1>=0){grid[row][col-1][4]++;}//West\n }\n }\n }\n\n // Update numbers inside html\n for(var row = 0; row < gridRows; row++){\n for(var col = 0; col < gridCols; col++){\n if(!grid[row][col][0] && grid[row][col][4] != 0){\n cells[cellToDoc(row, col)].childNodes[0].innerHTML = grid[row][col][4];\n if(grid[row][col][4] == 1){\n cells[cellToDoc(row, col)].childNodes[0].classList.add(\"sml-num\");\n } else if(grid[row][col][4] == 2){\n cells[cellToDoc(row, col)].childNodes[0].classList.add(\"sml-num-2\");\n } else if(grid[row][col][4] == 3){\n cells[cellToDoc(row, col)].childNodes[0].classList.add(\"mid-num\");\n } else {\n cells[cellToDoc(row, col)].childNodes[0].classList.add(\"lrg-num\");\n }\n \n }\n }\n }\n\n\n }", "title": "" }, { "docid": "6579a083964884f189f4e385c3e8618e", "score": "0.6381318", "text": "function increment(board) {\n let newBoard = [...(change1tox(board))]\n for (i = 0; i < 4; i++) {\n for (j = 0; j < 4; j++) {\n if (board[i][j] === 'x') {\n for (let row = i - 1; row < i + 2; row++) {\n for (let col = j - 1; col < j + 2; col++) {\n if (row >= 0 && col >= 0 && row <= 3 && col <= 3 && newBoard[row][col] !== 'x') {\n newBoard[row][col]++\n }\n }\n }\n\n }\n }\n\n\n }\n return newBoard\n}", "title": "" }, { "docid": "19604fa7dab6d878d217cdcd3a1eaa6d", "score": "0.6379048", "text": "function nextGen() {\n for (var x = 0; x < bioWidth; x++) {\n for (var y = 0; y < bioHeight; y++) {\n var neighbourSum = calculateNeighbourSum(biosphere, x - 1, y - 1); //top-left\n neighbourSum += calculateNeighbourSum(biosphere, x, y - 1); //top\n neighbourSum += calculateNeighbourSum(biosphere, x + 1, y - 1); //top-right\n neighbourSum += calculateNeighbourSum(biosphere, x - 1, y); //left\n neighbourSum += calculateNeighbourSum(biosphere, x + 1, y); //right\n neighbourSum += calculateNeighbourSum(biosphere, x - 1, y + 1); //bottom-left\n neighbourSum += calculateNeighbourSum(biosphere, x, y + 1); //bottom\n neighbourSum += calculateNeighbourSum(biosphere, x + 1, y + 1); //bottom-right\n\n\n //living cells are reborn\n if (biosphere[x][y] == 1) {\n if (neighbourSum == 2 || neighbourSum == 3) {\n nextGenBiosphere[x][y] = 1;\n } else {\n nextGenBiosphere[x][y] = 0;\n }\n } else if (biosphere[x][y] == 0) {\n //dead cell is born\n if (neighbourSum == 3) {\n nextGenBiosphere[x][y] = 1;\n } else {\n nextGenBiosphere[x][y] = 0;\n }\n }\n }\n }\n\n swap();\n\n genCount++;\n }", "title": "" }, { "docid": "7c78faf1272e836bc9eacefd040a4804", "score": "0.63450086", "text": "draw(caller){\t\n\t\tsetTimeout(function(){\n\n\t\t\t//the game has stopped\n\t\t\tif(!this.state.shouldDraw)\t\t\t\t\t\n\t\t\t\treturn;\t\t\n\n\t\t\t//draw the board\n\t\t\tthis.drawBoard();\t\t\n\n\t\t\tvar ctx = this.state.context;\t\t\t\n\t\t\tvar board = this.state.board;\n\t\t\t\n\t\t\t//draw our cells \n\t\t\t//0 - dead, 1 - 'yong', 2 - 'old'\n\t\t\tfor(var i=0; i<board.length; i++){\n\t\t\t\tfor(var j=0; j<board[i].length; j++){\n\t\t\t\t\tvar cell = board[i][j];\n\t\t\t\t\tif(cell===0)continue;\n\n\t\t\t\t\t//newborn cell\n\t\t\t\t\tif(cell===1)\n\t\t\t\t\t\tctx.fillStyle = \"rgb(140, 198, 101)\";\n\n\t\t\t\t\t//old cell\n\t\t\t\t\telse \n\t\t\t\t\t\tctx.fillStyle = \"rgb(30, 104, 35)\";\n\n\t\t\t\t\tctx.fillRect (25+j*10, 25+i*10, 10, 10); \n\t\t\t\t}\n\t\t\t}\n\n\t \n\t\t\t//in here we store next generation board\n\t\t\tvar nextBoard=[];\n\t\t\tfor (var i = 0; i < board.length; i++)\n\t\t\t\tnextBoard.push(board[i].slice(0)); \n\n\t\t\t//how many 'alive' cells are in the board?\n\t\t\tvar aliveCells=0;\n\n\t for(var i=0; i<nextBoard.length; i++){\n\t for(var j=0; j<nextBoard[i].length; j++){ \n\t \t\n\t \tif(board[i][j]>0)\n\t \t\taliveCells++;\n\n\t //analize neighbour cells\n\t var count=0;\n\t if(board[i][j]==1)\n\t nextBoard[i][j]=2;\n\n\t for(var m=i-1; m<=i+1; m++){\n\t for(var n=j-1; n<=j+1; n++){\n\t if(m===i&&n===j){ \n\t continue;\n\t }\n\n\t var row=m;\n\t var col=n;\n\n\t if(m>=board.length)\n\t row=0;\n\t else if(m<0)\n\t row=board.length-1;\n\n\t if(n>=board[0].length)\n\t col=0;\n\t else if(n<0)\n\t col=board[0].length-1;\t \n\n\t if(board[row][col]>0){ \n\t count++; \n\t }\n\t }\n\t } \n\n\t //the cell must die\n\t if(count<2||count>3)\n\t nextBoard[i][j]=0;\n\t \t//if the cell is dead - make reincarnation!\t \t\n\t else if(count==3&&board[i][j]===0){ \n\t nextBoard[i][j]=1; \n\t } \n\t }\n\t } \n\n\t //all the cells are 'dead', stop the game\n\t if(!aliveCells){ \n\t \treturn;\n\t }\n\n\t //if the function called not from click handler - update state\n\t if(caller!=\"handleCanvasClick\") \t\n\t \tthis.setState({board: nextBoard, step: this.state.step+1}); \n\n\t //should we run draw one more time?\n\t if(this.state.shouldLoop)\n\t \trequestAnimationFrame(this.draw());\n\n\t\t}.bind(this), this.state.speed);\t\t\t\n\n\t}", "title": "" }, { "docid": "c64bffd95b53107ec263290dbc97b2d0", "score": "0.63343716", "text": "function drawGrid() {\r\n let livingCellCounter = 0;\r\n canvasCtx.clearRect(0,0, width * scaling, height * scaling);\r\n for (let x = 0; x < activeGrid.length; x++) {\r\n for (let y = 0; y < activeGrid[x].length; y++) {\r\n // For optimization purposes, only draw when state has changed.\r\n //if (activeGrid[x][y].state !== previousGrid[x][y].state) {\r\n // canvasCtx.fillRect(x * scaling, y * scaling, scaling, scaling);\r\n //}\r\n if (activeGrid[x][y].state === STATE_ALIVE) {\r\n canvasCtx.fillRect(x * scaling, y * scaling, scaling, scaling);\r\n }\r\n }\r\n }\r\n cellCounter.textContent = livingCellCounter;\r\n }", "title": "" }, { "docid": "42f3391f042d47e62d8e2c0fbefd7cb6", "score": "0.6333848", "text": "function setupGrid() {\n var canvas = document.getElementById(canvasId);\n ctx = canvas.getContext(\"2d\");\n\n ctxSize.x = canvas.width;\n ctxSize.y = canvas.height;\n ctxCellSize.x = canvas.width / cellCount.x;\n ctxCellSize.y = canvas.height / cellCount.y;\n\n for (var y=0; y<cellCount.y; y++)\n {\n for (var x=0; x<cellCount.x; x++)\n {\n if (x == 0 && y == 0)\n {\n grid[indexAt(x,y)] = cellType.START;\n }\n else if (x == cellCount.x-1 && y == cellCount.y-1)\n {\n grid[indexAt(x,y)] = cellType.TARGET;\n }\n else\n {\n var rng = Math.random();\n if (rng < 0.3)\n grid[indexAt(x,y)] = cellType.WALL;\n else\n grid[indexAt(x,y)] = cellType.BLANK;\n }\n }\n }\n\n redraw();\n}", "title": "" }, { "docid": "16f33431b7b06caee99da9c43faed2fb", "score": "0.6328947", "text": "function populateGrid () {\n for (let y=0; y<matrix.y; y++) {\n let yRow = []\n for (let z=0; z<matrix.z; z++) {\n let zRow = []\n for (let x=0; x<matrix.x; x++) {\n let addThisOne = Math.floor(Math.random()*1.1)\n zRow.push({ y, z, x, active: addThisOne === 1 })\n }\n yRow.push(zRow)\n }\n board.push(yRow)\n }\n initialBoard = JSON.parse(JSON.stringify([...board]))\n addGridPoints()\n render()\n}", "title": "" }, { "docid": "4e76a16fb6d813802807401f47314434", "score": "0.6321187", "text": "function update(){\n\tdocument.getElementById('iteration').innerHTML = days;\n\tdays += 1;\n\t\n\tfor(var i = 0; i < cells.length; i++){\n\t\tfor(var j = 0; j < cells[i].length; j++){\n\t\t\tif(checkCell(i, j)){\n\t\t\t\tcells[i][j].nextState = true;\n\t\t\t} else {\n\t\t\t\tcells[i][j].nextState = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tdrawLivingCells();\n\t\n\tfor(var i = 0; i < cells.length; i++){\n\t\tfor(var j = 0; j < cells[i].length; j++){\n\t\t\tcells[i][j].isAlive = cells[i][j].nextState;\n\t\t}\n\t}\n\t\n\twindow.setTimeout(update, 1000/fps);\n}", "title": "" }, { "docid": "f81201397de04b6b18b1fe64d64e16f9", "score": "0.63157684", "text": "function fillCell(i) {\n var x = i % cellWidth, y = i / cellWidth | 0;\n \n // cellShape.drawRect(x * cellSize + (x + 1) * cellWallWidth, y * cellSize + (y + 1) * cellWallWidth, cellSize, cellSize);\n}", "title": "" }, { "docid": "15719746e2657e984fe7efe351f4d001", "score": "0.62984675", "text": "setBoard() {\n this.board.forEach((row, index) => {\n switch (index) {\n case 0:\n this.board[index] = [4, 3, 2, 5, 6, 2, 3, 4];\n break;\n case 1:\n this.board[index] = new Array(this.N).fill(1);\n break;\n case this.N - 2:\n case this.N - 1:\n this.board[index] = this.board[this.N - index - 1].map(\n e => -1 * e\n );\n break;\n default:\n this.board[index] = new Array(this.N).fill(0);\n }\n });\n }", "title": "" }, { "docid": "6a210571b259e1e3adbe13dee2334b86", "score": "0.62925947", "text": "function next(alive){\n var changeFlag = 0;\n previousBoard = angular.copy(board);\n //For each cell, assess if it should be living, whether this means the\n //board has changed, and how many total cells are alive.\n for (var y = 0; y < height; y++) {\n for (var x = 0; x < width; x++) {\n var curr = previousBoard[y][x].isAlive;\n board[y][x] = newCellState(previousBoard, x, y);\n if(!curr && board[y][x].isAlive)\n {\n changeFlag = 1;\n alive++;\n }\n else if(curr && !board[y][x].isAlive)\n {\n changeFlag = 1;\n alive--;\n }\n }\n }\n //If no cells changed, return -1 to indicate we are in a steady state.\n if(!changeFlag){\n return -1;\n }\n return alive;\n }", "title": "" }, { "docid": "9ea8e13a1386967d1c2bb28e51de5410", "score": "0.6289846", "text": "function drawBoard(board) {\n for (var i = 0; i < board.x; i++) {\n for (var j = 0; j < board.y; j++) {\n drawCell(i, j, board.state[j][i]);\n } \n } \n}", "title": "" }, { "docid": "7e69751b333d747eff086699bd33bca3", "score": "0.6286675", "text": "draw() {\n\t\tthis.clear();\n\t\tthis.setup();\n\t\tthis.drawRow();\n\n\t\tsetInterval(() => {\n\t\t\tif (this.generation >= this.generations) return;\n\t\t\tthis.generate();\n\t\t\tthis.drawRow();\n\t\t}, 20);\n\t}", "title": "" }, { "docid": "7f89cc6fec015a1f846120ae7090ea28", "score": "0.6282133", "text": "function nxtgen(){\n\tfor(var x=0; x<gw; ++x){\n\t\tfor(var y=0; y<gh; ++y){\n\t\t\tt= grid[(gw+x-1)%gw][(gh+y-1)%gh] + grid[x][(gh+y-1)%gh] + grid[(x+1)%gw][(gh+y-1)%gh] +\n\t\t\t\tgrid[(gw+x-1)%gw][y] \t\t \t\t\t\t \t\t + grid[(x+1)%gw][y] \t\t\t+\n\t\t\t\tgrid[(gw+x-1)%gw][(y+1)%gh] + grid[x][(y+1)%gh] + grid[(x+1)%gw][(y+1)%gh];\n\t\t\tif(t==3 || t+grid[x][y]==3) ngrid[x][y]=1;\n\t\t\telse ngrid[x][y]=0;\n\t\t}\n\t}\n\tfor(var x=0; x<gw; ++x){\n\t\tfor(var y=0; y<gh; ++y){\n\t\t\tgrid[x][y]=ngrid[x][y];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "92af6611e136813ada641f891dc7aa4d", "score": "0.62800485", "text": "function restartDrawing() {\n canvas.getContext(\"2d\").clearRect(0, 0, canvas.width, canvas.height);\n let row = [];\n board = [];\n for(let i = 0; i < cellsX; i++)\n row.push([0, Array(4).fill(1, 0, 4), 0]);\n for(let i = 0; i < cellsY; i++) \n board.push(row.map((x) => x));\n}", "title": "" }, { "docid": "ffd974cfc243ca80142dca882491e4a3", "score": "0.6279169", "text": "function generate(){\n\n\tlet next = [];\n\tlet currentIter;\n\tlet cell;\n\n\tfor (let i in current) {\n\n\t\tcurrentIter = current[i];\n\t\tlet keep = randInt(0,4);\n\n\t\tif (keep == 0 && checkUp(currentIter) && Math.random()<RAND_DIG){\n\t\t\t\tcell = digUp(currentIter);\n\t\t\t\tnext.push(cell);\n\t\t\t\tif (Math.random())\n\t\t\t\tnext.push(currentIter);\n\t\t} else if (keep == 1 && checkDown(currentIter) && Math.random()<RAND_DIG){\n\t\t\t\tcell = digDown(currentIter);\n\t\t\t\tnext.push(cell);\n\t\t\t\tnext.push(currentIter);\n\t\t} else if (keep == 2 && checkRight(currentIter) && Math.random()<RAND_DIG){\n\t\t\t\tcell = digRight(currentIter);\n\t\t\t\tnext.push(cell);\n\t\t\t\tnext.push(currentIter);\n\t\t} else if (keep == 3 && checkLeft(currentIter) && Math.random()<RAND_DIG){\n\t\t\t\tcell = digLeft(currentIter);\n\t\t\t\tnext.push(cell);\n\t\t\t\tnext.push(currentIter);\n\t\t} else {\n\t\t\tif (checkUp(currentIter) || checkDown(currentIter) || checkLeft(currentIter) || checkRight(currentIter)) {\n\t\t\t\tnext.push(currentIter);\n\t\t\t}\n\t\t}\n\t}\n\n\tcurrent = next;\n\n\tif (current.length == 0){\n\t\tconsole.log(\"Done\");\n\t\tstate = RESOLVING;\n\t\t//downloadObjectAsJson(board, \"export\");\n\t\t//downloadObjectAsText(\"fafzagaazg\", \"export\");\n\t}\n}", "title": "" }, { "docid": "05bd5e4d963d5c4b3fd4d20a3cc9fdb2", "score": "0.62739056", "text": "function displayNextPiece() {\n //undraw previous piece\n miniGrid.forEach(square => {\n square.classList.remove(\"piece\")\n square.style.backgroundColor = \"\"\n })\n\n nextPiecesUp[nextRandom].forEach(index => {\n miniGrid[miniGridIndex + index].classList.add(\"piece\")\n miniGrid[miniGridIndex + index].style.backgroundColor = colors[nextRandom]\n })\n }", "title": "" }, { "docid": "704c0ca19ce5b480f2d7368292a65ddb", "score": "0.62707967", "text": "function populateCells() {\n var $cell, $cellElement;\n $cells.each(function(index) {\n cellElement = $('.column-' + this.column + '> div')[this.index];\n\n switch(this.type.toLowerCase()) { /* create cells based on type */\n case 'go':\n case 'jail':\n case 'gotojail':\n case 'parking':\n buildCornerCell(this, cellElement);\n cellElement.classList.add(this.type.toLowerCase() + '-cell');\n break;\n default:\n buildPropertyCell(this, cellElement);\n break;\n }\n boardElements.push(cellElement);\n board[this.boardIndex] = this; //also add cell to board array\n });\n\n /*\n after all elements are pushed on boardElements array,\n need to rearrange column 4 in boardElements array since\n they get pushed in reverse order\n */\n var lastRow = [];\n for(var i = 1; i < 7; i++) {\n lastRow.push(boardElements.pop());\n }\n lastRow.forEach(function(element) {\n boardElements.push(element);\n });\n }", "title": "" }, { "docid": "bfeea19868b0ff0f62f8ca6b232067fc", "score": "0.627038", "text": "randomize() {\n this.cells = createRandomGrid(this.rowCount, this.colCount);\n this.history = [];\n this.step = 0;\n }", "title": "" }, { "docid": "8674d5731105c529776f22e8ccf6f228", "score": "0.62625206", "text": "refreshGameBoard() {\n let idx = 0;\n for (let i = 0; i < this.model.widthHeight; i++) {\n for (let j = 0; j < this.model.widthHeight; j++) {\n if (this.model.gameState.board[idx] == 0) {\n $('#tile' + [idx]).text(\"\");\n } else {\n $('#tile' + [idx]).text(this.model.gameState.board[idx]);\n }\n\n switch (this.model.gameState.board[idx]) {\n case 2:\n $(`#tile${idx}`).css({'background-color': '#fef8e4', 'color': '#675c63'});\n break;\n case 4:\n $(`#tile${idx}`).css({'background-color': '#FDECBB', 'color': '#675c63'});\n break;\n case 0:\n $(`#tile${idx}`).css({'background-color': 'white'});\n break;\n case 8:\n $(`#tile${idx}`).css({'background-color': '#fbde88', 'color': '#675c63'});\n break;\n case 16:\n $(`#tile${idx}`).css({'background-color': '#F3C69A', 'color': 'white'});\n break;\n case 32:\n $(`#tile${idx}`).css({'background-color': '#edab6a', 'color': 'white'});\n \n break;\n case 64:\n $(`#tile${idx}`).css({'background-color': '#E98D79', 'color': 'white'});\n \n break;\n case 128:\n $(`#tile${idx}`).css({'background-color': '#619F9B', 'color': 'white'});\n break;\n case 256:\n $(`#tile${idx}`).css({'background-color': '#77aca9', 'color': 'white'});\n break;\n case 512:\n $(`#tile${idx}`).css({'background-color': '#9DC1BE', 'color': 'white'});\n break;\n case 1024:\n $(`#tile${idx}`).css({'background-color': '#c5b1c1', 'color': 'white'});\n break;\n case 2048:\n $(`#tile${idx}`).css({'background-color': '#926d8b', 'color': 'white'});\n break;\n default:\n $(`#tile${idx}`).css({'background-color': '#926d8b', 'color': 'white'});\n break;\n // $(`#tile${idx}`).css({'background-color': '#68e8e5'}); \n // $(`#tile${idx}`).css({'background-color': '#1fcdca'});\n // $(`#tile${idx}`).css({'background-color': '#1aadaa'});\n }\n\n idx++;\n }\n }\n\n // updates score\n $('.score').text(this.model.gameState.score);\n }", "title": "" }, { "docid": "33c3336bdb9ff474bce0cdc81a9fd16b", "score": "0.62500733", "text": "function update(){\n\tvar boardTemp = new Array(rows);\n\tfor (var i = 0; i < rows; i++) {\n\t\tboardTemp[i] = new Array(columns);\n\t}\n\tfor(var row = 0; row < rows; row++){\n\t\tfor(var column = 0; column < columns; column++){\n\t\t\tboardTemp[row][column] = checkCell(row, column);\n\t\t}\n\t}\n\tboard = boardTemp;\n\tdrawBoard();\n}", "title": "" }, { "docid": "74dd3bda935762d5c2375b9905855fd6", "score": "0.62462914", "text": "function nextGen() {\n background(0);\n animate = true;\n iterations = 0;\n population.selection();\n population.reproduction();\n}", "title": "" }, { "docid": "f23a24740dd4e018e4ca4c330141eb12", "score": "0.62385374", "text": "function gameCycle() {\n\tupdateMap();\n\tdrawCells();\n\t//console.log(previousLiveCells.length);\n\tif (gameStop === false)\n\t\tsetTimeout(gameCycle, timeout);\n}", "title": "" }, { "docid": "25bd72343e667d57a3f21f533f1cf001", "score": "0.6227947", "text": "function initCells() {\n\tgenerateLiveCell();\n\tdrawCells();\n}", "title": "" }, { "docid": "b4020620e692d2aa5776bc343a58987e", "score": "0.6220354", "text": "function drawBoard() {\n for (var i = 0; i < state.board.rows; i++) {\n for (var j = 0; j < state.board.columns; j++) {\n drawCircleAtPosition(j, i);\n }\n }\n }", "title": "" }, { "docid": "d89121f290d1dc321a8663611daac58f", "score": "0.6215998", "text": "mul() {\n this.multiply++;\n var newCell = super.random(this.chooseCell(0));\n // console.log(newCell, this.multiply);\n if (this.multiply >= 8 && newCell) {\n var newGrass = new Grass(newCell[0], newCell[1], this.index);\n grassArr.push(newGrass);\n matrix[newCell[1]][newCell[0]] = 1;\n this.multiply = 0;\n }\n }", "title": "" }, { "docid": "5a6938bbcb070ea87d49811f0c4aed8d", "score": "0.62089974", "text": "spawnWorm() {\n let rand = 1;\n while(this.currentCells.indexOf(rand) > -1) {\n rand = Math.floor(Math.random() * 401);\n }\n this.wormPosition = rand;\n $(\".grid__cell:nth-child(\"+rand+\")\").css('background', '#DC143C');\n }", "title": "" }, { "docid": "adf399ec11e48947edca6bcc99888426", "score": "0.62010676", "text": "function step()\n{\n //let i = 0;\n //var delayInMilliseconds = 1000; //1 second\n nextGrid = calculateNN(startGrid, rows, cols);\n startGrid = nextGrid;\n console.log(\"Generation: \" + i);\n console.table(nextGrid);\n for(var i=0; i<rows; i++)\n {\n for(var j=0; j<cols; j++)\n {\n if (nextGrid[i][j] == 1)\n {\n eval('s' + ((i*10)+j) + '.visible = true;');\n }\n else\n {\n eval('s' + ((i*10)+j) + '.visible = false;');\n }\n }\n }\n render();\n i++;\n}", "title": "" }, { "docid": "13d6002abba47037a6312112ab04661c", "score": "0.6188361", "text": "nextGeneration(){\n var newMatrix = [];\n for(let row in this.matrix) {\n newMatrix[row] = [];\n for (let column in this.matrix[row]) {\n newMatrix[row][column] = this.nextGenerationDeadOrAlive(row, column);\n }\n }\n this.matrix = newMatrix;\n }", "title": "" }, { "docid": "b16158417621bf30b78d962c4a92172d", "score": "0.61773545", "text": "function drawEntireBoard() {\n for(let i = 0; i < cellsY; i++) {\n for(let j = 0; j < cellsX; j++) {\n if(board[i][j][0])\n drawWalls(cellSize, leftStart + (j * cellSize), topStart + (i * cellSize), board[i][j][1]);\n }\n }\n\n drawWalls(cellSize, leftStart + ((cellsX - 1) * cellSize), topStart + ((cellsY - 1) * cellSize), board[cellsY - 1][cellsX - 1][1]);\n}", "title": "" }, { "docid": "2353f4c3519a1485b5f36943de481613", "score": "0.61773425", "text": "function updateCells() {\n var newGrid = [];\n var count = 0;\n\n for (var i = 0; i < cellGrid.length; i++) {\n newGrid[i] = [];\n\n for (var j = 0; j < cellGrid[i].length; j++) {\n newGrid[i][j] = 0;\n\n // count the neighbors of the current cell\n cellGrid[i-1] && (cellGrid[i-1][j] == 1) && count++; // left\n cellGrid[i+1] && (cellGrid[i+1][j] == 1) && count++; // right\n cellGrid[i] && (cellGrid[i][j-1] == 1) && count++; // up\n cellGrid[i] && (cellGrid[i][j+1] == 1) && count++; // down\n cellGrid[i-1] && (cellGrid[i-1][j-1] == 1) && count++; // upper-left\n cellGrid[i+1] && (cellGrid[i+1][j-1] == 1) && count++; // upper-right\n cellGrid[i-1] && (cellGrid[i-1][j+1] == 1) && count++; // lower-left\n cellGrid[i+1] && (cellGrid[i+1][j+1] == 1) && count++; // lower-right\n\n // determine what to do with the new cell position\n // conditions are:\n // 1. Any live cell with < 2 neighbors dies.\n // 2. Any live cell with 2-3 live neighbors lives.\n // 3. Any live cell with > 3 neighbors dies.\n // 4. Any dead cell with exactly 3 neighbors becomes live.\n if (cellGrid[i][j] == 1) {\n if (count == 2 || count == 3) {\n // cell lives on\n newGrid[i][j] = 1;\n } else {\n // dead cell representation 1\n newGrid[i][j] = -1;\n }\n } else if (count == 3) {\n // new cell populated\n newGrid[i][j] = 1;\n } else if (cellGrid[i][j] == -1) {\n // dead cell representation 2\n newGrid[i][j] = -2;\n }\n\n count = 0;\n }\n }\n\n // check if we've reached a stale state\n if (cellGrid.toString() === newGrid.toString()) {\n console.log(\"Ending animation.\");\n endState = true;\n } else {\n cellGrid = newGrid;\n genLifeGraph();\n }\n}", "title": "" }, { "docid": "1a73baa7a7b7da53c14eaed8c3491ec2", "score": "0.617483", "text": "updateAroundCase(row, column, increment) {\n const around_cases = this.around(row,column)\n for (var c in around_cases) {\n this.board[around_cases[c].row][around_cases[c].column].number += increment\n }\n }", "title": "" }, { "docid": "e6fa751957a4a8c88e749b7d477d5c43", "score": "0.61716104", "text": "tick() {\n const newBoard = this.makeBoard();\n console.log('old board', this.board);\n for(let i=0;i<this.board.length;i++){\n for(let j=0;j<this.board[i].length;j++){\n \n if (this.board[i][j]===1 && this.livingNeighbors(i,j)<2){\n return newBoard[i][j]=0;\n }\n\n if (this.board[i][j]===1 && this.livingNeighbors(i,j)>3){\n return newBoard[i][j]=0;\n }\n\n if (this.board[i][j]===0 && this.livingNeighbors(i,j)===3){\n return newBoard[i][j]=1;\n }\n\n\n }\n }\n\n \n\n // TODO: Here is where you want to loop through all the cells\n // on the existing board and determine, based on it's neighbors,\n // whether the cell should be dead or alive in the new board \n // (the next iteration of the game) \n //\n // You need to:\n // 1. Count alive neighbors for all cells\n // 2. Set the next state of all cells in newBoard,\n // based on their current alive neighbors\n this.board = newBoard;\n }", "title": "" }, { "docid": "e66d06926dc087ab44f19e5789925d7f", "score": "0.61649984", "text": "renderSnake() {\n for(let i =0; i<400; i++) {\n this.uncolorCell(i+1);\n }\n this.currentCells.forEach((cell) => {\n this.colorCell(cell);\n });\n }", "title": "" }, { "docid": "8568399ca29878e83147bb62c60e2fd0", "score": "0.61637837", "text": "function setupBoard() {\n cellsX = Math.floor(canvas.width / cellSize);\n cellsY = Math.floor(canvas.height / cellSize);\n \n let widthLeft = canvas.width - cellSize * cellsX;\n let heightLeft = canvas.height - cellSize * cellsY;\n\n topStart = Math.floor(heightLeft/2);\n leftStart = Math.floor(widthLeft/2);\n}", "title": "" }, { "docid": "96cc3b7b4465d5785c90a8483d2f6e72", "score": "0.6153422", "text": "randomize() {\n this.cells = createRandomGrid(this.trueRowCount, this.trueColCount);\n this.history = [];\n this.step = 0;\n }", "title": "" }, { "docid": "41e391181e677166f51a55851e104d52", "score": "0.61515695", "text": "simulate() {\n\t\t// Make sure we haven't simulated farther than the current display\n\t\tconst history = this.state.history;\n\t\tif (history.length > this.state.generation+1) {\n\t\t\tthis.setState({\n\t\t\t\tgeneration: ++this.state.generation\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\t// Update grid cells\n\t\tconst cells = history[this.state.generation].cells;\n\t\tlet new_population = cells.slice();\n\t\tfor (let y = 0; y < this.height; ++y) {\n\t\t\tfor (let x = 0; x < this.width; ++x) {\n\n\t\t\t\t// Check the cells surrounding the current cell\n\t\t\t\tlet neighbors = 0;\n\t\t\t\tfor (let i = -1; i < 2; ++i) {\n\t\t\t\t\tfor (let j = -1; j < 2; ++j) {\n\t\t\t\t\t\t// Ignore the current cell\n\t\t\t\t\t\tif (i != 0 || j != 0) {\n\t\t\t\t\t\t\t// Check only cells inside the grid\n\t\t\t\t\t\t\tconst ix = x + i;\n\t\t\t\t\t\t\tconst iy = y + j;\n\t\t\t\t\t\t\tif (ix > 0 && ix < this.width && iy > 0 && iy < this.height) {\n\t\t\t\t\t\t\t\tif (cells[iy * this.width + ix]) {\n\t\t\t\t\t\t\t\t\tneighbors++;\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\n\t\t\t\t// Change cell state based on the number of neighbors\n\t\t\t\tconst idx = y * this.width + x;\n\t\t\t\tif (cells[idx] === true) {\n\t\t\t\t\t// Kill live cells with less than two or more than three neighbors\n\t\t\t\t\tif (neighbors < 2 || neighbors > 3) {\n\t\t\t\t\t\tnew_population[idx] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Make a dead cell with three neighbors live\n\t\t\t\t\tif (neighbors === 3) {\n\t\t\t\t\t\tnew_population[idx] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Save the new state\n\t\tthis.setState({\n\t\t\tgeneration: ++this.state.generation,\n\t\t\thistory: history.concat([{\n\t\t\t\tcells: new_population\n\t\t\t}])\n\t\t})\n\t}", "title": "" }, { "docid": "bf3fc8abb45c8cc5d1d2ad83b8fefa02", "score": "0.6147994", "text": "setBoardSpecialMove() {\n\n //Random value of special move\n const MoveForward = Math.round(Math.random() * (this.area /2)) + 1\n const MoveBackward = - (Math.round(Math.random() * (this.area /2)) +1 )\n const MoveToStart = 0\n\n //Random index of special move\n //Use if condition to avoid bug like generating special move at start or special move cause infinity loop\n const MoveForwardIndex = Math.round(Math.random() * (this.area - MoveForward - 3) + 1) \n document.getElementById(`square${MoveForwardIndex}`).innerHTML = document.getElementById(`square${MoveForwardIndex}`).innerHTML + `<p>Move Forward ${MoveForward}</p>`\n\n function MoveBackwardIndex(area) {\n while(true) {\n let randomBackwardIndex = Math.round(Math.random() * (area + MoveBackward -2)) - MoveBackward\n if ((randomBackwardIndex != MoveForwardIndex) && (randomBackwardIndex != MoveForwardIndex + MoveForwardIndex)) { \n document.getElementById(`square${randomBackwardIndex}`).innerHTML = document.getElementById(`square${randomBackwardIndex}`).innerHTML + `<p>Move Backward ${-MoveBackward}</p>`\n return randomBackwardIndex}\n }\n }\n \n function MoveToStartIndex (MoveBackwardIndex, area) {\n while(true) {\n let randomTostartIndex = Math.round(Math.random() * (area - 4)) + 2 \n if ((randomTostartIndex != MoveForwardIndex) && (randomTostartIndex != MoveBackwardIndex) && (randomTostartIndex != MoveForwardIndex + MoveForward) && (randomTostartIndex != MoveBackwardIndex - MoveBackward)) { \n document.getElementById(`square${randomTostartIndex}`).innerHTML = document.getElementById(`square${randomTostartIndex}`).innerHTML + `<p>Move to start!</p>`\n return randomTostartIndex}\n }\n }\n\n //Put speical move to board properties\n const moveBackwardVariable = MoveBackwardIndex(this.area)\n const moveTostartVariable = MoveToStartIndex(moveBackwardVariable, this.area)\n\n this.board[MoveForwardIndex].specialMoveAdd = MoveForward\n this.board[moveBackwardVariable].specialMoveAdd = MoveBackward\n this.board[moveTostartVariable].specialMoveMultiply = MoveToStart\n\n document.getElementById(`square${MoveForwardIndex}`).classList.add(\"moveForward\")\n document.getElementById(`square${moveBackwardVariable}`).classList.add(\"moveBackward\")\n document.getElementById(`square${moveTostartVariable}`).classList.add(\"moveToStart\")\n }", "title": "" }, { "docid": "b3867e9d9f57dde8116cd1876f6e45f3", "score": "0.6140226", "text": "seed_random() {\n\n this._generation = 0;\n this._generation_display.innerHTML = '0';\n this._live_cells = 0;\n\n for (var i = 0; i < this._rows; i++) {\n for (var j = 0; j < this._columns; j++) {\n this._cells[i][j]._state = Math.floor(Math.random() * 1.3);\n if (this._cells[i][j]._state === 1) {\n this._cells[i][j].make_alive()\n this._live_cells += 1;\n }\n }\n }\n this._live_cells_display.innerHTML = this._live_cells;\n\n this.add_data(this._live_cells_chart, 0, this._live_cells);\n\n }", "title": "" }, { "docid": "e21ac5ac072698ae0eb34e8bd6d598ac", "score": "0.61355776", "text": "function setCell(x,y)\n {\n if(MIN_X <= x && x <= MAX_X && MIN_Y <= y && y <= MAX_Y) \n {\n board[x][y] = nextValue;\n //aggiorna la maschera\n board[x][boardSize - 1] = board[x][1] + board[x][2] + board[x][3];\n board[boardSize - 1][y] = board[1][y] + board[2][y] + board[3][y];\n board[boardSize - 1][boardSize - 1] = board[1][1] + board[2][2] + board[3][3];\n board[boardSize - 1][0] = board[1][3] + board[2][2] + board[3][1];\n\n nextValue = nextValue === 1 ? 0 : 1;\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "2d29b6b288d652cfe67a5ae4dbd86ad0", "score": "0.6133366", "text": "function randomWhiteCell(value) {\nlet save;\nlet whiteCell = [];\n\n for (let a = 0; a < 40; a++) {\n whiteCell = findWhiteCell(value, tab2D);\n let x = whiteCell[0]; // table X index (0,1,2)\n let y = whiteCell[1]; // table Y index (0,1,2)\n\n let movement = findMovePossibilities(x,y);\n\n let findMove = false;\n while (!findMove){\n let move2 = (Math.floor(Math.random() * 4)); // 0 = right / 1 = left / 2 = up / 3 = down\n\n if (movement[move2][1] !== 0){\n findMove = true;\n let newXY = movement[move2][1];\n\n if (movement[move2][0] === 'X' ){\n save = tab2D[x][y];\n\n tab2D[x][y] = tab2D[(x + newXY)][y];\n tab2D[(x + newXY)][y] = save;\n break;\n }\n else{\n save = tab2D[x][y];\n\n tab2D[x][y] = tab2D[x][(y + newXY)];\n tab2D[x][(y + newXY)] = save;\n break;\n }\n }\n }\n }\n display2D(tab2D);\n}", "title": "" }, { "docid": "c98cabc3ee1fd3d910113534b35e842a", "score": "0.6131185", "text": "function update_board() {\n\n\t\tvar y_segments = find_y_segments();\n\t\tvar x_segments = find_x_segments();\n\t\tremove_y_segments(y_segments);\n\t\tremove_x_segments(x_segments);\n\n\t\tvar incomplete_rows = [];\n\n\t\t// drop any items that have empty space under them\n\t\tfor (var x = 0; x < board_size_x; x++) {\n\t\t\tfor (var y = 0; y < board_size_y; y++) {\n\t\t\t\tif (board[y][x] === undefined) {\n\t\t\t\t\tvar found = false;\n\t\t\t\t\tfor (var y2 = y + 1; y2 < board_size_y; y2++) {\n\t\t\t\t\t\tif (board[y2][x] !== undefined) {\n\t\t\t\t\t\t\tboard[y][x] = board[y2][x];\n\t\t\t\t\t\t\tboard[y2][x] = undefined;\n\n\t\t\t\t\t\t\tvar dist = (y2 - y) * 80;\n\n\t\t\t\t\t\t\t// box.find('.box-cell-' + x + '-' + y2).remove(board[y2][x]);\n\t\t\t\t\t\t\tboard[y][x].remove();\n\t\t\t\t\t\t\tadd_animation(board[y][x], 'box-drop-' + dist);\n\t\t\t\t\t\t\tappend_to_cell(x, y, board[y][x]);\n\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (found === false) {\n\t\t\t\t\t\t// stop parsing this row if we have nothing to fill the slots with\n\t\t\t\t\t\tincomplete_rows[x] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add a block to the row if it's incomplete\n\t\tif (incomplete_rows[current_fill_row] === true) {\n\t\t\tfill_row(current_fill_row);\n\t\t}\n\n\t\t// increment row\n\t\tif (++current_fill_row > board_size_x) {\n\t\t\tcurrent_fill_row = 0;\n\t\t}\n\t}", "title": "" }, { "docid": "1e83f4f465bccd38a7e2e1262eae5c56", "score": "0.61267775", "text": "function generateCell(cells)\r\n {\r\n for (let i = 0; i < cells; i++)\r\n {\r\n let empty = false;\r\n let count = 0;\r\n\r\n while ((empty === false)&&(count<=17)) // et tant que le compteur est inf ou = 16 au cas où aucune cell à 0 - 16 car le random va générer de 0 à 3 pour x et pour y et qu'il existe 16 combinaisons diff\r\n {\r\n \r\n let x = Math.floor((Math.random() * 4));\r\n let y = Math.floor((Math.random() * 4));\r\n var elem = $('[x=\"' + x + '\"][y=\"' + y + '\"][nbr=0]');\r\n count ++;\r\n if (elem[0]){\r\n empty = true;\r\n }\r\n }\r\n\r\n let value = 2 * (Math.floor((Math.random() * 2) + 1));\r\n if (value === 4 && Math.random() > 0.5)\r\n value = 2;\r\n \r\n\r\n elem.attr('nbr', value);\r\n elem.text(value);\r\n } \r\n }", "title": "" }, { "docid": "4860fc83001bd3d1482884350ca941cd", "score": "0.6122197", "text": "function updateGrid(){\n\t\n\tpauseSim();\t// first send pause signal\n\n\t// Get new values from HTML\n\tnumCellsWidth \t= Math.floor(document.getElementById(\"numCellsWidthForm\").value);\n\tnumCellsHeight \t= Math.floor(document.getElementById(\"numCellsHeightForm\").value);\n\n\t// Calculate new width of cell\n\tcellWidth \t\t= canvasWidth / numCellsWidth; \n\tcellHeight \t\t= canvasHeight / numCellsHeight;\n\n\t// Update all cells and render\n\tCELLS = [];\n\tCELLS.createCells( numCellsWidth, numCellsHeight );\n\trenderAllCells();\n\n\tconsole.log(\"Updated grid succesfully\");\n}", "title": "" }, { "docid": "859fe2efcaaa7401395c87d22221704f", "score": "0.61196095", "text": "incValueAt(row, column) {\n this.gameArray[row][column].value = (this.gameArray[row][column].value + 1) % this.items\n }", "title": "" }, { "docid": "908e1a8bd40c1799d3c4f76aef9f5dad", "score": "0.6110281", "text": "resetCells() {\n for (var r = 0; r < this.numRows; r++) {\n for (var c = 0; c < this.numCols; c++) {\n var cell = this.grid[r][c];\n cell.gCost = 0;\n cell.fCost = 0;\n }\n }\n }", "title": "" }, { "docid": "f5c2af096f6f6eb16bd36c2639737fec", "score": "0.61101776", "text": "changeCell() {\n switch (this.direction) {\n case \"left\":\n this.targetX = this.x - 1;\n break;\n \n case \"right\":\n this.targetX = this.x + 1;\n break;\n \n case \"up\":\n this.targetY = this.y - 1;\n break;\n \n case \"down\":\n this.targetY = this.y + 1;\n break;\n }\n }", "title": "" }, { "docid": "f6bfb8b7882a12aff7ce5a568ca0a40e", "score": "0.6108902", "text": "function randomWhiteCell(value) {\n let save;\n let whiteCell = [];\n\n for (let a = 0; a < 40; a++) {\n whiteCell = findWhiteCell(value, tab2D);\n let x = whiteCell[0]; // table X index (0,1,2)\n let y = whiteCell[1]; // table Y index (0,1,2)\n\n let movement = findMovePossibilities(x,y);\n\n let findMove = false;\n while (!findMove){\n let move2 = (Math.floor(Math.random() * 4)); // 0 = right / 1 = left / 2 = up / 3 = down\n\n if (movement[move2][1] !== 0){\n findMove = true;\n let newXY = movement[move2][1];\n\n if (movement[move2][0] === 'X' ){\n save = tab2D[x][y];\n\n tab2D[x][y] = tab2D[(x + newXY)][y];\n tab2D[(x + newXY)][y] = save;\n break;\n }\n else{\n save = tab2D[x][y];\n\n tab2D[x][y] = tab2D[x][(y + newXY)];\n tab2D[x][(y + newXY)] = save;\n break;\n }\n }\n }\n }\n display2D(tab2D);\n}", "title": "" }, { "docid": "fcf803738c641d9db106ae6abcc6e857", "score": "0.61074233", "text": "_configureCells() {\n for (let row = 0; row < this.rows; row++) {\n for (let col = 0; col < this.columns; col++) {\n this._addConnectedCells(row, col)\n }\n }\n }", "title": "" }, { "docid": "e2a41926a6639dc77933b47cab0a122e", "score": "0.610725", "text": "function initBoard(num) {\n app.style.gridTemplateColumns = `repeat(${Math.sqrt(num)}, 1fr)`;\n app.style.gridTemplateRows = `repeat(${Math.sqrt(num)}, 1fr)`;\n\n\n for (let i = 1; i <= num; i++) {\n const cell = document.createElement('div');\n cell.classList.add('cell');\n cell.style.backgroundColor = \"rgb(220, 238, 255)\";\n cell.id = `cell${i}`;\n cell.addEventListener('mouseover', lightUp);\n app.appendChild(cell);\n }\n}", "title": "" }, { "docid": "02f85ef209bd88061724c717592f8462", "score": "0.6103878", "text": "updateNextTileCoords() {\n //Update the Ghost's next tile property\n this.updateNextTile(this);\n\n //Update the coordinates of the next tile\n this.nextTileCoord.x = this.nextTile.pixelX + 8;\n this.nextTileCoord.y = this.nextTile.pixelY + 8;\n }", "title": "" }, { "docid": "1feec00f68442b7108ea3664cb8a7f93", "score": "0.6102022", "text": "function update() {\n\tfor(let i = 0; i < cells.length; i++){\n\t\tif(cells[i].lifeTime > lifeTimeMax||cells[i].x<-finalCellSize||cells[i].x>sizeCanvas||cells[i].y<-finalCellSize||cells[i].y>sizeCanvas){\n\t\t\tcells.splice(i,1);\n\t\t}else{\n\t\t\tif(cells[i].index !=i)\n\t\t\t\tcells[i].setIndex(i)\n\t\t\tcells[i].collisionDetection();\n\t\t\tcells[i].grow(cells.length);\n\t\t}\n\t}\n\tdraw();\n}", "title": "" }, { "docid": "342149c77d8def5944d72efb4fdff626", "score": "0.61013234", "text": "oneStepDown() {\n this.y += 1;\n if(!grid.pieceFits()){\n piece.y -= 1;\n grid.addPieceToGrid();\n }\n }", "title": "" }, { "docid": "cb24d4fb66b9fbe24ae1787d071d6cf8", "score": "0.6097989", "text": "generateGame() {\n this.cells = [];\n this.generateCells();\n this.mainPageBody.reset();\n this.mainPageBody.addChildren(\n [this.generateHeader(), this.generateGrid()]);\n }", "title": "" }, { "docid": "9d36d67036a89b3df4f8e772bb75a6c9", "score": "0.6097279", "text": "function updateGame(number) {\r\n\tif (currentIndex < end) {\r\n\t\tselection[currentIndex].forEach(function (item, index) {\r\n\t\t\tif (item == 1) {\r\n\t\t\t\tcreateTile(index);\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tstopGame();\r\n\t}\r\n\tcurrentIndex++;\r\n}", "title": "" }, { "docid": "4f6713edfaaa3199dc8adb13e6bde43d", "score": "0.60955644", "text": "function initAll() {\n\tfor (var r=0; r< nor; r++){\n\t\tnewRow[r] = document.createElement(\"tr\");\n\t\tdocument.getElementById(\"myBoard\").appendChild(newRow[r]);\n\t\tfor (var c=0; c< noc; c++) {\n\t\t\tvar newData = document.createElement(\"td\");\n\t\t\tnewRow[r].appendChild(newData);\n\t\t\tnewData.setAttribute(\"id\", \"cell\"+r+c);\n\t\t\tnewData.setAttribute(\"class\", \"empty\");\n\t\t\tnewData.row = r; newData.col = c; //save the cell coordinates as part of the object\n\t\t\tif ( \"cell\"+r+c != \"cell22\") {\n\t\t\t\tnewData.addEventListener (\"click\", this.handleClick, false);\n\t\t\t}\n\t\t}\n\t}\n\t//populate\n\tvar newNum;\n\tfor (var r=0; r< nor; r++){\n\t\tfor (var c=0; c< noc; c++) {\n\t\t\t//A statement that is executed at least once and \n\t\t\t//is re-executed each time the condition evaluates to true.\n\t\t\tdo {\n\t\t\t\tnewNum = (c*15) + getNewNumber() + 1;\n\t\t\t}\n\t\t\twhile (usedNums[newNum]);\n\t\t\tusedNums[newNum] = true;\n\t\t\tvar currCell = document.getElementById(\"cell\"+r+c);\n\t\t\tif ( \"cell\"+r+c != \"cell22\") {\n\t\t\t\tcurrCell.innerHTML = newNum;\n\t\t\t} else {\n\t\t\t\tcurrCell.innerHTML = \"FREE\";\n\t\t\t\tcurrCell.style.fontSize = \"16px\";\n\t\t\t\tcurrCell.className = \"picked\";\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "cae4644f9ec0e163133788206fe44dcd", "score": "0.6087797", "text": "function updateGrid() {\n if(_offsetY < TILE_EDGE_MINUS) {\n // take a row of cells from the top and move them to the bottom\n shiftPush(_gameGrid);\n _offsetY += TILE_EDGE;\n }\n if(_offsetX < TILE_EDGE_MINUS) {\n // gotta take one from the left and put it on the right\n _gameGrid.forEach(shiftPush);\n _offsetX += TILE_EDGE;\n } else if (_offsetX > TILE_EDGE) {\n // gotta take one from the right and put it on the left\n _gameGrid.forEach(popSplice);\n _offsetX -= TILE_EDGE;\n }\n\n // updated all locations\n var y = _gameGrid.length + _offsetY;\n for(var i=0; i<_maxRows; i++) {\n var row = _gameGrid[i];\n var x = _offsetX;\n for(var j=0; j<_maxCols; j++) {\n row[j].x = x;\n row[j].y = y;\n x += TILE_EDGE;\n }\n y += TILE_EDGE;\n }\n }", "title": "" } ]
72bae58b5e77f49452bf8e6065e30d4a
Creates a wrapped value.
[ { "docid": "9073c0b114bf013d88089de73842ed14", "score": "0.8403251", "text": "static wrap(value) {\n return new WrappedValue(value);\n }", "title": "" } ]
[ { "docid": "96f25b6d82934fe3a3127ad6e6e74afe", "score": "0.6594589", "text": "newValueWrapper(valueToCache,eTag,extraInfoObject){{assert$1(this._phase!==CacheAccessorPhase.CACHE_ACCESSOR_PHASE_FINISHED,\"Cache accessors should not be accessed after they have been finished.\");}// We should never be storing a ValueWrapper with undefined value in the cache, log to splunk if this happens.\n if(valueToCache===undefined){this._ldsCache.instrumentation.logError(new Error(\"Undefined value for new value wrapper\"),\"LDS_UNDEFINED_NEW_VALUE_WRAPPER\",InstrumentationErrorType.WARN,JSON.stringify({extraInfoObject,phase:this._phase}));}const valueWrapper=new ValueWrapper(valueToCache,this._nowTime,eTag,extraInfoObject);return valueWrapper;}", "title": "" }, { "docid": "f8274f017139c1e305e1f04029fec887", "score": "0.6530258", "text": "function value(value) {\n return create(function (fulfill) {\n fulfill(value);\n });\n}", "title": "" }, { "docid": "5323db4d83da19ce3b65e7f034545970", "score": "0.6430867", "text": "make(value, _parent, key) {\n value = value !== undefined ? value : this.value;\n // Default Value might be a function (taking no parameter).\n let localValue = value;\n if (typeof value === 'function') {\n localValue = value();\n }\n return this.mutate(localValue, key);\n }", "title": "" }, { "docid": "b9bfaee881f8464572e93529c9e07676", "score": "0.64186645", "text": "withValue(value) {\n this.value = value;\n return this;\n }", "title": "" }, { "docid": "9447b32a3a03534b1c7d6591da227f39", "score": "0.64011866", "text": "function wrap(func, value){\n return function(){\n return func(value);\n }\n\n}", "title": "" }, { "docid": "d55da95a4b5f71b51e3de67a274847f1", "score": "0.640013", "text": "static of(a) {\r\n\t\treturn new Wrapper(a);\r\n\t}", "title": "" }, { "docid": "68f8de0f0bc08250613e4d2c2dfef982", "score": "0.63981926", "text": "set Wrap(value) {}", "title": "" }, { "docid": "c876196abf2d2121bd9f2141fe401d2d", "score": "0.6344411", "text": "function wrapValue(n) {\n let local = n;\n return () => local;\n}", "title": "" }, { "docid": "c876196abf2d2121bd9f2141fe401d2d", "score": "0.6344411", "text": "function wrapValue(n) {\n let local = n;\n return () => local;\n}", "title": "" }, { "docid": "745a4e15b722de33c9a78bbce5b4226d", "score": "0.63329166", "text": "function simpleTypeWrapper(value, parent) {\n this.value = value;\n this._parent_ = parent;\n}", "title": "" }, { "docid": "93948aa75690bd2b2c4f5d69f983ab89", "score": "0.62715507", "text": "function value_wrapper(dataset) {\n\treturn function(value) {\n\t\tif (typeof value === 'object') {\n\t\t\treturn value;\n\t\t}\n\t\tvar item = {};\n\t\titem[dataset.valueKey] = value;\n\t\treturn item;\n\t};\n}", "title": "" }, { "docid": "7d8a668bdb13f89196747843babc871b", "score": "0.6212313", "text": "wrap(value) {\n if (typeof value === 'function') {\n return this.outputQuery(this.compileCallback(value), true);\n }\n const raw = this.unwrapRaw(value);\n if (raw) return raw;\n if (typeof value === 'number') return value;\n return this._wrapString(value + '');\n }", "title": "" }, { "docid": "95b70191bc05bb0097b59d3cc45bc98c", "score": "0.61713374", "text": "function Wrapper() {}", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "2d8998b935d4184ce6fa1b1685d6f2bd", "score": "0.6170604", "text": "static unwrap(value) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }", "title": "" }, { "docid": "e8d831a1bb88cb6400244fa0fd1fbb98", "score": "0.61607623", "text": "function wrapped(value) {\n return encode(value, options);\n }", "title": "" }, { "docid": "e8d831a1bb88cb6400244fa0fd1fbb98", "score": "0.61607623", "text": "function wrapped(value) {\n return encode(value, options);\n }", "title": "" }, { "docid": "0f9b2c4663f4f45c5fb0c277d67c5c2a", "score": "0.6159345", "text": "static fromObject(target){return new ValueWrapper(target.value,target.lastFetchTime,target.eTag,target.extraInfoObject);}", "title": "" }, { "docid": "20d4fea482b946a139e06ab9322469af", "score": "0.6159221", "text": "toString() {\n return `Wrapper (${this._value})`;\n }", "title": "" }, { "docid": "564ec39bee7fa7fe0e0c596682a8e197", "score": "0.61447644", "text": "function initWrapper(wrapper) {\n return {\n ...wrapper,\n valueEntities: {},\n };\n}", "title": "" }, { "docid": "b72cd654352e45bbfae1f79315811082", "score": "0.6120314", "text": "get Wrap() {}", "title": "" }, { "docid": "eb964c6970843a583ee754afd5e5e613", "score": "0.6094624", "text": "function Value(value) {\n if (typeof this !== 'undefined' && !(this instanceof Value) || typeof this === 'undefined') {\n return new Value(value);\n }\n\n this.value = value;\n } // -------------------------------------------------------------------------", "title": "" }, { "docid": "7417f71f37779dadf0a34c78e81c9558", "score": "0.6078038", "text": "function initWrapper(wrapper) {\n return extends_default()({}, wrapper, {\n valueEntities: {}\n });\n}", "title": "" }, { "docid": "743bcb87fdae79309c0d3a0c133ef743", "score": "0.6054665", "text": "static createIn(container) {\n return internal.instancehelpers.createElement(container, StoredValue, \"value\", false);\n }", "title": "" }, { "docid": "74c507f35f4b8c4dc8313ebbe50d33aa", "score": "0.6028843", "text": "toString() {\r\n\t\treturn `Wrapper (${this._value})`;\r\n\t}", "title": "" }, { "docid": "e2a5bad9dde72a5e0bb83ed746a60b5c", "score": "0.6016204", "text": "function $wrapValue(val) {\r\n if ($isDBNull(val)) {\r\n return 'null';\r\n }\r\n switch (typeof(val)) {\r\n case 'string':\r\n return $wrap.text(val);\r\n case 'boolean':\r\n return $wrap.bool(val);\r\n case 'function':\r\n return null; // error: functions are not supported;\r\n default:\r\n if (val instanceof Date) {\r\n return $wrap.date(val);\r\n } else {\r\n // it is either unknown object or a number;\r\n return typeof(val) === 'object' ? null : val.toString();\r\n }\r\n }\r\n}", "title": "" }, { "docid": "832f6671c62bc684156df7f211a65c1d", "score": "0.6002047", "text": "function wrap(value, isParameter, builder, client, bindingHolder) {\n const raw = unwrapRaw(value, isParameter, builder, client, bindingHolder);\n if (raw) return raw;\n switch (typeof value) {\n case 'function':\n return outputQuery(\n compileCallback(value, undefined, client, bindingHolder),\n true,\n builder,\n client\n );\n case 'object':\n return parseObject(value, builder, client, bindingHolder);\n case 'number':\n return value;\n default:\n return wrapString(value + '', builder, client);\n }\n}", "title": "" }, { "docid": "01781580d75b91d42325ba5137dfffc4", "score": "0.59757704", "text": "to(value) {\r\n this.getValue = () => value;\r\n return this;\r\n }", "title": "" }, { "docid": "512e2704bd60c15da8a799fa9fc0e943", "score": "0.59113795", "text": "set wrap(value) {\n this._wrap$.next(value);\n }", "title": "" }, { "docid": "512e2704bd60c15da8a799fa9fc0e943", "score": "0.59113795", "text": "set wrap(value) {\n this._wrap$.next(value);\n }", "title": "" }, { "docid": "512e2704bd60c15da8a799fa9fc0e943", "score": "0.59113795", "text": "set wrap(value) {\n this._wrap$.next(value);\n }", "title": "" }, { "docid": "3196bd15b1f40464b1ed6ff072cd339b", "score": "0.58788687", "text": "value(val) {\n this._value = val;\n return this;\n }", "title": "" }, { "docid": "e423e90ae2451da050aa13ae78ae6a9c", "score": "0.58477515", "text": "map(f) {\n return Wrapper.of(f(this._value));\n }", "title": "" }, { "docid": "389baba4460198e63f055f4eb395118e", "score": "0.5841257", "text": "static createIn(container) {\n return internal.instancehelpers.createElement(container, CalculatedValue, \"value\", false);\n }", "title": "" }, { "docid": "b738ed529e17180ae8ddb8f929356b86", "score": "0.5838446", "text": "function withValue(value) {\n var d = withValue.d || (\n withValue.d = {\n enumerable: false,\n writable: false,\n configurable: false,\n value: null\n }\n );\n d.value = value;\n return d;\n }", "title": "" }, { "docid": "bb5a3ce006c23714f842dbf8a8cb0b9d", "score": "0.5830586", "text": "make(value) {\n if (typeof value === 'number' || typeof value === 'string') {\n return value;\n }\n if (typeof this.value === 'function') {\n return this.value();\n }\n return Uid.make();\n }", "title": "" }, { "docid": "fb1ba77be8257413dd1af1735ceeea60", "score": "0.57988495", "text": "static cloneWithValueOverride(valueWrapper,valueOverride){if(valueWrapper.extraInfoObject){return new ValueWrapper(valueOverride,valueWrapper.lastFetchTime,valueWrapper.eTag,cloneDeepCopy(valueWrapper.extraInfoObject));}return new ValueWrapper(valueOverride,valueWrapper.lastFetchTime,valueWrapper.eTag,valueWrapper.extraInfoObject);}", "title": "" }, { "docid": "cdab9ac651848e956315c2e5ec0a81c5", "score": "0.5785782", "text": "function makeValueAccessor(value){return function(){return value;};} // Returns the value of a valueAccessor function", "title": "" }, { "docid": "dbca290fdc9e085e0e52860eaeaadfd8", "score": "0.5757595", "text": "get wrapper() { return wrapper; }", "title": "" }, { "docid": "a4b5eef0b5b31bb6ba65b0c16b4f6811", "score": "0.5731914", "text": "map(f) {\r\n\t\treturn Wrapper.of(f(this._value));\r\n\t}", "title": "" }, { "docid": "12d42105a13fcc8a1c92c38948ed13ae", "score": "0.57277876", "text": "createValue(parameters = [], properties = {}) {\n const value = this.factory(...parameters);\n return (value instanceof Object) ? Object.assign(value, properties) : value;\n }", "title": "" }, { "docid": "543eb068c5772bd859b3d8c1a1706a40", "score": "0.5703678", "text": "function makeValueAccessor(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "838b79652b8dcf3659765d4c56dbbebd", "score": "0.569004", "text": "function createLiteral(value, type) {\n return obj(\"@value\", value, \"@type\", type );\n }", "title": "" }, { "docid": "3da3b2fa8412c37ad53792ffd7c79070", "score": "0.56711495", "text": "function wrapperFactory(callback) {\n return wrapper\n\n function wrapper(value, index) {\n return callback(value, index, this)\n }\n}", "title": "" }, { "docid": "3da3b2fa8412c37ad53792ffd7c79070", "score": "0.56711495", "text": "function wrapperFactory(callback) {\n return wrapper\n\n function wrapper(value, index) {\n return callback(value, index, this)\n }\n}", "title": "" }, { "docid": "3da3b2fa8412c37ad53792ffd7c79070", "score": "0.56711495", "text": "function wrapperFactory(callback) {\n return wrapper\n\n function wrapper(value, index) {\n return callback(value, index, this)\n }\n}", "title": "" }, { "docid": "3da3b2fa8412c37ad53792ffd7c79070", "score": "0.56711495", "text": "function wrapperFactory(callback) {\n return wrapper\n\n function wrapper(value, index) {\n return callback(value, index, this)\n }\n}", "title": "" }, { "docid": "f20f2a9d245600dbfe89c39a6720b190", "score": "0.5660963", "text": "constructor(value) {\n if (value instanceof Value) {\n this.#value = value.valueOf();\n this.#type = value.type();\n }\n else {\n this.#value = value;\n this.#type = this.constructor.type(value);\n }\n }", "title": "" }, { "docid": "05a2f40ad36bd24c2688f16bee5a305c", "score": "0.5643657", "text": "function createLiteral(value, type) {\n return { value: value, type: type };\n }", "title": "" }, { "docid": "517151e702441abf956f10370ad8b5d0", "score": "0.56347966", "text": "function makeValueAccessor(value) {\n\t return function() {\n\t return value;\n\t };\n\t }", "title": "" }, { "docid": "5b81d57cbba1ae0b7885115c2cd05ff4", "score": "0.56171197", "text": "value(value) {\n return value\n }", "title": "" }, { "docid": "88def0e2031b82744d5b566b79f02b07", "score": "0.5607212", "text": "static create(model) {\n return internal.instancehelpers.createElement(model, StoredValue);\n }", "title": "" }, { "docid": "bc835e8378cc1baca0bdb2358f27fc86", "score": "0.5580257", "text": "function initWrapper(wrapper) {\n return babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, wrapper, {\n valueEntities: {}\n });\n}", "title": "" }, { "docid": "bc835e8378cc1baca0bdb2358f27fc86", "score": "0.5580257", "text": "function initWrapper(wrapper) {\n return babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, wrapper, {\n valueEntities: {}\n });\n}", "title": "" }, { "docid": "0b164293744a1bcb423c3adf1ca08d36", "score": "0.5579108", "text": "function makeValueAccessor(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "0b164293744a1bcb423c3adf1ca08d36", "score": "0.5579108", "text": "function makeValueAccessor(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "0b164293744a1bcb423c3adf1ca08d36", "score": "0.5579108", "text": "function makeValueAccessor(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "0b164293744a1bcb423c3adf1ca08d36", "score": "0.5579108", "text": "function makeValueAccessor(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "0b164293744a1bcb423c3adf1ca08d36", "score": "0.5579108", "text": "function makeValueAccessor(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "a2c1e51510cc453436423de8111ac8a1", "score": "0.55772316", "text": "function closeAValue(val) {\n return function () {\n return val;\n }\n }", "title": "" }, { "docid": "8809ad5bfb54eb924ba271ca999bbd7b", "score": "0.5565047", "text": "function wrapperFactory(callback) {\n return wrapper;\n\n function wrapper(value, index) {\n return callback(value, index, this);\n }\n}", "title": "" }, { "docid": "8809ad5bfb54eb924ba271ca999bbd7b", "score": "0.5565047", "text": "function wrapperFactory(callback) {\n return wrapper;\n\n function wrapper(value, index) {\n return callback(value, index, this);\n }\n}", "title": "" }, { "docid": "8809ad5bfb54eb924ba271ca999bbd7b", "score": "0.5565047", "text": "function wrapperFactory(callback) {\n return wrapper;\n\n function wrapper(value, index) {\n return callback(value, index, this);\n }\n}", "title": "" }, { "docid": "b14865c876fdbf9c5c096c85fe44af41", "score": "0.55610603", "text": "mutateValue() {}", "title": "" }, { "docid": "200eb5f375d3c42f344fb0d173dce46a", "score": "0.55596787", "text": "valueOf(value) {\n this.value = value;\n }", "title": "" }, { "docid": "b3264a5b9d6b0ed04c77c84185a8b623", "score": "0.55585754", "text": "function SafeValue() {}", "title": "" }, { "docid": "b3264a5b9d6b0ed04c77c84185a8b623", "score": "0.55585754", "text": "function SafeValue() {}", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "39f80c108b58fb56f9d0ec8c65e4f068", "score": "0.5552316", "text": "static isWrapped(value) {\n return value instanceof WrappedValue;\n }", "title": "" }, { "docid": "6df23acad103c3c28338c4c7260cee46", "score": "0.5470802", "text": "constructor(value) {\n this.value = value;\n }", "title": "" }, { "docid": "47a4ad3ed56d0c7384fff5dae0ffba8b", "score": "0.54618937", "text": "function identity(val){\n return val;\n }", "title": "" }, { "docid": "bdb1080a6c9516ce3f918728949220ac", "score": "0.5460907", "text": "function wrap() {\n var that = this;\n var args = arguments;\n var result;\n\n onBeforeMethodCall.forEach(function(listener) {\n listener(thisComponent, key, args);\n });\n\n result = value.apply(this, arguments);\n\n onAfterMethodCall.forEach(function(listener) {\n listener(thisComponent, key, args);\n });\n\n return result;\n }", "title": "" }, { "docid": "1f91fbd066fac44e96a12bed0410bc90", "score": "0.544624", "text": "function MAKE_VALUE(result,datatype,value){\n do{\n //result = Buffer.alloc(Value.size);\n result.dt = datatype;\n switch(datatype){\n case 0:{\n result.intV = value;\n break;\n }\n case 1:{\n result.stringV = value;\n break; \n }\n case 2:{\n result.floatV = value;\n break;\n }\n case 3:{\n result.boolV = value;\n break;\n }\n }\n }while(0)\n}", "title": "" }, { "docid": "ee713b0b74602b7f9d03407b5f816094", "score": "0.54434305", "text": "make(value, _parent, key) {\n return this.mutate(this.fix(value), key);\n }", "title": "" }, { "docid": "ee713b0b74602b7f9d03407b5f816094", "score": "0.54434305", "text": "make(value, _parent, key) {\n return this.mutate(this.fix(value), key);\n }", "title": "" } ]
a8e28ef7df16ce1535d94b37379f78bc
Retrieves the field specified by `fieldPath`. Returns `undefined` if the document or field doesn't exist.
[ { "docid": "625487d6ed690e9387dab15e76a59339", "score": "0.0", "text": "get(t) {\n if (this._document) {\n const e = this._document.data.field(Ra(\"DocumentSnapshot.get\", t));\n if (null !== e) return this._userDataWriter.convertValue(e);\n }\n }", "title": "" } ]
[ { "docid": "9a4c8f72e574b17615ab410a9025d0ea", "score": "0.63762", "text": "function getV2field(fieldId) {\r\n if (fieldId in baseV2fields) return baseV2fields[fieldId];\r\n var field = v2.$f(fieldId);\r\n if (field != null) {\r\n baseV2fields[fieldId] = field;\r\n return field;\r\n }\r\n return null;\r\n }", "title": "" }, { "docid": "fc3b16ba52fb8ba1e82d2b92c283fc5e", "score": "0.6353846", "text": "getField(appId, tableId, fieldId) {\n let url = super.constructUrl(this.API.GET_FIELD, [appId, tableId, fieldId]);\n return super.get(url);\n }", "title": "" }, { "docid": "dc192dab231f466015b2a0a30ab4e757", "score": "0.6347134", "text": "function getFieldFromDoc(doc, parsedField) {\n var value = doc;\n for (var i = 0, len = parsedField.length; i < len; i++) {\n var key = parsedField[i];\n value = value[key];\n if (!value) {\n break;\n }\n }\n return value;\n}", "title": "" }, { "docid": "4924de097d1c49c759de39b3f553ba30", "score": "0.6183435", "text": "function getField(_, ctx) {\n if (!_.$field) return null;\n const k = 'f:' + _.$field + '_' + _.$name;\n return ctx.fn[k] || (ctx.fn[k] = vegaUtil.field(_.$field, _.$name, ctx.expr.codegen));\n }", "title": "" }, { "docid": "4924de097d1c49c759de39b3f553ba30", "score": "0.6183435", "text": "function getField(_, ctx) {\n if (!_.$field) return null;\n const k = 'f:' + _.$field + '_' + _.$name;\n return ctx.fn[k] || (ctx.fn[k] = vegaUtil.field(_.$field, _.$name, ctx.expr.codegen));\n }", "title": "" }, { "docid": "0ae5bf2ad0347e34bc682eb4508c83c9", "score": "0.6044363", "text": "getField(field) {\n return this._config.fields[field];\n }", "title": "" }, { "docid": "bd8de52e6f9e5b255b81726ab2df27fd", "score": "0.5978681", "text": "function getFieldFromDomains(domains) {\n var domain = mergeDomains(domains);\n if (vega_schema_1.isDataRefDomain(domain) && vega_util_1.isString(domain.field)) {\n return domain.field;\n }\n return undefined;\n}", "title": "" }, { "docid": "3f15bb717b26bb1a019ca23822c20a63", "score": "0.59714085", "text": "function quby_getField(fieldVal, obj, name) {\r\n if (fieldVal === undefined) {\r\n quby.runtime.fieldNotFoundError(obj, name);\r\n }\r\n\r\n return fieldVal;\r\n}", "title": "" }, { "docid": "e65990def9b16ed3c56bd12d30567eb1", "score": "0.59399134", "text": "function getField$1(_, ctx) {\n if (!_.$field) return null;\n var k = 'f:' + _.$field + '_' + _.$name;\n return ctx.fn[k] || (ctx.fn[k] = field(_.$field, _.$name));\n}", "title": "" }, { "docid": "e65990def9b16ed3c56bd12d30567eb1", "score": "0.59399134", "text": "function getField$1(_, ctx) {\n if (!_.$field) return null;\n var k = 'f:' + _.$field + '_' + _.$name;\n return ctx.fn[k] || (ctx.fn[k] = field(_.$field, _.$name));\n}", "title": "" }, { "docid": "3aa8879a72b893162d77d8887b7a40d7", "score": "0.59136283", "text": "getField(name) {\n var f = null;\n for (let i = 0; i < this.fields.length; i++) {\n var key = Object.keys(this.fields[i])[0];\n\n if (key == name) {\n f = this.fields[i];\n }\n }\n\n return f;\n }", "title": "" }, { "docid": "559e4945085990f8de68d3dd45e2b284", "score": "0.5895782", "text": "function getField (node) {\n return node.getField()\n}", "title": "" }, { "docid": "7daedd4e005a4830689bfdd4f7dd8056", "score": "0.5768238", "text": "function getFieldFromDomain(domain) {\n if (isDataRefDomain(domain) && isString(domain.field)) {\n return domain.field;\n } else if (isDataRefUnionedDomain(domain)) {\n let field;\n\n for (const nonUnionDomain of domain.fields) {\n if (isDataRefDomain(nonUnionDomain) && isString(nonUnionDomain.field)) {\n if (!field) {\n field = nonUnionDomain.field;\n } else if (field !== nonUnionDomain.field) {\n warn(FACETED_INDEPENDENT_DIFFERENT_SOURCES);\n return field;\n }\n }\n }\n\n warn(FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES);\n return field;\n } else if (isFieldRefUnionDomain(domain)) {\n warn(FACETED_INDEPENDENT_SAME_SOURCE);\n const field = domain.fields[0];\n return isString(field) ? field : undefined;\n }\n\n return undefined;\n }", "title": "" }, { "docid": "d747dffcc1c520a62c026811cb851b54", "score": "0.56990486", "text": "function getField(x, y) {\n return field[getFieldOffset(x, y)];\n}", "title": "" }, { "docid": "eb6d0eb2ce69d69a6da7945db70f9566", "score": "0.5584567", "text": "function getSchemaObjectField(fields, name) {\n var i\n , field\n , fieldName;\n \n // Cycle through the fields.\n for (i = 0; i < fields.length; i++) {\n // Get the field.\n field = fields[i];\n // Get the field's name.\n fieldName = field[KEYWORD_NAME];\n \n // If this field doesn't have a name, then it must have a\n // sub-object, so we must cycle through that.\n if (typeof fieldName === \"undefined\") {\n // Recurse on the sub-object.\n var result =\n getSchemaObjectField(\n // Get the sub-object's schema's list of fields.\n field[KEYWORD_CONCORDIA][KEYWORD_SCHEMA][KEYWORD_FIELDS],\n name);\n \n // If an applicable field was found, return it.\n if (result !== null) {\n return result;\n }\n }\n // If this field does have a name and it matches the name we\n // wanted, return this field.\n else if (fieldName === name) {\n return field;\n }\n }\n \n // If no field was ever found, return null.\n return null;\n }", "title": "" }, { "docid": "81eb9946cb0e4b1be2712a8a29952b15", "score": "0.5566072", "text": "function findFieldInFormById(formId, fieldId){\n\n var deferred = q.defer();\n\n FieldModel.find({_id: fieldId, formId: formId},\n function(err,field){\n if(err){\n deferred.reject(err);\n }else{\n deferred.resolve(field);\n }\n\n });\n\n return deferred.promise;\n }", "title": "" }, { "docid": "2ed368cb74c3537e2eb76793b072910b", "score": "0.5491443", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n }", "title": "" }, { "docid": "490abe52d9f771ade8762319c58d701a", "score": "0.5490207", "text": "getField() {\n if (_.isNaN(parseInt(this.field)) && this.field.split(\".\").length == 2) {\n const levels = this.field.split(\".\");\n return this.data[levels[0]][levels[1]];\n } else {\n return this.data[this.field];\n }\n }", "title": "" }, { "docid": "f25de80582c27c2335f24f49be338acc", "score": "0.546944", "text": "function getFieldValue(renderingOrFields, fieldName, defaultValue) {\n if (!renderingOrFields || !fieldName) {\n return defaultValue;\n }\n var fields = renderingOrFields;\n if (fields[fieldName] && typeof fields[fieldName].value !== 'undefined') {\n return fields[fieldName].value;\n }\n var rendering = renderingOrFields;\n if (!rendering.fields ||\n !rendering.fields[fieldName] ||\n typeof rendering.fields[fieldName].value === 'undefined') {\n return defaultValue;\n }\n return rendering.fields[fieldName].value;\n}", "title": "" }, { "docid": "46c07e4318e9a7c3c1f0c7f1f92f0928", "score": "0.54235405", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.find({ id: el._veeValidateId });\n}", "title": "" }, { "docid": "46c07e4318e9a7c3c1f0c7f1f92f0928", "score": "0.54235405", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.find({ id: el._veeValidateId });\n}", "title": "" }, { "docid": "46c07e4318e9a7c3c1f0c7f1f92f0928", "score": "0.54235405", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.find({ id: el._veeValidateId });\n}", "title": "" }, { "docid": "46c07e4318e9a7c3c1f0c7f1f92f0928", "score": "0.54235405", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.find({ id: el._veeValidateId });\n}", "title": "" }, { "docid": "8a7a14d930f3846b403cc33ef7584bbc", "score": "0.5411281", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n}", "title": "" }, { "docid": "8a7a14d930f3846b403cc33ef7584bbc", "score": "0.5411281", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n}", "title": "" }, { "docid": "8a7a14d930f3846b403cc33ef7584bbc", "score": "0.5411281", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n}", "title": "" }, { "docid": "8a7a14d930f3846b403cc33ef7584bbc", "score": "0.5411281", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n}", "title": "" }, { "docid": "8a7a14d930f3846b403cc33ef7584bbc", "score": "0.5411281", "text": "function findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n}", "title": "" }, { "docid": "4118f14253f0ac7cb73d6377943a8ad4", "score": "0.5368314", "text": "function __PRIVATE_fieldPathFromArgument(t, e) {\n return \"string\" == typeof e ? __PRIVATE_fieldPathFromDotSeparatedString(t, e) : e instanceof FieldPath ? e._internalPath : e._delegate._internalPath;\n}", "title": "" }, { "docid": "e3cf91bb7dc90c755bdb68a814a13941", "score": "0.5355002", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object[fieldName];\n}", "title": "" }, { "docid": "e3cf91bb7dc90c755bdb68a814a13941", "score": "0.5355002", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object[fieldName];\n}", "title": "" }, { "docid": "e3cf91bb7dc90c755bdb68a814a13941", "score": "0.5355002", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object[fieldName];\n}", "title": "" }, { "docid": "e3cf91bb7dc90c755bdb68a814a13941", "score": "0.5355002", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object[fieldName];\n}", "title": "" }, { "docid": "e3cf91bb7dc90c755bdb68a814a13941", "score": "0.5355002", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object[fieldName];\n}", "title": "" }, { "docid": "fb1a5540d49bd00685a140c373e52e18", "score": "0.5353607", "text": "function findField (el, context) {\r\n if (!context || !context.$validator) {\r\n return null;\r\n }\r\n\r\n return context.$validator.fields.find({ id: el._veeValidateId });\r\n }", "title": "" }, { "docid": "0e296fd91e875b0add2f9529cfb49d97", "score": "0.5333534", "text": "get(field) {\n\t\tif(this.errors[field]) {\n\t\t\treturn this.errors[field][0];\n\t\t}\n\t}", "title": "" }, { "docid": "d6c558e77771863df4c9998ad839a726", "score": "0.53212106", "text": "get(field) {\n\t\tif (this.errors[field]) {\n\t\t\treturn this.errors[field][0];\n\t\t}\n\t}", "title": "" }, { "docid": "c8fdcf329baefc41eb059677fabf5d99", "score": "0.5319553", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object && object[fieldName];\n }", "title": "" }, { "docid": "c8fdcf329baefc41eb059677fabf5d99", "score": "0.5319553", "text": "function getFieldValue(object, fieldName) {\n var d = Def.fromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n\n return object && object[fieldName];\n }", "title": "" }, { "docid": "187fea1bd7c92ed3ca82119f74caa306", "score": "0.53165203", "text": "function findField (el, context) {\r\n if (!context || !context.$validator) {\r\n return null;\r\n }\r\n\r\n return context.$validator.fields.find({ id: el._veeValidateId });\r\n}", "title": "" }, { "docid": "187fea1bd7c92ed3ca82119f74caa306", "score": "0.53165203", "text": "function findField (el, context) {\r\n if (!context || !context.$validator) {\r\n return null;\r\n }\r\n\r\n return context.$validator.fields.find({ id: el._veeValidateId });\r\n}", "title": "" }, { "docid": "5eedf659eb774663b7d394cfce840f69", "score": "0.53067285", "text": "function getByField(req, res) {\n const field = req.params;\n\n Book.find(field).then((books) => {\n res.status(200).send(books);\n }).catch((err) => {\n res.status(404).send({ message: 'No books found', err });\n });\n}", "title": "" }, { "docid": "dec265ef755300ad0dfbf21533544785", "score": "0.5304446", "text": "function getFieldValue(object, fieldName) {\n var d = defFromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n return object && object[fieldName];\n }", "title": "" }, { "docid": "dec265ef755300ad0dfbf21533544785", "score": "0.5304446", "text": "function getFieldValue(object, fieldName) {\n var d = defFromValue(object);\n if (d) {\n var field = d.allFields[fieldName];\n if (field) {\n return field.getValue(object);\n }\n }\n return object && object[fieldName];\n }", "title": "" }, { "docid": "7a3245318759378e4d16f4fbfee7b507", "score": "0.52851963", "text": "getValue(fieldName) {\n return(get(this.data, fieldName));\n }", "title": "" }, { "docid": "80b6616bd032dcadcdfb2718506edac8", "score": "0.5274444", "text": "field(key = null) {\n return this._field(key);\n }", "title": "" }, { "docid": "95c5521b8b4f8af368d0d0eae5e8861f", "score": "0.52721405", "text": "function __PRIVATE_fieldPathFromArgument$1(t, e, r) {\n if ((\n // If required, replace the FieldPath Compat class with with the firestore-exp\n // FieldPath.\n e = d(e)) instanceof FieldPath) return e._internalPath;\n if (\"string\" == typeof e) return __PRIVATE_fieldPathFromDotSeparatedString(t, e);\n throw __PRIVATE_createError(\"Field path arguments must be of type string or \", t, \n /* hasConverter= */ !1, \n /* path= */ void 0, r);\n}", "title": "" }, { "docid": "1e6a0e1d0b4d2c561044919320626678", "score": "0.526874", "text": "function get(target, field) {\n var pathArray = splitNested(field);\n var result = void 0;\n try {\n result = pathArray.reduce(function (curr, path) {\n return curr[path];\n }, target);\n } catch (e) {}\n return result;\n}", "title": "" }, { "docid": "1e6a0e1d0b4d2c561044919320626678", "score": "0.526874", "text": "function get(target, field) {\n var pathArray = splitNested(field);\n var result = void 0;\n try {\n result = pathArray.reduce(function (curr, path) {\n return curr[path];\n }, target);\n } catch (e) {}\n return result;\n}", "title": "" }, { "docid": "9b433e26d3b3a7d9b5b4ba181d3b6879", "score": "0.5211484", "text": "getDraftField(fieldName, options={}) {\n const reviewRequest = this.get('reviewRequest');\n const draft = reviewRequest.draft;\n\n if (options.useExtraData) {\n let data;\n\n if (options.useRawTextValue) {\n const rawTextFields = draft.get('rawTextFields');\n\n if (rawTextFields && rawTextFields.extra_data) {\n data = rawTextFields.extra_data;\n }\n }\n\n if (!data) {\n data = draft.get('extraData');\n }\n\n return data[fieldName];\n } else if (fieldName === 'closeDescription' ||\n fieldName === 'closeDescriptionRichText') {\n return reviewRequest.get(fieldName);\n } else {\n return draft.get(fieldName);\n }\n }", "title": "" }, { "docid": "8d0e61e21dcdead04d16410bb38b87d6", "score": "0.5211047", "text": "function accessor(data, field) {\n var value = null;\n\n if (typeof field === 'function') value = field(data);else if (typeof field === 'string' && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object' && data != null && field in data) value = data[field];\n\n return value;\n}", "title": "" }, { "docid": "c06631005da158114149edcad75bf9d0", "score": "0.5199703", "text": "get({ fieldName, docId }, defaultTo = '') {\n const unsavedValue = this._getCollectionDocument(fieldName, docId);\n if (unsavedValue) {\n return unsavedValue.value;\n } else {\n return defaultTo;\n }\n }", "title": "" }, { "docid": "b409a0b26c2f1ec831441bec50e0a4c8", "score": "0.51816726", "text": "function get(target, field) {\n\t var pathArray = splitNested(field);\n\t var result = void 0;\n\t try {\n\t result = pathArray.reduce(function (curr, path) {\n\t return curr[path];\n\t }, target);\n\t } catch (e) {}\n\t return result;\n\t}", "title": "" }, { "docid": "4339d27eea8ff86cdce021bc10f2da02", "score": "0.5127066", "text": "getFieldId() {\n return null;\n }", "title": "" }, { "docid": "987362d48d7e504fe998c831f4cc5e05", "score": "0.511614", "text": "getFieldValue(field){\n\t\tvar retValue = eval(\"this.\"+field);\n\n\t\treturn retValue;\n\t}", "title": "" }, { "docid": "7dbb33b3d97c9f900545728d2c74fc8f", "score": "0.51003057", "text": "function getFieldValue(ionReader, path) {\n ionReader.next();\n ionReader.stepIn();\n return recursivePathLookup(ionReader, path);\n}", "title": "" }, { "docid": "e5c66158cec963e2c13f60139798b771", "score": "0.50869775", "text": "get(fieldName) {\n\t return this[fieldName];\n\t }", "title": "" }, { "docid": "5608e97a27983acb45afe40d9b8ff025", "score": "0.50676936", "text": "function getPropertyFieldInfo$static(propertyField/*:Component*/)/*:PropertyFieldInfo*/ {\n var theDocumentForm/*:DocumentForm*/ = findDocumentForm$static(propertyField);\n if (theDocumentForm) {\n var labeledElement/*:Element*/ = DocumentTabPanelBase.findLabeledElement(propertyField);\n if (labeledElement) {\n var documentFormEl/*:Element*/ = theDocumentForm.getEl();\n return new com.coremedia.cms.editor.sdk.premular.PropertyFieldInfo(labeledElement, labeledElement.getY(), labeledElement.getHeight(),\n theDocumentForm, documentFormEl.getY(), documentFormEl.getHeight());\n }\n }\n return null;\n }", "title": "" }, { "docid": "748c771f2a824301c3871872c676b9b9", "score": "0.50339866", "text": "function getFieldValue(fid, fvalue){\r\n var f = $(fid);\r\n if (f) {\r\n return f.value;\r\n }\r\n else {\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "693997f4aa6805ad7297950eed8f9afc", "score": "0.50188434", "text": "function isFieldPresent(field)\r\n{\r\n\treturn field;\r\n}", "title": "" }, { "docid": "3686bb4ae0bc64e2bcd296147b174b88", "score": "0.5007987", "text": "function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n }", "title": "" }, { "docid": "3686bb4ae0bc64e2bcd296147b174b88", "score": "0.5007987", "text": "function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n }", "title": "" }, { "docid": "436807220ddca46be4c56d32e6b1619d", "score": "0.50076413", "text": "get(id, field = null) {\n return this.getResourceModel().get(id, field);\n }", "title": "" }, { "docid": "e221053bb52f7dba61f154793780f70f", "score": "0.49980283", "text": "function getFieldDefinitionLegacy(schema, parentType, fieldName, fieldAST) {\n var _schemaFieldDef;\n\n var schemaFieldDef = getFieldDefinitionStrict(schema, parentType, fieldName);\n\n if (!schemaFieldDef) {\n schemaFieldDef = getFieldDefinitionLegacyImpl(schema, parentType, fieldName, fieldAST);\n }\n\n return (_schemaFieldDef = schemaFieldDef) !== null && _schemaFieldDef !== void 0 ? _schemaFieldDef : null;\n}", "title": "" }, { "docid": "a76abc863947f5c596acf790079ba633", "score": "0.49885383", "text": "getFields() {\n if (typeof this[customFields] === 'undefined') return null;\n return this[customFields] || null;\n }", "title": "" }, { "docid": "666a16cc06797feccca1dbf9554e25a9", "score": "0.49796537", "text": "function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}", "title": "" }, { "docid": "666a16cc06797feccca1dbf9554e25a9", "score": "0.49796537", "text": "function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}", "title": "" }, { "docid": "7d971f472973a4de4749a45dee9d063e", "score": "0.49702927", "text": "function getFieldFromDomain(domain) {\n if (vega_schema_1.isDataRefDomain(domain) && vega_util_1.isString(domain.field)) {\n return domain.field;\n }\n else if (vega_schema_2.isDataRefUnionedDomain(domain)) {\n var field = void 0;\n for (var _i = 0, _a = domain.fields; _i < _a.length; _i++) {\n var nonUnionDomain = _a[_i];\n if (vega_schema_1.isDataRefDomain(nonUnionDomain) && vega_util_1.isString(nonUnionDomain.field)) {\n if (!field) {\n field = nonUnionDomain.field;\n }\n else if (field !== nonUnionDomain.field) {\n log.warn('Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result cell size may be incorrect.');\n return field;\n }\n }\n }\n log.warn('Detected faceted independent scales that union domain of identical fields from different source detected. We will assume that this is the same field from a different fork of the same data source. However, if this is not case, the result cell size maybe incorrect.');\n return field;\n }\n else if (vega_schema_2.isFieldRefUnionDomain(domain) && vega_util_1.isString) {\n log.warn('Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result cell size may be incorrect.');\n var field = domain.fields[0];\n return vega_util_1.isString(field) ? field : undefined;\n }\n return undefined;\n}", "title": "" }, { "docid": "e92d430e5ea4768b07b7992b84667696", "score": "0.49448293", "text": "getRef(fieldName) {\n return(get(this.refs, fieldName + \".inputRef.current\"));\n }", "title": "" }, { "docid": "16a1350a2c6fbb5998b049a3726eef01", "score": "0.49401468", "text": "function getFieldDef(channelDef) {\n if (isFieldDef(channelDef)) {\n return channelDef;\n } else if (hasConditionalFieldDef(channelDef)) {\n return channelDef.condition;\n }\n\n return undefined;\n }", "title": "" }, { "docid": "4548460de75a574af1877b2b07a50e02", "score": "0.49375588", "text": "function getFieldDef(schema, type, fieldName) {\n if (fieldName === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === type) {\n return _introspection.SchemaMetaFieldDef;\n }\n if (fieldName === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === type) {\n return _introspection.TypeMetaFieldDef;\n }\n if (fieldName === _introspection.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) {\n return _introspection.TypeNameMetaFieldDef;\n }\n if (type.getFields && typeof type.getFields === 'function') {\n return type.getFields()[fieldName];\n }\n\n return null;\n}", "title": "" }, { "docid": "0800e11aed4c02fecf17530eb1cb771c", "score": "0.4930837", "text": "function getFieldDef(channelDef) {\n if (isFieldDef(channelDef)) {\n return channelDef;\n }\n else if (hasConditionFieldDef(channelDef)) {\n return channelDef.condition;\n }\n return undefined;\n}", "title": "" }, { "docid": "0800e11aed4c02fecf17530eb1cb771c", "score": "0.4930837", "text": "function getFieldDef(channelDef) {\n if (isFieldDef(channelDef)) {\n return channelDef;\n }\n else if (hasConditionFieldDef(channelDef)) {\n return channelDef.condition;\n }\n return undefined;\n}", "title": "" }, { "docid": "408da2c87c4dd91c50a1cf4f7859a177", "score": "0.4906808", "text": "function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}", "title": "" }, { "docid": "408da2c87c4dd91c50a1cf4f7859a177", "score": "0.4906808", "text": "function getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}", "title": "" }, { "docid": "d785d5f9d0af99aaf0127d8485fe8320", "score": "0.48883605", "text": "getFieldView(fieldID) {\n return this._fieldViews[fieldID];\n }", "title": "" }, { "docid": "003d2d378e49fbb11eb58639147ae278", "score": "0.4882954", "text": "function FieldPath() {\n var fieldNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fieldNames[_i] = arguments[_i];\n }\n validateNamedArrayAtLeastNumberOfElements('FieldPath', fieldNames, 'fieldNames', 1);\n for (var i = 0; i < fieldNames.length; ++i) {\n validateArgType('FieldPath', 'string', i, fieldNames[i]);\n if (fieldNames[i].length === 0) {\n throw new error_FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). \" +\n 'Field names must not be empty.');\n }\n }\n this._internalPath = new path_FieldPath(fieldNames);\n }", "title": "" }, { "docid": "86cd6d948de4063a93fbfc3221eb94c8", "score": "0.4882876", "text": "function getFieldValue(field)\r\n{\r\n if(field == null || typeof(field) == \"undefined\")\r\n return \"\";\r\n if(typeof(field) != \"undefined\" && typeof(field[0]) != \"undefined\" && field[0].type==\"checkbox\")\r\n return getCheckedValues(field);\r\n if(typeof(field) != \"undefined\" && typeof(field[0]) != \"undefined\" && field[0].type==\"radio\")\r\n return getRadioValue(field);\r\n if(typeof(field) != \"undefined\" && field.type.match(\"select*\")) \r\n return getSelectedValues(field);\r\n if(typeof(field) != \"undefined\")\r\n return field.value;\r\n}", "title": "" }, { "docid": "f28952b66b8d1d0daa50779573a666f8", "score": "0.48762324", "text": "function sc_getStructField(s, name, field) {\n return s[field];\n}", "title": "" }, { "docid": "4114158e265bdb3f19110c5415597f56", "score": "0.48696628", "text": "function sc_jsField(o, field) {\n return o[field];\n}", "title": "" }, { "docid": "dbc5e838e64294bfe4389cf99bb406df", "score": "0.48535624", "text": "function getQuestionnaireFieldValue(fieldName){\n\tvar activityTypeValue = controller.questPanel.getFieldValue(\"activity_log.activity_type\");\n var tabs = View.getOpenerView().panels.get(\"helpDeskRequestTabs\")\n tabs.activityTypeValue = activityTypeValue;\n\tactivityTypeValue=\"SERVICE DESK - DEPARTMENT SPACE\";\n\tvar restriction = new Ab.view.Restriction();\n\trestriction.addClause('questionnaire.questionnaire_id', activityTypeValue);\n//\tif (!this.showInactive) \n\t\trestriction.addClause('questions.is_active', 1);\n\tvar ds = View.dataSources.get('exPrgQuestionnaire_questionsDs');\n\tvar questionRecords = ds.getRecords(restriction);\n\tfor(var i=0;i<questionRecords.length;i++){\n\t\tvar quest_name = questionRecords[i].getValue(\"questions.quest_name\");\n\t\tif(fieldName==quest_name){\n \t\t\tvar questionRecord = questionRecords[i];\n \t\t\tvar recordType = questionRecord.getValue('questions.format_type');\n \t\t\tvar obj = $('questPanel_question' + i + '.answer_field');\n \t\t\tif(obj){\n \t\t\t\tvar value = obj.value;\n \t\t\t\tif (recordType == 'Date') {\n \t\t\t\t\treturn dateFormatQues(getDateWithISOFormat(value));\n \t\t\t\t}else{\n \t\t\t\t\treturn value;\n \t\t\t\t}\n \t\t\t}\n\t\t}\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "b022d67ecd2376b1f375aefe7f972f3e", "score": "0.48364586", "text": "getField(u_id, _field) {\n return new Promise((resolve, reject) => {\n let mongoose = this.dbConn.getConnection();\n\n seekerModel.findById(u_id).then((doc) => {\n this.dbConn.closeConnection(mongoose);\n\n if (doc == null || doc == undefined) {\n let err = {\n code: 'SEEKER_NOT_FOUND',\n message: 'User not found. Please first complete general information in \"Create profile\" section.',\n status: 400\n };\n return reject(err);\n } else if (doc[_field] == null) {\n let err = {\n code: 'SEEKER_NOT_COMPLETED',\n message: 'User not completed `' + _field + '` field or invalid field.',\n status: 400\n };\n return reject(err);\n } else {\n let field = JSON.stringify(doc[_field]);\n\n try {\n field = JSON.parse(field);\n console.log('DB_SUCCESS_SEEKER_GET:', _field, ',_id:', doc._id);\n return resolve(field);\n } catch (e) {\n let err = {\n code: 'SEEKER_UNSTRUCTURED_DATA',\n message: 'User profile data is unstructured in ' + _field + ' field.',\n status: 500\n };\n return reject(err);\n }\n }\n }).catch((error) => {\n console.log('DB_ERROR:', error.message, ',_id:', u_id);\n this.dbConn.closeConnection(mongoose);\n let err = {\n code: 'DB_ERROR_GET_FIELD',\n message: error.message,\n status: 500\n };\n return reject(err);\n });\n });\n }", "title": "" }, { "docid": "cdb321dfa6a47d6058bf43ea0761f1bc", "score": "0.48329505", "text": "function get_link (field) {\n var link = items_by_id[field.sys.id];\n return link || field; // default to the field if the link was not found\n }", "title": "" }, { "docid": "b63a6af896ae8cc7b38d4171ce4228ec", "score": "0.4830456", "text": "function getFieldDef(schema, parentType, fieldName) {\n if (fieldName === _type_introspection__WEBPACK_IMPORTED_MODULE_16__[/* SchemaMetaFieldDef */ \"a\"].name && schema.getQueryType() === parentType) {\n return _type_introspection__WEBPACK_IMPORTED_MODULE_16__[/* SchemaMetaFieldDef */ \"a\"];\n } else if (fieldName === _type_introspection__WEBPACK_IMPORTED_MODULE_16__[/* TypeMetaFieldDef */ \"c\"].name && schema.getQueryType() === parentType) {\n return _type_introspection__WEBPACK_IMPORTED_MODULE_16__[/* TypeMetaFieldDef */ \"c\"];\n } else if (fieldName === _type_introspection__WEBPACK_IMPORTED_MODULE_16__[/* TypeNameMetaFieldDef */ \"d\"].name) {\n return _type_introspection__WEBPACK_IMPORTED_MODULE_16__[/* TypeNameMetaFieldDef */ \"d\"];\n }\n\n return parentType.getFields()[fieldName];\n}", "title": "" }, { "docid": "52e89bcac9e241d59fcd2fe8c45c527e", "score": "0.48140085", "text": "function getField(field, tablaMeta) {\n\t\tif (tablaMeta) {\t\t\t\n\t\t\tcolnames = tablaMeta['columnNames'] ; \n\t\t\tpidx = colnames.indexOf(field) ; if (pidx <0 ) return null ;\n\t\t\trows = tablaMeta['rows'] ; \t\t\t\n\t\t\tif (rows.length == 1) {\n\t\t\t\treturn rows[0][pidx] ;\n\t\t\t} else {\n\t\t\t\tresults = [] ;\n\t\t\t\tfor (var r=0 ; r<rows.length ; r++) {\n\t\t\t\t\tresults.push(rows[r][pidx]) ;\n\t\t\t\t}\n\t\t\t\treturn results ;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "52e89bcac9e241d59fcd2fe8c45c527e", "score": "0.48140085", "text": "function getField(field, tablaMeta) {\n\t\tif (tablaMeta) {\t\t\t\n\t\t\tcolnames = tablaMeta['columnNames'] ; \n\t\t\tpidx = colnames.indexOf(field) ; if (pidx <0 ) return null ;\n\t\t\trows = tablaMeta['rows'] ; \t\t\t\n\t\t\tif (rows.length == 1) {\n\t\t\t\treturn rows[0][pidx] ;\n\t\t\t} else {\n\t\t\t\tresults = [] ;\n\t\t\t\tfor (var r=0 ; r<rows.length ; r++) {\n\t\t\t\t\tresults.push(rows[r][pidx]) ;\n\t\t\t\t}\n\t\t\t\treturn results ;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e9d48453c1c27214fecc262d02fbe939", "score": "0.48061836", "text": "getFieldName() {\n let fieldName = this.fields[0];\n fieldName = fieldName.substring(\n fieldName.lastIndexOf('.') + 1,\n fieldName.length\n );\n return fieldName;\n }", "title": "" }, { "docid": "9ec3681e1bdde6b1ebfd42822a636374", "score": "0.4803423", "text": "function FieldPath() {\n var fieldNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fieldNames[_i] = arguments[_i];\n }\n Object(__WEBPACK_IMPORTED_MODULE_2__util_input_validation__[\"h\" /* validateNamedArrayAtLeastNumberOfElements */])('FieldPath', fieldNames, 'fieldNames', 1);\n for (var i = 0; i < fieldNames.length; ++i) {\n Object(__WEBPACK_IMPORTED_MODULE_2__util_input_validation__[\"c\" /* validateArgType */])('FieldPath', 'string', i, fieldNames[i]);\n if (fieldNames[i].length === 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). \" +\n 'Field names must not be empty.');\n }\n }\n this._internalPath = new __WEBPACK_IMPORTED_MODULE_0__model_path__[\"a\" /* FieldPath */](fieldNames);\n }", "title": "" }, { "docid": "bea60c36c40ce90876aac99326fcab28", "score": "0.48010713", "text": "function getForField(req, res) { \n // close the database connecection\n Database.close() \n \n const error = req.body.error;\n if(req.body.error) return res.status(500).send({error}) \n if(!req.body.providers) return res.status(404).send({message: 'NOT FOUND'})\n let providers = req.body.providers\n return res.status(200).send({providers}) \n}", "title": "" }, { "docid": "274419b5fdab5fcac7f2e5cf08d7105a", "score": "0.47999308", "text": "function getAnyFieldValue(field) {\n return String(field[Object.keys(field)[0]]);\n}", "title": "" }, { "docid": "797b499b22dea62b82e57a49b721ffd4", "score": "0.47553897", "text": "function getFieldValue(obj, name) {\n try {\n return obj[name];\n } catch (ex) {\n return undefined;\n }\n}", "title": "" }, { "docid": "58d1abdf6f45407a3e84dfc95b46acda", "score": "0.47476542", "text": "function getFieldValue(field, root, tip) {\n return field[0] === '/' ? utils_1.lodash.get(root, field.slice(1)) : tip[field];\n}", "title": "" }, { "docid": "19d1dca9731473bc4c243580830a3eed", "score": "0.47412965", "text": "Field(node) {\n const def = context.getFieldDef();\n\n if (!def) {\n return;\n }\n\n requiredFields.forEach(field => {\n if (fieldAvailableOnType(def.type, field)) {\n const fieldWasRequested = getFieldWasRequestedOnNode(node, field);\n\n if (!fieldWasRequested) {\n context.reportError(new _graphql.GraphQLError(`'${field}' field required on '${node.name.value}'`, [node]));\n }\n }\n });\n }", "title": "" }, { "docid": "e73b3d0e577b44752a803234c23a6fb9", "score": "0.47379512", "text": "function getFieldValue(idToFind) {\n let value = undefined;\n var elementFound = document.getElementById(idToFind);\n if (elementFound && elementFound.value !== undefined) {\n value = elementFound.value;\n }\n return value;\n}", "title": "" }, { "docid": "df10e9ac717972f86da51a3a492043b8", "score": "0.4719641", "text": "exists (document, field) {\n const exists = _.has(document, field)\n if (exists) { return }\n\n this.events.emit('assertion', {\n status: 'fail',\n message: 'missing field',\n id: _.get(document, 'properties.wof:id'),\n field: field\n })\n }", "title": "" }, { "docid": "f8b1b38181b05ee41c4c2c45269276b3", "score": "0.47141668", "text": "vgField(channel, opt = {}) {\n const fieldDef = this.fieldDef(channel);\n\n if (!fieldDef) {\n return undefined;\n }\n\n return vgField(fieldDef, opt);\n }", "title": "" }, { "docid": "563106ccd7f79bfd5bd557a0dab19443", "score": "0.4710885", "text": "function getUserData(path, field) {\n //Attempts to initialize user and get user's uid\n var uid;\n var user = firebase.auth().currentUser;\n if (user == null) {\n console.log('User is null. Cannot get user data.');\n return;\n }\n var uid = user.uid;\n //Creates firebase database reference to appropriate data in firebase\n var ref = firebase.database().ref('/users/' + uid + path).child(field);\n\n //Returns a promise of the data pointed to by firebase reference\n return ref.once('value').then(function(dataSnapshot) {\n console.log('getUserData returned: ' + dataSnapshot.val());\n return Promise.resolve(dataSnapshot.val());\n //error handling if promise was rejected\n }, function(error) {\n console.log('The promise was rejected.');\n console.log(error);\n return null;\n });\n}", "title": "" }, { "docid": "81bac5d478564c2fd1d8331e9fcbbc66", "score": "0.47088075", "text": "function getFieldDef(schema, parentType, fieldName) {\n if (fieldName === __WEBPACK_IMPORTED_MODULE_16__type_introspection__[\"a\" /* SchemaMetaFieldDef */].name && schema.getQueryType() === parentType) {\n return __WEBPACK_IMPORTED_MODULE_16__type_introspection__[\"a\" /* SchemaMetaFieldDef */];\n } else if (fieldName === __WEBPACK_IMPORTED_MODULE_16__type_introspection__[\"c\" /* TypeMetaFieldDef */].name && schema.getQueryType() === parentType) {\n return __WEBPACK_IMPORTED_MODULE_16__type_introspection__[\"c\" /* TypeMetaFieldDef */];\n } else if (fieldName === __WEBPACK_IMPORTED_MODULE_16__type_introspection__[\"d\" /* TypeNameMetaFieldDef */].name) {\n return __WEBPACK_IMPORTED_MODULE_16__type_introspection__[\"d\" /* TypeNameMetaFieldDef */];\n }\n\n return parentType.getFields()[fieldName];\n}", "title": "" }, { "docid": "198b3bfc835a556ffa0cf61e33d20792", "score": "0.47056532", "text": "function getXMLValue(xmlData, field)\n{\n try\n {\n if (xmlData.getElementsByTagName(field)[0].firstChild.nodeValue)\n {\n return xmlData.getElementsByTagName(field)[0].firstChild.nodeValue;\n }\n return null;\n }\n catch (err)\n {\n return null;\n }\n}", "title": "" }, { "docid": "3e0a6d448784c6cce19f03966a37942b", "score": "0.4704195", "text": "function getCookieField(field) {\n var cookies = document.cookie.split(';');\n for (var i in cookies) {\n var pairValue = cookies[i].trim().split(\"=\");\n if (pairValue[0] === field) {\n return pairValue[1];\n }\n }\n }", "title": "" }, { "docid": "fb3b91854789f1f1abc3fa62182a507c", "score": "0.46788025", "text": "function resolveField(exeContext, parentType, source, fieldNodes, path) {\n var fieldNode = fieldNodes[0];\n var fieldName = fieldNode.name.value;\n var fieldDef = getFieldDef(exeContext.schema, parentType, fieldName);\n\n if (!fieldDef) {\n return;\n }\n\n var resolveFn = fieldDef.resolve || exeContext.fieldResolver;\n var info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal\n // or abrupt (error).\n\n var result = resolveFieldValueOrError(exeContext, fieldDef, fieldNodes, resolveFn, source, info);\n return completeValueCatchingError(exeContext, fieldDef.type, fieldNodes, info, path, result);\n}", "title": "" } ]
e89a6aa54b41265a4872211d65a74e45
hora com PM o AM
[ { "docid": "fd379584876ce9441d08f5ccda1d15df", "score": "0.0", "text": "function revisarHoraDentroPeriodoDia(hora) {\n \n if (hora > 24 || hora <= 0 || isNaN(hora)) {\n throw 'El argumento de la hora no esta dentro el rango (AM,PM) esperado';\n }\n}", "title": "" } ]
[ { "docid": "3b718d9bc7ffc5bab1507872ea5b9b75", "score": "0.7809624", "text": "function Hora(){\n var Digital=new Date();\n var hours=Digital.getHours();\n var minutes=Digital.getMinutes();\n var seconds=Digital.getSeconds();\n var dn=\"AM\";\n if (hours>12){\n dn=\"PM\";\n hours=hours-12;\n }\n if (hours==0)\n hours=12;\n if (minutes<=9)\n minutes=\"0\"+minutes;\n if (seconds<=9)\n seconds=\"0\"+seconds;\n return hours + \":\" + minutes;\n }", "title": "" }, { "docid": "e17ce2774be40f432b21ca63ab432773", "score": "0.72569984", "text": "function am_pm(h)\n{\n with (Math) {\n var hours, minutes, ampm, result=\"\";\n hours = floor(h);\n minutes = floor((h - hours) * 60 + 0.5);\n if (minutes == 60)\n {\n hours += 1;\n minutes = 0;\n }\n\n if (hours > 11)\n {\n hours -= 12;\n ampm = \" pm\";\n }\n else\n {ampm = \" am\";}\n if (hours < 1) hours = 12;\n\n if (hours < 10)\n {result = result + \"0\" + floor(hours);}\n else\n {result = result + floor(hours);}\n result = result + \":\";\n\n if (minutes < 10)\n {result = result + \"0\" + minutes;}\n else\n {result = result + minutes;}\n }\n result = result + ampm;\n return result;\n}", "title": "" }, { "docid": "225a282ebe4ea31a598a771ac283ffcc", "score": "0.7075754", "text": "function displayAmorPm(hour){\n var b=\"\"\n if(hour<=12){\n b= \"AM\"\n }else{\n b=\"PM\"\n }\n hour = hour % 12\n hour = hour ? hour : 12\n return hour + \" \" + b\n }", "title": "" }, { "docid": "16dfb9b7c23cc7a6b430ad61657fe995", "score": "0.6814043", "text": "function mostraHora (){\n let data = new Date();\n return data.toLocaleTimeString('pt-BR', {\n hour12: false\n });\n}", "title": "" }, { "docid": "898491b17594e5c42542f81212cabcea", "score": "0.67470044", "text": "h (date) {\n const hours = date.getHours();\n return hours === 0\n ? 12\n : (hours > 12 ? hours % 12 : hours)\n }", "title": "" }, { "docid": "a13e9500c1727e9ea92d937a4265910f", "score": "0.6732773", "text": "function twelve_hour_time(h){\n\n if(h > 12){\n h = h - 12;\n AM_or_PM = \" PM\";\n }\n return h;\n\n }", "title": "" }, { "docid": "f9b09d68ce108aabd0634579198ac849", "score": "0.6676608", "text": "function hora(){\nvar fecha = new Date()\nvar hora = fecha.getHours()\nvar minuto = fecha.getMinutes()\nvar segundo = fecha.getSeconds()\nvar mes = fecha.getmounth()\nif(hora>=12 && hora<=23)\nm=\"P.M\"\nelse\nm=\"A.M\"\nif (hora < 10) {hora = \"0\" + hora}\nif (minuto < 10) {minuto = \"0\" + minuto}\nif (segundo < 10) {segundo = \"0\" + segundo}\nif(hora==12)\n{\n m=\"M.D.\";\n}\nif(hora==13)\n{\n hora=\"0\"+1;\n m=\"P.M.\";\n}\nif(hora==14)\n{\n hora=\"0\"+2;\n m=\"P.M.\";\n}\nif(hora==15)\n{\n hora=\"0\"+3;\n m=\"P.M.\";\n}\nif(hora==16)\n{\n hora=\"0\"+4;\n m=\"P.M.\";\n}\nif(hora==17)\n{\n hora=\"0\"+5;\n m=\"P.M.\";\n}\nif(hora==18)\n{\n hora=\"0\"+6;\n m=\"P.M.\";\n}\nif(hora==19)\n{\n hora=\"0\"+7;\n m=\"P.M.\";\n}\nif(hora==20)\n{\n hora=\"0\"+8;\n m=\"P.M.\";\n}\nif(hora==21)\n{\n hora=\"0\"+9;\n M=\"P.M.\";\n}\nif(hora==22)\n{\n hora=10;\n m=\"P.M.\";\n}\nif(hora==23)\n{\n hora=11;\n m=\"P.M.\";\n}\nif((hora==0)||(hora==24))\n{\n hora=12;\n m=\"M.N\";\n} \n \nvar nowhora = mes + hora + \":\" + minuto + \":\" + segundo + \" - \" + m \ndocument.getElementById('hora').firstChild.nodeValue = nowhora\ntiempo = setTimeout('hora()',1000)\n}", "title": "" }, { "docid": "ad95a0b28e7eb19ddcc62c2aa76f31a7", "score": "0.66418016", "text": "function hmTos(heure, minute) {\n\t// je pris le parametre heure et je multiply par 3600 pour convertir en second \n\t// je pris la paremetre minute et je converti en second par multiply par 60\n\t//je return le result en mode de operation arithmathiqe\n\t// et ca pour eviter utilisation de variable et le code sera plus courte\n\treturn(heure*3600+minute*60);\n}", "title": "" }, { "docid": "a08dbf9d4a3b05fc29ef51e9fd5072a8", "score": "0.66307527", "text": "function horas() {\n var date = new Date();\n var hours = date.getHours() < 10 ? \"0\" + date.getHours() : date.getHours();\n var minutes = date.getMinutes() < 10 ? \"0\" + date.getMinutes() : date.getMinutes();\n var seconds = date.getSeconds() < 10 ? \"0\" + date.getSeconds() : date.getSeconds();\n time = hours + \":\" + minutes + \":\" + seconds;\n return time;\n }", "title": "" }, { "docid": "b919b63af13ddd68f5e90ff080d3aabd", "score": "0.6596924", "text": "checkAmPm(alarm) {\n const currentTime = alarm;\n let prevTime = currentTime.split(':');\n let twentFourHour = parseInt(prevTime[0]);\n let minutes = parseInt(prevTime[1]);\n let amPm;\n let hour = twentFourHour % 12 || 12;\n if (twentFourHour >= 12) {\n amPm = 'PM';\n } else if (twentFourHour < 12) {\n amPm = 'AM';\n }\n return {\n hour,\n minutes,\n amPm\n }\n }", "title": "" }, { "docid": "088f179b4b338ecda7477b653f126ee5", "score": "0.65835303", "text": "function MascaraHora(cpf, event){\n if(mascaraInteiro(cpf, event)==false){\n event.returnValue = false;\n return false;\n } \n return formataCampo(cpf, '00:00', event);\n}", "title": "" }, { "docid": "7e9f7a896cd677b2b148c8f3401828e8", "score": "0.6581532", "text": "function getamOrpm(time) {\r\n if (time > 12) {\r\n time = time - 12 + 'pm';\r\n } else {\r\n time = time + 'am';\r\n }\r\n return time;\r\n}", "title": "" }, { "docid": "b5f5d31de6f07f88f1bd7c17b283a833", "score": "0.6544605", "text": "function timeManagement() {\n var day = $(\"#currentDay\"); \n var date = moment().format('llll').toString();\n day.text(date);\n var ampm = date.split(\" \");\n hour = parseInt(moment().format('LT').toString());\n if (ampm[5] === \"PM\") {\n hour = hour + 12;\n return hour;\n }\n return hour;\n }", "title": "" }, { "docid": "5a78f74353c2ce9f3aea9dc6431138e6", "score": "0.6496235", "text": "function getAMPM(hour) {\n\t\treturn hour >= 12 ? 'PM' : 'AM';\n\t}", "title": "" }, { "docid": "4c3c3b62399092652c6e6622201732da", "score": "0.64669144", "text": "get meridiem() {\n\t\treturn (this.hour>11)?\"pm\":\"am\";\n\t}", "title": "" }, { "docid": "ed678a7773efe780ee2148042d9cea14", "score": "0.64527696", "text": "function hmTos(heure, minute) {\n\t//je convertis les heures données en minutes\n\tlet htom = heure*60;\n\t//j'additionne ces minutes aux minutes données en param, multiplie le tout par 60 pour avoir le nombre de secondes, puis le retourne\n\treturn (htom + minute)*60;\n}", "title": "" }, { "docid": "7836304fe2dc03288aa7dcedacdaabbc", "score": "0.64483196", "text": "function mostrarhora(){ \n var fecha = new Date();\n var hora = fecha.getHours();\n var minutos = fecha.getMinutes();\n var segundos = fecha.getSeconds();\n if (hora < 10) {\n hora = \"0\" + hora;\n }\n if (minutos < 10) {\n minutos = \"0\" + minutos;\n }\n if (segundos < 10) {\n segundos = \"0\" + segundos;\n }\n hora_final = hora + \":\" + minutos + \":\" + segundos; \n window.status = hora_final;\n return window.status;\n}", "title": "" }, { "docid": "d4c20851b9e04e2d279d264e0e36c2e0", "score": "0.6438767", "text": "function _outputTime24h(time) {\n\t\treturn _padZero(time.getHours()) + \":\" + _padZero(time.getMinutes());\n\t}", "title": "" }, { "docid": "f6a057d861bf2862ec6ac9041762f7a4", "score": "0.6435909", "text": "function timeCodingAM(){\n if (moment().format(\"H\") > 1 && moment().format(\"H\") < 9) {\n $(`.am`).addClass(\"present\");\n\n } else if (moment().format(\"H\") >= 9){\n $(`.am`).addClass(\"past\");\n } \n }", "title": "" }, { "docid": "49964a0396bed57242825223d5db03ff", "score": "0.64176184", "text": "m(h, m) { return (h||0)*60+(m||0); }", "title": "" }, { "docid": "436fb7ab15e9df5f490b78d19d99b556", "score": "0.6384937", "text": "function amFromHourOfDay(hh24)\r\n{\r\n if(hh24 <= 11)\r\n return \"AM\";\r\n else\r\n return \"PM\";\r\n}", "title": "" }, { "docid": "e98d74c52c902dd8ef3cb661248cc6d5", "score": "0.6383166", "text": "function h2s( h ) {\n\t\treturn m2s( h * 60 );\n\t}", "title": "" }, { "docid": "dda9b16a33183ae9035eb0e666bb6ba8", "score": "0.637901", "text": "function convertTime(h) {\n if (h == 0) return (\"12 am\");\n if (h == 12) return (\"12 pm\");\n return (h < 12) ? h + \" am\" : (h - 12) + \" pm\";\n}", "title": "" }, { "docid": "8d6c1d81fadedbaddfca358b3fb55d86", "score": "0.635755", "text": "function getTime(){\n \n hr = hour();\n mn = minute();\n sc = second();\n}", "title": "" }, { "docid": "bb5c7dca25e93fc7b4c62570fe6ae049", "score": "0.63235843", "text": "function formatAMPM(hours, minutes) {\n \n var ampm = hours >= 12 ? 'pm' : 'am';\n hours = hours % 12;\n hours = hours ? hours : 12; // the hour '0' should be '12'\n minutes = minutes < 10 ? '0'+minutes : minutes;\n var strTime = hours + ':' + minutes + ' ' + ampm;\n return strTime;\n}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.63160115", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "22c8f10112817314f669b533e707d085", "score": "0.63158137", "text": "hh (date) {\n return pad(this.h(date))\n }", "title": "" }, { "docid": "91263801534029be9d83b12f0dbce8f7", "score": "0.62966347", "text": "function time() {\r\n var data = new Date();\r\n var ora = addZero( data.getHours() );\r\n var minuti = addZero( data.getMinutes() );\r\n return orario = ora + ':' + minuti;\r\n }", "title": "" }, { "docid": "b19c003a9ef6c46a3ad4246b01341ceb", "score": "0.6288578", "text": "H (date) {\n return date.getHours()\n }", "title": "" }, { "docid": "19498acc06d839b51c63d10983286a47", "score": "0.6275595", "text": "function formatAMPM(hours) {\n var ampm = hours >= 12 ? \"pm\" : \"am\";\n hours = hours % 12;\n hours = hours ? hours : 12;\n return hours + ampm;\n }", "title": "" }, { "docid": "cf1606727493c7f1c9c1e7468756e148", "score": "0.62711376", "text": "function convertTimeTo24HourSystem(h){\n\t\t\t\tif(h.indexOf('12') !=-1 && h.indexOf('A') !=-1){\n\t\t\t\t\t\n\t\t\t\t\th=h.replace('12','00');\n\t\t\t\t\th=h.substr(0,h.indexOf(\"A\")-1);\n\t\t\t\t\t//alert(\"24H Clock: \"+h);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(h.indexOf('12')==-1 && h.indexOf('P') !=-1){\n\t\t\t\t\tt=h.substr(0,h.indexOf(\"P\"));\n\t\t\t\t\t\n\t\t\t\t\tt1=t.split(':');\n\t\t\t\t\thh=parseInt(t1[0])+(12);\n\t\t\t\t\th=h.replace(t,hh+\":\"+t1[1]);\n\t\t\t\t\th=h.substr(0,h.indexOf(\"P\")-1);\n\t\t\t\t\t//alert(\"Time (24H) is: \"+h);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(h.substr(0,1)==\"0\" && h.substr(1,1)!=\"0\" ){//eliminate the leading zero\n\t\t\t\t\t\tt=h.split(\":\");\n\t\t\t\t\t\tt1=t[0];\n\t\t\t\t\t\tt1=t1.replace(\"0\",\"\");\n\t\t\t\t\t\th=t1+\":\"+t[1];\n\t\t\t\t\t\t//alert(\"New time \"+h);\n\t\t\t\t\t}\n\t\t\t\treturn h;\n\t\t\t\t}", "title": "" }, { "docid": "4b63df9b5ad6a557fe485e810691e34d", "score": "0.62688357", "text": "function TimeManager(value){\n var content = value.split(\":\");\n var hora = parseInt(content[0]);\n var minuto = parseInt(content[1]);\n var segundos = parseInt(content[2]);\n\n if(segundos<59)\n segundos=segundos+1;\nelse if(segundos==59){\n segundos=00;\n if(minuto<59)\n minuto=minuto+1;\n else if(minuto==59){\n minuto=00;\n hora=hora+1;\n }\n}\n\n if(segundos<10)\n segundos = \"0\"+segundos;\n if(minuto<10)\n minuto = \"0\"+minuto;\n if(hora<10)\n hora = \"0\"+hora;\n\n return hora+\":\"+minuto+\":\"+segundos;\n}", "title": "" }, { "docid": "9c2d657ac8ba42dbefab99b20ccba7d2", "score": "0.6261455", "text": "function formatofecha_hora_ampm(string){\r\n var mifh = new Date(string);\r\n var info = \"\";\r\n var am_pm = mifh.getHours() >= 12 ? \"p.m.\" : \"a.m.\";\r\n var hours = mifh.getHours() > 12 ? mifh.getHours() - 12 : mifh.getHours();\r\n if(string != null){\r\n info = aumentar_cero(mifh.getDate())+\"/\"+aumentar_cero((mifh.getMonth()+1))+\"/\"+mifh.getFullYear()+\" \"+aumentar_cero(hours)+\":\"+aumentar_cero(mifh.getMinutes())+\":\"+aumentar_cero(mifh.getSeconds())+\" \"+am_pm;\r\n }\r\n return info;\r\n}", "title": "" }, { "docid": "9c2d657ac8ba42dbefab99b20ccba7d2", "score": "0.6261455", "text": "function formatofecha_hora_ampm(string){\r\n var mifh = new Date(string);\r\n var info = \"\";\r\n var am_pm = mifh.getHours() >= 12 ? \"p.m.\" : \"a.m.\";\r\n var hours = mifh.getHours() > 12 ? mifh.getHours() - 12 : mifh.getHours();\r\n if(string != null){\r\n info = aumentar_cero(mifh.getDate())+\"/\"+aumentar_cero((mifh.getMonth()+1))+\"/\"+mifh.getFullYear()+\" \"+aumentar_cero(hours)+\":\"+aumentar_cero(mifh.getMinutes())+\":\"+aumentar_cero(mifh.getSeconds())+\" \"+am_pm;\r\n }\r\n return info;\r\n}", "title": "" }, { "docid": "9c2d657ac8ba42dbefab99b20ccba7d2", "score": "0.6261455", "text": "function formatofecha_hora_ampm(string){\r\n var mifh = new Date(string);\r\n var info = \"\";\r\n var am_pm = mifh.getHours() >= 12 ? \"p.m.\" : \"a.m.\";\r\n var hours = mifh.getHours() > 12 ? mifh.getHours() - 12 : mifh.getHours();\r\n if(string != null){\r\n info = aumentar_cero(mifh.getDate())+\"/\"+aumentar_cero((mifh.getMonth()+1))+\"/\"+mifh.getFullYear()+\" \"+aumentar_cero(hours)+\":\"+aumentar_cero(mifh.getMinutes())+\":\"+aumentar_cero(mifh.getSeconds())+\" \"+am_pm;\r\n }\r\n return info;\r\n}", "title": "" }, { "docid": "980b1b70212aafcf56cc60781d2d4853", "score": "0.62463826", "text": "function strtotime(time)\n{\nvar horas = Math.floor(time / 3600);\t\nvar minutos = Math.floor((time - horas*3600)/60);\t\nvar segundos = time - horas * 3600 - minutos * 60;\nvar txt = '';\n\nif (horas>0) txt = horas +'h ';\nif (horas>0 || minutos>0) {\n\tif (minutos<10) {txt = txt + '0'+ minutos +'m ';} else {txt = txt + minutos +'m ';}\n}\nif (horas>0 || minutos>0 || segundos>0) {\n\tif (segundos<10) {txt = txt + '0' +segundos +'s ';} else {txt = txt + segundos +'s ';}\n}\nif (time <=0) txt = 'AGOTADO';\n\t\nreturn txt;\t\n}", "title": "" }, { "docid": "a7be65a699135e7d27d257a23680f7dc", "score": "0.62275726", "text": "function twelveHr(hour) {\n if (hour > 12) {\n return hour - 12 + \"PM\";\n } else {\n return hour + \"AM\";\n }\n }", "title": "" }, { "docid": "433553318ac0141669c1d20f6cc6f4f9", "score": "0.62228876", "text": "function getTime(){\n const d = new Date();\n let hours = d.getHours();\n let minutes = d.getMinutes();\n let mode = 'am';\n\n if(hours > 12){\n hours -= 12 ;\n mode = \"pm\"\n }\n\n return {time: `${hours}:${JSON.stringify(minutes).padStart(2,'0')}`, mode}\n}", "title": "" }, { "docid": "9cd9f4524093883f94278b3f8644c9db", "score": "0.6214062", "text": "getMidDay(hour) {\n return hour >= 12 ? \"PM\" : \"AM\";\n }", "title": "" }, { "docid": "59a10e0024211f6c8678619c50a7c7cb", "score": "0.62084174", "text": "function get_time() {\r\ntime_now = new Date();\r\nwday_now = time_now.getDay() + 1;\r\nmsec_now = time_now.getTime();\r\nday_now = time_now.getDate();\r\nmonth_now = time_now.getMonth() + 1;\r\nyear_now = time_now.getFullYear();\r\nhours_now = time_now.getHours();\r\nhours_mil = time_now.getHours();\r\nmins_now = time_now.getMinutes();\r\nsecs_now = time_now.getSeconds();\r\nif (mins_now < 10)\r\n{\r\nmin1 = mins_now;\r\nmin2 = 0;\r\n}\r\nelse\r\n{\r\nmin2 = parseInt(mins_now/10);\r\nmin1 = mins_now - (min2 * 10);\r\n}\r\nif (secs_now < 10)\r\n{\r\nsp_0 = secs_now;\r\nsp_1 = 0;\r\n}\r\nelse\r\n{\r\nsp_1 = parseInt(secs_now/10);\r\nsp_0 = secs_now - (sp_1 * 10);\r\n}\r\nif(hours_now > 11)\r\n{\r\nam_pm = \"PM\";\r\n}\r\nelse\r\n{\r\nam_pm = \"AM\";\r\n}\r\nif (hours_now < 10 && hours_now > 0 )\r\n{\r\nhur1 = hours_now;\r\nhur2 = \"\";\r\n}\r\nelse if (hours_now == 0)\r\n{\r\nhur1 = 2;\r\nhur2 = 1;\r\n}\r\nelse if ( hours_now > 12)\r\n{\r\nhours_now = hours_now - 12;\r\nhur2 = parseInt(hours_now/10);\r\nhur1 = hours_now - (hur2 * 10);\r\nif(hur2==0){hur2 = \"\";}\r\n}\r\nelse\r\n{\r\nhur2 = parseInt(hours_now/10);\r\nhur1 = hours_now - (hur2 * 10);\r\n}\r\n//week days\r\nswitch(wday_now){\r\ncase 1:\r\nweek_day=\"Sun\";\r\nwday_new = 7;\r\nbreak;\r\ncase 2:\r\nweek_day=\"Mon\";\r\nwday_new = 1;\r\nbreak;\r\ncase 3:\r\nweek_day=\"Tue\";\r\nwday_new = 2;\r\nbreak;\r\ncase 4:\r\nweek_day=\"Wed\";\r\nwday_new = 3;\r\nbreak;\r\ncase 5:\r\nweek_day=\"Thu\";\r\nwday_new = 4;\r\nbreak;\r\ncase 6:\r\nweek_day=\"Fri\";\r\nwday_new = 5;\r\nbreak;\r\ncase 7:\r\nweek_day=\"Sat\";\r\nwday_new = 6;\r\nbreak;\r\n}\r\n//\r\n//month\r\nswitch(month_now){\r\ncase 1:\r\ncurr_month=\"January\";\r\nbreak;\r\ncase 2:\r\ncurr_month=\"February\";\r\nbreak;\r\ncase 3:\r\ncurr_month=\"March\";\r\nbreak;\r\ncase 4:\r\ncurr_month=\"April\";\r\nbreak;\r\ncase 5:\r\ncurr_month=\"May\";\r\nbreak;\r\ncase 6:\r\ncurr_month=\"June\";\r\nbreak;\r\ncase 7:\r\ncurr_month=\"July\";\r\nbreak;\r\ncase 8:\r\ncurr_month=\"August\";\r\nbreak;\r\ncase 9:\r\ncurr_month=\"September\";\r\nbreak;\r\ncase 10:\r\ncurr_month=\"October\";\r\nbreak;\r\ncase 11:\r\ncurr_month=\"November\";\r\nbreak;\r\ncase 12:\r\ncurr_month=\"December\";\r\nbreak;\r\n}\r\n//\r\nget_wn();\r\n//\r\nmins_gone = parseInt(100*mins_now/60);\r\nhours_gone = parseInt(100*(hours_mil+(mins_gone/100))/24);\r\ndays_gone = parseInt(100*(wday_new-1+(hours_gone/100))/7);\r\nmonth_gone = parseInt(100*(day_now-1+(hours_gone/100))/31);\r\nyear_gone = parseInt(100*day_num/366);\r\n//\r\nstatus_time = \"<b>\" + hur2 + hur1 + \":\" + min2 + min1 + \":\" + sp_1 + sp_0 + \" - \" + am_pm + \"</b><br/>\" + day_now + \" - \" + week_day + \"<br/>\" + \"Week of Year - \" + week_num + \"<br/>\" + curr_month + \" - \" + year_now;\r\ntime_gone = \"<ul><li>\" + mins_gone + \" % Hour Dribbled</li><li>\" + hours_gone + \" % Day Trickled</li><li>\" + days_gone + \" % Week Filled</li><li>\" + month_gone + \" % Month Over</li><li>\" + year_gone + \" % Year Passed</li></ul>\";\r\nmin_show.style.width = parseInt(secs_now*2.5);\r\nhour_show.style.width = mins_gone*1.5;\r\nday_show.style.width = hours_gone*1.5;\r\nweek_show.style.width = days_gone*1.5;\r\nmonth_show.style.width = month_gone*1.5;\r\nyear_show.style.width = year_gone*1.5;\r\nlinktext[0] = secs_now + \" S\";\r\nlinktext[1] = mins_now + \" M\";\r\nlinktext[2] = hours_mil + \" H\";\r\nlinktext[3] = (wday_new-1) + \" WD\";\r\nlinktext[4] = (day_now-1) + \" MD\";\r\nlinktext[5] = (day_nos-1) + \" D\";\r\nshow_text(0,'min_val');\r\nshow_text(1,'hour_val');\r\nshow_text(2,'day_val');\r\nshow_text(3,'week_val');\r\nshow_text(4,'month_val');\r\nshow_text(5,'year_val');\r\n}", "title": "" }, { "docid": "521c25801e710e2e392308d960c8d0dd", "score": "0.6206929", "text": "function clockHandAngles(num)\n{\n var day = 3600 * 12;\n\n var minute = num / 60;\n var hour = minute / 60;\n console.log(day);\n}", "title": "" }, { "docid": "8a3078d8e12de23a4cf51f98fdb11c84", "score": "0.6195603", "text": "function konversiMenit(menit) {\r\n // you can only write your code here!\r\n var jam = menit/60;\r\n var isHours = Math.floor(jam);\r\n //console.log(isHours);\r\n \r\n var minute = menit % 60;\r\n //console.log(minute);\r\n var nol='';\r\n if(minute < 10) {\r\n nol += 0;\r\n }\r\n return isHours+ ':' +nol+ +minute; \r\n}", "title": "" }, { "docid": "8a3078d8e12de23a4cf51f98fdb11c84", "score": "0.6195603", "text": "function konversiMenit(menit) {\r\n // you can only write your code here!\r\n var jam = menit/60;\r\n var isHours = Math.floor(jam);\r\n //console.log(isHours);\r\n \r\n var minute = menit % 60;\r\n //console.log(minute);\r\n var nol='';\r\n if(minute < 10) {\r\n nol += 0;\r\n }\r\n return isHours+ ':' +nol+ +minute; \r\n}", "title": "" }, { "docid": "d88e9a10e64883cc548dba1b4bfd9f7e", "score": "0.61950487", "text": "function setTimeDisplay(time) {\n if (time <= 12) {\n toDoHour = time + \"am\";\n } else {\n toDoHour = (time - 12) + \"pm\";\n }\n}", "title": "" }, { "docid": "658b8548f691dee23af27c90bc838a8d", "score": "0.6192232", "text": "function getTimeHour(time){\n\n return moment(today + ' ' + time, \"dddd, MMMM Do YYYY hh:00 A\").format(\"MM-DD-YYYY hh:00 A\") ;\n\n}", "title": "" }, { "docid": "7bc9bc62f43fa5f12936179d05065728", "score": "0.6185106", "text": "function convertToTime(num) {\n\tvar hours = Math.floor(num);\n\tvar minutes = String(extractMinutes(num));\n\tif (minutes.length == 1) minutes = \"0\" + minutes;\n\nvar label = (hours >= 12) ? \"pm\" : \"am\";\n\tif (hours == 24) {\n\t\thours = 12; \n\t\tlabel=\"am\";\n\t}\n\telse if (hours == 0)\n\t\thours = 12;\n\telse if (hours > 12)\n\t\thours -= 12;\n\n\treturn hours + \":\" + minutes + label;\n}", "title": "" }, { "docid": "5aee132f47b61d2adfd42602874cd9e7", "score": "0.6178142", "text": "function turnHoursToMinutes() {\n\n}", "title": "" }, { "docid": "d4ae8a02e41b13f98b722bfc0c4e0e8e", "score": "0.617679", "text": "function konversiMenit(menit) {\n \n var minute = menit % 60\n var hour = (menit - minute) / 60\n strMinute = '' + minute\n if (strMinute.length === 1){\n return hour+':0'+minute\n }\n else {\n return hour+':'+minute\n }\n}", "title": "" }, { "docid": "7db0081158b28995be9e5917529e9b54", "score": "0.61728877", "text": "E(h, m, type) {\n if (u.isDate(h)) {\n m = h.getMinutes();\n h = h.getHours();\n }\n const hr = (parseInt(h)||0);\n const mn = (parseInt(m)||0);\n const valid = !!(hr || mn);\n return {\n k: (type||'').toLowerCase(),\n h: hr,\n m: mn,\n t: u.m(hr,mn),\n v: valid ? (hr+':'+u.min(mn)) : ''\n };\n }", "title": "" }, { "docid": "dc40444e9cbceff75247dca26d973c3f", "score": "0.6169759", "text": "function displayTime(dateob) {\n var hours = dateob.getHours(); //Current Hours\n var min = dateob.getMinutes(); //Current Minutes\n var base12Hour = hours % 12 !== 0 ? hours % 12 : 12;\n if (min < 10) {\n min = \"0\" + min;\n }\n var meridian = hours < 12 ? \"AM\" : \"PM\";\n return base12Hour + \":\" + min + \" \" + meridian;\n}", "title": "" }, { "docid": "3b47556d0df4848fb54df7915c57040f", "score": "0.6167185", "text": "minutesToTime(m) {\n let seconds = (m + this.starting_second) % (60 * 1440);\n let minutes = Math.floor(seconds / 60) % 60;\n let hour = Math.floor(seconds / 3600);\n let ampm;\n ampm = hour >= 12 ? \"pm\" : \"am\";\n hour = hour > 12 ? hour - 12 : hour;\n\n minutes = minutes >= 60 ? minutes - 60 : minutes;\n minutes = minutes < 10 ? \"0\" + minutes : minutes;\n let second = seconds % 60;\n second = second < 10 ? \"0\" + second : second;\n return hour + \":\" + minutes + \":\" + second + ampm;\n }", "title": "" }, { "docid": "5dbeb7679dc4a5a82a4a184141d455ac", "score": "0.6162878", "text": "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}", "title": "" }, { "docid": "25d3eb188278b37a902d52f306c20164", "score": "0.61519265", "text": "function cronometro () { \n timeActual = new Date();\n acumularTime = timeActual - timeInicial;\n acumularTime2 = new Date();\n acumularTime2.setTime(acumularTime);\n ss = acumularTime2.getSeconds();\n mm = acumularTime2.getMinutes();\n hh = acumularTime2.getHours()-21;\n if (ss < 10) {ss = \"0\"+ss;} \n if (mm < 10) {mm = \"0\"+mm;}\n if (hh < 10) {hh = \"0\"+hh;}\n timer.innerHTML = hh+\" : \"+mm+\" : \"+ss;\n}", "title": "" }, { "docid": "e9728af843f9e8bc1fd62b3ac16ae5c2", "score": "0.6145756", "text": "function Convert24HourTimeToAMPM(time)\n{\n\tvar ampmTime;\n\tvar Hours = time.getHours();\n\tvar minutes = time.getMinutes();\n\tvar ampm = \"AM\";\t\t\n\t\t\n\tif (Hours == 0) \n\t\tHours = 12;\n\telse\n\t{\t\t\t\t\t\n\t\tif (Hours > 11)\n\t\t\tampm = \"PM\";\n\t\t\n\t\tif (Hours > 12)\n\t\t\tHours -= 12;\n\t}\n\t\t\n\tHours = leadingZero(Hours);\n\tminutes = leadingZero(minutes);\n\t\t\n\tampmTime = Hours + \":\" + minutes + \" \" + ampm;\n\t\t\n\treturn ampmTime;\n}", "title": "" }, { "docid": "d78ee3dd99e277e6c1b1a11337c012a6", "score": "0.61393505", "text": "function format_time(hour) {\n if(hour > 23){ \n hour -= 24; \n } \n let amPM = (hour > 11) ? \"pm\" : \"am\"; \n if(hour > 12) { \n hour -= 12; \n } \n if(hour == 0) { \n hour = \"12\"; \n } \n return hour + amPM;\n }", "title": "" }, { "docid": "01fdef2661e0c3bc59b530ba908dfe56", "score": "0.61313576", "text": "getHours() {\n return this.duration() / 3600000 //MS in an Hour\n }", "title": "" }, { "docid": "2315add6d486c8904e773923503cbb9d", "score": "0.6124488", "text": "function hourToString(h) {\n if (h === 0 || h === 24)\n return \"12pm\";\n else if (h < 12)\n return h + \"am\";\n else if (h == 12)\n return \"12am\";\n else\n return (h - 12) + \"pm\";\n }", "title": "" }, { "docid": "917a613e7f66b18762e20db315d53fcd", "score": "0.6121998", "text": "function horas(entrada, saida) {\n total = 0;\n entradasec = 0;\n saidasec = 0;\n entrada = entrada.split(\":\");\n saida = saida.split(\":\");\n for (i = 0; i < entrada.length; i++) {\n if (i == 0) {\n entradasec += (entrada[0] * 3600);\n saidasec += (saida[0] * 3600);\n }\n if (i == 1) {\n entradasec += (entrada[1] * 60);\n saidasec += (saida[1] * 60);\n }\n }\n total = saidasec - entradasec;\n var minutos = total / 60;\n var resto_minutos = (total / 60) % 60;\n var horas = (minutos - resto_minutos) / 60;\n console.log(horas, resto_minutos);\n}", "title": "" }, { "docid": "39a1e493b04cae8f990d672d9026ee15", "score": "0.61169934", "text": "function hours(a) {\nreturn a *60*60;\n}", "title": "" }, { "docid": "e59f0f921f6e7a4505fe2b17eea7f5a4", "score": "0.61018777", "text": "HH (date) {\n return pad(date.getHours())\n }", "title": "" }, { "docid": "a3a63c7dd7d87e2b3a9fa31f94f858ee", "score": "0.6094568", "text": "function konversiMenit(menit) {\n // you can only write your code here!\n var jam = menit/60;\n var isHours = Math.floor(jam);\n //console.log(isHours);\n \n var minute = menit % 60;\n //console.log(minute);\n var nol='';\n if(minute < 10) {\n nol += 0;\n }\n return isHours+ ':' +nol+ +minute; \n}", "title": "" }, { "docid": "a3a63c7dd7d87e2b3a9fa31f94f858ee", "score": "0.6094568", "text": "function konversiMenit(menit) {\n // you can only write your code here!\n var jam = menit/60;\n var isHours = Math.floor(jam);\n //console.log(isHours);\n \n var minute = menit % 60;\n //console.log(minute);\n var nol='';\n if(minute < 10) {\n nol += 0;\n }\n return isHours+ ':' +nol+ +minute; \n}", "title": "" }, { "docid": "fc8a4b61654bf3972e072593c7436a81", "score": "0.6081759", "text": "function main() {\n var time = readLine();\n\n hour = time.substring(0,2);\n mins = time.substring(3,5);\n minimins = time.substring(6,8);\n if ( time.indexOf(\"PM\") > 0) {\n if (hour != 12) {\n hour = (Number(hour) + 12).toString();\n }\n }else {\n if(hour == 12) {\n hour = \"00\";\n }\n }\n console.log(hour + time.substring(2,8));\n return;\n}", "title": "" }, { "docid": "b6de6d73b65062f61e9c8260790fc72f", "score": "0.6075609", "text": "function ActualizarHora(){\n var fecha = new Date();\n var segundos = fecha.getSeconds();\n var minutos = fecha.getMinutes();\n var horas = fecha.getHours();\n\n//Método para obtener hora, minutos y segundos de acuerdo a su id.\n var obtenerHora = document.getElementById(\"pHora\");\n var obtenerMinutos = document.getElementById(\"pMinutos\");\n var obtenerSegundos = document.getElementById(\"pSegundos\");\n\n//Para regresear el varor de hora, minutos y segundos.\n obtenerHora.textContent = horas;\n obtenerMinutos.textContent = minutos;\n obtenerSegundos.textContent = segundos;\n\n}", "title": "" }, { "docid": "a7801ef610ac99f6f97db4b9062a7ef0", "score": "0.60638237", "text": "function clock1() {\r\n let date = new Date();\r\n let hrs = date.getHours();\r\n let mins = date.getMinutes();\r\n let secs = date.getSeconds();\r\n let period = \"AM\";\r\n let time;\r\n \r\n if (hrs == 0) hrs = 12;//12\r\n if (hrs > 12) { //12\r\n hrs = hrs - 12;\r\n period = \"PM\";\r\n }\r\n\r\n hrs = hrs < 10 ? '0' + hrs : hrs;\r\n mins = mins < 10 ? '0'+ mins : mins;\r\n secs = secs < 10 ? '0'+ secs : secs;\r\n time = hrs + ':' + mins + ':' + secs + ' ' + period;\r\n document.getElementById(\"clock\").innerHTML = time;\r\n}", "title": "" }, { "docid": "22a5253219fe67f960db53ca35bea964", "score": "0.6061719", "text": "function convertTime(time) {\n return moment.unix(time).tz('UTC').format('h A');\n}", "title": "" }, { "docid": "05c4f471161b17e9ff624130a12bba7e", "score": "0.60577965", "text": "function format_time(hour){\n if(hour > 23){ \n hour -= 24; \n } \n let amPM = (hour > 11) ? \"pm\" : \"am\"; \n if(hour > 12) { \n hour -= 12; \n } \n if(hour == 0) { \n hour = \"12\"; \n } \n return hour + amPM;\n}", "title": "" }, { "docid": "6f5d5d5c6eaa533e8d719007ce047eb0", "score": "0.6044699", "text": "function horaLive() {\n\t\tvar fecha = new Date();\n\t\t\n\t\tvar hora = fecha.getHours();\n\t\tvar minutos = fecha.getMinutes();\n\t\tvar segundos = fecha.getSeconds();\n\n\t\tTimeOnLive.innerHTML = fecha.toDateString() + \" / \" + hora + \" : \" + minutos + \" : \" + segundos;\n\t}", "title": "" }, { "docid": "27ad9c5d3a2fb2189bcc2a3d6476a4ff", "score": "0.60301876", "text": "function hourOfDay(hh, am)\r\n{\r\n if (hh == 12)\r\n hh = 0;\r\n\r\n return (am == 'AM' ? hh : Number(hh) + 12);\r\n}", "title": "" }, { "docid": "8a312df890c8b3d048e18efc6d9ba161", "score": "0.6028881", "text": "function hourUpdate(){\n var timeReadable = moment().format('MMMM Do YYYY, h:mm:ss a');\n $('#mainHead1').children().last().html(\"<h6>\" + timeReadable + \"</h6>\");\n \n }", "title": "" }, { "docid": "e64d465267163f45ee107739bcec7735", "score": "0.6024812", "text": "formatAMPM(date) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var ampm = hours >= 12 ? 'PM' : 'AM';\n hours = hours % 12;\n hours = hours ? hours : 12; // the hour '0' should be '12'\n minutes = minutes < 10 ? '0' + minutes : minutes;\n var strTime = hours + ':' + minutes + ' ' + ampm;\n return strTime;\n }", "title": "" }, { "docid": "710eebef081ea5ee1f2c5d622c4f6ffa", "score": "0.6021501", "text": "function convertToTime(hours = '00', minutes = '00') {\r\n return Settings.isClock24Hour ?\r\n `${hours}:${minutes}` :\r\n `${+hours % 12 || 12}:${minutes}${+hours >= 12 ? 'PM' : 'AM'}`;\r\n}", "title": "" }, { "docid": "c9c7fde399bd1468add3497142c5834f", "score": "0.6018864", "text": "function formatAMPM(date) {\n\t\t\t\t\t\t\tlet hours = date.getHours();\n\t\t\t\t\t\t\tlet minutes = date.getMinutes();\n\t\t\t\t\t\t\tlet ampm;\n\t\t\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\t\t\tampm = 'pm';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tampm = 'am';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thours = hours % 12;\n\n\t\t\t\t\t\t\tif (hours == 0) {\n\t\t\t\t\t\t\t\thours = 12;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (minutes < 10) {\n\t\t\t\t\t\t\t\tminutes = '0' + minutes;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminutes;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlet strTime = hours + ':' + minutes + ' ' + ampm;\n\t\t\t\t\t\t\treturn strTime;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "cab41d16f7763bd43205d7b8fef32eea", "score": "0.60187316", "text": "function convert(input) {\n return moment(input, 'HH:mm:ss').format('h:mm:ss A');\n }", "title": "" }, { "docid": "e88b8dc88d8e9168f487b4d5f866b19b", "score": "0.6014902", "text": "formatTime(date) {\n let hours = date.getHours();\n let ampm = hours >= 12 ? 'PM' : 'AM';\n hours %= 12;\n hours = hours ? hours : 12; // the hour 0 should be 12\n\n return hours + ampm;\n }", "title": "" }, { "docid": "d9b579ee9646bc5e7e974c4750fc6630", "score": "0.6008276", "text": "function showTime() {\n\n let date = new Date();\n let hours = date.getHours();\n let minutes = date.getMinutes();\n let seconds = date.getSeconds();\n\n //AM/PM format\n let formatHours = convertFormat(hours);\n\n //!2400HR format\n hours = checkTime(hours);\n\n //addZero before single numbers\n hours = addZero(hours);\n minutes = addZero(minutes);\n secondss = addZero(seconds);\n\n document.getElementById('clock').innerHTML = `${hours} : ${minutes} : ${seconds} ${formatHours}`;\n}", "title": "" }, { "docid": "ce851c87fbf8f86ae3c6b9b30a557757", "score": "0.6007991", "text": "function darNumeroHora(hora)\n\t{\n\t\ttemp = hora.split(':');\n\t\treturn temp[0] + (temp[1]/60);\n\t}", "title": "" }, { "docid": "41b4c9a723bb6af664ef6c618266f2bd", "score": "0.6006491", "text": "function getpass_at(e) {\n const minuteRelativeTime = /(\\d+)\\s*分钟前/;\n const hourRelativeTime = /(\\d+)\\s*小时前/;\n const yesterdayRelativeTime = /昨天\\s*(\\d+):(\\d+)/;\n const shortDate = /(\\d+)-(\\d+)\\s*(\\d+):(\\d+)/;\n\n // offset to ADD for transforming China time to UTC\n const chinaToUtcOffset = -8 * 3600 * 1000;\n // offset to ADD for transforming local time to UTC\n const localToUtcOffset = new Date().getTimezoneOffset() * 60 * 1000;\n // offset to ADD for transforming local time to china time\n const localToChinaOffset = localToUtcOffset - chinaToUtcOffset;\n\n let time;\n if (e === '刚刚') {\n time = new Date();\n } else if (minuteRelativeTime.test(e)) {\n const rel = minuteRelativeTime.exec(e);\n time = new Date(Date.now() - parseInt(rel[1]) * 60 * 1000);\n } else if (hourRelativeTime.test(e)) {\n const rel = hourRelativeTime.exec(e);\n time = new Date(Date.now() - parseInt(rel[1]) * 60 * 60 * 1000);\n } else if (yesterdayRelativeTime.test(e)) {\n const rel = yesterdayRelativeTime.exec(e);\n // this time is China time data in local timezone\n time = new Date(Date.now() - 86400 * 1000 + localToChinaOffset);\n time.setHours(parseInt(rel[1]), parseInt(rel[2]), 0, 0);\n // transform back to china timezone\n time = new Date(time.getTime() - localToChinaOffset);\n } else if (shortDate.test(e)) {\n const rel = shortDate.exec(e);\n const now = new Date(Date.now() + localToChinaOffset);\n const year = now.getFullYear();\n // this time is China time data in local timezone\n time = new Date(year, parseInt(rel[1]) - 1, parseInt(rel[2]), parseInt(rel[3]), parseInt(rel[4]));\n // transform back to china timezone\n time = new Date(time.getTime() - localToChinaOffset);\n } else {\n time = new Date(e);\n }\n return time;\n }", "title": "" }, { "docid": "aa4cab4bfe364f7582d2c8d1db906051", "score": "0.6005339", "text": "tConvert(time, format) {\n if (format == 12) {\n let timeArr = time.split(\":\");\n let hours = timeArr[0];\n let _ext = \"AM\";\n if (hours >= 12) {\n hours = timeArr[0] % 12;\n _ext = \"PM\";\n }\n return hours + \":\" + timeArr[1] + \":\" + timeArr[2] + \" \" + _ext;\n } else {\n }\n }", "title": "" }, { "docid": "0e9a873380c6f3008851692ee353425a", "score": "0.6005336", "text": "function dhm(t){\n var cd = 24 * 60 * 60 * 1000,\n ch = 60 * 60 * 1000,\n d = Math.floor(t / cd),\n h = '0' + Math.floor( (t - d * cd) / ch),\n m = '0' + Math.round( (t - d * cd - h * ch) / 60000);\n return [d, h.substr(-2), m.substr(-2)].join(':');\n}", "title": "" }, { "docid": "588d593892d2e3e8bde41f50efd26273", "score": "0.6005058", "text": "function humanHour() {\n var h = hour() % 12;\n if (h == 0) {\n h = 12;\n }\n return h;\n}", "title": "" }, { "docid": "588d593892d2e3e8bde41f50efd26273", "score": "0.6005058", "text": "function humanHour() {\n var h = hour() % 12;\n if (h == 0) {\n h = 12;\n }\n return h;\n}", "title": "" }, { "docid": "01b87aedc4821b783132523c01577328", "score": "0.60041666", "text": "function convertTimeIntoAmPm(time){\n var timeString = time;\n var hourEnd = timeString.indexOf(\":\");\n var H = +timeString.substr(0, hourEnd);\n var h = H % 12 || 12;\n var ampm = H < 12 ? \"AM\" : \"PM\";\n timeString = h + timeString.substr(hourEnd, 3) + ampm;\n return timeString\n\n}", "title": "" }, { "docid": "c958ebef1f340974efdd418757db636e", "score": "0.5993242", "text": "function hours(hour){\n if (hour == 0){\n hour = '12am'\n }\n else if (hour < 12){\n hour = hour + 'am'\n }\n else if (hour == 12){\n hour = '12pm'\n }\n else {\n hour = (hour - 12) + 'pm'\n }\n return hour\n}", "title": "" }, { "docid": "9df96f2071232e67aef9947201d0028f", "score": "0.59899175", "text": "function horloge(){\n\tvar date = new Date();\n\tvar heure = date.getHours();\n\tvar minutes = date.getMinutes();\n\tvar secondes = date.getSeconds();\n\tvar minutes_time = heure*60 + minutes;\n\n\tif (heure < 10) {\n\t\theure = '0' + heure;\n\t}\n\tif (minutes < 10) {\n\t\tminutes = '0' + minutes;\n\t}\n\tif (secondes < 10) {\n\t\tsecondes = '0' + secondes;\n\t}\n\n\tdocument.getElementById(\"time\").innerHTML = heure + ':' + minutes + ':' + secondes;\t\n\tsetTimeout(horloge, 1000);\n\n\treveil_veille(minutes_time);\n\t\n\t}", "title": "" }, { "docid": "e8d9b129b979c706d3d50e4c4d94da0a", "score": "0.5985432", "text": "function conversion() {\n setMinutes(Math.floor(time / 60));\n setSeconds(time % 60);\n donePomodorosFunction();\n }", "title": "" }, { "docid": "f0ce820cf24fe539e94498102174e4de", "score": "0.59854233", "text": "function to12Hrs(hour){\r\n\t\tif(hour === 0) return [12, \"am\"];\r\n\t\telse if(hour == 12) return [12, \"pm\"];\r\n\t\telse if(hour >= 1 && hour < 12) return [hour, \"am\"];\r\n\t\telse return [hour - 12, \"pm\"];\r\n\t}", "title": "" }, { "docid": "43cffadff103c74b132933d15b247462", "score": "0.59845734", "text": "function getGreetingTime (milseconds, tZone) {\n var g = null; \n date = new Date(milseconds);\n var split_afternoon = 12 \n var split_evening = 16 \n var theTime = moment(milseconds);\n var currentHour = theTime.tz(tZone).format('HH');\n if(currentHour >= split_afternoon && currentHour <= split_evening) {\n g = \"afternoon\";\n } else if(currentHour > split_evening) {\n g = \"evening\";\n } else {\n g = \"morning\";\n }\n return g;\n}", "title": "" }, { "docid": "7fb03af07b2772867e0fcf594a099f50", "score": "0.5980713", "text": "function toclock(min){\n\tvar a = (min % 60).toString();\n\tif (a.length == 1) a = \"0\" + a;\n\treturn Math.floor(min/60).toString() + \":\" + a;\n}", "title": "" }, { "docid": "ada7e33fbd8e782096c3e608089576ea", "score": "0.59774023", "text": "function convert24to12hr(time){\n var hrs = parseInt(time.split(':')[0]);\n var suffix = (hrs >= 12) ? \" PM\" : \" AM\";\n hrs = (hrs >= 13) ? hrs-12: hrs;\n return '' + hrs + ':' + time.split(':')[1] + suffix;\n}", "title": "" }, { "docid": "ecf84c2ee6e47add3ef1af4141fa8e6d", "score": "0.5975706", "text": "function horaCliente(){\n var anio= new Date();\n var mes= new Date();\n var dia=new Date();\n var hora=new Date(); \n var minuto= new Date();\n var segundo= new Date();\n mes.getUTCMonth();\n var h=hora.getHours();\n if(h<=9){\n h=\"0\"+h;\n }\n var minutos=minuto.getMinutes();\n if(minutos<=9){\n minutos=\"0\"+minutos;\n }\n var segundos=segundo.getSeconds();\n if(segundos<=9){\n segundos=\"0\"+segundos;\n }\n var ultActividad=anio.getFullYear()+\"-\"+(mes.getMonth()+1)+\"-\"+dia.getDate()+\" \"+h+\":\"+minutos+\":\"+segundos;\n return ultActividad;\n \n}", "title": "" }, { "docid": "fdb98564d5a0a02acd821b32e74a7c9f", "score": "0.5974522", "text": "function returnHour(){\n\tvar date = new Date();\n\tvar hours = date.getHours();\n\tconsole.log(\"It´s around \" + hours + \" of morning\");\n}", "title": "" }, { "docid": "52749a808ca18061913fc8a5891cbed3", "score": "0.5974249", "text": "function MinutosAHHMM(valor) {\n var horas = Math.floor(valor / 60);\n var minutos = Math.floor((valor - (horas * 60)));\n if (horas < 10) { horas = \"0\" + horas; }\n if (minutos < 10) { minutos = \"0\" + minutos; }\n var tiempo = horas + ':' + minutos;\n return tiempo;\n}", "title": "" }, { "docid": "49da7a14f0b3bec3cceec8bf055a7f76", "score": "0.59665614", "text": "function time_conversion( minutes ) {\n\tvar hours = 0\n\t var resultTime = hours + \":\" + minutes\n\n\tif (minutes < 60) {\n\t\thours = \"0\";\n\t\tconsole.log(resultTime);\n\t} else if ( minutes >= 60 ) {\n\t\thours ++;\n\t\tminutes -= 60;\n\t\tconsole.log(resultTime);\n\t}\n\treturn resultTime;\n}", "title": "" }, { "docid": "ecbad2f6e1dea5a5c3800f99fb17d8a3", "score": "0.5964833", "text": "get time() {\n return (process.hrtime()[0] * 1e9 + process.hrtime()[1]) / 1e6;\n }", "title": "" } ]
95d67fd97367ba52cd9287d16c496f66
Send a message to a modified VibHub device (must be connected to the app)
[ { "docid": "ca0fc39eb0ded96804a5fc2e9aee6f73", "score": "0.6515709", "text": "sendCustomMessage( device, data ){\n\t\tthis.socket.emit(\"dCustom\", [device.id, data]);\n\t}", "title": "" } ]
[ { "docid": "691b2c38aff879ced3676386d2fc195f", "score": "0.68739545", "text": "function sendToDevice(id,message) {\n //get in mirrored array a connection with selected key\n if(connections[id]!=null){\n connections[id].sendText(message);\n console.log(message);\n }\n \n}", "title": "" }, { "docid": "d6843a7d330a5dd71e1e56979a50c51b", "score": "0.6841444", "text": "function sendMessageToDevice(message)\n{\n\t alert(message);\n\t \n // customdeviceInstance is the instance related with one device.\n deviceInstance.sendMessage(message);\n return;\n}", "title": "" }, { "docid": "c3e5c04a48e35c6707800eb47c5680f6", "score": "0.681395", "text": "function sendSignalingMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "title": "" }, { "docid": "e6b6f63457f74096d37acf6b15bf5d9e", "score": "0.6735118", "text": "function sendSignalingMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n }", "title": "" }, { "docid": "5c0f6e4382bbd4dde52170846187406a", "score": "0.6464931", "text": "function sendSignal(action,message){\n var jsonStr = JSON.stringify({\n 'peer': username,\n 'action': action,\n 'message': message,\n });\n\n webSocket.send(jsonStr);\n}", "title": "" }, { "docid": "30758fddbf78de37bf695e335442a2a5", "score": "0.6391159", "text": "function sendMessageToServer(message) {\n\tCPManager.emit('changeData', message);\n}", "title": "" }, { "docid": "0ad4993661d4ba7bc5509e6534a05955", "score": "0.63263154", "text": "function sendMessage(a, b) {\n\tPebble.sendAppMessage({0: a, 1: b});\n}", "title": "" }, { "docid": "9780e9f48b71807a85de1e9feca88949", "score": "0.63239944", "text": "sendMessage(message) {\n this.wsClient.send(message);\n }", "title": "" }, { "docid": "50b6a247a1648d39fd44db262edbba59", "score": "0.63159543", "text": "function startVirtualHWDevice(device, id) {\r\n var virtualDev = device.createVirtualDevice(id, myModel);\r\n var count = 0;\r\n var newValues = {\r\n \"message\": \"Welcome To IoT CS for Temprature Sensor\"\r\n };\r\n\r\n // Change the attribute message and trigger an update on the vitual device\r\n var send = function () {\r\n count += 1;\r\n newValues.message = Math.floor(Math.random() * 67).toString();\r\n virtualDev.update(newValues);\r\n if (count > 5) {\r\n virtualDev.close();\r\n clearInterval(timer);\r\n }\r\n };\r\n\r\n timer = setInterval(send, 1000);\r\n}", "title": "" }, { "docid": "42a84015fb4e2ca1aadac48c6866aa56", "score": "0.63112974", "text": "sendMessage(message) {\n this.socket.emit('newMessage', message);\n }", "title": "" }, { "docid": "ba45b59a1b9ad98dfe90b8692be628cb", "score": "0.6297932", "text": "function sendMessage(message) {\n console.log('Client sending message: ', message);\n connection.invoke(\"SendMessage\", myRoomId, message).catch(function (err) {\n return console.error(err.toString());\n });\n}", "title": "" }, { "docid": "6562d7f03113d9cc96229c5a96735645", "score": "0.6296281", "text": "sendMessage(message) {\n this.sendEvent('message', message);\n }", "title": "" }, { "docid": "8c499d4edd7ed5610b4f137d64641cc4", "score": "0.62508976", "text": "function sendMessage(moduleId, command, message, extra) {\n var wsMsg = new WebsocketMessage();\n wsMsg.message = message;\n wsMsg.id = moduleId;\n wsMsg.command = command;\n wsMsg.extra = extra;\n var json = JSON.stringify(wsMsg);\n ws.send(json);\n console.log(json);\n}", "title": "" }, { "docid": "51e45ae9a667aaa9c9495e3adc36a3ed", "score": "0.62430924", "text": "sendCommand(msg){\r\n return this.tcpClient.write(this.config.device_id + \" \" + msg + \"\\r\\n\");\r\n }", "title": "" }, { "docid": "540da13332cd69a54bf2e69397d0236c", "score": "0.6227836", "text": "function sendMessage() {\n\tPebble.sendAppMessage({\"status\": 1}, messageSuccessHandler, messageFailureHandler);\n}", "title": "" }, { "docid": "acd59b510dab77ca7172130cbfdd0ea4", "score": "0.62074536", "text": "sendPWM( device ){\n\t\t\n\t\tlet out = device.index.toString(16).padStart(2,'0');\t\t// Creates and sends a hex string\n\t\tfor( let pwm of device.pwm )\n\t\t\tout += (+pwm).toString(16).padStart(2,'0');\n\t\tthis.socket.emit('p', out);\t// Send the hex to the VibHub device!\n\n\t}", "title": "" }, { "docid": "4c69dc7086099dbc694f1ea030609152", "score": "0.62037235", "text": "function hub_point_message(req, res){\n var message = \"\";\n req.on('data', function (data) {\n message += data;\n });\n req.on('end', function () {\n // Received message from sender\n message = message.toUpperCase();\n console.log(message);\n let options = {\n args: ['send_message', \"act\", message]\n };\n // Run mapping check to see if the incoming message is valid and maps to a destination\n // and check what devices to send to\n ps.PythonShell.run('./dist/MappingInterfaceCtrl.py', options, function(err, resp){\n if(err) throw err;\n // send response to free the client\n res.send(\"Routed to: \" + resp);\n if(resp){\n var routed_msg = resp.toString().split(',');\n\n for(var i = 0; i < routed_msg.length; i++){\n var dest_act = \"\";\n var second_field = routed_msg[i].split('|')[1];\n var host = \"localhost\";\n var path = \"\";\n\n if(second_field != \"BLUETOOTH\" && second_field != \"ZIGBEE\"){\n dest_act = routed_msg[i];\n path = \"/tvControl\";\n host = routed_msg[i].split(\"|\")[0];\n }\n else\n {\n dest_act = routed_msg[i].replace(\"BLUETOOTH|\", \"\");\n dest_act = dest_act.replace(\"ZIGBEE|\", \"\");\n\n path = (second_field === \"BLUETOOTH\") ? \"/btSongAction\" : \"/zigbeeAction\";\n }\n // host is the destination of the message and port number is set to our default\n // If we are to send to a third party manufacturer we will have pre-defined settings\n // and will set them here\n var post_options = {\n host: host, //dest_ip\n port: portNum,\n path: path,\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Content-Length': dest_act.length\n }\n };\n // Set up the request\n var post_req = http.request(post_options, function(res) {\n res.setEncoding('utf8');\n res.on('data', function (chunk) {\n console.log('Response: ' + chunk);\n });\n });\n // post the data\n post_req.write(dest_act);\n post_req.end();\n }\n }\n })\n });\n}", "title": "" }, { "docid": "a211adb4b99f32d3e17688c4659c05e2", "score": "0.6192531", "text": "sendMessage(user, message) {\n \n connection.invoke(\"SendMessage\", user, message)\n .catch(err => console.error(err.toString()));\n }", "title": "" }, { "docid": "94b8989c1a4ead6f3ed4f773ea2610b6", "score": "0.61813664", "text": "function sendVal(data) {\n \n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n console.log('SENDING FROM COMPANION TO PHONE');\n console.log(JSON.stringify(data));\n messaging.peerSocket.send(data);\n } else {\n console.log('CANNOT SEND TO WATCH' );\n console.log(messaging.peerSocket.readyState);\n }\n \n}", "title": "" }, { "docid": "c64654f08018f62b6ce6d8bed89c8b09", "score": "0.6165151", "text": "function sendMessage() {\n json.activeSince = moment();\n\n const payload = JSON.stringify(json);\n message = new Buffer(payload);\n\n console.log(SOUNDS[json.instrument] + ' message : ' + message);\n\n udpSocket.send(message, 0, message.length, protocol.PORT, protocol.MULTICAST_ADDRESS, function (err, bytes) {\n if (err) throw err;\n });\n}", "title": "" }, { "docid": "32422abd8e58b58fe01a3eb2752b582d", "score": "0.61567336", "text": "function sendAndroid(target_device, plaintext) {\n let message = {notification : {title: \"Balance Updated\", body : plaintext}, token: target_device};\n \n admin.messaging().send(message)\n .then((response) => {\n console.log('Successfully sent message:', response);\n })\n .catch((error) => {\n console.log('Error sending message:', error);\n });\n}", "title": "" }, { "docid": "70ac49114ceac6b70bb3018b5d93977f", "score": "0.6147121", "text": "function sendMessage(message) {\n port.postMessage(message);\n}", "title": "" }, { "docid": "390edc68ede4958d08ca9759cd377a05", "score": "0.61449444", "text": "function sendMessage() {\n\tPebble.sendAppMessage({\"status\": 0}, messageSuccessHandler, messageFailureHandler);\n}", "title": "" }, { "docid": "6bde95d18084e5d738ad810f953d2b7f", "score": "0.61407274", "text": "_onConnect() {\n this._ble.startNotifications(BoostBLE.service, BoostBLE.characteristic, this._onMessage);\n\n this._pingDeviceId = window.setInterval(this._pingDevice, BoostPingInterval); // Send a request for firmware version.\n\n setTimeout(() => {\n const command = [0x00, // Hub ID\n BoostMessage.HUB_PROPERTIES, BoostHubProperty.FW_VERSION, BoostHubPropertyOperation.REQUEST_UPDATE];\n command.unshift(command.length + 1);\n this.send(BoostBLE.characteristic, command, false);\n }, 500);\n }", "title": "" }, { "docid": "8bfb87fcf5fcf37a3f728e3d688cce29", "score": "0.61210227", "text": "send(message) {\n this.conn.send(JSON.stringify(\n new Message(message))\n );\n }", "title": "" }, { "docid": "ebbc4ff97c45d55142b3927f233f4063", "score": "0.61172676", "text": "sendMessage(myMessage){\n this.socket.emit('message', myMessage);\n }", "title": "" }, { "docid": "3aa9ca73514b45f11de917f6bbf0b5e5", "score": "0.6114859", "text": "function send(d) {\n\n if(MODE == MODES.TEST) {\n ws.send(d);\n } else if(MODE == MODES.BLUETOOTH) {\n\n var data = new Uint8Array(1);\n data[0] = d;\n\n ble.write(id, serviceId, serviceName, data.buffer, function() {\n console.log(\"ble -> sendSucess\");\n }, function(err) {\n console.log(\"ble -> sendFailure : \" + JSON.stringify(err));\n });\n\n }\n\n}", "title": "" }, { "docid": "7ee15de681c18ad1d97363617c466432", "score": "0.6083403", "text": "function send_version() {\n console.log(\"Sending version\");\n var msg = new Message({\n \"type\": Message.MessageType.CLIENT_VERSION,\n \"client_version\": {\n \"major\": 1,\n \"minor\": 2,\n }\n });\n send_message(msg);\n set_channel_state(CHANNEL_STATES.SENT_VERSION);\n}", "title": "" }, { "docid": "e39298dc2550c273266743b40a6dfc94", "score": "0.6082853", "text": "function send (token, deviceId, payload, cb) {\n\trequest.post({\n\t\turl,\n\t\tbody: Buffer.concat([new Buffer(deviceId, 'hex'), payload]),\n\t\theaders: {\n\t\t\t'Content-Type': 'application/octet-stream',\n\t\t\t'Authorization': 'Token ' + token,\n\t\t},\n\t}, function (err, httpResponse, body) {\n\t\tif (err) return cb(err)\n\n\t\tif (httpResponse.statusCode !== 200) {\n\t\t\treturn cb('Error in ConCaVa (' + httpResponse.statusMessage + '): ' + body)\n\t\t}\n\n\t\tcb()\n\t})\n}", "title": "" }, { "docid": "9e1593f7beb7ad3ea36b666bdd06c471", "score": "0.6076941", "text": "function sendMessage(message) {\r\n drone.publish({\r\n room: roomName,\r\n message\r\n });\r\n }", "title": "" }, { "docid": "0e9d3a5c619bd0b81a8f781c295302d4", "score": "0.605913", "text": "userMessage(message) {\n this.WSconn.send(JSON.stringify(message));\n console.log(\"message from user\",message);\n }", "title": "" }, { "docid": "66d3b93c19bec19fa9f019cf5c6110be", "score": "0.6054653", "text": "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "title": "" }, { "docid": "84e2ba5c8fa60acddb4ec51d33b5d441", "score": "0.6022033", "text": "function sendSignal(signal) {\r\n // HTTP POST request to the cloud\r\n request.post({\r\n url: backendUrl + '/api/1.0/signals',\r\n headers: headers,\r\n body: signal,\r\n json: true\r\n }, (err) => {\r\n if (err && err.code === 'ECONNREFUSED') {\r\n console.error(`Error: failed to connect to ${backendUrl}, make sure the Das Keyboard Q software`\r\n + ' is running');\r\n }\r\n });\r\n}", "title": "" }, { "docid": "45cc7ee94430983dd68240159c605b0e", "score": "0.60134554", "text": "function sendMessage(message) {\n $rootScope.$broadcast('message', {\n input: message\n });\n }", "title": "" }, { "docid": "a5ee173f7d34dc06833cb2593f851c99", "score": "0.60087126", "text": "function doSend(message) {\n websocket.send(message);\n}", "title": "" }, { "docid": "3b11f7b0886bc234ec4057f10fc3d8a6", "score": "0.6000487", "text": "function sendMessage(e) {\n\tTi.WatchSession.sendMessage(createSamplePayload());\n}", "title": "" }, { "docid": "7a30c42aa4e9287c1d4a6c889bced114", "score": "0.5988564", "text": "function sendMessage(message) {\n socket.send(message);\n }", "title": "" }, { "docid": "7a30c42aa4e9287c1d4a6c889bced114", "score": "0.5988564", "text": "function sendMessage(message) {\n socket.send(message);\n }", "title": "" }, { "docid": "28217888643bb1d933c1ffcdd6f58e01", "score": "0.59861577", "text": "function doSend(message) {\n console.log(\"Sending: \" + message);\n websocket.send(message);\n}", "title": "" }, { "docid": "28217888643bb1d933c1ffcdd6f58e01", "score": "0.59861577", "text": "function doSend(message) {\n console.log(\"Sending: \" + message);\n websocket.send(message);\n}", "title": "" }, { "docid": "17846a890e4d197c7decf42c45580263", "score": "0.59715444", "text": "function sendMessage(message) {\n\tsocket.emit(\"newMessage\", { message: message });\n\tconsole.log(`You: ${message}`);\n}", "title": "" }, { "docid": "03c931046be539d4d3b838a3997f997c", "score": "0.5967884", "text": "function sendToEmbravaConnect(message) {\n\t\twriteToLog(\"sendToEmbravaConnect entry\");\n\t\tvar jsonMessage;\n\t\tjsonMessage = JSON.stringify({ Message: message });\n\t\tjsonMessage = encodeURIComponent(jsonMessage);\n\t\twriteToLog(\"jsonMessage: \" + jsonMessage);\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: embravaConnectURL,\n\t\t\tdata: jsonMessage,\n\t\t\tcontentType: \"application/json; charset=utf-8\",\n\t\t\tdataType: \"jsonp\"\n\t\t});\n\t\twriteToLog(\"sendToEmbravaConnect exit\");\n\t}", "title": "" }, { "docid": "829f264b65f52227c127e477ebab284a", "score": "0.5955852", "text": "sendMessage(message) {\n if(this.isConnected){\n this.socket.write(`${JSON.stringify(message)}`);\n }\n }", "title": "" }, { "docid": "6dd6ac90b38772628ee19831a76e5c2c", "score": "0.5952976", "text": "function sendMessage() {\n\n }", "title": "" }, { "docid": "2dde4ab0ba399307d4c3b800332d3fb9", "score": "0.5948726", "text": "function msgToRho(msgText) {\r\n var val = document.getElementById(\"msg-send\").value;\r\n if (msgText != \"\") {\r\n val = msgText;\r\n }\r\n var buf = arrayBufferFromString(val);\r\n\r\n if (rhoConnected) {\r\n networking.bluetooth.send(rhoSocketId, buf, function (bytes_sent) {\r\n console.log('Sent ' + bytes_sent + ' bytes ' + val + ' rhoSocket: ' + rhoSocketId);\r\n }, function (errorMessage) {\r\n console.log('Send failed: ' + errorMessage + ' msg: ' + val + ' rhoSocket: ' + rhoSocketId);\r\n popupBox(\"sendToRho Error \" + rhoSocketId, errorMessage, \"id\", \"OK\", \"\", \"\");\r\n });\r\n } else {\r\n console.log(\"RHO not connected, message not sent\");\r\n popupBox(\"SendToRho Error \" + rhoSocketId, \"not connected\", \"id\", \"OK\", \"\", \"\");\r\n }\r\n}", "title": "" }, { "docid": "7b8a4cccc21fee54395e352828c10d6e", "score": "0.5948602", "text": "sendTo(clientId, message) {\n this.conn.send(JSON.stringify(\n new MessageTo(clientId, message))\n );\n }", "title": "" }, { "docid": "b9e727b2457f0d91583b2aa3afaac4c5", "score": "0.5945845", "text": "function sendCommand(\n deviceId,\n registryId,\n projectId,\n cloudRegion,\n commandMessage\n ) {\n // [START iot_send_command]\n const parentName = `projects/${projectId}/locations/${cloudRegion}`;\n const registryName = `${parentName}/registries/${registryId}`;\n\n const binaryData = Buffer.from(commandMessage).toString('base64');\n\n // NOTE: The device must be subscribed to the wildcard subfolder\n // or you should pass a subfolder\n const request = {\n name: `${registryName}/devices/${deviceId}`,\n binaryData: binaryData,\n //subfolder: <your-subfolder>\n };\n\n state.client.projects.locations.registries.devices.sendCommandToDevice(\n request,\n (err, data) => {\n if (err) {\n node.error('Could not send command: ' + JSON.stringify(request));\n node.error('Error: ' + err);\n }\n }\n );\n // [END iot_send_command]\n }", "title": "" }, { "docid": "53c47c3b78a148c234c5b134d24b8cd2", "score": "0.59134406", "text": "send(message) {\n\t\t// まだ接続が確立されていなかったらバッファリングして次に接続した時に送信する\n\t\tif (this.state != 'connected') {\n\t\t\tthis.buffer.push(message);\n\t\t\treturn;\n\t\t};\n\n\t\tthis.socket.send(JSON.stringify(message));\n\t}", "title": "" }, { "docid": "1dd0c285b2a621f2832bfc18c649bdb3", "score": "0.59092385", "text": "function sendMessage() {}", "title": "" }, { "docid": "ce409c2bc1a36b6f21d347bd545854f0", "score": "0.59009016", "text": "send(message) {\n this.bot.send(this.request, message);\n }", "title": "" }, { "docid": "4fce8b03c90053b049a440d3467d0950", "score": "0.5881113", "text": "send(event, payload) {\n this.connection.send(\n JSON.stringify({\n event,\n payload\n })\n );\n }", "title": "" }, { "docid": "bbabb0b33ad9de97d2c582938109a1c8", "score": "0.588086", "text": "function send(message) {\n dispatcher.trigger('new_message', message);\n}", "title": "" }, { "docid": "b14a7c1f3e0ae730840ff02ef7f00262", "score": "0.5880382", "text": "sendProgram( device, program ){\n\t\t\n\t\tif( typeof program !== \"object\" || typeof program.export !== \"function\" )\n\t\t\tthrow \"Program is invalid\";\n\n\t\tthis.socket.emit('GET', {\n\t\t\tid : device.id,\n\t\t\ttype : \"vib\",\n\t\t\tdata : [program.export()]\n\t\t});\n\n\t}", "title": "" }, { "docid": "349905d348231bdfd790378e2f9e6e5b", "score": "0.58784294", "text": "_sendMessage(message) {\n // send once connected\n const send = () => {\n setTimeout(() => {\n if (this.wsconnected) {\n this.ws.send(message);\n }\n else {\n this.once('status', send);\n }\n }, 0);\n };\n send();\n }", "title": "" }, { "docid": "f3a40eb0f490bdff1291e1d261cf3d44", "score": "0.5874902", "text": "function sendMessage(to, msg){\n driver.createDriver({rport: 4568, broadcast_port:4568}, (err, driverInstance)=>{\n tcpDriver2 = driverInstance;\n tcpDriver2.listen(()=>{}, () => {\n if(err) done(err);\n tcpDriver2.send(to, msg, (err)=>{\n if(err) done(err);\n });\n });\n });\n }", "title": "" }, { "docid": "c6d434f26ace74bbeab31a21fe1d4eac", "score": "0.58746934", "text": "function sendNativeMessage(message) {\n if (null == port) {\n connect();\n }\n \n port.postMessage(message);\n //console.log('Sent message: ' + JSON.stringify(message));\n}", "title": "" }, { "docid": "8b067a56a8c171b374f83f4dc104c466", "score": "0.58743846", "text": "function sendMessageToServer(message) {\n socket.send(message);\n }", "title": "" }, { "docid": "8b067a56a8c171b374f83f4dc104c466", "score": "0.58743846", "text": "function sendMessageToServer(message) {\n socket.send(message);\n }", "title": "" }, { "docid": "51a8ec998a4db5d56ad71ce3546a51d5", "score": "0.5872067", "text": "send(req, res) {\n const hwid = req.body.hwid;\n const command = req.body.command;\n\n if(!hwid || !command) {\n return res.fail('hwid and command are required');\n }\n // MY Pi hwid: 0000000035579a3d //for testing :)\n const socket = SocketStore.get(hwid);\n if(socket != null) {\n console.log('socket is not null');\n socket.emit('message', command)\n }\n\n res.success('Message Sent');\n }", "title": "" }, { "docid": "5cfa24c196090044f154640824c25b1b", "score": "0.5870877", "text": "function send_message(focusedWindow, message) {\n focusedWindow.webContents.send('message', message);\n}", "title": "" }, { "docid": "3d07e53ea0a027099524d9135f0776f3", "score": "0.58684886", "text": "function sendMessageToServer(message) {\n\t\t\tif(socket){\n socket.emit('my_event', { my: message });\n\t\t\t\t //socket.send(message);\n\t\t\t\tlog('<span style=\"color:#888\">Sending ' + message + ' to the server!</span>');\n }//socket.flushBuffer;\n\t\t}", "title": "" }, { "docid": "ca920bbc46a2228de1d0578f5ad69b82", "score": "0.5859585", "text": "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n }\n}", "title": "" }, { "docid": "ca920bbc46a2228de1d0578f5ad69b82", "score": "0.5859585", "text": "function sendVal(data) {\n if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {\n messaging.peerSocket.send(data);\n }\n}", "title": "" }, { "docid": "d88c14c4ec3e5ab3cab5e77cb1e52ce3", "score": "0.5852574", "text": "function sendPushMsgToOnedevice(){\n var post={\n to: $('#ExpoToken').val(),\n title: $('#title').val(),\n body: $('#pushMsg').val(),\n };\n\n $.ajax({\n type: 'POST',\n url: 'https://exp.host/--/api/v2/push/send',\n data: post\n });\n }", "title": "" }, { "docid": "f549c79eef954dd07e010e5b75774c9e", "score": "0.5847676", "text": "function sendMessage(message) {\n console.log('Client sending message: ', message);\n ioSocket.socket.emit('message', message);\n }", "title": "" }, { "docid": "6011e28b86805ab420f702388cb8be5f", "score": "0.5845594", "text": "function sendMessage(message){\n\tconsole.log('Sending message: ', message);\n\tsocket.emit('message', message);\n}", "title": "" }, { "docid": "4f4096b08d43620295771c70d92b9772", "score": "0.58426", "text": "function doSend(message) {\n writeToScreen(\"SENT: \" + message);\n websocket.send(message);\n}", "title": "" }, { "docid": "133e861eec505a92d1a2188492184499", "score": "0.58390266", "text": "function RemoteCodeSend(element, index, array){\n console.log('command['+ index + ']=' + element);\n sys_command_exec('irsend SEND_ONCE TATA_SKY' + element);\n}", "title": "" }, { "docid": "288d6624c93b31980948a768b977f26f", "score": "0.5814566", "text": "function sendMessage(name, data) {\n\t// Nachricht an TV Sketch schicken\n\tdata.category = name;\n\tconsole.log(data);\n\tsocket.emit('command', data);\n}", "title": "" }, { "docid": "d4cba363b256737d75edd8bf16948a69", "score": "0.58070904", "text": "function sendSignalToDevModeMaster(signal) {\n if (!IS_DEV_MODE)\n return;\n process.send({ type: signal, data: {} });\n}", "title": "" }, { "docid": "cf516e71d28f2f646a22520833720a69", "score": "0.58021647", "text": "send(payload) {\n\t\tthis.write('message', payload);\n\t}", "title": "" }, { "docid": "26050a36b0f958b3dcecc066c9922a28", "score": "0.5792366", "text": "function send(message) {\r\n conn.send(JSON.stringify(message));\r\n}", "title": "" }, { "docid": "23be855968dfe6b9e393cd183ce9cff8", "score": "0.5791138", "text": "function sendMessage(message) {\n //console.log('Client sending message: ', message);\n //var message = \"HIIIIIIIIIIIIIII\";\n socket.emit('message', message);\n}", "title": "" }, { "docid": "a05c879ea63e64c826b101f41d9ab6ff", "score": "0.5779966", "text": "sendTest() {\n this.socket.emit('test');\n }", "title": "" }, { "docid": "f8e0c033df9c3f450a1850115f97f8ea", "score": "0.5778615", "text": "function broadcast(message){\n wss.clients.forEach(function(client){\n client.send(JSON.stringify({\n message: message\n }))\n })\n}", "title": "" }, { "docid": "ba58737f2ca51f02ccf867f12ae48ab4", "score": "0.577836", "text": "function send_command( command )\n{\n kaazing.publish( TETRIS_TOPIC + '_' + user, JSON.stringify( command ) );\n}", "title": "" }, { "docid": "f4bf6a700629807081ef39f951c471f8", "score": "0.5778308", "text": "function sendReciever(message) {\n return new Promise(function (resolve, reject) {\n command = JSON.parse(message.Body);\n console.log(command);\n\n if (command.action === \"power\") {\n if (command.value === \"Standby\") {\n tvOff();\n }\n }\n\n request.post(\n {url: recieverIP+recieverAPI,\n body : mustache.render(commands[command.action], command),\n headers: {'Content-Type': 'text/xml'}\n },\n function (err, response, data) { \n if (err) reject(err);\n else resolve(data);\n }\n );\n });\n}", "title": "" }, { "docid": "3823cfd5789360e9b87e807735607e4b", "score": "0.5776703", "text": "function sendMsg(message){\n\tsocket.emit('message', { 'message' : message})\n}", "title": "" }, { "docid": "29ed636f8afdc60c0c45d0055ea5baa5", "score": "0.57751375", "text": "onBridgeMessage(message) {\n const { webviewbridge } = this.refs;\n\n switch (message) {\n case \"hello from webview\":\n console.log(\"Received message from Web Server\");\n break;\n case \"change success\":\n console.log(\"Change value input successfull\");\n break;\n }\n }", "title": "" }, { "docid": "17610fd69ca69dd3862255d20d815650", "score": "0.5770459", "text": "function sendSignalToNearbyTraffic(valueOfLane, weight) {\n laneToAlert = valueOfLane;\n let nearbyTrafficId = trafficSystem['nearby_signal_id_' + laneToAlert];\n nodeWebSocketConnection.send(JSON.stringify({\n \"id\": trafficId, \"type\": \"traffic_alert\", \"nearbyTrafficId\": nearbyTrafficId, \"weight\": weight\n }));\n}", "title": "" }, { "docid": "e9d18c7a14ed62ea94105b709bd67a3b", "score": "0.576597", "text": "function sendMessage(message) {\n if (message !== \"\") {\n webSocket.send(message);\n id(\"message\").value = \"\";\n }\n }", "title": "" }, { "docid": "47d1614472b6d844ee7dd402040d113f", "score": "0.57639784", "text": "function send() {\n // Create a new message object\n var message = {\n text: vm.body\n };\n\n var Message = MessageService.message();\n var item = new Message({\n body: vm.body,\n channelId: vm.channel\n });\n\n item.$save(function (response) {\n // Emit a 'chatMessage' message event\n Socket.emit('message', {channel: vm.channel, item: item});\n // Clear the message text\n vm.body = '';\n }, function (errorResponse) {\n console.log(errorResponse);\n vm.error = errorResponse.data.message;\n });\n }", "title": "" }, { "docid": "8d6140b1c2977169b8b6850e6fec1ae3", "score": "0.57636607", "text": "send (object) {\n this.emit('send', object)\n }", "title": "" }, { "docid": "109e62ce7dc73d70d4ca81e6288096c2", "score": "0.57531893", "text": "static notify(message) {\n chrome.runtime.sendMessage(message);\n }", "title": "" }, { "docid": "819d6c6a421afeb24b04ff7532950d56", "score": "0.5751609", "text": "function sendMsgFrontend(message, callback) {\n callback = (typeof callback == \"function\") ? callback : voxbone.noop;\n if (!frontend) {\n callback({response: \"error\", payload: {reason: \"Invalid socket/wrapper\"}});\n return;\n }\n if (!message[\"id\"])\n message[\"id\"] = randomString(16);\n voxbone.Logger.loginfo('Sending message to Frontend:');\n voxbone.Logger.loginfo(JSON.stringify(message));\n // Subscribe to the response and send to the Frontend\n var transaction = message[\"id\"];\n frontend.on(transaction, function (response) {\n voxbone.Logger.loginfo(\"Received response from Frontend:\");\n voxbone.Logger.loginfo(JSON.stringify(response));\n frontend.removeListener(transaction, arguments.callee);\n if (callback) {\n callback(response);\n }\n });\n frontend.emit('message', message);\n }", "title": "" }, { "docid": "c62fbb9a54d39dc9d76e8c2d8d8569e9", "score": "0.5750723", "text": "emit(eventName,data){\n const message = JSON.stringify({eventName,data});\n this.ws.send(message);\n }", "title": "" }, { "docid": "102e18e24a65ca376ddbbc4bfadac4a0", "score": "0.57439137", "text": "function send(message) {\n if (connectedUser) {\n message.name = connectedUser;\n }\n connection.send(JSON.stringify(message));\n}", "title": "" }, { "docid": "6fcf57f4ef61baa5a361bf64dfdd2963", "score": "0.5738745", "text": "async broadcast(message) {\n let response = await this.identity.postJSON(config.apiRoot + uri`/rooms/${this.roomID}/send`, message)\n if (response.error) throw new Error(response.error)\n else if (response.ok) return true\n }", "title": "" }, { "docid": "7939f05143656b146e4c4413605bb5b5", "score": "0.5738288", "text": "function sendMessage() {\n dataChannel.send(input.value);\n\n input.value = \"\";\n}", "title": "" }, { "docid": "e070e22d942d6ccc871b5c3071024ee1", "score": "0.57288307", "text": "function sendMessage() {\n\tPebble.sendAppMessage({\"status\": 0});\n\t\n\t// PRO TIP: If you are sending more than one message, or a complex set of messages, \n\t// it is important that you setup an ackHandler and a nackHandler and call \n\t// Pebble.sendAppMessage({ /* Message here */ }, ackHandler, nackHandler), which \n\t// will designate the ackHandler and nackHandler that will be called upon the Pebble \n\t// ack-ing or nack-ing the message you just sent. The specified nackHandler will \n\t// also be called if your message send attempt times out.\n}", "title": "" }, { "docid": "43e2727514dc8245d3309de1046695f1", "score": "0.5728353", "text": "send(message) {\n window.webkit.messageHandlers.webMidiBrowser.postMessage({\n type: 'midioutput',\n portID: this.id,\n data: Array.from(message),\n }) \n }", "title": "" }, { "docid": "35896ad0881a3cd2c5c362a448d97495", "score": "0.57252276", "text": "_message_message(message) {\n console.log('message', message)\n if (message.to) this.emit('dm', message)\n else this.emit('broadcast', message)\n if (message.type == 'text') this.emit('text', message)\n else if (message.type == 'emote') this.emit('emote', message)\n else if (message.type == 'signal') this.emit('signal', message)\n }", "title": "" }, { "docid": "87fe65aa0d7b942c3b46d54830dc5eb6", "score": "0.5724238", "text": "function sendMessage(msg) {\n\n if (__TCPostPort > 0) {\n\n let ajax = new XMLHttpRequest();\n // Seta tipo de requisição: Post e a URL da API\n ajax.open(\"POST\", \"http://localhost:\"+__TCPostPort+\"/tinkermon\", true);\n ajax.setRequestHeader(\"Content-type\", \"text/plain\");\n // Seta paramêtros da requisição e envia a requisição\n ajax.send(msg);\n\n chrome.runtime.sendMessage({\n origin: 'tinkermonitor',\n payload: msg\n }, function (response) { });\n }\n}", "title": "" }, { "docid": "85811885bcdb927035300a2cf9729da3", "score": "0.57145685", "text": "send_global(message) {\n this.host.send(message)\n this.players.forEach(player => {\n player.send(message)\n })\n }", "title": "" }, { "docid": "93eba70d8b19caa9033944d6891df92d", "score": "0.5713522", "text": "function sendMessage(payload){\n socket.send(JSON.stringify(payload));\n}", "title": "" }, { "docid": "86c7a2001fce992066bf1eb1d7b73662", "score": "0.5713084", "text": "function send_vb(vbs)\n{\n\tpostMessage({ type: EV_VB_UPDATE, 'vbs':vbs });\n}", "title": "" }, { "docid": "48d9d26c236a8abf7f13f47039e66c52", "score": "0.5712019", "text": "_send(message) {\n const data = serde.stringify(message);\n this.transport.send(data);\n\n if (process.env.NODE_ENV !== 'production') {\n this.emit('outgoingMessage', message);\n }\n }", "title": "" }, { "docid": "f7e6716ab099178f299838f5f3c57041", "score": "0.5710448", "text": "send(event, data) {\n assert(event);\n debug(`broadcasting \"${event}\"`);\n const message = this.createMessage(data);\n this.publish(event, message);\n }", "title": "" }, { "docid": "82684671f32a2357a5c0d2b306fdb098", "score": "0.57094014", "text": "function sendMessage(weather, temp) {\n var weatherString = \"It is \" + weather.toLowerCase() + \" in Austin, about \" + Math.floor(temp) + \" degrees.\";\n Pebble.sendAppMessage({\"message\": weatherString}, messageSuccessHandler, messageFailureHandler);\n}", "title": "" }, { "docid": "21985b67b50fde6b5df106c547a68108", "score": "0.5696093", "text": "send(data) {\r\n const msg = JSON.stringify(data);\r\n this.conn.send(msg);\r\n }", "title": "" } ]
1bc9cf2d9c0ffdcd6516bea6977f8f02
end class WhileUntilExpression DoLoop `DoLoop: do [preWhileUntilExpression] [":"] Body loop` `DoLoop: do [":"] Body loop [postWhileUntilExpression]` doloop can have a optional precondition or a optional postcondition Case 1) doloop without any condition a doloop without any condition is an infinite loop (usually with a `break` statement inside) Example: var x=1 do: x++ print x when x is 10, break loop Case 2) doloop with precondition A doloop with precondition, is the same as a while|until loop Example: var x=1 do while x<10 x++ print x loop Case 3) doloop with postcondition A doloop with postcondition, execute the block, at least once, and after each iteration, checks the postcondition, and loops `while` the expression is true or `until` the expression is true Example: var x=1 do x++ print x loop while x < 10 Implementation public class DoLoop extends ASTBase constructor
[ { "docid": "d1f9cec3218ef384325dc37c9f44b633", "score": "0.5585636", "text": "function DoLoop(){\n // default constructor: call super.constructor\n return ASTBase.prototype.constructor.apply(this,arguments)\n }", "title": "" } ]
[ { "docid": "b08dd8832c18800678498c1c3968360d", "score": "0.7882638", "text": "function parseDoWhileStatement(node) {\n\t var body, test, oldInIteration;\n\n\t expectKeyword('do');\n\n\t oldInIteration = state.inIteration;\n\t state.inIteration = true;\n\n\t body = parseStatement();\n\n\t state.inIteration = oldInIteration;\n\n\t expectKeyword('while');\n\n\t expect('(');\n\n\t test = parseExpression();\n\n\t expect(')');\n\n\t if (match(';')) {\n\t lex();\n\t }\n\n\t return node.finishDoWhileStatement(body, test);\n\t }", "title": "" }, { "docid": "7e9eed934f8b0913790009f3b7eba36e", "score": "0.7871827", "text": "function DoWhileStatement(node, print) {\n this.push(\"do \");\n print.plain(node.body);\n this.space();\n this.keyword(\"while\");\n this.push(\"(\");\n print.plain(node.test);\n this.push(\");\");\n}", "title": "" }, { "docid": "58bbdbe20b23a1a08ff4df1a7b5166c2", "score": "0.77845466", "text": "function parseDoWhileStatement(node) {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return node.finishDoWhileStatement(body, test);\n }", "title": "" }, { "docid": "58bbdbe20b23a1a08ff4df1a7b5166c2", "score": "0.77845466", "text": "function parseDoWhileStatement(node) {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return node.finishDoWhileStatement(body, test);\n }", "title": "" }, { "docid": "58bbdbe20b23a1a08ff4df1a7b5166c2", "score": "0.77845466", "text": "function parseDoWhileStatement(node) {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return node.finishDoWhileStatement(body, test);\n }", "title": "" }, { "docid": "58bbdbe20b23a1a08ff4df1a7b5166c2", "score": "0.77845466", "text": "function parseDoWhileStatement(node) {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return node.finishDoWhileStatement(body, test);\n }", "title": "" }, { "docid": "58bbdbe20b23a1a08ff4df1a7b5166c2", "score": "0.77845466", "text": "function parseDoWhileStatement(node) {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return node.finishDoWhileStatement(body, test);\n }", "title": "" }, { "docid": "da2e26628f79062c7e0f60531d52ceb6", "score": "0.68928874", "text": "function WhileUntilLoop(){\n // default constructor: call super.constructor\n return DoLoop.prototype.constructor.apply(this,arguments)\n }", "title": "" }, { "docid": "f62d9dbb4e53dd6de53f49234139029c", "score": "0.6748387", "text": "enterDoWhileStatement(ctx) {\n\t}", "title": "" }, { "docid": "00c2d5b9e4f3c900650b4c3b833693f3", "score": "0.67405343", "text": "function WhileExpression(condition, body) {\n this.condition = condition;\n this.body = body;\n}", "title": "" }, { "docid": "5b9b041e819e31fee33de6a4d2586b20", "score": "0.6716094", "text": "parseCmdWhile() {\n const expected = 'while'\n\n /* CmdWhile -> while ( Expressao ) : ListaCmd end ; */\n if (this.match(TOKEN.KW_WHILE)) {\n if (!this.match(TOKEN.OPN_RND_BRACKET))\n this.printError('(')\n\n const treeNodeExpressao = this.parseExpressao()\n\n if (!this.match(TOKEN.CLS_RND_BRACKET))\n this.printError(')')\n\n if (treeNodeExpressao.getType() !== TYPE.bool)\n this.throwSemanticError('Condition must result in a bool value')\n\n if (!this.match(TOKEN.COLON))\n this.printError(':')\n\n this.parseListaCmd()\n\n if (!this.match(TOKEN.KW_END))\n this.printError('end')\n\n if (!this.match(TOKEN.SEMI_COLON))\n this.printError(';')\n }\n\n else {\n /* Synch: CmdWhile */\n /* FOLLOW(CmdWhile) */\n if (\n this.isToken(TOKEN.KW_IF) ||\n this.isToken(TOKEN.KW_WHILE) ||\n this.isToken(TOKEN.ID) ||\n this.isToken(TOKEN.KW_WRITE) ||\n this.isToken(TOKEN.KW_RETURN) ||\n this.isToken(TOKEN.KW_END) ||\n this.isToken(TOKEN.KW_ELSE)\n ) {\n this.printError(expected)\n return\n }\n\n /* Skip: Panic mode */\n else {\n this.skip(expected)\n if (!this.isToken(TOKEN.EOF))\n this.parseCmdWhile()\n }\n }\n }", "title": "" }, { "docid": "c9a72ef319b3e92425992dc18ed884fe", "score": "0.64664483", "text": "enterDo_while_statement(ctx) {\n\t}", "title": "" }, { "docid": "912bab6a4e4d5e1a696f9aa6c26929c7", "score": "0.6359608", "text": "function visitWhileStatement(node){return ts.updateWhile(node,ts.visitNode(node.expression,destructuringVisitor,ts.isExpression),ts.visitNode(node.statement,nestedElementVisitor,ts.isStatement,ts.liftToBlock));}", "title": "" }, { "docid": "ff0d26804b5ba144522f713712a430c4", "score": "0.6307204", "text": "function demoDoWhileLoop() {\n\n let index = 10;\n\n do {\n console.log ( index-- ); \n } while ( index > 0);\n\n}", "title": "" }, { "docid": "231dc85fef50e0491b58a238869c13b5", "score": "0.6279238", "text": "function genereateWhile(tree, indent, lctx) {\n const conditionBlock = generate(tree[1], indent + 1, lctx);\n const innerBlock = generate(tree[2], indent + 2, lctx);\n\n // let block = TABs(indent) + '(loop ;; --begin of while loop--' + LF();\n // block = block + TABs(indent + 1) + '(if' + LF();\n // block = block + conditionBlock + LF();\n // block = block + TABs(indent + 2) + '(then' + LF();\n // block = block + innerBlock;\n // block = block + TABs(indent + 3) + '(br 1) ;; --jump to head of while loop--' + LF();\n // block = block + TABs(indent + 2) + ') ;; end of then' + LF();\n // block = block + TABs(indent + 1) + ') ;; end of if' + LF();\n // block = block + TABs(indent) + ') ;; --end of while loop--';\n\n let block = TABs(indent) + 'loop ;; --begin of while loop--' + LF();\n block = block + conditionBlock;\n block = block + TABs(indent + 1) + 'if' + LF();\n block = block + innerBlock;\n block = block + TABs(indent + 2) + 'br 1 ;; --jump to head of while loop--' + LF();\n block = block + TABs(indent + 1) + 'end ;; end of if-then' + LF();\n block = block + TABs(indent) + 'end ;; --end of while loop--';\n\n return block;\n}", "title": "" }, { "docid": "866a93b7f52ff40cebc5ad3cdc1c900a", "score": "0.6262049", "text": "exitDoWhileStatement(ctx) {\n\t}", "title": "" }, { "docid": "fbc7880924a57aa4a197e8bdce7bcbff", "score": "0.62434673", "text": "function WhileStatement(node, print) {\n this.keyword(\"while\");\n this.push(\"(\");\n print.plain(node.test);\n this.push(\")\");\n print.block(node.body);\n}", "title": "" }, { "docid": "46d4e8160853172ef23755484fa90a49", "score": "0.61735445", "text": "function whileExp(cond, block) {\n\treturn ['callcc',\n\t\t['lambda', 'break', 'continue',\n\t\t\t['begin',\n\t\t\t\t['callcc', ['lambda', 'cc', ['set-env', 'continue', 'cc']]],\n\t\t\t\t['if', cond, ['begin', block, ['continue']]]]]]\n}", "title": "" }, { "docid": "bc1ca2b6766ab2b6fb35dc15a629b0c8", "score": "0.61726236", "text": "function visitDoStatement(node){return ts.updateDo(node,ts.visitNode(node.statement,nestedElementVisitor,ts.isStatement,ts.liftToBlock),ts.visitNode(node.expression,destructuringVisitor,ts.isExpression));}", "title": "" }, { "docid": "5e80a55988dcbfa4750527e4ca61b38a", "score": "0.61650795", "text": "exitDo_while_statement(ctx) {\n\t}", "title": "" }, { "docid": "11bb0088d3cfdc793b5a09b69c38a960", "score": "0.6163801", "text": "function visitWhileStatement(node) {\n return ts.updateWhile(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));\n }", "title": "" }, { "docid": "07686c48dcd8b144b967f41902bd50db", "score": "0.60526764", "text": "function visitWhileStatement(node) {\n return factory.updateWhileStatement(node, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, topLevelNestedVisitor, context));\n }", "title": "" }, { "docid": "8ddd2518f1b46582e553af5cf824c5db", "score": "0.6009564", "text": "function visitDoStatement(node) {\n return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression));\n }", "title": "" }, { "docid": "474f4a541b14ef55cb99b1ed52300b8f", "score": "0.5975214", "text": "function doWhileLoop(num) {\n var i = 0;\n \nfunction incrementVariable() {\n i = i + 1;\n return i;\n}\n \ndo {\n console.log('I run once regardless');\n} while (incrementVariable() < num);\n}", "title": "" }, { "docid": "e11d6259ab10121fe551bf12b1c5aef0", "score": "0.5959369", "text": "function LoopControlStatement(){\n // default constructor: call super.constructor\n return ASTBase.prototype.constructor.apply(this,arguments)\n }", "title": "" }, { "docid": "2bc8b78b12c582738af49b2fac05ee81", "score": "0.5947386", "text": "function visitDoStatement(node) {\n return factory.updateDoStatement(node, ts.visitIterationBody(node.statement, topLevelNestedVisitor, context), ts.visitNode(node.expression, visitor, ts.isExpression));\n }", "title": "" }, { "docid": "27521c12c50b2a24b7dfe6136f538d6b", "score": "0.5875295", "text": "function buclesDoWhile() \n\t{\n\t\t//variable contadora\n\t\tvar contador3 = 0;\n\t\t//definicion del bucle\n\t\tdo\n\t\t{\n\t\t\tconsole.log(contador3);\n\t\t\tcontador3++;\n\t\t}\twhile(contador3 < 10);\n\t\tconsole.log(\"\\n\");\n\t\t//variable contadora\n\t\tvar contador4 = 10;\n\t\t//definicion del bucle\n\t\tdo\n\t\t{\n\t\t\tconsole.log(contador4);\n\t\t\tcontador4--;\n\t\t}\twhile(contador4 > 0);\n\t\t//while(contador4--, contador4 > 10);\n\t}", "title": "" }, { "docid": "e7d3dc7a698342e7ce5541027e6fcbe9", "score": "0.5843437", "text": "function basicTest() {\n var count = 0;\n var i = 10;\n\n do {\n print('body, i:', i, 'count:', count);\n } while(print('while'), count++, i-- > 0);\n\n print('final i:', i);\n}", "title": "" }, { "docid": "27f9d11af8e5b570158630bcef31597c", "score": "0.5789203", "text": "function addWhile(params) {\n\t\tif (!firstMove) {\n\t\t\taddMainProgramComment();\n\t\t\tfirstMove = true;\n\t\t}\n\t\tvar indentStr = findIndentation(selRow);\n\t\tvar row;\n\t\tvar cell;\n\t\tvar innerTable;\n\t\t\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trow = codeTable.insertRow(selRow + i);\n\t\t\tcell = row.insertCell(0);\n\t\t\tcell.innerHTML = innerTableTemplate;\n\t\t\tinnerTable = codeTable.rows[selRow + i].cells[0].children[0];\n\t\t\t\n\t\t\tif (i == 0) {\n\t\t\t\taddRow(innerTable, [ indentStr + \"<b>while</b>&nbsp;\", \"(\", params[0] + \"&nbsp;\", params[1] + \"&nbsp;\", params[2], \")\" ], 2);\n\t\t\t\taddRowStyle(innerTable, [ \"blue\", \"black\", \"black\", \"black\" ], 2);\n\t\t\t}\n\t\t\telse if (i == 1) { addRow(innerTable, [ indentStr + \"{\" ], 2); }\n\t\t\telse if (i == 2) { addRow(innerTable, [ indentStr + \"}\" ], 2); }\n\t\t}\n\t\t\n\t\tselectRow(selRow + 3);\n\t\t\n\t\tif (selRow < programStart) programStart += 3;\n\t\ttoggleEvents();\n\t\trefreshLineCount();\n\t}", "title": "" }, { "docid": "91a120c39f4062cb94fb8f71e4230c38", "score": "0.5782978", "text": "function doWhileFunctionExercise() {\n let a = 1;\n do {\n console.log(a);\n a++;\n } while (a <= 5);\n}", "title": "" }, { "docid": "b2426f625113a87bfd90e728ff23df80", "score": "0.57812876", "text": "function wrapIter(n) { return {type: \"WhileStatement\", test: {type: \"Literal\", value: true}, body: n}; }", "title": "" }, { "docid": "5f09462c4784051412128ca1ba577ea1", "score": "0.5758278", "text": "enterWhileStatement(ctx) {\n\t}", "title": "" }, { "docid": "5f09462c4784051412128ca1ba577ea1", "score": "0.5758278", "text": "enterWhileStatement(ctx) {\n\t}", "title": "" }, { "docid": "94cb59b9d7a55c5c4857c3480393cbfa", "score": "0.57465327", "text": "enterLoopStatement(ctx) {\n\t}", "title": "" }, { "docid": "53c117ffb1b88857fd9e304efdba278f", "score": "0.57426816", "text": "function DoExpression(node, print) {\n this.push(\"do\");\n this.space();\n print.plain(node.body);\n}", "title": "" }, { "docid": "8691bfdf30c6a1b2499bc787db97b56c", "score": "0.5672788", "text": "function WhileUntilExpression(){\n // default constructor: call super.constructor\n return ASTBase.prototype.constructor.apply(this,arguments)\n }", "title": "" }, { "docid": "da88b0065176e284f5d5e41b04ec9f01", "score": "0.5616292", "text": "function generateWhile(node) {\n var address = _code.currentAddress;\n // Generate comparison \n generate(node.children[0]);\n var entry = _jumpTable.add(_code.currentAddress);\n Ops.bne(entry.address);\n // Generate block\n generate(node.children[1]);\n // Unconditional Jump\n Ops.lda('00');\n Ops.sta();\n Ops.ldx('01');\n Ops.cpx();\n //Ops.bne((-(_code.currentAddress - address + 2)).toTwosComplement().toHex(2));\n Ops.bne((256 - (_code.currentAddress - address + 2)).toHex(2));\n // Set jump address\n _jumpTable.setLast(_code.currentAddress);\n}", "title": "" }, { "docid": "e8876cf909f6ffc392afc82e6a868f7d", "score": "0.5611342", "text": "function supportsUnlabeledContinue(block){return block.kind===3/* Loop */;}", "title": "" }, { "docid": "477bb7a1d61b7dd11502bb05f721836b", "score": "0.55793685", "text": "function continueTest() {\n var count = 0;\n var i = 10;\n\n do {\n print('body, i:', i, 'count:', count);\n if (i == 4) {\n print('continue when i=4');\n continue;\n }\n print('before while');\n } while(print('while'), count++, i-- > 0);\n\n print('final i:', i);\n}", "title": "" }, { "docid": "34430d3d2b0e17550f85fa7582e9a449", "score": "0.5554078", "text": "enterWhile_statement(ctx) {\n\t}", "title": "" }, { "docid": "dd282ca2f76713a5a71dd7f4c2ce6dd0", "score": "0.55420804", "text": "function beginLoopBlock(continueLabel){var breakLabel=defineLabel();beginBlock({kind:3/* Loop */,isScript:false,breakLabel:breakLabel,continueLabel:continueLabel});return breakLabel;}", "title": "" }, { "docid": "b08401fdcc1acef7b436620a6040a56f", "score": "0.5538181", "text": "ForLoop(node, block) {\n let inx = this._inx++\n let loop = est.ident(`__j_loop_${inx}`)\n let iter = est.iterator(this.convert(node.iterable))\n let count = est.ident(`__j_count_${inx}`)\n block.let([[loop, iter], [count, est.literal(0)]])\n\n let code = block.for(null, null, est.pincr(count))\n let item = est.ident(`__j_item_${inx}`)\n code.let([[item, est.call(est.member(loop, est.ident('next')))]])\n\n code.if(est.member(item, est.ident('done'))).then.break()\n\n let ctx = this.context\n this.push()\n code.let([[this.context, est.Object.assign(est.object({}), ctx)]])\n\n let pat = this.convert(node.pattern)\n code.add(est.set(pat, '=', est.member(item, est.ident('value'))))\n\n if (node.filter) {\n let filter = this.convert(node.filter)\n code.if(filter).then.continue()\n }\n\n this.convert(node.body, code)\n this.pop()\n\n if (node.alternative) {\n let else_ = block.if(est.binop(count, '===', est.literal(0))).then\n for (let child of node.alternative) {\n this.convert(child, else_)\n }\n }\n }", "title": "" }, { "docid": "94c03d774abadd617e0e4263c5170bd5", "score": "0.54798687", "text": "exitWhileStatement(ctx) {\n\t}", "title": "" }, { "docid": "94c03d774abadd617e0e4263c5170bd5", "score": "0.54798687", "text": "exitWhileStatement(ctx) {\n\t}", "title": "" }, { "docid": "14a59e1d5bfa2c6ce94610e97d350ddb", "score": "0.54444927", "text": "function example4(start) {\n\tlet points = drawWhile(start, [{\n\t\t'type': 'loop',\n\t\t'body': []\n\t}, {\n\t\t'type': 'loop',\n\t\t'body': []\n\t}], false);\n\treturn points.end;\n}", "title": "" }, { "docid": "d8e18aa614e6603649923d0ae7bac7d4", "score": "0.5444135", "text": "function parseStatement() {\n if (tokType === _slash) readToken(true);\n var starttype = tokType, node = startNode();\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n switch (starttype) {\n case _break:\n case _continue:\n next();\n var isBreak = starttype === _break;\n if (eat(_semi) || canInsertSemicolon()) node.label = null; else if (tokType !== _name) unexpected(); else {\n node.label = parseIdent();\n semicolon();\n }\n // Verify that there is an actual destination to break or\n // continue to.\n for (var i = 0; i < labels.length; ++i) {\n var lab = labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n if (node.label && isBreak) break;\n }\n }\n if (i === labels.length) raise(node.start, \"Unsyntactic \" + starttype.keyword);\n return finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n\n case _debugger:\n next();\n semicolon();\n return finishNode(node, \"DebuggerStatement\");\n\n case _do:\n next();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n expect(_while);\n node.test = parseParenExpression();\n semicolon();\n return finishNode(node, \"DoWhileStatement\");\n\n // Disambiguating between a `for` and a `for`/`in` loop is\n // non-trivial. Basically, we have to parse the init `var`\n // statement or expression, disallowing the `in` operator (see\n // the second parameter to `parseExpression`), and then check\n // whether the next token is `in`. When there is no init part\n // (semicolon immediately after the opening parenthesis), it is\n // a regular `for` loop.\n case _for:\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) return parseFor(node, null);\n if (tokType === _var) {\n var init = startNode();\n next();\n parseVar(init, true);\n if (init.declarations.length === 1 && eat(_in)) return parseForIn(node, init);\n return parseFor(node, init);\n }\n var init = parseExpression(false, true);\n if (eat(_in)) {\n checkLVal(init);\n return parseForIn(node, init);\n }\n return parseFor(node, init);\n\n case _function:\n next();\n return parseFunction(node, true);\n\n case _if:\n next();\n node.test = parseParenExpression();\n node.consequent = parseStatement();\n node.alternate = eat(_else) ? parseStatement() : null;\n return finishNode(node, \"IfStatement\");\n\n case _return:\n if (!inFunction) raise(tokStart, \"'return' outside of function\");\n next();\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n if (eat(_semi) || canInsertSemicolon()) node.argument = null; else {\n node.argument = parseExpression();\n semicolon();\n }\n return finishNode(node, \"ReturnStatement\");\n\n case _switch:\n next();\n node.discriminant = parseParenExpression();\n node.cases = [];\n expect(_braceL);\n labels.push(switchLabel);\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n for (var cur, sawDefault; tokType != _braceR; ) {\n if (tokType === _case || tokType === _default) {\n var isCase = tokType === _case;\n if (cur) finishNode(cur, \"SwitchCase\");\n node.cases.push(cur = startNode());\n cur.consequent = [];\n next();\n if (isCase) cur.test = parseExpression(); else {\n if (sawDefault) raise(lastStart, \"Multiple default clauses\");\n sawDefault = true;\n cur.test = null;\n }\n expect(_colon);\n } else {\n if (!cur) unexpected();\n cur.consequent.push(parseStatement());\n }\n }\n if (cur) finishNode(cur, \"SwitchCase\");\n next();\n // Closing brace\n labels.pop();\n return finishNode(node, \"SwitchStatement\");\n\n case _throw:\n next();\n if (newline.test(input.slice(lastEnd, tokStart))) raise(lastEnd, \"Illegal newline after throw\");\n node.argument = parseExpression();\n semicolon();\n return finishNode(node, \"ThrowStatement\");\n\n case _try:\n next();\n node.block = parseBlock();\n node.handler = null;\n if (tokType === _catch) {\n var clause = startNode();\n next();\n expect(_parenL);\n clause.param = parseIdent();\n if (strict && isStrictBadIdWord(clause.param.name)) raise(clause.param.start, \"Binding \" + clause.param.name + \" in strict mode\");\n expect(_parenR);\n clause.guard = null;\n clause.body = parseBlock();\n node.handler = finishNode(clause, \"CatchClause\");\n }\n node.finalizer = eat(_finally) ? parseBlock() : null;\n if (!node.handler && !node.finalizer) raise(node.start, \"Missing catch or finally clause\");\n return finishNode(node, \"TryStatement\");\n\n case _var:\n next();\n node = parseVar(node);\n semicolon();\n return node;\n\n case _while:\n next();\n node.test = parseParenExpression();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n return finishNode(node, \"WhileStatement\");\n\n case _with:\n if (strict) raise(tokStart, \"'with' in strict mode\");\n next();\n node.object = parseParenExpression();\n node.body = parseStatement();\n return finishNode(node, \"WithStatement\");\n\n case _braceL:\n return parseBlock();\n\n case _semi:\n next();\n return finishNode(node, \"EmptyStatement\");\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n default:\n var maybeName = tokVal, expr = parseExpression();\n if (starttype === _name && expr.type === \"Identifier\" && eat(_colon)) {\n for (var i = 0; i < labels.length; ++i) if (labels[i].name === maybeName) raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n var kind = tokType.isLoop ? \"loop\" : tokType === _switch ? \"switch\" : null;\n labels.push({\n name: maybeName,\n kind: kind\n });\n node.body = parseStatement();\n labels.pop();\n node.label = expr;\n return finishNode(node, \"LabeledStatement\");\n } else {\n node.expression = expr;\n semicolon();\n return finishNode(node, \"ExpressionStatement\");\n }\n }\n }", "title": "" }, { "docid": "15e4018155a6e3877e4f77f1f38420d5", "score": "0.5443652", "text": "exitWhile_statement(ctx) {\n\t}", "title": "" }, { "docid": "e98cef857910549655ea7ab749ad6f76", "score": "0.5413199", "text": "function cicloWhile(check) {\n // Define el ciclo while aqui\n}", "title": "" }, { "docid": "4286f007c14114545a7ea863d56c013e", "score": "0.540963", "text": "enterOptimizeFor(node, env) {\n if (node.getType() === node_1.TwingNodeType.FOR) {\n // disable the loop variable by default\n node.setAttribute('with_loop', false);\n this.loops.unshift(node);\n this.loopsTargets.unshift(node.getNode('value_target').getAttribute('name'));\n this.loopsTargets.unshift(node.getNode('key_target').getAttribute('name'));\n }\n else if (this.loops.length < 1) {\n // we are outside a loop\n return;\n }\n // when do we need to add the loop variable back?\n // the loop variable is referenced for the active loop\n else if (node.getType() === node_1.TwingNodeType.EXPRESSION_NAME && node.getAttribute('name') === 'loop') {\n node.setAttribute('always_defined', true);\n this.addLoopToCurrent();\n }\n // optimize access to loop targets\n else if (node.getType() === node_1.TwingNodeType.EXPRESSION_NAME && this.loopsTargets.includes(node.getAttribute('name'))) {\n node.setAttribute('always_defined', true);\n }\n // block reference\n else if (node.getType() === node_1.TwingNodeType.BLOCK_REFERENCE || node.getType() === node_1.TwingNodeType.EXPRESSION_BLOCK_REFERENCE) {\n this.addLoopToCurrent();\n }\n // include without the only attribute\n else if (node.getType() === node_1.TwingNodeType.INCLUDE && !node.getAttribute('only')) {\n this.addLoopToAll();\n }\n // include function without the with_context=false parameter\n else if (node.getType() === node_1.TwingNodeType.EXPRESSION_FUNCTION && node.getAttribute('name') === 'include' && (!node.getNode('arguments').hasNode('with_context') || node.getNode('arguments').getNode('with_context').getAttribute('value') !== false)) {\n this.addLoopToAll();\n }\n // the loop variable is referenced via an attribute\n else if (node.getType() === node_1.TwingNodeType.EXPRESSION_GET_ATTR && (node.getNode('attribute').getType() !== node_1.TwingNodeType.EXPRESSION_CONSTANT || node.getNode('attribute').getAttribute('value') === 'parent') && (this.loops[0].getAttribute('with_loop') === true || (node.getNode('node').getType() === node_1.TwingNodeType.EXPRESSION_NAME && node.getNode('node').getAttribute('name') === 'loop'))) {\n this.addLoopToAll();\n }\n }", "title": "" }, { "docid": "0e682e69d106b2f6f4d1db86206aa4d6", "score": "0.5380253", "text": "function createLoopVariable(){var name=createIdentifier(\"\");name.autoGenerateKind=2/* Loop */;name.autoGenerateId=nextAutoGenerateId;nextAutoGenerateId++;return name;}", "title": "" }, { "docid": "59b9cc78d8213294c1dc88ac3cd0ac11", "score": "0.5379152", "text": "loops() {\n throw new Error('Must be overloaded');\n }", "title": "" }, { "docid": "f7d787311347c44c7400d38387295aaf", "score": "0.53761476", "text": "function parseStatement_for() {\n var init = null;\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) {\n parse_ForStatement();\n } else if (tokType === _var) {\n next();\n if (parseVar(true) === 1 && eat(_in) === true) {\n parse_ForInStatement();\n } else {\n parse_ForStatement();\n }\n } else {\n init = parseExpression(true);\n if (eat(_in) === true) {\n checkLVal(init);\n parse_ForInStatement();\n } else {\n parse_ForStatement();\n }\n }\n labels.pop();\n }", "title": "" }, { "docid": "5d7e7d46ac8e10bb26e8f616a734e36a", "score": "0.53728807", "text": "exitLoopStatement(ctx) {\n\t}", "title": "" }, { "docid": "996a6c6793ef775716a3132b1d8a0123", "score": "0.5372419", "text": "function _execControl (tokens) {\n var main = tokens[0];\n\n if (main === \"While-start\") {\n var condition = tokens.slice(1);\n if (_evalExpression(condition) === true) {\n //continue\n } else {\n //seek out the corresponding While-end\n _seek(\"While-start\", \"While-end\", \"forward\");\n }\n\n } else if (main === \"While-end\") {\n //we successfuly ran through a while-loop,\n //so run back up to the instruction directly before the While-start\n _seek(\"While-end\", \"While-start\", \"backward\");\n _pc--;\n\n } else if (main === \"If-start\") {\n var condition = tokens.slice(1);\n if (_evalExpression(condition) === true) {\n //continue: no action required\n } else {\n //seek out corresponding Else-start\n _seek(\"If-start\", \"Else-start\", \"forward\");\n } \n \n } else if (main === \"Else-start\") {\n _seek(\"Else-start\", \"If-end\", \"forward\");\n\n } else if (main === \"If-end\") {\n //continue: no action required\n\n } else {\n _exit(\"_execControl received invalid instruction \"\n + JSON.stringify(tokens));\n }\n}", "title": "" }, { "docid": "7b0c0b12c41f8a05cf924db0a6dbf8d5", "score": "0.5354478", "text": "function breakTest() {\n var count = 0;\n var i = 10;\n\n do {\n print('body, i:', i, 'count:', count);\n if (i == 4) {\n print('break when i=4');\n break;\n }\n print('before while');\n } while(print('while'), count++, i-- > 0);\n\n print('final i:', i);\n}", "title": "" }, { "docid": "a60e064694425b2b87684e605d12e9b0", "score": "0.5336478", "text": "function loopInifinito() {\n while (true) { }\n}", "title": "" }, { "docid": "319fece7b2bf8a3f249e0398077a8704", "score": "0.53361815", "text": "function parseStatement() {\n if (tokType === _slash || tokType === _assign && tokVal == \"/=\")\n readToken(true);\n\n var starttype = tokType, node = startNode();\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case _break: case _continue:\n next();\n var isBreak = starttype === _break;\n if (eat(_semi) || canInsertSemicolon()) node.label = null;\n else if (tokType !== _name) unexpected();\n else {\n node.label = parseIdent();\n semicolon();\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n for (var i = 0; i < labels.length; ++i) {\n var lab = labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n if (node.label && isBreak) break;\n }\n }\n if (i === labels.length) raise(node.start, \"Unsyntactic \" + starttype.keyword);\n return finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n\n case _debugger:\n next();\n semicolon();\n return finishNode(node, \"DebuggerStatement\");\n\n case _do:\n next();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n expect(_while);\n node.test = parseParenExpression();\n semicolon();\n return finishNode(node, \"DoWhileStatement\");\n\n // Disambiguating between a `for` and a `for`/`in` loop is\n // non-trivial. Basically, we have to parse the init `var`\n // statement or expression, disallowing the `in` operator (see\n // the second parameter to `parseExpression`), and then check\n // whether the next token is `in`. When there is no init part\n // (semicolon immediately after the opening parenthesis), it is\n // a regular `for` loop.\n\n case _for:\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) return parseFor(node, null);\n if (tokType === _var) {\n var init = startNode();\n next();\n parseVar(init, true);\n finishNode(init, \"VariableDeclaration\");\n if (init.declarations.length === 1 && eat(_in))\n return parseForIn(node, init);\n return parseFor(node, init);\n }\n var init = parseExpression(false, true);\n if (eat(_in)) {checkLVal(init); return parseForIn(node, init);}\n return parseFor(node, init);\n\n case _function:\n next();\n return parseFunction(node, true);\n\n case _if:\n next();\n node.test = parseParenExpression();\n node.consequent = parseStatement();\n node.alternate = eat(_else) ? parseStatement() : null;\n return finishNode(node, \"IfStatement\");\n\n case _return:\n if (!inFunction) raise(tokStart, \"'return' outside of function\");\n next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (eat(_semi) || canInsertSemicolon()) node.argument = null;\n else { node.argument = parseExpression(); semicolon(); }\n return finishNode(node, \"ReturnStatement\");\n\n case _switch:\n next();\n node.discriminant = parseParenExpression();\n node.cases = [];\n expect(_braceL);\n labels.push(switchLabel);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n for (var cur, sawDefault; tokType != _braceR;) {\n if (tokType === _case || tokType === _default) {\n var isCase = tokType === _case;\n if (cur) finishNode(cur, \"SwitchCase\");\n node.cases.push(cur = startNode());\n cur.consequent = [];\n next();\n if (isCase) cur.test = parseExpression();\n else {\n if (sawDefault) raise(lastStart, \"Multiple default clauses\"); sawDefault = true;\n cur.test = null;\n }\n expect(_colon);\n } else {\n if (!cur) unexpected();\n cur.consequent.push(parseStatement());\n }\n }\n if (cur) finishNode(cur, \"SwitchCase\");\n next(); // Closing brace\n labels.pop();\n return finishNode(node, \"SwitchStatement\");\n\n case _throw:\n next();\n if (newline.test(input.slice(lastEnd, tokStart)))\n raise(lastEnd, \"Illegal newline after throw\");\n node.argument = parseExpression();\n semicolon();\n return finishNode(node, \"ThrowStatement\");\n\n case _try:\n next();\n node.block = parseBlock();\n node.handler = null;\n if (tokType === _catch) {\n var clause = startNode();\n next();\n expect(_parenL);\n clause.param = parseIdent();\n if (strict && isStrictBadIdWord(clause.param.name))\n raise(clause.param.start, \"Binding \" + clause.param.name + \" in strict mode\");\n expect(_parenR);\n clause.guard = null;\n clause.body = parseBlock();\n node.handler = finishNode(clause, \"CatchClause\");\n }\n node.guardedHandlers = empty;\n node.finalizer = eat(_finally) ? parseBlock() : null;\n if (!node.handler && !node.finalizer)\n raise(node.start, \"Missing catch or finally clause\");\n return finishNode(node, \"TryStatement\");\n\n case _var:\n next();\n parseVar(node);\n semicolon();\n return finishNode(node, \"VariableDeclaration\");\n\n case _while:\n next();\n node.test = parseParenExpression();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n return finishNode(node, \"WhileStatement\");\n\n case _with:\n if (strict) raise(tokStart, \"'with' in strict mode\");\n next();\n node.object = parseParenExpression();\n node.body = parseStatement();\n return finishNode(node, \"WithStatement\");\n\n case _braceL:\n return parseBlock();\n\n case _semi:\n next();\n return finishNode(node, \"EmptyStatement\");\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n\n default:\n var maybeName = tokVal, expr = parseExpression();\n if (starttype === _name && expr.type === \"Identifier\" && eat(_colon)) {\n for (var i = 0; i < labels.length; ++i)\n if (labels[i].name === maybeName) raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n var kind = tokType.isLoop ? \"loop\" : tokType === _switch ? \"switch\" : null;\n labels.push({name: maybeName, kind: kind});\n node.body = parseStatement();\n labels.pop();\n node.label = expr;\n return finishNode(node, \"LabeledStatement\");\n } else {\n node.expression = expr;\n semicolon();\n return finishNode(node, \"ExpressionStatement\");\n }\n }\n }", "title": "" }, { "docid": "319fece7b2bf8a3f249e0398077a8704", "score": "0.53361815", "text": "function parseStatement() {\n if (tokType === _slash || tokType === _assign && tokVal == \"/=\")\n readToken(true);\n\n var starttype = tokType, node = startNode();\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case _break: case _continue:\n next();\n var isBreak = starttype === _break;\n if (eat(_semi) || canInsertSemicolon()) node.label = null;\n else if (tokType !== _name) unexpected();\n else {\n node.label = parseIdent();\n semicolon();\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n for (var i = 0; i < labels.length; ++i) {\n var lab = labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n if (node.label && isBreak) break;\n }\n }\n if (i === labels.length) raise(node.start, \"Unsyntactic \" + starttype.keyword);\n return finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n\n case _debugger:\n next();\n semicolon();\n return finishNode(node, \"DebuggerStatement\");\n\n case _do:\n next();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n expect(_while);\n node.test = parseParenExpression();\n semicolon();\n return finishNode(node, \"DoWhileStatement\");\n\n // Disambiguating between a `for` and a `for`/`in` loop is\n // non-trivial. Basically, we have to parse the init `var`\n // statement or expression, disallowing the `in` operator (see\n // the second parameter to `parseExpression`), and then check\n // whether the next token is `in`. When there is no init part\n // (semicolon immediately after the opening parenthesis), it is\n // a regular `for` loop.\n\n case _for:\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) return parseFor(node, null);\n if (tokType === _var) {\n var init = startNode();\n next();\n parseVar(init, true);\n finishNode(init, \"VariableDeclaration\");\n if (init.declarations.length === 1 && eat(_in))\n return parseForIn(node, init);\n return parseFor(node, init);\n }\n var init = parseExpression(false, true);\n if (eat(_in)) {checkLVal(init); return parseForIn(node, init);}\n return parseFor(node, init);\n\n case _function:\n next();\n return parseFunction(node, true);\n\n case _if:\n next();\n node.test = parseParenExpression();\n node.consequent = parseStatement();\n node.alternate = eat(_else) ? parseStatement() : null;\n return finishNode(node, \"IfStatement\");\n\n case _return:\n if (!inFunction) raise(tokStart, \"'return' outside of function\");\n next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (eat(_semi) || canInsertSemicolon()) node.argument = null;\n else { node.argument = parseExpression(); semicolon(); }\n return finishNode(node, \"ReturnStatement\");\n\n case _switch:\n next();\n node.discriminant = parseParenExpression();\n node.cases = [];\n expect(_braceL);\n labels.push(switchLabel);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n for (var cur, sawDefault; tokType != _braceR;) {\n if (tokType === _case || tokType === _default) {\n var isCase = tokType === _case;\n if (cur) finishNode(cur, \"SwitchCase\");\n node.cases.push(cur = startNode());\n cur.consequent = [];\n next();\n if (isCase) cur.test = parseExpression();\n else {\n if (sawDefault) raise(lastStart, \"Multiple default clauses\"); sawDefault = true;\n cur.test = null;\n }\n expect(_colon);\n } else {\n if (!cur) unexpected();\n cur.consequent.push(parseStatement());\n }\n }\n if (cur) finishNode(cur, \"SwitchCase\");\n next(); // Closing brace\n labels.pop();\n return finishNode(node, \"SwitchStatement\");\n\n case _throw:\n next();\n if (newline.test(input.slice(lastEnd, tokStart)))\n raise(lastEnd, \"Illegal newline after throw\");\n node.argument = parseExpression();\n semicolon();\n return finishNode(node, \"ThrowStatement\");\n\n case _try:\n next();\n node.block = parseBlock();\n node.handler = null;\n if (tokType === _catch) {\n var clause = startNode();\n next();\n expect(_parenL);\n clause.param = parseIdent();\n if (strict && isStrictBadIdWord(clause.param.name))\n raise(clause.param.start, \"Binding \" + clause.param.name + \" in strict mode\");\n expect(_parenR);\n clause.guard = null;\n clause.body = parseBlock();\n node.handler = finishNode(clause, \"CatchClause\");\n }\n node.guardedHandlers = empty;\n node.finalizer = eat(_finally) ? parseBlock() : null;\n if (!node.handler && !node.finalizer)\n raise(node.start, \"Missing catch or finally clause\");\n return finishNode(node, \"TryStatement\");\n\n case _var:\n next();\n parseVar(node);\n semicolon();\n return finishNode(node, \"VariableDeclaration\");\n\n case _while:\n next();\n node.test = parseParenExpression();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n return finishNode(node, \"WhileStatement\");\n\n case _with:\n if (strict) raise(tokStart, \"'with' in strict mode\");\n next();\n node.object = parseParenExpression();\n node.body = parseStatement();\n return finishNode(node, \"WithStatement\");\n\n case _braceL:\n return parseBlock();\n\n case _semi:\n next();\n return finishNode(node, \"EmptyStatement\");\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n\n default:\n var maybeName = tokVal, expr = parseExpression();\n if (starttype === _name && expr.type === \"Identifier\" && eat(_colon)) {\n for (var i = 0; i < labels.length; ++i)\n if (labels[i].name === maybeName) raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n var kind = tokType.isLoop ? \"loop\" : tokType === _switch ? \"switch\" : null;\n labels.push({name: maybeName, kind: kind});\n node.body = parseStatement();\n labels.pop();\n node.label = expr;\n return finishNode(node, \"LabeledStatement\");\n } else {\n node.expression = expr;\n semicolon();\n return finishNode(node, \"ExpressionStatement\");\n }\n }\n }", "title": "" }, { "docid": "319fece7b2bf8a3f249e0398077a8704", "score": "0.53361815", "text": "function parseStatement() {\n if (tokType === _slash || tokType === _assign && tokVal == \"/=\")\n readToken(true);\n\n var starttype = tokType, node = startNode();\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case _break: case _continue:\n next();\n var isBreak = starttype === _break;\n if (eat(_semi) || canInsertSemicolon()) node.label = null;\n else if (tokType !== _name) unexpected();\n else {\n node.label = parseIdent();\n semicolon();\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n for (var i = 0; i < labels.length; ++i) {\n var lab = labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n if (node.label && isBreak) break;\n }\n }\n if (i === labels.length) raise(node.start, \"Unsyntactic \" + starttype.keyword);\n return finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n\n case _debugger:\n next();\n semicolon();\n return finishNode(node, \"DebuggerStatement\");\n\n case _do:\n next();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n expect(_while);\n node.test = parseParenExpression();\n semicolon();\n return finishNode(node, \"DoWhileStatement\");\n\n // Disambiguating between a `for` and a `for`/`in` loop is\n // non-trivial. Basically, we have to parse the init `var`\n // statement or expression, disallowing the `in` operator (see\n // the second parameter to `parseExpression`), and then check\n // whether the next token is `in`. When there is no init part\n // (semicolon immediately after the opening parenthesis), it is\n // a regular `for` loop.\n\n case _for:\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) return parseFor(node, null);\n if (tokType === _var) {\n var init = startNode();\n next();\n parseVar(init, true);\n finishNode(init, \"VariableDeclaration\");\n if (init.declarations.length === 1 && eat(_in))\n return parseForIn(node, init);\n return parseFor(node, init);\n }\n var init = parseExpression(false, true);\n if (eat(_in)) {checkLVal(init); return parseForIn(node, init);}\n return parseFor(node, init);\n\n case _function:\n next();\n return parseFunction(node, true);\n\n case _if:\n next();\n node.test = parseParenExpression();\n node.consequent = parseStatement();\n node.alternate = eat(_else) ? parseStatement() : null;\n return finishNode(node, \"IfStatement\");\n\n case _return:\n if (!inFunction) raise(tokStart, \"'return' outside of function\");\n next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (eat(_semi) || canInsertSemicolon()) node.argument = null;\n else { node.argument = parseExpression(); semicolon(); }\n return finishNode(node, \"ReturnStatement\");\n\n case _switch:\n next();\n node.discriminant = parseParenExpression();\n node.cases = [];\n expect(_braceL);\n labels.push(switchLabel);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n for (var cur, sawDefault; tokType != _braceR;) {\n if (tokType === _case || tokType === _default) {\n var isCase = tokType === _case;\n if (cur) finishNode(cur, \"SwitchCase\");\n node.cases.push(cur = startNode());\n cur.consequent = [];\n next();\n if (isCase) cur.test = parseExpression();\n else {\n if (sawDefault) raise(lastStart, \"Multiple default clauses\"); sawDefault = true;\n cur.test = null;\n }\n expect(_colon);\n } else {\n if (!cur) unexpected();\n cur.consequent.push(parseStatement());\n }\n }\n if (cur) finishNode(cur, \"SwitchCase\");\n next(); // Closing brace\n labels.pop();\n return finishNode(node, \"SwitchStatement\");\n\n case _throw:\n next();\n if (newline.test(input.slice(lastEnd, tokStart)))\n raise(lastEnd, \"Illegal newline after throw\");\n node.argument = parseExpression();\n semicolon();\n return finishNode(node, \"ThrowStatement\");\n\n case _try:\n next();\n node.block = parseBlock();\n node.handler = null;\n if (tokType === _catch) {\n var clause = startNode();\n next();\n expect(_parenL);\n clause.param = parseIdent();\n if (strict && isStrictBadIdWord(clause.param.name))\n raise(clause.param.start, \"Binding \" + clause.param.name + \" in strict mode\");\n expect(_parenR);\n clause.guard = null;\n clause.body = parseBlock();\n node.handler = finishNode(clause, \"CatchClause\");\n }\n node.guardedHandlers = empty;\n node.finalizer = eat(_finally) ? parseBlock() : null;\n if (!node.handler && !node.finalizer)\n raise(node.start, \"Missing catch or finally clause\");\n return finishNode(node, \"TryStatement\");\n\n case _var:\n next();\n parseVar(node);\n semicolon();\n return finishNode(node, \"VariableDeclaration\");\n\n case _while:\n next();\n node.test = parseParenExpression();\n labels.push(loopLabel);\n node.body = parseStatement();\n labels.pop();\n return finishNode(node, \"WhileStatement\");\n\n case _with:\n if (strict) raise(tokStart, \"'with' in strict mode\");\n next();\n node.object = parseParenExpression();\n node.body = parseStatement();\n return finishNode(node, \"WithStatement\");\n\n case _braceL:\n return parseBlock();\n\n case _semi:\n next();\n return finishNode(node, \"EmptyStatement\");\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n\n default:\n var maybeName = tokVal, expr = parseExpression();\n if (starttype === _name && expr.type === \"Identifier\" && eat(_colon)) {\n for (var i = 0; i < labels.length; ++i)\n if (labels[i].name === maybeName) raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n var kind = tokType.isLoop ? \"loop\" : tokType === _switch ? \"switch\" : null;\n labels.push({name: maybeName, kind: kind});\n node.body = parseStatement();\n labels.pop();\n node.label = expr;\n return finishNode(node, \"LabeledStatement\");\n } else {\n node.expression = expr;\n semicolon();\n return finishNode(node, \"ExpressionStatement\");\n }\n }\n }", "title": "" }, { "docid": "47f283ddb2ce62809caa49c050b417ba", "score": "0.53253436", "text": "function parseInstructions(lines, nbDo) {\n\n\t//Note: a \"fake\" else is the else that is generated for an elif.\n\t//A \"ghost\" else is an else that does not generate a \"skip\" (if the previous 'if' didn't have its condition inverted).\n\n\t//Array of objects: {\n\t//\t\"type\": \"if\"|\"else\"|\"fakeelse\"|\"ghostelse\"|\"fakeghostelse\"|\"skip\"|\"skipif\"|\"label\"|\"other\"|\"forloop\"|\"optimized\"\n\t//\t\"condition\": compiled content of the condition, if type not in [\"label\", \"other\"] or \"skip\" is not a skip if\n\t//\t\"content\": compiled content of the instruction\n\t//\t\"label\": if type == \"skip\", the label to search for, if type == \"label\", the name of the label\n\t//\t\"indentLevel\": the indent level of the line\n\t//\t\"fileStack\": the file stack of the first token of the line\n\t//}\n\tvar resultLines = [];\n\n\t//Do a first pass to compile lines and to fill the resultLines array.\n\tfor (var i = 0; i < lines.length; i++) {\n\n\t\t\n\t\tif (lines[i].tokens.length === 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t\n\n\t\tvar currentResultLineType = undefined;\n\t\tvar currentResultLineContent = undefined;\n\t\tvar currentResultLineCondition = undefined;\n\t\tvar currentResultLineLabel = undefined;\n\t\tvar skipNextLine = false;\n\t\tfileStack = lines[i].tokens[0].fileStack;\n\n\t\t//As we already handled all \"do\" actions before calling this function, encountering a \"do\" means it can't be at the beginning of the rule.\n\t\tif (lines[i].tokens[0].text === \"do\") {\n\t\t\terror(\"Do instructions must be at the beginning of the rule\");\n\t\t}\n\n\n\t\t\n\t\t//Check for \"if\"\n\t\tif (lines[i].tokens[0].text === \"if\" || lines[i].tokens[0].text === \"elif\") {\n\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text !== ':') {\n\t\t\t\terror(\"If/Elif statement must end with ':'\");\n\t\t\t}\n\n\t\t\tvar condition = lines[i].tokens.slice(1, lines[i].tokens.length-1);\n\t\t\tif (condition.length === 0) {\n\t\t\t\terror(\"If/Elif statement must have a condition\");\n\t\t\t}\n\n\t\t\tif (i+1 >= lines.length) {\n\t\t\t\terror(\"If/Elif instruction must have at least one sub-instruction\");\n\t\t\t}\n \n\t\t\tif (lines[i+1].tokens[0].text === \"goto\") {\n\t\t\t\tif (lines[i+1].tokens.length < 2) {\n\t\t\t\t\terror(\"Malformed goto\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t//Check if the goto is of the form \"goto loc+xxx\"\n\t\t\t\tif (lines[i+1].tokens[1].text === \"loc\") {\n\t\t\t\t\tvar skipIfOffset = parse(lines[i+1].tokens.slice(3))\n\t\t\t\t\tvar compiledCondition = parse(condition);\n\t\t\t\t\tif (isWsFalse(compiledCondition) || isWs0(skipIfOffset)) {\n\t\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_skip\", actionKw)+\"(\"+skipIfOffset+\")\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_skipIf\", actionKw)+\"(\"+compiledCondition+\", \"+skipIfOffset+\")\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//Search for label\n\t\t\t\t\tvar label = lines[i+1].tokens[1].text;\n\t\t\t\t\tcurrentResultLineType = \"skipif\";\n\t\t\t\t\tcurrentResultLineCondition = parse(condition);\n\t\t\t\t\tcurrentResultLineLabel = label;\n\t\t\t\t}\n\t\t\t\tskipNextLine = true;\n\t\t\t\t\n\t\t\t} else if (lines[i+1].tokens[0].text === \"return\" || lines[i+1].tokens[0].text === \"continue\") {\n\t\t\t\tvar ifFunction = \"\";\n\t\t\t\tif (lines[i+1].tokens[0].text === \"return\") {\n\t\t\t\t\tifFunction = \"_abortIf\";\n\t\t\t\t} else {\n\t\t\t\t\tifFunction = \"_loopIf\";\n\t\t\t\t}\n\n\t\t\t\tif (condition[0].text === \"RULE_CONDITION\" && condition.length === 1) {\n\t\t\t\t\t\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(ifFunction+\"ConditionIsTrue\", actionKw);\n\n\t\t\t\t} else if (condition[0].text === \"not\" && condition[1].text === \"RULE_CONDITION\" && condition.length === 2) {\n\t\t\t\t\t\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(ifFunction+\"ConditionIsFalse\", actionKw);\n\n\t\t\t\t} else {\n\t\t\t\t\tvar compiledCondition = parse(condition);\n\t\t\t\t\tif (isWsFalse(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tif (ifFunction === \"_abortIf\") {\n\t\t\t\t\t\t\tcurrentResultLineContent = tows(\"return\", actionKw);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentResultLineContent = tows(\"_loop\", actionKw);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(ifFunction, actionKw)+\"(\"+compiledCondition+\")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tskipNextLine = true;\n\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tcurrentResultLineType = \"if\";\n\t\t\t\tcurrentResultLineCondition = parse(condition, {invertCondition: true, isCondition: true});\n\n\t\t\t}\n\n\t\t\tif (lines[i].tokens[0].text === \"elif\") {\n\t\t\t\tif (resultLines[resultLines.length-1].indentLevel <= lines[i].indentLevel) {\n\t\t\t\t\tresultLines.push({\n\t\t\t\t\t\ttype: \"fakeghostelse\",\n\t\t\t\t\t\tindentLevel: lines[i].indentLevel,\n\t\t\t\t\t\tfileStack: fileStack,\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tresultLines.push({\n\t\t\t\t\t\ttype: \"fakeelse\",\n\t\t\t\t\t\tindentLevel: lines[i].indentLevel,\n\t\t\t\t\t\tfileStack: fileStack,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t//Check for \"else\"\n\t\t} else if (lines[i].tokens[0].text === \"else\") {\n\t\t\t\n\t\t\tif (lines[i].tokens.length !== 2 || lines[i].tokens[1].text !== ':') {\n\t\t\t\terror(\"Else instruction must be 'else:'\");\n\t\t\t}\n\n\t\t\tif (i === 0) {\n\t\t\t\terror(\"Found 'else', but no 'if'\");\n\t\t\t} else if (resultLines[resultLines.length-1].indentLevel <= lines[i].indentLevel) {\n\t\t\t\t//If this is the case, then there is no need to replace the else for a \"skip\" as the previous if wasn't inverted.\n\t\t\t\tcurrentResultLineType = \"ghostelse\";\n\t\t\t} else {\n\t\t\t\tcurrentResultLineType = \"else\";\n\t\t\t}\n\n\t\t//Check for \"for\"\n\t\t} else if (lines[i].tokens[0].text === \"for\") {\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text !== ':') {\n\t\t\t\terror(\"For instruction must end with ':'\");\n\t\t\t}\n\t\t\t\n\t\t\tvar inOperands = splitTokens(lines[i].tokens.slice(1, lines[i].tokens.length-1), \"in\", false);\n\t\t\tif (inOperands.length !== 2) {\n\t\t\t\terror(\"For instruction must contain 'in'\");\n\t\t\t} else if (inOperands[0].length !== 1) {\n\t\t\t\terror(\"There can only be 1 token between 'for' and 'in'\");\n\t\t\t}\n\t\t\tvar forVarName = inOperands[0][0].text;\n\t\t\tif (forLoopVariables[forVarName] !== undefined) {\n\t\t\t\terror(\"Variable \"+forVarName+\" is already used\");\n\t\t\t}\n\t\t\tforLoopVariables[forVarName] = inOperands[1];\n\t\t\t//Check amount of lines\n\t\t\tvar forIndent = lines[i].indentLevel;\n\t\t\tvar j = i+1;\n\t\t\tfor (; j < lines.length && lines[j].indentLevel > forIndent; j++);\n\t\t\tif (j === i) {\n\t\t\t\terror(\"For loop contains no instructions\");\n\t\t\t}\n\t\t\tforLoopTimers.push([j, forVarName]);\n\n\t\t\tcurrentResultLineType = \"forloop\";\n\t\t\t\n\t\t//Check for \"while\"\n\t\t} else if (lines[i].tokens[0].text === \"while\") {\n\n\t\t\tif (nbDo === 0) {\n\t\t\t\terror(\"Found 'while' without matching 'do'\");\n\t\t\t}\n\t\t\tnbDo--;\n\n\t\t\tif (lines[i].tokens.length === 1) {\n\t\t\t\terror(\"While what?\");\n\t\t\t}\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text === \":\") {\n\t\t\t\terror(\"While statement must not end by a colon\");\n\t\t\t}\n\t\t\tif (lines[i].tokens[1].text === \"true\" && lines[i].tokens.length === 2) {\n\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\tcurrentResultLineContent = tows(\"_loop\", actionKw);\n\n\t\t\t} else {\n\t\t\t\tif (lines[i].tokens[1].text === \"RULE_CONDITION\") {\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_loopIfConditionIsTrue\", actionKw);\n\n\t\t\t\t} else if (lines[i].tokens[1].text === \"not\" && lines[i].tokens[2].text === \"RULE_CONDITION\") {\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_loopIfConditionIsFalse\", actionKw);\n\n\t\t\t\t} else {\n\t\t\t\t\tvar compiledCondition = parse(lines[i].tokens.slice(1));\n\t\t\t\t\tif (isWsFalse(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_loop\", actionKw);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_loopIf\", actionKw)+\"(\"+compiledCondition+\")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t//Check goto\n\t\t} else if (lines[i].tokens[0].text === 'goto') {\n\t\t\tif (lines[i].tokens.length < 2) {\n\t\t\t\terror(\"Malformed goto\");\n\t\t\t}\n\t\t\t\n\t\t\t//Check if the goto is of the form \"goto loc+xxx\"\n\t\t\tif (lines[i].tokens[1].text === \"loc\") {\n\t\t\t\tskipOffset = parse(lines[i].tokens.slice(3));\n\n\t\t\t\tvar compiledCondition = parse(condition);\n\t\t\t\tif (isWsFalse(compiledCondition) || isWs0(skipIfOffset)) {\n\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_skip\", actionKw)+\"(\"+skipIfOffset+\")\";\n\t\t\t\t} else {\n\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_skipIf\", actionKw)+\"(\"+compiledCondition+\", \"+skipIfOffset+\")\";\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tvar label = lines[i].tokens[1].text;\n\t\t\t\tcurrentResultLineType = \"skip\";\n\t\t\t\tcurrentResultLineLabel = label;\n\t\t\t}\n\n\t\t//Check for del\n\t\t} else if (lines[i].tokens[0].text === 'del') {\n\t\t\t\t\t\t\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text !== ']') {\n\t\t\t\terror(\"Del keyword must be followed by an array membership\");\n\t\t\t}\n\t\t\t\n\t\t\tvar bracketPos = getTokenBracketPos(lines[i].tokens);\n\t\t\t\n\t\t\tvar variable = lines[i].tokens.slice(1, bracketPos[bracketPos.length-2])\n\t\t\tvar member = lines[i].tokens.slice(bracketPos[bracketPos.length-2]+1, lines[i].tokens.length-1)\n\t\t\t\n\t\t\tdebug(\"Parsing del keyword with var = '\"+dispTokens(variable)+\"' and member = '\"+dispTokens(member)+\"'\");\n\t\t\t\n\t\t\tcurrentResultLineType = \"other\";\n\t\t\tcurrentResultLineContent = parseAssignment(variable, member, true, \"_removeFromArrayByIndex\");\n\t\t\t\n\t\t//Check for label\n\t\t} else if (lines[i].tokens[lines[i].tokens.length-1].text === ':') {\n\t\t\tif (lines[i].tokens.length !== 2) {\n\t\t\t\terror(\"Incorrectly formatted label\");\n\t\t\t}\n\t\t\tvar label = lines[i].tokens[0].text;\n\t\t\tcurrentResultLineType = \"label\";\n\t\t\tcurrentResultLineLabel = label;\n\n\t\t//Any other instruction\n\t\t} else {\n\t\t\tcurrentResultLineContent = parse(lines[i].tokens, {\"isWholeInstruction\":true});\n\t\t\tif (currentResultLineContent.length > 0) {\n\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t} else {\n\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t}\n\t\t}\n\n\t\tresultLines.push({\n\t\t\ttype: currentResultLineType,\n\t\t\tcondition: currentResultLineCondition,\n\t\t\tcontent: currentResultLineContent,\n\t\t\tlabel: currentResultLineLabel,\n\t\t\tindentLevel: lines[i].indentLevel,\n\t\t\tfileStack: lines[i].tokens[0].fileStack,\n\t\t});\n\n\t\t//Check for loop var timer\n\t\t//console.log(forLoopTimers);\n\t\t//console.log(i);\n\t\tfor (var j = 0; j < forLoopTimers.length; j++) {\n\t\t\tif (forLoopTimers[j][0] === i+1) {\n\t\t\t\tdelete forLoopVariables[forLoopTimers[j][1]];\n\t\t\t}\n\t\t}\n\n\t\tif (skipNextLine) {\n\t\t\ti++;\n\t\t}\n\t}\n\n\tlines = undefined;\n\tvar result = \"\";\n\n\tfunction getNbLinesForType(type) {\n\t\tif ([\"label\", \"ghostelse\", \"fakeghostelse\", \"forloop\", \"optimized\"].includes(type)) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t//Then, do a second pass to handle the \"if\"s.\n\t//Go in reverse, to be able to optimize away \"skip 0\" and still calculate the correct length.\n\tfor (var i = resultLines.length-1; i >= 0; i--) {\n\n\t\tfileStack = resultLines[i].fileStack;\n\n\t\tif (resultLines[i].type === \"other\") {\n\t\t\tresult = tabLevel(2)+resultLines[i].content+\";\\n\"+result;\n\n\t\t\tif (i > 0 && (resultLines[i-1].type === \"other\" || resultLines[i-1].type === \"skip\" || resultLines[i-1].type === \"label\")) {\n\t\t\t\tif (resultLines[i].indentLevel > resultLines[i-1].indentLevel) {\n\t\t\t\t\terror(\"Unexpected indent or unreachable code\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else if ([\"label\", \"ghostelse\", \"fakeghostelse\", \"forloop\", \"optimized\"].includes(resultLines[i].type)) {\n\t\t\t//do nothing\n\n\t\t} else if (resultLines[i].type === \"if\") {\n\t\t\t\n\t\t\tvar gotoOffset = 0;\n\t\t\tvar j = i+1;\n\n\t\t\t//Get number of indented lines within the if\n\t\t\tfor (; j < resultLines.length && resultLines[j].indentLevel > resultLines[i].indentLevel; j++) {\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t}\n\n\t\t\tif (j < resultLines.length && (resultLines[j].type === \"else\" || resultLines[j].type === \"fakeelse\")) {\n\t\t\t\tgotoOffset++;\n\t\t\t}\n\n\t\t\tvar compiledCondition = resultLines[i].condition;\n\n\t\t\tif (isWsFalse(compiledCondition) || gotoOffset === 0) {\n\t\t\t\t//Optimize away\n\t\t\t\tresultLines[i].type = \"optimized\";\n\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\t\t\t} else {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skipIf\", actionKw)+\"(\"+resultLines[i].condition+\", \"+gotoOffset+\");\\n\"+result;\n\t\t\t}\n\n\t\t} else if (resultLines[i].type === \"skip\" || resultLines[i].type === \"skipif\") {\n\t\t\t\n\t\t\tvar gotoOffset = 0;\n\t\t\tvar foundLabel = false;\n\t\t\t\n\t\t\tfor (var j = i+1; j < resultLines.length; j++) {\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t\tif (resultLines[j].type === \"label\" && resultLines[j].label === resultLines[i].label) {\n\t\t\t\t\tfoundLabel = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!foundLabel) {\n\t\t\t\terror(\"Could not find label \"+label);\n\t\t\t}\n\n\t\t\tvar compiledCondition = resultLines[i].type === \"skipif\" ? resultLines[i].condition : wsTrue;\n\n\t\t\tif (isWsFalse(compiledCondition) || gotoOffset === 0) {\n\t\t\t\t//Optimize away\n\t\t\t\tresultLines[i].type = \"optimized\";\n\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\t\t\t} else {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skipIf\", actionKw)+\"(\"+resultLines[i].condition+\", \"+gotoOffset+\");\\n\"+result;\n\t\t\t}\n\n\t\t} else if (resultLines[i].type === \"else\") {\n\t\t\t\n\t\t\t//Get number of indented lines within the else\n\t\t\tvar gotoOffset = 0;\n\t\t\tfor (var j = i+1; j < resultLines.length && resultLines[j].indentLevel > resultLines[i].indentLevel; j++) {\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t}\n\n\t\t\tif (gotoOffset === 0) {\n\t\t\t\terror(\"Else instruction must have at least one sub-instruction\");\n\t\t\t}\n\n\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\n\n\t\t} else if (resultLines[i].type === \"fakeelse\") {\n\t\t\t\n\t\t\tvar gotoOffset = 0;\n\n\t\t\t//If the line following the \"fake else\" is \"other\" then it's a special elif.\n\t\t\tif (resultLines[i+1].type === \"other\") {\n\t\t\t\tgotoOffset++;\n\t\t\t}\n\n\t\t\t//Go to the end of the elif/else chain.\n\t\t\t//Stop when encountering a line which type is not \"else\", or preceded by a \"fakeelse\", that is not on a greater indentation level than the current line.\n\t\t\tfor (var j = i+1+gotoOffset; j < resultLines.length; j++) {\n\t\t\t\tconsole.log(resultLines[j]);\n\t\t\t\tif (resultLines[j].indentLevel <= resultLines[i].indentLevel \n\t\t\t\t\t\t&& resultLines[j-1].type !== \"fakeelse\" \n\t\t\t\t\t\t&& resultLines[j-1].type !== \"fakeghostelse\" \n\t\t\t\t\t\t&& resultLines[j].type !== \"else\" \n\t\t\t\t\t\t&& resultLines[j].type !== \"fakeelse\" \n\t\t\t\t\t\t&& resultLines[j].type !== \"ghostelse\"\n\t\t\t\t\t\t&& resultLines[j].type !== \"fakeghostelse\") {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t}\n\n\t\t\tif (gotoOffset === 0) {\n\t\t\t\terror(\"Parser broke (offset for fake else is 0)\");\n\t\t\t}\n\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\t\t\t\n\t\t} else {\n\t\t\terror(\"Unhandled rule line type \"+resultLines[i].type);\n\t\t}\n\t}\n\t\n\treturn result;\n}", "title": "" }, { "docid": "47f283ddb2ce62809caa49c050b417ba", "score": "0.53253436", "text": "function parseInstructions(lines, nbDo) {\n\n\t//Note: a \"fake\" else is the else that is generated for an elif.\n\t//A \"ghost\" else is an else that does not generate a \"skip\" (if the previous 'if' didn't have its condition inverted).\n\n\t//Array of objects: {\n\t//\t\"type\": \"if\"|\"else\"|\"fakeelse\"|\"ghostelse\"|\"fakeghostelse\"|\"skip\"|\"skipif\"|\"label\"|\"other\"|\"forloop\"|\"optimized\"\n\t//\t\"condition\": compiled content of the condition, if type not in [\"label\", \"other\"] or \"skip\" is not a skip if\n\t//\t\"content\": compiled content of the instruction\n\t//\t\"label\": if type == \"skip\", the label to search for, if type == \"label\", the name of the label\n\t//\t\"indentLevel\": the indent level of the line\n\t//\t\"fileStack\": the file stack of the first token of the line\n\t//}\n\tvar resultLines = [];\n\n\t//Do a first pass to compile lines and to fill the resultLines array.\n\tfor (var i = 0; i < lines.length; i++) {\n\n\t\t\n\t\tif (lines[i].tokens.length === 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t\n\n\t\tvar currentResultLineType = undefined;\n\t\tvar currentResultLineContent = undefined;\n\t\tvar currentResultLineCondition = undefined;\n\t\tvar currentResultLineLabel = undefined;\n\t\tvar skipNextLine = false;\n\t\tfileStack = lines[i].tokens[0].fileStack;\n\n\t\t//As we already handled all \"do\" actions before calling this function, encountering a \"do\" means it can't be at the beginning of the rule.\n\t\tif (lines[i].tokens[0].text === \"do\") {\n\t\t\terror(\"Do instructions must be at the beginning of the rule\");\n\t\t}\n\n\n\t\t\n\t\t//Check for \"if\"\n\t\tif (lines[i].tokens[0].text === \"if\" || lines[i].tokens[0].text === \"elif\") {\n\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text !== ':') {\n\t\t\t\terror(\"If/Elif statement must end with ':'\");\n\t\t\t}\n\n\t\t\tvar condition = lines[i].tokens.slice(1, lines[i].tokens.length-1);\n\t\t\tif (condition.length === 0) {\n\t\t\t\terror(\"If/Elif statement must have a condition\");\n\t\t\t}\n\n\t\t\tif (i+1 >= lines.length) {\n\t\t\t\terror(\"If/Elif instruction must have at least one sub-instruction\");\n\t\t\t}\n \n\t\t\tif (lines[i+1].tokens[0].text === \"goto\") {\n\t\t\t\tif (lines[i+1].tokens.length < 2) {\n\t\t\t\t\terror(\"Malformed goto\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t//Check if the goto is of the form \"goto loc+xxx\"\n\t\t\t\tif (lines[i+1].tokens[1].text === \"loc\") {\n\t\t\t\t\tvar skipIfOffset = parse(lines[i+1].tokens.slice(3))\n\t\t\t\t\tvar compiledCondition = parse(condition);\n\t\t\t\t\tif (isWsFalse(compiledCondition) || isWs0(skipIfOffset)) {\n\t\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_skip\", actionKw)+\"(\"+skipIfOffset+\")\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_skipIf\", actionKw)+\"(\"+compiledCondition+\", \"+skipIfOffset+\")\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//Search for label\n\t\t\t\t\tvar label = lines[i+1].tokens[1].text;\n\t\t\t\t\tcurrentResultLineType = \"skipif\";\n\t\t\t\t\tcurrentResultLineCondition = parse(condition);\n\t\t\t\t\tcurrentResultLineLabel = label;\n\t\t\t\t}\n\t\t\t\tskipNextLine = true;\n\t\t\t\t\n\t\t\t} else if (lines[i+1].tokens[0].text === \"return\" || lines[i+1].tokens[0].text === \"continue\") {\n\t\t\t\tvar ifFunction = \"\";\n\t\t\t\tif (lines[i+1].tokens[0].text === \"return\") {\n\t\t\t\t\tifFunction = \"_abortIf\";\n\t\t\t\t} else {\n\t\t\t\t\tifFunction = \"_loopIf\";\n\t\t\t\t}\n\n\t\t\t\tif (condition[0].text === \"RULE_CONDITION\" && condition.length === 1) {\n\t\t\t\t\t\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(ifFunction+\"ConditionIsTrue\", actionKw);\n\n\t\t\t\t} else if (condition[0].text === \"not\" && condition[1].text === \"RULE_CONDITION\" && condition.length === 2) {\n\t\t\t\t\t\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(ifFunction+\"ConditionIsFalse\", actionKw);\n\n\t\t\t\t} else {\n\t\t\t\t\tvar compiledCondition = parse(condition);\n\t\t\t\t\tif (isWsFalse(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tif (ifFunction === \"_abortIf\") {\n\t\t\t\t\t\t\tcurrentResultLineContent = tows(\"return\", actionKw);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentResultLineContent = tows(\"_loop\", actionKw);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(ifFunction, actionKw)+\"(\"+compiledCondition+\")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tskipNextLine = true;\n\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tcurrentResultLineType = \"if\";\n\t\t\t\tcurrentResultLineCondition = parse(condition, {invertCondition: true, isCondition: true});\n\n\t\t\t}\n\n\t\t\tif (lines[i].tokens[0].text === \"elif\") {\n\t\t\t\tif (resultLines[resultLines.length-1].indentLevel <= lines[i].indentLevel) {\n\t\t\t\t\tresultLines.push({\n\t\t\t\t\t\ttype: \"fakeghostelse\",\n\t\t\t\t\t\tindentLevel: lines[i].indentLevel,\n\t\t\t\t\t\tfileStack: fileStack,\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tresultLines.push({\n\t\t\t\t\t\ttype: \"fakeelse\",\n\t\t\t\t\t\tindentLevel: lines[i].indentLevel,\n\t\t\t\t\t\tfileStack: fileStack,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t//Check for \"else\"\n\t\t} else if (lines[i].tokens[0].text === \"else\") {\n\t\t\t\n\t\t\tif (lines[i].tokens.length !== 2 || lines[i].tokens[1].text !== ':') {\n\t\t\t\terror(\"Else instruction must be 'else:'\");\n\t\t\t}\n\n\t\t\tif (i === 0) {\n\t\t\t\terror(\"Found 'else', but no 'if'\");\n\t\t\t} else if (resultLines[resultLines.length-1].indentLevel <= lines[i].indentLevel) {\n\t\t\t\t//If this is the case, then there is no need to replace the else for a \"skip\" as the previous if wasn't inverted.\n\t\t\t\tcurrentResultLineType = \"ghostelse\";\n\t\t\t} else {\n\t\t\t\tcurrentResultLineType = \"else\";\n\t\t\t}\n\n\t\t//Check for \"for\"\n\t\t} else if (lines[i].tokens[0].text === \"for\") {\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text !== ':') {\n\t\t\t\terror(\"For instruction must end with ':'\");\n\t\t\t}\n\t\t\t\n\t\t\tvar inOperands = splitTokens(lines[i].tokens.slice(1, lines[i].tokens.length-1), \"in\", false);\n\t\t\tif (inOperands.length !== 2) {\n\t\t\t\terror(\"For instruction must contain 'in'\");\n\t\t\t} else if (inOperands[0].length !== 1) {\n\t\t\t\terror(\"There can only be 1 token between 'for' and 'in'\");\n\t\t\t}\n\t\t\tvar forVarName = inOperands[0][0].text;\n\t\t\tif (forLoopVariables[forVarName] !== undefined) {\n\t\t\t\terror(\"Variable \"+forVarName+\" is already used\");\n\t\t\t}\n\t\t\tforLoopVariables[forVarName] = inOperands[1];\n\t\t\t//Check amount of lines\n\t\t\tvar forIndent = lines[i].indentLevel;\n\t\t\tvar j = i+1;\n\t\t\tfor (; j < lines.length && lines[j].indentLevel > forIndent; j++);\n\t\t\tif (j === i) {\n\t\t\t\terror(\"For loop contains no instructions\");\n\t\t\t}\n\t\t\tforLoopTimers.push([j, forVarName]);\n\n\t\t\tcurrentResultLineType = \"forloop\";\n\t\t\t\n\t\t//Check for \"while\"\n\t\t} else if (lines[i].tokens[0].text === \"while\") {\n\n\t\t\tif (nbDo === 0) {\n\t\t\t\terror(\"Found 'while' without matching 'do'\");\n\t\t\t}\n\t\t\tnbDo--;\n\n\t\t\tif (lines[i].tokens.length === 1) {\n\t\t\t\terror(\"While what?\");\n\t\t\t}\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text === \":\") {\n\t\t\t\terror(\"While statement must not end by a colon\");\n\t\t\t}\n\t\t\tif (lines[i].tokens[1].text === \"true\" && lines[i].tokens.length === 2) {\n\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\tcurrentResultLineContent = tows(\"_loop\", actionKw);\n\n\t\t\t} else {\n\t\t\t\tif (lines[i].tokens[1].text === \"RULE_CONDITION\") {\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_loopIfConditionIsTrue\", actionKw);\n\n\t\t\t\t} else if (lines[i].tokens[1].text === \"not\" && lines[i].tokens[2].text === \"RULE_CONDITION\") {\n\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_loopIfConditionIsFalse\", actionKw);\n\n\t\t\t\t} else {\n\t\t\t\t\tvar compiledCondition = parse(lines[i].tokens.slice(1));\n\t\t\t\t\tif (isWsFalse(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_loop\", actionKw);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t\t\t\tcurrentResultLineContent = tows(\"_loopIf\", actionKw)+\"(\"+compiledCondition+\")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t//Check goto\n\t\t} else if (lines[i].tokens[0].text === 'goto') {\n\t\t\tif (lines[i].tokens.length < 2) {\n\t\t\t\terror(\"Malformed goto\");\n\t\t\t}\n\t\t\t\n\t\t\t//Check if the goto is of the form \"goto loc+xxx\"\n\t\t\tif (lines[i].tokens[1].text === \"loc\") {\n\t\t\t\tskipOffset = parse(lines[i].tokens.slice(3));\n\n\t\t\t\tvar compiledCondition = parse(condition);\n\t\t\t\tif (isWsFalse(compiledCondition) || isWs0(skipIfOffset)) {\n\t\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_skip\", actionKw)+\"(\"+skipIfOffset+\")\";\n\t\t\t\t} else {\n\t\t\t\t\tcurrentResultLineType=\"other\";\n\t\t\t\t\tcurrentResultLineContent = tows(\"_skipIf\", actionKw)+\"(\"+compiledCondition+\", \"+skipIfOffset+\")\";\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tvar label = lines[i].tokens[1].text;\n\t\t\t\tcurrentResultLineType = \"skip\";\n\t\t\t\tcurrentResultLineLabel = label;\n\t\t\t}\n\n\t\t//Check for del\n\t\t} else if (lines[i].tokens[0].text === 'del') {\n\t\t\t\t\t\t\n\t\t\tif (lines[i].tokens[lines[i].tokens.length-1].text !== ']') {\n\t\t\t\terror(\"Del keyword must be followed by an array membership\");\n\t\t\t}\n\t\t\t\n\t\t\tvar bracketPos = getTokenBracketPos(lines[i].tokens);\n\t\t\t\n\t\t\tvar variable = lines[i].tokens.slice(1, bracketPos[bracketPos.length-2])\n\t\t\tvar member = lines[i].tokens.slice(bracketPos[bracketPos.length-2]+1, lines[i].tokens.length-1)\n\t\t\t\n\t\t\tdebug(\"Parsing del keyword with var = '\"+dispTokens(variable)+\"' and member = '\"+dispTokens(member)+\"'\");\n\t\t\t\n\t\t\tcurrentResultLineType = \"other\";\n\t\t\tcurrentResultLineContent = parseAssignment(variable, member, true, \"_removeFromArrayByIndex\");\n\t\t\t\n\t\t//Check for label\n\t\t} else if (lines[i].tokens[lines[i].tokens.length-1].text === ':') {\n\t\t\tif (lines[i].tokens.length !== 2) {\n\t\t\t\terror(\"Incorrectly formatted label\");\n\t\t\t}\n\t\t\tvar label = lines[i].tokens[0].text;\n\t\t\tcurrentResultLineType = \"label\";\n\t\t\tcurrentResultLineLabel = label;\n\n\t\t//Any other instruction\n\t\t} else {\n\t\t\tcurrentResultLineContent = parse(lines[i].tokens, {\"isWholeInstruction\":true});\n\t\t\tif (currentResultLineContent.length > 0) {\n\t\t\t\tcurrentResultLineType = \"other\";\n\t\t\t} else {\n\t\t\t\tcurrentResultLineType = \"optimized\";\n\t\t\t}\n\t\t}\n\n\t\tresultLines.push({\n\t\t\ttype: currentResultLineType,\n\t\t\tcondition: currentResultLineCondition,\n\t\t\tcontent: currentResultLineContent,\n\t\t\tlabel: currentResultLineLabel,\n\t\t\tindentLevel: lines[i].indentLevel,\n\t\t\tfileStack: lines[i].tokens[0].fileStack,\n\t\t});\n\n\t\t//Check for loop var timer\n\t\t//console.log(forLoopTimers);\n\t\t//console.log(i);\n\t\tfor (var j = 0; j < forLoopTimers.length; j++) {\n\t\t\tif (forLoopTimers[j][0] === i+1) {\n\t\t\t\tdelete forLoopVariables[forLoopTimers[j][1]];\n\t\t\t}\n\t\t}\n\n\t\tif (skipNextLine) {\n\t\t\ti++;\n\t\t}\n\t}\n\n\tlines = undefined;\n\tvar result = \"\";\n\n\tfunction getNbLinesForType(type) {\n\t\tif ([\"label\", \"ghostelse\", \"fakeghostelse\", \"forloop\", \"optimized\"].includes(type)) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t//Then, do a second pass to handle the \"if\"s.\n\t//Go in reverse, to be able to optimize away \"skip 0\" and still calculate the correct length.\n\tfor (var i = resultLines.length-1; i >= 0; i--) {\n\n\t\tfileStack = resultLines[i].fileStack;\n\n\t\tif (resultLines[i].type === \"other\") {\n\t\t\tresult = tabLevel(2)+resultLines[i].content+\";\\n\"+result;\n\n\t\t\tif (i > 0 && (resultLines[i-1].type === \"other\" || resultLines[i-1].type === \"skip\" || resultLines[i-1].type === \"label\")) {\n\t\t\t\tif (resultLines[i].indentLevel > resultLines[i-1].indentLevel) {\n\t\t\t\t\terror(\"Unexpected indent or unreachable code\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else if ([\"label\", \"ghostelse\", \"fakeghostelse\", \"forloop\", \"optimized\"].includes(resultLines[i].type)) {\n\t\t\t//do nothing\n\n\t\t} else if (resultLines[i].type === \"if\") {\n\t\t\t\n\t\t\tvar gotoOffset = 0;\n\t\t\tvar j = i+1;\n\n\t\t\t//Get number of indented lines within the if\n\t\t\tfor (; j < resultLines.length && resultLines[j].indentLevel > resultLines[i].indentLevel; j++) {\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t}\n\n\t\t\tif (j < resultLines.length && (resultLines[j].type === \"else\" || resultLines[j].type === \"fakeelse\")) {\n\t\t\t\tgotoOffset++;\n\t\t\t}\n\n\t\t\tvar compiledCondition = resultLines[i].condition;\n\n\t\t\tif (isWsFalse(compiledCondition) || gotoOffset === 0) {\n\t\t\t\t//Optimize away\n\t\t\t\tresultLines[i].type = \"optimized\";\n\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\t\t\t} else {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skipIf\", actionKw)+\"(\"+resultLines[i].condition+\", \"+gotoOffset+\");\\n\"+result;\n\t\t\t}\n\n\t\t} else if (resultLines[i].type === \"skip\" || resultLines[i].type === \"skipif\") {\n\t\t\t\n\t\t\tvar gotoOffset = 0;\n\t\t\tvar foundLabel = false;\n\t\t\t\n\t\t\tfor (var j = i+1; j < resultLines.length; j++) {\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t\tif (resultLines[j].type === \"label\" && resultLines[j].label === resultLines[i].label) {\n\t\t\t\t\tfoundLabel = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!foundLabel) {\n\t\t\t\terror(\"Could not find label \"+label);\n\t\t\t}\n\n\t\t\tvar compiledCondition = resultLines[i].type === \"skipif\" ? resultLines[i].condition : wsTrue;\n\n\t\t\tif (isWsFalse(compiledCondition) || gotoOffset === 0) {\n\t\t\t\t//Optimize away\n\t\t\t\tresultLines[i].type = \"optimized\";\n\t\t\t} else if (isWsTrue(compiledCondition)) {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\t\t\t} else {\n\t\t\t\tresult = tabLevel(2)+tows(\"_skipIf\", actionKw)+\"(\"+resultLines[i].condition+\", \"+gotoOffset+\");\\n\"+result;\n\t\t\t}\n\n\t\t} else if (resultLines[i].type === \"else\") {\n\t\t\t\n\t\t\t//Get number of indented lines within the else\n\t\t\tvar gotoOffset = 0;\n\t\t\tfor (var j = i+1; j < resultLines.length && resultLines[j].indentLevel > resultLines[i].indentLevel; j++) {\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t}\n\n\t\t\tif (gotoOffset === 0) {\n\t\t\t\terror(\"Else instruction must have at least one sub-instruction\");\n\t\t\t}\n\n\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\n\n\t\t} else if (resultLines[i].type === \"fakeelse\") {\n\t\t\t\n\t\t\tvar gotoOffset = 0;\n\n\t\t\t//If the line following the \"fake else\" is \"other\" then it's a special elif.\n\t\t\tif (resultLines[i+1].type === \"other\") {\n\t\t\t\tgotoOffset++;\n\t\t\t}\n\n\t\t\t//Go to the end of the elif/else chain.\n\t\t\t//Stop when encountering a line which type is not \"else\", or preceded by a \"fakeelse\", that is not on a greater indentation level than the current line.\n\t\t\tfor (var j = i+1+gotoOffset; j < resultLines.length; j++) {\n\t\t\t\tconsole.log(resultLines[j]);\n\t\t\t\tif (resultLines[j].indentLevel <= resultLines[i].indentLevel \n\t\t\t\t\t\t&& resultLines[j-1].type !== \"fakeelse\" \n\t\t\t\t\t\t&& resultLines[j-1].type !== \"fakeghostelse\" \n\t\t\t\t\t\t&& resultLines[j].type !== \"else\" \n\t\t\t\t\t\t&& resultLines[j].type !== \"fakeelse\" \n\t\t\t\t\t\t&& resultLines[j].type !== \"ghostelse\"\n\t\t\t\t\t\t&& resultLines[j].type !== \"fakeghostelse\") {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tgotoOffset += getNbLinesForType(resultLines[j].type);\n\t\t\t}\n\n\t\t\tif (gotoOffset === 0) {\n\t\t\t\terror(\"Parser broke (offset for fake else is 0)\");\n\t\t\t}\n\t\t\tresult = tabLevel(2)+tows(\"_skip\", actionKw)+\"(\"+gotoOffset+\");\\n\"+result;\n\t\t\t\n\t\t} else {\n\t\t\terror(\"Unhandled rule line type \"+resultLines[i].type);\n\t\t}\n\t}\n\t\n\treturn result;\n}", "title": "" }, { "docid": "cf8cc525c688751ea8ca1fac47c499b9", "score": "0.53183025", "text": "function whileTest() {\n var i;\n\n i = 5;\n while (i--) {\n print(i);\n }\n print('final', i);\n\n i = 0;\n while (i--) {\n print(i);\n }\n print('final', i);\n\n i = 5;\n while (i--) {\n print(i);\n continue;\n }\n print('final', i);\n\n i = 5;\n while (i--) {\n print(i);\n if (i >= 4) { continue; }\n if (i == 1) { break; }\n }\n print('final', i);\n\n i = 5;\n while (print('in while'), i--) {\n print(i);\n }\n print('final', i);\n}", "title": "" }, { "docid": "a00fd1058b6fe67c5a998120c54d3581", "score": "0.5317616", "text": "function forLoopHead(d, b, v, reps)\n{\n var sInit = Random.index(varBinderFor) + v + \" = 0\";\n var sCond = v + \" < \" + reps;\n var sNext = \"++\" + v;\n\n while (rnd(10) === 0)\n sInit += \", \" + makeLetHeadItem(d - 2, b);\n while (rnd(10) === 0)\n sInit += \", \" + makeExpr(d - 2, b); // NB: only makes sense if our varBinder is \"\"\n\n while (rnd(20) === 0)\n sCond = sCond + \" && (\" + makeExpr(d - 2, b) + \")\";\n while (rnd(20) === 0)\n sCond = \"(\" + makeExpr(d - 2, b) + \") && \" + sCond;\n\n while (rnd(20) === 0)\n sNext = sNext + \", \" + makeExpr(d - 2, b);\n while (rnd(20) === 0)\n sNext = makeExpr(d - 2, b) + \", \" + sNext;\n\n return \"for (\" + sInit + \"; \" + sCond + \"; \" + sNext + \")\";\n}", "title": "" }, { "docid": "a00fd1058b6fe67c5a998120c54d3581", "score": "0.5317616", "text": "function forLoopHead(d, b, v, reps)\n{\n var sInit = Random.index(varBinderFor) + v + \" = 0\";\n var sCond = v + \" < \" + reps;\n var sNext = \"++\" + v;\n\n while (rnd(10) === 0)\n sInit += \", \" + makeLetHeadItem(d - 2, b);\n while (rnd(10) === 0)\n sInit += \", \" + makeExpr(d - 2, b); // NB: only makes sense if our varBinder is \"\"\n\n while (rnd(20) === 0)\n sCond = sCond + \" && (\" + makeExpr(d - 2, b) + \")\";\n while (rnd(20) === 0)\n sCond = \"(\" + makeExpr(d - 2, b) + \") && \" + sCond;\n\n while (rnd(20) === 0)\n sNext = sNext + \", \" + makeExpr(d - 2, b);\n while (rnd(20) === 0)\n sNext = makeExpr(d - 2, b) + \", \" + sNext;\n\n return \"for (\" + sInit + \"; \" + sCond + \"; \" + sNext + \")\";\n}", "title": "" }, { "docid": "d1ddc6f540a566f94be4b6efcb46aaf8", "score": "0.5294402", "text": "function loopInfinito() {\n while (true) { }\n}", "title": "" }, { "docid": "d1ddc6f540a566f94be4b6efcb46aaf8", "score": "0.5294402", "text": "function loopInfinito() {\n while (true) { }\n}", "title": "" }, { "docid": "fcf752389633baa92b05f51c003d96e9", "score": "0.52920246", "text": "static createIn(container) {\n internal.createInVersionCheck(container.model, WhileLoopCondition.structureTypeName, { start: \"9.0.4\" });\n return internal.instancehelpers.createElement(container, WhileLoopCondition, \"loopSource\", false);\n }", "title": "" }, { "docid": "5bb6a81e26032a113b2e86bc7aef4041", "score": "0.52736783", "text": "function supportsUnlabeledBreak(block){return block.kind===2/* Switch */||block.kind===3/* Loop */;}", "title": "" }, { "docid": "cb253037652e07e2ebdaeee170b0bdce", "score": "0.5272872", "text": "function isWhile(token) {\n return token == HABILIS.FUNCTIONS['while'];\n}", "title": "" }, { "docid": "7b8ec3e746c2a148056c942920412efb", "score": "0.5268348", "text": "repeatUntil(cond) {\n return Arrow.fix(alpha => this.seq(cond.ifFalse(alpha)));\n }", "title": "" }, { "docid": "9dcfdf94e76dc9516e5d1959da2d7d6c", "score": "0.5257071", "text": "function parseStatement() {\n\t if (tokType === _slash || tokType === _assign && tokVal == \"/=\")\n\t readToken(true);\n\n\t var starttype = tokType, node = startNode();\n\n\t // Most types of statements are recognized by the keyword they\n\t // start with. Many are trivial to parse, some require a bit of\n\t // complexity.\n\n\t switch (starttype) {\n\t case _break: case _continue:\n\t next();\n\t var isBreak = starttype === _break;\n\t if (eat(_semi) || canInsertSemicolon()) node.label = null;\n\t else if (tokType !== _name) unexpected();\n\t else {\n\t node.label = parseIdent();\n\t semicolon();\n\t }\n\n\t // Verify that there is an actual destination to break or\n\t // continue to.\n\t for (var i = 0; i < labels.length; ++i) {\n\t var lab = labels[i];\n\t if (node.label == null || lab.name === node.label.name) {\n\t if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n\t if (node.label && isBreak) break;\n\t }\n\t }\n\t if (i === labels.length) raise(node.start, \"Unsyntactic \" + starttype.keyword);\n\t return finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n\n\t case _debugger:\n\t next();\n\t semicolon();\n\t return finishNode(node, \"DebuggerStatement\");\n\n\t case _do:\n\t next();\n\t labels.push(loopLabel);\n\t node.body = parseStatement();\n\t labels.pop();\n\t expect(_while);\n\t node.test = parseParenExpression();\n\t semicolon();\n\t return finishNode(node, \"DoWhileStatement\");\n\n\t // Disambiguating between a `for` and a `for`/`in` loop is\n\t // non-trivial. Basically, we have to parse the init `var`\n\t // statement or expression, disallowing the `in` operator (see\n\t // the second parameter to `parseExpression`), and then check\n\t // whether the next token is `in`. When there is no init part\n\t // (semicolon immediately after the opening parenthesis), it is\n\t // a regular `for` loop.\n\n\t case _for:\n\t next();\n\t labels.push(loopLabel);\n\t expect(_parenL);\n\t if (tokType === _semi) return parseFor(node, null);\n\t if (tokType === _var) {\n\t var init = startNode();\n\t next();\n\t parseVar(init, true);\n\t finishNode(init, \"VariableDeclaration\");\n\t if (init.declarations.length === 1 && eat(_in))\n\t return parseForIn(node, init);\n\t return parseFor(node, init);\n\t }\n\t var init = parseExpression(false, true);\n\t if (eat(_in)) {checkLVal(init); return parseForIn(node, init);}\n\t return parseFor(node, init);\n\n\t case _function:\n\t next();\n\t return parseFunction(node, true);\n\n\t case _if:\n\t next();\n\t node.test = parseParenExpression();\n\t node.consequent = parseStatement();\n\t node.alternate = eat(_else) ? parseStatement() : null;\n\t return finishNode(node, \"IfStatement\");\n\n\t case _return:\n\t if (!inFunction) raise(tokStart, \"'return' outside of function\");\n\t next();\n\n\t // In `return` (and `break`/`continue`), the keywords with\n\t // optional arguments, we eagerly look for a semicolon or the\n\t // possibility to insert one.\n\n\t if (eat(_semi) || canInsertSemicolon()) node.argument = null;\n\t else { node.argument = parseExpression(); semicolon(); }\n\t return finishNode(node, \"ReturnStatement\");\n\n\t case _switch:\n\t next();\n\t node.discriminant = parseParenExpression();\n\t node.cases = [];\n\t expect(_braceL);\n\t labels.push(switchLabel);\n\n\t // Statements under must be grouped (by label) in SwitchCase\n\t // nodes. `cur` is used to keep the node that we are currently\n\t // adding statements to.\n\n\t for (var cur, sawDefault; tokType != _braceR;) {\n\t if (tokType === _case || tokType === _default) {\n\t var isCase = tokType === _case;\n\t if (cur) finishNode(cur, \"SwitchCase\");\n\t node.cases.push(cur = startNode());\n\t cur.consequent = [];\n\t next();\n\t if (isCase) cur.test = parseExpression();\n\t else {\n\t if (sawDefault) raise(lastStart, \"Multiple default clauses\"); sawDefault = true;\n\t cur.test = null;\n\t }\n\t expect(_colon);\n\t } else {\n\t if (!cur) unexpected();\n\t cur.consequent.push(parseStatement());\n\t }\n\t }\n\t if (cur) finishNode(cur, \"SwitchCase\");\n\t next(); // Closing brace\n\t labels.pop();\n\t return finishNode(node, \"SwitchStatement\");\n\n\t case _throw:\n\t next();\n\t if (newline.test(input.slice(lastEnd, tokStart)))\n\t raise(lastEnd, \"Illegal newline after throw\");\n\t node.argument = parseExpression();\n\t semicolon();\n\t return finishNode(node, \"ThrowStatement\");\n\n\t case _try:\n\t next();\n\t node.block = parseBlock();\n\t node.handler = null;\n\t if (tokType === _catch) {\n\t var clause = startNode();\n\t next();\n\t expect(_parenL);\n\t clause.param = parseIdent();\n\t if (strict && isStrictBadIdWord(clause.param.name))\n\t raise(clause.param.start, \"Binding \" + clause.param.name + \" in strict mode\");\n\t expect(_parenR);\n\t clause.guard = null;\n\t clause.body = parseBlock();\n\t node.handler = finishNode(clause, \"CatchClause\");\n\t }\n\t node.guardedHandlers = empty;\n\t node.finalizer = eat(_finally) ? parseBlock() : null;\n\t if (!node.handler && !node.finalizer)\n\t raise(node.start, \"Missing catch or finally clause\");\n\t return finishNode(node, \"TryStatement\");\n\n\t case _var:\n\t next();\n\t parseVar(node);\n\t semicolon();\n\t return finishNode(node, \"VariableDeclaration\");\n\n\t case _while:\n\t next();\n\t node.test = parseParenExpression();\n\t labels.push(loopLabel);\n\t node.body = parseStatement();\n\t labels.pop();\n\t return finishNode(node, \"WhileStatement\");\n\n\t case _with:\n\t if (strict) raise(tokStart, \"'with' in strict mode\");\n\t next();\n\t node.object = parseParenExpression();\n\t node.body = parseStatement();\n\t return finishNode(node, \"WithStatement\");\n\n\t case _braceL:\n\t return parseBlock();\n\n\t case _semi:\n\t next();\n\t return finishNode(node, \"EmptyStatement\");\n\n\t // If the statement does not start with a statement keyword or a\n\t // brace, it's an ExpressionStatement or LabeledStatement. We\n\t // simply start parsing an expression, and afterwards, if the\n\t // next token is a colon and the expression was a simple\n\t // Identifier node, we switch to interpreting it as a label.\n\n\t default:\n\t var maybeName = tokVal, expr = parseExpression();\n\t if (starttype === _name && expr.type === \"Identifier\" && eat(_colon)) {\n\t for (var i = 0; i < labels.length; ++i)\n\t if (labels[i].name === maybeName) raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n\t var kind = tokType.isLoop ? \"loop\" : tokType === _switch ? \"switch\" : null;\n\t labels.push({name: maybeName, kind: kind});\n\t node.body = parseStatement();\n\t labels.pop();\n\t node.label = expr;\n\t return finishNode(node, \"LabeledStatement\");\n\t } else {\n\t node.expression = expr;\n\t semicolon();\n\t return finishNode(node, \"ExpressionStatement\");\n\t }\n\t }\n\t }", "title": "" }, { "docid": "1ed7d94effb34698f962d30a64b70f30", "score": "0.524516", "text": "function beginScriptLoopBlock(){beginBlock({kind:3/* Loop */,isScript:true,breakLabel:-1,continueLabel:-1});}", "title": "" }, { "docid": "14c2f8b04b7b40455ea3524e8d1fce2a", "score": "0.5203828", "text": "function whileLoop(number) {\n \n while ( number > 0 ) {\n console.log(--number);\n }\n \n return \"done\"\n //I think in this task the test is slightly wrong. The task states the log should begin at n and end at 0, which are n+1 runs. However the test complains about n+1 be too much runs.\n \n}", "title": "" }, { "docid": "9297eb32b228cef415684becd60aea52", "score": "0.5188412", "text": "function GeneralLoops() {\n /// / for loop\n /// / iteration skippen of extra acties dmv if\n // for (let i = 0; i < 10; i++) {\n // if (i === 2) {\n // console.log(\"Mijn favoriete nummmer is \" + i);\n // // continue eindigt vroegtijdig de huidige iteratie\n // // nu zal er geen console.log(2) worden geprint\n // continue;\n // }\n // console.log(i);\n // if (i === 5){\n // // Break stopt de for loop compleet\n // console.log('stop')\n // break;\n // }\n // }\n /// / while loop\n // let i = 0;\n // while (i < 6) {\n // console.log(\"while \" + i);\n // i++;\n // }\n /// / do while loop\n /// / anders dan een while loop. omdat het minimaal 1x draait\n // let i = 0;\n // do {\n // console.log(\"Number \" + i);\n // i++;\n // } while (i < 10);\n // for loop door een array\n // const cars = [\"ford\", \"chevy\", \"honda\"];\n // for (let i = 0; i < cars.length; i++){\n // console.log('car ' + cars[i]);\n // }\n /// / Foreach door array\n /// / functie heeft maximaal 3 inputs. 1 is nodig namelijk de huidige iterator genaamd car, 2 is de index van de array, 3de waarde is de complete array\n // cars.forEach(function(car, index, array) {\n // console.log(`Car=${car} index=${index}`);\n // console.log(array);\n // });\n /// / Map gebruiken op array.\n /// / We gaan met map de id waardes uit de objecten in de array halen en die gaan we in de const ids zetten\n // const users = [\n // {id: 1, name:'bart'},\n // {id: 2, name:'jaap'},\n // {id: 3, name:'peter'},\n // {id: 4, name:'steve'}\n // ];\n // const ids = users.map(function(user){\n // return user.id;\n // });\n // console.log(ids);\n /// / For-in loop\n /// / Voor ieder key value pair in een object\n /// / x is de key en user[x] is de value\n // const user = {\n // firstName: \"Bart\",\n // lastName: \"Klaasse\",\n // age: 5\n // };\n // for (let x in user) {\n // console.log(`${x} : ${user[x]}`);\n // }\n}", "title": "" }, { "docid": "403f6200b120d7bb453139a4165486db", "score": "0.5166135", "text": "function beginLoopBlock(continueLabel) {\n var breakLabel = defineLabel();\n beginBlock({\n kind: 3 /* Loop */,\n isScript: false,\n breakLabel: breakLabel,\n continueLabel: continueLabel,\n });\n return breakLabel;\n }", "title": "" }, { "docid": "403f6200b120d7bb453139a4165486db", "score": "0.5166135", "text": "function beginLoopBlock(continueLabel) {\n var breakLabel = defineLabel();\n beginBlock({\n kind: 3 /* Loop */,\n isScript: false,\n breakLabel: breakLabel,\n continueLabel: continueLabel,\n });\n return breakLabel;\n }", "title": "" }, { "docid": "e6c1d1069dfff47fb4591795b68e949f", "score": "0.51645863", "text": "enterDoStatement(ctx) {\n\t}", "title": "" }, { "docid": "aeca9e1eebe5d26da4531035e3666b5b", "score": "0.51545477", "text": "function whileLoop(n) {\n while (n > 0) {\n console.log(n--);\n }\n \n if (n === 0) {\n return 'done';\n }\n}", "title": "" }, { "docid": "5d4c8a934df7fbd51c576584dd85d1be", "score": "0.5153347", "text": "function beginScriptLoopBlock() {\n beginBlock({\n kind: 3 /* Loop */,\n isScript: true,\n breakLabel: -1,\n continueLabel: -1\n });\n }", "title": "" }, { "docid": "5d4c8a934df7fbd51c576584dd85d1be", "score": "0.5153347", "text": "function beginScriptLoopBlock() {\n beginBlock({\n kind: 3 /* Loop */,\n isScript: true,\n breakLabel: -1,\n continueLabel: -1\n });\n }", "title": "" }, { "docid": "1269fcbbbe862273ea6711c8a13fae5b", "score": "0.5153178", "text": "function checkLoop() {\n if (obj.loopState) {\n loop();\n } else {\n noLoop();\n }\n}", "title": "" }, { "docid": "23f40d490abcecfd83b52f2e95a34553", "score": "0.51440805", "text": "while (regExp) {return setInstanceProp(this, '_while', regExp)}", "title": "" }, { "docid": "7315cfbe639fd90958cfdd33715de8ea", "score": "0.5125816", "text": "function whileA(){ //while é movido a condição\n\n\tvar i = 0;\n\n\twhile(i < 10){ // enquanto i for menor doque 10, print valor de i na tela\n\t\tconsole.log(i);\n\t\ti++;\n\t}\n\n\n}", "title": "" }, { "docid": "575754a00702581c2b8c032bbb2617d1", "score": "0.5120235", "text": "function endLoopBlock(){ts.Debug.assert(peekBlockKind()===3/* Loop */);var block=endBlock();var breakLabel=block.breakLabel;if(!block.isScript){markLabel(breakLabel);}}", "title": "" }, { "docid": "f0cda125e38af01f1f9087e2ba75f563", "score": "0.5089294", "text": "function doWhileLoop(array) {\nvar i = 0;\n\n\tfunction incrementVariable() {\n\t i = i + 1;\n\t}\n//\n\tdo {\n\t\tconsole.log('array.length = ' + array.length + ' and i = ' + i);\n\t\tarray = array.slice(1);\n\t\tincrementVariable(); //Ask about get this calling !!\n\t}\n\n\twhile (array.length > 0 && i < 5);\n\n\treturn array;\n}", "title": "" }, { "docid": "1513f0e42ecbc48fbc5aaf3acaf5031b", "score": "0.50823253", "text": "get whileExpression() {\n return this.__whileExpression.get();\n }", "title": "" }, { "docid": "a4b0700ffb339391006a4a4540533020", "score": "0.5076788", "text": "function parseForStatement(node) {\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) return parseFor(node, null);\n if (tokType === _var || tokType === _let) {\n var init = startNode(), varKind = tokType.keyword, isLet = tokType === _let;\n next();\n parseVar(init, true, varKind);\n finishNode(init, \"VariableDeclaration\");\n if ((tokType === _in || (options.ecmaVersion >= 6 && isContextual(\"of\"))) && init.declarations.length === 1 &&\n !(isLet && init.declarations[0].init))\n return parseForIn(node, init);\n return parseFor(node, init);\n }\n var refShorthandDefaultPos = {start: 0};\n var init = parseExpression(true, refShorthandDefaultPos);\n if (tokType === _in || (options.ecmaVersion >= 6 && isContextual(\"of\"))) {\n toAssignable(init);\n checkLVal(init);\n return parseForIn(node, init);\n } else if (refShorthandDefaultPos.start) {\n unexpected(refShorthandDefaultPos.start);\n }\n return parseFor(node, init);\n }", "title": "" }, { "docid": "181d54707678b45cbc7bc7f7bfbe1b7c", "score": "0.5075902", "text": "function buclesWhile() \n\t{\n\t\t//Tipo While\n\t\tvar contador = 0;\n\t\twhile(contador < 10)\n\t\t{\n\t\t\tconsole.log(contador);\n\t\t\tcontador++;\n\t\t}\n\t\tconsole.log(\"\\n\");\n\t\t//While patras\n\t\tvar contador1 = 10;\n\t\twhile(contador1 > 0)\n\t\t{\n\t\t\tconsole.log(contador1);\n\t\t\tcontador1--;\n\t\t}\n\t}", "title": "" }, { "docid": "ee911bfd4aafefa205058786003c940e", "score": "0.5066591", "text": "function parseForStatement(node) {\n next();\n labels.push(loopLabel);\n expect(_parenL);\n if (tokType === _semi) return parseFor(node, null);\n if (tokType === _var || tokType === _let) {\n var init = startNode(),\n varKind = tokType.keyword,\n isLet = tokType === _let;\n next();\n parseVar(init, true, varKind);\n finishNode(init, \"VariableDeclaration\");\n if ((tokType === _in || (options.ecmaVersion >= 6 && tokType === _name && tokVal === \"of\")) && init.declarations.length === 1 && !(isLet && init.declarations[0].init))\n return parseForIn(node, init);\n return parseFor(node, init);\n }\n var init = parseExpression(false, true);\n if (tokType === _in || (options.ecmaVersion >= 6 && tokType === _name && tokVal === \"of\")) {\n checkLVal(init);\n return parseForIn(node, init);\n }\n return parseFor(node, init);\n }", "title": "" }, { "docid": "ae3c7c678757b6812ef2b2ddc5fd78a8", "score": "0.5065595", "text": "function countWithDoWhile(){\n let i = 0;\n let text = '';\n \n //Do\n do{\n text += `This number is now...${i}\\n`\n i++\n }\n while (i > 10)\n return text\n}", "title": "" }, { "docid": "e7db9b4118cea5d92908a2049c7adbf8", "score": "0.50580317", "text": "function style2A11() {\n var i,\n condition = true,\n length = 100;\n\n if ( condition ) {\n // statements\n }\n\n while ( condition ) {\n // statements\n }\n\n for ( i = 0; i < 100; i++ ) {\n // statements\n }\n\n // Even better:\n for ( i = 0; i < length; i++ ) {\n // statements\n }\n}", "title": "" }, { "docid": "0e68007c845e02a46686d2c8f262334e", "score": "0.5045884", "text": "parseLoops() {\n const loop = this.findNextLoopToParse()\n ;\n\n if ( !loop ) {\n return;\n }\n const [ localDataKey, , parentPropertyKey ] = loop.getAttribute( 'lw-repeat' ).split( ' ' )\n , parentElement = loop.parentNode\n , siblingsArray = this.findSiblings( loop )\n , parentScope = parentElement.$$scope || this.rootScope\n , dataCollection = parentScope[ parentPropertyKey ]\n ;\n\n loop.originalHtml = loop.outerHTML;\n dataCollection.forEach( ( data, index ) => {\n const newElementNeeded = !siblingsArray[ index ]\n ;\n let targetLoop\n ;\n\n if ( newElementNeeded ) {\n targetLoop = loop.cloneNode( true );\n } else {\n targetLoop = siblingsArray[ index ]\n }\n targetLoop.$$scope = new Scope( localDataKey, data, parentScope, index );\n parentScope.addChildren( targetLoop.$$scope );\n parentElement.appendChild( targetLoop );\n\n targetLoop.$$scope.addEventListener( () => {\n this.parseElement( targetLoop, true );\n targetLoop.$$scope.deleteChangeFlag();\n } );\n } );\n\n const newSiblingArray = this.findSiblings( loop )\n ;\n\n newSiblingArray.forEach( ( element, index ) => {\n const shouldBeRemoved = index >= dataCollection.length\n ;\n\n if ( shouldBeRemoved ) {\n element.parentNode.removeChild( element );\n } else {\n this.parseElement( element );\n }\n } );\n\n this.parseLoops();\n }", "title": "" }, { "docid": "f10ff81d01e3c8e5cac2bd7e37105674", "score": "0.50100785", "text": "stepRepeatStatement() {\n let state = this.stateStack[this.stateStack.length - 1];\n state.isLoop = true;\n let node = state.node;\n if (state.countHandled) {\n if (node.body) {\n if (state.infinite) {\n this.stateStack.push({node: node.body});\n } else {\n state.count--;\n if (state.count >= 0) {\n this.stateStack.push({node: node.body});\n } else {\n this.stateStack.pop();\n }\n }\n }\n } else {\n if (node.count) {\n // count specified\n if (state.countReady) {\n state.infinite = false;\n state.count = state.value;\n state.countHandled = true;\n } else {\n state.countReady = true;\n this.stateStack.push({node: node.count});\n }\n } else {\n state.infinite = true;\n state.countHandled = true;\n }\n }\n }", "title": "" }, { "docid": "f9b60d2138a1635b04388aaebedda401", "score": "0.5008703", "text": "function doLoop() {\n // create an empty message\n let message = \"\";\n // we want to log a message 5 times\n let i = 5;\n // execute this code block..\n do {\n message += `The number decreased to ${i} \\n`;\n // decrement i in each loop - so 5, 4, 3, 2, 1\n i--;\n } while (i > 0);\n // while i is more than 0 log something to the console\n console.log(message);\n}", "title": "" }, { "docid": "b2df053a5a36d2f3a014bfac628c2a68", "score": "0.4999766", "text": "function whileLoop(n) {\n while (n > 0) {\n console.log(n);\n --n; \n }\n return \"done\";\n}", "title": "" }, { "docid": "d7c14377a35c3d1fa2e097574f43e6d5", "score": "0.49741212", "text": "function whileLoop(n) {\n while (n > 0){\n console.log(--n)\n }\n return 'done'\n}", "title": "" }, { "docid": "926114400abc6e1ead9388dc9bbaddb2", "score": "0.497188", "text": "doLoop() {\n let currentLoopTS = new Date()\n let loopDelayCount = 1\n if (this.lastLoopTS) {\n loopDelayCount = (currentLoopTS - new Date(this.lastLoopTS)) / this.timeOutloop\n }\n this.lastLoopTS = currentLoopTS\n this.collect(loopDelayCount)\n this.currentTimer += (this.timeOutloop * loopDelayCount) / 1000\n this.LoopCount += loopDelayCount\n }", "title": "" }, { "docid": "f23eb7e327e827222ca6973e0d497b47", "score": "0.4968405", "text": "function dof(depth, rad, depthInfo, reps) {\n return new DoFLoop(expr_1.wrapInValue(depth), expr_1.wrapInValue(rad), expr_1.wrapInValue(depthInfo), reps);\n}", "title": "" }, { "docid": "22d16cc2dbe51671d6fe38e3ad3556c7", "score": "0.49651524", "text": "function whileLoop (n) {\n while (n >0) {\n console.log(n);\n n --;\n }\n return \"done\";\n}", "title": "" }, { "docid": "d17ce4f44b2a001f8b352a5c31e7a8b9", "score": "0.4958894", "text": "function parse_do_notation(nams) {\n function is_bind() {\n // TODO: this is ugly, improve\n var i = idx;\n while (i < code.length && is_spacy(code[i])) { ++i; } // skips ` `\n while (i < code.length && is_name_char(code[i])) { ++i; } // skips `x`\n while (i < code.length && is_spacy(code[i])) { ++i; } // skips ` `\n if (code[i] === \":\") return true; // found `:`\n if (code[i] === \"=\") return true; // found `=`\n return false;\n }\n var init = idx;\n var typed = false;\n if (match(\"{\", is_space) || (typed = match(\"{<\", is_space))) {\n if (typed) {\n var type = parse_term(nams);\n var skip = parse_exact(\">\");\n } else {\n var type = Hol(new_hole_name());\n }\n function parse_do_statement(nams) {\n if (match(\"var\")) {\n var name = parse_name();\n if (match(\":\")) {\n var vtyp = parse_term(nams);\n } else {\n var vtyp = Hol(new_hole_name());\n }\n var skip = parse_exact(\"=\");\n var call = parse_term(nams);\n var skip = match(\";\");\n var body = parse_do_statement(nams.concat([name]));\n return App(App(App(App(base_ref(\"bind\"), vtyp, true), type, true), call, false), Lam(name, null, body, false), false);\n } else if (match(\"throw;\")) {\n var skip = parse_exact(\"}\");\n return App(base_ref(\"throw\"), Hol(new_hole_name()), true);\n } else if (match(\"return \")) {\n var term = parse_term(nams);\n var skip = match(\";\");\n var skip = parse_exact(\"}\");\n return App(App(base_ref(\"return\"), Hol(new_hole_name()), true), term, false);\n } else {\n var term = parse_term(nams);\n var skip = match(\";\");\n if (match(\"}\")) {\n return term;\n } else {\n var body = parse_do_statement(nams.concat([name]));\n var vtyp = Hol(new_hole_name());\n return App(App(App(App(base_ref(\"bind\"), vtyp, true), type, true), term, false), Lam(name, null, body, false), false);\n }\n }\n };\n var result = parse_do_statement(nams);\n return result;\n }\n }", "title": "" } ]
a5e79b93ab050de554cdc03632cf9862
We fetch all leafs of the revision tree, and sort them based on tree length and whether they were deleted, undeleted documents with the longest revision tree (most edits) win The final sort algorithm is slightly documented in a sidebar here:
[ { "docid": "d8cda1d951d3743b12299931c455a137", "score": "0.54520583", "text": "function winningRev(metadata) {\n var winningId;\n var winningPos;\n var winningDeleted;\n var toVisit = metadata.rev_tree.slice();\n var node;\n while ((node = toVisit.pop())) {\n var tree = node.ids;\n var branches = tree[2];\n var pos = node.pos;\n if (branches.length) { // non-leaf\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i]});\n }\n continue;\n }\n var deleted = !!tree[1].deleted;\n var id = tree[0];\n // sort by deleted, then pos, then id\n if (!winningId || (winningDeleted !== deleted ? winningDeleted :\n winningPos !== pos ? winningPos < pos : winningId < id)) {\n winningId = id;\n winningPos = pos;\n winningDeleted = deleted;\n }\n }\n\n return winningPos + '-' + winningId;\n}", "title": "" } ]
[ { "docid": "fb0ae9dfb290a2a0f0a500654945efb7", "score": "0.60288596", "text": "treeSort (list, getKeyFuncParam) {\n const getKeyFunc = getKeyFuncParam || (x => x);\n var nextItems = service.corpusTree.slice(); // copies the array\n var sortedItems = [];\n while (nextItems.length > 0) {\n var currentItem = nextItems.shift();\n if (Array.isArray(currentItem['children']))\n nextItems = currentItem.children.concat(nextItems);\n for (var i = list.length - 1; i >= 0; i--) {\n if (currentItem.key == getKeyFunc(list[i])) {\n sortedItems.push(list[i]);\n list.splice(i, 1);\n }\n }\n }\n // if there are any items left, leave them unsorted at the end\n return sortedItems.concat(list);\n }", "title": "" }, { "docid": "f4555e9bce74f6da1fa23111d6691364", "score": "0.59048027", "text": "function treeSort(a, b) {\n var aa = (a.mode === gitModes.tree) ? a.name + \"/\" : a.name;\n var bb = (b.mode === gitModes.tree) ? b.name + \"/\" : b.name;\n return aa > bb ? 1 : aa < bb ? -1 : 0;\n}", "title": "" }, { "docid": "5b8f03500224e64370eb2ebe7c81e74e", "score": "0.5877816", "text": "function sortChildren(children){children.sort(compareChildren);}", "title": "" }, { "docid": "f3f176e78294b620d75aa1943c1ed62f", "score": "0.5780277", "text": "_sort()\n {\n let sortCols=this._sortColumns;\n if (sortCols !== undefined && sortCols.length === 0) return;\n\n let numSortCols = sortCols.length;\n if (numSortCols === 0) return;\n\n let simpleSort = (scol) => {\n return (a, b) => {\n if (DEBUG) console.log(`Checking col(${scol.colIndex}): ${a.$row.find('td:nth-child(1)').text()} AGAINST ${b.$row.find('td:nth-child(1)').text()}`);\n let result = 0;\n let x = a.$row.find(`td:nth-child(${scol.colIndex})`).text();\n let y = b.$row.find(`td:nth-child(${scol.colIndex})`).text();\n if (scol.sortType === DEFAULT.VALIDSORTTYPE.NUM) {\n x = Number(x);\n y = Number(y);\n }\n if (scol.sortOrder === DEFAULT.VALIDSORTORDER.ASC) {\n result = (x < y) ? -1 : (x === y) ? 0 : 1;\n }\n else {\n result = (x > y) ? -1 : (x === y) ? 0 : 1;\n }\n return result;\n };\n };\n let nodecb = (node, depth, sortCols) => {\n let numChildren = node.children.length;\n let sortCol = sortCols[0];\n if (numChildren < 2 || sortCol === undefined) return;\n\n let sortBy = (typeof sortCol.sortFn === 'function') ? sortCol.sortFn : simpleSort(sortCol);\n // Sort this node's children\n node.children.sort(sortBy);\n\n let numSortCols = sortCols.length;\n let prevSortColIndex = sortCol.colIndex;\n for (let sortIndex = 1; sortIndex < numSortCols; sortIndex++)\n {\n let gstart = 0;\n let dupFound = false;\n let inDup = false;\n for (let i = 1; i < numChildren; i++) {\n if (node.children[gstart].$row.find(`td:nth-child(${prevSortColIndex})`).text() ===\n node.children[i].$row.find(`td:nth-child(${prevSortColIndex})`).text()) {\n dupFound = true;\n inDup = true;\n }\n else if (inDup) {\n inDup = false;\n if (gstart != i) {\n let glen = i - gstart;\n if (glen >= 2) {\n sortBy = (typeof sortCol.sortFn === 'function') ? sortCol.sortFn : simpleSort(sortCols[sortIndex]);\n node.children.splice.apply(node.children, [gstart, 0].concat(node.children.splice(gstart, glen)\n .sort(sortBy)));\n }\n }\n }\n }\n }\n };\n\n\n this._treeWalk(this._tree, nodecb, 0, sortCols.slice(0));\n }", "title": "" }, { "docid": "f3260bf9fec96d7e369254f389a10596", "score": "0.57376885", "text": "getAllChildrenAsOrderedTree() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function* () {\n const setInfo = yield this.select(\"*\", \"customSortOrder\")();\n const tree = [];\n const ensureOrder = (terms, sorts, setSorts) => {\n // handle custom sort order\n let ordering = null;\n if (sorts === null && setSorts.length > 0) {\n ordering = [...setSorts];\n }\n else {\n const index = sorts.findIndex(v => v.setId === setInfo.id);\n if (index >= 0) {\n ordering = [...sorts[index].order];\n }\n }\n if (ordering !== null) {\n const orderedChildren = [];\n ordering.forEach(o => {\n const found = terms.find(ch => o === ch.id);\n if (found) {\n orderedChildren.push(found);\n }\n });\n // we have a case where if a set is ordered and a term is added to that set\n // AND the ordering information hasn't been updated the new term will not have\n // any associated ordering information. See #1547 which reported this. So here we\n // append any terms remaining in \"terms\" not in \"orderedChildren\" to the end of \"orderedChildren\"\n orderedChildren.push(...terms.filter(info => ordering.indexOf(info.id) < 0));\n return orderedChildren;\n }\n return terms;\n };\n const visitor = (source, parent) => Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function* () {\n const children = yield source.children.select(\"*\", \"customSortOrder\")();\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n const orderedTerm = Object.assign({ children: [], defaultLabel: child.labels.find(l => l.isDefault).name }, child);\n if (child.childrenCount > 0) {\n yield visitor(this.getTermById(children[i].id), orderedTerm.children);\n orderedTerm.children = ensureOrder(orderedTerm.children, child.customSortOrder);\n }\n parent.push(orderedTerm);\n }\n });\n yield visitor(this, tree);\n return ensureOrder(tree, null, setInfo.customSortOrder);\n });\n }", "title": "" }, { "docid": "3780c3b96ff18decf555d3801287cf8e", "score": "0.5727973", "text": "sort () {\n if (this.collection.items.length <= 1) {\n return\n }\n this.collection.items.sort((a, b) => {\n // Debug.\n // console.log(`a.depth = ${a.getDepth()}, b.depth = ${b.getDepth()}`)\n // console.log(`a.ancestorsChain = '${a.ancestorsChain}', b.ancestorsChain = '${b.ancestorsChain}'`)\n\n // 'a' is less specific than 'b' (= less deeply nested).\n if (a.getDepth() < b.getDepth()) {\n return 1\n }\n // 'a' is more specific than 'b' (= nested deeper).\n if (a.getDepth() > b.getDepth()) {\n return -1\n }\n\n // Debug.\n // console.log(`compare(${a.getSelector()}, ${b.getSelector()}) = ${compare(a.getSelector(), b.getSelector())}`)\n\n // Fallback : equality leads to CSS selectors specificity comparison.\n return compare(a.getSelector(), b.getSelector()) * -1\n })\n }", "title": "" }, { "docid": "65edad86c230237174cb7c1b4fdcc99e", "score": "0.57113177", "text": "get childrenSorted() {\n if (!this.hasChildren) {\n return [];\n }\n\n return [...this.children].sort((a, b)=> {\n // Put directories above files.\n if (a.isDir !== b.isDir) {\n return b.isDir;\n }\n return a.basename.toLowerCase() > b.basename.toLowerCase();\n });\n }", "title": "" }, { "docid": "da83581ac28fa1acdd82a6d7e5d2e9f6", "score": "0.57091314", "text": "sort() {\n\t\tif (!this.sortedNodes) {\n\t\t\tthis.organise();\n\t\t\tconst paths = {};\n\t\t\t// Calculate the paths for all nodes with children\n\t\t\tObject.keys(this.nodes).forEach((node) => {\n\t\t\t\tif (!this.childlessNodes[node.id]) {\n\t\t\t\t\tpaths[node.id] = this.path(node);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.sortedNodes = Object.values(this.nodes)\n\t\t\t\t.sort((n1, n2) => {\n\t\t\t\t\tif (this.childlessNodes[n1.id]) return -1;\n\t\t\t\t\tif (this.childlessNodes[n2.id]) return 1;\n\n\t\t\t\t\tif (paths[n1.id].includes(n2.id)) return -1;\n\t\t\t\t\tif (paths[n2.id].includes(n1.id)) return 1;\n\n\t\t\t\t\treturn 0;\n\t\t\t\t});\n\t\t}\n\t\treturn this.sortedNodes;\n\t}", "title": "" }, { "docid": "e54512f0c73ffc5e0b1f96731e8ed87a", "score": "0.5646809", "text": "function sortLeafsNodes() {\n priorityQueue.sort(compareNodesDescending);\n }", "title": "" }, { "docid": "8c1118e1c5c126813be894ed7e44c270", "score": "0.56351364", "text": "getAllChildrenAsOrderedTree() {\n return __awaiter(this, void 0, void 0, function* () {\n const setInfo = yield this.select(\"*\", \"customSortOrder\")();\n const tree = [];\n const ensureOrder = (terms, sorts, setSorts) => {\n // handle custom sort order\n let ordering = null;\n if (sorts === null && setSorts.length > 0) {\n ordering = [...setSorts];\n }\n else {\n const index = sorts.findIndex(v => v.setId === setInfo.id);\n if (index >= 0) {\n ordering = [...sorts[index].order];\n }\n }\n if (ordering !== null) {\n const orderedChildren = [];\n ordering.forEach(o => {\n const found = terms.find(ch => o === ch.id);\n if (found) {\n orderedChildren.push(found);\n }\n });\n // we have a case where if a set is ordered and a term is added to that set\n // AND the ordering information hasn't been updated the new term will not have\n // any associated ordering information. See #1547 which reported this. So here we\n // append any terms remaining in \"terms\" not in \"orderedChildren\" to the end of \"orderedChildren\"\n orderedChildren.push(...terms.filter(info => ordering.indexOf(info.id) < 0));\n return orderedChildren;\n }\n return terms;\n };\n const visitor = (source, parent) => __awaiter(this, void 0, void 0, function* () {\n const children = yield source.children.select(\"*\", \"customSortOrder\")();\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n const orderedTerm = Object.assign({ children: [], defaultLabel: child.labels.find(l => l.isDefault).name }, child);\n if (child.childrenCount > 0) {\n yield visitor(this.getTermById(children[i].id), orderedTerm.children);\n orderedTerm.children = ensureOrder(orderedTerm.children, child.customSortOrder);\n }\n parent.push(orderedTerm);\n }\n });\n yield visitor(this, tree);\n return ensureOrder(tree, null, setInfo.customSortOrder);\n });\n }", "title": "" }, { "docid": "7d886aed91121efc81160bbb29f7f3c2", "score": "0.5613885", "text": "function sort_nodes(asc) {\n self.state.tree.traverse_and_compute (function (n) {\n var d = 1;\n if (n.children && n.children.length) {\n d += d3.max (n.children, function (d) { return d[\"count_depth\"];});\n }\n n[\"count_depth\"] = d;\n }); \n\n self.state.tree.resort_children (function (a,b) {\n return (a[\"count_depth\"] - b[\"count_depth\"]) * (asc ? 1 : -1);\n });\n }", "title": "" }, { "docid": "71633fed9033050fe9e0a817c1bb8a50", "score": "0.56125975", "text": "rearrange (entries) {\n // filter deleted and partfile of large file\n const sorted = entries.filter(e => !e.deleted && !e.fingerprint)\n .sort((a, b) => sortByType(a, b, 'otimeDown'))\n\n // map: name => files, acc: dirs\n const map = new Map()\n const dirs = sorted.reduce((acc, cur, idx) => {\n if (cur.type !== 'file') {\n acc.push(cur)\n return acc\n }\n const versions = map.get(cur.name)\n if (versions) versions.push(cur)\n else map.set(cur.name, [cur])\n return acc\n }, [])\n\n const newArray = [...map.values()].map((arr) => {\n const latestVersion = arr[0]\n return Object.assign(latestVersion, { versions: arr, versionNum: arr.length })\n })\n\n console.log('result', dirs, newArray)\n const result = ([...dirs, ...newArray])\n if (!this.state.showArchive) return result.filter(e => !e.archived)\n return result\n }", "title": "" }, { "docid": "0a685eaf4eec4c8185faa742b40cd84d", "score": "0.5605379", "text": "function traverseRevTree(revs, callback) {\n\t var toVisit = revs.slice();\n\t\n\t var node;\n\t while ((node = toVisit.pop())) {\n\t var pos = node.pos;\n\t var tree = node.ids;\n\t var branches = tree[2];\n\t var newCtx =\n\t callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n\t for (var i = 0, len = branches.length; i < len; i++) {\n\t toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n\t }\n\t }\n\t}", "title": "" }, { "docid": "82c419a0ac1d075f0a00b9bf45f7694e", "score": "0.5593945", "text": "function sortWithOrder(tab) {\n var sortedTab = [];\n\n var iterator = tab.keys();\n for (let key of iterator) {\n var entry = tab[key];\n if(entry.children) {\n entry.children = sortWithOrder(entry.children);\n }\n var idx = sortedTab.findIndex(function(newEntry) {\n return newEntry.order > entry.order;\n });\n idx = idx < 0 ? sortedTab.length : idx;\n var tmpSortedTab = sortedTab.slice(idx)\n var sortedTab = sortedTab.slice(0, idx);\n sortedTab.push(entry);\n sortedTab = sortedTab.concat(tmpSortedTab);;\n }\n return sortedTab;\n}", "title": "" }, { "docid": "3bf218187595a71b16f846132c509612", "score": "0.5567943", "text": "function sortImmediateChildren(tree) {\n if (tree && tree.children.length) {\n service.sortNavNodes(tree.children);\n }\n }", "title": "" }, { "docid": "0c299821d409cf6d56991c22d64fbc3e", "score": "0.55590177", "text": "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n }\n }\n}", "title": "" }, { "docid": "0c299821d409cf6d56991c22d64fbc3e", "score": "0.55590177", "text": "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n }\n }\n}", "title": "" }, { "docid": "0c299821d409cf6d56991c22d64fbc3e", "score": "0.55590177", "text": "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n }\n }\n}", "title": "" }, { "docid": "0c299821d409cf6d56991c22d64fbc3e", "score": "0.55590177", "text": "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n }\n }\n}", "title": "" }, { "docid": "0c299821d409cf6d56991c22d64fbc3e", "score": "0.55590177", "text": "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n }\n }\n}", "title": "" }, { "docid": "0c299821d409cf6d56991c22d64fbc3e", "score": "0.55590177", "text": "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);\n for (var i = 0, len = branches.length; i < len; i++) {\n toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});\n }\n }\n}", "title": "" }, { "docid": "4cfe44906683557c620039f79aff51ef", "score": "0.55473524", "text": "function TopologicalRefinement(V,E,part,k,partitions){\r\n\r\n\r\n\r\n\r\nvar copy = [];\t\r\nvar gain1 = [];\r\nvar moveto = [];\r\nvar moved = [];\r\nvar moves = [];\r\nvar part1 =[];\r\nvar part_parent = [];\r\nvar heap = [];\r\nvar heapsort = [];\t\r\nvar ec = k;\r\nvar ecmin = ec;\r\nvar len = 0 ;\r\n\r\n\r\n\r\nfor(var i in partitions){\r\n\tfor(var j in partitions[i]){\r\n\t\tpart_parent[partitions[i][j]] = i; \r\n\t\tconsole.log(part_parent[partitions[i][j]])\r\n\t\r\n\t}\r\n}\r\n\r\nfor(var i in allnodes){\r\n\tif(g.parent(allnodes[i]) == undefined){\r\n\t\tvar succ = g.successors(allnodes[i]);\r\n\t\tif(succ.length == 0){\r\n\t\t\tvar pred = g.predecessors(allnodes[i]);\r\n\t\t\tpart_parent[i] = g.parent(pred[0]);\r\n\t\t\tg.setParent(allnodes[i],part_parent[i]);\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tpart_parent[i] = g.parent(succ[0]),\r\n\t\t\tg.setParent(allnodes[i],part_parent[i]);\t\r\n\t\t}\r\n\t\t\r\n\t}\r\n}\r\nconsole.log(part)\r\n\r\n\r\nfor(var i in part){\r\n\tfor(var j in part[i]){ \r\n\t\tvar u = allnodes[part[i][j]];\r\n\t\tUpdate(heap,moveto,gain1,u,part_parent);\r\n\t\t//console.log(moveto)\r\n\t\tlen = len+1;\r\n\t\tmoved[part[i][j]] = false;\r\n\t}\r\n}\r\nconsole.log(part_parent)\r\n\r\n\r\nfor(var i in heap){\r\n\tvar heap_sort={\r\n\t\t\theap : heap[i],\r\n\t\t\tgain1 : gain1[i]\r\n\t\t}\r\n\theapsort.push(heap_sort)\t\r\n\t//console.log(heap_sort)\r\n}\r\nheapsort = heapsort.sort(function(a,b){return b.gain1 - a.gain1});\r\nconsole.log(heapsort)\r\n\r\nvar heap1 = [];\r\nfor(var i in heapsort){\r\n\theap1[i] = heapsort[i].heap;\r\n}\r\n//console.log(heap1)\r\n\r\nvar idx = 0;\r\nvar ecidx = 0;\r\n\r\n\r\n\r\nwhile(heap1.length >0){\t\r\n\t\t//len--; \r\n\t\tvar extract = heap1[0];\r\n\t\tvar gain_extract = heapsort[0].gain1; \r\n\t\tvar heapsort_index = heapsort.map(x=>x.heap).indexOf(extract);\r\n\t\tif(heapsort_index >= 0){\r\n\t\t\theapsort.splice(heapsort_index,1)\r\n\t\t}\r\n\t\tmoved[allnodes.indexOf(extract)] = true;\r\n\t\theap1.splice(heap1[0],1);\r\n\t\tmoves[idx] = extract;\r\n\t\tidx = idx +1;\r\n\t\tpart1[allnodes.indexOf(extract)] = moveto[allnodes.indexOf(extract)];\r\n\t\t\r\n\t\tpart_parent[allnodes.indexOf(extract)] = moveto[allnodes.indexOf(extract)];\r\n\t\tec = ec - gain_extract;\r\n\t\tif(ec < ecmin){\r\n\t\t\tecmin = ec;\r\n\t\t\tecidx = idx;\r\n\t\t}\r\n\t\tvar Final1 = g.successors(extract);\r\n\t\tvar Final2 = g.predecessors(extract);\r\n\t\t//console.log(Final1+\" ------- \"+Final2);\r\n\t\tvar allofu = Final1.concat(Final2);\r\n\t\tfor(var v in allofu){\r\n\t\t\tvar indx = allnodes.indexOf(allofu[v]);\r\n\t\t\tif(moved[indx] == false){\r\n\t\t\t\t//console.log(heap1);\r\n\t\t\t\t//moved[indx] = true;\r\n\t\t\t\tUpdate(heap1,moveto,gain1,allofu[v],part_parent);\r\n\t\t\t\t\r\n\t\t\t\tconsole.log(heap1);\r\n\t\t\t\t//console.log(heapsort)\r\n\t\t\t\t\r\n\t\t\t\tvar lenh = heap1.length;\r\n\t\t\t\tvar heap_sort={\r\n\t\t\t\t\theap : heap1[lenh-1],\r\n\t\t\t\t\tgain1 : gain1[allnodes.indexOf(allofu[v])]\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvar index_heap = heapsort.map(x=>x.heap).indexOf(heap1[len-1])\r\n\t\t\t\tif(index_heap > 0){\r\n\t\t\t\t\tif(heapsort[index_heap].gain1 < heap_sort.gain1){\r\n\t\t\t\t\t\theapsort[index_heap].gain1 = heap_sort.gain1;\r\n\t\t\t\t\t} \r\n\t\t\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\theapsort.push(heap_sort);\r\n\t\t\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\t// if(heapsort.length > allnodes.length){\r\n\t\t\t\t\t// heapsort.splice(-1,1)\r\n\t\t\t\t// }\r\n\t\t\t\theapsort = heapsort.sort(function(a,b){return b.gain1 - a.gain1});\r\n\t\t\t\tvar heap2 = [];\r\n\t\t\t\tfor(var i in heapsort){\r\n\t\t\t\t\theap2[i] = heapsort[i].heap;\r\n\t\t\t\t}\r\n\t\t\t\theap1 = heap2;\r\n\t\t\t\tlen = heap1.length;\r\n\t\t\t\tconsole.log(heap1);\r\n\t\t\t\t//console.log(len);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t//console.log(allofu);\r\n\t}\r\n\t//console.log(ecidx);\r\n\tfor(var i = idx-1; i< ecidx; i++){\r\n\t\t part1[moves[i]] = part_parent[allnodes.indexOf(moves[i])];\r\n\t\t //console.log(part1);\r\n\t}\r\n\tconsole.log(moved)\r\n\tconsole.log(allnodes)\r\n\treturn part1\r\n\t\r\n}", "title": "" }, { "docid": "a056718ad22694ae0e5b59b0b2616cbf", "score": "0.55236", "text": "function sortTree() {\n tree.sort(function(a, b) {\n return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;\n });\n }", "title": "" }, { "docid": "9d018ecf523e6ab64ee30a172b24266a", "score": "0.54768413", "text": "function winningRev(metadata) {\n\t var winningId;\n\t var winningPos;\n\t var winningDeleted;\n\t var toVisit = metadata.rev_tree.slice();\n\t var node;\n\t while ((node = toVisit.pop())) {\n\t var tree = node.ids;\n\t var branches = tree[2];\n\t var pos = node.pos;\n\t if (branches.length) { // non-leaf\n\t for (var i = 0, len = branches.length; i < len; i++) {\n\t toVisit.push({pos: pos + 1, ids: branches[i]});\n\t }\n\t continue;\n\t }\n\t var deleted = !!tree[1].deleted;\n\t var id = tree[0];\n\t // sort by deleted, then pos, then id\n\t if (!winningId || (winningDeleted !== deleted ? winningDeleted :\n\t winningPos !== pos ? winningPos < pos : winningId < id)) {\n\t winningId = id;\n\t winningPos = pos;\n\t winningDeleted = deleted;\n\t }\n\t }\n\t\n\t return winningPos + '-' + winningId;\n\t}", "title": "" }, { "docid": "18f54a872ea600bbc7b0409e2a3934fc", "score": "0.5475801", "text": "function sortData(data){\n //sort entries of each list by performer\n for(var j = 0; j < data.length; j++){\n var index = [];\n for(var k = 0; k < data[j]['children'].length; k++){\n if(data[j]['children'][k]['performer']['reference'] === gLoggedUser){\n index.push(k);\n }\n }\n if(index.length !== 0) {\n var temp = [];\n var length = index.length -1;\n for(var p = length; p >= 0 ; p--) {\n temp.push(data[j][\"children\"][index[p]]);\n data[j]['children'].splice(index[p], 1);\n }\n for(var q = 0; q < temp.length; q++ ){\n data[j]['children'].splice(0, 0, temp[q]);\n\n }\n }\n }\n\n}", "title": "" }, { "docid": "273d99f3aeb0dd992e24023fee3e5640", "score": "0.5413509", "text": "function sortTree() {\r\n tree.sort(function(a, b) {\r\n return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;\r\n });\r\n }", "title": "" }, { "docid": "7f88f6fac90d3e231ba3bda2c0471446", "score": "0.5401379", "text": "function sortTree() {\n tree.sort(function (a, b) {\n return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;\n });\n }", "title": "" }, { "docid": "ca54a805319c60119c2fdbff8f9a17cf", "score": "0.5380056", "text": "function sortTree() {\n tree.sort(function(a, b) {\n return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;\n });\n }", "title": "" }, { "docid": "d1132e1c2a5acfde2468bccdcbaaae58", "score": "0.53739035", "text": "function a(t, e) {\n null != t && t.sort(function (t, i) {\n /*\n * sort by level (reverse)\n * level: low to high\n * sortNo: high to low\n * (BB > CV > CVL > AUX > CA(including 改二航) > CL > DD > DE > SS > LHA > GR > IT > US > UK > FR > RU)\n * memID: high to low\n */\n if (0 == e) return t.level > i.level ? 1 : t.level < i.level ? -1 : t.sortNo < i.sortNo ? 1 : t.sortNo > i.sortNo ? -1 : t.memID < i.memID ? 1 : t.memID > i.memID ? -1 : 0;\n /*\n * sort by level\n * level: high to low\n * sortNo: low to high\n * memID: low to high\n */\n if (1 == e) return t.level < i.level ? 1 : t.level > i.level ? -1 : t.sortNo > i.sortNo ? 1 : t.sortNo < i.sortNo ? -1 : t.memID > i.memID ? 1 : t.memID < i.memID ? -1 : 0;\n /*\n * sort by type\n * sortNo: low to high\n * level: high to low\n * memID: low to high\n */\n if (2 == e) return t.sortNo > i.sortNo ? 1 : t.sortNo < i.sortNo ? -1 : t.level < i.level ? 1 : t.level > i.level ? -1 : t.memID > i.memID ? 1 : t.memID < i.memID ? -1 : 0;\n /*\n * sort by new\n * memID: high to low\n */\n if (3 == e) return t.memID < i.memID ? 1 : t.memID > i.memID ? -1 : 0;\n /*\n * sort by damage\n * leftHpPercentage: low to high\n * sortNo: low to high\n * memID: low to high\n */\n if (4 == e) {\n var n = t.hpNow / t.hpMax, o = i.hpNow / i.hpMax;\n return n > o ? 1 : n < o ? -1 : t.sortNo > i.sortNo ? 1 : t.sortNo < i.sortNo ? -1 : t.memID > i.memID ? 1 : t.memID < i.memID ? -1 : 0\n }\n return 0\n })\n }", "title": "" }, { "docid": "fed6fb85ff160051fa9ace2e5ff524de", "score": "0.53402585", "text": "function sortBookmarksInAll(id) {\n /*\n Folder `All` id is 1022\n Maybe this way does not work ... :-(\n */\n\n var sortedId = 0;\n\n chrome.bookmarks.getChildren(id, function(bookmarkArray){\n //console.log(bookmarkArray);\n bookmarkArray.sort(function (a, b) {\n return (a.url < b.url || a.title < b.title );\n });\n\n for (var i = 0; i < bookmarkArray.length; ++i) {\n //console.log(bookmarkArray[i].id + \"- \" + bookmarkArray[i].title +\n //bookmarkArray[i].url);\n chrome.bookmarks.move(bookmarkArray[i].id, {\n parentId: localStorage.MESSID,\n index: sortedId\n }, function(bookmark) {\n });\n sortedId++;\n }\n });\n}", "title": "" }, { "docid": "e0ed2acbce56011257c5afbf1ec8df33", "score": "0.53394395", "text": "function sortFoundByDocumentPosition(found) {\n var bag = {};\n var ids = Object.keys(found);\n for(var i = 0; i < ids.length; i++) { // loop by document\n var docId = ids[i];\n var f2 = found[docId];\n var newF2 = [];\n var seqs = Object.keys(f2); // N-gram keys in the current document\n for(var j = 0; j < seqs.length; j++) { // loop by key\n var seq = seqs[j];\n var f3 = f2[seq];\n var text = _my.work.texts[seq];\n for(var k = 0; k < f3.length; k++) { // loop by position\n var pos = f3[k];\n newF2.push([pos, text]);\n }\n }\n bag[docId] = newF2.sort();\n }\n return(bag);\n }", "title": "" }, { "docid": "672f7ec96f4d8a4b1dbe1e04fcf502f5", "score": "0.5332753", "text": "if (\n originalData &&\n originalData.length > 0 &&\n groupSortOptions &&\n groupSortOptions.length > 0\n ) {\n // Filter sort options to be applied on Grid data (not on sub component grid data)\n const gridSortOptions = groupSortOptions.filter(\n (option: Object): boolean =>\n option.isSubComponentColumn !== true\n );\n // If Grid is tree view grid\n if (\n isParentGrid &&\n parentIdAttribute !== null &&\n parentIdAttribute !== undefined\n ) {\n // New result array to hold sorted data\n let sortedTreeData = [];\n // Filter out all parent rows. This is to maintain the order of parent rows even if sorting is applied.\n // Only need to sort child data under each parent.\n const parentDataFromOriginalData = [...originalData].filter(\n (dataToFilter: Object): boolean => {\n const { isParent } = dataToFilter;\n return isParent === true;\n }\n );\n // Loop through parent rows\n parentDataFromOriginalData.forEach((dataFromGrid: Object) => {\n // Push parent row to result array\n sortedTreeData.push(dataFromGrid);\n // If id attribute is present and it has a valid value\n const parentIdentifier = dataFromGrid[parentIdAttribute];\n if (\n parentIdentifier !== null &&\n parentIdentifier !== undefined\n ) {\n // Find all child rows of that parent\n const childRowsOfParent = [...originalData].filter(\n (origData: Object): boolean => {\n return (\n origData &&\n origData.isParent !== true &&\n origData[parentIdAttribute] ===\n parentIdentifier\n );\n }\n );\n // If chilkd rows are present\n if (childRowsOfParent && childRowsOfParent.length > 0) {\n // Sort child data based on user selected sorting options\n const sortedChildData = [...childRowsOfParent].sort(\n (x: Object, y: Object): number => {\n let compareResult = 0;\n // Do sorting logic for each selected sorting option\n gridSortOptions.forEach(\n (option: Object) => {\n const {\n sortBy,\n sortOn,\n order\n } = option;\n const xSortBy = x[sortBy];\n const ySortBy = y[sortBy];\n let xSortOn = null;\n let ySortOn = null;\n if (\n xSortBy !== null &&\n xSortBy !== undefined\n ) {\n xSortOn = xSortBy[sortOn];\n }\n if (\n ySortBy !== null &&\n ySortBy !== undefined\n ) {\n ySortOn = ySortBy[sortOn];\n }\n const newResult =\n sortOn === \"value\"\n ? compareValues(\n order,\n xSortBy,\n ySortBy\n )\n : compareValues(\n order,\n xSortOn,\n ySortOn\n );\n compareResult =\n compareResult || newResult;\n }\n );\n return compareResult;\n }\n );\n // Push sorted child data into result array.\n sortedTreeData = [\n ...sortedTreeData,\n ...sortedChildData\n ];\n }\n }\n });\n // After sorting child data of all parents return the sorted data.\n return sortedTreeData;\n }\n // Filter sort options to be applied on sub component Grid data (not on main grid data)\n const subComponentSortOptions = groupSortOptions.filter(\n (option: Object): boolean =>\n option.isSubComponentColumn === true\n );\n // Sort main rows based on user selected sort options for main grid\n let sortedOriginalData = [...originalData].sort(\n (x: Object, y: Object): number => {\n let compareResult = 0;\n // Do sorting based on each user slected sort options\n gridSortOptions.forEach((option: Object) => {\n const { sortBy, sortOn, order } = option;\n const xSortBy = x[sortBy];\n const ySortBy = y[sortBy];\n let xSortOn = null;\n let ySortOn = null;\n if (xSortBy !== null && xSortBy !== undefined) {\n xSortOn = xSortBy[sortOn];\n }\n if (ySortBy !== null && ySortBy !== undefined) {\n ySortOn = ySortBy[sortOn];\n }\n const newResult =\n sortOn === \"value\"\n ? compareValues(order, xSortBy, ySortBy)\n : compareValues(order, xSortOn, ySortOn);\n compareResult = compareResult || newResult;\n });\n return compareResult;\n }\n );\n // After sorting main rows, check if this Grid is sub component grid.\n // If yes and user has selected sort options for subcomponent grid, apply sort for each sub component data under each main row.\n if (subComponentSortOptions && subComponentSortOptions.length > 0) {\n // Loop through each row\n sortedOriginalData = [...sortedOriginalData].map(\n (data: Object): any[] => {\n const sortedData = { ...data };\n // Check if sub component data is present in the main row.\n if (\n sortedData.subComponentData &&\n sortedData.subComponentData.length > 0\n ) {\n // Sort sub component data based on user slected sub component sort options\n const sortedSubComponentData = [\n ...sortedData.subComponentData\n ].sort((x: Object, y: Object): number => {\n let compareResult = 0;\n subComponentSortOptions.forEach(\n (option: Object) => {\n const {\n sortBy,\n sortOn,\n order\n } = option;\n const xSortBy = x[sortBy];\n const ySortBy = y[sortBy];\n let xSortOn = null;\n let ySortOn = null;\n if (\n xSortBy !== null &&\n xSortBy !== undefined\n ) {\n xSortOn = xSortBy[sortOn];\n }\n if (\n ySortBy !== null &&\n ySortBy !== undefined\n ) {\n ySortOn = ySortBy[sortOn];\n }\n const newResult =\n sortOn === \"value\"\n ? compareValues(\n order,\n xSortBy,\n ySortBy\n )\n : compareValues(\n order,\n xSortOn,\n ySortOn\n );\n compareResult =\n compareResult || newResult;\n }\n );\n return compareResult;\n });\n sortedData.subComponentData = sortedSubComponentData;\n }\n return sortedData;\n }\n );\n }\n return sortedOriginalData;\n }\n return originalData;\n };\n // #endregion\n\n // Load child data under a parent row, in case of tree view grid\n const loadChildData = (row: Object, isReload: boolean): Function => {\n // If parent row & id attribute are present for parent data, and load more function is defined by developer\n if (\n row &&\n parentIdAttribute &&\n loadMoreData &&\n typeof loadMoreData === \"function\"\n ) {\n const { lastPage, pageNum, pageSize, endCursor } = row;\n // If page Info data are not present, we consider it as the first page load under this parent.\n const isIntialLoad =\n lastPage === undefined &&\n pageNum === undefined &&\n pageSize === undefined &&\n endCursor === undefined;\n // Get parent id attribute value\n const parentId = row[parentIdAttribute];\n // Check if last page is true for that parent and if it is not, then trigger callback function with parentId value and updated pageInfo.\n if (\n (lastPage === false || isIntialLoad) &&\n parentId !== null &&\n parentId !== undefined\n ) {\n let pageInfoObj = null;\n if (paginationType === \"cursor\") {\n if (\n isReload !== true &&\n endCursor !== null &&\n endCursor !== undefined\n ) {\n pageInfoObj = {\n endCursor, // send back same endCursor\n pageSize\n };\n }\n loadMoreData(pageInfoObj, parentId);\n } else {\n if (\n isReload !== true &&\n pageNum !== null &&\n pageNum !== undefined &&\n typeof pageNum === \"number\"\n ) {\n pageInfoObj = {\n pageNum: pageNum + 1, // Update page number to next page\n pageSize\n };\n }\n loadMoreData(pageInfoObj, parentId, isReload);\n }\n }\n }\n };\n\n // Gets called when page scroll reaches the bottom of the grid, in case if pagination is enabled.\n const loadNextPage = (\n returnedPageInfo: Object,\n isReload: boolean\n ): Function => {\n const { pageNum, pageSize, endCursor, lastPage } = returnedPageInfo;\n // If lastPage is not true, trigger call back with updated pageInfo.\n if (\n lastPage !== true &&\n loadMoreData &&\n typeof loadMoreData === \"function\"\n ) {\n // If this is a reload functionality (when toalRecords property gets changed)\n if (isReload) {\n // Keep the incremental number of pages that are being reloaded. This will be decremented when ever gridData is updated.\n setPageReloadCount(pageReloadCount + 1);\n } else {\n // Set loader display value as true. This will be set to false when gridData is updated.\n setIsNextPageLoading(true);\n }\n if (paginationType === \"cursor\") {\n loadMoreData({\n endCursor,\n pageSize\n });\n } else {\n loadMoreData({\n pageNum,\n pageSize\n });\n }\n }\n };\n\n useEffect(() => {\n if (isParentGrid && gridData && gridData.length > 0) {\n let totalChangedParentId = null;\n let oldTotalValue = null;\n gridData.forEach((dataItem: Object) => {\n const { childData } = dataItem;\n const parentRowIdValue = dataItem[parentIdAttribute];\n if (childData !== null && childData !== undefined) {\n const { total } = childData;\n const { current } = totalRecordsOfParentRows;\n const existingTotal = current[parentRowIdValue];\n if (existingTotal !== total) {\n totalChangedParentId = parentRowIdValue;\n oldTotalValue = existingTotal;\n totalRecordsOfParentRows.current = {\n ...current,\n [parentRowIdValue]: total\n };\n }\n }\n });\n if (\n totalChangedParentId !== null &&\n totalChangedParentId !== undefined &&\n oldTotalValue !== null &&\n oldTotalValue !== undefined\n ) {\n loadChildData(\n { [parentIdAttribute]: totalChangedParentId },\n true\n );\n }\n } else {\n // Set next page loader display value to false\n setIsNextPageLoading(false);\n // Decrement page reload tracked numbers\n const newPageReloadCount = pageReloadCount - 1;\n setPageReloadCount(newPageReloadCount < 0 ? 0 : newPageReloadCount);\n // Check if totalRecordsCount is changed in pageInfo, and if yes store the updated value\n if (pageInfo) {\n const { total } = pageInfo;\n if (typeof total === \"number\" && total !== totalRecordsCount) {\n setTotalRecordsCount(total);\n }\n }\n }\n }, [gridData, pageInfo]);\n\n useEffect(() => {\n // Convert grid columns configuration to required structure & get the accessor list to be used for filtering, and store it.\n const columnsConfigData = extractColumns(\n columns,\n isDesktop,\n updateRowInGrid,\n expandableColumn,\n isParentGrid,\n false,\n enablePinColumn\n );\n const {\n updatedColumnStructure,\n columnsAccessorList\n } = columnsConfigData;\n setGridColumns(updatedColumnStructure);\n setGridColumnsAccessorList(columnsAccessorList);\n\n // Convert grid additional column configuration to required structure & get the accessor list to be used for filtering, and store it.\n const columnToExpandConfigData = extractAdditionalColumn(\n columnToExpand,\n isDesktop,\n false\n );\n const {\n updatedColumnToExpandStructure,\n columnToExpandAccessorList\n } = columnToExpandConfigData;\n setAdditionalColumn(updatedColumnToExpandStructure);\n setAdditionalColumnAccessorList(columnToExpandAccessorList);\n }, [columns, columnToExpand]);\n\n useEffect(() => {\n // Convert sub component columns configuration to required structure & get the accessor list to be used for filtering, and store it.\n const columnsConfigData = extractColumns(\n subComponentColumns,\n isDesktop,\n updateRowInGrid,\n expandableColumn,\n isParentGrid,\n true,\n enablePinColumn\n );\n const {\n updatedColumnStructure,\n columnsAccessorList\n } = columnsConfigData;\n setGridSubComponentColumns(updatedColumnStructure);\n setGridSubComponentColumnsAccessorList(columnsAccessorList);\n\n // Convert sub component additional column configuration to required structure & get the accessor list to be used for filtering, and store it.\n const columnToExpandConfigData = extractAdditionalColumn(\n subComponentColumnToExpand,\n isDesktop,\n true\n );\n const {\n updatedColumnToExpandStructure,\n columnToExpandAccessorList\n } = columnToExpandConfigData;\n setGridSubComponentAdditionalColumn(updatedColumnToExpandStructure);\n setGridSubComponentAdditionalColumnAccessorList(\n columnToExpandAccessorList\n );\n }, [subComponentColumns, subComponentColumnToExpand]);\n\n // To see if initial loading is completed or not\n useEffect(() => {\n setIsLoaded(true);\n }, []);\n\n // If grid is tree view grid, update grid data structure\n let processedGridData = gridData && gridData.length > 0 ? gridData : [];\n if (isParentGrid) {\n processedGridData = getProcessedData(gridData, parentIdAttribute);\n }\n\n if (isLoaded) {\n if (!(gridColumns && gridColumns.length > 0)) {\n return (\n <div\n ref={gridRef}\n data-testid=\"gridComponent\"\n className={`neo-grid ${className || \"\"}`}\n >\n <h2 data-testid=\"nocolumnserror\" className=\"ng-error\">\n Invalid Column Configuration\n </h2>\n </div>\n );\n }\n return (\n <div\n ref={gridRef}\n data-testid=\"gridComponent\"\n className={`neo-grid ${className || \"\"} ${\n theme === \"portal\" ? \"neo-grid--portal\" : \"\"\n }`}\n style={{ width: gridWidth || \"100%\" }}\n >\n <Customgrid\n gridRef={gridRef}\n isDesktop={isDesktop}\n title={title}\n theme={theme}\n managableColumns={gridColumns}\n columnsAccessorList={gridColumnsAccessorList}\n expandedRowData={additionalColumn}\n expandedRowDataAccessorList={additionalColumnAccessorList}\n parentColumn={parentColumn}\n parentIdAttribute={parentIdAttribute}\n parentRowExpandable={parentRowExpandable}\n parentRowsToExpand={parentRowsToExpand}\n managableSubComponentColumnns={gridSubComponentColumns}\n subComponentColumnsAccessorList={\n gridSubComponentColumnsAccessorList\n }\n managableSubComponentAdditionalColumn={\n gridSubComponentAdditionalColumn\n }\n subComponentAdditionalColumnAccessorList={\n gridSubComponentAdditionalColumnAccessorList\n }\n subComponentIdAttribute={subComponentIdAttribute}\n onSubComponentRowSelect={onSubComponentRowSelect}\n subComponentHeader={subComponentHeader}\n loadChildData={loadChildData}\n isParentGrid={isParentGrid}\n gridData={processedGridData}\n estimatedRowHeight={estimatedRowHeight}\n rowsToOverscan={rowsToOverscan}\n idAttribute={idAttribute}\n pageInfo={pageInfo}\n paginationType={paginationType}\n totalRecordsCount={totalRecordsCount}\n updateRowInGrid={updateRowInGrid}\n onRowSelect={onRowSelect}\n onSearch={onSearch}\n getRowInfo={getRowInfo}\n expandableColumn={expandableColumn}\n rowActions={rowActions}\n isNextPageLoading={isNextPageLoading}\n loadNextPage={loadNextPage}\n serverSideSorting={serverSideSorting}\n serverSideExporting={serverSideExporting}\n getSortedData={getSortedData}\n CustomPanel={CustomPanel}\n multiRowSelection={multiRowSelection}\n gridHeader={gridHeader}\n showTitle={showTitle}\n rowSelector={rowSelector}\n globalSearch={globalSearch}\n columnFilter={columnFilter}\n groupSort={groupSort}\n columnChooser={columnChooser}\n exportData={exportData}\n fileName={fileName}\n onGridRefresh={onGridRefresh}\n rowsToSelect={rowsToSelect}\n rowsToPin={rowsToPin}\n rowsToDeselect={rowsToDeselect}\n fixedRowHeight={fixedRowHeight}\n pdfPaperSize={pdfPaperSize}\n enablePinColumn={enablePinColumn}\n enablePinRow={\n enablePinRow === true && isParentGrid !== true // Enable only if grid is not tree view grid\n }\n shouldDisplayLoader={shouldDisplayLoader}\n setShouldDisplayLoader={setShouldDisplayLoader}\n />\n {displayLoader === true ||\n shouldDisplayLoader ||\n pageReloadCount > 0 ? (\n <>\n <Loader classNameValue=\"ng-loader--overlay\" />\n <div className=\"ng-overlay\" />\n </>\n ) : null}\n </div>\n );\n }\n return null;\n};\n\nexport default Grid;", "title": "" }, { "docid": "bbbb7b1d15571ace19f2db40af3d79d7", "score": "0.5311776", "text": "function compareTree(a, b) {\n\t return a[0] < b[0] ? -1 : 1;\n\t}", "title": "" }, { "docid": "bd800a0d4468dabfa8a27043ab746318", "score": "0.52726805", "text": "sortBuildsByCommit (builds) {\n let map = {}\n let bc = [], b\n /* Put builds under commit keys to keep them together.\n * Keep the order of which commit appears first */\n for (let i=0; i<builds.length; i++) {\n b = builds[i]\n if (map[b.commit] !== undefined) {\n bc[map[b.commit]].push(b)\n } else {\n bc.push([b])\n map[b.commit] = bc.length-1\n }\n }\n /* flatten */\n return [].concat.apply([], bc)\n }", "title": "" }, { "docid": "4a05a665c20f9abe00d79e65bcbc6d49", "score": "0.52654296", "text": "function sortIndex(node) {\n\t// sort\n\tnode.sort((a, b) => {\n\t\t// is folder(asc)\n\t\t{\n\t\t\tlet aIsFolder = 0; // a is folder = 0, a is not folder = 1.\n\t\t\tif (a.url) { aIsFolder = 1; };\n\t\t\tlet bIsFolder = 0; // b is folder = 0, a is not folder = 1.\n\t\t\tif (b.url) { bIsFolder = 1; };\n\t\t\tif (aIsFolder < bIsFolder) return -1;\n\t\t\tif (aIsFolder > bIsFolder) return 1;\n\t\t}\n\t\t// views(desc)\n\t\t{\n\t\t\tif (a.views > b.views) return -1;\n\t\t\tif (a.views < b.views) return 1;\n\t\t}\n\t\t// title(asc)\n\t\t{\n\t\t\tif (a.title.toUpperCase() < b.title.toUpperCase()) return -1;\n\t\t\tif (a.title.toUpperCase() > b.title.toUpperCase()) return 1;\n\t\t}\n\t\t// url(asc)\n\t\t{\n\t\t\tif (a.url < b.url) return -1;\n\t\t\tif (a.url > b.url) return 1;\n\t\t}\n\t\t// id(asc)\n\t\t{\n\t\t\tif (a.id < b.id) return -1;\n\t\t\tif (a.id > b.id) return 1;\n\t\t}\n\t\treturn 0;\n\t});\n\t// 順番通りにindexをソートする\n\tfor (var i in node) {\n\t\tnode[i]['index'] = Number(i);\n\t};\n\treturn node;\n}", "title": "" }, { "docid": "f39e9823248281509a1ebedcfd70c656", "score": "0.5235812", "text": "doTreeLayout (nodes, edges, pta, deletedNodes) {\n // - Ensure every node (except start) has a parent.\n // - If a node's parent is a skipped implicit node (i.e. an implicit node with a unique target),\n // then set the node's parent to its grandparent; repeat until the parent is not a skipped implicit node.\n // - Sort children by the order that the parent->child edges appear.\n // This keeps the automatic hierarchical layout stable when we add placeholders, etc.\n let { layoutParent, childRank, nodeByID } = pta;\n const { outgoing } = this.getEdgesByNode (edges);\n const startNode = nodes[0];\n const deletedNodeByID = deletedNodes && this.getNodesByID(deletedNodes);\n let nOrphans = 0;\n let layoutChildren = fromEntries (nodes.map ((node) => [node.id, []]));\n let layoutDepth = fromEntries (nodes.map ((node) => [node.id, 0]));\n nodes.forEach ((node, n) => {\n if (n > 0) {\n if (!layoutParent[node.id]) { // if a node is not referenced by any other node, set its parent to be the start node\n\t layoutParent[node.id] = startNode;\n if (typeof(node.x) === 'undefined')\n childRank[startNode.id][node.id] = (outgoing[startNode.id] || []).length + (++nOrphans);\n }\n while (layoutParent[node.id].uniqueTarget)\n layoutParent[node.id] = layoutParent[layoutParent[node.id].id];\n let parent = layoutParent[node.id];\n\tlayoutChildren[parent.id].push (node);\n }\n for (let n = node; layoutParent[n.id]; n = layoutParent[n.id]) {\n\t++layoutDepth[node.id];\n }\n });\n\n let nodeChildRank = {}, maxChildRank = {}, relativeChildRank = {};\n nodes.forEach ((parent) => layoutChildren[parent.id].forEach ((child) => {\n nodeChildRank[child.id] = childRank[parent.id][child.id];\n }));\n nodes.forEach ((node) => {\n layoutChildren[node.id] = layoutChildren[node.id].sort ((a,b) => nodeChildRank[a.id] - nodeChildRank[b.id]);\n maxChildRank[node.id] = layoutChildren[node.id].reduce ((max, c) => (!nodeByID[c.id] || typeof(nodeChildRank[c.id]) === 'undefined') ? max : Math.max (max, nodeChildRank[c.id]), 0);\n layoutChildren[node.id].forEach ((child) => { relativeChildRank[child.id] = nodeChildRank[child.id] / (maxChildRank[node.id] + 1) });\n });\n \n // Lay things out\n const layoutNode = (node) => {\n // If no (x,y) specified, lay out nodes from the parent node\n if (typeof(node.x) === 'undefined') {\n const deletedNode = deletedNodes && deletedNodeByID[node.id];\n const parent = layoutParent[node.id];\n if (deletedNode)\n extend (node, { x: deletedNode.x,\n y: deletedNode.y });\n else if (parent) {\n\t layoutNode (parent);\n\t const angleRange = Math.PI, angleOffset = -angleRange/2;\n\t const angle = angleOffset + angleRange * relativeChildRank[node.id];\n\t const radius = this.layoutRadius;\n\t node.x = parent.x + Math.cos(angle) * radius;\n\t node.y = parent.y + Math.sin(angle) * radius;\n } else\n node.x = node.y = 0;\n }\n };\n nodes.forEach (layoutNode);\n }", "title": "" }, { "docid": "cd02e9d12b309bba29d208d17755b4db", "score": "0.5226508", "text": "sort(flag){\r\n var arr = [];\r\n var cur = this.head;\r\n while (cur){\r\n arr.push(cur.val);\r\n cur = cur.right;\r\n }\r\n\r\n arr.sort();\r\n if (!flag){\r\n arr.reverse();\r\n }\r\n\r\n this.head = new Node(arr[0]);\r\n var cur = this.head;\r\n for (var i = 0; i < arr.length; i++){\r\n var new_Node = new Node(arr[i]);\r\n cur.right = new_Node;\r\n new_Node.left = cur;\r\n cur = cur.right;\r\n }\r\n this.tail = cur;\r\n }", "title": "" }, { "docid": "d36e563ddbb44a1c0bd074c4816e8b74", "score": "0.52215856", "text": "sortWithinLevel(){\n this._pq.sortWithinLevel()\n }", "title": "" }, { "docid": "0f1efdd11b5a1443ff1e890f91cabc08", "score": "0.5215862", "text": "sortIndices() {\n\n let offset = 0;\n for (let type = 0; type < this.counters.length; type++) {\n const iter = this.counters[type];\n for (const cell_id of iter) {\n this.resolveIndices.setUint16(offset, cell_id, true);\n offset += 2;\n }\n }\n \n this.resolveIndices.setUint16(offset, 0, true);\n offset += 2;\n\n this.indices = offset >> 1;\n\n let ptr = this.indicesPtr;\n for (let type = 0; type <= 250; type++) {\n const s = this.counters[type].size;\n s && this.wasm.sort_indices(0, ptr, s);\n ptr += s << 1;\n }\n\n this.treePtr = this.indicesPtr + offset;\n this.treeBuffer = new DataView(this.memory.buffer, this.treePtr);\n }", "title": "" }, { "docid": "e9c6abf4db7f440576affd23da8fb7ff", "score": "0.5211383", "text": "function sortBigFile(){\n\n}", "title": "" }, { "docid": "2a224b79a01e1995c27dc46a67553624", "score": "0.52042896", "text": "function rebuildIndex(root,timestamp)\n{\n // this gets the WHOLE tree - yikes\n\n return(\n\troot.once(\"value\")\n .then((snapshot) => {\n\t\tdata = snapshot.val();\n\t\troot.child(INDEX).remove();\n\t\troot.child(FULLINDEX).remove();\n\t\tfor(var year in data) {\n\t\t if(!isSpecialNode(year)) {\n\t\t\troot.child(INDEX).child(year).set(timestamp);\n\t\t\troot.child(year).child(INDEX).remove();\n\t\t\troot.child(year).child(FULLINDEX).remove();\n\t\t\tfor(var robot in data[year]) {\n\t\t\t if(!isSpecialNode(robot)) {\n\t\t\t\troot.child(year).child(INDEX).child(robot).set(timestamp);\n\t\t\t\troot.child(year).child(robot).child(INDEX).remove();\n\t\t\t\troot.child(year).child(robot).child(FULLINDEX).remove();\n\t\t\t\tfor(var competition in data[year][robot]) {\n\t\t\t\t if(!isSpecialNode(competition)) {\n\t\t\t\t\troot.child(year).child(robot).child(INDEX).child(competition).set(timestamp);\n\t\t\t\t\troot.child(year).child(robot).child(competition).child(INDEX).remove();\n\t\t\t\t\troot.child(year).child(robot).child(competition).child(FULLINDEX).remove();\n\t\t\t\t\tfor(var match in data[year][robot][competition]) {\n\t\t\t\t\t if(!isSpecialNode(match)) {\n\t\t\t\t\t\troot.child(year).child(robot).child(competition).child(INDEX).child(match).set(timestamp);\n\t\t\t\t\t\troot.child(FULLINDEX).child(year).child(robot).child(competition).child(match).set(timestamp);\n\t\t\t\t\t\troot.child(year).child(FULLINDEX).child(robot).child(competition).child(match).set(timestamp);\n\t\t\t\t\t\troot.child(year).child(robot).child(FULLINDEX).child(competition).child(match).set(timestamp);\n\t\t\t\t\t\troot.child(year).child(robot).child(competition).child(FULLINDEX).child(match).set(timestamp);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }));\n}", "title": "" }, { "docid": "c6b5351ed19b10e8f1a309a7c718e932", "score": "0.51710105", "text": "function getSortedChildNodes(node,lines,resultArray){if(!node){return resultArray;}// The .loc checks below are sensitive to some of the problems that\n// are fixed by this utility function. Specifically, if it decides to\n// set node.loc to null, indicating that the node's .loc information\n// is unreliable, then we don't want to add node to the resultArray.\nutil_1.fixFaultyLocations(node,lines);if(resultArray){if(n.Node.check(node)&&n.SourceLocation.check(node.loc)){// This reverse insertion sort almost always takes constant\n// time because we almost always (maybe always?) append the\n// nodes in order anyway.\nvar i=resultArray.length-1;for(;i>=0;--i){var child=resultArray[i];if(child&&child.loc&&util_1.comparePos(child.loc.end,node.loc.start)<=0){break;}}resultArray.splice(i+1,0,node);return resultArray;}}else{var childNodes=childNodesCache.get(node);if(childNodes){return childNodes;}}var names;if(isArray.check(node)){names=Object.keys(node);}else if(isObject.check(node)){names=types.getFieldNames(node);}else{return resultArray;}if(!resultArray){childNodesCache.set(node,resultArray=[]);}for(var i=0,nameCount=names.length;i<nameCount;++i){getSortedChildNodes(node[names[i]],lines,resultArray);}return resultArray;}// As efficiently as possible, decorate the comment object with", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "eb9597b7ed02cd4e06b4dca3af46be5a", "score": "0.51707155", "text": "function compareTree(a, b) {\n return a[0] < b[0] ? -1 : 1;\n}", "title": "" }, { "docid": "d7794e53a698b1c124400ad9b58a756a", "score": "0.51496065", "text": "_sortNodeArray(nodeArray) {\n if (nodeArray.length > 1) {\n if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') {\n nodeArray.sort(function (a, b) {\n return a.x - b.x;\n })\n }\n else {\n nodeArray.sort(function (a, b) {\n return a.y - b.y;\n })\n }\n }\n }", "title": "" }, { "docid": "869d021125b0488872d5bb665b4eb09f", "score": "0.51234174", "text": "function getEntriesDecreasingOrder(path)\r\n{\r\n var mainEntry = System.Shell.itemFromPath(path);\r\n var contents = mainEntry.SHFolder.Items;\r\n var numEntries = contents.count;\r\n var children = new Array(0);\r\n for (var x=0; x<numEntries; x++)\r\n {\r\n var childPath = contents.item(x).path;\r\n if (gadgetState.visited[childPath])\r\n {\r\n children.push(gadgetState.visited[childPath]);\r\n }\r\n }\r\n children.sort(entryCompare);\r\n children.reverse();\r\n return children;\r\n}", "title": "" }, { "docid": "30d3ec6b5435197464afd9ebfad0325b", "score": "0.5110558", "text": "sortBySize(state) {\n state.directories.sort((a, b) => a.basename.localeCompare(b.basename));\n\n if (state.sort.direction === 'up') {\n state.files.sort((a, b) => a.size - b.size);\n } else {\n state.files.sort((a, b) => b.size - a.size);\n }\n }", "title": "" }, { "docid": "feee23d047414d1e0b520839a16465aa", "score": "0.5105738", "text": "function compactTree(metadata) {\n\t var revs = [];\n\t traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n\t revHash, ctx, opts) {\n\t if (opts.status === 'available' && !isLeaf) {\n\t revs.push(pos + '-' + revHash);\n\t opts.status = 'missing';\n\t }\n\t });\n\t return revs;\n\t}", "title": "" }, { "docid": "3cbfb752ff3591c843b290753338aa4e", "score": "0.5094564", "text": "function bfsOrder(root) {\n var inqueue = [root], outqueue = [];\n root._bfs_parent = null;\n while (inqueue.length > 0) {\n var elem = inqueue.shift();\n outqueue.push(elem);\n var children = elem.childNodes;\n var liParent = null;\n for (var i=0 ; i<children.length; i++) {\n if (children[i].nodeType == 1) {// element node\n if (children[i].tagName === 'LI') {\n liParent = children[i];\n } else if ((children[i].tagName === 'UL' || children[i].tagName === 'OL') && liParent) {\n liParent.appendChild(children[i]);\n i--;\n continue;\n } \n children[i]._bfs_parent = elem;\n inqueue.push(children[i]);\n }\n }\n }\n outqueue.shift();\n return outqueue;\n }", "title": "" }, { "docid": "7baa5c9d187350ac90f6eaff99f5c27e", "score": "0.50909007", "text": "preorder(r, arr) {\n if (r == null) {\n return this.sorted;\n }\n\n for (var i = 0; i < this.alphabetSize; i++) {\n if (r.children[i] != null) {\n if (r.children[i].isEndOfWord) {\n\n this.sorted.add(arr[r.children[i].index]);\n // console.log(arr[r.children[i].index]);\n }\n preorder(r.children[i], arr);\n }\n }\n return this.sorted;\n }", "title": "" }, { "docid": "c23bbcdb2e91052ac161cbf7718f64da", "score": "0.50642914", "text": "static arraySortTopological(items){const edges=[];for(const name in items)if(items.hasOwnProperty(name)){if(!Array.isArray(items[name]))items[name]=[items[name]];if(items[name].length>0)for(const dependencyName of Tools.arrayMake(items[name]))edges.push([name,dependencyName]);else edges.push([name])}const nodes=[];// Accumulate unique nodes into a large list.\nfor(const edge of edges)for(const node of edge)if(!nodes.includes(node))nodes.push(node);const sorted=[];// Define a visitor function that recursively traverses dependencies.\nconst visit=function visit(node,predecessors){// Check if a node is dependent of itself.\nif(predecessors.length!==0&&predecessors.includes(node))throw new Error(`Cyclic dependency found. \"${node}\" is dependent of `+'itself.\\n'+`Dependency chain: \"${predecessors.join('\" -> \"')}\" => \"`+`${node}\".`);let index=nodes.indexOf(node);// If the node still exists, traverse its dependencies.\nif(index!==-1){let copy;// Mark the node to exclude it from future iterations.\nnodes[index]=null;/*\n Loop through all edges and follow dependencies of the\n current node\n */for(const edge of edges)if(edge[0]===node){/*\n Lazily create a copy of predecessors with the\n current node concatenated onto it.\n */copy=copy||predecessors.concat([node]);// Recurse to node dependencies.\nvisit(edge[1],copy)}sorted.push(node)}};for(let index=0;index<nodes.length;index++){const node=nodes[index];// Ignore nodes that have been excluded.\nif(node){// Mark the node to exclude it from future iterations.\nnodes[index]=null;/*\n Loop through all edges and follow dependencies of the\n current node.\n */for(const edge of edges)if(edge[0]===node)// Recurse to node dependencies.\nvisit(edge[1],[node]);sorted.push(node)}}return sorted}", "title": "" }, { "docid": "20ec88d1be217768c6a663f7fae742ab", "score": "0.5057326", "text": "function leafNameComparator(first, second) {\n if (first.leafName < second.leafName)\n return -1;\n if (first.leafName > second.leafName)\n return 1;\n return 0;\n }", "title": "" }, { "docid": "96f43389719c560df226970ffad604ec", "score": "0.5051917", "text": "preOrder() { \n // console.log('Tree is running');\n console.log(this.key);\n \n \n if(this.left) { \n this.left.preOrder(); \n } \n if(this.right) {\n this.right.preOrder(); \n } \n }", "title": "" }, { "docid": "743af1b4983a73df6c6c6d43bc0c018c", "score": "0.50495505", "text": "function compareByIdThenRev(a, b) {\n\t var idCompare = compare(a._id, b._id);\n\t if (idCompare !== 0) {\n\t return idCompare;\n\t }\n\t var aStart = a._revisions ? a._revisions.start : 0;\n\t var bStart = b._revisions ? b._revisions.start : 0;\n\t return compare(aStart, bStart);\n\t}", "title": "" }, { "docid": "dc4cd613696d44fe886c403b6d073e4c", "score": "0.5044213", "text": "function dumpBookmarks(arr) {\n var bookmarkTreeNodes = chrome.bookmarks.getTree(function (\n bookmarkTreeNodes\n ) {\n $(\"#bookmarks\").append(dumpTreeNodes(bookmarkTreeNodes, arr));\n var firstTen = arr.slice(0, 10);\n console.log(`first 10 unsorted bookmarks are: ${JSON.stringify(firstTen)}`);\n arr.sort(function (a, b) {\n return a.id - b.id;\n });\n firstTen = arr.slice(0, 10);\n console.log(`first 10 sorted bookmarks are: ${JSON.stringify(firstTen)}`);\n });\n}", "title": "" }, { "docid": "76a6bf70b582216af2d6e1c96262e0e8", "score": "0.5029984", "text": "loadedEntrys (state){\n return state.loadedEntrys.sort((entryA, entryB) => {\n return entryA.date < entryB.date\n })\n }", "title": "" }, { "docid": "dc59092e8b0b7bb88be1c5f1b691992c", "score": "0.502952", "text": "function collectConflicts(metadata) {\n\t var win = winningRev(metadata);\n\t var leaves = collectLeaves(metadata.rev_tree);\n\t var conflicts = [];\n\t for (var i = 0, len = leaves.length; i < len; i++) {\n\t var leaf = leaves[i];\n\t if (leaf.rev !== win && !leaf.opts.deleted) {\n\t conflicts.push(leaf.rev);\n\t }\n\t }\n\t return conflicts;\n\t}", "title": "" }, { "docid": "59952eddf637a4618aed7f8ac291ab42", "score": "0.50254333", "text": "function sortUsingNestedText(parent, childSelector, keySelector) {\n let items = parent.children(childSelector).sort(function(a, b) {\n let vA = parseInt($(keySelector, a).text());\n let vB = parseInt($(keySelector, b).text());\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\n });\n parent.html(items);\n\n\n chrome.storage.local.set({key: items}, function() {\n console.log(items);\n });\n }", "title": "" }, { "docid": "7a47b1daa714825a41ec416ef0c122df", "score": "0.50166154", "text": "function cmp_depth(a, b) {\n return a[1] - b[1];\n}", "title": "" }, { "docid": "db0080291311e5aa10abea41a803d365", "score": "0.5008657", "text": "function sortIt(parent, childSelector, keySelector, mode, sortid) {\n if (sortid.hasClass(\"desc\")) {\n //sort asc\n sortid.removeClass(\"desc\");\n sortid.addClass(\"asc\");\n } else if (sortid.hasClass(\"asc\")) {\n //sort desc\n sortid.removeClass(\"asc\");\n sortid.addClass(\"desc\");\n } else {\n sortid.addClass(\"asc\");\n sortid.removeClass(\"unsorted\");\n }\n var items = parent.children(childSelector).sort(function(a, b) {\n if (keySelector == \"span#length\") {\n var vA = parseInt($(keySelector, a).text());\n var vB = parseInt($(keySelector, b).text());\n } else {\n var vA = $(keySelector, a).text();\n var vB = $(keySelector, b).text();\n }\n\n\n if (mode == \"desc\"){\n return (vA > vB) ? -1 : (vA < vB) ? 1 : 0;\n } else if (mode == \"asc\") {\n return (vA < vB) ? -1 : (vA > vB) ? 1 : 0;\n }\n });\n parent.append(items);\n }", "title": "" }, { "docid": "fcdff9a3a182568ae996e5a25dfd2bfc", "score": "0.50040925", "text": "function sortData(data) {\n let dataClean = data.filter(function (el) {\n let isSubdir = typeof el.subdir !== 'undefined';\n if (isSubdir) {\n let subdirName = el.subdir.substr(0, el.subdir.length - 1);\n\n return data.filter(function (item) {\n return (typeof item.name !== 'undefined' && item.name.indexOf(subdirName) > -1);\n }).length < 1;\n }\n return !isSubdir;\n }); // remove subdirs from response\n dataClean.sort(function(a, b) {\n let isFolderA = a.content_type === 'application/directory' || typeof a.subdir !== 'undefined';\n let isFolderB = b.content_type === 'application/directory' || typeof b.subdir !== 'undefined';\n let isContainerA = typeof a.content_type === 'undefined';\n\n if (isFolderA && !isFolderB) {\n return -1;\n }\n if (!isFolderA && isFolderB) {\n return 1;\n }\n if ((isFolderA && isFolderB) || isContainerA) {\n if (a.name > b.name) {\n return 1;\n }\n return -1;\n }\n return a.name > b.name;\n });\n\n return dataClean;\n }", "title": "" }, { "docid": "0946926c16b937ad5f728b3e318a1786", "score": "0.50022644", "text": "function preSort(){\r\r\n \r\r\n var timeline = new TimelineLite({ }),start=0, interval= 0,\r\r\n counter = 0; nodes = {}, current_grid = current_node = null;\r\r\n \r\r\n var free_grids = grids.filter(function(g){\r\r\n if (!g.occupant) return g;\r\r\n })\r\r\n \r\r\n \r\r\n current_grid = free_grids[0]; \r\r\n \r\r\n for(var i =0; i < nodes_in_canvas.length; i++){\r\r\n current_node = nodes_in_canvas[i];\r\r\n \r\r\n resetAllNodes();\r\r\n \r\r\n //Lets clear the timeline\r\r\n tl.clear();\r\r\n \r\r\n if (!current_node.gridSpace || current_node.gridSpace.order > current_grid.order) {\r\r\n\tconnectGridandNode( current_node, current_grid,\r\r\n\t{'timeLine': timeline, 'time':1, 'startAt': start_time += interval});\r\r\n\t\r\r\n\t current_grid = current_grid.getNextFreeGrid(grids);\r\r\n }\r\r\n \r\r\n } \r\r\n \r\r\n}", "title": "" }, { "docid": "a14518b9d022faac7e298a437c5b53fd", "score": "0.49978", "text": "function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n const m = (left + right) >> 1;\n\n sort_select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}", "title": "" }, { "docid": "b95557aae617c30863098e5f1d55e9e2", "score": "0.49896178", "text": "function collectConflicts(metadata) {\n var win = winningRev(metadata);\n var leaves = collectLeaves(metadata.rev_tree);\n var conflicts = [];\n for (var i = 0, len = leaves.length; i < len; i++) {\n var leaf = leaves[i];\n if (leaf.rev !== win && !leaf.opts.deleted) {\n conflicts.push(leaf.rev);\n }\n }\n return conflicts;\n}", "title": "" }, { "docid": "b95557aae617c30863098e5f1d55e9e2", "score": "0.49896178", "text": "function collectConflicts(metadata) {\n var win = winningRev(metadata);\n var leaves = collectLeaves(metadata.rev_tree);\n var conflicts = [];\n for (var i = 0, len = leaves.length; i < len; i++) {\n var leaf = leaves[i];\n if (leaf.rev !== win && !leaf.opts.deleted) {\n conflicts.push(leaf.rev);\n }\n }\n return conflicts;\n}", "title": "" }, { "docid": "b95557aae617c30863098e5f1d55e9e2", "score": "0.49896178", "text": "function collectConflicts(metadata) {\n var win = winningRev(metadata);\n var leaves = collectLeaves(metadata.rev_tree);\n var conflicts = [];\n for (var i = 0, len = leaves.length; i < len; i++) {\n var leaf = leaves[i];\n if (leaf.rev !== win && !leaf.opts.deleted) {\n conflicts.push(leaf.rev);\n }\n }\n return conflicts;\n}", "title": "" }, { "docid": "b95557aae617c30863098e5f1d55e9e2", "score": "0.49896178", "text": "function collectConflicts(metadata) {\n var win = winningRev(metadata);\n var leaves = collectLeaves(metadata.rev_tree);\n var conflicts = [];\n for (var i = 0, len = leaves.length; i < len; i++) {\n var leaf = leaves[i];\n if (leaf.rev !== win && !leaf.opts.deleted) {\n conflicts.push(leaf.rev);\n }\n }\n return conflicts;\n}", "title": "" }, { "docid": "b95557aae617c30863098e5f1d55e9e2", "score": "0.49896178", "text": "function collectConflicts(metadata) {\n var win = winningRev(metadata);\n var leaves = collectLeaves(metadata.rev_tree);\n var conflicts = [];\n for (var i = 0, len = leaves.length; i < len; i++) {\n var leaf = leaves[i];\n if (leaf.rev !== win && !leaf.opts.deleted) {\n conflicts.push(leaf.rev);\n }\n }\n return conflicts;\n}", "title": "" }, { "docid": "b95557aae617c30863098e5f1d55e9e2", "score": "0.49896178", "text": "function collectConflicts(metadata) {\n var win = winningRev(metadata);\n var leaves = collectLeaves(metadata.rev_tree);\n var conflicts = [];\n for (var i = 0, len = leaves.length; i < len; i++) {\n var leaf = leaves[i];\n if (leaf.rev !== win && !leaf.opts.deleted) {\n conflicts.push(leaf.rev);\n }\n }\n return conflicts;\n}", "title": "" }, { "docid": "d52838b816933b3152e36f4a388ffea0", "score": "0.4982601", "text": "verticalOrder(root)\n {\n //your code here\n if (root === null) return null\n const range = new Range()\n const map = new Map()\n let result = []\n const queue = [[root, 0]]\n while (queue.length > 0) {\n let size = queue.length\n for (let i=0 ; i < size; i++) {\n let curr = queue.shift()\n let col = curr[1]\n if (col < range.min) {\n range.min = col\n } else if (col > range.max) {\n range.max = col\n }\n if (map.has(col)) {\n let temp = map.get(col)\n temp.push(curr[0].data)\n map.set(col, temp)\n } else {\n map.set(col, [curr[0].data])\n }\n if (curr[0].left !== null) {\n queue.push([curr[0].left, col - 1])\n }\n if (curr[0].right !== null) {\n queue.push([curr[0].right, col + 1])\n }\n }\n }\n for (let i = range.min; i <= range.max; i++) {\n result = result.concat(map.get(i))\n }\n \n return result\n }", "title": "" }, { "docid": "4fbe194f719d5bf566dbca96dc691e43", "score": "0.49780145", "text": "function compactTree(metadata) {\n var revs = [];\n traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n revHash, ctx, opts) {\n if (opts.status === 'available' && !isLeaf) {\n revs.push(pos + '-' + revHash);\n opts.status = 'missing';\n }\n });\n return revs;\n}", "title": "" }, { "docid": "4fbe194f719d5bf566dbca96dc691e43", "score": "0.49780145", "text": "function compactTree(metadata) {\n var revs = [];\n traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n revHash, ctx, opts) {\n if (opts.status === 'available' && !isLeaf) {\n revs.push(pos + '-' + revHash);\n opts.status = 'missing';\n }\n });\n return revs;\n}", "title": "" }, { "docid": "4fbe194f719d5bf566dbca96dc691e43", "score": "0.49780145", "text": "function compactTree(metadata) {\n var revs = [];\n traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n revHash, ctx, opts) {\n if (opts.status === 'available' && !isLeaf) {\n revs.push(pos + '-' + revHash);\n opts.status = 'missing';\n }\n });\n return revs;\n}", "title": "" }, { "docid": "4fbe194f719d5bf566dbca96dc691e43", "score": "0.49780145", "text": "function compactTree(metadata) {\n var revs = [];\n traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n revHash, ctx, opts) {\n if (opts.status === 'available' && !isLeaf) {\n revs.push(pos + '-' + revHash);\n opts.status = 'missing';\n }\n });\n return revs;\n}", "title": "" }, { "docid": "4fbe194f719d5bf566dbca96dc691e43", "score": "0.49780145", "text": "function compactTree(metadata) {\n var revs = [];\n traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n revHash, ctx, opts) {\n if (opts.status === 'available' && !isLeaf) {\n revs.push(pos + '-' + revHash);\n opts.status = 'missing';\n }\n });\n return revs;\n}", "title": "" }, { "docid": "4fbe194f719d5bf566dbca96dc691e43", "score": "0.49780145", "text": "function compactTree(metadata) {\n var revs = [];\n traverseRevTree(metadata.rev_tree, function (isLeaf, pos,\n revHash, ctx, opts) {\n if (opts.status === 'available' && !isLeaf) {\n revs.push(pos + '-' + revHash);\n opts.status = 'missing';\n }\n });\n return revs;\n}", "title": "" }, { "docid": "7cf8d821e06a61703b858bc127322da2", "score": "0.4975118", "text": "recurseTree ( )\n {\n var i = 0;\n var el = {};\n var base_tree = {};\n var head_tree = {};\n var orig_tree = {};\n var did_recurse = false;\n var path = \"\";\n\n console.log(\"Recursing...\");\n\n // Prepare to recurse\n for (i=0; i < this.changed.length; i++)\n {\n el = this.changed[i];\n\n // No need to recurse if one is null\n if (el.head === null || el.base === null)\n continue;\n\n // we can only recurse into trees\n if (el.head.type != \"tree\" && el.base.type != \"tree\")\n continue;\n\n if (el.base.type == \"tree\")\n base_tree = new FileTree(el.base.sha, el.base.url, el.base.path + \"/\");\n else\n base_tree = null;\n\n if (el.head.type == \"tree\")\n head_tree = new FileTree(el.head.sha, el.head.url, el.head.path + \"/\");\n else\n head_tree = null;\n\n if (el.orig !== null && el.orig.type == \"tree\")\n orig_tree = new FileTree(el.orig.sha, el.orig.url, el.orig.path + \"/\");\n else\n orig_tree = null;\n\n console.log(\"Recurse task \" + el.head.path);\n\n el.pending = new FileDiffer(base_tree, head_tree, orig_tree);\n }\n\n // Actually do the recursion\n for (i=0; i < this.changed.length; i++)\n {\n el = this.changed[i];\n\n if (\"pending\" in el)\n {\n console.log(\"Starting task.. \" + el.base.path);\n el.pending.fetch(this, this.recurseCallback);\n did_recurse = true;\n }\n }\n\n if (did_recurse === false)\n this.fetchAllFiles();\n }", "title": "" }, { "docid": "c5e2d76a68e4e4aa29e87419d5e22f2c", "score": "0.49713343", "text": "function sortChildren(children) {\n children.sort(compareChildren);\n }", "title": "" }, { "docid": "c5e2d76a68e4e4aa29e87419d5e22f2c", "score": "0.49713343", "text": "function sortChildren(children) {\n children.sort(compareChildren);\n }", "title": "" }, { "docid": "44f0a8f37249455dbfe02ee5e791e849", "score": "0.49667558", "text": "function sortNodes(nodes) {\n return nodes.sort((a, b) => {\n var compare = a.compareDocumentPosition(b);\n\n if (compare & Node.DOCUMENT_POSITION_FOLLOWING || compare & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n // a < b\n return -1;\n }\n\n if (compare & Node.DOCUMENT_POSITION_PRECEDING || compare & Node.DOCUMENT_POSITION_CONTAINS) {\n // a > b\n return 1;\n }\n\n if (compare & Node.DOCUMENT_POSITION_DISCONNECTED || compare & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC) {\n throw Error(\"Cannot sort the given nodes.\");\n } else {\n return 0;\n }\n });\n}", "title": "" }, { "docid": "afb890b5610d04e502374f0ef70e84da", "score": "0.49569973", "text": "sortedItems() {\n return this.childItems.slice().sort((i1, i2) => {\n return i1.index - i2.index;\n });\n }", "title": "" }, { "docid": "912f5755d0bf4e9af9663cbcba960726", "score": "0.4953615", "text": "visitSortStatement(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "title": "" }, { "docid": "1b702af75af0d0b3c6192ef62c943aac", "score": "0.49503893", "text": "static sortChangeRequests(allChanges) {\n return Object\n .keys(allChanges)\n .map(key => allChanges[key])\n .sort((a, b) => a.order < b.order ? -1 : 1);\n }", "title": "" }, { "docid": "cafd233c799a5d5f5275980624326ba3", "score": "0.49384636", "text": "traverse(root, word) {\n if (root.isLeaf) {\n this.push_sort_suggestions({word, freq: root.frequency});\n return true;\n }\n\n for (const letter in root.children) {\n this.traverse(root.children[letter], word + letter);\n }\n }", "title": "" }, { "docid": "389202b327720d427538c4e4f065ee41", "score": "0.49354917", "text": "fetchTreeShas ( base, head, orig )\n {\n console.log(\"Fetching trees\");\n this.fetchTreeFromCommit(base, \"base_tree\", this.checkTreesDone);\n this.fetchTreeFromCommit(head, \"head_tree\", this.checkTreesDone);\n this.fetchTreeFromCommit(orig, \"orig_tree\", this.checkTreesDone);\n }", "title": "" }, { "docid": "13ce442e62cac1df05c33194f4306731", "score": "0.49289736", "text": "function minDepth(binaryTreeRoot) {\n let queue = new Queue(); \n let levelOrderArr = [];\n let level = 0;\n queue.enqueue(binaryTreeRoot);\n\n while (queue.size > 0) {\n level +=1;\n let levelSize = queue.size;\n console.log('level: ', level);\n console.log('levelSize: ', levelSize);\n let levelArr = [];\n \n for (let i = 0; i < levelSize; i++) {\n let levelNode = queue.dequeue();\n\n // checks if node is a leaf node; if so, we're at lowest level where there's a leaf\n if (levelNode.left === null && levelNode.right === null) {\n console.log('level : ', level);\n return level\n } \n\n if (levelNode.left) {\n queue.enqueue(levelNode.left);\n }\n if (levelNode.right) {\n queue.enqueue(levelNode.right);\n }\n levelArr.push(levelNode.id);\n }\n console.log('levelArr: ', levelArr);\n levelOrderArr.push(levelArr);\n console.log('levelOrderArr : ', levelOrderArr);\n } \n}", "title": "" }, { "docid": "e40738d261d09aaf77eafd5941c6c355", "score": "0.49260154", "text": "function compareByIdThenRev(a, b) {\n var idCompare = compare(a._id, b._id);\n if (idCompare !== 0) {\n return idCompare;\n }\n var aStart = a._revisions ? a._revisions.start : 0;\n var bStart = b._revisions ? b._revisions.start : 0;\n return compare(aStart, bStart);\n}", "title": "" }, { "docid": "e40738d261d09aaf77eafd5941c6c355", "score": "0.49260154", "text": "function compareByIdThenRev(a, b) {\n var idCompare = compare(a._id, b._id);\n if (idCompare !== 0) {\n return idCompare;\n }\n var aStart = a._revisions ? a._revisions.start : 0;\n var bStart = b._revisions ? b._revisions.start : 0;\n return compare(aStart, bStart);\n}", "title": "" } ]
7f3f9c68acc98615125557736f7e649d
returns pickedColor or null if no pickable layers found.
[ { "docid": "2580aa6bbeea6df5394cde84bce81ebe", "score": "0.0", "text": "_drawAndSample({\n layers,\n views,\n viewports,\n onViewportActive,\n deviceRect,\n pass,\n redrawReason,\n pickZ\n }) {\n const pickingFBO = pickZ ? this.depthFBO : this.pickingFBO;\n\n const {decodePickingColor} = this.pickLayersPass.render({\n layers,\n layerFilter: this.layerFilter,\n views,\n viewports,\n onViewportActive,\n pickingFBO,\n deviceRect,\n pass,\n redrawReason,\n pickZ\n });\n\n // Read from an already rendered picking buffer\n // Returns an Uint8ClampedArray of picked pixels\n const {x, y, width, height} = deviceRect;\n const pickedColors = new (pickZ ? Float32Array : Uint8Array)(width * height * 4);\n readPixelsToArray(pickingFBO, {\n sourceX: x,\n sourceY: y,\n sourceWidth: width,\n sourceHeight: height,\n target: pickedColors\n });\n\n return {pickedColors, decodePickingColor};\n }", "title": "" } ]
[ { "docid": "4cec657fc700177490b61a682626ef8c", "score": "0.65600276", "text": "getCurrentColor() {\n if (this.state.pattern[\"args\"].includes(\"color\")) {\n const selected = this.state.colors[this.state.selectedColor];\n if (this.state.enteredColor !== selected) {\n return this.state.enteredColor;\n }\n return selected;\n }\n return null;\n }", "title": "" }, { "docid": "f0ef18497b258d9e14e300ed8ad74e22", "score": "0.6547986", "text": "pickSwatchColor() {\n\t\tvar stx = this.context.stx;\n\t\tvar swatch = this.node.find(\"cq-swatch\");\n\t\tif (!swatch.length) return;\n\t\tvar currentColor = swatch[0].style.backgroundColor;\n\n\t\tvar usedColors = {};\n\t\tfor (var s in stx.chart.series) {\n\t\t\tvar series = stx.chart.series[s];\n\t\t\tif (!series.parameters.isComparison) continue;\n\t\t\tusedColors[CIQ.convertToNativeColor(series.parameters.color)] = true;\n\t\t}\n\n\t\tif (currentColor !== \"\" && !usedColors[currentColor]) return; // Currently picked color not in use then allow it\n\t\tfor (var i = 0; i < this.swatchColors.length; i++) {\n\t\t\t// find first unused color from available colors\n\t\t\tif (!usedColors[this.swatchColors[i]]) {\n\t\t\t\tswatch[0].style.backgroundColor = this.swatchColors[i];\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//Uh oh, all colors taken. Last color will be used.\n\t}", "title": "" }, { "docid": "872bb2968e790478208e59a44d96b3e5", "score": "0.63610053", "text": "function pickColor () {\n\t\tvar random = Math.floor(Math.random() * colors.length);\n\t\treturn colors [random];\n\t}", "title": "" }, { "docid": "f5302f6bcba640a967ce01a91de1a902", "score": "0.6267803", "text": "_getPickable(layers) {\n if (this._pickable === false) {\n return null;\n }\n const pickableLayers = layers.filter(layer => layer.isPickable() && !layer.isComposite);\n return pickableLayers.length ? pickableLayers : null;\n }", "title": "" }, { "docid": "bb8e7a751172a653ddca1a6cc71d3e97", "score": "0.62076235", "text": "function pickColor() {\n\treturn colors[Math.floor(Math.random() * colors.length)];\n}", "title": "" }, { "docid": "f156bb511d5e55aa726b8677e4bfd329", "score": "0.6171935", "text": "function pickColor() {\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "f156bb511d5e55aa726b8677e4bfd329", "score": "0.6171935", "text": "function pickColor() {\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "15d58e94a73ec84b6f6d3ce9e59f15c4", "score": "0.612784", "text": "function pickColor() {\r\n\tconst random = Math.floor(Math.random() * colors.length);\r\n\treturn colors[random];\r\n}", "title": "" }, { "docid": "18cd98a14c2c0597a6e1a76148dfdeff", "score": "0.6118451", "text": "function selectColor(){\n var color = colorPicker.value;\n return color;\n }", "title": "" }, { "docid": "9c89a7f14705efe094fedf540dae16c2", "score": "0.61061525", "text": "function pickColor() {\n\t// choose a random number based on length of colors array\n\tvar random = Math.floor(Math.random() * colors.length);\n\t// return that random color\n\treturn colors[random];\n}", "title": "" }, { "docid": "df36e9365a153132ce68a3207521c573", "score": "0.6076378", "text": "function pickColor(){\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "df36e9365a153132ce68a3207521c573", "score": "0.6076378", "text": "function pickColor(){\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "df36e9365a153132ce68a3207521c573", "score": "0.6076378", "text": "function pickColor(){\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "e51bfa5f33e574b34f24ebc4f76e295a", "score": "0.60498995", "text": "function pickColor(){\n\tvar random = Math.floor(Math.random()*colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "88f3409eee307a250e33ac3f4f987ec9", "score": "0.6004716", "text": "function pickColor() {\n var random = Math.floor(Math.random() * colors.length);\n\n return colors[random];\n}", "title": "" }, { "docid": "95ec3ff96248065d2d415ae6aa7f9425", "score": "0.5998976", "text": "function pickColor() {\n return colors[Math.floor(Math.random() * colors.length)];\n}", "title": "" }, { "docid": "5ec10d7e6f317305e40564f49db932e7", "score": "0.59882873", "text": "function pickColor(){\n\tvar num = Math.floor(Math.random()*colors.length);\n\treturn colors[num];\n}", "title": "" }, { "docid": "6b19c994bdc69f71b0aac67c6552bb29", "score": "0.5981134", "text": "function pickColor() {\n let random = Math.floor(Math.random() * colors.length);\n return colors[random];\n}", "title": "" }, { "docid": "6b19c994bdc69f71b0aac67c6552bb29", "score": "0.5981134", "text": "function pickColor() {\n let random = Math.floor(Math.random() * colors.length);\n return colors[random];\n}", "title": "" }, { "docid": "677e2ba214c8a1a63ded396762a47257", "score": "0.5979251", "text": "function pickColor () {\n var randomNum = Math.floor(Math.random() * colors.length)\n return colors[randomNum]\n}", "title": "" }, { "docid": "8cc5d04e16afe7724768e78c6fd5b724", "score": "0.5976487", "text": "function pickcolor(){\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "7414c010c4004ef9ab4476a03b1929c1", "score": "0.59538215", "text": "function pickColor() {\r\n //generate a random number for the colors\r\n var random=Math.floor( Math.random() * colors.length);\r\n return colors[random];\r\n}", "title": "" }, { "docid": "25c4f01d2f8bb3e8235ad97a7a046460", "score": "0.5952543", "text": "function pickColor() {\n let random = Math.floor(Math.random() * colors.length)\n return colors[random]\n}", "title": "" }, { "docid": "55150fa53345fbff2e46b342272016ef", "score": "0.5922281", "text": "function pickColor() {\n var random_color = Math.floor(Math.random() * colors.length);\n return colors[random_color];\n}", "title": "" }, { "docid": "1d83b547d9122e69ad0ee1c8e9e5bc4f", "score": "0.59212124", "text": "function pickColor() {\r\n var random = Math.floor(Math.random() * colors.length);\r\n return colors[random];\r\n}", "title": "" }, { "docid": "1d83b547d9122e69ad0ee1c8e9e5bc4f", "score": "0.59212124", "text": "function pickColor() {\r\n var random = Math.floor(Math.random() * colors.length);\r\n return colors[random];\r\n}", "title": "" }, { "docid": "6b496bd71077e9f54715d298a85a3c05", "score": "0.5898605", "text": "function pickColor(){\n if(availableColors.length > 0){\n var i = randInt(0,availableColors.length-1);\n var color = availableColors[i];\n availableColors.splice(i,1);\n colorInUsed.push(color);\n return color;\n }\n return \"black\";\n}", "title": "" }, { "docid": "cb9a4d42fbacf6b7bd7bed7dfc511fb4", "score": "0.5893842", "text": "function pickColor(){\n var random = Math.floor(Math.random() * colors.length);\n return colors[random]\n}", "title": "" }, { "docid": "fbb3f7ede9552e9401a9fd63b384fd9c", "score": "0.588379", "text": "function pickColor() {\r\n var random = Math.floor(Math.random() * colors.length)\r\n return colors[random];\r\n}", "title": "" }, { "docid": "94a6152012154686965b1c4a943d12f6", "score": "0.58554614", "text": "function pickColor() {\n let random = Math.floor(Math.random() * colors.length);\n return colors[random];\n}", "title": "" }, { "docid": "5844b2a539ce154f3f4e3a64d4010917", "score": "0.58537513", "text": "function pickColor(){\n var random = Math.floor(Math.random() * colors.length);\n return colors[random];\n}", "title": "" }, { "docid": "6226220a6af9daa98c119989e7ff0204", "score": "0.58228946", "text": "function pickSwatch(swatchColor, selectedColor) {\n selectedColor = $(swatchColor).attr('data-color');\n console.log(\"hex : \" + selectedColor);\n colorPicker.val(selectedColor);\n }", "title": "" }, { "docid": "1436cbfe8d8354d91a319298fd5d6ba5", "score": "0.5814868", "text": "getSelectedLayer() {\n // Query checked radio button\n const radio = list.querySelector(':checked');\n return this.radioToLayer.get(radio);\n }", "title": "" }, { "docid": "9044225b1f7bf309e9ed315452c8011d", "score": "0.58119285", "text": "function pickColor () {\n var indexNum = Math.floor(Math.random() * colors.length);\n return colors[indexNum];\n}", "title": "" }, { "docid": "117fe2b50e0a9cc723227da8eeb019e4", "score": "0.5811572", "text": "function chooseColor() {\n\tvar random = Math.floor(Math.random() * colors.length);\n\treturn colors[random];\n}", "title": "" }, { "docid": "e05cc8567935584cd30375385416f41d", "score": "0.5800354", "text": "getCurrentColorList() {\n if (this.state.pattern[\"args\"].includes(\"color_list\")) {\n return this.state.enteredColorList;\n }\n return null;\n }", "title": "" }, { "docid": "c2ad4e4ce76fb31967dfe0363592ab6a", "score": "0.5770394", "text": "getSelectedColor() {\n // return first selected label color\n const sel = self.children.find(c => c.selected === true);\n\n return sel && sel.background;\n }", "title": "" }, { "docid": "2e65270779b0b5947cf5fd5c9367ea89", "score": "0.5761492", "text": "chooseColor() {\n let randomIndex = Math.floor(Math.random() * this.colors.length);\n return this.colors[randomIndex];\n }", "title": "" }, { "docid": "b48a1e675426028b11d971968f7abdb3", "score": "0.56830245", "text": "function colorPicked() {\n return document.getElementById(\"colorPicker\").value;\n}", "title": "" }, { "docid": "ef32bb98a9ca2c7cd9fdeaa3911e57c2", "score": "0.565773", "text": "function pickColour() {\n\tvar random = Math.floor(Math.random() * colours.length);\n\treturn colours[random];\n}", "title": "" }, { "docid": "0a891a22b04b519b9b1be3e0f9175f94", "score": "0.56509745", "text": "function pickColor() {\r\n var random = Math.floor(Math.random() * color.length);\r\n console.log(\"Color picked is: \" + color[random]);\r\n return color[random];\r\n}", "title": "" }, { "docid": "7c6407dd51fbf577f25847f8c56e3833", "score": "0.5650069", "text": "function chooseColor(){\n var randomColorSelection = Math.floor(Math.random()* colors.length);\n return colors[randomColorSelection];\n}", "title": "" }, { "docid": "c9054a6493cfdf175005d30e73358a59", "score": "0.5616458", "text": "function getExistingColor() {\n //원래로컬인데...사용하려고 전역으로 뺌\n existingcolors = findColors(); //레벨1에서 사용된 색들(중복없는 색 배열)\n var bubbletype = bbDic.red; //1로 초기화\n \n ExistColorCount = existingcolors.length;\n \n if (existingcolors.length > 0) {\n bubbletype = existingcolors[randRange(0, existingcolors.length - 1)]; //사용된 색 중에서 1개\n }\n \n var s = convertStr2Arr1D(existingcolors);\n if(dm) console.log(\"getExistingColor: \" + bubbletype + \", color:\" + s);\n \n if(firstRed){\n if(kData.curLevel+1==1 || kData.curLevel+1==2){\n bubbletype=1;\n// player.tiletype=1;\n// player.bubble.tiletype=3;\n// player.nextbubble.tiletype=3;\n firstRed = false;\n }\n } \n return bubbletype;\n}", "title": "" }, { "docid": "94eb4933516a9bca8938a8bdaadcbf12", "score": "0.56104296", "text": "pickColor(){\n let red = Math.round((Math.random() *255));\n let green = Math.round((Math.random() *255));\n let blue = Math.round((Math.random() *255));\n\n //Prevent to generate the white color\n if(red >= 240 && green >= 240 && blue >= 240){\n\n return this.pickColor();\n }\n\n return {\"red\":red, \"green\": green, \"blue\": blue};\n }", "title": "" }, { "docid": "f4ccf01730b1cd7394d80a8d8019e3cf", "score": "0.56036687", "text": "function getCurrentColor()\n{\n\treturn(currentColor);\n}", "title": "" }, { "docid": "6f55423eb83aaab13354df2c134e1239", "score": "0.5589712", "text": "function pickColor(){\nvar random = Math.floor(Math.random() * colors.length);\nreturn colors[random];\n}", "title": "" }, { "docid": "d4520fdc3952dd3d271521a9d2b99be9", "score": "0.5585981", "text": "function pickRandomColor(){\r\n\tvar random = Math.floor(Math.random() * colors.length);\r\n\treturn colors[random];\r\n}", "title": "" }, { "docid": "706dfe3c7f4617dd04182691a00bed53", "score": "0.55569583", "text": "function colorPicker() {\n let random = Math.floor(Math.random() * colors.length);\n return colors[random];\n}", "title": "" }, { "docid": "944f295332928cbb85e56bde00cdcfef", "score": "0.55290234", "text": "function pickOneColor() {\n return all_colors[Math.floor(Math.random() * 100 / 2)];\n}", "title": "" }, { "docid": "21b44094fede4d87816bf9387be6b651", "score": "0.54954237", "text": "function pickCorrectColor() {\n var randomNum = Math.floor(Math.random() * colorOptions.length);\n var correctColor = colorOptions[randomNum];\n return correctColor;\n}", "title": "" }, { "docid": "c60949782ab359e09bdb8e6b60622e85", "score": "0.5479391", "text": "get color() { return this._color || this.selectionList.color; }", "title": "" }, { "docid": "b1c9bd5d1316dfa638d58e0d93291586", "score": "0.54507446", "text": "function pickColor(){\n //pick a randmom color from colors array\n let rand = Math.floor(Math.random()*colors.length);\n return colors[rand];\n}", "title": "" }, { "docid": "2c6d255cfa967981356c00e219be0493", "score": "0.544991", "text": "selectedLayerId(state) {\n const selected = Object.keys(state.selected)\n if (selected.length === 1) {\n const id = selected[0]\n const part = state.parts[id]\n if (!part.children) {\n return id\n }\n }\n return null\n }", "title": "" }, { "docid": "ac6969996f254a66d4c3976fd81dce1a", "score": "0.5444045", "text": "function pickedcolor(s)\r\n{\r\n var random = Math.floor(Math.random() * colors.length);\r\n return colors[random];\r\n}", "title": "" }, { "docid": "d4e3f0c37317a09a9dc0499ca84b3f81", "score": "0.54104054", "text": "function colorPicker(){\r\n\tlet random = Math.floor(Math.random()* colors.length);\r\n\treturn colors[random];\r\n}", "title": "" }, { "docid": "35467ff5072d3c38c209f3d00b4af05c", "score": "0.5408844", "text": "function getBGCandidateFromLayers(layers) {\n if (!layers) return\n\n log(3, 'Getting background candidate from layers', layers)\n\n var candidate\n var existingBackground = layers.find(function(layer) {\n if (layer.name().startsWith('-'))\n return false\n\n if (canLayerHavePadding(layer)) {\n if (layerHasPadding(layer)) {\n return true\n } else if (!candidate) {\n candidate = layer\n }\n }\n\n return false\n })\n\n log(3, (existingBackground ? 'Existing background: ' + existingBackground.name() : (candidate ? 'New candidate: ' + candidate.name() : 'No candidate')))\n\n return existingBackground ? existingBackground : candidate\n}", "title": "" }, { "docid": "c04b63d00e621047a0a5cf015ee81aaa", "score": "0.54079306", "text": "get color() {\n return this._color ||\n (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);\n }", "title": "" }, { "docid": "c04b63d00e621047a0a5cf015ee81aaa", "score": "0.54079306", "text": "get color() {\n return this._color ||\n (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);\n }", "title": "" }, { "docid": "c04b63d00e621047a0a5cf015ee81aaa", "score": "0.54079306", "text": "get color() {\n return this._color ||\n (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);\n }", "title": "" }, { "docid": "cfd31cafd4e462a793f9e6e23fd7c4ce", "score": "0.5383492", "text": "function colorPicker() {\n return colors[Math.floor(Math.random() * colors.length)];\n}", "title": "" }, { "docid": "0ea6e54d00f8cb3d700c5a3a827119b9", "score": "0.5383448", "text": "function pickColor()\n{\n //selecting a random number from 0-5 and using it as index of colors array to pick a random color\n var random= Math.floor(Math.random() * colors.length);\n return colors[random];\n}", "title": "" }, { "docid": "b05bae7fa7b7f9e549cf11884822b61e", "score": "0.53725797", "text": "function colorPick(){\n let colorIndex = Math.floor(Math.random() * 12);\n return colorList[colorIndex];\n}", "title": "" }, { "docid": "3ce7e092e02ac935dacd0e6a182beac2", "score": "0.5367584", "text": "function colorPick() {\n $('.pick-container').append('<div class=\"pickRandom\">' +\n colors[j] + '</div>');\n return;\n }", "title": "" }, { "docid": "9445b9901d587fbf4cfb48a401ab7c97", "score": "0.5353818", "text": "function pickColor(){\n const r = Math.random() * (254 - 0) + 0;\n const g = Math.random() * (254 - 0) + 0;\n const b = Math.random() * (254 - 0) + 0;\n return 'rgb('+r+','+g+', '+b+')';\n}", "title": "" }, { "docid": "ce0aa793f73c20c9cfe7357625badf01", "score": "0.5331463", "text": "function colourPicker() {\n\tlet randomNum = Math.floor(Math.random() * colours.length);\n\treturn colours[randomNum];\n}", "title": "" }, { "docid": "b27ee804a9a42a720b56ed92bc9d7c2f", "score": "0.5325823", "text": "function pickColour(){\n var random = Math.floor(Math.random() * colours.length);\n return colours[random];\n}", "title": "" }, { "docid": "be87c664b0f08693059cb5328f681d01", "score": "0.5318451", "text": "function colorSelected() {\n var node = this.selection.getNode();\n return standardizeColor(Element.getStyle(node, 'color'));\n }", "title": "" }, { "docid": "adb88729247c8ed512da1477255508ad", "score": "0.5287739", "text": "function chooseColor(){\n // Shamelessly taken from http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/\n var colors = [\n '#F37E79', '#7998F3', '#BBF379', '#F379DF', '#79F3E3', '#F3BF79', '#F3BF79', '#9C79F3',\n '#7AF379', '#F3799D', '#79C1F3', '#E4F379', '#DE79F3', '#79F3BA', '#F39779', '#797FF3',\n '#A2F379', '#F379C6', '#79E9F3', '#F3D979', '#B579F3', '#79F392', '#F37984', '#79A8F3',\n '#CBF379', '#F379EE', '#79F3D3'\n ];\n return colors[Math.floor(Math.random() * colors.length)];\n }", "title": "" }, { "docid": "363c42baabbf76be5d8bf66cd4d5713d", "score": "0.52365774", "text": "function pickRandomColour(){\n\tvar random = Math.floor(Math.random() * colours.length);\n\treturn colours[random];\n}", "title": "" }, { "docid": "75799d882664a21fc90a961a02ddc29a", "score": "0.52128327", "text": "function colorChoice(event){\n chosenColor = event.target.id;\n}", "title": "" }, { "docid": "9c9808042cd4cf02cbebe41947956dba", "score": "0.5204162", "text": "function GL_getPickedIndex() {\n\t\n var pickX = GL_mouseXRelToCanvas;\n if (gl.viewportWidth != gl.newCanvasWidth) {\n \t// Avoid rounding problems\n \tpickX = pickX * gl.viewportWidth / gl.newCanvasWidth;\n }\n var pickY = GL_mouseYRelToCanvas;\n if (gl.viewportHeight != gl.newCanvasHeight) {\n \tpickY = pickY * gl.viewportHeight / gl.newCanvasHeight;\n }\n var pixelValues = new Uint8Array(4);\n\tgl.readPixels(pickX, gl.viewportHeight - pickY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixelValues);\n\tvar dict_key = '' + pixelValues[0] + pixelValues[1] + pixelValues[2];\n\tif (dict_key == '000') { return GL_BACKGROUND; }\n\tif (GL_colorPickerMappingDict[dict_key] != undefined) {\n\t\treturn GL_colorPickerMappingDict[dict_key];\n\t} else {\n\t\treturn GL_NOTFOUND;\n\t}\n\t\n}", "title": "" }, { "docid": "0c16eac8d1d09f879a905c741f718dbd", "score": "0.5160822", "text": "function getColorPalette(){\n var choice = floor(random(colorPalettes.length));\n return colorPalettes[choice];\n}", "title": "" }, { "docid": "fd9cc9f189b668b8890fda7cadd99b87", "score": "0.5159066", "text": "function playerInput() {\n return clickedColor;\n }", "title": "" }, { "docid": "1d9d518bbec6ab4f80dd8787757a9fe5", "score": "0.51522744", "text": "setPickingColor() {\r\n\r\n var c = this._pickingColor;\r\n\r\n //billboard\r\n this.billboard && this.billboard.setPickingColor3v(c);\r\n\r\n //label\r\n this.label && this.label.setPickingColor3v(c);\r\n\r\n //shape\r\n this.shape && this.shape.setPickingColor3v(c);\r\n\r\n //polyline\r\n this.polyline && this.polyline.setPickingColor3v(c);\r\n\r\n for (var i = 0; i < this.childrenNodes.length; i++) {\r\n this.childrenNodes[i].setPickingColor();\r\n }\r\n }", "title": "" }, { "docid": "49d49caae99d9fc0fa6bc3d3c573f9a7", "score": "0.5142754", "text": "function colorPick(){\n themeColor = $('#themeColor').val();\n }", "title": "" }, { "docid": "983bee33264ee180ad6bdb62f7a4dc71", "score": "0.51404244", "text": "function getColor() {\n var randomColor = Math.floor(Math.random() * colors.length);\n return colors[randomColor];\n}", "title": "" }, { "docid": "6c3f0766aa3ce9f436608ead773b70c6", "score": "0.5133805", "text": "function pickColor(pickIndex) {\n let i;\n let color = document.querySelectorAll(\".clothColor\");\n for (i = 0; i < color.length; i++) {\n color[i].className = color[i].className.replace(\"color-pick\", \"\");\n }\n color[pickIndex].className += \" color-pick\";\n\n // recover the quantity to 1\n document.querySelector('.input-number').value = 0;\n realtime_quantity = 0;\n\n // color : rgb(187, 119, 68)\n return color[pickIndex].style.backgroundColor;\n}", "title": "" }, { "docid": "90d52ba565fa79a653f3d9621147ba92", "score": "0.51116925", "text": "function pickColour() {\n colourMode = colourPicker.value\n}", "title": "" }, { "docid": "671ea07281c01a917a46d40b7216f666", "score": "0.5108499", "text": "function pickColor(value) {\n // the range of colors, green to red\n const low = [3, 252, 11];\n const high = [252, 181, 3];\n // color modifiying delta\n const delta = (value / Math.sqrt(info.largest));\n // get the color value based off the range\n const color = [];\n for (var i = 0; i < 3; i++) {\n color[i] = parseInt((high[i] - low[i]) * delta + low[i]);\n if (color[i] > 255) {\n color[i] = 255;\n } else if (color[i] < 0) {\n color[i] = 0;\n }\n }\n // set opacity\n if (value < Math.cbrt(info.average)) {\n const opacityValue = value / Math.cbrt(info.average);\n const opacityLimit = 50;\n\n color[3] = opacityValue * 255;\n // sets opacity limit\n if (opacityLimit > color[3]) {\n // for 0 cases change opacity to be noticeably different\n if (value === 0) {\n color[3] = opacityLimit / 2;\n }\n color[3] = opacityLimit;\n }\n\n } else {\n color[3] = 255;\n }\n\n return color;\n}", "title": "" }, { "docid": "86e41593a7f4c26b7d1466f128507990", "score": "0.510456", "text": "function getFillColor(objects, propertyId, defaultColor) {\n var value = getValue(objects, propertyId);\n if (!value || !value.solid) {\n return defaultColor;\n }\n return value.solid.color;\n }", "title": "" }, { "docid": "86e41593a7f4c26b7d1466f128507990", "score": "0.510456", "text": "function getFillColor(objects, propertyId, defaultColor) {\n var value = getValue(objects, propertyId);\n if (!value || !value.solid) {\n return defaultColor;\n }\n return value.solid.color;\n }", "title": "" }, { "docid": "86e41593a7f4c26b7d1466f128507990", "score": "0.510456", "text": "function getFillColor(objects, propertyId, defaultColor) {\n var value = getValue(objects, propertyId);\n if (!value || !value.solid) {\n return defaultColor;\n }\n return value.solid.color;\n }", "title": "" }, { "docid": "86e41593a7f4c26b7d1466f128507990", "score": "0.510456", "text": "function getFillColor(objects, propertyId, defaultColor) {\n var value = getValue(objects, propertyId);\n if (!value || !value.solid) {\n return defaultColor;\n }\n return value.solid.color;\n }", "title": "" }, { "docid": "86e41593a7f4c26b7d1466f128507990", "score": "0.510456", "text": "function getFillColor(objects, propertyId, defaultColor) {\n var value = getValue(objects, propertyId);\n if (!value || !value.solid) {\n return defaultColor;\n }\n return value.solid.color;\n }", "title": "" }, { "docid": "86e41593a7f4c26b7d1466f128507990", "score": "0.510456", "text": "function getFillColor(objects, propertyId, defaultColor) {\n var value = getValue(objects, propertyId);\n if (!value || !value.solid) {\n return defaultColor;\n }\n return value.solid.color;\n }", "title": "" }, { "docid": "aecaf7996b3fcfe430ea34280fb5b3b5", "score": "0.51029843", "text": "function getPixelColor() {\n pixel = color.value;\n return pixel;\n}", "title": "" }, { "docid": "8eb38a0e8b394e0650897a722e13da47", "score": "0.51010704", "text": "function getFillColor(objects, propertyId, defaultColor) {\r\n var value = getValue(objects, propertyId);\r\n if (!value || !value.solid) {\r\n return defaultColor;\r\n }\r\n return value.solid.color;\r\n }", "title": "" }, { "docid": "f255f0a6dd1051386b68b1099da9b64d", "score": "0.5101006", "text": "colorPicker() {\n if(this.state.colInd + 1 < color.length) {\n this.state.colInd++;\n } else {\n this.state.colInd = 0;\n }\n\n return color[this.state.colInd];\n }", "title": "" }, { "docid": "72a48888befbb2bababe8599aec94867", "score": "0.50939035", "text": "function pickColor(){\nvar random=Math.floor(Math.random()*colors.length)//picks a number in between 0 and 1 not including 1. \n//if you did Math.random*6 it would give u a number from 0-5 so do a +1 at the end to make it 1-6\n//Math.floor removes the decimals\nreturn colors[random];\n}", "title": "" }, { "docid": "b6b4c8977f7461a3612af41a754ce1a2", "score": "0.5080448", "text": "function pickColor(){ //this function will 1.pick a random number 2.Use number to access color at that index of the array 3.return color\n var random = Math.floor(Math.random() * colors.length) ; //will generate number between 0 and 1 then multiply by the length of the colors array (could have 3 or 6 items in array depending on hard or easy mode)\n return colors[random]; //index of array chosen is random\n}", "title": "" }, { "docid": "e23ff00d272d34efc4f34cb92f20ac54", "score": "0.50772554", "text": "function pickColor(){\n\t\tlet colorValue = document.querySelector('#colorChooser').value;\n\t\tif(colorValue == \"rainbow\") {\n\t\t\tdocument.querySelector(\"#colorspeed\").style.display = \"block\";\n\t\t\tif(randomTimer <= 0){\n\t\t\t\tlet newColor = aapLIB.getRandomColor();\n\t\t\t\tcolor = newColor;\n\t\t\t\troot.style.setProperty('--border-color', newColor);\n\t\t\t\trandomTimer = 100/colorchangespeed;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trandomTimer--;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdocument.querySelector(\"#colorspeed\").style.display = \"none\";\n\t\t\tcolor = colorValue;\n\t\t\troot.style.setProperty('--border-color', colorValue);\n\t\t}\n\t}", "title": "" }, { "docid": "be075b31def095adf0415169f4b20ece", "score": "0.5066469", "text": "get actualSelectedItemHoverBackgroundColor() {\n return brushToString(this.i.e8);\n }", "title": "" }, { "docid": "e10588f4cbdb7e2b07be93172da7aabc", "score": "0.5065213", "text": "function chooseColor() {\n randomColor = colorsTab[Math.floor(Math.random() * colorsTab.length)]\n return randomColor\n}", "title": "" }, { "docid": "bcb41940c4f7ed405a1680e7a135ac28", "score": "0.5063942", "text": "function setPickedColor(color) {\n\t\t\tvm.currentPickedColor = color;\n\t\t}", "title": "" }, { "docid": "bbc4b7dd5d37eeeced2ffab8178a4e98", "score": "0.50499254", "text": "function pickColor(number){\n\t\t\tswitch(number){\n\t\t\t\tcase 0:\n\t\t\t\t\treturn 'red';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\treturn 'blue';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\treturn 'yellow';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\treturn 'green';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\treturn 'silver';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\treturn 'orange';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\treturn 'black';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "44e2275bc41970e3dd7e760a7044286d", "score": "0.50478387", "text": "get actualSelectedItemBackgroundColor() {\n return brushToString(this.i.e7);\n }", "title": "" }, { "docid": "ce57217a742170dc644160a4a5f1122a", "score": "0.5039662", "text": "function getLayer(id) {\n for (var ii = 0; ii < layerCount; ii++) {\n if (layers[ii].getId() == id) {\n return layers[ii];\n } // if\n } // for\n\n return null;\n }", "title": "" }, { "docid": "98da98997ab301e05a9ee330ee8e3293", "score": "0.5025001", "text": "getColor() {\n return null;\n }", "title": "" }, { "docid": "3a5adeb63853803dd2f452578c2dee1c", "score": "0.50129396", "text": "getLastPickedObject({x, y, layers, viewports}, lastPickedInfo = this.lastPickedInfo.info) {\n const lastPickedLayerId = lastPickedInfo && lastPickedInfo.layer && lastPickedInfo.layer.id;\n const lastPickedViewportId =\n lastPickedInfo && lastPickedInfo.viewport && lastPickedInfo.viewport.id;\n const layer = lastPickedLayerId ? layers.find(l => l.id === lastPickedLayerId) : null;\n const viewport =\n (lastPickedViewportId && viewports.find(v => v.id === lastPickedViewportId)) || viewports[0];\n const coordinate = viewport && viewport.unproject([x - viewport.x, y - viewport.y]);\n\n const info = {\n x,\n y,\n viewport,\n coordinate,\n layer\n };\n\n return {...lastPickedInfo, ...info};\n }", "title": "" }, { "docid": "c43b2dc0d2022c3933b07856a92daa15", "score": "0.50118196", "text": "function colorPicked(e) {\n\t_pickedColor = e.target.getAttribute('color');\n\t// log('Picked color ' + _pickedColor);\n\t$('#colorTable tr td[selected=\"true\"]').removeAttr('selected').css({'border-color':'black' });\n\te.target.style.borderColor = 'white';\n\te.target.setAttribute('selected','true');\n}", "title": "" }, { "docid": "9455a10faa595eaa2605eaf5a062701c", "score": "0.5004489", "text": "function getSelectedLayersId() {\n var selectedLayers = [];\n try {\n var targetLayersTypeId = stringIDToTypeID(\"targetLayers\");\n var selectedLayersReference = new ActionReference();\n selectedLayersReference.putProperty(charIDToTypeID(\"Prpr\"), targetLayersTypeId);\n selectedLayersReference.putEnumerated(charIDToTypeID(\"Dcmn\"), charIDToTypeID(\"Ordn\"), charIDToTypeID(\"Trgt\"));\n var descriptor = executeActionGet(selectedLayersReference);\n if (descriptor.hasKey(targetLayersTypeId) == false) {\n selectedLayersReference = new ActionReference();\n selectedLayersReference.putProperty(charIDToTypeID(\"Prpr\"), charIDToTypeID(\"LyrI\"));\n selectedLayersReference.putEnumerated(charIDToTypeID(\"Lyr \"), charIDToTypeID(\"Ordn\"), charIDToTypeID(\"Trgt\"));\n descriptor = executeActionGet(selectedLayersReference);\n var id = descriptor.getInteger(charIDToTypeID(\"LyrI\"));\n if (isVisiblebyId(id)) {\n selectedLayers.push(id);\n }\n } else {\n var hasBackground = hasBackgroundLayer() ? 0 : 1;\n var list = descriptor.getList(targetLayersTypeId);\n for (var i = 0; i < list.count; i++) {\n var selectedLayerIndex = list.getReference(i).getIndex() + hasBackground;\n var selectedLayersReference = new ActionReference();\n selectedLayersReference.putProperty(charIDToTypeID(\"Prpr\"), charIDToTypeID(\"LyrI\"));\n selectedLayersReference.putIndex(charIDToTypeID(\"Lyr \"), selectedLayerIndex);\n descriptor = executeActionGet(selectedLayersReference);\n var id = descriptor.getInteger(charIDToTypeID(\"LyrI\"));\n if (isVisiblebyId(id)) {\n selectedLayers.push(id);\n }\n }\n }\n } catch (ex) {\n //console_error($.fileName, $.line, ex);\n }\n return selectedLayers;\n}", "title": "" } ]
d891988e19f7c0bf506662fbd3857319
Default MOH we create same Grid with Same Datasouce but fetch DEFAULT MOH
[ { "docid": "77d4f5603882b11ffe650c951c3e78eb", "score": "0.76926047", "text": "function getMohDefault(){\n \t theGrid = isc.ListGrid.create(LGDefault, {\n\t \t ID: \"tblMohdefault\",\n\t\t dataSource: DSMOH,\n\t\t recordDoubleClick: function (viewer, record, rowNum, field, fieldNum, value, rawValue) {\n\t\t\t\t edit_object('MOHDefault');\n frmMOHDefault.editSelectedData(tblMohdefault);\n tblMOHFiles.fetchData({'directory': record.directory});\n // Hide file selection when Media stream s selected //\n \t\t\t if ( frmMOHDefault.getValues()['mode'] == 'custom' ){\n\t\t\t MOHFormSections.hideSection(1);\n\t\t\t }\n\t\t }\n\t\t });\n\t\t \n tblMohdefault.fetchData({'id': 0}); \n\treturn theGrid;\t\n }", "title": "" } ]
[ { "docid": "89e04872cf521ec54395bda2cb2bd4eb", "score": "0.6325929", "text": "loadHeadboards() {\n\t\tlet columnDefs = [\n\t\t\t\t{\n displayName: 'No.',\n\t\t\t\t\tname: 'orden', \n\t\t\t\t\twidth: '4%', \n cellTooltip: true,\n headerTooltip: 'N\\u00FAmero de registro',\n headerCellClass: 'classHeaderCell',\n cellTemplate: numRegisterTemplate\n\t\t\t\t},\n\t\t\t\t{\n displayName: 'C\\u00F3digo',\n\t\t\t\t\tfield: 'codigoJDEProveedor',\n\t\t\t\t\twidth: 60,\n cellTooltip: true, \n\t\t\t\t\theaderTooltip: 'C\\u00F3digo de proveedor',\n headerCellClass: 'classHeaderCell',\n\t\t\t\t\tcellTemplate: `<div class=\"ui-grid-cell-contents\">&nbsp<a href style=\"color: #990000;font-weight: bold;\" \n ng-click=\"grid.appScope.contentProvider.callDeviceSection(row.entity)\">{{row.entity.id.codigoProveedor}}</a></div>`\n\t\t\t\t},\n\t\t\t\t{\n displayName: 'No. Documento',\n\t\t\t\t\tfield: 'numeroDocumentoProveedor',\n\t\t\t\t\twidth: 100,\n cellTooltip: true, \n\t\t\t\t\theaderTooltip: 'N\\u00FAmero de Documento',\n headerCellClass: 'classHeaderCell'\n\t\t\t\t},\n\t\t\t\t{\n displayName: 'Nombre comercial',\n\t\t\t\t\tfield: 'nombreProveedor',\n\t\t\t\t\twidth: '25%',\n\t\t\t\t\tminWidth: 150,\n cellTooltip: true, \n\t\t\t\t\theaderTooltip: true,\n headerCellClass: 'classHeaderCell'\n\t\t\t\t},\n\t\t\t\t{\n displayName: 'Tip. Prov.',\n\t\t\t\t\tfield: 'valorTipoEntidadProveedor',\n\t\t\t\t\twidth: 100,\n cellTooltip: true, \n\t\t\t\t\theaderTooltip: 'Tipo de proveedor',\n headerCellClass: 'classHeaderCell',\n\t\t\t\t\tcellTemplate: `<div class=\"ui-grid-cell-contents\">\n {{row.entity.valorTipoEntidadProveedor == \\'EMP\\' ?\"Empresa\":\"Persona\"}}</div>`\n\t\t\t\t},\n\t\t\t\t{\t\t\n displayName: 'Origen',\t\t\t\n\t\t\t\t\tfield: 'origenProveedor',\n\t\t\t\t\twidth: 100,\n cellTooltip: true, \n\t\t\t\t\theaderTooltip: true,\n headerCellClass: 'classHeaderCell',\n\t\t\t\t\tcellTemplate: `<div class=\"ui-grid-cell-contents\">\n {{row.entity.origenProveedor == \\'I\\' ?\"Internacional\":\"Nacional\"}}</div>`\n\t\t\t\t},\n {\n displayName: 'Raz\\u00F3n social',\n\t\t\t\t\tfield: 'razonSocialProveedor',\n\t\t\t\t\tminWidth: 150,\n cellTooltip: true, \n\t\t\t\t\theaderTooltip: true,\n headerCellClass: 'classHeaderCell'\n\t\t\t\t}\n\t\t\t];\n\n\t\treturn columnDefs;\n\t}", "title": "" }, { "docid": "a275b3c713600ddf2eb51065f998b806", "score": "0.6197103", "text": "function LoadOpsMasterGrid() {\n //Get style master from local storage\n var objStyleMaster = JSON.parse(localStorage.getItem(StyleMasterInfo));\n if ($.isEmptyObject(objStyleMaster)) {\n BindDataToJqGridOps(\"\", \"\", \"\", \"\", \"\");\n jQuery(gridOpsTableId).jqGrid('setCaption', \"\");\n } else {\n BindDataToJqGridOps(objStyleMaster.StyleCode, objStyleMaster.StyleSize, objStyleMaster.StyleColorSerial, objStyleMaster.RevNo, \"\");\n\n //jQuery(gridOpsTableId).jqGrid('setCaption', \" Style Code: \" + objStyleMaster.StyleCode + \" | Size: \" + objStyleMaster.StyleSize\n // + \" | Color: \" + objStyleMaster.StyleColorSerial + \" | Revision: \" + objStyleMaster.RevNo);\n\n }\n}", "title": "" }, { "docid": "d5c6266caa207f43c385ed230ed476e8", "score": "0.59415424", "text": "function setDefaultGrid(){\n setGridSize(16);\n createGrid(16);\n}", "title": "" }, { "docid": "023b1aa8818ba7692e35c9b2df339cb4", "score": "0.59130555", "text": "function ApexGrid() { }", "title": "" }, { "docid": "6d0d6c9a42fefae3d497e3c5ce085257", "score": "0.5906882", "text": "_generateDefaultGrid() {\n const that = this;\n\n if (!that.$.defaultSamplesContainer) {\n return;\n }\n\n const columns = 10,\n containers = {},\n containersNames = ['themeColorsLabel', 'themeColorsBox', 'themeShadesBox', 'standardColorsLabel', 'standardColorsBox'],\n themeColors = that.gridThemeColors === null ? that._defaultModeThemeColors : that.gridThemeColors,\n shadeColors = that.gridShadeColors === null ? that._defaultModeShadesColors : that.gridShadeColors,\n standardColors = that.gridStandardColors === null ? that._defaultModeStandardColors : that.gridStandardColors,\n fragment = document.createDocumentFragment();\n\n containersNames.forEach(name => {\n const element = document.createElement('div');\n\n containers[name] = element;\n\n element.className = Smart.Utilities.Core.toDash(name);\n\n if (name.indexOf('Box') !== -1) {\n element.setAttribute('role', 'menu');\n }\n else if (name.indexOf('Label') !== -1) {\n element.id = that.id + name;\n }\n\n fragment.appendChild(element);\n });\n\n containers.themeColorsLabel.innerHTML = that.localize('themeColors'); 'Theme colors';\n containers.standardColorsLabel.innerHTML = that.localize('standardColors'); 'Standard colors';\n containers.themeColorsBox.setAttribute('aria-labelledby', that.id + 'themeColorsLabel');\n containers.themeShadesBox.setAttribute('aria-labelledby', that.id + 'themeColorsLabel');\n containers.standardColorsBox.setAttribute('aria-labelledby', that.id + 'standardColorsLabel');\n\n for (let i = 0; i < that._defaultModeShadesColors.length; i++) {\n containers.themeShadesBox.appendChild(that._createColorSample(shadeColors[i], 'shades-color'));\n }\n\n for (let i = 0; i < columns; i++) {\n containers.themeColorsBox.appendChild(that._createColorSample(themeColors[i], 'theme-color'));\n containers.standardColorsBox.appendChild(that._createColorSample(standardColors[i], 'standard-color'));\n }\n\n that.$.defaultSamplesContainer.innerHTML = '';\n that.$.defaultSamplesContainer.appendChild(fragment);\n }", "title": "" }, { "docid": "824e29b934def6c87a16690a40b62c08", "score": "0.58454263", "text": "_createGrid() {\n this.gridOption = this.artifactoryGridFactory.getGridInstance(this.$scope)\n .setColumns(this._getColumns());\n //.setMultiSelect()\n //.setBatchActions(this._getBatchActions())\n if(this.features.isGlobalRepoEnabled()) {\n this.gridOption.setDraggable(this.reorderRepositories.bind(this));\n }\n else {\n this.gridOption.setRowTemplate('default');\n }\n }", "title": "" }, { "docid": "c66c72c7fa3c217b64dc06eced111265", "score": "0.5835086", "text": "function JS_initGrid()\r\n\t{\r\n\t\tif ($(\"#cntBodyList > tr\").length == 0)\r\n\t\t{\r\n\t\t\t$(\"#cntBodyList\").html('<tr align=\"center\"><td colspan=\"50\" class=\"ajax-load\"><div>Recuperando datos</div></td></tr>');\r\n\t\t}\r\n\r\n\t\tif ($(\"table#cntListHeader tr\").get(0))\r\n\t\t{\r\n\t\t\t$(\"table#cntListHeader tr\").mouseover(function(){\r\n\t\t\t\t$(this).children().each(function(i){$(this).addClass(\"hover\");});\r\n\t\t\t});\r\n\t\t}\r\n\t\t$(\"table#cntListHeader tr\").mouseout(function(){\r\n\t\t\t$(this).children().each(function(i){$(this).removeClass(\"hover\");});\r\n\t\t});\r\n\r\n\r\n\t\t/** Coloco cada fila a una altura de 70px **/\r\n\t\t/*\r\n\t\t//$(\"table#cntListHeader tbody tr\").css({'height': '20px'});\r\n\r\n\t\t$(\"table#cntListHeader tbody tr\").click(function (){\r\n\t\t\tagrandarTR(this);\r\n });\r\n */\r\n\t\tif ($(\".wgtTooltip\").get(0))\r\n\t\t{\r\n\t\t\t$(\".wgtTooltip\").Tooltip({ delay: 0, track: true, showBody: \" ## \", event: \"mouseover\"});\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b1c764aabe73a7fade1f17bb2445d29d", "score": "0.5768499", "text": "function defaultGrid(){\n\tvar offsetX = 4, offsetY = 4;\n\tfor( var c=0; c<column; c++ ){\n\t\tgrid[c] = [];\n\t\tfor( var r=0; r<row; r++ ){\n\t\t\tgrid[c][r] = { x:(c+offsetX)*blockWidth, y:(r+offsetY)*blockWidth, \n\t\t\t\t\t\t color:\"black\", isFilled:false, deleting:false };\t\t\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5270867f6c8244a3d0620d09d6293f4f", "score": "0.5729465", "text": "function constructTable(username) {\n grid = new gridjs.Grid({\n columns: [\"Name\", \"Price\", \"Quantity\"],\n // Take data from server via api call\n server: {\n url: 'http://127.0.0.1:5000/' + username,\n then: data => Object.values(data.portfolio.equity).map(movie =>\n [movie.name, Math.round(movie.price * 100) / 100, movie.quantity]\n )\n },\n pagination: {\n enabled: true,\n limit: 5,\n summary: true\n },\n sort: true,\n\n // Styling in CSS\n style: {\n table: {\n border: '0 px solid black',\n },\n\n th: {\n 'background-color': 'rebeccapurple',\n 'color': 'white',\n border: '1 px solid rebeccapurple',\n border: '0 px solid black'\n },\n\n td: {\n 'background-color': '#171A22',\n border: '0 px solid black'\n },\n\n footer: {\n 'background-color': '#171A22',\n border: '0 px solid black',\n color: 'white'\n }\n }\n\n }).render(document.getElementById(\"wrapper\"));\n\n}", "title": "" }, { "docid": "6213ae9537fdb091a53db1c935dc98c7", "score": "0.571053", "text": "function initDataGrid() {\r\n // Find the grid div element in index.html\r\n var eGridDiv = document.querySelector('#grid');\r\n\r\n // Create the grid passing in the div to use together with the columns & data we want to use\r\n new agGrid.Grid(eGridDiv, gridOptions);\r\n\r\n // Download the chosen plan's data and load into grid\r\n loadPlan(localStorage.getItem('planToLoad'));\r\n localStorage.clear();\r\n}", "title": "" }, { "docid": "6a5b871dc32f20fa98cdef0911573dca", "score": "0.5683885", "text": "init() {\n\t\t\n\t\tthis.columns.forEach((element) => {\n\t\t\t// normaliza los columnName\n\t\t\tif(typeof element.visible === 'undefined' || element.visible === true) {\n\t\t\t\tthis.columnsName.push(element.columnName);\n\t\t\t}\n\n\t\t\t// setea el component por columna de la row\n\t\t\telement.customComponent = ComponentColumn;\n\t\t\t// setea el component por columna del header\n\t\t\telement.customHeaderComponent = FilterHeader;\n\n\t\t\tthis.columnsMetaData.push(element);\n\t\t\n\t\t})\n\t\n\t}", "title": "" }, { "docid": "01ee7a17cc15ff831f3ac5b7f77b5467", "score": "0.5657726", "text": "function DataGrid(title, table, toolbar, columns, fieldsOrId, pid, pkName) {\r\n \r\n if (w2ui.grid) w2ui['grid'].destroy();\r\n pkName = typeof pkName !=='undefined' ? pkName: 'id';\r\n // Nom de la clau primària (id per defecte)\r\n var grid = new dbGrid(); // Crear el grid\r\n grid.title = title; // Titol a header\r\n grid.setColumns(columns); // Assignar les columnes\r\n\r\n if (table) { // Si es passa taula, és editable\r\n grid.setDataTable(table, pkName); // Assignar taula i nom clau primaria\r\n var form = new dbForm(); // Crear el diàleg d'edició\r\n form.pid = pid; // Petició diferent per a save()\r\n form.setFields(fieldsOrId); // Assignar els camps al dialeg\r\n grid.setForm(form); // Assignar el formulari al grid\r\n } else {\r\n grid.setId(fieldsOrId); // Assignar Pid (Id de la petició per a query.php)\r\n }\r\n grid.setToolBar(toolbar); // Barra de botons personalitzada\r\n grid.Activate(); // Mostrar el grid\r\n}", "title": "" }, { "docid": "62af3b4294dff6bf80d45ab3b16c5fe4", "score": "0.56569165", "text": "function Cgg_jur_proceso_judicial(){\n var cmCgg_jur_proceso_judicial = null;\n var gsCgg_jur_proceso_judicial = null\n\n cmCgg_jur_proceso_judicial = new Ext.grid.ColumnModel([\n {\n dataIndex:'CJPJU_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CCTN_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CANTON',\n header:'Canton',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CRPJR_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'RAZON_SOCIAL',\n header:'Razon Social',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'PERSONA',\n header:'Persona',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CJPJU_NUMERO',\n header:'Numero',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CJPJU_TIPO_PROCESO',\n header:'Tipo proceso',\n width:150,\n sortable:true,\n renderer:function(inCjpju_tipo_proceso) {\n var result = \"\";\n switch (inCjpju_tipo_proceso) {\n case 0:\n result = 'DEMANDA PLANTEADA';\n break;\n case 1:\n result = 'DEMANDA RECIBIDA';\n break;\n default:\n result =NO_DATA_MESSAGE;\n break;\n }\n return result;\n\n }\n },\n {\n dataIndex:'CJPJU_TIPO_ADVERSARIO',\n header:'Tipo adversario',\n width:150,\n sortable:true,\n renderer:function(inCjpju_tipo_adversario) {\n var result = \"\";\n switch (inCjpju_tipo_adversario) {\n case 0:\n result = 'PERSONA NATURAL';\n break;\n case 1:\n result = 'PERSONA JURIDICA';\n break;\n default:\n result =NO_DATA_MESSAGE;\n break;\n }\n return result;\n\n }\n },\n {\n dataIndex:'CJPJU_FECHA_INICIO',\n header:'Fecha inicio',\n width:150,\n sortable:true,\n renderer:truncDate\n },\n\n {\n dataIndex:'CJPJU_FECHA_FINALIZACION',\n header:'Fecha finalizacion',\n width:150,\n sortable:true,\n renderer:truncDate\n },\n\n {\n dataIndex:'CJPJU_ESTADO_EJECUCION',\n header:'Estado ejecucion',\n width:150,\n sortable:true,\n renderer:function(inCjpj_estado_ejecucion) {\n var result = \"\";\n switch (inCjpj_estado_ejecucion) {\n case 0:\n result = 'PLANTEADO';\n break;\n case 1:\n result = 'EN PROCESO';\n break;\n case 2:\n result = 'FINALIZADO';\n break;\n case 3:\n result = 'SUSPENDIDO';\n break;\n\n default:\n result =NO_DATA_MESSAGE;\n break;\n }\n return result;\n\n }\n }\n ]);\n\n /**\n * Ext.data.Store Agrupacion de registros de la tabla Cgg_res_comite por un campo especifico.\n */\n gsCgg_jur_proceso_judicial= new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_jur_proceso_judicial\",\n method:\"selectPageProceso\",\n pagin:true\n }),\n remoteSort:true,\n reader:new Ext.data.JsonReader({\n id:'CRPER_CODIGO',\n root:'dataSet',\n totalProperty: 'totalCount'\n },[\n {\n name:'CJPJU_CODIGO'\n },\n\n {\n name:'CCTN_CODIGO'\n },\n\n {\n name:'CANTON'\n },\n\n {\n name:'CRPJR_CODIGO'\n },\n\n {\n name:'RAZON_SOCIAL'\n },\n\n {\n name:'CRPER_CODIGO'\n },\n\n {\n name:'PERSONA'\n },\n\n {\n name:'CJPJU_NUMERO'\n },\n\n {\n name:'CJPJU_TIPO_PROCESO'\n },\n\n {\n name:'CJPJU_TIPO_ADVERSARIO'\n },\n\n {\n name:'CJPJU_FECHA_INICIO'\n },\n\n {\n name:'CJPJU_FECHA_FINALIZACION'\n },\n\n {\n name:'CJPJU_ESTADO_EJECUCION'\n }\n\n ]),\n sortInfo:{\n field: 'CJPJU_CODIGO',\n direction: 'ASC'\n },\n baseParams:{\n keyword:\"\",\n format:\"JSON\"\n }\n });\n this.getStoreProcesoJudicial=function(){\n return gsCgg_jur_proceso_judicial;\n }\n this.getColumnProcesoJudicial =function(){\n return cmCgg_jur_proceso_judicial;\n }\n}", "title": "" }, { "docid": "a50dde782a15a177b5380a3c086237c0", "score": "0.56349397", "text": "updateGrid() {\n this.grid = Object.assign({}, this.grid);\n }", "title": "" }, { "docid": "f9b4497c50611bfef6dd7d22b06e330a", "score": "0.56311727", "text": "static get haxProperties() {\n return {\n type: \"grid\",\n canScale: false,\n canPosition: false,\n canEditSource: false,\n gizmo: {\n title: \"Remote Content\",\n description: \"Reuse content from one site in another.\",\n icon: \"hax:remote\",\n color: \"grey\",\n tags: [\n \"Resource\",\n \"haxcms\",\n \"content\",\n \"remote\",\n \"reference\",\n \"url\",\n \"resource\",\n ],\n handles: [],\n meta: {\n author: \"HAXTheWeb core team\",\n },\n },\n settings: {\n configure: [\n {\n property: \"siteurl\",\n title: \"Site address\",\n description:\n \"Paste address to reference content from if not the current site\",\n inputMethod: \"textfield\",\n },\n {\n property: \"uuid\",\n title: \"Item\",\n description: \"Item to render for the link / title data\",\n inputMethod: \"textfield\",\n },\n {\n property: \"breakreference\",\n title: \"Break reference\",\n description:\n \"Checking this box copies the remote content for editing locally but removes the association. It will no longer get updates when the reference material updates.\",\n inputMethod: \"boolean\",\n },\n {\n property: \"showTitle\",\n title: \"Show title\",\n description:\n \"Toggle on to render the title of the resource being displayed\",\n inputMethod: \"boolean\",\n },\n ],\n },\n demoSchema: [\n {\n tag: \"site-remote-content\",\n properties: {\n showTitle: true,\n _remoteTitle: \"Select content\",\n },\n content: \"<div>Select content to load</div>\",\n },\n ],\n saveOptions: {\n unsetAttributes: [\"t\", \"_remote-title\"],\n },\n };\n }", "title": "" }, { "docid": "8a6270ba8aba3bc7b50004f3523e9ad4", "score": "0.5627966", "text": "getGrid () {\n return this.grid;\n }", "title": "" }, { "docid": "2b0558c66a6525f9cb7aea50e8c7f498", "score": "0.56251746", "text": "function Load_DS_HopDong(d) {\n\n\n $(\"#grid\").empty();\n var grid = $(\"#grid\").kendoGrid({\n dataSource: d,\n toolbar: kendo.template($(\"#Templ_ThemHD\").html()),\n detailTemplate: kendo.template($(\"#Templ_ChiTiet_HopDong\").html()),\n dataBound: function () {\n this.expandRow(this.tbody.find(\"tr.k-master-row\").first());\n },\n detailExpand: function (e) {\n this.collapseRow(this.tbody.find(' > tr.k-master-row').not(e.masterRow));\n },\n sortable: true,\n pageable: {\n messages: {\n display: \"Tổng số {2} hợp đồng\",\n empty: \"Không có dữ liệu\",\n page: \"Trang\",\n of: \"of {0}\",\n itemsPerPage: \"Số mục trong một trang\"\n\n }\n },\n detailInit: function (e) {\n \n var detailRow = e.detailRow;\n detailRow.find(\"#tabstrip\").kendoTabStrip({\n animation: {\n open: { effects: \"fadeIn\" }\n }\n });\n\n detailRow.find(\"#tab_VatTu\").kendoGrid({\n\n dataSource: {\n transport: {\n read: function (options) {\n $.ajax({\n type: \"POST\",\n url: \"assets/ajax/Ajax_HopDong_CT.aspx\",\n data: {\n cmd: 'Lay_DS_HopDong_CT',\n HopDong_ID: e.data.HopDong_ID\n },\n dataType: 'json',\n success: function (result) {\n if (result == \"err401\") {\n alert(\"Phiên đã hết hạn!Vui lòng đăng nhập lại.\");\n window.location.href = \"DangNhap.aspx?p=TheoDoi.aspx\";\n }\n else {\n options.success(result);\n }\n }\n });\n },\n parameterMap: function (options, operation) {\n if (operation !== \"read\" && options.models) {\n return { models: kendo.stringify(options.models) };\n }\n }\n },\n aggregate: [\n { field: \"ThanhTien\", aggregate: \"sum\" }\n ]\n\n },\n sortable: true, \n columns:\n [\n\n {\n title: \"Vật tư\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"VatTu_Ten\",\n template: \"<div>#= MaVatTu_TD #</div><br><div>#= VatTu_Ten #</div>\",\n attributes: {\n class: \"row_css\",\n style: \"font-weight:bold;\"\n },\n width: \"20%\"\n },\n\n {\n title: \"Số lượng\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"SoLuong\",\n template: \"#= OnChangeFormat(SoLuong) #\",\n attributes: {\n class: \"row_css\"\n }\n },\n {\n title: \"Số lượng khả dụng\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"SoLuong_KhaDung\",\n template: \"#= OnChangeFormat(SoLuong_KhaDung) #\",\n attributes: {\n class: \"row_css\",\n style: \"font-weight:bold;color:green;\"\n }\n },\n {\n title: \"Đơn giá\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"DonGia\",\n template: \"#= OnChangeFormat(DonGia) #\",\n attributes: {\n class: \"row_css\"\n }\n },\n {\n title: \"Đơn vị tính\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"TenDVT\",\n attributes: {\n class: \"row_css\"\n }\n },\n {\n title: \"Thành tiền trước thuế\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"ThanhTien\",\n template: \"#= OnChangeFormat(ThanhTien) #\",\n attributes: {\n class: \"row_css\"\n },\n aggregates: [\"sum\"],\n footerTemplate: \"<div class=\\\"row_css\\\">#=OnChangeFormat(sum) #</div>\",\n groupFooterTemplate: \"<div class=\\\"row_css\\\">#=OnChangeFormat(sum) #</div>\",\n width: \"15%\"\n\n },\n {\n title: \"VAT\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"VAT\",\n template: \"#= OnChangeFormat(VAT) #\",\n attributes: {\n class: \"row_css\"\n },\n width: \"14%\"\n },\n {\n title: \"Ghi chú\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"GhiChu\",\n attributes: {\n class: \"row_css\"\n }\n } \n\n ]\n });\n\n \n },\n columns:\n [\n {\n hidden: true,\n field: \"HopDong_ID\"\n },\n {\n title: \"Tình trạng\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"TinhTrang_HD\", \n template: function (data) {\n\n if (data.TinhTrang_HD == 0) {\n return '<center><span class=\"label label-success\">Hiệu lực</span></center>';\n }\n else {\n return '<center><span class=\"label label-important\">Thanh lý</span></center>';\n }\n },\n width: \"6%\"\n },\n {\n title: \"Số HĐ\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"MaHD\",\n attributes: {\n class: \"row_css\",\n style: \"font-weight:bold;\"\n },\n width: \"12%\"\n },\n {\n title: \"Nhà thầu\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"NhaThau_Ten\",\n attributes: {\n class: \"row_css\"\n },\n width: \"12%\"\n },\n {\n title: \"Ngày ký HĐ\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"NgayKy\",\n template: \"#= NgayKy_f #\",\n attributes: {\n class: \"row_css\"\n },\n width: \"8%\"\n },\n\n {\n title: \"HTMS\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"HinhThucMS_Ten\",\n attributes: {\n class: \"row_css\"\n }\n },\n\n {\n title: \"Giá trị HĐ trước thuế\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"GiaTriSauThue\",\n template: \"#= OnChangeFormat(GiaTriTruocThue) #\",\n attributes: {\n class: \"row_css\",\n style:\"color:red;font-size:bold;\"\n },\n width: \"12%\"\n },\n {\n title: \"Giá trị còn lại\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"GiaTriConLai_HD\",\n template: \"#= OnChangeFormat(GiaTriConLai_HD) #\",\n attributes: {\n class: \"row_css\",\n style: \"color:green;font-weight:bold;\"\n },\n width: \"12%\"\n },\n {\n title: \"Tỷ lệ giá trị còn lại\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"TyLeGiaTriConLai\",\n template: \"#= TyLeGiaTriConLai #%\",\n attributes: {\n class: \"row_css\",\n style: \"color:green;font-weight:bold;\"\n },\n width: \"8%\"\n },\n {\n title: \"Ngày còn lại\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"SoNgayConLai\",\n template: function (data) {\n\n if (data.TinhTrang_HD == 0) {\n return '<center><b>' + data.SoNgayConLai + '</b></center>';\n } else {\n return '';\n }\n },\n width: \"5%\"\n }, \n\n {\n title: \"File văn bản\",\n headerAttributes: {\n class: \"header_css\"\n },\n field: \"FileVB\", \n template: function (data) {\n\n if (data.FileVB == \"\" || data.FileVB == null) {\n return '<center>Chưa upload </center>';\n } else { \n return '<center><a href= \"' + data.FileVB + '\" target=\"_blank\" class=\"btn btn-inverse\" ><i class=\"fa fa-download\"></i></a></center>';\n }\n },\n width: \"8%\"\n } \n\n ]\n });\n\n $(\"#txt_search_sohd\").kendoAutoComplete({\n dataTextField: \"MaHD\",\n dataSource: DS_HopDong,\n select: function (e) {\n\n var dataItem = this.dataItem(e.item.index());\n var value = dataItem.MaHD;\n\n if (value) {\n\n grid.data(\"kendoGrid\").dataSource.filter({ field: \"MaHD\", operator: \"eq\", value: value });\n }\n else {\n grid.data(\"kendoGrid\").dataSource.filter({});\n }\n },\n change: function () {\n\n $(\"#txt_search_sohd\").val('');\n }\n\n });\n $(\"#btn_clear_sohd\").click(function (e) {\n e.preventDefault();\n $(\"#txt_search_sohd\").val('');\n grid.data(\"kendoGrid\").dataSource.filter({});\n });\n\n\n $(\"#grid_ex\").empty();\n var grid = $(\"#grid_ex\").kendoGrid({\n\n excel: {\n allPages: true\n },\n excelExport: function (e) {\n e.preventDefault();\n\n var workbook = e.workbook;\n\n detailExportPromises = [];\n\n var masterData = e.data;\n\n for (var rowIndex = 0; rowIndex < masterData.length; rowIndex++) {\n exportChildData(masterData[rowIndex].HopDong_ID, rowIndex);\n }\n\n $.when.apply(null, detailExportPromises)\n .then(function () {\n\n // get the export results\n var detailExports = $.makeArray(arguments);\n\n // sort by masterRowIndex\n detailExports.sort(function (a, b) {\n return a.masterRowIndex - b.masterRowIndex;\n });\n\n // add an empty column\n workbook.sheets[0].columns.unshift({\n width: 30\n });\n\n // prepend an empty cell to each row\n for (var i = 0; i < workbook.sheets[0].rows.length; i++) {\n workbook.sheets[0].rows[i].cells.unshift({});\n }\n\n // merge the detail export sheet rows with the master sheet rows\n // loop backwards so the masterRowIndex doesn't need to be updated\n for (var i = detailExports.length - 1; i >= 0; i--) {\n var masterRowIndex = detailExports[i].masterRowIndex + 1; // compensate for the header row\n\n var sheet = detailExports[i].sheet;\n\n // prepend an empty cell to each row\n for (var ci = 0; ci < sheet.rows.length; ci++) {\n if (sheet.rows[ci].cells[0].value) {\n sheet.rows[ci].cells.unshift({});\n }\n }\n\n // insert the detail sheet rows after the master row\n [].splice.apply(workbook.sheets[0].rows, [masterRowIndex + 1, 0].concat(sheet.rows));\n }\n\n // save the workbook\n kendo.saveAs({\n dataURI: new kendo.ooxml.Workbook(workbook).toDataURL(),\n fileName: \"Export.xlsx\"\n });\n\n\n });\n },\n dataSource: d,\n columns:\n [\n\n { title: \"Tên nhà thầu\", field: \"NhaThau_Ten\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Ngày kí hợp đồng\", field: \"NgayKy\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Số hợp đồng\", field: \"MaHD\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Giá trị trước thuế\", field: \"GiaTriTruocThue\", template: \"#= OnChangeFormat(GiaTriTruocThue) #\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Giá trị VAT\", field: \"VAT_HD\", template: \"#= OnChangeFormat(VAT_HD) #\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Giá trị trước thuế\", field: \"GiaTriTruocThue\", template: \"#= OnChangeFormat(GiaTriTruocThue) #\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Số tiền bằng chữ\", field: \"SoTienBangChu\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Ngày hết hạn\", field: \"NgayHetHan\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Ngày kế hoạch\", field: \"NgayKeHoach_NT\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Ngày hiệu lực\", field: \"NgayHieuLuc\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Nội dung\", field: \"NoiDung\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Người tạo hợp đồng\", field: \"NguoiTaoHD\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Ngày tạo hợp đồng\", field: \"NgayTao\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Loại hợp đồng\", field: \"LoaiHD_Ten\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Hình thức mua sắm\", field: \"HinhThucMS_Ten\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Ngày thanh lý\", field: \"NgayThanhLy\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Số ngày thực hiện\", field: \"SoNgayThucHien\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Số ngày còn lại\", field: \"SoNgayConLai\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Giá trị còn lại\", field: \"GiaTriConLai_HD\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } },\n { title: \"Tỷ lệ còn lại\", field: \"TyLeGiaTriConLai\", headerAttributes: { class: \"header_css\" }, attributes: { class: \"row_css\" } }\n\n \n\n ],\n detailInit: function (e) {\n\n\n $(\"<div/>\").appendTo(e.detailCell).kendoGrid({\n dataSource: {\n transport: {\n read: function (options) {\n $.ajax({\n type: \"POST\",\n url: \"assets/ajax/Ajax_HopDong_CT.aspx\",\n data: {\n cmd: 'Lay_DS_HopDong_CT',\n HopDong_ID: e.data.HopDong_ID\n },\n dataType: 'json',\n success: function (result) {\n if (result == \"err401\") {\n alert(\"Phiên đã hết hạn!Vui lòng đăng nhập lại.\");\n window.location.href = \"DangNhap.aspx?p=TheoDoi.aspx\";\n }\n else {\n options.success(result);\n }\n }\n });\n },\n parameterMap: function (options, operation) {\n if (operation !== \"read\" && options.models) {\n return { models: kendo.stringify(options.models) };\n }\n }\n },\n aggregate: [\n { field: \"ThanhTien\", aggregate: \"sum\" }\n ]\n\n },\n });\n\n }\n });\n \n}", "title": "" }, { "docid": "992741420ae17ead57744b800a1c7297", "score": "0.5623532", "text": "function loadGridSoalEssay(MODULE_ID , EGI_GENERAL , EXAM_TYPE, APP_ELLIPSE_CODE , Question_Type) {\n //REFRESH GRID SEBELUM DI LOAD\n if ($(\"#grid_soalessay\").data().kendoGrid != null) {\n $(\"#grid_soalessay\").data().kendoGrid.destroy();\n $(\"#grid_soalessay\").empty();\n }\n\n //OBJEK GRID\n $(\"#grid_soalessay\").kendoGrid({\n dataSource: {\n type: \"json\",\n error: function (e) {\n if (e.errors == true) {\n var grid_error = $(\"#grid_soalessay\").data(\"kendoGrid\");\n grid_error.one(\"dataBinding\", function (e) {\n e.preventDefault();\n })\n }\n },\n requestEnd: function (e) {\n if (e.type == \"destroy\" && e.response.status == false) {\n this.cancelChanges();\n var grid = $(\"#grid_soalessay\").data(\"kendoGrid\");\n }\n if ((e.type == \"create\" || e.type == \"update\") && e.response.status == true) {\n $(\"#grid_soalessay\").data(\"kendoGrid\").dataSource.read();\n var grid = $(\"#grid_soalessay\").data(\"kendoGrid\");\n }\n },\n\n //FUNGSI LOAD JSON SCRIPT\n transport: {\n //UNTUK MEMANGGIL DATA\n read: {\n url: $(\"#urlPath\").val() + \"/SoalEssay/ReadSoalEssay\",\n dataType: \"json\",\n contentType: \"application/json\",\n type: \"POST\",\n data: {\n MODULE_ID : MODULE_ID,\n EGI_GENERAL : EGI_GENERAL,\n EXAM_TYPE : EXAM_TYPE,\n APP_ELLIPSE_CODE : APP_ELLIPSE_CODE,\n QUESTION_TYPE : Question_Type\n },\n cache: false\n },\n\n //UNTUK DELETE DATA\n destroy: {\n url: $(\"#urlPath\").val() + \"/SoalEssay/DestroySoalEssay\",\n contentType: \"application/json\",\n type: \"POST\",\n cache: false,\n complete: function (response) {\n var i_obj_grid = $(\"#grid_soalessay\").data(\"kendoGrid\");\n i_obj_grid.dataSource.read();\n loadMessage(response.responseJSON.type, response.responseJSON.message);\n }\n },\n //UNTUK MENGIRIMKAN DATA JSON\n parameterMap: function (data, operation) {\n return kendo.stringify(data);\n }\n },\n\n pageSize: 15, //JUMLAH BARIS PER-HALAMAN\n serverPaging: true,\n serverFiltering: true,\n serverSorting: true,\n schema: {\n errors: function (response) {\n if (response.status == false) {\n alert(\"Error1: \" + response.remarks);\n return true;\n } else if (response.status == true) {\n alert(response.remarks);\n }\n return false;\n },\n data: \"Data\",\n total: \"Total\",\n model: {\n id: \"QUESTION_ID\",\n fields: {\n MODULE_ID: { type: \"string\", filterable: true, sortable: true },\n MODULE_SUB_ID: { type: \"string\", filterable: true, sortable: true },\n CERT_FOR: { type: \"string\", filterable: true, sortable: true },\n QUESTION_TYPE: { type: \"number\", filterable: true, sortable: true },\n DESTINATION_POSITION: { type: \"string\", filterable: true, sortable: true },\n POSITION_CODE: { type: \"string\", filterable: true, sortable: true },\n QUESTION_MAX_TIME: { type: \"number\", filterable: true, sortable: true },\n QUESTION_MAX_SCORE: { type: \"number\", filterable: true, sortable: true },\n QUESTION_MAX_ANSWER: { type: \"number\", filterable: true, sortable: true },\n QUESTION_CONTENT: { type: \"string\", filterable: true, sortable: true },\n ANSWER_1: { type: \"string\", filterable: true, sortable: true },\n ANSWER_1_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_2: { type: \"string\", filterable: true, sortable: true },\n ANSWER_2_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_3: { type: \"string\", filterable: true, sortable: true },\n ANSWER_3_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_4: { type: \"string\", filterable: true, sortable: true },\n ANSWER_4_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_5: { type: \"string\", filterable: true, sortable: true },\n ANSWER_5_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_6: { type: \"string\", filterable: true, sortable: true },\n ANSWER_6_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_7: { type: \"string\", filterable: true, sortable: true },\n ANSWER_7_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_8: { type: \"string\", filterable: true, sortable: true },\n ANSWER_8_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_9: { type: \"string\", filterable: true, sortable: true },\n ANSWER_9_SCORE: { type: \"number\", filterable: true, sortable: true },\n ANSWER_10: { type: \"string\", filterable: true, sortable: true },\n ANSWER_10_SCORE: { type: \"number\", filterable: true, sortable: true },\n IS_ACTIVE: { type: \"boolean\", filterable: true, sortable: true },\n IMAGE_PATH: { type: \"string\", filterable: true, sortable: true },\n MODIFICATION_DATE: { type: \"date\", filterable: true, sortable: true, editable: false },\n EGI_GENERAL: { type: \"string\", filterable: true, sortable: true },\n }\n }\n }\n },\n editable: true,\n editable: {\n confirmation: \"Anda yakin akan menghapus data ini?\",\n mode: \"inline\"\n },\n resizable: true,\n sortable: true,\n filterable: true,\n pageable: {\n refresh: true,\n buttonCount: 10,\n input: true,\n pageSizes: [10, 100, 1000], //OPSI MENAMPILKAN BARIS PER-HALAMAN\n info: true\n },\n toolbar: [\n { name: \"create\", template: \"<button class='k-button' onclick='addSoalEssay();'><span class='glyphicon glyphicon-plus'></span>Tambah Data</button>\" },\n //{ name: \"create\", text: \"ADD NEW\" },\n { name: \"btn_deleteSelected\", template: \"<button class='k-button' onclick='deleteSoalEssaySelected()'><span class='k-icon k-delete'></span>Hapus yang Dipilih</button>\" },\n {\n name: \"excel\"\n //imageClass: '<button type=\"button\" button id=\"btn_export\" class=\"btn btn-info\"><span class=\"glyphicon glyphicon-export\"></span>Export ke Excel</button>'\n },\n {\n name: \"btn_uploadExcel\", template: \"<button class='k-button' onclick='add_new_mapp()'><span class='k-icon k-upload'></span>Upload dengan Excel</button>\"\n }\n ],\n excelExport: function (e) {\n var sheet = e.workbook.sheets[0];\n\n for (var rowIndex = 1; rowIndex < sheet.rows.length; rowIndex++) {\n var row = sheet.rows[rowIndex];\n // row.cells[17].value = kendo.toString(kendo.parseDate(row.cells[17].value, 'dd/MM/yyyy'), 'dd/MM/yyyy');\n //row.cells[4].value = kendo.toString(kendo.parseInt(row.cells[4].value, '0:n0'), '0:n0');\n //row.cells[18].value = kendo.toString(kendo.parseDate(row.cells[18].value, 'dd-MM-yyyy hh:mm:ss'), 'dd-MM-yyyy hh:mm:ss');\n for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {\n if (row.cells[cellIndex].value == \"\" || row.cells[cellIndex].value == null) {\n row.cells[cellIndex].value = \"\";\n }\n }\n }\n },\n excel: {\n\n fileName: \"Master Soal Essay.xlsx\",\n allPages: true,\n filterable: true\n },\n\n columns: [\n { title: \"Pilih\", editable: false, width: \"40px\", headerTemplate: \"<center><input type='checkbox' class='sel' onchange='checkAllData()' /></center>\", template: \"<input type='checkbox' name='' id='IS_SELECTED#=QUESTION_ID#' class='sel' onchange='ischeck()' />\", attributes: { style: \"text-align: center\" } },\n\n {\n title: \"No\", width: \"30px\", template: \"#=++rowNo #\", attributes: { style: \"text-align: center\" }, filterable: false,\n sortable: false,\n editable: false\n },\n\n { field: \"QUESTION_CONTENT\", title: \"PERTANYAAN\", width: \"200px\", attributes: { style: \"text-align: left\" }, headerAttributes: { style: \"text-align: center\" } },\n { field: \"ANSWER_1\", title: \"JAWABAN\", width: \"300px\", attributes: { style: \"text-align: left\" }, headerAttributes: { style: \"text-align: center\" } },\n { field: \"IS_ACTIVE\", title: \"AKTIF\", template: \"#= IS_ACTIVE == 1 ? '<center>Yes</center>' : '<center>No<?center>'#\", width: \"75px\", attributes: { style: \"text-align: center\" }, headerAttributes: { style: \"text-align: center\" } },\n {\n title: \"Action\", command: [{\n name: \"editws\", text: \" Ubah\", imageClass: \"k-edit\",width: \"150px\", iconClass: \"glyphicon glyphicon-edit spasi-kiri\", click: function (e) {\n e.preventDefault();\n\n var tr = $(e.target).closest(\"tr\");\n\n var data = this.dataItem(tr);\n aidi = data.QUESTION_ID;\n var multi = data.CERT_FOR;\n var select = data.DESTINATION_POSITION;\n var val_multi = multi.split(',');\n var val_multi2 = select.split(',');\n var ddl = $(\"#soaltipe\").data(\"kendoMultiSelect\");\n var ddl2 = $(\"#posisi\").data(\"kendoMultiSelect\");\n ddl.value(val_multi);\n ddl2.value(val_multi2);\n\n openPopupDlg2();\n ListModul(data.MODULE_ID);\n ListEgi(data.MODULE_PID);\n $(\"#txt_mode\").val(\"EDIT\");\n $(\"#txt_modul\").data(\"kendoDropDownList\").value(data.MODULE_ID);\n $(\"#txt_submodul\").data(\"kendoDropDownList\").value(data.MODULE_SUB_ID);\n $(\"#txt_egi\").data(\"kendoDropDownList\").value(data.EGI_GENERAL);\n\n $(\"#timepicker\").val(data.QUESTION_MAX_TIME);\n //$(\"#txt_question\").val(data.QUESTION_CONTENT);\n $(\"#txt_question\").data(\"kendoEditor\").value(data.QUESTION_CONTENT);\n //$(\"#txt_answer\").val(data.ANSWER_1);\n $(\"#txt_answer\").data(\"kendoEditor\").value(data.ANSWER_1);\n $(\"#fileUpload\").val(data.IMAGE_PATH);\n },\n }\n\n , { name: \"destroy\", text: \"Hapus\" }\n ], width: \"60px\", attributes: { style: \"text-align: center\" }, headerAttributes: { style: \"text-align: center\" }\n },\n ],\n dataBinding: function () {\n window.rowNo = (this.dataSource.page() - 1) * this.dataSource.pageSize();\n }\n });\n}", "title": "" }, { "docid": "6c155f2624ca679732b3e9c5c67ff7b5", "score": "0.5602968", "text": "postCreate() {\n // this.startTime = new Date();\n // console.debug(`PostCreate called at ${this.startTime.toLocaleTimeString()} = 0 ms`);\n log.call(this, 'postCreate', this._WIDGET_VERSION);\n this._gridNode = this._gridNode || document.createElement(\"div\");\n this._gridNode.className = \"mx-kendo-grid\";\n this.domNode.appendChild(this._gridNode);\n const columnSettings = this.prepareColumns();\n const toolbarSettings = this.prepareButtons();\n toolbarSettings.push({\n name: \"showConfig\",\n text: \"Show Config\",\n });\n // * set the default config for the grid (data will be bound later)\n const self = this;\n $(this._gridNode).kendoGrid({\n toolbar: toolbarSettings,\n groupable: true,\n filterable: {\n mode: \"menu\",\n },\n sortable: {\n mode: \"multiple\",\n },\n pageable: {\n pageSize: self.pageSize,\n },\n selectable: true,\n reorderable: true,\n resizable: true,\n columnMenu: true,\n columns: columnSettings,\n filter: self.loadPages.bind(self),\n group: self.loadPages.bind(self),\n sort: self.loadPages.bind(self),\n page: self.loadPages.bind(self),\n });\n this._kendoGrid = $(this._gridNode).data(\"kendoGrid\");\n this.attachButtonListeners();\n\n if (this.defaultMicroflow) {\n $(this._gridNode).find(\"table\").on(\"dblclick\", function(e) {\n const $clicked = $(e.target).closest(\"tr\");\n const guid = this._kendoGrid.dataItem($clicked).mxid;\n mx.data.action({\n params: {\n actionname: this.defaultMicroflow,\n guids: [guid],\n applyto: \"selection\",\n },\n callback: () => {},\n });\n }.bind(self));\n }\n\n }", "title": "" }, { "docid": "12d0c9ff0cc54e891300ac61882b23b2", "score": "0.5587773", "text": "function drawNormalGrid(id, title , content,column, contentHeight){\n\t\tvar gridHtml='';\n\t\t//build grid\n\t\t//add grid container\n\t\tgridHtml=gridHtml.concat('<div class=\"col-md-'+column+'\">');\n\t\tgridHtml=gridHtml.concat('<div class=\"grid simple \">');\n\t\t//build title\n\t\tgridHtml=buildGridTitle(gridHtml,title);\n\t\t//build content\n\t\tgridHtml=buildGridContent(gridHtml,id,content,contentHeight);\n\t\t//end build grid\n\t\tgridHtml=gridHtml.concat('</div>');\n\t\tgridHtml=gridHtml.concat('</div>');\n\t\treturn gridHtml;\n\t}", "title": "" }, { "docid": "e917fc1ed79feb08da7efe983009aa96", "score": "0.55750334", "text": "function setupViewGrid() {\n var newGrid = [];\n\n modelGrid.content.forEach(function(row, i){\n newGrid.push({\n cells: row,\n pos: i,\n justCleared: false\n });\n });\n\n $scope.viewGrid = newGrid;\n }", "title": "" }, { "docid": "b8a003acc4a1b563937fe6b41f1aeec3", "score": "0.55654407", "text": "function Cgg_res_comite(){\n var cmCgg_res_comite = null;\n var gsCgg_res_comite = null\n\n cmCgg_res_comite = new Ext.grid.ColumnModel([\n {\n dataIndex:'CRCOM_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CRCOM_NOMBRE',\n header:'Nombre',\n width:580,\n sortable:true\n }]);\n /**\n * Ext.data.Store Agrupacion de registros de la tabla Cgg_res_comite por un campo especifico.\n */\n gsCgg_res_comite = new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_res_comite\",\n method:\"selectPage\",\n pagin:true\n }),\n remoteSort:true,\n reader:new Ext.data.JsonReader({\n id:'CRCOM_CODIGO',\n root:'dataSet',\n totalProperty: 'totalCount'\n },[\n {\n name:'CRCOM_CODIGO'\n },\n\n {\n name:'CRCOM_NOMBRE'\n }\n ]),\n sortInfo:{\n field: 'CRCOM_NOMBRE',\n direction: 'ASC'\n },\n baseParams:{\n keyword:\"\",\n format:\"JSON\"\n }\n });\n this.getStoreComite=function(){\n return gsCgg_res_comite;\n }\n this.getColumnModelComite =function(){\n return cmCgg_res_comite;\n }\n}", "title": "" }, { "docid": "6068c41c6d4a3084c171423133da1bf0", "score": "0.55547154", "text": "function loadGrid() {\n var sql = pjs.query(\"SELECT name, email, type, text FROM nodepf1\");\n display.grid.replaceRecords(sql);\n }", "title": "" }, { "docid": "4881f3a9fc8422b73eed0749e424058e", "score": "0.55322653", "text": "getGrid() {\n return this.grid;\n }", "title": "" }, { "docid": "c6c5018631dc22216bb8314e79c6dddf", "score": "0.5522586", "text": "function makeUserGrid() {\n\n var myModal = new AXModal();\n myModal.setConfig({\n windowID:\"myModalCT\", width:740,\n displayLoading:true\n });\n var userGrid = new AXGrid();\n $.ownerGlob.userGrid;\n userGrid.setConfig({\n targetID : \"UserGrid\",\n colGroup : [\n {key:\"id\", label:\"id\", width:\"300\", align:\"middle\"},\n {key:\"age\", label:\"나이\", width:\"70\", align: \"middle\"},\n {key:\"nickName\", label:\"닉네임\", width:\"200\", align: \"middle\"},\n {key:\"isMale\", label:\"성별\", width:\"70\", align: \"middle\"},\n {key:\"companyNum\", label:\"동행인 수\", width:\"120\", align: \"middle\"},\n {key:\"isChupaEnable\", label:\"추파 알람\", width:\"120\", align: \"middle\"},\n {key:\"enterTime\", label:\"입장 시간\", width:\"150\", align: \"middle\"}\n ],\n colHeadAlign:\"center\",\n body : {\n onclick: function(){\n // toast.push(Object.toJSON(this.item));\n // squareGrid.setEditor(this.item, 1);\n },\n oncheck: function(){\n// userGrid.checkedColSeq(this.c, false);\n// userGrid.checkedColSeq(this.c, true, this.index);\n }\n },\n editor: {\n rows: [\n [\n {\n colSeq:0, align:\"center\", valign:\"bottom\",\n formatter: function(){\n return this.item.id;\n }\n },\n {colSeq:1, align:\"center\", valign:\"bottom\", form:{type:\"text\", value:\"itemValue\"}, AXBind:{type:\"number\"}},\n {colSeq:2, align:\"center\", valign:\"bottom\", form:{type:\"text\", value:\"itemValue\"}},\n {colSeq:3, align:\"center\", valign:\"bottom\", form:{type:\"radio\", options:[\n {value:'true', text:'true'},\n {value:'false', text:'false'}\n ]}\n },\n {colSeq:4, align:\"center\", valign:\"bottom\", form:{type:\"text\", value:\"itemValue\"}, AXBind:{type:\"number\"}},\n {colSeq:5, align:\"center\", valign:\"bottom\", form:{type:\"radio\", options:[\n {value:'true', text:'true'},\n {value:'false', text:'false'}\n ]}\n }\n ]\n ],\n response: function(){ // ajax 응답에 대해 예외 처리 필요시 response 구현\n // response에서 처리 할 수 있는 객체 들\n //trace({res:this.res, index:this.index, insertIndex:this.insertIndex, list:this.list, page:this.page});\n if(this.index == null){ // 추가\n\n }else{ // 수정\n\n// AXUtil.overwriteObject(this.list[this.index], this.res.item, true); // this.list[this.index] object 에 this.res.item 값 덮어쓰기\n// userGrid.updateList(this.index, this.list[this.index]);\n//\n// delete this.res.item[\"requestType\"];\n// delete this.res.item[\"sender\"];\n// delete this.res.item[\"receiver\"];\n // do server job\n }\n\n } },\n contextMenu: {\n theme:\"AXContextMenu\", // 선택항목\n width:\"150\", // 선택항목\n menu:[\n {\n userType:1, label:\"강퇴하기\", className:\"minus\", onclick:function(){\n if(this.sendObj){\n\n if(!confirm(\"정말 강퇴 하시겠습니까?\")) return;\n var removeList = [];\n var message = new AhMessage.Builder()\n .setType(AhMessage.TYPE.FORCED_LOGOUT)\n .setContent(\"FORCED_LOGOUT\")\n .setSender($.ownerGlob.owner.sender)\n .setSenderId($.ownerGlob.owner.senderId)\n .setReceiver(this.sendObj.item.nickName)\n .setReceiverId(this.sendObj.item.id)\n .build()\n\n // do server job\n $.ownerGlob.messageHelper.sendMessage(message, {\n success: function(result) {\n removeList.push({id:message.receiverId});\n userGrid.removeList(removeList);\n alert(message.receiver+'님을 강퇴하였습니다.');\n// GlobalVariables.Log(result);\n }, error: function(err) {\n GlobalVariables.Log(err);\n console.log(err);\n }\n });\n\n }\n }\n },\n {\n userType:1, label:\"메세지 보내기\", className:\"right\", onclick:function(){\n if(!this.sendObj) return;\n\n $(\"#message_dialog\").css(\"display\", \"block\");\n $('#message_dialog_id').val(this.sendObj.item.id);\n myModal.openDiv({\n modalID:\"modalDiv01\",\n targetID:\"message_dialog\",\n width:500,\n top:50,\n closeByEscKey: true\n });\n }\n }\n ],\n filter:function(id){\n return true;\n }\n }\n });\n return userGrid;\n}", "title": "" }, { "docid": "24f8e50eafbac2e37304afc8a88fe856", "score": "0.5520674", "text": "setupGrids(){\n var grids = this._grids;\n\n var getGridById = this.getGridById;\n \n this._configuration.grids.forEach(function(config){\n \n grids.push({\n\t'id':config.id, \n\t'minwidth': config.minwidth,\n\t'grid': gridpanel.createGrid(config.cols, config.rows)\n }); //push\n\n //now set additional properties that we can't set at configuration time\n if (config.sizeRule !== undefined){\n var thisGrid = \tgetGridById(grids, config.id);\n\tthisGrid.grid.setProperty('sizeRule', config.sizeRule);\n }//if\n \n });\n \n \n }", "title": "" }, { "docid": "423dcefbe0bf3d26dca536ccc6f4090e", "score": "0.549855", "text": "get grid() {\n return this._grid;\n }", "title": "" }, { "docid": "5a05f0f8af1b21521f70e534044bf3ac", "score": "0.5493734", "text": "constructor()\r\n\t{\r\n\t\tthis.grid = Grid();\r\n\t}", "title": "" }, { "docid": "74e9f232dde5cc8f102c4a16ba1d151e", "score": "0.5491203", "text": "function gridJogadorInit() {\n \n //Creating table\n $('#jogador').DataTable( {\n\n // Responsive behavior, in case it is nedeed\n// responsive: {\n// details: {\n// renderer: function ( api, rowIdx, columns ) {\n//\n// var data = $.map( columns, function ( col, i ) {\n// return col.hidden ?\n// '<tr data-dt-row=\"'+col.rowIndex+'\" data-dt-column=\"'+col.columnIndex+'\">'+\n// '<td><strong>'+col.title+':</strong>'+'</td> '+\n// '<td>'+col.data+'</td>' +\n// '</tr>' :\n// '';\n// } ).join('');\n//\n// return data ?\n// $('<table/>').append( data ) :\n// false;\n// }\n// }\n// },\n\n //Features configuration\n paging: false,\n pageLength: 38,\n lengthChange: false, \n searching: false,\n scrollX: true,\n language: {\n info: \"_TOTAL_ jogo(s) realizado(s)\",\n infoEmpty: \"Nenhum dado para apresentar\"\n },\n //fixedColumns: true,\n order: [[ 29, \"asc\" ]], //'Rodada_ID' Column\n\n //Columns Definition\n columns: [\n { data : \"Apelido\" },\n { data : \"Pos\" },\n { data : \"Time\" },\n { data : \"Status\" },\n { data : \"CASA_D\" },\n { data : \"FORA_D\" },\n { data : \"Preco\" },\n { data : \"VarPreco\" },\n { data : \"Pts_Ult\" },\n { data : \"Media\" },\n { data : \"NoJogos\" },\n { data : \"G\" },\n { data : \"A\" },\n { data : \"F\" },\n { data : \"FT\" },\n { data : \"FD\" },\n { data : \"FF\" },\n { data : \"FS\" },\n { data : \"RB\" },\n { data : \"SG\" },\n { data : \"DD\" },\n { data : \"DP\" },\n { data : \"PE\" },\n { data : \"I\" },\n { data : \"PP\" },\n { data : \"CV\" },\n { data : \"CA\" },\n { data : \"FC\" },\n { data : \"GS\" },\n { data : \"Rodada_ID\" }\n ]\n } );\n}", "title": "" }, { "docid": "2fdce017f2d22c54b241544372b23b66", "score": "0.54831076", "text": "function initMultiColumns() {\n\n}", "title": "" }, { "docid": "9a1c13bbee954da00a7b2e0c4bd7cf31", "score": "0.5478926", "text": "function Especie_Kardex(){\n /**\n * Ext.grid.ColumnModel Define el modelo de columnas para el objeto\n * cgg_tipo_documento.\n */\n var gsCgg_kdx_especie = new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_kdx_especie\",\n method:\"selectTipoEspecieTCT\",\n pagin:false\n }),\n remoteSort:false,\n reader:new Ext.data.JsonReader({\n id:'CKESP_CODIGO',\n root:'dataSet',\n totalProperty: 'totalCount'\n },[\n {\n name:'CKESP_CODIGO'\n },\n\n {\n name:'CKESP_NOMBRE'\n }\n ]),\n baseParams:{\n format:TypeFormat.JSON\n }\n });\n gsCgg_kdx_especie.reload();\n this.getStore=function(){\n return gsCgg_kdx_especie;\n }\n}", "title": "" }, { "docid": "f6ded0becffd80f51d9c6833db851a37", "score": "0.5453882", "text": "function Cgg_gem_cargo_data(){\n this.columnModel = new Ext.grid.ColumnModel([\n {\n dataIndex:'CGARE_NOMBRE',\n header:'Area',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CGCRG_NOMBRE',\n header:'Cargo',\n width:250,\n sortable:true\n },\n\n {\n dataIndex:'CGCRG_DESCRIPCION',\n header:'Descripci\\u00F3n',\n width:300,\n sortable:true,\n hidden:true\n }\n ]);\n /**\n * Ext.data.Store Agrupacion de registros de la tabla Cgg_gem_cargo por un campo especifico.\n */\n this.store = new Ext.data.GroupingStore({\n proxy: new Ext.ux.bsx.SoapProxy({\n url: URL_WS + \"Cgg_gem_cargo\",\n method: \"selectPageDirect\"\n }),\n groupField:'CGARE_NOMBRE',\n remoteSort: true,\n reader: new Ext.data.JsonReader({\n id: 'CGCRG_CODIGO',\n root: 'dataSet',\n totalProperty: 'totalCount'\n },[\n {\n name: 'CGCRG_CODIGO'\n },\n\n {\n name: 'CGARE_CODIGO'\n },\n\n {\n name: 'CGARE_NOMBRE'\n },\n\n {\n name: 'CGCRG_NOMBRE'\n },\n\n {\n name: 'CGCRG_DESCRIPCION'\n }\n ]),\n sortInfo: {\n field: 'CGCRG_NOMBRE',\n direction: 'ASC'\n },\n baseParams: {\n keyword: \"\",\n format: \"JSON\"\n }\n }); \n}", "title": "" }, { "docid": "35ae3c4360f58924ae0477a8b5bcf52e", "score": "0.54474974", "text": "getActiveGrid(){\n return this._activeGrid;\n }", "title": "" }, { "docid": "e4fbadc8c8d570294c45f12974dcad69", "score": "0.5445281", "text": "function getGridInfo() {\r\n\t\t\t\tconst gridModule = grid.parentContainer._grid;\r\n\t\t\t\treturn {\r\n\t\t\t\t\tfocusedCell: gridModule.settings.focusedCell,\r\n\t\t\t\t\trows: gridModule.settings.indexRows,\r\n\t\t\t\t\theads: gridModule.settings.indexHead\r\n\t\t\t\t};\r\n\t\t\t}", "title": "" }, { "docid": "91ce607b7cb2250621678ca55e09fb24", "score": "0.54448324", "text": "function setup_data() {\n $scope.worker_data = {'card_key': row.card_id };\n\n var resource = SmartCardRestService.getResource();\n resource.query({'card_key': row.card_id}, function(data, response) {\n\n if(!data[0]){console.log('Invalid Card Key');$scope.error = $scope.lang.words[\"Invalid card key\"];return;}\n\n $scope.worker_data.worker_id = data[0].workers_id;\n\n resource = WorkersRestService.getResource();\n resource.query({'id': data[0].workers_id}, function(data, response) {\n $scope.worker_data.info = data[0];\n $scope.worker_data.info.worker_job = getWorkerJob(data[0].worker_views_id);\n\n resource = CheckpointRestService.getResource();\n resource.query({'driver': data[0].id}, function (data, response) {\n var headers = response();\n $scope.gridOptions.data = data;\n $scope.gridOptions.totalItems = parseInt(headers['x-pagination-total-count']);\n\n }, function (error) {console.log(error);});\n\n }, function(error) {console.log(error);});\n\n }, function(error) {console.log(error);});\n }", "title": "" }, { "docid": "73a9f7e19947b1e996f2dc59e431b01c", "score": "0.5435762", "text": "initializeInformation(data){\n //inicializar la informacion\n this.cleanScreen();\n\t\t//se arma las cabeceras\n\t\tthis.gridOptions.columnDefs = this.loadHeadboards();\n //se agrega la informacion al data del gridOptions\n this.gridOptions.data = data.results;\n //numero total de paginas\n this.generalData.totalPages = data.countResults;\n //actualizar el grid\n this.gridApi.core.notifyDataChange(this.uiGridConstants.dataChange.ALL);\n //mostrar paginacion\n this.showPagination = true;\n //cerrar pantalla de loading\n this.kLoadingService.hide();\n }", "title": "" }, { "docid": "d8563c0b502de7ab5473527f5652a0f3", "score": "0.5426998", "text": "function GetUserBasedGridColumList(){\n var _filter = {\n \"SAP_FK\": authService.getUserInfo().AppPK,\n \"TenantCode\": authService.getUserInfo().TenantCode,\n \"SourceEntityRefKey\": authService.getUserInfo().UserId,\n \"EntitySource\": \"WMS_PRODUCTCONVERSION\",\n };\n var _input = {\n \"searchInput\": helperService.createToArrayOfObject(_filter),\n \"FilterID\": appConfig.Entities.UserSettings.API.FindAll.FilterID\n };\n \n apiService.post(\"eAxisAPI\", appConfig.Entities.UserSettings.API.FindAll.Url + authService.getUserInfo().AppPK, _input).then(function(response){\n if(response.data.Response[0]){\n ConversionsCtrl.ePage.Masters.UserValue= response.data.Response[0];\n if(response.data.Response[0].Value!=''){\n var obj = JSON.parse(response.data.Response[0].Value)\n ConversionsCtrl.ePage.Entities.Header.TableProperties.UIOrgPartUnit = obj;\n ConversionsCtrl.ePage.Masters.UserHasValue =true;\n }\n }else{\n ConversionsCtrl.ePage.Masters.UserValue = undefined;\n }\n })\n }", "title": "" }, { "docid": "2682d2a91ac4b43f54dd95e951f4d50e", "score": "0.54231226", "text": "function initMasterDataProcessModal() {\n if (window.CurrentOpmt && window.CurrentOpmt.StyleCode) GetModulesByStyleCode(window.CurrentOpmt.StyleCode);\n GetMasterCodeTool(\"0\"); //Get list of category tool \n GetMasterCodeMachine(\"1\"); //Get machine category\n GetMasterCodeOpGroup(OpGroup); //Get process group\n GetMasterCodeOpType(OpType); //Get Job code\n GetActionCodeOpType(\"ActionCode\");\n GetFactory();\n const arrCategory = [\"CSW\", \"SEW\"];\n\n //Get list of tool and machine based on list of categories\n GetToolDataAndFillToDropdownList(\"0\", arrCategory);\n GetToolDataAndFillToDropdownList(\"1\", arrCategory);\n JqGridSelectedProcess(\"\");\n}", "title": "" }, { "docid": "e79536c67752457c253c1dca08f1d53c", "score": "0.54136914", "text": "function setGridTitles() {\n if ($scope.role == $rootScope.roles.guest) {\n $scope.gridDescription = Translations.home.seeProducts;\n }\n }", "title": "" }, { "docid": "b94a9dd01c816f92f70ca2fb32ac5c8b", "score": "0.53996724", "text": "function genDataGrid(t,p,s,c){\r\n\r\n t.jqxGrid({\r\n width: '100%',\r\n source: s,\r\n columnsresize: true,\r\n pageable: true,\r\n autoheight: true,\r\n horizontalscrollbarstep: 200,\r\n pagesize: 5,\r\n pagermode:'simple',\r\n theme: 'energyblue',\r\n pagerrenderer: p,\r\n columns: c \r\n });\r\n }", "title": "" }, { "docid": "d2a305e8886a69f62fd22a98bade17b8", "score": "0.5384043", "text": "function loadPlannerGrid() {\n var stored = JSON.parse(localStorage.getItem(\"dayPlanner_PlannerGrid\"));\n if (stored) {\n plannerGrid = stored;\n } \n else {\n for (var i = 9; i <= 17; i++) {\n plannerGrid[\"hr\"+i]= {timeHiClass: \"\", note: \"\"};\n }\n }\n }", "title": "" }, { "docid": "b0efe031a8eda65dded0d19637f17002", "score": "0.5383061", "text": "function BindDataToJqGridOpsDetail(styleCode, styleSize, styleColor, revNo, opRevNo, edition, lanId) {\n jQuery(gridOpsDetailId).jqGrid({\n url: '/OPS/GetOpDetail',\n postData: {\n styleCode: styleCode,\n styleSize: styleSize,\n styleColor: styleColor,\n revNo: revNo,\n opRevNo: opRevNo,\n edition: edition,\n languageId: lanId\n },\n datatype: \"json\",\n height: 300,\n width: null,\n shrinkToFit: false,\n viewrecords: false,\n rowNum: -1, //Show all rows\n rownumbers: false,\n gridview: true,\n multiselect: true,\n caption: \"OPS Detail\",\n colModel: [\n { name: 'HotSpot', index: 'HotSpot', label: \" \", width: 25, classes: 'pointer', formatter: markHotSpot },\n { name: 'OpGroupName', index: 'OpGroupName', label: arrColNameOpsDetail.OPGROUPNAME, hidden: true, classes: 'pointer' },\n { name: 'ModuleName', index: 'ModuleName', label: arrColNameOpsDetail.MODULENAME, hidden: false, classes: 'pointer' },\n { name: 'OpNum', index: 'OpNum', width: 70, label: arrColNameOpsDetail.OPNUM, align: 'center', classes: 'pointer' },\n { name: 'OpName', index: 'OpName', width: 250, label: arrColNameOpsDetail.OPNAME, classes: 'pointer' },\n { name: 'OpNameLan', index: 'OpNameLan', width: 250, label: arrColNameOpsDetail.OPNAME, hidden: true, classes: 'pointer' },\n { name: 'OpTime', index: 'OpTime', width: 130, label: arrColNameOpsDetail.OPTIME, align: 'center', classes: 'pointer' },\n { name: 'OpPrice', index: 'OpPrice', width: 80, label: arrColNameOpsDetail.OPPRICE, align: 'center', classes: 'pointer', hidden: true }, //Ha add\n { name: 'Factory', index: 'Factory', width: 90, label: arrColNameOpsDetail.FACTORY, align: 'center', hidden: true, classes: 'pointer' },\n { name: 'FactoryName', index: 'FactoryName', width: 120, label: arrColNameOpsDetail.FACTORY, align: 'left', classes: 'pointer' },\n { name: 'ManCount', index: 'ManCount', width: 70, label: arrColNameOpsDetail.MANCOUNT, align: 'center', classes: 'pointer' },\n { name: 'MachineName', index: 'MachineName', width: 120, label: arrColNameOpsDetail.MACHINENAME, align: 'left', classes: 'pointer' },\n { name: 'MachineCount', index: 'MachineCount', width: 80, label: arrColNameOpsDetail.MACHINECOUNT, align: 'center', classes: 'pointer' },\n { name: 'OfferOpPrice', index: 'OfferOpPrice', width: 100, label: arrColNameOpsDetail.OFFEROPPRICE, align: 'center', classes: 'pointer', hidden: true }, //Ha add\n { name: 'MaxTime', index: 'MaxTime', width: 75, label: arrColNameOpsDetail.MAXTIME, align: 'center', classes: 'pointer' },\n { name: 'StitchCount', index: 'StitchCount', hidden: true }, // HA ADD\n {\n name: 'OrgFileName', index: 'OrgFileName', width: 70, label: 'Jig Image', align: 'center', classes: 'pointer'\n , formatter: function (cellvalue, options) {\n if (cellvalue)\n return \"<img style='width:60px;height:20px' src='\" + cellvalue + \"' onclick=ShowImageDetail('\" + options.rowId + \"'); />\";\n return \"\";\n }\n },\n { name: 'BenchmarkTime', index: 'BenchmarkTime', width: 120, label: arrColNameOpsDetail.BENCHMARKTIME, align: 'center', classes: 'pointer' },\n { width: 100, label: arrColNameOpsDetail.UPLOADFILE, align: 'center', formatter: uploadMachineFile, classes: 'pointer' },\n { name: 'PlayVideo', index: 'PlayVideo', width: 80, label: arrColNameOpsDetail.PLAYVIDEO, align: 'center', formatter: playVideo, classes: 'pointer' },\n { width: 100, label: arrColNameOpsDetail.DOWNLOADFILE, align: 'left', formatter: downloadMachineFile, classes: 'pointer' },\n { name: 'VideoFile', index: 'VideoFile', width: 150, label: arrColNameOpsDetail.VIDEO, align: 'center', hidden: true },\n { name: 'StyleCode', index: 'StyleCode', width: 100, label: arrColNameOpsDetail.STYLECODE, hidden: true },\n { name: 'StyleSize', index: 'StyleSize', width: 100, label: arrColNameOpsDetail.STYLESIZE, hidden: true },\n { name: 'StyleColorSerial', index: 'StyleColorSeiral', width: 100, label: arrColNameOpsDetail.STYLECOLORSERIAL, hidden: true },\n { name: 'RevNo', index: 'RevNo', width: 100, label: arrColNameOpsDetail.REVNO, hidden: true },\n { name: 'OpRevNo', index: 'OpRevNo', width: 100, label: arrColNameOpsDetail.OPREVNO, hidden: true },\n { name: 'OpSerial', index: 'OpSerial', width: 100, label: arrColNameOpsDetail.OPSERIAL, hidden: true },\n { name: 'Edition', index: 'Edition', hidden: true },\n { name: 'HotSpot', index: 'HotSpot', hidden: true },\n { name: 'OpTimeBalancing', index: 'OpTimeBalancing', hidden: true },\n { name: 'ToolId', index: 'ToolId', hidden: true },\n { name: 'MachineType', index: 'MachineType', hidden: true },\n { name: 'OpGroup', index: 'OpGroup', hidden: true },\n { name: 'ModuleId', index: 'ModuleId', hidden: true },\n { name: 'ActionCode', index: 'ActionCode', hidden: true },\n { name: 'VideoOpLink', index: 'VideoOpLink', hidden: true },\n { name: 'ImageLink', index: 'ImageLink', hidden: true },\n { name: 'HasFile', index: 'HasFile', hidden: true },\n { name: 'HasManyFiles', index: 'HasManyFiles', hidden: true },\n { name: 'FileNameOpfl', index: 'FileNameOpfl', hidden: true }\n\n ],\n loadError: function (xhr, status, err) {\n ShowMessage(\"Get Ops Detail\", err.message, MessageTypeError);\n },\n grouping: true,\n groupingView: {\n groupField: ['OpGroupName'],\n groupColumnShow: [false],\n groupText: [\"Group Name: {0} - {1} Item(s)\"],\n groupCollapse: false,\n plusicon: \"ace-icon fa fa-plus\",\n minusicon: \"ace-icon fa fa-minus\"\n },\n onSelectRow: function (rowid) {\n var row = $(gridOpsDetailId).jqGrid(\"getRowData\", rowid);\n var oldProName = row.OpName;\n jQuery(gridOpsDetailId).jqGrid('setCaption', \"Style Code: \" + row.StyleCode + \" | Size: \" + row.StyleSize\n + \" | Color: \" + row.StyleColorSerial + \" | Revision: \" + row.RevNo + \"| Edtion: \" + MapOperationPlanEditioin(row.Edition)\n + \" | Op Revision: \" + row.OpRevNo + \" | Op Serial: \" + ZeroPad(row.OpSerial, 3));\n\n },\n loadComplete: function () { },\n ondblClickRow: function (rowid, abc) {\n ShowModal(ProcessModal);\n var rowData = jQuery(gridOpsDetailId).jqGrid(\"getRowData\", rowid);\n var objOpsDetail = GetObjectOpsDetail(rowData);\n\n //Get selected operation plan\n\n var objOpsMaster = GetSelectedOneRowData(gridOpsTableId);\n objOpsDetail.LanguageId = objOpsMaster.Language;\n\n StatusUpdateProcess = 1; //Set for getting operation name.\n\n InitDataForProcessModal();\n setTimeout(function () {\n LoadObjectOpDetailModal(objOpsDetail);\n }, 1500);\n\n $('#btnUpdateProcess').hide();\n $('#btnSaveProcess').hide();\n\n //alert(rowData);\n },\n ajaxGridOptions: { async: false }\n });\n\n function markHotSpot(cellvalue, options, rowObject) {\n if (cellvalue === \"1\") {\n return \"<i class='fa fa-flag' style='color: red'></i> \";\n }\n return \"\";\n }\n\n function uploadMachineFile(cellvalue, options, rowObject) {\n //START MOD) SON - 16 Jan 2019 - do not check confirmed status\n var btnDisabled = (UserRoleCurrent.IsUpdate !== \"1\") ? 'disabled' : \"\";\n\n return \"<button type='button' class='btn btn-primary btn-modal' \" + btnDisabled + \" onclick='UploadFileOpDetail(\" + JSON.stringify(rowObject) + \")'>\" +\n \"<i class='glyphicon glyphicon-upload'></i> </button>\";\n //END MOD) SON\n }\n\n function downloadMachineFile(cellvalue, options, rowObject) {\n //START MOD) SON - hide button view files if process does not have file to download\n if (rowObject.HasFile === \"Y\") {\n var btnDisabled = UserRoleCurrent.IsExport !== \"1\" ? 'disabled' : \"\";\n\n //Set icon for file download\n var startImg = \"<img \";\n var srcImg = \" onerror='imgErrorIcon(this);' src='../img/icons/\";\n var endImg = \" height='30'/>\";\n var path = \"<img src='../img/icons/csv.png' height='15'/>\";\n var icon = \"\";\n var iconPath = \"\";\n\n var strExt = \"\";\n if (rowObject.HasManyFiles === \"Y\") {\n //If process has many files then get default icon is files icon\n icon = \"files.png\";\n srcImg += icon + \"'\";\n strExt = \"...\";\n } else {\n //Get file name\n var fileName = rowObject.FileNameOpfl;\n var extFile = fileName.split('.').pop().toUpperCase();\n $.each(ObjIcons, function (idx, value) {\n if (extFile === value.CodeDetail2) {\n icon = value.CodeDetail;\n strExt = extFile.toLowerCase();\n }\n });\n\n srcImg += icon + \"'\";\n }\n iconPath = startImg + srcImg + endImg;\n\n return \"<button type='button' style='background-color:transparent; border-color:transparent;' \" + btnDisabled + \" onclick='DownloadFileOpDetail(\" + JSON.stringify(rowObject) + \")'>\" +\n iconPath + \"</button>\" + strExt;\n } else {\n return \"\";\n }\n }\n\n function playVideo(cellvalue, options, rowObject) {\n if (isEmpty(rowObject.VideoFile)) return \"\";\n\n return \"<button type='button' class='btn btn-info btn-modal' onclick='PlayVideo(\" + JSON.stringify(rowObject) + \")'>\" +\n \"<i class='glyphicon glyphicon-play'></i>\" + \"</button>\";\n }\n\n jQuery(gridOpsDetailId).jqGrid('bindKeys');\n}", "title": "" }, { "docid": "97d1f2aac924b2a0da058fe6a0a71f01", "score": "0.5373181", "text": "prepareColumns() {\n return this.columns.map(column => {\n const columnKey = column.caption.split(\" \").join(\"_\");\n return {\n template: \"page\" === column.cellType ? \"<div class='mx-formcell #: classname #' data-mxid='#: mxid #' data-mxform='\" + column.form + \"'></div>\" : \"<div data-mxid='#: mxid #' class='#: classname #'>#: \" + columnKey + \" #</div>\",\n field: column.caption.split(\" \").join(\"_\"),\n title: column.caption,\n aggregates: [\"average\", \"sum\", \"max\", \"min\", \"count\"],\n groupHeaderTemplate: column.headerTemplate,\n filterable: column.filterMulti ? {\n multi: true,\n } : undefined,\n };\n });\n }", "title": "" }, { "docid": "6e1a64ca37f21761071423409c44cad1", "score": "0.53536516", "text": "function Nacionalidad(){\n /**\n * Ext.grid.ColumnModel Define el modelo de columnas para el objeto\n * cgg_tipo_documento.\n */\n var gsCgg_nacionalidad = new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_nacionalidad\",\n method:\"selectAll\",\n pagin:false\n }),\n remoteSort:false,\n reader:new Ext.data.JsonReader({\n },[\n {\n name:'CGNCN_CODIGO'\n },\n\n {\n name:'CGNCN_NACIONALIDAD'\n }\n ]),\n baseParams:{\n format:TypeFormat.JSON\n }\n });\n gsCgg_nacionalidad.reload();\n this.getStore=function(){\n return gsCgg_nacionalidad;\n }\n}", "title": "" }, { "docid": "d0c024ba8faf1099957a5a9904cd9054", "score": "0.5345978", "text": "function SetupTableDataControl($controlWrapperDiv, tableConfigurationId, dataWebServiceURL, gridRowInsertedJavaScriptHandler, isMobileBrowser, gridWidth, gridHeight) {\n\n // Find table caption element.\n var $tableCaption = $(\".tableDataHeader .tableCaption\", $controlWrapperDiv);\n\n // Register toggle hander for table caption element.\n $tableCaption.toggle(function () {\n\n // Show loading animation.\n ShowLoadingAnimation();\n\n\n // Get the table data container element.\n var $tableDataContainer = $(this).parent().next(\".tableData\");\n\n // Empty the table data container element (mabye there is existing table data)\n $tableDataContainer.empty();\n\n // The jqGrid needs a <table/> element to build its data grid. \n // The table elements needs an unique id. \n var tableDataContainerId = $tableDataContainer.attr(\"id\")\n var jqGridTableId = tableDataContainerId + \"_jqGridTableElement\";\n\n // Create a table element used by jqGrid to build the final data table.\n var $newTableElement = $(\"<table id='\" + jqGridTableId + \"'></table>\");\n\n // Place the newly created table elment in the table data container.\n $newTableElement.appendTo($tableDataContainer)\n\n // Get the selected MD guid value. \n var selectedMdGuid = GetSelectedMDGuid();\n\n // Get the selectd KST value.\n var selectedKSTGuid = GetSelectedKST();\n\n // Load grid data with ajax.\n LoadGridData(selectedMdGuid,\n selectedKSTGuid,\n tableConfigurationId,\n dataWebServiceURL,\n gridRowInsertedJavaScriptHandler,\n $newTableElement,\n gridWidth,\n gridHeight,\n function () { HideLoadingAnimation(); $tableDataContainer.slideDown(); });\n\n return false;\n }, function () {\n // Get the table data container element.\n var $tableDataContainer = $(this).parent().next(\".tableData\");\n $tableDataContainer.slideUp();\n });\n\n // Find magnifier element.\n var $imgMagnifier = $(\".tableDataHeader .imgMagnifier\", $controlWrapperDiv);\n\n // Register click hander for magnifier element.\n $imgMagnifier.click(function () {\n\n // Show loading animation.\n ShowLoadingAnimation();\n\n // Find the global dialog wrapper element.\n // In this element dynamically created dialog content is placed before it gets presented.\n var $globalDialogWrapper = $(\"#globalDialogWrapper\");\n $globalDialogWrapper.empty();\n\n // The dialog title\n var dialogTitle = \"Detail: \" + $tableCaption.text();\n\n // Create a div delement thats wrapps the dialog contents.\n var $dialogElement = $(\"<div title='\" + dialogTitle + \"'></div>\")\n\n // Place the newly creaetd div in the global dialog wrapper element.\n $dialogElement.appendTo($globalDialogWrapper);\n\n // Get the table data container element.\n var $tableDataContainer = $(this).parent().next(\".tableData\");\n\n // The jqGrid needs a <table/> element to build its data grid. \n // The table elements needs an unique id. \n var tableDataContainerId = $tableDataContainer.attr(\"id\")\n var jqGridTableId = tableDataContainerId + \"_magnifiedTableElement\";\n\n // Create a table element used by jqGrid to build the final data table.\n var $newTableElement = $(\"<table id='\" + jqGridTableId + \"'></table>\");\n\n // Place the newly created table elment in the dialog element.\n $newTableElement.appendTo($dialogElement)\n\n var magnifiedGridWidth = 780;\n var magnifiedGridHeight = 530;\n var dialogWidth = 800;\n var dialogHeight = 600;\n\n if (isMobileBrowser == \"true\") {\n // Override dimensions for mobile browsers\n magnifiedGridWidth = 455;\n magnifiedGridHeight = 400\n dialogWidth = 480;\n dialogHeight = 480;\n }\n\n // Get the selected MD guid value. \n var selectedMdGuid = GetSelectedMDGuid();\n\n // Get the selectd KST value.\n var selectedKSTGuid = GetSelectedKST();\n\n // Load grid data with ajax.\n LoadGridData(selectedMdGuid,\n selectedKSTGuid,\n tableConfigurationId,\n dataWebServiceURL,\n gridRowInsertedJavaScriptHandler,\n $newTableElement,\n magnifiedGridWidth,\n magnifiedGridHeight,\n function () {\n HideLoadingAnimation();\n\n // Show the dialog \n $dialogElement.dialog({\n width: dialogWidth,\n height: dialogHeight,\n resizable: false,\n modal: true,\n close: function (ev, ui) { $(this).remove(); }\n });\n });\n\n return false;\n });\n\n // Regiser hover event for magnifier image.\n // The magnifier image gets highlighted once the user hovers over the image. \n $imgMagnifier.hover(function () {\n $(this).removeClass(\"imgMangifierStateNormal\")\n .addClass(\"imgMangifierStateHighlight\");\n }, function () {\n $(this).removeClass(\"imgMangifierStateHighlight\")\n .addClass(\"imgMangifierStateNormal\"); \n });\n\n}", "title": "" }, { "docid": "c6d7ffbbbcf4857bdd2af3f0e43c4b4d", "score": "0.5341371", "text": "function CargarGridTipoJunta() {\n var ResultadoJason;\n var TipoDato = 1;\n $TipoJunta.TipoJunta.read({ TipoDato, token: Cookies.get(\"token\") }).done(function (data) {\n if (Error(data)) {\n ResultadoJason = data;\n if (ResultadoJason.length > 0) {\n $(\"#gridTipoJunta\").data(\"kendoGrid\").dataSource.data(ResultadoJason);\n } else {\n $(\"#gridTipoJunta\").data(\"kendoGrid\").dataSource.data([]);\n };\n }\n });\n\n //PINTA EL GRID\n $(\"#gridTipoJunta\").kendoGrid({\n dataSource: {\n data: ResultadoJason,\n schema: {\n model: {\n fields: {\n TipoJuntaID: { type: \"string\", editable: true },\n Codigo: { type: \"string\", editable: true },\n Nombre: { type: \"string\", editable: true },\n Calidad: { type: \"string\", editable: true },\n Relleno: { type: \"string\", editable: true },\n }\n }\n },\n pageSize: 5,\n serverPaging: false,\n serverFiltering: false,\n serverSorting: false,\n },\n navigatable: true,\n autoHeight: true,\n sortable: true,\n scrollable: false,\n pageable: {\n refresh: false,\n pageSizes: [5, 10, 15, 20],\n info: false,\n input: false,\n numeric: true,\n\n },\n // toolbar: [\"create\"],\n columns: [\n { field: \"TipoJuntaID\", title: _dictionary.lblTipoJuntaID[$(\"#language\").data(\"kendoDropDownList\").value()], filterable: true, hidden: true },\n { field: \"Codigo\", title: _dictionary.lblTipoJuntaCodigo[$(\"#language\").data(\"kendoDropDownList\").value()], filterable: true },\n { field: \"Nombre\", title: _dictionary.lblTipoJuntaNombre[$(\"#language\").data(\"kendoDropDownList\").value()], filterable: true },\n { field: \"Calidad\", title: _dictionary.lblTipoJuntaCalidad[$(\"#language\").data(\"kendoDropDownList\").value()], filterable: true },\n { field: \"Relleno\", title: _dictionary.lblTipoJuntaRelleno[$(\"#language\").data(\"kendoDropDownList\").value()], filterable: true },\n //{ command: [\"edit\", \"destroy\"], title: \"&nbsp;\", width: \"200px\" }\n ],\n editable: true,\n // editable: \"popup\"\n\n //editable: true,\n\n edit: function (e) {\n var input = e.container.find(\".k-input\");\n input.blur(function (e) {\n var TipoDato = 3;\n\n var ObtenerDato = $(\"#gridTipoJunta\").data(\"kendoGrid\").dataItem($(e.currentTarget).closest(\"tr\"));\n\n var Codigo = ObtenerDato.Codigo;\n var Nombre = ObtenerDato.Nombre;\n var Calidad = ObtenerDato.Calidad;\n var Relleno = ObtenerDato.Relleno;\n\n var TipoJuntaID = ObtenerDato.TipoJuntaID;\n\n\n if (ValidaCampoTipoJuntas(Calidad, Relleno)) {\n\n UpdateTipoJuntas(TipoDato, TipoJuntaID, Codigo, Nombre, Calidad, Relleno);\n }\n\n else {\n $TipoJunta.TipoJunta.read({ TipoDato, token: Cookies.get(\"token\") }).done(function (data) {\n if (Error(data)) {\n ResultadoJason = data;\n if (ResultadoJason.length > 0) {\n $(\"#gridTipoJunta\").data(\"kendoGrid\").dataSource.data(ResultadoJason);\n } else {\n $(\"#gridTipoJunta\").data(\"kendoGrid\").dataSource.data([]);\n };\n }\n });\n\n }\n });\n\n }\n\n });\n}", "title": "" }, { "docid": "f4eb34d605e8edf61427b344007f5971", "score": "0.5338082", "text": "makeGrid() {\n const grid = this.newPrefab(Grid).getComponent(GridComp);\n grid.grid_num = this._grids.length;\n grid.transform.x = grid.H_CELLS * grid.grid_num;\n\n grid.start = {x:0, y:4};\n grid.updatePaths();\n\n\n this._grids.push(grid);\n\n return grid;\n }", "title": "" }, { "docid": "ada033c6419f6bc347084c7bebb3da80", "score": "0.53360003", "text": "function generateGrid() {\n $(\"#grid\").removeClass(\"hidden\");\n $('#grid').w2grid({\n name: 'grid',\n header: 'Orders',\n show: {\n toolbar: false,\n footer: false\n },\n columns: [\n {field: 'recid', caption: 'orderID', size: '10%', sortable: true, attr: 'align=center'},\n {field: 'userID', caption: 'userID', size: '5%', sortable: true, resizable: false},\n {field: 'numPassengers', caption: 'numPassengers', size: '5%', resizable: true},\n {field: 'startLocation', caption: 'startLocation', size: '5%', resizable: true},\n {field: 'endLocation', caption: 'endLocation', size: '5%', resizable: true},\n {field: 'endTime', caption: 'endTime', size: '30%', resizable: true},\n {field: 'paymentAmount', caption: 'paymentAmount', size: '10%', resizable: true},\n {field: 'callTime', caption: 'callTime', size: '30%', resizable: true},\n ],\n searches: [\n {field: 'userID', caption: 'userID', type: 'text'},\n {field: 'orderID', caption: 'orderID', type: 'text'},\n ],\n sortData: [{field: 'orderID', direction: 'ASC'}],\n records: records,\n onLoad: function (event) {\n //because i am too lazy to read docs, hoping to make a difference\n console.log(\"grid loaded\");\n $(\"#grid\").addClass(\"hidden\");//needs fixing somehow fucks grid up dunno why\n }\n });\n}", "title": "" }, { "docid": "1369e70b5c25d72723d8894d5ac9283c", "score": "0.5335895", "text": "function initGrid(name, gridSetting, defaultColumn, defaultHidenColumn, scope) {\n var columnFilters = [];\n\n if (gridSetting.options.allowFilter != false) {\n $.each(gridSetting.columns, function (index, col) {\n if (col == null) return;\n if (col.filterable == false) return;\n\n if (col.children) {\n var lstChildCol = col.children;\n $.each(lstChildCol, function (index, childCol) {\n if (childCol.filterable == false) return true;\n if (childCol.children) {\n var lstChildCol2 = childCol.children;\n $.each(lstChildCol2, function (index2, childCol2) {\n if (childCol2.filterable == false) return true;\n childCol2.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n });\n }\n else {\n childCol.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n }\n else {\n col.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n\n $.each(defaultColumn, function (index, col) {\n if (col == null) return;\n if (col.filterable == false) return;\n\n if (col.children) {\n var lstChildCol = col.children;\n $.each(lstChildCol, function (index, childCol) {\n if (childCol.filterable == false) return true;\n if (childCol.children) {\n var lstChildCol2 = childCol.children;\n $.each(lstChildCol2, function (index2, childCol2) {\n if (childCol2.filterable == false) return true;\n childCol2.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n });\n }\n else {\n childCol.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n }\n else {\n col.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n\n $.each(gridSetting.hiddenColumns, function (index, col) {\n if (col == null) return;\n if (col.filterable == false) return;\n\n if (col.children) {\n var lstChildCol = col.children;\n $.each(lstChildCol, function (index, childCol) {\n if (childCol.filterable == false) return true;\n if (childCol.children) {\n var lstChildCol2 = childCol.children;\n $.each(lstChildCol2, function (index2, childCol2) {\n if (childCol2.filterable == false) return true;\n childCol2.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n });\n }\n else {\n childCol.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n }\n else {\n col.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n\n $.each(defaultHidenColumn, function (index, col) {\n if (col == null) return;\n if (col.filterable == false) return;\n\n if (col.children) {\n var lstChildCol = col.children;\n $.each(lstChildCol, function (index, childCol) {\n if (childCol.filterable == false) return true;\n if (childCol.children) {\n var lstChildCol2 = childCol.children;\n $.each(lstChildCol2, function (index2, childCol2) {\n if (childCol2.filterable == false) return true;\n childCol2.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n });\n }\n else {\n childCol.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n }\n else {\n col.header = {\n buttons: [{\n cssClass: \"bowtie-icon bowtie-search-filter filterIcon\",\n command: 'filter',\n showOnHover: false,\n }]\n };\n }\n });\n }\n\n //create grid with dataview\n var groupItemMetadataProvider = new Slick.Data.GroupItemMetadataProvider();\n var dataView = new Slick.Data.DataView({\n groupItemMetadataProvider: groupItemMetadataProvider,\n inlineFilters: false\n });\n\n var grid = new Slick.Grid(\"#\" + name, dataView, gridSetting.columns, gridSetting.options);\n if (gridSetting.options.showFooterRow && gridSetting.updateFooter) {\n grid.updateFooter = gridSetting.updateFooter;\n grid.updateFooter(grid);\n }\n\n grid.registerPlugin(groupItemMetadataProvider);\n\n if (gridSetting.options.allowGroup)\n grid.registerPlugin(new Slick.Plugins.ColGroup());\n\n grid.name = name;\n grid.module = scope.setting.view.module;\n grid.tableName = gridSetting.options.tableName;\n\n grid.dataView = dataView;\n grid.setting = gridSetting;\n\n grid.defaultUrl = gridSetting.url;\n grid.defaultColumn = defaultColumn;\n grid.defaultHidenColumn = defaultHidenColumn;\n\n grid.columnFilters = columnFilters;\n grid.setSelectionModel(new Slick.RowSelectionModel());\n\n dataView.gridOwner = grid;\n\n\n //set grid basic method\n grid.loadData = function (url, param) {\n var that = this;\n if (url == null) url = that.defaultUrl;\n that.lastUrl = url;\n\n $.ajax({\n url: url,\n data: param,\n type: \"POST\",\n contentType: \"application/x-www-form-urlencoded; charset=utf-8\",\n success: function (response) {\n if (response.isError == false) {\n that.setData(response.data);\n }\n }\n });\n };\n\n grid.setData = function (data, idField) {\n\n if (data == null) data = [];\n\n var that = this;\n\n if (idField == null) idField = \"id\";\n\n that.dataView.beginUpdate();\n that.dataView.setItems(data, idField);\n that.dataView.endUpdate();\n\n if (that.updateFooter)\n that.updateFooter(that);\n\n that.invalidate();\n that.resizeCanvas();\n };\n\n grid.refreshData = function () {\n if (this.lastUrl)\n this.loadData(this.lastUrl);\n };\n\n grid.getCurrentData = function () {\n var data = null;\n\n var selectList = this.getSelectedRows();\n if (selectList != null && selectList.length != 0) {\n data = this.getDataItem(selectList[0]);\n }\n\n return data;\n }\n\n //set basic gid event\n grid.onSort.subscribe(function (e, args) {\n var cols = args.sortCols;\n args.grid.getData().sort(function (dataRow1, dataRow2) {\n for (var i = 0, l = cols.length; i < l; i++) {\n var field = cols[i].sortCol.field;\n var sign = cols[i].sortAsc ? 1 : -1;\n var value1 = dataRow1[field], value2 = dataRow2[field];\n var result = (value1 == value2 ? 0 : (value1 > value2 ? 1 : -1)) * sign;\n if (result != 0) {\n return result;\n }\n }\n return 0;\n });\n\n args.grid.invalidate();\n });\n\n grid.sortData = function (field, isAsc) {\n this.getData().sort(function (dataRow1, dataRow2) {\n var sign = isAsc ? 1 : -1;\n var value1 = dataRow1[field], value2 = dataRow2[field];\n var result = (value1 == value2 ? 0 : (value1 > value2 ? 1 : -1)) * sign;\n if (result != 0) {\n return result;\n }\n\n return 0;\n });\n\n this.invalidate();\n };\n\n grid.selectedRow = function (index) {\n var selector = '';\n if (!index || index == 'first' || index == 0)\n selector = \":first\";\n else if (index == 'last')\n selector = \":last\";\n else\n selector = \":nth-child(\" + (index + 1) + \")\";\n var element = $(\"#\" + this.name + \" .slick-row\" + selector + \" .slick-cell\");\n\n if (element.length == 0) {\n this.setSelectedRows([index]);\n this.resetActiveCell();\n }\n else\n element.click();\n };\n\n grid.setColumnDataSource = function (colName, source) {\n var that = this;\n var columns = that.getColumns();\n $.each(columns, function (index, column) {\n if (column.id == colName) {\n column.dataSource = source;\n return false;\n }\n });\n\n that.setColumns(columns);\n };\n\n grid.setColumnEditorFormat = function (colName, func) {\n var that = this;\n var columns = that.getColumns();\n $.each(columns, function (index, column) {\n if (column.id == colName) {\n column.formatState = func;\n return false;\n }\n });\n\n that.setColumns(columns);\n };\n\n grid.setColumnComboboxSetting = function (colName, setting) {\n var that = this;\n var columns = that.getColumns();\n $.each(columns, function (index, column) {\n if (column.id == colName) {\n column.comboboxSetting = setting;\n return false;\n }\n });\n\n that.setColumns(columns);\n };\n\n grid.setColumnOption = function (colName, option) {\n var that = this;\n var columns = that.getColumns();\n $.each(columns, function (index, column) {\n if (column.id == colName) {\n $.each(option, function (field, value) {\n column[field] = value;\n });\n\n return false;\n }\n });\n\n that.setColumns(columns);\n };\n\n grid.groupDataField1 = function (option) {\n if (!option || !option.fieldName) return;\n var aggs = [];\n var columns = this.getColumns();\n if (option.sum) {\n $.each(option.sum, function (index, item) {\n aggs.push(new Slick.Data.Aggregators.Sum(item.field));\n var column = columns.find(x => x.id == item.column);\n if (column) column.groupTotalsFormatter = item.formatter;\n });\n }\n\n if (option.avg) {\n $.each(option.avg, function (index, item) {\n aggs.push(new Slick.Data.Aggregators.Avg(item.field));\n var column = columns.find(x => x.id == item.column);\n if (column) column.groupTotalsFormatter = item.formatter;\n });\n }\n\n this.dataView.setGrouping({\n getter: option.fieldName,\n formatter: option.groupFormat,\n aggregators: aggs,\n aggregateCollapsed: false,\n lazyTotalsCalculation: true\n });\n };\n\n grid.groupDataField = function (options) {\n var setting = [];\n var thisColumn = this.getColumns()\n $.each(options, function (index, option) {\n if (!option || !option.fieldName) return;\n var aggs = [];\n var columns = thisColumn;\n if (option.sum) {\n $.each(option.sum, function (index, item) {\n aggs.push(new Slick.Data.Aggregators.Sum(item.field));\n var column = columns.find(x => x.id == item.column);\n if (column) column.groupTotalsFormatter = item.formatter;\n });\n }\n\n if (option.avg) {\n $.each(option.avg, function (index, item) {\n aggs.push(new Slick.Data.Aggregators.Avg(item.field));\n var column = columns.find(x => x.id == item.column);\n if (column) column.groupTotalsFormatter = item.formatter;\n });\n }\n\n setting.push({\n getter: option.fieldName,\n formatter: option.groupFormat,\n aggregators: aggs,\n aggregateCollapsed: false,\n lazyTotalsCalculation: true\n });\n });\n\n this.dataView.setGrouping(setting);\n };\n\n grid.onColumnsReordered.subscribe(function (e, args) {\n $(\".filterPanel\").hide();\n });\n\n grid.onDblClick.subscribe(function (e, args) {\n args.grid.setSelectedRows([args.row]);\n if (args.grid.editAction) {\n var item = args.grid.dataView.getItem(args.row);\n args.grid.editAction(args.grid, item);\n }\n else {\n scope.$apply(function () { scope.edit() });\n //$(\".main_container_header .btn_edit\").first().click();\n }\n });\n\n grid.onScroll.subscribe(function () {\n $(\".context-menu\").hide();\n });\n\n //set basic dataview event\n grid.dataView.onRowsChanged.subscribe(function (e, args) {\n if (args.dataView.gridOwner.updateFooter)\n args.dataView.gridOwner.updateFooter(args.dataView.gridOwner);\n\n args.dataView.gridOwner.invalidateRows(args.rows);\n args.dataView.gridOwner.render();\n });\n\n grid.dataView.onRowCountChanged.subscribe(function (e, args) {\n if (args.dataView.gridOwner.updateFooter)\n args.dataView.gridOwner.updateFooter(args.dataView.gridOwner);\n\n args.dataView.gridOwner.updateRowCount();\n args.dataView.gridOwner.render();\n });\n\n grid.onSelectedRowsChanged.subscribe(function (e, args) {\n if (scope.applyDataPermission) {\n var item = this.dataView.getItem(args.rows[0]);\n scope.applyDataPermission(item);\n }\n });\n\n return grid;\n}", "title": "" }, { "docid": "72b9662894907c46c4c43961fe04a6dc", "score": "0.53341365", "text": "getMonitoringColumns() {\n return [\n {\n title: (<Typography variant=\"body2\">Depósito de relaves</Typography>),\n field: 'deposito',\n render: data => this.getNameCell(data),\n customSort: (data1, data2) => Sorting.getNameSortNumber(data1, data2),\n cellStyle: {width: '25%', paddingLeft: '23px'},\n customFilterAndSearch: (event, data) => this.isSearched(data, event),\n searchable: true,\n headerStyle: {paddingLeft: '23px'}\n },\n {\n title: (<Typography variant=\"body2\">Monitoreo de Índices</Typography>),\n field: 'publicWorstIndex',\n render: data => (<IndexStatusIcon status={data.publicWorstIndex} size=\"default\"/>),\n customSort: (data1, data2) => Sorting.getSortNumber(data2, data1, 'publicWorstIndex'),\n searchable: false\n }\n ];\n }", "title": "" }, { "docid": "f73a57ca1664b277bedfe2c2f5ab112e", "score": "0.53293824", "text": "function getSettings(grid) {\r\n var settings = {columns:[]};\r\n grid.find('col').each(function () {\r\n var col = { name: $(this).attr('name'), caption: ($(this).attr('caption') || $(this).attr('name')), width: $(this).width() };\r\n // source\r\n if ($(this).attr('source')) col.source = $(this).attr('source');\r\n\r\n settings.columns.push(col);\r\n });\r\n }", "title": "" }, { "docid": "5aa2bb27cddde1a1520ee2fb61208857", "score": "0.5322646", "text": "function gridAjax(config){\r\n\tvar myGrid = new AXGrid();\r\n myGrid.setConfig({\r\n targetID : config.target===undefined?\"id-grid\":config.target,\r\n theme : \"AXGrid\",\r\n height : \"auto\",\r\n //viewMode: \"grid\", // [\"grid\",\"icon\",\"mobile\"]\r\n // 브라우저 사이즈에 따른 changeGridView 설정\r\n mediaQuery : {\r\n mx:{min:0, max:600}, dx:{min:600}\r\n },\r\n colGroup : config.cols,\r\n\r\n body : {\r\n onclick : config.event\r\n },\r\n page : {\r\n paging : config.paging\r\n }\r\n });\r\n\r\n myGrid.setList(config.ajaxInfo);\r\n}", "title": "" }, { "docid": "1f22a26b6708712ebf14561edd99ee0c", "score": "0.5317904", "text": "function Canton(){\n\t var Cm=null;\n\t var Store=null;\n\t Cm =new Ext.grid.ColumnModel([\n {dataIndex:'CCTN_CODIGO',header:'Codigo',width:150,sortable:true,hidden:true},\n {dataIndex:'CCTN_NOMBRE',header:'Cant\\u00f3n',width:300,sortable:true}\n ]);\n\t \n Store=new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_canton\",\n method:\"selectPage\",\n\t\t\tpagin:true\n }),\n\t\tremoteSort:true,\n reader:new Ext.data.JsonReader({\n\t\tid:'CCTN_CODIGO',\n root:'dataSet',\n totalProperty: 'totalCount'\n\t\t},[\n {name:'CCTN_CODIGO'},\n\t\t\t{name:'CGPRV_CODIGO'},\n {name:'CCTN_NOMBRE'},\n\t\t\t{name:'CCTN_DESCRPCION'},\n\t\t\t{name:'CCTN_ABREVIATURA'}\n ]),\n\t\t sortInfo:{\n field: 'CCTN_NOMBRE',\n direction: 'ASC'\n },\n\t\tbaseParams:{\n\t\t\tkeyword:\"\",\n format:\"JSON\"\n }\n });\n\tthis.getCm = function(){\n return Cm;\n }\n\n this.getStore = function(){\n return Store;\n }\n\n\n}", "title": "" }, { "docid": "3453d45e8761bf1b3ee4513bd987f3d6", "score": "0.5297541", "text": "oneData(rowData) {\n if (this.props.selectedPickerValue === 'row') {\n return (\n <OneRowData data={rowData}/>\n );\n } else if (this.props.selectedPickerValue === 'grid') {\n return (\n <OneGridData data={rowData}/>\n );\n }\n }", "title": "" }, { "docid": "cdd5ffde116b252b322c177be57c52b4", "score": "0.5296456", "text": "function LoadDictItemsGrid(code, where) {\n $('#tbDictionary').datagrid({\n nowrap: false,\n striped: true,\n fit: true,\n border: false,\n url: DictItemsUrl,\n idField: 'Code',\n queryParams: { ParentID: currentDictId, CodeOrName: code },\n columns: [[\n { field: 'Code', title: '代码', width: 120, align: 'left' },\n { field: 'Name', title: '名称', width: 120, align: 'left' },\n\t { field: 'Value', title: '值', width: 120, align: 'left' },\n { field: 'Status', title: '状态', width: 50, align: 'left',\n formatter: function (value, rec) {\n switch (value) {\n case \"1\":\n return '可用';\n default:\n return '无效';\n }\n }\n },\n { field: 'ViewOrder', title: '显示顺序', width: 50, align: 'left' },\n { field: 'UpdateTime', title: '修改日期', width: GetWidth(0.12), align: 'left',\n formatter: function (value, rec) {\n return DateHandler(value);\n }\n }\n\t\t\t]],\n pagination: true,\n pageSize: 15,\n pageList: [10, 15, 20, 30],\n rownumbers: true,\n pageNumber: 1,\n singleSelect: true,\n toolbar: [{\n text: permission.Edit ? '添加' : '',\n iconCls: permission.Edit ? 'icon-add' : \"null\",\n handler: function () {\n if (!currentDictId) {\n alert('请在左边树选择所属字典,再进行操作');\n return;\n }\n SetBackFunc(DictItemAddSuccess);\n SetWin(480, 320, 'CreateDictItem?dictid=' + currentDictId, '添加字典明细');\n }\n },\n '-',\n {\n text: permission.Edit ? '修改' : '',\n iconCls: permission.Edit ? 'icon-edit' : \"null\",\n handler: function () {\n var dictid = getGridSelection('#tbDictionary', 'DictID');\n var code = getGridSelection('#tbDictionary', 'Code');\n\n if (dictid && code) {\n SetBackFunc(DictEditSuccess);\n SetWin(480, 320, 'EditDictItem?DictID=' + dictid + '&Code=' + code, '修改字典项目');\n }\n }\n },\n '-',\n {\n text: permission.Edit ? '删除' : '',\n iconCls: permission.Edit ? 'icon-cut' : \"null\",\n handler: function () {\n DeleteDictItem();\n }\n }]\n ,\n onBeforeLoad: function () {\n RemoveForbidButton();\n }\n });\n}", "title": "" }, { "docid": "776580af018bbd111829debe68ebb893", "score": "0.5296024", "text": "function _setGridColumns() {\n\n if ($scope.page.pageinfo !== undefined) {\n if ($scope.page.pageinfo != null) {\n var isCreate = false, isEdit = false, isDelete = false, isUpdate = false,\n isExport = false, isRefresh = false, isHelp = false, isColSetting = false;\n if ($scope.page.pageinfo.buttons !== undefined) {\n var buttons = $scope.page.pageinfo.buttons;\n if (buttons.create !== undefined)\n isCreate = buttons.create.isvisible;\n if (buttons.delete !== undefined)\n isDelete = buttons.delete.isvisible;\n if (buttons.edit !== undefined) {\n isEdit = buttons.edit.isvisible;\n }\n if (buttons.export !== undefined)\n isExport = buttons.export.isvisible;\n if (buttons.refresh !== undefined)\n isRefresh = buttons.refresh.isvisible;\n if (buttons.help !== undefined)\n isHelp = buttons.help.isvisible;\n if (buttons.colsetting !== undefined)\n isColSetting = buttons.colsetting.isvisible;\n }\n $scope.isAdmin = $rootScope.user.profile.isAdmin;\n $scope.isManager = $rootScope.user.profile.isManager;\n if ($scope.page.pageinfo.uibuttons.edit.IsAllowed || ($rootScope.user.profile.isAdmin && $rootScope.user.profile.isManager))\n isEdit = true;\n else\n isEdit = false;\n if ($scope.page.pageinfo.uibuttons.view.IsAllowed || ($rootScope.user.profile.isAdmin && $rootScope.user.profile.isManager))\n isHelp = true;\n else\n isHelp = false;\n if ($scope.page.pageinfo.uibuttons.delete.IsAllowed || ($rootScope.user.profile.isAdmin && $rootScope.user.profile.isManager))\n isDelete = true;\n else\n isDelete = false;\n if ($scope.page.showFilter) {\n if ($scope.page.pageinfo.uibuttons.filter.IsAllowed || ($rootScope.user.profile.isAdmin && $rootScope.user.profile.isManager)) {\n // $scope.page.showFilter = true;\n if ($scope.page.pageinfo.uibuttons.filter_toggle.IsAllowed || ($rootScope.user.profile.isAdmin && $rootScope.user.profile.isManager)) {\n $scope.page.boxOptions.showFilter = true;\n }\n else {\n $scope.page.boxOptions.showFilter = false;\n }\n }\n else {\n $scope.page.boxOptions.showFilter = false;\n $scope.page.showFilter = false;\n }\n }\n\n\n $scope.page.gridOptions = $rootScope.gridSetupColumns($scope.page.gridOptions,\n $scope.page.pageinfo.columns, $scope.page, isEdit, isDelete, isHelp, isEdit,\n $scope.page.boxOptions.showRowMenu);\n $scope.page.gridOptions2 = angular.copy($scope.page.gridOptions)\n\n\n //re-desiging column as per custom requirements\n if ($scope.page.boxOptions.columnDesign) {\n $scope.page.cssClasses = [];\n var newColumnDefs = [];\n newColumnDefs.push($scope.page.gridOptions.columnDefs[0]);\n for (var c = 0; c < $scope.page.boxOptions.columnDesign.length; c++) {\n var colDesg = $scope.page.boxOptions.columnDesign[c];\n var findCol = $filter('findObj')($scope.page.pageinfo.columns, colDesg.name, 'name')\n if (findCol != null) {\n var newCol = angular.copy(findCol);\n if (colDesg.pinnedRight)\n newCol.pinnedRight = true;\n if (colDesg.pinnedLeft)\n newCol.pinnedLeft = true;\n if (colDesg.cellClass) {\n var cssCl = {};\n cssCl.key = colDesg.name\n cssCl.cellClass = colDesg.cellClass;\n\n if (typeof colDesg['cellClass'] == 'function') {\n newCol[\"cellClass\"] = colDesg.cellClass;\n }\n else {\n $scope.page.cssClasses.push(cssCl)\n newCol[\"cellClass\"] = function (grid, row, col, rowRenderIndex, colRenderIndex) {\n var findCss = $filter('findObj')($scope.page.cssClasses, col.name, 'key')\n if (row.entity.StatusBGClass !== undefined) {\n if (row.entity.StatusBGClass != '')\n return 'status-bg ' + row.entity.StatusBGClass;\n else\n if (findCss != null) {\n return findCss.cellClass;\n }\n }\n\n if (findCss != null) {\n return findCss.cellClass;\n }\n return '';\n }\n }\n }\n\n if (colDesg.visible !== undefined)\n newCol['visible'] = colDesg.visible;\n\n if (colDesg.width !== undefined)\n newCol['width'] = colDesg.width;\n\n if (colDesg.cellTemplate !== undefined)\n newCol['cellTemplate'] = colDesg.cellTemplate;\n\n if (colDesg.cellTemplate !== undefined)\n newCol['cellTemplate'] = colDesg.cellTemplate;\n\n if (colDesg.cellEditableCondition !== undefined) {\n newCol['cellEditableCondition'] = colDesg.cellEditableCondition;\n // newCol['enableCellEdit'] = true;\n }\n\n\n newColumnDefs.push(newCol)\n }\n }\n\n if ($scope.page.boxOptions.columnDesign.length > 0) {\n if (newColumnDefs.length > 0) {\n $scope.page.gridOptions.columnDefs = [];\n $scope.page.gridOptions.columnDefs = newColumnDefs;\n $scope.page.gridOptions2.columnDefs = angular.copy($scope.page.gridOptions.columnDefs);\n\n }\n }\n }\n //console.log($scope.page)\n _addVerifyButton();\n if ($scope.page.boxOptions.customColumns) {\n if ($scope.page.boxOptions.customColumns != null) {\n angular.forEach($scope.page.boxOptions.customColumns, function (col) {\n\n $scope.page[col.name + \"_click\"] = col.click;\n\n var custColumn = {};\n var cellTemplate = \"<div class='ui-grid-cell-contents' title='\" + col.text + \"'><a ng-hide='row.entity.StatusId>0' ng-click='grid.appScope.page.\" + col.name + \"_click(row)' style='cursor:pointer'>\" + col.text + \"</a><a ng-show='row.entity.StatusId>0' ng-click='grid.appScope.page.\" + col.name + \"_click(row)' style='cursor:pointer'>Verified</a></div>\"\n custColumn.name = col.name\n custColumn.field = col.name\n custColumn.cellTemplate = '';\n custColumn['cellTemplate'] = cellTemplate;\n custColumn['visible'] = true;\n custColumn[\"cellClass\"] = function (grid, row, col, rowRenderIndex, colRenderIndex) {\n console.log(row)\n if (row.entity.StatusBGClass != undefined) {\n // row.entity.StatusBGClass='RED-300';\n return 'status-bg ' + row.entity.StatusBGClass;\n }\n }\n if (col.pin)\n custColumn.pinnedRight = true;\n if (col.width)\n custColumn.width = col.width;\n else\n custColumn.width = 100;\n\n //console.log($scope.page.gridOptions.columnDefs);\n $scope.page.gridOptions.columnDefs.push(custColumn);\n $scope.page.gridOptions2.columnDefs = angular.copy($scope.page.gridOptions.columnDefs)\n\n })\n }\n }\n }\n }\n }", "title": "" }, { "docid": "6512efdfedfbb70a6335daae9ca2b63e", "score": "0.529097", "text": "firstUpdated (changedProperties) {\r\n this.grid = this.shadowRoot.querySelector('vaadin-grid')\r\n }", "title": "" }, { "docid": "2f8f705f893c256d39d552501be61968", "score": "0.5286083", "text": "function setTable() {\n $('#reports').datagrid({\n url:'/reportServlet?method=getReportByCondition',\n fitColumns:true,\n width:900,\n method:\"post\",\n loadMsg:\"正在请求数据...\",\n //page division\n pagination:true,\n pageNumber:1,\n pageSize:10,\n pageList:[5,10],\n columns:[[\n {field:'id',title:'举报编号',width:50},\n {field:'ruser',title: '举报用户',width:100},\n {field:'reason',title:'举报理由',width:200},\n {field:'evidence',title:'证据截图',formatter:function (value,row,index) {\n return '<img src=\"img/'+value+'\" alt=\"截图\" width=\"120px\" height=\"150px\" onclick=\"showEvidence(\\''+value+'\\')\">';\n }},\n {field:'action',title:'操作',formatter:function (value,row,index) {\n //row.empno当前员工的编号\n let html = '<span onclick=\"punishUser('+row.id+',true,'+row.ruser+')\" class=\"spanCik\">惩罚</span>&nbsp;&nbsp;<span class=\"spanCik\" onclick=\"deleteReport('+row.id+',false)\">忽略</span>';\n return html;\n }}\n ]]\n });\n}", "title": "" }, { "docid": "80f94b5d234c587dcdb7429c84e50bfd", "score": "0.5277324", "text": "function initialiseShowHideGrids() {\n const shGrids = document.querySelectorAll(SEL_SHOWHIDE_GRID_COMPONENT);\n shGrids.forEach(element => {\n const newSHGrid = new ShowHideGrid(element);\n });\n}", "title": "" }, { "docid": "9804c452449107606f8488484d724d4c", "score": "0.52756846", "text": "function crearGrillaDocumentoBusqueda_regDocumento() {\n $(\"#gridDocumentoBusqueda_regDocumento\").jqGrid({\n /*data: mydata,*/\n datatype: \"local\",\n height: 300,\n width: 860,\n caption: \"Busqueda de documento\",\n colNames: [\"+\", \"Ver\", \"iddocumento\", \"Tipo Documento\", \"C&oacute;digo Documento\", \"Autor\", \"Denominaci&oacute;n\", \"Descripci&oacute;n\", \"prioridad\", \"bindrespuesta\", \"diasrespuesta\", \"bindllegadausuario\", \"idareacioncreacion\", \"idusuariocreacion\", \"Fecha de Creaci&oacute;n\", \"idexpediente\", \"C&oacute;digo Expediente\", \"estado\"],\n colModel: [\n {\n name: 'edit',\n index: 'edit',\n editable: false,\n align: \"center\",\n width: 40,\n search: false,\n hidden: false\n },\n {\n name: 'del',\n index: 'del',\n editable: false,\n align: \"center\",\n width: 40,\n search: false,\n hidden: false\n },\n {\n name: 'iddocumento',\n index: 'iddocumento',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'tipodocumento',\n index: 'tipodocumento',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'codigo',\n index: 'codigo',\n editable: false,\n width: 150,\n hidden: false\n }\n , {\n name: 'usuario',\n index: 'usuario',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'asunto',\n index: 'asunto',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'mensaje',\n index: 'mensaje',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'prioridad',\n index: 'prioridad',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'bindrespuesta',\n index: 'bindrespuesta',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'diasrespuesta',\n index: 'diasrespuesta',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'bindllegadausuario',\n index: 'bindllegadausuario',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'idareacioncreacion',\n index: 'idareacioncreacion',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'idusuariocreacion',\n index: 'idusuariocreacion',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'fecha_envio',\n index: 'fecha_envio',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'idexpediente',\n index: 'idexpediente',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'codigoexpediente',\n index: 'codigoexpediente',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'estado',\n index: 'estado',\n editable: false,\n width: 150,\n hidden: true\n }],\n pager: '#pagerDocumentoBusqueda_regDocumento',\n //onSelectRow: viewGeometry,\n viewrecords: true,\n shrinkToFit: false,\n //multiselect: true\n });\n jQuery(\"#gridDocumentoBusqueda_regDocumento\").jqGrid('filterToolbar', {stringResult: true, searchOnEnter: false});\n }", "title": "" }, { "docid": "ab3cdec97b590d3bd52dca82a48685b6", "score": "0.5275092", "text": "function JqgridCmpnt(girdId, pagerId){\r\n\tconsole.log(girdId);\r\n\tconsole.log(pagerId);\r\n\tthis._gridId = girdId || \"#jqGrid\"\r\n\tthis._pagerId = pagerId \r\n\t//기본 그리드 생성\r\n\tthis._option = {\r\n\t\t\t//url, colModle, height 는 생성 하는 쪽에서 전달\r\n\t\t mtype: \"GET\",\r\n\t\t\t//styleUI : 'Bootstrap',\r\n\t\t datatype: \"json\",\r\n\t\t loadonce: true,\r\n\t\t\t//altRows : true,\r\n\t\t\t//rownumbers: true, // show row numbers\r\n\t //rownumWidth: 35, // the width of the row numbers columns\r\n\t\t\t//multiselect : true,\r\n\t width: 780,\r\n\t height: 250,\r\n\t\t\t//colMenu : true,\r\n\t\t\t//menubar: true,\r\n\t\t\tviewrecords : true,\r\n\t\t\thoverrows : true,\r\n\t rowNum: 20,\t\t\t\t\r\n\t\t\tsortable: true,\t\t\t\t\r\n\t\t pager: pagerId,\r\n\t\t autowidth:true\t\r\n\t}\r\n}", "title": "" }, { "docid": "298c07122cf084e3c5b9eaf6c727fc89", "score": "0.5272312", "text": "function doOnLoad()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tmygrid = new dhtmlXGridObject('gridbox');\r\n\t\t \tmygrid.setImagePath(\"../../../public/imagenes/\"); \r\n\t\t\t//set columns properties\r\n\t\t\tmygrid.setHeader(\"Numero,Fecha Solicitud,Descripción,Fecha Evaluacion\");\r\n\t\t\tmygrid.setInitWidths(\"90,90,230,90\");\r\n\t\t\tmygrid.setColAlign(\"center,center,center,center\");\r\n\t\t\tmygrid.setColTypes(\"link,ed,ed,ed\");\r\n\t\t\tmygrid.setColSorting(\"str,str,str,str\");//nuevo ordenacion\r\n\t\t\tmygrid.setColumnColor(\"#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF\");\r\n\t\t\t//mygrid.loadXML(loadDataURL);\r\n\t\t\tmygrid.setSkin(\"xp\");\r\n\t\t\tmygrid.init();\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "74b1b9bbd1f5258e48666d4aa4ade539", "score": "0.5271981", "text": "function GetColomnData(grid) {\n var visibleColumns = [];\n jQuery.each(grid.columns, function (index) {\n if (this.command == null) {\n if (!this.hidden) {\n var el = '';\n //cek kolom database\n if (jQuery.inArray(this.field, listKolom) !== -1) {\n el = '<div class=\"md-checkbox\">' +\n '<input id=\"cbcolumn-' + index + '\" type=\"checkbox\" class=\"md-check\" value=' + this.field + ' checked >' +\n '<label for=\"cbcolumn-' + index + '\">' +\n '<span></span>' +\n '<span class=\"check\"></span>' +\n '<span class=\"box\"></span>' + this.title +\n '</label>' +\n '</div>';\n gridIndex.hideColumn(this.field);\n }\n else {\n el = '<div class=\"md-checkbox\">' +\n '<input id=\"cbcolumn-' + index + '\" type=\"checkbox\" class=\"md-check\" value=' + this.field + '>' +\n '<label for=\"cbcolumn-' + index + '\">' +\n '<span></span>' +\n '<span class=\"check\"></span>' +\n '<span class=\"box\"></span>' + this.title +\n '</label>' +\n '</div>';\n }\n\n $(\"#content-col\").append(el);\n }\n }\n });\n}", "title": "" }, { "docid": "780ae434956f94f47f2f7c2ee4d1b60c", "score": "0.5269172", "text": "function _11_historialTramite() {\n var window=Ext.create('Ext.window.Window', {\n title : 'Detalles del tr&aacute;mite '+_11_params.NTRAMITE\n ,modal : true\n ,buttonAlign : 'center'\n ,width : 700\n ,height : 400\n ,items : [\n Ext.create('Ext.grid.Panel',{\n height : 190\n ,autoScroll : true\n ,store : new Ext.data.Store( {\n model : 'DetalleMC'\n ,autoLoad : true\n ,proxy : {\n type : 'ajax'\n ,url : _URL_DETALLEMC\n ,extraParams : {\n 'smap1.pv_ntramite_i' : _11_params.NTRAMITE\n }\n ,reader : {\n type : 'json'\n ,root : 'slist1'\n }\n }\n })\n ,columns :[\n {\n header : 'Tr&aacute;mite'\n ,dataIndex : 'NTRAMITE'\n ,width : 60\n }\n ,{\n header : 'No.'\n ,dataIndex : 'NMORDINA'\n ,width : 40\n }\n ,{\n header : 'Fecha de inicio'\n ,xtype : 'datecolumn'\n ,dataIndex : 'FECHAINI'\n ,format : 'd M Y H:i'\n ,width : 130\n }\n ,{\n header : 'Usuario inicio'\n ,dataIndex : 'usuario_ini'\n ,width : 150\n }\n ,{\n header : 'Fecha de fin'\n ,xtype : 'datecolumn'\n ,dataIndex : 'FECHAFIN'\n ,format : 'd M Y H:i'\n ,width : 90\n }\n ,{\n header : 'Usuario fin'\n ,dataIndex : 'usuario_fin'\n ,width : 150\n }\n ,{\n width : 30\n ,menuDisabled : true\n ,dataIndex : 'FECHAFIN'\n ,renderer : function(value) {\n debug(value);\n if(value&&value!=null){\n value='';\n }else{\n value='<img src=\"${ctx}/resources/fam3icons/icons/accept.png\" style=\"cursor:pointer;\" data-qtip=\"Finalizar\" />';\n }\n return value;\n }\n }\n ]\n ,listeners : {\n cellclick : function(grid, td,cellIndex, record, tr, rowIndex, e, eOpts) {\n if(cellIndex<6) {\n Ext.getCmp('inputReadDetalleHtmlVisor').setValue(record.get('COMMENTS'));\n }\n }\n }\n })\n ,Ext.create('Ext.form.HtmlEditor', {\n id : 'inputReadDetalleHtmlVisor'\n ,width : 690\n ,height : 200\n ,readOnly : true\n })\n ]\n });\n centrarVentanaInterna(window.show());\n Ext.getCmp('inputReadDetalleHtmlVisor').getToolbar().hide();\n}", "title": "" }, { "docid": "af136c368daa47d60df540bb97224b19", "score": "0.5261293", "text": "function Cgg_gem_candidato_lite(){\n this.columnModel = new Ext.grid.ColumnModel([\n {\n dataIndex:'CRPER_APELLIDO_PATERNO',\n header:'Primer apellido',\n width:200,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_APELLIDO_MATERNO',\n header:'Segundo apellido',\n width:200,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_NOMBRES',\n header:'Nombres',\n width:200,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_NUM_DOC_IDENTIFIC',\n header:'No. identific.',\n width:200,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_NUMERO_RESIDENCIA',\n header:'No residencia',\n width:200,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_GENERO',\n header:'Genero',\n width:200,\n sortable:true\n }\n ]);\n\t\n /**Ext.data.Store Agrupacion de registros */\n this.store= new Ext.data.Store({\n proxy: new Ext.ux.bsx.SoapProxy({\n url: URL_WS + \"Cgg_gem_candidato\",\n method: \"selectPageLite\"\n }),\n remoteSort:true,\n reader: new Ext.data.JsonReader({\n root:'dataSet',\n totalProperty: 'totalCount'\n }, [\n {\n name:'CUSU_CODIGO'\n },\n\n {\n name:'CRPER_CODIGO'\n },\n\n {\n name:'CRPER_NOMBRES'\n },\n\n {\n name:'CRPER_APELLIDO_PATERNO'\n },\n\n {\n name:'CRPER_APELLIDO_MATERNO'\n },\n\n {\n name:'CRPER_NUM_DOC_IDENTIFIC'\n },\n\n {\n name:'CRPER_NUMERO_RESIDENCIA'\n },\n\n {\n name:'CRPER_GENERO'\n }\n ]),\n sortInfo:{\n field: 'CRPER_APELLIDO_PATERNO',\n direction: 'ASC'\n },\n baseParams: {\n keyword:'',\n format: TypeFormat.JSON\n }\n });\n}", "title": "" }, { "docid": "184f213f96410fd3d39304f1d7bc6a12", "score": "0.52605057", "text": "function detailInit() {\n var height=250;\n angular.element(\"#detailGrid\").css(\"height\",height+\"px\");\n }", "title": "" }, { "docid": "534ec121d401c78b6c6a827fbd893a68", "score": "0.5241768", "text": "function Cgg_res_miembro_usuario(){\n var cmCgg_res_miembro_usuario = null;\n var gsCgg_res_miembro_usuario = null\n\n cmCgg_res_miembro_usuario = new Ext.grid.ColumnModel([\n {\n dataIndex:'CRPER_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CUSU_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CUSU_EMPRESA',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CRDID_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CUSU_NOMBRE_USUARIO',\n header:'Nombre Usuario',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'DOCUMENTO',\n header:'Tipo Documento',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_NUM_DOC_IDENTIFIC',\n header:'Num. Documento',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_NOMBRES',\n header:'Nombre',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'APELLIDO',\n header:'Apellido',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CRPER_FECHA_NACIMIENTO',\n header:'Fecha Nacimiento',\n width:150,\n sortable:true,\n renderer:truncDate\n },\n\n {\n dataIndex:'CRPER_GENERO',\n header:'Genero',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CPRR_CODIGO',\n header:'Nombre',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'PARROQUIA',\n header:'Parroquia',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CCTN_CODIGO',\n header:'Nombre',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CANTON',\n header:'Canton',\n width:150,\n sortable:true\n }\n ]);\n /**\n * Ext.data.Store Agrupacion de registros de la tabla Cgg_res_comite por un campo especifico.\n */\n gsCgg_res_miembro_usuario = new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_res_miembro_comite\",\n method:\"selectUsuarioMiembro\",\n pagin:true\n }),\n remoteSort:true,\n reader:new Ext.data.JsonReader({\n id:'CRPER_CODIGO',\n root:'dataSet',\n totalProperty: 'totalCount'\n },[\n {\n name:'CRPER_CODIGO'\n },\n\n {\n name:'CUSU_CODIGO'\n },\n\n {\n name:'CUSU_NOMBRE_USUARIO'\n },\n\n {\n name:'CUSU_EMPRESA'\n },\n\n {\n name:'CRDID_CODIGO'\n },\n\n {\n name:'DOCUMENTO'\n },\n\n {\n name:'CRPER_NUM_DOC_IDENTIFIC'\n },\n\n {\n name:'CRPER_NOMBRES'\n },\n\n {\n name:'APELLIDO'\n },\n\n {\n name:'CRPER_FECHA_NACIMIENTO'\n },\n\n {\n name:'CRPER_GENERO'\n },\n\n {\n name:'CPRR_CODIGO'\n },\n\n {\n name:'PARROQUIA'\n },\n\n {\n name:'CCTN_CODIGO'\n },\n\n {\n name:'CANTON'\n }\n ]),\n sortInfo:{\n field: 'CRPER_CODIGO',\n direction: 'ASC'\n },\n baseParams:{\n keyword:\"\",\n format:\"JSON\"\n }\n });\n this.getStoreMiembroUsuario=function(){\n return gsCgg_res_miembro_usuario;\n }\n this.getColumnMiembroUsuario =function(){\n return cmCgg_res_miembro_usuario;\n }\n}", "title": "" }, { "docid": "8fc09bd3bc60f43e411add8bb4de0d6e", "score": "0.523998", "text": "function Cgg_jur_acuerdo(){\n var cmCgg_jur_acuerdo = null;\n var gsCgg_jur_acuerdo = null\n\n cmCgg_jur_acuerdo = new Ext.grid.ColumnModel([\n {\n dataIndex:'CJACU_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'CRPJR_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n {\n dataIndex:'CJACU_NUMERO',\n header:'Numero',\n width:150,\n sortable:true\n },\n\n\n {\n dataIndex:'RAZON_SOCIAL',\n header:'Raz\\u00f3n Social',\n width:200,\n sortable:true,\n renderer:\n function(value,metadata,record)\n {\n if (value.length >0)\n {\n return value;\n }\n else\n {\n return record.get('PERSONA');\n }\n\n }\n },\n {\n dataIndex:'PERSONA',\n header:'Tipo',\n width:50,\n sortable:true,\n renderer:\n function(value,metaData,record)\n {\n if (record.data.PERSONA) {\n metaData.css = 'iconPersonaNatural';\n\n }\n else\n {\n\n metaData.css = 'iconPersonaJuridica';\n\n }\n return '';\n }\n },\n\n\n\n {\n dataIndex:'CRPER_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n\n {\n dataIndex:'CJTPR_CODIGO',\n header:'Codigo',\n width:150,\n sortable:true,\n hidden:true\n },\n\n {\n dataIndex:'NOMBRE_PROCESO',\n header:'Nombre Proceso',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CJACU_ANIO',\n header:'Anio',\n width:150,\n sortable:true\n },\n {\n dataIndex:'CJACU_COSTO',\n header:'Costo',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CJACU_OBJETO',\n header:'Objeto',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CJACU_FECHA_SUSCRIPCION',\n header:'Fecha suscripcion',\n width:150,\n sortable:true,\n renderer:truncDate\n },\n\n {\n dataIndex:'CJACU_FECHA_INICIO',\n header:'Fecha inicio',\n width:150,\n sortable:true,\n renderer:truncDate\n },\n\n {\n dataIndex:'RESPONSABLE',\n header:'Responsable',\n width:150,\n sortable:true\n },\n\n {\n dataIndex:'CJACU_ESTADO_EJECUCION',\n header:'Estado ejecucion',\n width:150,\n sortable:true,\n renderer:function(inCjacu_estado_ejecucion) {\n var result = \"\";\n switch (inCjacu_estado_ejecucion) {\n case 0:\n result = 'PLANTEADO';\n break;\n case 1:\n result = 'EN PROCESO';\n break;\n case 2:\n result = 'FINALIZADO';\n break;\n case 3:\n result = 'SUSPENDIDO';\n break;\n\n default:\n result =NO_DATA_MESSAGE;\n break;\n }\n return result;\n\n }\n },\n {\n dataIndex:'CJACU_FECHA_FINALIZACION',\n header:'Fecha finalizacion',\n width:150,\n sortable:true,\n renderer:truncDate\n },\n\n {\n dataIndex:'CJACU_TIPO',\n header:'Tipo',\n width:150,\n sortable:true,\n renderer:function(inCjacu_tipo) {\n var result = \"\";\n switch (inCjacu_tipo) {\n case 0:\n result = 'CONVENIO';\n break;\n case 1:\n result = 'CONTRATO';\n break;\n default:\n result =NO_DATA_MESSAGE;\n break;\n }\n return result;\n\n }\n },\n\n {\n dataIndex:'CJACU_TIPO_PERSONA',\n header:'Tipo persona',\n width:150,\n sortable:true,\n renderer:function(inCjacu_tipo_adversario) {\n var result = \"\";\n switch (inCjacu_tipo_adversario) {\n case 0:\n result = 'PERSONA NATURAL';\n break;\n case 1:\n result = 'PERSONA JURIDICA';\n break;\n default:\n result =NO_DATA_MESSAGE;\n break;\n }\n return result;\n\n }\n }\n ]);\n /**\n * Ext.data.Store Agrupacion de registros de la tabla Cgg_res_comite por un campo especifico.\n */\n gsCgg_jur_acuerdo = new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_jur_acuerdo\",\n method:\"selectPageAcuerdo\",\n pagin:true\n }),\n remoteSort:true,\n reader:new Ext.data.JsonReader({\n id:'CRPER_CODIGO',\n root:'dataSet',\n totalProperty: 'totalCount'\n },[\n {\n name:'CJACU_CODIGO'\n },\n\n {\n name:'CRPJR_CODIGO'\n },\n\n {\n name:'RAZON_SOCIAL'\n },\n\n {\n name:'CRPER_CODIGO'\n },\n\n {\n name:'PERSONA'\n },\n\n {\n name:'CJTPR_CODIGO'\n },\n\n {\n name:'NOMBRE_PROCESO'\n },\n\n {\n name:'CJACU_ANIO'\n },\n\n {\n name:'CJACU_COSTO'\n },\n\n {\n name:'CJACU_NUMERO'\n },\n\n {\n name:'CJACU_OBJETO'\n },\n\n {\n name:'CJACU_FECHA_SUSCRIPCION'\n },\n\n {\n name:'CJACU_FECHA_INICIO'\n },\n\n {\n name:'RESPONSABLE'\n },\n\n {\n name:'CJACU_ESTADO_EJECUCION'\n },\n\n {\n name:'CJACU_FECHA_FINALIZACION'\n },\n\n {\n name:'CJACU_TIPO'\n },\n\n {\n name:'CJACU_TIPO_PERSONA'\n },\n {\n name:'PAGOS'\n }\n ]),\n sortInfo:{\n field: 'CRPER_CODIGO',\n direction: 'ASC'\n },\n baseParams:{\n keyword:\"\",\n format:\"JSON\"\n }\n });\n\n this.getStoreAcuerdo=function(){\n return gsCgg_jur_acuerdo;\n }\n this.getColumnAcuerdo =function(){\n return cmCgg_jur_acuerdo;\n }\n}", "title": "" }, { "docid": "953ef86862f85a882e70cc0ec6632003", "score": "0.5239143", "text": "function ad_group_master_tbl(defaultValues){\n\t\tvar privateState = {};\n\t\t\tprivateState.admin_flag = defaultValues?(defaultValues[\"admin_flag\"]?defaultValues[\"admin_flag\"]:null):null;\n\t\t\tprivateState.createdby = defaultValues?(defaultValues[\"createdby\"]?defaultValues[\"createdby\"]:null):null;\n\t\t\tprivateState.createddatetime = defaultValues?(defaultValues[\"createddatetime\"]?defaultValues[\"createddatetime\"]:null):null;\n\t\t\tprivateState.group_id_pk = defaultValues?(defaultValues[\"group_id_pk\"]?defaultValues[\"group_id_pk\"]:null):null;\n\t\t\tprivateState.group_name = defaultValues?(defaultValues[\"group_name\"]?defaultValues[\"group_name\"]:null):null;\n\t\t\tprivateState.lastupdatedby = defaultValues?(defaultValues[\"lastupdatedby\"]?defaultValues[\"lastupdatedby\"]:null):null;\n\t\t\tprivateState.lastupdateddatetime = defaultValues?(defaultValues[\"lastupdateddatetime\"]?defaultValues[\"lastupdateddatetime\"]:null):null;\n\t\t\tprivateState.softdeleteflag = defaultValues?(defaultValues[\"softdeleteflag\"]?defaultValues[\"softdeleteflag\"]:null):null;\n\t\t//Using parent contructor to create other properties req. to kony sdk\t\n\t\t\tBaseModel.call(this);\n\n\t\t//Defining Getter/Setters\n\t\t\tObject.defineProperties(this,{\n\t\t\t\t\"admin_flag\" : {\n\t\t\t\t\tget : function(){return privateState.admin_flag},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['admin_flag'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"createdby\" : {\n\t\t\t\t\tget : function(){return privateState.createdby},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['createdby'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"createddatetime\" : {\n\t\t\t\t\tget : function(){return privateState.createddatetime},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['createddatetime'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"group_id_pk\" : {\n\t\t\t\t\tget : function(){return privateState.group_id_pk},\n\t\t\t\t\tset : function(val){throw Error(\"group_id_pk cannot be changed.\"); },\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"group_name\" : {\n\t\t\t\t\tget : function(){return privateState.group_name},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['group_name'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"lastupdatedby\" : {\n\t\t\t\t\tget : function(){return privateState.lastupdatedby},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['lastupdatedby'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"lastupdateddatetime\" : {\n\t\t\t\t\tget : function(){return privateState.lastupdateddatetime},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['lastupdateddatetime'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t\t\"softdeleteflag\" : {\n\t\t\t\t\tget : function(){return privateState.softdeleteflag},\n\t\t\t\t\tset : function(val){\n\t\t\t\t\t\tsetterFunctions['softdeleteflag'].call(this,val,privateState);\n\t\t\t\t\t},\n\t\t\t\t\tenumerable : true,\n\t\t\t\t},\n\t\t\t});\n\n\t}", "title": "" }, { "docid": "f822f7ae6667a6306e5d61ed470b43a8", "score": "0.5238647", "text": "function generateTable(username, category = 'equity') {\n\n {\n grid.updateConfig({\n server: {\n url: 'http://127.0.0.1:5000/' + USERNAME,\n then: data => Object.values(data.portfolio[category]).map(movie =>\n [movie.name, Math.round(movie.price * 100) / 100, movie.quantity]\n )\n }\n }).forceRender();\n }\n\n}", "title": "" }, { "docid": "726469d45e6fc9d9cfee9018a7b5dadf", "score": "0.5234557", "text": "function GridResultados() {\n\n this.$id = $(\"#resultados\")\n\n this.kfuente_datos = null\n this.kgrid = null\n this.init()\n}", "title": "" }, { "docid": "a1c01f27f0e344a433fafc3be7311786", "score": "0.5233866", "text": "init() {\n for (let ligne = 0; ligne < this.nb_grille; ligne++) {\n this.surface[ligne] = []\n for (let colonne = 0; colonne <= this.nb_grille - 1; colonne++) {\n $(\"#conteneur-de-jeux\").append(`<div data-ligne=\"${ligne}\" data-colonne=\"${colonne}\" id=\"grid_${ligne}_${colonne}\" class=\"grid\"></div>`);\n this.surface[ligne][colonne] = {\n element: null,\n obstacle: null,\n joueur: null,\n existUnJoueur: null,\n arme: {\n id: null,\n nom: null,\n image: null,\n degat: null\n },\n aUneArme: null,\n peutSeDeplacer: null\n }\n }\n }\n this.joueur_actuel = this.joueurs[Math.floor(Math.random() * this.joueurs.length)];\n $(\".grid\").width(760 / this.nb_grille)\n .height(760 / this.nb_grille);\n this.informationsInitialsJoueurs();\n }", "title": "" }, { "docid": "8d5db08b541adfba3eab22c5ab88079c", "score": "0.5232067", "text": "function setTable() {\n\t$('#tb_list').DataTable({\n\t\t\"order\": [[0, \"asc\"]],\n\t\t\"processing\": true,\n\t\t\"serverSide\": true,\n\t\t\"bFilter\": false,\n\t\tajax: {\n\t\t\t'url': base_url + \"kelas/load_grid\",\n\t\t\t'type': 'GET',\n\t\t\t'data': function (d) {\n\t\t\t\td.param = $('#hid_param').val();\n\t\t\t}\n\t\t},\n\t});\n}", "title": "" }, { "docid": "da5b1dbb85084d4070e3cae31303b4ca", "score": "0.52287424", "text": "function mostrarMaterialesDeLaboratorio(){\n \n var patronModulo='mostrarMaterialesDeLaboratorio';\n var parametros='';\n parametros+='p1='+patronModulo;\n tablaMaterialesDeLaboratorioME=new dhtmlXGridObject('Div_MaterialesDeLaboratorio');\n tablaMaterialesDeLaboratorioME.setImagePath(\"../../../imagen/dhtmlxgrid/imgs/\");\n tablaMaterialesDeLaboratorioME.setSkin(\"dhx_skyblue\");\n tablaMaterialesDeLaboratorioME.enableRowsHover(true,'grid_hover');\n \n var filtroPeril = \"<input type='text' id='idFiltroPerfil' style='width:90%;font-size:8pt;font-family:Tahoma; ' onkeyup=\\\"buscarFiltrarMaterialesLaboratorio();\\\" />\"; \n var header = [\"#text_filter\", ,filtroPeril, ,\"#select_filter\"]; \t\n\n tablaMaterialesDeLaboratorioME.attachHeader(header);\n \n tablaMaterialesDeLaboratorioME.attachFooter(\" , Nº , #stat_count , , #stat_count \");\n // tablaMaterialesDeLaboratorioME.attachFooter(\" , , ,Nº , ,#stat_count\");\n\n // \n // tablaMaterialesDeLaboratorioME.attachFooter(\" MATERIALES DE LABORATORIO ,#cspan, #cspan , #cspan , #stat_count\");\n //tablaMaterialesDeLaboratorioME.attachFooter(\" MATERIALES DE LABORATORIO \\\\, , , #cspan , #stat_count \");\n // tablaMaterialesDeLaboratorioME.attachFooter(\"A ,#cspan , #cspan , #cspan , #cspan\");\n // tablaMaterialesDeLaboratorioME.attachFooter(\",,#cspan,<span style=color:#2200FF ;background:#F90909><H4><B>Nº Materiales de Laboratorio =</B></H4></span>\\\\,\\\\,#stat_count\");\n \n // \n // \n // \n tablaMaterialesDeLaboratorioME.attachEvent(\"onRowSelect\",\n \n function(fil,col){\n \n cargarDetalleProductoSeleccionado(fil,col);\n $('div_NuevoMaterialLaboratorio').show();\n $('div_GuardarDetalleMaterialLaboratorio').hide();\n // $('div_AdjuntarFotoMaterialLaboratorio').hide();\n \n $('div_AdjuntarFotoMaterialLaboratorio').show();\n \n \n $('div_EditarDetalleMaterialLaboratorio').show();\n \n \n $('cboTipoMaterialLabo').disabled=true;\n $('txtDescripcionExaLabo').readOnly=true;\n mostrarImagenMaterialLaboratorio();\n \n // $('div_Mensaje_MaterialesLabo').value='';\n \n $('div_Mensaje_MaterialesLabo').innerHTML='<p style=\"color: blue; font-weight: bold;\"> </p>';\n \n // $('div_Mensaje_MaterialesLabo').hide();\n \n \n\n } \n \n);\n \n \n //////////para cargador peche////////////////\n contadorCargador++;\n var idCargador=contadorCargador;\n tablaMaterialesDeLaboratorioME.attachEvent(\"onXLS\", function(){\n cargadorpeche(1,idCargador);\n });\n tablaMaterialesDeLaboratorioME.attachEvent(\"onXLE\", function(){\n cargadorpeche(0,idCargador);\n });\n \n /////////////fin cargador ///////////////////////\n \n \n \n tablaMaterialesDeLaboratorioME.setSkin(\"dhx_skyblue\");\n tablaMaterialesDeLaboratorioME.init();\n tablaMaterialesDeLaboratorioME.loadXML(pathRequestControl+'?'+parametros, function(){\n \n //setColortablaExamenesLaboratorio();\n \n });\n \n \n}", "title": "" }, { "docid": "cdaed4cb3da4e4383cd3807014455c73", "score": "0.5226239", "text": "function Residencia(){\n /**\n * Ext.grid.ColumnModel Define el modelo de columnas para el objeto\n */\n var gsCgg_residencia = new Ext.data.Store({\n proxy:new Ext.ux.bsx.SoapProxy({\n url:URL_WS+\"Cgg_pais\",\n method:\"selectAll\",\n pagin:false\n }),\n remoteSort:false,\n reader:new Ext.data.JsonReader({\n },[\n {\n name:'CPAIS_CODIGO'\n },\n\n {\n name:'CPAIS_NOMBRE'\n },\n\n {\n name:'CPAIS_DESCRIPCION'\n }\n ]),\n baseParams:{\n format:TypeFormat.JSON\n }\n });\n this.getStore=function(){\n return gsCgg_residencia;\n }\n}", "title": "" }, { "docid": "369872f127f794326087e2e761efa69f", "score": "0.5225054", "text": "buildGrid() {\n this.grid = document.createElement('table');\n this.grid.classList.add('grid');\n if (this.selectable) {\n this.grid.classList.add('selectable');\n }\n }", "title": "" }, { "docid": "80c955e108910ba8770c0fa089d4cd81", "score": "0.522408", "text": "function ObjectThatUnderstandSetGrid() { }", "title": "" }, { "docid": "b34fdc5b6bb6e3b60ef67241a4065185", "score": "0.5221132", "text": "function jqGridProcessTemplate(actioncode, tempid, languageId) {\n jQuery(TableProcessNameDetail).jqGrid({\n url: '/OPS/GetTemplate',\n datatype: \"json\",\n postData: {\n opActionCode: actioncode,\n opTempId: tempid,\n opLanguage: languageId\n },\n width: null,\n shrinkToFit: false,\n height: 250,\n colModel: [\n { name: 'OpNameId', index: 'OpNameId', hidden: true },\n { name: 'OpNameLan', index: 'OpNameLan', hidden: true },\n { name: 'OpName', index: 'OpName', label: \"Template Name\", width: 700, formatter: getTemplateName },\n ],\n rowList: [10, 20, 30],\n pager: '#pager4',\n sortname: 'OpNameLan',\n viewrecords: true,\n loadonce: true,\n multiselect: true,\n sortorder: \"asc\",\n caption: \"Process Template\",\n gridview: true,\n autowidth: false,\n });\n function getTemplateName(cellvalue, option, rowObject) {\n return rowObject.OpNameId + ' - ' + rowObject.OpNameLan;\n }\n}", "title": "" }, { "docid": "bfdb54d60cc10272d870f76eb7127ab2", "score": "0.5221029", "text": "function newBoardGrid() {\n boardGrid = new Muuri('.board', {\n layoutDuration: 400,\n layoutEasing: 'ease',\n dragEnabled: true,\n dragSortInterval: 0,\n dragStartPredicate: {\n handle: '.board-column-header'\n },\n dragReleaseDuration: 400,\n dragReleaseEasing: 'ease'\n });\n\n\n return boardGrid;\n}", "title": "" }, { "docid": "cb80a3fa20ba1380851a2bbb7f373c0a", "score": "0.5219693", "text": "function UpdateGrid() {\n var urlAdaptor = new ej.data.UrlAdaptor();\n var grid = document.querySelector('#AcaSessGrid').ej2_instances[0];\n grid.dataSource = new ej.data.DataManager({\n url: \"/AcaSessions/DataSource\",\n updateUrl: \"/AcaSessions/Update\",\n adaptor: urlAdaptor\n });\n}", "title": "" }, { "docid": "7d4b81565ef9eaf4078952c2539a0664", "score": "0.52191037", "text": "renderGrid() {\r\n let gridProps = {\r\n columns: this.state.columns,\r\n isRemoteData: false,\r\n gridData: this.state.feedTypeData,\r\n selectRowMode: \"none\",\r\n editClick: this.editFeedType,\r\n deleteClick: this.deleteFeedType\r\n }\r\n return (<Grid {...gridProps} />);\r\n }", "title": "" }, { "docid": "b9480884b61c1c0bc3358533778004bd", "score": "0.5218835", "text": "_cacheRowDefs() {\n this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);\n this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);\n this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n // After all row definitions are determined, find the row definition to be considered default.\n const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n if (!this.multiTemplateDataRows && defaultRowDefs.length > 1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMultipleDefaultRowDefsError();\n }\n this._defaultRowDef = defaultRowDefs[0];\n }", "title": "" }, { "docid": "b9480884b61c1c0bc3358533778004bd", "score": "0.5218835", "text": "_cacheRowDefs() {\n this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);\n this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);\n this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n // After all row definitions are determined, find the row definition to be considered default.\n const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n if (!this.multiTemplateDataRows && defaultRowDefs.length > 1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMultipleDefaultRowDefsError();\n }\n this._defaultRowDef = defaultRowDefs[0];\n }", "title": "" }, { "docid": "ee98532083fb5c31b4bc74d2db055457", "score": "0.52144223", "text": "function siguienteGrid() {\r\n if (!winIns1) {\r\n winIns1 = new Ext.Window({\r\n width: 450,\r\n y: 170,\r\n closable: false,\r\n draggable: false,\r\n autoHeight: true,\r\n resizable: false,\r\n title: 'Selecci&oacute;n de los M&oacute;dulos a instalar'\r\n });\r\n }\r\n winIns1.add(panel);\r\n store.reload();\r\n winIns1.doLayout();\r\n winIns1.show();\r\n }", "title": "" }, { "docid": "d6f25e9634dc95891188fcbbc2b40e6f", "score": "0.520595", "text": "function crearGrilla_regDocumento() {\n $(\"#grid_regDocumento\").jqGrid({\n /*data: mydata,*/\n datatype: \"local\",\n height: 300,\n caption: \"Lista Documento\",\n colNames: [\"Ver\", \"Del\", \"iddocumento\", \"Tipo Documento\", \"C&oacute;digo Documento\", \"Denominaci&oacute;n\", \"Descripci&oacute;n\", \"prioridad\", \"bindrespuesta\", \"diasrespuesta\", \"bindllegadausuario\", \"idareacioncreacion\", \"idusuariocreacion\", \"Fecha de Creaci&oacute;n\", \"idexpediente\", \"C&oacute;digo Expediente\", \"estado\"],\n colModel: [\n {\n name: 'edit',\n index: 'edit',\n editable: false,\n align: \"center\",\n width: 40,\n search: false,\n hidden: false\n },\n {\n name: 'del',\n index: 'del',\n editable: false,\n align: \"center\",\n width: 40,\n search: false,\n hidden: true\n },\n {\n name: 'iddocumento',\n index: 'iddocumento',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'tipodocumento',\n index: 'tipodocumento',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'codigo',\n index: 'codigo',\n editable: false,\n width: 300,\n hidden: false\n }, {\n name: 'asunto',\n index: 'asunto',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'mensaje',\n index: 'mensaje',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'prioridad',\n index: 'prioridad',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'bindrespuesta',\n index: 'bindrespuesta',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'diasrespuesta',\n index: 'diasrespuesta',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'bindllegadausuario',\n index: 'bindllegadausuario',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'idareacioncreacion',\n index: 'idareacioncreacion',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'idusuariocreacion',\n index: 'idusuariocreacion',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'fecha_envio',\n index: 'fecha_envio',\n editable: false,\n width: 150,\n hidden: false\n }, {\n name: 'idexpediente',\n index: 'idexpediente',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'codigoexpediente',\n index: 'codigoexpediente',\n editable: false,\n width: 150,\n hidden: true\n }, {\n name: 'estado',\n index: 'estado',\n editable: false,\n width: 150,\n hidden: true\n }],\n pager: '#pager_regDocumento',\n //onSelectRow: viewGeometry,\n viewrecords: true,\n shrinkToFit: false,\n //multiselect: true\n });\n jQuery(\"#grid_regDocumento\").jqGrid('filterToolbar', {stringResult: true, searchOnEnter: false});\n }", "title": "" }, { "docid": "1431c853758fb1278c260fa653312691", "score": "0.52040476", "text": "function mackGrid() {\n\n \t// clear the old canvas if the user try to make a new one.\n\t\tgrid.children().remove();\n\n \tlet\tgridHeight = $(\"#gridHeight\").val(),// get the height that assigned by the user.\n \t\tgridWidth = $(\"#gridWidth\").val();\t// get the width that assigned by the user.\n\n \t// define a loop that create the grid\n \tfor(let i = 0; i < gridHeight; i++){\n \t\tgrid.append(\"<tr></tr>\"); // Create the table rows.\n\n \t\tfor(let x = 0; x < gridWidth; x++){\n \t\t\tgrid.children().last().append(\"<td></td>\"); // Create the table colums.\n \t\t}\n \t}\n }", "title": "" }, { "docid": "df8881d3d7d14a2afc13cdcadb37ba7a", "score": "0.520399", "text": "static addGrid(grid) {\n const cc = AGGrid.gridContext[AGGrid.gridContext.length - 1];\n cc.push(grid);\n }", "title": "" }, { "docid": "08d3cd268792e0af630f7765d8189ac2", "score": "0.52033585", "text": "static getDefaultMeasure(params) {\n const obj = {};\n smoSerialize.serializedMerge(SmoMeasure.defaultAttributes, SmoMeasure.defaults, obj);\n smoSerialize.serializedMerge(SmoMeasure.defaultAttributes, params, obj);\n // Don't copy column-formatting options to new measure in new column\n smoSerialize.serializedMerge(SmoMeasure.formattingOptions, SmoMeasure.defaults, obj);\n // Don't redisplay tempo for a new measure\n const rv = new SmoMeasure(obj);\n if (rv.tempo && rv.tempo.display) {\n rv.tempo.display = false;\n }\n return rv;\n }", "title": "" }, { "docid": "442bc41cac707e3359f35fc176d1ce46", "score": "0.52009416", "text": "function BindDataToJqGridOpsModal(styleCode, styleSize, styleColor, revNo, edition) {\n jQuery(IdTableOpsModal).jqGrid({\n url: '/OPS/GetOpMaster',\n postData: {\n styleCode: styleCode,\n styleSize: styleSize,\n styleColor: styleColor,\n revNo: revNo,\n edition: edition\n },\n datatype: \"json\",\n sortname: 'Edition',\n sortorder: 'DESC',\n loadonce: false,\n height: 150,\n width: null,\n shrinkToFit: false,\n viewrecords: false,\n rowNum: 20,\n rowList: [10, 20, 30, 40],\n pager: IdPaperOpsModal,\n gridview: true,\n colModel: [\n { name: 'Edition2', index: 'Edition2', width: 60, label: arrOpsColname.EDITION },\n { name: 'StyleCode', index: 'StyleCode', width: 100, label: arrOpsColname.STYLECODE },\n { name: 'StyleSize', index: 'StyleSize', width: 80, label: arrOpsColname.STYLESIZE },\n { name: 'StyleColorWays', index: 'StyleColorWays', width: 140, label: arrOpsColname.STYLECOLORSERIAL },\n { name: 'RevNo', index: 'RevNo', width: 80, label: arrOpsColname.REVNO, align: 'center' },\n { name: 'OpRevNo', index: 'OpRevNo', width: 90, label: arrOpsColname.OPREVNO, align: 'center' },\n { name: 'MxPackage', index: 'MxPackage', width: 280, label: \"MxPackage\", align: 'center' },\n { name: 'OpTime', index: 'OpTime', width: 80, label: arrOpsColname.OPTIME, align: 'center' },\n { name: 'ManCount', index: 'ManCount', width: 80, label: arrOpsColname.MANCOUNT, align: 'center' },\n { name: 'MachineCount', index: 'MachineCount', width: 110, label: arrOpsColname.MACHINECOUNT, align: 'center' },\n { name: 'OpCount', index: 'OpCount', width: 95, label: arrOpsColname.OPCOUNT, align: 'center' },\n { name: 'ConfirmChk', index: 'ConfirmChk', width: 100, label: arrOpsColname.CONFIRMCHK, align: 'center' },\n { name: 'OpPrice', index: 'OpPrice', width: 90, label: arrOpsColname.OPPRICE, align: 'center' },\n { name: 'LastUpdateTime', index: 'LastUpdateTime', width: 250, label: arrOpsColname.LASTUPDATEDATE, align: 'center', formatter: convertDateToString },\n { name: 'Remarks', index: 'Remarks', width: 250, label: arrOpsColname.REMARKS, align: 'center' },\n { name: 'Edition', index: 'Edition', hidden: true },\n { name: 'Language', index: 'Language', hidden: true },\n { name: 'StyleColorSerial', index: 'StyleColorSerial', hidden: true }\n ],\n loadError: function (xhr, status, err) {\n HandleException(xhr, status, err);\n },\n onSortCol: function (index, idxcol) {\n if (this.p.lastsort >= 0 && this.p.lastsort !== idxcol\n && this.p.colModel[this.p.lastsort].sortable !== false) {\n $(this.grid.headers[this.p.lastsort].el).find(\">div.ui-jqgrid-sortable>span.s-ico\").hide();\n $(this.grid.headers[this.p.lastsort].el).removeClass('ui-state-highlight');\n }\n $(this.grid.headers[idxcol].el).addClass('ui-state-highlight');\n },\n onSelectRow: function (rowid) {\n const row = $(IdTableOpsModal).jqGrid(\"getRowData\", rowid);\n //window.DesImportOpmt = row;\n\n const processCount = row.OpCount;\n const machineCount = row.MachineCount;\n const workerCount = row.ManCount;\n const time = row.OpTime;\n\n //Choose \"Copy the select plan\" and\n //check copy patter and Bom, copy tool linking\n $(\"#rdCopySelectPlan\").prop(\"checked\", true);\n CheckCopyPatterntBomToolLinking(true);\n HideButtonTranslateLanguage(false);\n\n SetValueOpDetailModal(processCount, machineCount, workerCount, time);\n\n //Select language by language of opmt\n const language = MapLanguageToFlag(row.Language);\n console.log(language);\n\n document.getElementById(\"drpLanguageOpMaster\").value = language;\n }\n });\n\n //navButtons\n jQuery(IdTableOpsModal).jqGrid(\"navGrid\", IdPaperOpsModal, {\n add: false,\n view: false,\n viewicon: 'ace-icon fa fa-search-plus grey',\n edit: false,\n del: false,\n search: false,\n searchicon: 'ace-icon fa fa-search orange',\n refresh: false,\n refreshicon: 'ace-icon fa fa-refresh green'\n });\n jQuery(IdTableOpsModal).jqGrid('bindKeys');\n\n $(\"option[value=40]\").text(arrButtonAction.all);\n\n function convertDateToString(cellValue, options, rowObject) {\n if (!$.isEmptyObject(rowObject.LastUpdateTime)) {\n const newDate = eval((\"new \" + rowObject.LastUpdateTime).replace(/\\//g, \"\"));\n return newDate;\n }\n return \"\";\n }\n}", "title": "" }, { "docid": "2f49d281d899dfd6f00edc2ed758f3f0", "score": "0.5198931", "text": "function confgrid(traza) {\n\tbtnExportar.disabled = true,\n\tbtnAvanzado.disabled = true,\n\tExt.getBody().mask(perfil.etiquetas.confMaskMsg);\n\tExt.Ajax.request({\n\t\turl : 'confgrid',\n\t\tparams : {tipo_traza : traza},\n\t\tcallback : function(options, success, response) {\n\t\t\tresponseData = Ext.decode(response.responseText);\n\t\t\tif (responseData.grid) {\n\t\t\t\tvar newcm = Ext.UCID.generaDinamico('cm', responseData.grid.columns);\n\t\t\t\tstoregridtraza = new Ext.data.Store({\n\t\t\t\t\turl : 'cargargrid',\n\t\t\t\t\tlisteners : {'load' : function() {gdGestiontraza.getSelectionModel().selectFirstRow()}\n\t\t\t\t\t},\n\t\t\t\t\t\treader : new Ext.data.JsonReader({\n\t\t\t\t\t\ttotalProperty: 'cantidad_trazas',\n\t\t\t\t\t\troot : 'trazas',\n\t\t\t\t\t\tid : 'idtraza'\n\t\t\t\t\t},Ext.UCID.generaDinamico('rdcampos', responseData.grid.campos))\n\t\t\t\t});\n\t\t\t\tExt.getBody().unmask();\n\t\t\t\tif (newcm && storegridtraza)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tgdGestiontraza.reconfigure(storegridtraza, newcm);\n\t\t\t\t\tgdGestiontraza.getBottomToolbar().bind(storegridtraza);\n\t\t\t\t\tgdGestiontraza.loadMask = new Ext.LoadMask(Ext.getBody(), {msg : perfil.etiquetas.loadMaskMsg, store : storegridtraza});\n\t\t\t\t\tcargar(storegridtraza, combotipo.getRawValue(), combotipo.getValue(), combocategoria.getValue(), fechaDesde.getRawValue(), fechaHasta.getRawValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "09e4a3c3fa133afac2b7eb382e6ff72a", "score": "0.51987696", "text": "function createGrid() {\n var $div = $('<div ui-grid=\"' + $scope.content.name + '\" '\n + 'id=\"' + $scope.content.name + '\" '\n + (USE_PAGINATION ? PAGINATION_DIRECTIVE : '')\n + '></div>');\n\n $element.html($div);\n\n if (angular.element($element).injector()) {\n angular.element($element).injector().invoke(function ($compile) {\n var scope = angular.element($div).scope();\n if (scope)\n $compile($div)(scope);\n });\n } else {\n var scope = angular.element($div).scope();\n if (scope)\n $compile($div)(scope);\n }\n }", "title": "" }, { "docid": "955b9ebe70ae4c7a93e1b78ece9bf5aa", "score": "0.51915574", "text": "function setGridSize() {\n\tif (haasGrid != null)\n\t\thaasGrid.setSizes();\n}", "title": "" }, { "docid": "4658b558cfcfc6c37fffb67f7c629eb6", "score": "0.5189128", "text": "function init_internal( gModel, gModule, oh, mh ) {\n\t\tconsole.log('internal grid element', _GridElement);\n\t\t\n\t\t_GridModel = gModel;\n\t\t_GridModule = gModule;\n\t\t_ObjectHelper = oh;\n\t\t_MathHelper = mh;\n\t\t\n\t\t// properties\n\t\t\n\t\t_GridElement.sizeBase = new THREE.Vector3( 20, 40, 20 );\n\t\t_GridElement.timeGrow = 500;\n\t\t_GridElement.timeShow = 125;\n\t\t_GridElement.timeHide = 125;\n\t\t_GridElement.opacityVacant = 0.5;\n\t\t_GridElement.opacityOccupied = 0.5;\n\t\t\n\t\trotationAxis = new THREE.Vector3( 0, 1, 0 );\n\t\t_GridElement.NODE_EMPTY = 0;\n\t\t_GridElement.NODE_SELF = 1;\n\t\t\n\t\t\n\t\t// instance\n\t\t\n\t\t_GridElement.Instance = GridElement;\n\t\t\n\t\t_GridElement.Instance.prototype.reset = reset;\n\t\t_GridElement.Instance.prototype.reset_material = reset_material;\n\t\t\n\t\t_GridElement.Instance.prototype.clone = clone;\n\t\t\n\t\t_GridElement.Instance.prototype.customize = customize;\n\t\t\n\t\t_GridElement.Instance.prototype.occupy_modules = occupy_modules;\n\t\t_GridElement.Instance.prototype.unoccupy_modules = unoccupy_modules;\n\t\t\n\t\t_GridElement.Instance.prototype.rotate = rotate;\n\t\t_GridElement.Instance.prototype.rotate_reset = rotate_reset;\n\t\t\n\t\t_GridElement.Instance.prototype.change_module = change_module;\n\t\t_GridElement.Instance.prototype.occupy_module = occupy_module;\n\t\t_GridElement.Instance.prototype.test_occupy_module_smart = test_occupy_module_smart;\n\t\t_GridElement.Instance.prototype.test_occupy_module = test_occupy_module;\n\t\t_GridElement.Instance.prototype.show_last_modules_tested = show_last_modules_tested;\n\t\t_GridElement.Instance.prototype.each_layout_element = each_layout_element;\n\t\t\n\t\t_GridElement.Instance.prototype.get_layout_node_total = get_layout_node_total\n\t\t_GridElement.Instance.prototype.get_layout_center_location = get_layout_center_location;\n\t\t_GridElement.Instance.prototype.get_layout_center_offset = get_layout_center_offset;\n\t\t\n\t\tObject.defineProperty( _GridElement.Instance.prototype, 'customized', { \n\t\t\tget: function () { return this.customizations && this.geometry !== this.customizations.geometry; }\n\t\t});\n\t\t\n\t\tObject.defineProperty( _GridElement.Instance.prototype, 'hasCustomModels', { \n\t\t\tget: function () { return this.customizations && main.is_array( this.customizations.models ); }\n\t\t});\n\t\t\n\t\tObject.defineProperty( _GridElement.Instance.prototype, 'hasModule', { \n\t\t\tget: function () { return this.module instanceof _GridModule.Instance && typeof this.modules !== 'undefined'; }\n\t\t});\n\t\t\n\t}", "title": "" }, { "docid": "82e2d98484d32205696783d9113f1b45", "score": "0.5186294", "text": "function initGridView() {\n currentView = GRID;\n $body.removeClass('showing-list-view');\n $body.addClass('showing-grid-view');\n\n initStickyNav();\n $(SUB_NAV_SELECTOR).addClass('unstuck');\n\n\n $('.all-models-container .grid-view').fadeIn(animationDuration, updateGridTitles);\n $.waypoints('disable');\n $('.header-wrapper').waypoint('enable');\n\n\n }", "title": "" }, { "docid": "7c6b23b4d05a0665d41c18e523952ec9", "score": "0.5182425", "text": "function gridColaboradores(){\n\n var csrftoken = getCookie('csrftoken');\n emptyMsgDiv = $(\"<div><span style='color:black;font-size:10x;'>No existen Registros !!</span></div>\");\n $(\"#gridColaboradores\").jqGrid({\n url:'/gridColaboradores/',\n postData: {\n csrfmiddlewaretoken : csrftoken, \n },\n datatype: \"json\",\n //data: mydata,\n loadonce: true, \n viewrecords: true,\n width: 800,\n height: 230,\n rowNum:10,\n colNames:['ID','NOMBRE','CORREO', 'TELEFONO', 'IDPROCESO','PROCESO','', 'ESTADO',''],\n colModel: [\n { label: 'id_colaborador', name: 'id_colaborador', width: 20, key:true, sorttype:\"integer\", hidden:true},\n { label: 'nombre_colaborador', name: 'nombre_colaborador', width: 30, sorttype:\"string\", align:'center'},\n { label: 'correo', name: 'correo', width: 50, sorttype:\"string\", align:'center'},\n { label: 'telefono', name: 'telefono', width: 30, sorttype:\"string\", align:'center'},\n { label: 'id_proceso', name: 'id_proceso', width: 40, sorttype:\"string\", align:'center', hidden:true},\n { label: 'proceso', name: 'proceso', width: 40, sorttype:\"string\", align:'center'},\n { label: 'estado_colaborador', name: 'estado_colaborador', width: 15, sorttype:\"string\", align:'center', hidden:true},\n { label: 'estadoA', name: 'estadoA', width: 25, sorttype:\"string\", align:'center', formatter: gridColaboradores_FormatterEstado},\n { name:'btn_editar_Colaborador' , width:10, align:\"center\", formatter:gridColaboradores_FormatterEdit },\n ],\n pager: '#pagerColaboradores',\n rownumbers: true,\n caption: \"Colaboradores\",\n shrinkToFit: true,\n grouping: true,\n groupingView: {\n groupField: [\"proceso\"],\n groupColumnShow: [false],\n groupText: [\"<strong>Proceso :</strong> <span class='badge bg-blue'>{0}</span>\"],\n groupOrder: [\"asc\"],\n groupCollapse: true\n },\n //DOBLE CLICK OBTIENE LA DATA SELECCIONADA\n ondblClickRow: function (rowid,iRow,iCol,e) {\n \n //get data seleccionada\n var data = $('#gridColaboradores').getRowData(rowid);\t\n //asignar a variables la data\n var id_colaborador = data.id_colaborador;\n var nombre_colaborador = data.nombre_colaborador;\n var correo = data.correo;\n var telefono = data.telefono;\n var id_proceso = data.id_proceso;\n var estado_colaborador = data.estado_colaborador;\n\n\n //asignar data existente a modal\n $('#modalColaborador #idColaborador').val(id_colaborador);\n $('#modalColaborador #accion').val(\"update\");\n\n $('#modalColaborador #nombre').val(nombre_colaborador);\n $('#modalColaborador #correo').val(correo);\n $('#modalColaborador #telefono').val(telefono);\n document.getElementById(\"id_proceso\").options.namedItem(id_proceso).selected=true;\n if (estado_colaborador ==\"1\"){\n document.getElementById(\"estadoColaborador\").options[1].selected=true;\n }else{\n document.getElementById(\"estadoColaborador\").options[2].selected=true;\n }\n //mostrar modal\n $('#modalColaborador').modal({'show':true, backdrop: 'static', keyboard: false});\n return false;\n },\n loadComplete: function () {\n var ts = this;\n if (ts.p.reccount === 0) {\n $(this).hide();\n emptyMsgDiv.show();\n desabilitarReportes();\n } else {\n $(this).show();\n emptyMsgDiv.hide();\n }\n },\n \n });\n //MUESTRA COMPONENTES DE LA RECETA AL HACER CLICK SOBRE EL HEADER GROUP\n var groupingView = $(\"#gridColaboradores\").jqGrid(\"getGridParam\", \"groupingView\"),\n plusIcon = groupingView.plusicon,\n minusIcon = groupingView.minusicon;\n $(\"#gridColaboradores\").click(function (e) {\n var $target = $(e.target),\n $groupHeader = $target.closest(\"tr.jqgroup\");\n if ($groupHeader.length > 0) {\n if (e.target.nodeName.toLowerCase() !== \"span\" ||\n (!$target.hasClass(plusIcon) && !$target.hasClass(minusIcon))) {\n $(this).jqGrid(\"groupingToggle\", $groupHeader.attr(\"id\"));\n return false;\n }\n }\n });\n //muestra el mensaje luego de cargar la grilla \n emptyMsgDiv.insertAfter($(\"#gridColaboradores\").parent());\n\n //funcion Buscar\n var timer;\n $(\"#search_cells\").on(\"keyup\", function() {\n var self = this;\n if(timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n //timer = null;\n $(\"#gridColaboradores\").jqGrid('filterInput', self.value);\n },0);\n });\n\n function gridColaboradores_FormatterEstado(cellvalue, options, rowObject)\n {\t\n\n if(rowObject.estado_colaborador == \"1\"){\n\n new_format_value = '<span class=\"badge bg-green\">Activo</span>';\n return new_format_value;\n }else{\n\n new_format_value = '<span class=\"badge bg-red\">Inactivo</span>';\n return new_format_value;\n\n }//end if\n\n }//end function gridBodegas_FormatterEstado\n\n\n \n function gridColaboradores_FormatterEdit(cellvalue, options, rowObject){\n\n var id_colaborador = rowObject.id_colaborador;\t\n \n new_format_value = '<a href=\"javascript:void(0)\" onclick=\"consultar_colaborador(\\''+id_colaborador+'\\')\"><i class=\"glyphicon glyphicon-pencil\" style=\"color:orange\"></i></a>'; \n \n return new_format_value\n \n }//end function gridColaboradores_FormatterEdit\n\n\n}", "title": "" }, { "docid": "fc25f20e73628aeeaef4f234ebb5aa8e", "score": "0.51816213", "text": "static newGridContext() {\n AGGrid.gridContext.push([]);\n }", "title": "" }, { "docid": "c5cf72fac7fd9e4957eff75fc8101f49", "score": "0.5181456", "text": "function newExplanationGrid(canvas) {\n var gridOptions = $.extend(true, {}, defaultGridOptions, {canvas: canvas}),\n grid = new Grid(gridOptions);\n\n\n grid.setAllColor(options.emptyColor);\n grid.setBoxesColor([[2, 1]], options.wallColor);\n return grid;\n }", "title": "" }, { "docid": "964496b01c2c5c6aa62eb0e27ec71745", "score": "0.5178842", "text": "set datos(valor)\r\n\t{\r\n\t\tthis.grid._dataProvider = valor;\t\r\n\t\tthis.grid.render();\r\n\t}", "title": "" }, { "docid": "531db0327c604b026a548b16210225fc", "score": "0.5173244", "text": "function gridInit() {\n\tgrid = new Grid(rows, cols);\n\tgrid.init();\n}", "title": "" }, { "docid": "28b5985bd0b0cfe33ff38214fdef987a", "score": "0.5166255", "text": "function setupBGGrid() {\n $scope.BGGrid = new Array(modelGrid.height).fill(null).map(function(){\n return new Array(modelGrid.width).fill(null);\n });\n //console.log(\"BGGrid:\",$scope.BGGrid);\n }", "title": "" } ]
d64e6c45f1359c5bf895aad7e525e6e4
resource was not found
[ { "docid": "8640d6a5a26de1ce61899ef7efa86107", "score": "0.0", "text": "function NotFoundError(message, error, additional, field, base_error){\n return NotFoundError._init(this, message, error, additional, field, base_error);\n}", "title": "" } ]
[ { "docid": "5409cce78b0cd54f2bb988309f8ab4ea", "score": "0.62626755", "text": "notFound() {}", "title": "" }, { "docid": "ac8c099a32786eecb291928f4a4b5fdd", "score": "0.62489367", "text": "function isResource(req, res, next) {\n let uri = req._parsedOriginalUrl.path;\n if (uri.includes('/api')){\n uri = uri.substring(4);\n }\n if (uri.includes('?')){\n uri = uri.substring(0, uri.indexOf(\"?\"));\n }\n uri = uri.substring(1);\n uri = uri.substring(0, uri.indexOf('/'));\n // let table = uri.substring(0, uri.length - 1);\n let table = uri;\n let id = Number(req.params.id);\n client.query(`SELECT id FROM ${table} WHERE id = '${id}'`, function(error, results) {\n // error will be an Error if one occurred during the query\n // results will contain the results of the query\n // fields will contain information about the returned results fields (if any)\n if (error) {\n throw error;\n }\n if (results.rowCount === 0){\n res.render('404');\n }\n else {\n next();\n }\n });\n}", "title": "" }, { "docid": "ac8c099a32786eecb291928f4a4b5fdd", "score": "0.62489367", "text": "function isResource(req, res, next) {\n let uri = req._parsedOriginalUrl.path;\n if (uri.includes('/api')){\n uri = uri.substring(4);\n }\n if (uri.includes('?')){\n uri = uri.substring(0, uri.indexOf(\"?\"));\n }\n uri = uri.substring(1);\n uri = uri.substring(0, uri.indexOf('/'));\n // let table = uri.substring(0, uri.length - 1);\n let table = uri;\n let id = Number(req.params.id);\n client.query(`SELECT id FROM ${table} WHERE id = '${id}'`, function(error, results) {\n // error will be an Error if one occurred during the query\n // results will contain the results of the query\n // fields will contain information about the returned results fields (if any)\n if (error) {\n throw error;\n }\n if (results.rowCount === 0){\n res.render('404');\n }\n else {\n next();\n }\n });\n}", "title": "" }, { "docid": "f2a01145a2cc596f4680d0c73dd552bc", "score": "0.61960363", "text": "_urlNotFound(url, type, completeCallback) {\n callInNextTick(() => {\n url = legacyCC.url.normalize(url);\n const info = `${type ? getClassName(type) : 'Asset'} in \"resources/${url}\" does not exist.`;\n\n if (completeCallback) {\n completeCallback(new Error(info), []);\n }\n });\n }", "title": "" }, { "docid": "bfe035d4a38caa2d40c4dcad859f4149", "score": "0.6083071", "text": "function getResource(u, cb) {\n\n }", "title": "" }, { "docid": "bfe035d4a38caa2d40c4dcad859f4149", "score": "0.6083071", "text": "function getResource(u, cb) {\n\n }", "title": "" }, { "docid": "a7ac48413b0f4d3c18ff13ff69dc6c47", "score": "0.5984567", "text": "resourceNamed(name) {\n return this.object.plugin.urlForResourceNamed_(name)\n }", "title": "" }, { "docid": "e4701e37dc047988e44af8a1ef479521", "score": "0.5936587", "text": "_notFound() {\r\n console.error('NOT FOUND');\r\n }", "title": "" }, { "docid": "3e42e088a9fb7d9bbf7d581eebac46a1", "score": "0.58746976", "text": "async function invalid(req,res)\n{\n res.status(404).json({\n message:'Resources not Found'\n })\n}", "title": "" }, { "docid": "78de277feade0ce87d5cdc6aa41c0b64", "score": "0.58331984", "text": "function SafeResourceUrl() { }", "title": "" }, { "docid": "78de277feade0ce87d5cdc6aa41c0b64", "score": "0.58331984", "text": "function SafeResourceUrl() { }", "title": "" }, { "docid": "78de277feade0ce87d5cdc6aa41c0b64", "score": "0.58331984", "text": "function SafeResourceUrl() { }", "title": "" }, { "docid": "53037bb455cd76ebe59e0d9cbb402b71", "score": "0.58207244", "text": "function SafeResourceUrl(){}", "title": "" }, { "docid": "fdd4fd9a4311f0738f32957db87fccf2", "score": "0.5813878", "text": "getResource(internal_name) {\n if (IsString(internal_name, true)) {\n const resource = this.asset.resource.get(internal_name);\n return resource ? resource : {};\n }\n }", "title": "" }, { "docid": "314323c6b2f0803746fc9943db540187", "score": "0.5790663", "text": "function pageNotFound(res) {\r\n\r\n fs.readFile(__dirname + '/PageNotFound.html', function (err, content) {\r\n\r\n // restituisco il file\r\n res.writeHead(404) ;\r\n res.end(content) ;\r\n }) ;\r\n}", "title": "" }, { "docid": "d24e219fac56ceaba3040c4e156cf0c5", "score": "0.57639134", "text": "resourceType() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "f09c55dcd6cdabf6df5d3b3063b104a8", "score": "0.57584953", "text": "function pgp_getResource(resource){\r\n\treturn pgp_Resources[resource+pgp_location];\r\n}", "title": "" }, { "docid": "8040c964f455811c9dcd7b2c7dc8ba3d", "score": "0.5734541", "text": "function notFound() {\n return Joi.object({\n statusCode: Joi.number().valid(404).required(),\n error: Joi.string().required(),\n message: Joi.string().required(),\n })\n .label('_not_found_error')\n .description('Resource not found');\n}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.571869", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.571869", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.571869", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.571869", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.571869", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "04aa88403f53d38ce11b0438be36cfe5", "score": "0.5708952", "text": "static isResource(_object) {\n return (Reflect.has(_object, \"idResource\"));\n }", "title": "" }, { "docid": "2d633db292adfec1fbd1c47db882a51e", "score": "0.5645587", "text": "notFound(data, cb) {\n cb(404);\n }", "title": "" }, { "docid": "f8f7c6b279a6ffd8b32fe86c26ef7185", "score": "0.5626324", "text": "function getResourceUrl() { return \"http://\"+location.href.split(\"//\")[1].split(\"/\").splice(0,3).join(\"/\")+'.json?api_key='+MoviePilot.apikey;}", "title": "" }, { "docid": "c06d1571748d8af1ef1e0ed4d90ee661", "score": "0.56020963", "text": "static routeNotFound(res) {\n res.writeHead(404, {'Content-Type': 'text/html'});\n res.write('Not Found');\n res.end();\n }", "title": "" }, { "docid": "b8233386ece9d050ca9200467362cfbf", "score": "0.5596229", "text": "function notFound() {\n statusCode = 404;\n outputFile = \"404.html\";\n }", "title": "" }, { "docid": "11cdd67375d505b5bca09b86d3ebe850", "score": "0.5590322", "text": "getResource(name) {\n const normalizedName = normalizeName(name);\n let index = this.origins.length - 1;\n while (index >= 0) {\n const origin = this.origins[index--];\n if (origin.hasResource(normalizedName)) {\n return origin.getResource(normalizedName);\n }\n }\n throw new Error(Util.format(\"Cannot find resource `%s`.\", name));\n }", "title": "" }, { "docid": "bc564cba525bdfb5398cd53980434839", "score": "0.5580367", "text": "function getResourceID(resource) {\n var temp = resource.resourcePath.replace(/\\//g, \"\");;\n return temp;\n}", "title": "" }, { "docid": "8edd30b20f41b2a20becbf2509ca4340", "score": "0.5570842", "text": "function respondNotFound(res) {\n res.render('notFound', {\n pageTitle: 'Not found',\n bodyID: 'body_not_found',\n mainTitle: 'Not found'\n });\n}", "title": "" }, { "docid": "4be1d42a3dd9c7216f9c8a4ec7a91191", "score": "0.5567181", "text": "returnIfExists(obj, objName){\n if(obj === undefined) throw new ResourceNotFoundError;\n else return obj;\n }", "title": "" }, { "docid": "aa367f64b513e35a1b5e4ebe58f02794", "score": "0.556644", "text": "function loadInternalResource(uri) {\n \tlog.info(\"Loading internal resource from \" + extensionAddress + '/' + uri + '.');\n\n \tvar xhr = new XMLHttpRequest();\n \txhr.open(\"get\", extensionAddress + '/' + uri, false);\n \txhr.send();\n\n \treturn xhr.responseText;\n }", "title": "" }, { "docid": "1b68625f9048628a1b7df876856ce489", "score": "0.55603164", "text": "function fetchFailed(error, request){\n\t\t alert(\"lookup failed.\");\n\t\t }", "title": "" }, { "docid": "f88d0622e990f399f6676755799a2661", "score": "0.55576694", "text": "function loadedResources(response){\n //console.log('Language Resources loaded for: ar',response);\n }", "title": "" }, { "docid": "465a28feded6e0ed4d68f1ea7aba7a3f", "score": "0.55491495", "text": "function resource_url() {\n if (window.location.hash) {\n resource = window.location.hash.substring(1);\n \treturn base_url() + resource;\n } else {\n return base_url_no_slash();\n }\n}", "title": "" }, { "docid": "c09347b250dbf5bbc08087063e9b8c62", "score": "0.55195844", "text": "function notFoundErrorHandler(err, req, res, next) {\n res.status(404)\n res.send(\"error - Resource not found \");\n}", "title": "" }, { "docid": "fabc1aceae7777a12f5a11a9c75a9b85", "score": "0.5515268", "text": "function send404(response){\n response.writeHead(404,{'Content-Type':'text/plain'});\n response.write('Error 404:resource not found.');\n response.end();\n}", "title": "" }, { "docid": "d0b4e1c571fa226b48d7868238f661c7", "score": "0.55086315", "text": "findResource(path) {\n const r = this.findChild(path);\n if (!r) {\n return undefined;\n }\n // found an element, check if it's a resource (duck-type)\n if (!('resourceType' in r)) {\n throw new Error(`Found a stack element for ${path} but it is not a resource: ${r.toString()}`);\n }\n return r;\n }", "title": "" }, { "docid": "97854ef32f55e5c8c8618141b5b63497", "score": "0.5493917", "text": "function notFoundHandler() {\n \n }", "title": "" }, { "docid": "d84b439f16dd9627f5159f6f2c7f37bc", "score": "0.54810494", "text": "function isResource(request) {\n return request.url.match(/\\/imgs\\/.*$/) && request.method === 'GET';\n}", "title": "" }, { "docid": "8f201a380dea6a6cea928cc1973720d2", "score": "0.54739", "text": "checkResource(resource) {\n const lazyImports = [\n '@nestjs/swagger',\n '@nestjs/microservices',\n '@nestjs/microservices/microservices-module',\n '@nestjs/platform-express',\n '@nestjs/websockets/socket-module',\n 'cache-manager',\n 'class-validator',\n 'class-transformer',\n 'fastify-swagger'\n ];\n if (!lazyImports.includes(resource)) {\n return false;\n }\n try {\n require.resolve(resource);\n } catch (err) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b2a4a12e143bfb6f949add5539e8ee98", "score": "0.5469036", "text": "function weatherNotFound(s) {\n cb(s);\n }", "title": "" }, { "docid": "9ac863009d98971e84c1dbcbf7ca9215", "score": "0.54517716", "text": "getStatus(){\n const resourceData = this.props.resources[this.props.match.params.name]\n if (resourceData != undefined){\n return resourceData.Status\n }\n return null\n \n }", "title": "" }, { "docid": "4a57c232cbdd0fe4b8601f7ca584c4b4", "score": "0.54475224", "text": "async function getResourceById(req, res) {\n let id = req.params.id;\n await Resource.findOne({ where: { id } })\n .then(resource => {\n if (resource === null) {\n return res.status(200).json({\n ok: false,\n message: 'No existe un recurso con ese id asociado',\n });\n } else {\n res.status(200).json({\n ok: true,\n message: 'correcto',\n resource\n });\n }\n })\n .catch(err => {\n res.status(500).json({\n ok: false,\n message: 'Ha ocurrido un error',\n error: err.message\n });\n });\n}", "title": "" }, { "docid": "516207c7f78f19990f869bfa396f7e5f", "score": "0.5442584", "text": "function getResourceWithoutParams(endpoint, callback, err_call){\n var new_resource = $resource(endpoint);\n var resource_call = new_resource.get(function(response) {\n var data = response.data;\n callback(data);\n },\n function(error){\n if(err_call){\n err_call();\n }\n console.error('Server Error', error);\n });\n }", "title": "" }, { "docid": "26581803c9b66aba35861f1e34188a2d", "score": "0.5439841", "text": "async function getResource(identifier) {\n let res = await db.query('SELECT * FROM resources WHERE id = ?', [identifier])\n if (res.length > 0) return res[0]\n res = await db.query('SELECT * FROM resources WHERE reference = ?', [identifier])\n if (res.length > 0) return res[0]\n return null\n }", "title": "" }, { "docid": "54a73675dde2130cce0bf69b93335032", "score": "0.5433639", "text": "GetURLResource(url) {\r\n let parts = url.split('/');\r\n let lastSection = parts.pop() || parts.pop();\r\n if (lastSection) {\r\n return lastSection;\r\n }\r\n else {\r\n return \"unknown\";\r\n }\r\n }", "title": "" }, { "docid": "b0905dfda5498d04b87b8ab716072f3b", "score": "0.5422966", "text": "function loadJerseys() {\n $\n .ajax({\n url: \"./resource/jersey/list\",\n dataType: \"json\",\n type: \"GET\"\n })\n .done(showJersey)\n .fail(function (xhr, status, errorThrown) {\n if (xhr.status == 404) {\n $(\"#message\").text(\"Kein Jersey gefunden\");\n } else {\n window.location.href = \"./nba-shop.html\";\n }\n })\n}", "title": "" }, { "docid": "6ae5d737de99811a715febfc4b121c06", "score": "0.54144967", "text": "function send404 ( response ) {\n\n\tresponse.writeHead( 404, { 'Content-Type ' : 'text/plain' } );\n\tresponse.write( 'Error 404 : resource not found, sorry mate' );\n\tresponse.end();\n}", "title": "" }, { "docid": "00d6e7cddbff77636aa491865ecfceb4", "score": "0.5407692", "text": "function serve404(){\r\n\t\t\tfs.readFile(ROOT+\"/404.html\",\"utf8\",function(err,data){\r\n\t\t\t\tif(err)respond(500,err.message);\r\n\t\t\t\telse respond(404,data);\r\n\t\t\t});\r\n\t\t}", "title": "" }, { "docid": "6f0025c34f5d4ce26e89683edda490ab", "score": "0.53932035", "text": "static async getResource(_idResource) {\n let resource = Project.resources[_idResource];\n if (!resource) {\n let serialization = Project.serialization[_idResource];\n if (!serialization) {\n FudgeCore.Debug.error(\"Resource not found\", _idResource);\n return null;\n }\n resource = await Project.deserializeResource(serialization);\n }\n return resource;\n }", "title": "" }, { "docid": "775da818907a037781da9de450e6ab1b", "score": "0.5390653", "text": "function serve404()\r\n\t{\r\n\t\tvar url = ROOT + \"/404.html\"; //url path to 404.html\r\n\t\t//Serve 404 if it exists\r\n\t\tfs.readFile(url,\"utf8\",function(err,data)\r\n\t\t{ //async\r\n\t\t\tif(err)respond(500,err.message);\r\n\t\t\trespond(404,data);\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "bb101d906c54b06bc31493509b9157ad", "score": "0.5383256", "text": "function catchNotFoundError() {\n Swal.fire('Not found', '404 ERROR', 'error');\n}", "title": "" }, { "docid": "890722249e6ed3044f44231144fc2ea1", "score": "0.53793573", "text": "checkResource(resource) {\n const lazyImports = [\n '@nestjs/microservices',\n '@nestjs/platform-express',\n 'cache-manager',\n 'class-validator',\n 'class-transformer',\n '@nestjs/microservices/microservices-module',\n '@nestjs/websockets/socket-module',\n ];\n if (!lazyImports.includes(resource)) {\n return false;\n }\n try {\n require.resolve(resource);\n } catch (err) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "42ee447daf3431174c7249312e44f386", "score": "0.5374688", "text": "getResource(){\n\n }", "title": "" }, { "docid": "949b853561016a2bcbc8101acd2123e8", "score": "0.5368119", "text": "function GetURLResource(url) {\n var parts = url.split('/');\n var lastSection = parts.pop() || parts.pop();\n if (lastSection) {\n return lastSection;\n }\n else {\n return \"unknown\";\n }\n }", "title": "" }, { "docid": "43b5022ff6597a4f760349650ba53504", "score": "0.5367055", "text": "static get __resourceType() {\n\t\treturn 'Resource';\n\t}", "title": "" }, { "docid": "8f64a51308b806299771a7a3447587b2", "score": "0.5352005", "text": "ResourceDismissed(string, string) {\n\n }", "title": "" }, { "docid": "2a3fd26b7268ca735e5561e56973f2f9", "score": "0.53503406", "text": "function Resource()\r\n{\r\n\tthis.filename = null; //name of file without folder or path\r\n\tthis.fullpath = null; //contains the unique name as is to be used to fetch it by the resources manager\r\n\tthis.remotepath = null; //the string to fetch this resource in internet (local resources do not have this name)\r\n\tthis._data = null;\r\n\t//this.type = 0;\r\n}", "title": "" }, { "docid": "86ab63d313e372cee954eace5bc66226", "score": "0.53499264", "text": "function http404 (req, res, next) {\n if (req.swagger && req.swagger.api && !req.swagger.path) {\n util.debug(\n 'Client requested path \"%s\", which is not defined in the Swagger API. Returning HTTP 404 (Not Found)',\n req.path\n );\n throw ono({ status: 404 }, \"Resource not found: %s\", req.path);\n }\n\n next();\n}", "title": "" }, { "docid": "18e567db9d9806b283618495f6f05a02", "score": "0.53488404", "text": "function doesResourceExists(resourceIri) { \n \n var headers = {\n 'Authorization': \"Basic \" + Utilities.base64Encode(GRAPHDB_USERNAME + \":\" + GRAPHDB_PASSWORD) \n }; \n \n var options = {\n 'method': 'get',\n 'Accept': 'text/csv',\n 'headers':headers \n };\n \n var query = RESOURCE_EXISTS_QUERY; \n query = query.replace(\"RESOURCE_IRI\", resourceIri);\n\n // This url is valid only for graphDB store \n var queryURL = GRAPHDB_URL + \"/repositories/\" + GRAPHDB_RESPOSITORY + \"?query=\" + encodeURI(query);\n var result = UrlFetchApp.fetch(queryURL, options);\n var contents = result.getContentText();\n \n // Check if iri exist in the content\n if (contents.indexOf(resourceIri) !== -1) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "62bb57bc14788cde1cf5e9ea0030f3fc", "score": "0.53340524", "text": "function fileNotFound(req, res) {\n let url = req.url;\n res.type(\"text/plain\");\n res.status(404);\n res.send(\"Cannot find \" + url);\n}", "title": "" }, { "docid": "213f0c14598f0fc4317d832dc370c0fa", "score": "0.53111637", "text": "static errIfNonexistent(company){\n if(!company){\n let err = new Error('No such company')\n err.status = 404;\n throw err\n }\n }", "title": "" }, { "docid": "5ebfce1419b8cfb553de50ba3eb80743", "score": "0.53045124", "text": "function notFoundHandler (ctx) {\n ctx.status = 404\n}", "title": "" }, { "docid": "a0c8c68a9aec48fdc35168581d9489ec", "score": "0.5304404", "text": "static get notFoundError() {\n return getErrorObject('OFFER_NOT_FOUND', 404);\n }", "title": "" }, { "docid": "368f739c7a31613f048bda441e0b2cf8", "score": "0.5301281", "text": "function pageNotFound( request, response ) {\n response.send( `<p>Error: Page not found. URL = ${request.url}</p>` );\n}", "title": "" }, { "docid": "904cb41d40752da089cfae4bd3a50405", "score": "0.52999455", "text": "async getResourceSelected(resource) {\r\n const api = this.d2.Api.getApi();\r\n let result = {};\r\n try {\r\n let res = await api.get(resource);\r\n //if (res.hasOwnProperty(resource)) {\r\n return res;\r\n //}\r\n }\r\n catch (e) {\r\n console.error('Could not access to API Resource');\r\n }\r\n return result; \r\n \r\n }", "title": "" }, { "docid": "99b34012ed5775cb6ab1f658041c314a", "score": "0.52994025", "text": "function notFound(req,h){\n return h.view('404',{},{layout: 'error-layout'}).code(404)\n}", "title": "" }, { "docid": "b4f5f4420a23506c7d3e4a77abea83e4", "score": "0.5298298", "text": "function SRC_findResourceSearchBase()\r\n{\r\n \treturn window.opener.document.htmlareas[0][1].__ResourceSearch;\r\n}", "title": "" }, { "docid": "4d2cb9c8ff2bdd0711a2a2f7bef2f4ac", "score": "0.527883", "text": "function fileNotFound(req, res) {\n let url = req.url;\n res.type('text/plain');\n res.status(404);\n res.send('Cannot find ' + url);\n}", "title": "" }, { "docid": "a821e4b1e395aacc0f03b656a3acc02c", "score": "0.5278819", "text": "get resource () {\n\t\treturn this._resource;\n\t}", "title": "" }, { "docid": "a821e4b1e395aacc0f03b656a3acc02c", "score": "0.5278819", "text": "get resource () {\n\t\treturn this._resource;\n\t}", "title": "" }, { "docid": "c304e6cba2416be8d3e6a334a6dc331e", "score": "0.5278592", "text": "function notFound(req, res){\n res.status(400);\n res.send('Not valid endpoint.');\n}", "title": "" }, { "docid": "586b7ac31faa1601c8fd3a2e672f8894", "score": "0.52656066", "text": "function resource(thing) {\n var res = is.str(thing) ? resources[thing] : thing;\n is.js(res) && js(res);\n is.data(res) && data(res.name);\n is.css(res) && css(res.name);\n is.html(res) && html(res.name);\n }", "title": "" }, { "docid": "a0f85c7b60dabaaa607fbc47e6a6e40c", "score": "0.5262409", "text": "function errorCallback(req) {\n console.err('Error al cargar modelo');\n alert('Error al inicializar la escena: No existe el modelo.');\n}", "title": "" }, { "docid": "efc762d45a6761b93b5e20cdea28696a", "score": "0.5259335", "text": "getResource() {\n return super.getAsNullableString(\"resource\");\n }", "title": "" }, { "docid": "810cd69168ad2c44173c1795865d5069", "score": "0.52552384", "text": "function notFound(req, res) {\n res.status(404).send('Sorry, this route does not exist.');\n}", "title": "" }, { "docid": "7987c5cf418dc76a6a99898d83e72e37", "score": "0.5252453", "text": "function loadResources(callback) {\n // No resources need loaded\n callback();\n }", "title": "" }, { "docid": "bbf3952f44e636333d9b33cf42c398a7", "score": "0.52481663", "text": "error404(req, res) {\n res.notFound();\n }", "title": "" }, { "docid": "5fa7d94baa20ac089462d8df03e2c641", "score": "0.52462196", "text": "function isValidResource(resource_id) {\n\n //TODO: write the code to validate the resource_id\n if (resource_id != undefined) {\n var n = resource_id.length;\n if (n == 36)\n return true;\n else\n return false;\n }\n}", "title": "" }, { "docid": "b709fdd4281df87df4d1ee0debff9584", "score": "0.523761", "text": "function getResourceWithParams(endpoint, params, callback, err_call){\n var new_resource = $resource(endpoint);\n var resource_call = new_resource.get(params, function(response) {\n var data = response.data;\n callback(data);\n },\n function(error){\n if(err_call){\n err_call();\n }\n console.error('Server Error', error);\n });\n }", "title": "" }, { "docid": "530c4485ba1cd7228307cb338907f502", "score": "0.5237014", "text": "function loadSpieler() {\n let spielerUUID = $.urlParam(\"uuid\");\n if (spielerUUID) {\n $\n .ajax({\n url: \"./resource/spieler/read?uuid=\" + spielerUUID,\n dataType: \"json\",\n type: \"GET\"\n })\n .done(showSpieler)\n .fail(function (xhr, status, errorThrown) {\n if (xhr.status == 403) {\n window.location.href = \"./login.html\";\n } else if (xhr.status == 404) {\n $(\"#message\").text(\"Kein Spieler gefunden\");\n } else {\n window.location.href = \"./nba-shop.html\";\n }\n })\n }\n}", "title": "" }, { "docid": "c875b28dc2abf48b42da5e61e62cecae", "score": "0.5224173", "text": "resourcesUrl (baseUrl,username){\n browser.get(baseUrl + username + \"/_resources\");\n }", "title": "" }, { "docid": "35fa6367997c240fa5c02d24e56382d0", "score": "0.52116287", "text": "findTag(req, res, next) {\n let { success, code } = checkValidation(req, tags.paramValidation.find)\n if (!success) {\n return res.status(422).send(responseCreator(code))\n }\n next();\n }", "title": "" }, { "docid": "23ede02b12aa68f5305f0e5cc4e63429", "score": "0.52107567", "text": "function hasResourceInfo(resource) {\n const potentialResourceInfo = resource;\n return typeof potentialResourceInfo === \"object\" && typeof potentialResourceInfo.internal_resourceInfo === \"object\";\n}", "title": "" }, { "docid": "c643290e32b9a13e58a30e3cae669764", "score": "0.5209563", "text": "function getImage(resource, queries) {\n var image = new Image(1, 1);\n image.onload = function () {\n iterator = 0; // To avoid JSLint warning of empty block \n };\n image.src = config_api_url + resource + (config_api_url.indexOf('?') < 0 ? '?' : '&') + queries;\n }", "title": "" }, { "docid": "31f871a5b3752053c6ba502a75354dd4", "score": "0.5206156", "text": "lookupAvailableResources() {\n const done = this.async();\n const path = this.destinationPath('resources/api');\n _fsUtils.getSubDirectoryPaths(path).then((dirList) => {\n const pathRegex = new RegExp(`${path}/?`);\n this.availableResources = dirList.map((item) => {\n return item.replace(/^[a-zA-Z]*:/,'') // Handle windows drive letter\n .replace(/\\\\/g, '/') // Handle windows path separator\n .replace(pathRegex, '/');\n });\n done();\n }).catch((ex) => {\n this.env.error('Error listing existing API resources');\n done(ex);\n });\n }", "title": "" }, { "docid": "838bc1c60871464083b3ff7be36cdde7", "score": "0.5200628", "text": "function pictureNotFound(res, pictureId) {\n return res.status(404).type('text').send(`No picture found with ID ${pictureId}`);\n}", "title": "" }, { "docid": "4edb718075024d8e62cfeda30cc23714", "score": "0.5199732", "text": "checkResourceIdAvailability() {\n let $resourceInput = this.$el.find('#resource_id'),\n resource_id = $resourceInput.val();\n if (this.store.getResource(resource_id)) {\n if (!ENV_TEST) {\n $resourceInput[0].setCustomValidity('Resource ID already exists.');\n }\n this.$el.find('.is-taken').css('display', 'inline-block');\n this.$el.find('.is-available').css('display', 'none');\n } else {\n if (!ENV_TEST) {\n $resourceInput[0].setCustomValidity('');\n }\n this.$el.find('.is-taken').css('display', 'none');\n this.$el.find('.is-available').css('display', 'inline-block');\n }\n }", "title": "" }, { "docid": "796cab02e8a10fa28efdba487c6899ec", "score": "0.5187422", "text": "function getResourceByName(bundle, resource, searchkey_data) {\n var request = {\n method: 'GET',\n url: 'https://online.planmill.com/'+bundle.auth_fields.instance+'/api/1.5/'+resource+'/',\n params: {\n searchkey: searchkey_data,\n rowcount: 1,\n order: 1,\n sort: 'id'\n }, \n headers: {\n Accept: 'application/json'\n }, \n auth: ['clientid', 'clientsecret','instance','access_token','refresh_token'], \n data: null\n };\n var response = z.request(request);\n if (response.status_code === 400) {\n throw new RefreshTokenException(); // So we can refresh token\n }\n var data = JSON.parse(response.content);\n \n return data;\n}", "title": "" }, { "docid": "42d81cda78cd13bc04af16dc9e534a6f", "score": "0.5175708", "text": "function getResource(resource = getCurrentHash(), method = 'GET', data = null) {\n\t\t\n if (resource.trim() === '') {\n window.location.hash = apiRoot;\n window.location.reload();\n\t\t\tresource = apiRoot;\n }\n\n // Adding '/' to the resource if missing\n if (resource.substring(0, 1) !== '/') {\n resource = '/' + resource;\n }\n\n let url = apiU + resource;\n\t\t\n\t\tif( method === 'DELETE' ){\n\t\t\tif (resource.substring(0, 1) == '/') {\n\t\t\t\tresource = resource.substring(1);\n\t\t\t}\n\t\t\turl = resource;\n\t\t}\n\t\t\n\t\tif( method === 'PUT' ){\t\t\n\t\t\t\n\t\t\tif (resource.substr(resource.length - 2) == '//') {\n\t\t\t\tresource = resource.substring(0, resource.length - 1);\n\t\t\t}\n\t\t\tif (resource.substring(0, 1) == '/') {\n\t\t\t\tresource = resource.substring(1);\n\t\t\t}\n\t\t\turl = resource;\n\t\t\tconsole.log(url)\n\t\t}\n\t\t\n //history.replaceState(null, null, '#!' + resource);\n\n $.ajax({\n contentType: data !== null ? PLAINJSON : null,\n data: data,\n timeout: xhrTimeout,\n type: method,\n url: url,\n })\n .done(renderData)\n .fail(handleAjaxError)\n\t\t\n }", "title": "" }, { "docid": "5db67b77aee241f88d78f3bbd3106d9b", "score": "0.5175689", "text": "function selectResource(location){\n var parts = location.split('/');\n parts.shift();\n var result = resources;\n for(var i=0; i<parts.length; i++){\n result = result[parts[i]];\n }\n //console.info(result);\n return result;\n}", "title": "" }, { "docid": "7ed22cbca4a267461ea933f3aae6c265", "score": "0.5168711", "text": "function response404(res)\n{\n res.render(\"response404\");\n}", "title": "" }, { "docid": "68a77ca019e1dea47077ecb31e7c39cc", "score": "0.5160619", "text": "function handle404(request, response) {\n response.status(404).send(\"No Api found! Try again.\");\n}", "title": "" }, { "docid": "a44dae67d23c3323865deaf617a779eb", "score": "0.5159836", "text": "function f404(data,res) {\n res.setHeader('Content-Type', 'application/json');\n res.status(404);\n res.end(JSON.stringify({\"error\":-1,\"message\":\"404\"}));\n}", "title": "" }, { "docid": "cd85fedcceaf895eb0ddc8eabdf5c735", "score": "0.5159618", "text": "function notFound(req, res, err, cb) {\n console.log(err);\n err.body = {code: 404,message:'Endpoint wasn\\'t found on server'};\n res.send(err);\n return cb();\n}", "title": "" }, { "docid": "59f2ceac36734d388d5068ddfcba1c64", "score": "0.5158146", "text": "function loadSchuhe() {\n $\n .ajax({\n url: \"./resource/schuh/list\",\n dataType: \"json\",\n type: \"GET\"\n })\n .done(showSchuh)\n .fail(function (xhr, status, errorThrown) {\n if (xhr.status == 404) {\n $(\"#message\").text(\"Kein Schuhmodel gefunden\");\n } else {\n window.location.href = \"./nba-shop.html\";\n }\n })\n}", "title": "" }, { "docid": "41ebb9ea951253b5a1ef0ce1bb2625e5", "score": "0.5149843", "text": "function onError(e) {\n console.log(\"ASSETMANAGER ERROR > Error Loading asset\");\n }", "title": "" }, { "docid": "8c015ca18fd18db26e7184f1342c81a2", "score": "0.51449037", "text": "function send404(response) {\r\n\tresponse.writeHead(404, {'Content-Type': 'text/plain'});\r\n\tresponse.write('Error 404: resource not found.');\r\n\tresponse.end();\r\n}", "title": "" }, { "docid": "0ea49a5143ff507f7052fa19b17a0d2e", "score": "0.51430076", "text": "function loadHandler() {\n reject(\n 'record view form should not be loading with object api name unset'\n );\n }", "title": "" } ]
58f2232017b97421e558272085659a18
remove all the event listeners that were added.
[ { "docid": "96e7fbe8c3dfc9893ef75fa2781c2335", "score": "0.0", "text": "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }", "title": "" } ]
[ { "docid": "1fdb646ab540da8b94ca8a8d19f5a856", "score": "0.8568266", "text": "function removeListeners() {\n listeners.forEach(listener => {\n listener.event.removeListener(listener.listener)\n })\n listeners.clear()\n }", "title": "" }, { "docid": "7ef82e43a35638785498fd33834eaae7", "score": "0.85066736", "text": "removeAllEventListeners() {\n const events = Array.from(this.m_listeners.keys());\n for (const event of events) {\n this.removeEventListener(event);\n }\n }", "title": "" }, { "docid": "87ad3d0d5d073828a454aaec4f1b1713", "score": "0.8319984", "text": "removeAllListeners() {\n Object.keys(this.events).forEach(eventName => {\n return this.events[eventName].splice(0, this.events[eventName].length);\n \t});\n }", "title": "" }, { "docid": "bea5196afce87553f0d791c2b3d62c06", "score": "0.8304111", "text": "_clearListeners() {\n for (let listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "title": "" }, { "docid": "19e766eba8d359626c15f8ab0cc59262", "score": "0.8296624", "text": "_clearListeners() {\n for (const listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "title": "" }, { "docid": "68c2a89c6b709566db0d4622289d24b5", "score": "0.8282094", "text": "function clearEvents() {\n\t\t\tvar ident;\n\t\t\tfor (ident in listenersByEventId) {\n\t\t\t\tr.removeListener(ident);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2726417c2be2cc9461758777fa860f7b", "score": "0.81869525", "text": "removeAllListeners() {\n this.__events = new Map();\n }", "title": "" }, { "docid": "2726417c2be2cc9461758777fa860f7b", "score": "0.81869525", "text": "removeAllListeners() {\n this.__events = new Map();\n }", "title": "" }, { "docid": "0096f4b296fc6364b3f7066a6f7a6dd1", "score": "0.81504416", "text": "function clearAllListeners() {\n for (var event in eventsObj) {\n while (eventsObj[event].length > 0) {\n eventsObj[event].pop();\n }\n delete eventsObj[event];\n }\n}", "title": "" }, { "docid": "f9b72c1ac1d5375e76f6a500619152ef", "score": "0.80990666", "text": "function unsubscribeAll() {\n Object.keys(_listeners).map(key => {\n delete _listeners[key];\n })\n }", "title": "" }, { "docid": "bbda8c344b80be54b953b13badc70b3f", "score": "0.8057043", "text": "removeAllListener() {\n this._listeners = {};\n }", "title": "" }, { "docid": "30862058fda1a2307e15b1eac1fb4ef7", "score": "0.8023642", "text": "removeAllListeners() {\n this.listeners = [];\n }", "title": "" }, { "docid": "985f46a52db4e0f459213368350cd185", "score": "0.80200666", "text": "function removeAllListeners () {\n emitEventPairs.forEach(function (p) {\n p[0].removeAllListeners(p[1])\n })\n }", "title": "" }, { "docid": "3d90b8f8edd3280a370a7f7e6b2c10f7", "score": "0.79259676", "text": "removeEventListeners() {}", "title": "" }, { "docid": "43fceeac7c6cc2cb6c809275287a565c", "score": "0.79124236", "text": "removeAllEventListeners () {\n this.eventListeners = []\n }", "title": "" }, { "docid": "7bda31eee0d07b5332ec772a5ce0454c", "score": "0.78452694", "text": "function _removeListeners() {\n DocumentModule.off(\"documentChange\", _documentChangeHandler);\n FileSystem.off(\"change\", _debouncedFileSystemChangeHandler);\n DocumentManager.off(\"fileNameChange\", _fileNameChangeHandler);\n }", "title": "" }, { "docid": "ed76f4250eb93063224aa80e12f0c064", "score": "0.77278334", "text": "removeEvents() {\n this._events.forEach(function (args) {\n removeEvent.apply(null, args);\n });\n this._events.length = 0;\n }", "title": "" }, { "docid": "32b17bdc461a03d6cdc5afef24cc4cda", "score": "0.76986337", "text": "removeEventListeners() {\n for (const event of this.events) {\n if (!isValidEvent(event)) {\n continue\n }\n\n const eventHandler = this[event]\n\n if (!eventHandler) {\n continue\n }\n\n this.client.removeListener(event, eventHandler)\n }\n }", "title": "" }, { "docid": "f976fb9dee008b3fac86f963dd233bdd", "score": "0.7626879", "text": "removeListeners() {\n\t\tlet channels = Object.keys(this.RouterHandlers);\n\t\t__WEBPACK_IMPORTED_MODULE_5__clients_logger___default.a.system.debug(\"WRAP Removing Listeners\", channels);\n\t\tfor (let key in channels) {\n\t\t\t__WEBPACK_IMPORTED_MODULE_1__clients_routerClientInstance___default.a.removeListener(key, this.RouterHandlers[key]);\n\t\t}\n\n\t\t//These are listeners added directly to the wrapped openfin window.\n\t\tlet events = Object.keys(this._listeners);\n\t\tif (events.length) {\n\t\t\tevents.forEach(eventName => {\n\t\t\t\tthis._listeners[eventName].forEach(handler => {\n\t\t\t\t\tthis.removeEventListener(eventName, handler);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Remove all specialty listeners added to the openfin window\n\t\tfor (let event in this.addedSystemListeners) {\n\t\t\tthis.finWindow.removeEventListener(event, this.addedSystemListeners[event]);\n\t\t}\n\t}", "title": "" }, { "docid": "81cfdb9fbf29390276ccbf3ccdfac8b1", "score": "0.7597112", "text": "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "title": "" }, { "docid": "6d34bede336fafdd46a6e92d47a9935b", "score": "0.7582435", "text": "_removeEventListeners() {\n this.domElement.removeEventListener('focusin', this._onFocusInFunc, false);\n this.domElement.removeEventListener('focus', this._onFocusInAndMouseEnterFunc, false);\n this.domElement.removeEventListener('focus', this._onFocusFunc, false);\n this.domElement.removeEventListener('mouseenter', this._onFocusInAndMouseEnterFunc, false);\n this.domElement.removeEventListener('blur', this._onFocusOutAndMouseLeaveFunc, false);\n this.domElement.removeEventListener('mouseleave', this._onFocusOutAndMouseLeaveFunc, false);\n this.domElement.removeEventListener('keydown', this._onKeydownFunc, false);\n this.domElement.removeEventListener('keypress', this._onKeypressFunc, false);\n this.domElement.removeEventListener('keyup', this._onKeyupFunc, false);\n this.domElement.removeEventListener('paste', this._onPasteFunc, false);\n this.domElement.removeEventListener('wheel', this._onWheelFunc, false);\n this.domElement.removeEventListener('drop', this._onDropFunc, false);\n this._removeFormListener();\n\n // Keep track if the event listeners have been initialized on this object\n this.hasEventListeners = false;\n\n document.removeEventListener('keydown', this._onKeydownGlobalFunc, false);\n document.removeEventListener('keyup', this._onKeyupGlobalFunc, false);\n }", "title": "" }, { "docid": "d941ebf833a149b56cbac94b3f12ea52", "score": "0.7576039", "text": "function removeListeners() {\n\n // right filter sidebar toggle\n if (sidebar()) {\n sidebar().removeEventListener('click', sidebarToggle)\n }\n\n // left menu sidebar toggle with menu button\n menuButton().removeEventListener('click', menuToggle)\n\n // left menu sidebar close on any click outside\n document.body.removeEventListener('click', menuClose)\n\n // nested menu items toggle\n if (nestedMenuItem()) {\n nestedMenuItem().removeEventListener('click', nestedMenuToggle)\n }\n\n}", "title": "" }, { "docid": "78c94dbcab203f748ae036259edb2378", "score": "0.7557042", "text": "_removeAllListeners() {\n setTimeout(() => {\n // move to next event loop - not sure if needed\n // internal listeners\n Object.values(this._internalEvents).forEach(event => {\n SharedEventEmitter.removeAllListeners(event);\n }); // user observer listeners\n\n Object.values(this._publicEvents).forEach(publicEvent => {\n SharedEventEmitter.removeAllListeners(publicEvent);\n });\n }, 0);\n }", "title": "" }, { "docid": "61311b690c0c9978549792fe29eb7f4e", "score": "0.754524", "text": "function removeEventListeners() {\n\n\t\teventsAreBound = false;\n\n\t\ttouch.unbind();\n\t\tfocus.unbind();\n\t\tkeyboard.unbind();\n\t\tcontrols.unbind();\n\t\tprogress.unbind();\n\t\tlocation.unbind();\n\n\t\twindow.removeEventListener( 'resize', onWindowResize, false );\n\n\t\tdom.slides.removeEventListener( 'click', onSlidesClicked, false );\n\t\tdom.slides.removeEventListener( 'transitionend', onTransitionEnd, false );\n\t\tdom.pauseOverlay.removeEventListener( 'click', resume, false );\n\n\t}", "title": "" }, { "docid": "7e0c262bf6f91feb6b85c5cecdd2e205", "score": "0.7544209", "text": "function detachEvents() {\n if (browser.addEventListener) {\n // remove current event listeners\n element.removeEventListener('touchstart', events, false);\n element.removeEventListener('mousedown', events, false);\n element.removeEventListener('webkitTransitionEnd', events, false);\n element.removeEventListener('msTransitionEnd', events, false);\n element.removeEventListener('oTransitionEnd', events, false);\n element.removeEventListener('otransitionend', events, false);\n element.removeEventListener('transitionend', events, false);\n root.removeEventListener('resize', events, false);\n } else {\n root.onresize = null;\n }\n }", "title": "" }, { "docid": "50dda9bb08fecb831c3268d54b1115a8", "score": "0.7519867", "text": "removeAllListeners (eventName) {\n // perform default behavior, preserve fn arity\n if (eventName) {\n super.removeAllListeners(eventName)\n } else {\n super.removeAllListeners()\n }\n // re-add internal events\n this._setupInternalEvents()\n // trigger stop check just in case\n this._onRemoveListener()\n }", "title": "" }, { "docid": "50dda9bb08fecb831c3268d54b1115a8", "score": "0.7519867", "text": "removeAllListeners (eventName) {\n // perform default behavior, preserve fn arity\n if (eventName) {\n super.removeAllListeners(eventName)\n } else {\n super.removeAllListeners()\n }\n // re-add internal events\n this._setupInternalEvents()\n // trigger stop check just in case\n this._onRemoveListener()\n }", "title": "" }, { "docid": "026d6d0ee2f03f2ea670117c6b3856bb", "score": "0.7500645", "text": "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "title": "" }, { "docid": "fc178f2ecf884c0804c71edba7cdf7af", "score": "0.75004137", "text": "function cleanEventHandlers() {\n var removeEventListener;\n if (eventHandlerCollection && eventHandlerCollection.length > 0) {\n for (var i = eventHandlerCollection.length-1, collection; i >= 0; i--) {\n collection = eventHandlerCollection[i];\n if (collection &&\n\t\t\t\t\t\t!exists(exceptionList, collection.element)) {\n if (/^on/.test(collection.eventName)) {\n removeEventListener = collection.element.detachEvent;\n removeEventListener.call(collection.element,\n collection.eventName, collection.handler, collection.useCapture);\n } else {\n removeEventListener = collection.element.removeEventListener;\n removeEventListener.call(collection.element,\n collection.eventName, collection.handler, collection.useCapture);\n }\n }\n eventHandlerCollection.splice(i,1);\n }\n }\n }", "title": "" }, { "docid": "01be4dbd203e4893215bc8b7ab98b370", "score": "0.7491591", "text": "function removeListeners() {\n if (state.current.scrollContainers) {\n state.current.scrollContainers.forEach(element => element.removeEventListener('scroll', scrollChange, true));\n state.current.scrollContainers = null;\n }\n\n if (state.current.resizeObserver) {\n state.current.resizeObserver.disconnect();\n state.current.resizeObserver = null;\n }\n } // add scroll-listeners / observers", "title": "" }, { "docid": "6bbf83b9c1ebcabd9d385a2f9669a5f5", "score": "0.74608", "text": "function all() {\n var listeners, id;\n internal.call(this);\n // loop through externally-bound events and remove 'em all\n if ( listeners = this._listeners ) {\n for ( id in listeners ) {\n this.off(listeners[id]);\n }\n }\n }", "title": "" }, { "docid": "3345bdca62ba11029300c93595ec7ff7", "score": "0.7437233", "text": "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n setTouchInProgress(false);\n }", "title": "" }, { "docid": "9b9b27adfd171ae878581f2b281f1719", "score": "0.74186873", "text": "function destroyEventListeners(){\n for (var i = 0; i < callLinks.length; i++) {\n callLinks[i].removeEventListener('click', callLink);\n }\n for (var i = 0; i < facebookLink.length; i++) {\n facebookLinks[i].removeEventListener('click', facebookLink);\n }\n for (var i = 0; i < outgoingLinks.length; i++) {\n outgoingLinks[i].removeEventListener('click', outgoingLink);\n }\n for (var i = 0; i < submitButtonsWithListener.length; i++) {\n submitButtonsWithListener[i].removeEventListener('click', submitClick);\n }\n}", "title": "" }, { "docid": "628aceace22887ce5eb22514afa44501", "score": "0.7396425", "text": "function removeListeners() {\n $element.off(START_EV, touchStart);\n $element.off(CANCEL_EV, touchCancel);\n $element.off(MOVE_EV, touchMove);\n $element.off(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.off(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "title": "" }, { "docid": "6678f9e7695c1b6dff38824a9d5a87a3", "score": "0.73907363", "text": "function clearListeners(event) {\n\t\t\tif(event) {\n\t\t\t\tdelete listeners[event];\n\t\t\t} else {\n\t\t\t\tlisteners = {};\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3bc5731abfeed97295259ab1c49e5999", "score": "0.7370187", "text": "unlinkAll() {\n this.changedEmitter.removeAllListeners();\n }", "title": "" }, { "docid": "6dc67befd9f71263c3301f11aab4486c", "score": "0.73605263", "text": "function removeListeners() {\n $element.off(START_EV, touchStart);\n $element.off(CANCEL_EV, touchCancel);\n $element.off(MOVE_EV, touchMove);\n $element.off(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.off(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "title": "" }, { "docid": "1eaaca6211e3b5fe09e4da52caf25bc6", "score": "0.7342731", "text": "detachAll() {\n for (const eventName in that.listeners) {\n if (that.listeners.hasOwnProperty(eventName))\n this.detach(eventName);\n }\n }", "title": "" }, { "docid": "e698813d654fcf479e370d6bbfc689d1", "score": "0.73197734", "text": "function removeEventListeners() {\n currentDeck.removeEventListener(\"click\", onCardClicked);\n RESTART_BUTTON.removeEventListener(\"click\", onRestartGameClicked);\n MODAL_CLOSE_BUTTON.removeEventListener(\"click\", onModalCloseClicked);\n}", "title": "" }, { "docid": "f7bc80158af4ed3cc8a7d9c5b78b8f12", "score": "0.73178875", "text": "clear () {\n this.#listeners = {};\n }", "title": "" }, { "docid": "eee628a1eb6a329e1cd6eb65672cb575", "score": "0.73029447", "text": "__removeListeners() {\n window.removeEventListener('scroll', this.__listener);\n }", "title": "" }, { "docid": "7f81530187a07dc3e47e5f128b68ecb5", "score": "0.72747135", "text": "_removeEventListeners() {\n let eventHandlers = this.get('_eventHandlers');\n let leafletObject = this.get('_leafletObject');\n if (Ember.isNone(eventHandlers) || Ember.isNone(leafletObject)) {\n return;\n }\n\n this.get('usedLeafletEvents').forEach(eventName => {\n leafletObject.removeEventListener(eventName,\n eventHandlers[eventName], this);\n delete eventHandlers[eventName];\n });\n }", "title": "" }, { "docid": "ce0d8419644175cb06a28af165a568f1", "score": "0.72300345", "text": "function removeGlobalEvents() {\n\t\t\t\tdocument.removeEventListener('focus', onFocus, true);\n\t\t\t\tdocument.removeEventListener('blur', onBlur, true);\n\t\t\t\tdocument.removeEventListener('vclick', onCancel, true);\n\t\t\t\teventsAdded = false;\n\t\t\t}", "title": "" }, { "docid": "f1b10f64e77aa6845e13291e50286246", "score": "0.72203916", "text": "removeEventListeners() {\n // Empty in base class.\n }", "title": "" }, { "docid": "e1afe3201c48121b712d180d41a2c617", "score": "0.7219258", "text": "destroy() {\n\t\tthis.removeDOMListeners();\n\t\tthis.unsubscribers.forEach((unsub) => unsub());\n\t}", "title": "" }, { "docid": "03e355179b591cc7e16b3e3afc696d83", "score": "0.719608", "text": "function unbindListeners()\n {\n var i, len, signature;\n\n for(i = 0, len = localEventCache.length; i < len; ++i)\n {\n signature = localEventCache[i];\n window.removeEvent(signature[0], signature[1], signature[2]);\n }\n }", "title": "" }, { "docid": "52347b2d96190561e7b8872d2c841cd5", "score": "0.71960115", "text": "function RemoveListeners ()\r\n{\r\n for(i in Root)\r\n {\r\n i.name=i;\r\n if(i.charAt(0) == \"A\" || i.charAt(0) == \"Q\")\r\n {\r\n Root[i].removeEventListener(\"click\", OnClickDot);\r\n Root[i].mouseEnabled = false;\r\n Root[i].cursor=\"auto\";\r\n Root[i].HasLine=false;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "af4c17056d1e32ddf007c4f0f9903161", "score": "0.7195343", "text": "destroy () {\n this.eventListeners = null\n }", "title": "" }, { "docid": "427d1d2dd930616d6677b9f98abc3bd3", "score": "0.7187598", "text": "_removeEventListeners() {\n this.el.removeEventListener('keydown', this._onKeydownBound);\n this.el.removeEventListener('keyup', this._onKeyupBound);\n }", "title": "" }, { "docid": "7f3698594cadf80934a05ab7dbca31e3", "score": "0.7186118", "text": "function removeEventListeners () {\n Dom.removeListener(closeButton, 'click', destroy);\n Dom.removeListener(titleInput, 'focus', function () {if (titleInput.value == titleDefaultValue) activateInput(titleInput);});\n Dom.removeListener(minPriceInput, 'focus', function () {if (minPriceInput.value == minPriceDefaultValue) activateInput(minPriceInput);});\n Dom.removeListener(maxPriceInput, 'focus', function () {if (maxPriceInput.value == maxPriceDefaultValue) activateInput(maxPriceInput);});\n Dom.removeListener(sendButton, 'click', function (e) { e = e || window.event; if (e.preventDefault) e.preventDefault(); addItemToList(); return false;});\n }", "title": "" }, { "docid": "5c066d79db8ffdbf931c9dab871c8143", "score": "0.71859026", "text": "cleanEchoListeners() {\n this.echoListeners.forEach(element => {\n globalObject.window.Echo.private(\n element.channel\n ).stopListening(element.event);\n });\n }", "title": "" }, { "docid": "c1f83f7413436ace5f48f21346bf6f67", "score": "0.7183065", "text": "removeAllListeners(eventName) {\n this.listeners[eventName] = [];\n }", "title": "" }, { "docid": "c0e005db29b128d7864f370021397fb4", "score": "0.71663946", "text": "unregisterPlayerControlListeners() {\n document.removeEventListener(\"mousedown\", this.playerControl.onMouseDown);\n document.removeEventListener(\"mouseup\", this.playerControl.onMouseUp);\n document.removeEventListener(\"click\", this.playerControl.onMouseClick);\n document.removeEventListener('keydown', this.playerControl.onKeyDown, false);\n document.removeEventListener('keyup', this.playerControl.onKeyUp, false);\n this.character.controller.input.resetKeys();\n }", "title": "" }, { "docid": "db4c744d9e6d579253dc3cae8fed6c97", "score": "0.71510804", "text": "function removeEventListeners() {\n\n\t\teventsAreBound = false;\n\n\t\tdocument.removeEventListener( 'keydown', onDocumentKeyDown, false );\n\t\tdocument.removeEventListener( 'keypress', onDocumentKeyPress, false );\n\t\twindow.removeEventListener( 'hashchange', onWindowHashChange, false );\n\t\twindow.removeEventListener( 'resize', onWindowResize, false );\n\n\t\tdom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );\n\t\tdom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );\n\t\tdom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );\n\n\t\t// IE11\n\t\tif( window.navigator.pointerEnabled ) {\n\t\t\tdom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );\n\t\t\tdom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );\n\t\t\tdom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );\n\t\t}\n\t\t// IE10\n\t\telse if( window.navigator.msPointerEnabled ) {\n\t\t\tdom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );\n\t\t\tdom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );\n\t\t\tdom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );\n\t\t}\n\n\t\tif ( config.progress && dom.progress ) {\n\t\t\tdom.progress.removeEventListener( 'click', onProgressClicked, false );\n\t\t}\n\n\t\t[ 'touchstart', 'click' ].forEach( function( eventName ) {\n\t\t\tdom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );\n\t\t\tdom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );\n\t\t\tdom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );\n\t\t\tdom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );\n\t\t\tdom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );\n\t\t\tdom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );\n\t\t} );\n\n\t}", "title": "" }, { "docid": "db4c744d9e6d579253dc3cae8fed6c97", "score": "0.71510804", "text": "function removeEventListeners() {\n\n\t\teventsAreBound = false;\n\n\t\tdocument.removeEventListener( 'keydown', onDocumentKeyDown, false );\n\t\tdocument.removeEventListener( 'keypress', onDocumentKeyPress, false );\n\t\twindow.removeEventListener( 'hashchange', onWindowHashChange, false );\n\t\twindow.removeEventListener( 'resize', onWindowResize, false );\n\n\t\tdom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );\n\t\tdom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );\n\t\tdom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );\n\n\t\t// IE11\n\t\tif( window.navigator.pointerEnabled ) {\n\t\t\tdom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );\n\t\t\tdom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );\n\t\t\tdom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );\n\t\t}\n\t\t// IE10\n\t\telse if( window.navigator.msPointerEnabled ) {\n\t\t\tdom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );\n\t\t\tdom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );\n\t\t\tdom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );\n\t\t}\n\n\t\tif ( config.progress && dom.progress ) {\n\t\t\tdom.progress.removeEventListener( 'click', onProgressClicked, false );\n\t\t}\n\n\t\t[ 'touchstart', 'click' ].forEach( function( eventName ) {\n\t\t\tdom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );\n\t\t\tdom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );\n\t\t\tdom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );\n\t\t\tdom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );\n\t\t\tdom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );\n\t\t\tdom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );\n\t\t} );\n\n\t}", "title": "" }, { "docid": "f47b94be2153249f7437ae231147550a", "score": "0.713753", "text": "_removeAllListeners() {\n\t\tif (this.subSocket) {\n\t\t\tthis.subSocket.sock.removeAllListeners('connect');\n\t\t\tthis.subSocket.sock.removeAllListeners('error');\n\t\t}\n\n\t\tif (this.pubSocket) {\n\t\t\tthis.pubSocket.sock.removeAllListeners('connect');\n\t\t\tthis.pubSocket.sock.removeAllListeners('error');\n\t\t}\n\n\t\tif (this.busRpcSocket) {\n\t\t\tthis.busRpcSocket.removeAllListeners('connect');\n\t\t\tthis.busRpcSocket.removeAllListeners('error');\n\t\t}\n\n\t\tif (this.rpcSocket) {\n\t\t\tthis.rpcSocket.removeAllListeners('bind');\n\t\t\tthis.rpcSocket.removeAllListeners('error');\n\t\t}\n\t}", "title": "" }, { "docid": "bd98a203393501478df1ce7806d87f09", "score": "0.7132456", "text": "unwireEvents() {\n for (const input of (this.inputElements)) {\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].clearEvents(input);\n }\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'submit', this.submitHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'reset', this.resetHandler);\n }", "title": "" }, { "docid": "c7c592219974232e4758c9a64c5230e7", "score": "0.7131531", "text": "function _disposeAddTagListeners(listener) {\n\t\t_editor.off(\"cursorActivity\");\n\t\tKeyBindingManager.removeGlobalKeydownHook(listener);\n\t\t_lng = 0;\n\t\t_currentDoc = null;\n\t\t_currentPos = null;\n\t\t_editor = null;\n\t}", "title": "" }, { "docid": "ebc4309da834cbc38cf55b3ebf9c06e7", "score": "0.7128546", "text": "removeFinWindowEventListeners() {\n finsembleWindow.removeEventListener(\"maximized\", this.onWindowMaximized);\n finsembleWindow.removeEventListener(\"restored\", this.onWindowRestored);\n finsembleWindow.removeEventListener(\"blurred\", this.onWindowBlurred);\n finsembleWindow.removeEventListener(\"focused\", this.onWindowFocused);\n finsembleWindow.removeEventListener(\"close-requested\", this.close);\n finsembleWindow.removeEventListener(\"minimized\", this.onWindowMinimized);\n finsembleWindow.removeEventListener(\"parent-set\", this.onParentSet);\n }", "title": "" }, { "docid": "772454b19480d7396f21155abc9189ea", "score": "0.7120203", "text": "function clearUpdaterListeners() { // THIS IS ONLY HERE SO THAT listeners wont get stacked up because of being called multiple times\n logger.debug(\"clearUpdaterListeners\");\n autoUpdater.removeAllListeners('checking-for-update');\n autoUpdater.removeAllListeners('update-available');\n autoUpdater.removeAllListeners('error');\n autoUpdater.removeAllListeners('update-not-available');\n autoUpdater.removeAllListeners('update-downloaded');\n autoUpdater.removeAllListeners('download-progress');\n}", "title": "" }, { "docid": "238ff06061e4845234f7359a04d67e01", "score": "0.7118648", "text": "function clearEvents()\r\n\t\t{\r\n\t\t\twhile(elementsToClean.length > 0)\r\n\t\t\t{\r\n\t\t\t\tvar elementToClean = elementsToClean.pop();\r\n\t\t\t\tvar htmlElement = elementToClean.htmlElement;\r\n\t\t\t\tvar eventName = elementToClean.eventName;\r\n\t\t\t\tvar eventCollection = eventName + 'Events';\r\n\r\n\t\t\t\t// Remove all event handlers for this element.\r\n\t\t\t\twhile(htmlElement[eventCollection].length > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\thtmlElement[eventCollection].pop();\r\n\t\t\t\t}\r\n\r\n\t\t\t\thtmlElement[eventName] = null;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "20808e398b2198f785b6bb74ba42b2ff", "score": "0.7100333", "text": "unwireEvents() {\n for (let input of (this.inputElements)) {\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].clearEvents(input);\n }\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'submit', this.submitHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'reset', this.resetHandler);\n }", "title": "" }, { "docid": "66f213fdbb98116d9beb8dcea41596d5", "score": "0.7091948", "text": "function unsubscribeAll() {\n\t\tuninstallGlobalHandler();\n\t\thandlers = [];\n\t}", "title": "" }, { "docid": "79c4ce3f7bfb052d9d53b60af0c3c8e7", "score": "0.7091481", "text": "function _removeEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "title": "" }, { "docid": "e0fd2421d2a25e4837da73bbf25b2955", "score": "0.70874095", "text": "function unsubcrible() {\n const index = listeners.indexOf(fn);\n listeners.splice(index, 1);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "db9c08b38f173a24338e1f9bf32609bc", "score": "0.7073633", "text": "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "title": "" }, { "docid": "8556ffc016157807be404a265a836a9a", "score": "0.7072087", "text": "function unsubscribeAll() {\n\t\t\t\tuninstallGlobalHandler();\n\t\t\t\thandlers = [];\n\t\t\t}", "title": "" }, { "docid": "7236da828ac90c850f55406e2b25793f", "score": "0.707167", "text": "function removeScrollListeners() {\n\t\tremoveMousewheelListeners();\n\t\t//removeSwipeListeners();\n\t}", "title": "" }, { "docid": "822c51fd4e4694398e8a48d85b19679d", "score": "0.70652014", "text": "updateRemoveAllEvents() {\n this.updateEventsContainer('remove-all');\n }", "title": "" }, { "docid": "0b41333afe3a1331689b006c16f80b0b", "score": "0.7063203", "text": "function unsetControlsListeners() {}", "title": "" }, { "docid": "0a4268edaa70a21a986f30f228d8ee2b", "score": "0.70408815", "text": "destroy() {\n //unsubscribing events and removing event listeners from dom for this component elements.\n this.closeIconEls.forEach((el)=>{el.removeEventListener(\"click\", this.modalCloseActionListener)});\n subject.unsubscribe(\"cartItemUpdated\", this.onCartItemUpdateListener);\n this.addItemEls.forEach(btn=>{\n btn.removeEventListener(\"click\", this.onAddItemElListener);\n });\n\n this.removeItemEls.forEach((btn)=>{\n btn.removeEventListener(\"click\", this.onRemoveItemElListener);\n });\n }", "title": "" }, { "docid": "f7ef24e879247dbe7917cd576e4865d2", "score": "0.7026829", "text": "unwireEvents() {\n EventHandler.remove(this.element, 'click', this.mouseClickHandler);\n EventHandler.remove(this.element, getStartEvent(), this.mouseDownHandler);\n EventHandler.remove(this.element, 'keyup', this.keyUpHandler);\n EventHandler.remove(this.element, 'keydown', this.keyDownHandler);\n EventHandler.remove(this.element, 'noderefresh', this.refreshNode);\n }", "title": "" }, { "docid": "de5c0e3662d5ca662c582b09cf8a2835", "score": "0.7025525", "text": "function removeEventListeners() {\n window.removeEventListener('resize', onWindowResize, true);\n $(containerId).unbind('mousedown', onMouseDown);\n $(containerId).unbind('mousewheel', onMouseWheel);\n $(containerId).unbind('mousemove', onMouseBrowse);\n $(containerId).unbind('mouseover', onMouseInContainer);\n $(containerId).unbind('mouseout', onMouseOutContainer);\n\n $(document).unbind('country:focus', eventCountryFocus);\n $(document).unbind('country:hover', eventCountryHover);\n $(document).unbind('country:unhover', eventCountryUnhover);\n\n $(document).unbind('country:color:set', eventSetCountryColor);\n $(document).unbind('country:color:unset', eventUnsetCountryColor);\n\n $(document).unbind('navigation:zoom:in', eventNavigationZoomIn);\n $(document).unbind('navigation:zoom:out', eventNavigationZoomOut);\n\n\t\t$(document).unbind('keydown', onKeyDown);\n }", "title": "" }, { "docid": "6d2924ff753f43bf543c9bd2748ab196", "score": "0.7023226", "text": "function removeEventListeners() {\n\n eventsAreBound = false;\n\n document.removeEventListener( 'keydown', onDocumentKeyDown, false );\n window.removeEventListener( 'hashchange', onWindowHashChange, false );\n window.removeEventListener( 'resize', onWindowResize, false );\n\n dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );\n dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );\n dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );\n\n if( window.navigator.msPointerEnabled ) {\n dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );\n dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );\n dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );\n }\n\n if ( config.progress && dom.progress ) {\n dom.progress.removeEventListener( 'click', onProgressClicked, false );\n }\n\n [ 'touchstart', 'click' ].forEach( function( eventName ) {\n dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );\n dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );\n dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );\n dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );\n dom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );\n dom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );\n } );\n\n }", "title": "" }, { "docid": "956dd0a70ad9efdf797d135cfa32e7d9", "score": "0.70198643", "text": "function removeEventListeners() {\n\n eventsAreBound = false;\n\n document.removeEventListener( 'keydown', onDocumentKeyDown, false );\n document.removeEventListener( 'keypress', onDocumentKeyPress, false );\n window.removeEventListener( 'hashchange', onWindowHashChange, false );\n window.removeEventListener( 'resize', onWindowResize, false );\n\n if ( dom.wrapper ) {\n dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );\n dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );\n dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );\n\n // IE11\n if( window.navigator.pointerEnabled ) {\n dom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );\n dom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );\n dom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );\n }\n // IE10\n else if( window.navigator.msPointerEnabled ) {\n dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );\n dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );\n dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );\n }\n }\n\n if ( dom.progress ) {\n dom.progress.removeEventListener( 'click', onProgressClicked, false );\n }\n\n if ( dom.controls ) {\n [ 'touchstart', 'click' ].forEach( function( eventName ) {\n dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );\n dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );\n dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );\n dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );\n dom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );\n dom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );\n } );\n }\n\n }", "title": "" }, { "docid": "a753b81897b85eb2882e3c9694062292", "score": "0.70165515", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "a753b81897b85eb2882e3c9694062292", "score": "0.70165515", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "c4b5641a297b25dff5c1a7f5d6254e63", "score": "0.70117694", "text": "clearEvents() {\n\t\tthis.eventQueue.clear();\n\t}", "title": "" }, { "docid": "89cea50994a43287ec2b04f97287efef", "score": "0.7002432", "text": "removeParseListeners() {\n\t\tthis._parseListeners = null;\n\t}", "title": "" }, { "docid": "fa970ba887635c8178dd7f6c71f4534f", "score": "0.70017475", "text": "function eventsUnbinder() {\r\n if (selector !== \"hb-single\") {\r\n hbRight.removeEventListener(\"click\", next, false);\r\n hbLeft.removeEventListener(\"click\", previous, false);\r\n }\r\n hbWrapper.removeEventListener(\"touchstart\", touchStart, false);\r\n hbWrapper.removeEventListener(\"touchmove\", touchMove, false);\r\n hbWrapper.removeEventListener(\"touchend\", touchEnd, false);\r\n if (customOptions.nextPrevOnWheel) {\r\n hbWrapper.removeEventListener(\"wheel\", wheelHandler, false);\r\n }\r\n hbClose.removeEventListener(\"click\", closeLightbox, false);\r\n hbImageContainer.removeEventListener(\"click\", bgClickClose, false);\r\n window.removeEventListener(\"mouseout\", hideControls, false);\r\n window.removeEventListener(\"mouseover\", showControls, false);\r\n window.removeEventListener(\"keyup\", keyboardSupport, false);\r\n }", "title": "" }, { "docid": "a49c9b6709fce1ea702ba0c0fd233560", "score": "0.6992379", "text": "function detenerListeners() {\n if (!e) var e = window.event;\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n }", "title": "" }, { "docid": "c6400491d73fd6d9a3e2ef87250efcc0", "score": "0.6986582", "text": "function removeAllListeners(event) {\n if (eventsObj[event]) {\n delete eventsObj[event]\n }\n}", "title": "" }, { "docid": "a687296ecdea8e283d7efdbca93067cf", "score": "0.69848347", "text": "function removeListeners() {\n elements.forEach((target) => {\n document.querySelector(`[data-sq=\"${target}\"]`).removeEventListener('click', placePieceOnClick);\n });\n}", "title": "" }, { "docid": "6301068504c5eeabce946242dc8b69e7", "score": "0.69843775", "text": "unwireEvents() {\n this.element.removeEventListener(this.eventName, this.keyPressHandler);\n }", "title": "" }, { "docid": "6301068504c5eeabce946242dc8b69e7", "score": "0.69843775", "text": "unwireEvents() {\n this.element.removeEventListener(this.eventName, this.keyPressHandler);\n }", "title": "" }, { "docid": "6301068504c5eeabce946242dc8b69e7", "score": "0.69843775", "text": "unwireEvents() {\n this.element.removeEventListener(this.eventName, this.keyPressHandler);\n }", "title": "" }, { "docid": "6d25f70ded74014d1c13a09b40a30780", "score": "0.6981147", "text": "destroy() {\n this.removeListenersDOM();\n this.unsubscribers.forEach(unsubscribe => unsubscribe && unsubscribe());\n }", "title": "" }, { "docid": "44032106901dcf05383c8d01e868fb1c", "score": "0.69770926", "text": "function _remove() {\n rootElement.removeEventListener('dragstart', _handleDragStart, true);\n rootElement.removeEventListener(\"drag\", _handleDndEvent, true);\n rootElement.removeEventListener(\"dragover\", _handleDndEvent, true);\n rootElement.removeEventListener(\"dragend\", _handleDndEvent, true);\n rootElement.removeEventListener(\"dragenter\", _handleDndEvent, true);\n rootElement.removeEventListener(\"dragleave\", _handleDndEvent, true);\n rootElement.removeEventListener(\"drop\", _handleDndEvent, true);\n rootElement.removeEventListener('pointerdown', _handlePointerDown, true);\n }", "title": "" }, { "docid": "1b33e09a4ac0e8e695845526358da500", "score": "0.6974776", "text": "function clear() {\r\n __onfireEvents = {};\r\n }", "title": "" }, { "docid": "6448c316122024934c34b1d3a1c604b8", "score": "0.69692135", "text": "unsubscribeAll(event) {\n this.eventEmitter.removeAllListeners(event);\n }", "title": "" }, { "docid": "c61266cac58c7e7a068a5362cd078d2d", "score": "0.6964832", "text": "function removeMovementListeners () {\n\tallPossibleLocations.forEach(function(element) {\n\t\tvar room = document.getElementById(element);\n\t\troom.removeEventListener(\"click\", moveMyPiece);\n\n\t})\n}", "title": "" }, { "docid": "c2896603df5c532fca7837d7abf35623", "score": "0.6961764", "text": "removeItemsClickEvents() {\n for (let i = this.allItems.length - 1; i >= 0; i--) {\n this.allItems[i].removeEventListener('click', this.onItemClickListeners[i], true);\n }\n }", "title": "" }, { "docid": "b52b0844d7e2fd4acb735b761c44f371", "score": "0.69576055", "text": "function removeListeners(l) {\r\n var idx = listeners.indexOf(l);\r\n if (idx > -1) {\r\n listeners.splice(idx, 1);\r\n if (listeners.length === 0) {\r\n stop();\r\n }\r\n }\r\n }", "title": "" } ]
cc70a79abc6ddb39c2152b5e7c93af2e
functie pt stergerea unui cadou
[ { "docid": "3733f043a59daf93b36babe5ecafe6cc", "score": "0.0", "text": "function deleteGift(id) \r\n{\r\n fetch(`http://localhost:3000/gifts/${id}`, {\r\n method: 'DELETE'\r\n }).then(function() {\r\n getGifts();\r\n });\r\n}", "title": "" } ]
[ { "docid": "e9a6454f6b8a8618205248b06eee3819", "score": "0.63842154", "text": "function comportamiento_interfaz(){}", "title": "" }, { "docid": "c1e001e8a19ecaecf64f13136789b749", "score": "0.6382224", "text": "function preencheDados() {\n\n}", "title": "" }, { "docid": "6d88ba22ee1951aa7cb47da4bc4377f9", "score": "0.6082314", "text": "function inserisciCausaleSpesa() {\n inserisciCausale(\"spesa\");\n }", "title": "" }, { "docid": "5ff3d4f4908b31f2088ff6160c1fe463", "score": "0.6075395", "text": "function formaPeca(atual, vetBlocos, somador, coluna) { // Forma uma peça\n v = [];\n var qtdPecas = 0;\n var blocoIdx = 0;\n for (var i = 0; i < 4; i++) {\n var letra = geraPecas(atual);\n var linha = parseInt(letra.bloco.charAt(i)) + somador; //somador - incrementador das posições\n if (letra.color == 'cyan'){\n qtdPecas = 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ coluna +\")\");\n peca.style.backgroundColor = \"cyan\";\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n ultimaPos = linha;\n v.push(pos);\n }\n if (letra.color == 'blue'){\n qtdPecas = 2;\n if (i == 3){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) - 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 0){\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n v.push(pos);\n ultimaPos = linha;\n }\n if (letra.color == 'orange'){\n qtdPecas = 2;\n if (i == 3){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) + 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 0){\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n ultimaPos = linha;\n var pos = {lin:linha, col:parseInt(coluna)};\n v.push(pos);\n }\n if (letra.color == 'yellow' ){\n qtdPecas = 2;\n if (i == 3){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) - 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 2){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) - 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 0){\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n ultimaPos = linha;\n var pos = {lin:linha, col:parseInt(coluna)};\n v.push(pos);\n }\n if (letra.color == 'purple' ){\n qtdPecas = 3;\n if (i == 1){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) - 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 2) {\n var colunaEsp = parseInt(coluna) + 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n else if (i == 0) {\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n v.push(pos);\n ultimaPos = linha;\n }\n if (letra.color == 'red' ){\n qtdPecas = 3;\n if (i == 1){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) - 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 2) {\n var colunaEsp = parseInt(coluna) + 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n else if (i == 0) {\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n ultimaPos = linha;\n var pos = {lin:linha, col:parseInt(coluna)};\n v.push(pos);\n }\n if (letra.color == 'green' ){\n qtdPecas = 3;\n if (i == 3){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) - 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 2){ // bloco em uma posicao diferente que deve ter pintado\n var colunaEsp = parseInt(coluna) + 1;\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+linha+\") td:nth-child(\"+String(colunaEsp)+\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(colunaEsp)};\n vetBlocos.push(pos);\n v.push(pos);\n } else if (i == 0){\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n var pos = {lin:linha, col:parseInt(coluna)};\n vetBlocos.push(pos);\n v.push(pos);\n }\n var peca = document.querySelector(\"#tabela tr:nth-child(\"+ linha +\") td:nth-child(\"+ String(coluna) +\")\");\n peca.style.backgroundColor = letra.color;\n ultimaPos = linha;\n var pos = {lin:linha, col:parseInt(coluna)};\n v.push(pos);\n }\n }\n getPosicoesPeca(v);\n\n for (var i = 0; i < qtdPecas; i++) { //limpa os blocos das posições anteriores\n limpaTabela(vetBlocos[i].lin, vetBlocos[i].col);\n }\n\n ultimaPos = verificaParada(ultimaPos,parseInt(coluna));\n return ultimaPos;\n }", "title": "" }, { "docid": "078c976cea3c992a6cdc6a5d2c1d7956", "score": "0.60362905", "text": "ola(){//pode criar assim agr\n return 'oi gente'\n }", "title": "" }, { "docid": "0c5f2f65a0dda2a086ee3df8704652ab", "score": "0.60061055", "text": "function Usulutan(){\n\tDepartamento = new Array('<p>Usulutan</p>');\n\tHistoria = new Array('<p class=\"text-justify\">Usulután ubicado en la zona oriental es uno de los catorce departamentos que conforman la República de El Salvador. Su cabecera (ciudad principal) es Usulután que cuenta con una población de 73 064 habitantes según censo del 2007, ocupando la posición número 15 en población. Sus lugares turísticos más importantes son el volcán de Usulután, la laguna de Alegría en el volcán Tecapa y la bahía de Jiquilisco pero la ciudad más pintoresca es la Ciudad de Jucuapa que cuenta con el Cerro el Tigre, la frescura y el sabor del oriente con el incomparable paisaje de sus cafetales y el calor de su gente hospitalaria que hacen de Jucuapa una ciudad única al norte del departamento de Usulután con acceso en la parte Norte por la autopista Panamericana a solo 118 kilómetros de Ciudad Capital San Salvador y por el sector Sur por la Autopista Litoral cruzando el Municipio de Santa Elena.</p>');\n\t/*Declaracion de Variable Interna para recorrer el arreglo de Municipios,\n\tde la Misma manera para recorrer los elementos de otros arreglos*/\n\tvar Municipioss, Municipioss2, rios, lagos, volcanes, centertour, personaje;\n\tMunicipioss = \"\";\n\tMunicipios = new Array('<ol><span class=\"glyphicon glyphicon-home\"></span> Alegria</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Berlin</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> California</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Concepcion Batres</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> El triunfo</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Ereguayquin</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Estanzuelas</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Jiquilisco </ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Jucuaran </ol>');\n\tfor(i = 0; i < Municipios.length; i++){\n\t\tMunicipioss += Municipios[i];\n\t}\n\tMuniciipios2 = new Array('<ol><span class=\"glyphicon glyphicon-home\"></span> Usulután</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Mercedez Umaña</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Nueva Granada</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Ozatlan</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Puerto el triunfo</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> San Agustin</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> San Buenaventura</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> San Dioniso</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> San Francisco Javier</ol>');\n\tfor(m = 0; m< Municiipios2.length; m++){\n\t\tMunicipioss2 += Municiipios2[m];\n\t}\n\tRios = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Rio El Molino</ol>', '<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Playa El Espino</ol>', '<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Bahia de Jiquilisco</ol>');\n\trios = \"\";\n\tfor(j = 0; j < Rios.length; j++){\n\t\trios += Rios[j];\n\t}\n\tLagos = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Laguna del Palo Galan</ol>', '<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Lago La Alegria</ol>');\n\tlagos = \"\";\n\tfor(l = 0; l < Lagos.length; l++){\n\t\tlagos += Lagos[l];\n\t}\n\tVolcanes = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Volcan de Usulutan</ol>');\n\tPersonajes = new Array('<ol><span class=\"glyphicon glyphicon-ok\"></span> Pedro Alvarado</ol>', '<ol><span class=\"glyphicon glyphicon-ok\"></span> Diego Rojas</ol>', '<ol><span class=\"glyphicon glyphicon-ok\"></span> Diego de Holguin</ol>');\n\tpersonaje = \"\";\n\tfor(k = 0; k < Personajes.length; k++){\n\t\tpersonaje += Personajes[k];\n\t}\n\tCentroTour = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Bosque Nancuchiname</ol>', '<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Parque Acuatico Santa Elena</ol>');\n\tcentertour = \"\";\n\tfor(c = 0; c < CentroTour.length; c++){\n\t\tcentertour += CentroTour[c];\n\t}\n\n\tdocument.getElementById(\"Departament\").innerHTML = Departamento[0];\n\tdocument.getElementById(\"HistoryUs\").innerHTML = Historia[0];\n\tdocument.getElementById(\"Municipio\").innerHTML = Municipioss;\n\tdocument.getElementById(\"Municipio2\").innerHTML = Municipioss2;\n\tdocument.getElementById(\"centro\").innerHTML = centertour;\n\tdocument.getElementById(\"Persons\").innerHTML = personaje;\n\tdocument.getElementById(\"river\").innerHTML = rios;\n\tdocument.getElementById(\"laguna\").innerHTML = lagos;\n\tdocument.getElementById(\"volca\").innerHTML = Volcanes[0];\n}", "title": "" }, { "docid": "7a4ba6c99e8a627b5b716d9ef1d25e9d", "score": "0.60050696", "text": "function TextoComprimeDiccionario(cadOrigen)\r\n{\r\n let aReturn = '';\r\n let flipFlopUpper = false;\r\n try\r\n {\r\n let splitArray = cadOrigen.split(' ');\r\n let i = 0;\r\n let j = 0;\r\n let cadAux='';\r\n let auxSearch = false;\r\n let cadCompress = '';\r\n for (i=0; i<splitArray.length; i++)\r\n { \r\n cadAux = splitArray[i].toUpperCase(); //convierto mayusculas\r\n cadAux = cadAux.normalize('NFD').replace(/[\\u0300-\\u036f]/g,\"\");\r\n auxSearch = false;\r\n cadCompress = '';\r\n for (j=0;j<gb_dic_ES.length;j+=2)\r\n {\r\n\tif (gb_dic_ES[j] === cadAux)\r\n\t{\t \r\n\t cadCompress = gb_dic_ES[j+1];\r\n\t auxSearch = true;\r\n\t break;\r\n\t}\t\r\n }\r\n flipFlopUpper = !flipFlopUpper; //Sustituimos espacios por cambio Mayusculas Minusculas\r\n if (auxSearch === true)\r\n { \t \r\n\tcadCompress = (flipFlopUpper === true) ? cadCompress.toUpperCase() : cadCompress.toLowerCase();\r\n\taReturn += cadCompress;\r\n }\r\n else\r\n {//Si no comprime deja misma palabra\r\n\taReturn += (flipFlopUpper === true)? cadAux.toUpperCase() : cadAux.toLowerCase();\r\n }\r\n } \r\n }\r\n catch(err)\r\n { \r\n DebugLog(err.message.toString());\r\n }\r\n return aReturn;\r\n}", "title": "" }, { "docid": "d03d8b9fabcc2a3f64ddef6b2a4314d9", "score": "0.59908867", "text": "function verAlto(tubo){\r\n\talto= tubo.alto + 312;\r\n\treturn alto;\r\n}", "title": "" }, { "docid": "77e47d884455e1390e96704ec5ca9a77", "score": "0.59774387", "text": "function pruebaEj4(){\n var cadena= \" HÓ;L;Á mÚ,ndÓ téNG.O muCH;OSs éSSSP,áaci.ós \";\n console.log(largoDeCadena(cadena)); \n}", "title": "" }, { "docid": "005bec2c443f71a5572b702872186702", "score": "0.59657055", "text": "function spausdintiTeksta( manoTekstas ) {\n console.log( \"ivestas tekstas yra: \" + manoTekstas );\n}", "title": "" }, { "docid": "9eedb1a0601a8b26323144f59bde4f75", "score": "0.59370834", "text": "function vuelo(codigo,horaSalida,horaLLegada) {\n\t// Atributos del vuelo\n\tthis.codigo=codigo;\n this.horaSalida=horaSalida;\n\tthis.horaLLegada=horaLLegada;\n \n\n\t// cambia hora llegada\n\tfunction cambiarHoraLLegada(nuevaHora){\n\t\tthis.horaLLegada=nuevaHora;\n\t}\n\tthis.cambiarHoraLLegada=cambiarHoraLLegada;\n\n\n\t// cambia hora salida\n\tfunction cambiarHoraSalida(nuevaHora){\n\t\tthis.horaSalida=nuevaHora;\n\t}\n\tthis.cambiarHoraSalida=cambiarHoraSalida;\n\n // Comprueba si llegada posterior a salida\n function compruebaLLegadaMayorSalida(){\n lleg=this.horaLLegada.split(\":\");\n sal=this.horaSalida.split(\":\");\n \n hhlleg=parseInt(lleg[0]);\n mmlleg=parseInt(lleg[1]);\n \n hhsal=parseInt(sal[0]);\n mmsal=parseInt(sal[1]);\n //alert(\"hhsal \"+hhsal+ \" hhlleg \"+hhlleg);\n \n if(hhlleg>hhsal){\n return true;\n }\n else if(hhlleg<hhsal){\n return false;\n }\n else{\n if(mmlleg>mmsal){\n return true;\n }\n else{\n return false;\n }\n }\n }\n \n\tthis.compruebaLLegadaMayorSalida=compruebaLLegadaMayorSalida;\n\n}", "title": "" }, { "docid": "5764d3f43218b2ceb6227db02cca1dcf", "score": "0.59161675", "text": "function calcularprueba(){\n\n}", "title": "" }, { "docid": "fbc7c84bffc13c6156e7054ce9760573", "score": "0.59151924", "text": "function modofacil(){\n \n desenhandoTextos(\"Primeiro Nivel\",0,10,\"black\"); \n \n}", "title": "" }, { "docid": "e0acf32ee3f9d3a67f92bc7ff646f723", "score": "0.59142417", "text": "function TextoDescomprimeDiccionario(cadOrigen)\r\n{\r\n let aReturn = '';\r\n let beforeflipFlopUpper = false;\r\n try\r\n {\r\n let i = 0;\r\n let j = 0;\r\n let cadAux=''; \r\n let isUpper = (cadOrigen[0].toUpperCase() === cadOrigen[0])? true: false;\r\n let isUpper_before = isUpper;\r\n let auxLen = cadOrigen.length;\r\n let cadDecompress='';\r\n let auxSearch= false;\r\n for (i=0; i < auxLen; i++)\r\n { \r\n isUpper = (cadOrigen[i].toUpperCase() === cadOrigen[i])? true: false; \r\n if (\r\n (isUpper_before != isUpper)\r\n\t ||\r\n\t (i === (auxLen-1))\r\n\t )\r\n {//Cambio de mayusculas o minuscula, es un espacio\r\n\tisUpper_before = isUpper;\r\n\tcadAux += (i === (auxLen-1))? cadOrigen[i]: ''; //Ultimo caracter, ultima palabra\r\n\t\r\n\tcadAux = cadAux.toUpperCase(); //convertimos a mayusculas\r\n auxSearch = false;\r\n cadDecompress = '';\r\n for (j=0;j<(gb_dic_ES.length-1);j+=2)\r\n {\r\n\t if (gb_dic_ES[j+1] === cadAux)\r\n\t {\t \r\n\t cadDecompress = gb_dic_ES[j];\r\n\t auxSearch = true;\r\n\t break;\r\n\t }\r\n }\r\n if (auxSearch === true)\r\n\t{\r\n\t aReturn += cadDecompress;\t \r\n\t}\r\n else\r\n\t{\r\n\t aReturn += cadAux; //No decodifica palabra\r\n }\r\n\taReturn += (i === (auxLen-1))? '':' '; //Si no es ultima palabra aniade espacio\r\n\tcadAux = '';\r\n } \r\n cadAux += cadOrigen[i];\r\n }\r\n }\r\n catch(err)\r\n { \r\n DebugLog(err.message.toString());\r\n }\r\n return aReturn;\r\n}", "title": "" }, { "docid": "c4f829b3d8edf1965a4715ef6a6b8e13", "score": "0.58925223", "text": "function perimetroCuadrado(lado)\n{\n return lado*4;\n}", "title": "" }, { "docid": "b9b82637744aed344ee444632df4094d", "score": "0.5889087", "text": "function calcolaTeglia(area, numero_p, idratazione){\n var peso= area*0.50;\n var farina=peso*0.55;\n\n document.getElementById(\"res_far\").innerHTML = (numero_p*farina).toFixed(0);\n var acqua=document.getElementById(\"res_h2o\").innerHTML = (numero_p*farina*(idratazione/100)).toFixed(0);\n document.getElementById(\"res_lie\").innerHTML = (numero_p*farina*0.007).toFixed(2);\n document.getElementById(\"res_sal\").innerHTML = ((numero_p*acqua*25)/1000).toFixed(1);\n document.getElementById(\"res_oli\").innerHTML = ((numero_p*acqua*20)/1000).toFixed(0);\n}", "title": "" }, { "docid": "47a33f18c45a50ce6ea762cbc7015099", "score": "0.5887261", "text": "function pintaCuadroInfo(){\n var frame = C.imgSet.prota.quieto;\n ctx.save();\n ctx.translate(V.panta.w - C.dims.cuadroInfo.w, 0);\n //nave\n ctx.rotate(-90 * Math.PI / 180);\n pinta(frame.x, frame.y, frame.w, frame.h, -29, 28, 25, 25, 'prota');\n ctx.rotate(90 * Math.PI / 180);\n //barra de vida\n ctx.strokeStyle = '#f23';\n ctx.strokeRect(55, 10, 135, 10)\n ctx.fillStyle = '#d23';\n ctx.fillRect(56, 11, V.prota.vida, 8)\n ctx.restore();\n }", "title": "" }, { "docid": "606eb6e033820d0a10c62c71853802b7", "score": "0.58839995", "text": "function cambiarComaPorPunto(p_precio){\n\ttamaño_float = p_precio.length;\n\ti=0;\n\tcadena = \"\";\n\twhile (i<tamaño_float) {\n\t\tif(p_precio[i] == \",\"){\n\t\t\tcadena = cadena + \".\";\n\t\t}\n\t\telse {\n\t\t\tcadena = cadena + p_precio[i];\n\t\t}\n\t\ti++;\t\n\t}\n\tp_precio = cadena;\n\treturn p_precio;\n}", "title": "" }, { "docid": "bbf7a4bb887a7a78f9a017475fa846b1", "score": "0.5855316", "text": "function CapNhatThongTin(){\n//Lay thong tin va tao doi tuong\nvar nhanVien = LayThongTin();\n\n//Cập nhật Đè lên đối tượng cần sửa\nvar index = TimViTri(nhanVien.maNhanVien);\nmangNhanVien[index] = nhanVien;\n\nHienThi(mangNhanVien);\n}", "title": "" }, { "docid": "688fbe333bcb12b86ad479e0e5ffe662", "score": "0.58504003", "text": "function t(e,t,a,i){var r=e+\" \";switch(a){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\",r;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\",r;case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\",r;case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\",r;case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\",r}}", "title": "" }, { "docid": "f6a7b63a1d00ee907657c74c20383a42", "score": "0.58488727", "text": "function miFuncion() {\n //esto es lo que hace la funcion\n //se llama cuerpo\n\n\n}", "title": "" }, { "docid": "921d5dc59956857186404c4c02688a5f", "score": "0.58397794", "text": "function hitungLuasSegitiga(alas,tinggi){\n luas=0.5*alas*tinggi\n return luas;\n}", "title": "" }, { "docid": "0577518006e4ddb09f62ba831c2e4ae8", "score": "0.58370227", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":if(e===1){i+=t?\"sekundo\":\"sekundi\"}else if(e===2){i+=t||r?\"sekundi\":\"sekundah\"}else if(e<5){i+=t||r?\"sekunde\":\"sekundah\"}else{i+=\"sekund\"}return i;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":if(e===1){i+=t?\"minuta\":\"minuto\"}else if(e===2){i+=t||r?\"minuti\":\"minutama\"}else if(e<5){i+=t||r?\"minute\":\"minutami\"}else{i+=t||r?\"minut\":\"minutami\"}return i;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":if(e===1){i+=t?\"ura\":\"uro\"}else if(e===2){i+=t||r?\"uri\":\"urama\"}else if(e<5){i+=t||r?\"ure\":\"urami\"}else{i+=t||r?\"ur\":\"urami\"}return i;case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":if(e===1){i+=t||r?\"dan\":\"dnem\"}else if(e===2){i+=t||r?\"dni\":\"dnevoma\"}else{i+=t||r?\"dni\":\"dnevi\"}return i;case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":if(e===1){i+=t||r?\"mesec\":\"mesecem\"}else if(e===2){i+=t||r?\"meseca\":\"mesecema\"}else if(e<5){i+=t||r?\"mesece\":\"meseci\"}else{i+=t||r?\"mesecev\":\"meseci\"}return i;case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":if(e===1){i+=t||r?\"leto\":\"letom\"}else if(e===2){i+=t||r?\"leti\":\"letoma\"}else if(e<5){i+=t||r?\"leta\":\"leti\"}else{i+=t||r?\"let\":\"leti\"}return i}}", "title": "" }, { "docid": "0577518006e4ddb09f62ba831c2e4ae8", "score": "0.58370227", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":if(e===1){i+=t?\"sekundo\":\"sekundi\"}else if(e===2){i+=t||r?\"sekundi\":\"sekundah\"}else if(e<5){i+=t||r?\"sekunde\":\"sekundah\"}else{i+=\"sekund\"}return i;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":if(e===1){i+=t?\"minuta\":\"minuto\"}else if(e===2){i+=t||r?\"minuti\":\"minutama\"}else if(e<5){i+=t||r?\"minute\":\"minutami\"}else{i+=t||r?\"minut\":\"minutami\"}return i;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":if(e===1){i+=t?\"ura\":\"uro\"}else if(e===2){i+=t||r?\"uri\":\"urama\"}else if(e<5){i+=t||r?\"ure\":\"urami\"}else{i+=t||r?\"ur\":\"urami\"}return i;case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":if(e===1){i+=t||r?\"dan\":\"dnem\"}else if(e===2){i+=t||r?\"dni\":\"dnevoma\"}else{i+=t||r?\"dni\":\"dnevi\"}return i;case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":if(e===1){i+=t||r?\"mesec\":\"mesecem\"}else if(e===2){i+=t||r?\"meseca\":\"mesecema\"}else if(e<5){i+=t||r?\"mesece\":\"meseci\"}else{i+=t||r?\"mesecev\":\"meseci\"}return i;case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":if(e===1){i+=t||r?\"leto\":\"letom\"}else if(e===2){i+=t||r?\"leti\":\"letoma\"}else if(e<5){i+=t||r?\"leta\":\"leti\"}else{i+=t||r?\"let\":\"leti\"}return i}}", "title": "" }, { "docid": "cd86882b023559f4684ddd135ff34725", "score": "0.5828729", "text": "function cumpleaños(persona){\n return{\n ...persona,\n edad: persona.edad +1\n }\n}", "title": "" }, { "docid": "7547b5dc67f606b36ae4bf94b440514d", "score": "0.5813249", "text": "function t(e,t,n,a){var i=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "7547b5dc67f606b36ae4bf94b440514d", "score": "0.5813249", "text": "function t(e,t,n,a){var i=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "e214f14d5523483043d7676354d9ecd3", "score": "0.5808844", "text": "function t(e,t,a,n){var r=e+\" \";switch(a){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\";case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\";case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\";case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\"}}", "title": "" }, { "docid": "8dcfa2f224c1841c075d63a608f8aed7", "score": "0.5808564", "text": "function a(e,a,s,t){var n=e+\" \";switch(s){case\"s\":return a||t?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return n+=1===e?a?\"sekundo\":\"sekundi\":2===e?a||t?\"sekundi\":\"sekundah\":e<5?a||t?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return a?\"ena minuta\":\"eno minuto\";case\"mm\":return n+=1===e?a?\"minuta\":\"minuto\":2===e?a||t?\"minuti\":\"minutama\":e<5?a||t?\"minute\":\"minutami\":a||t?\"minut\":\"minutami\";case\"h\":return a?\"ena ura\":\"eno uro\";case\"hh\":return n+=1===e?a?\"ura\":\"uro\":2===e?a||t?\"uri\":\"urama\":e<5?a||t?\"ure\":\"urami\":a||t?\"ur\":\"urami\";case\"d\":return a||t?\"en dan\":\"enim dnem\";case\"dd\":return n+=1===e?a||t?\"dan\":\"dnem\":2===e?a||t?\"dni\":\"dnevoma\":a||t?\"dni\":\"dnevi\";case\"M\":return a||t?\"en mesec\":\"enim mesecem\";case\"MM\":return n+=1===e?a||t?\"mesec\":\"mesecem\":2===e?a||t?\"meseca\":\"mesecema\":e<5?a||t?\"mesece\":\"meseci\":a||t?\"mesecev\":\"meseci\";case\"y\":return a||t?\"eno leto\":\"enim letom\";case\"yy\":return n+=1===e?a||t?\"leto\":\"letom\":2===e?a||t?\"leti\":\"letoma\":e<5?a||t?\"leta\":\"leti\":a||t?\"let\":\"leti\"}}", "title": "" }, { "docid": "38d89d12f40175ee992c266dc7b71107", "score": "0.58084923", "text": "function t(e,t,a,n){var i=e+\" \";switch(a){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\";case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\";case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\";case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\"}}", "title": "" }, { "docid": "d565f924fa8722c4f20289c65658268e", "score": "0.580786", "text": "function volver_estacionamiento(coord_punto,adyacentes_actual,grafo,grafo_posiciones)\r\n{\r\nvar aux=grafo_pos_punto_ruta(grafo_posiciones,data.nodos.etiquetas);\r\nvar ruta=new Array();\r\n//console.log(\"VOLVER:entre\");\r\nvar id=nodo_distancia_menor(coord_punto,aux);\r\n//console.log(\"Pepe la lleva\");\r\nruta=obtener_ruta(1,[id],adyacentes_actual,grafo_pi(grafo,aux,coord_punto));\r\nruta.push(-2);\r\nreturn ruta;\r\n}", "title": "" }, { "docid": "2b304a87419f686679ad110008c13184", "score": "0.5805254", "text": "function affiche() {\n\n}", "title": "" }, { "docid": "9232b42a65cc7a553f0b89c972b1bf62", "score": "0.58032703", "text": "function perimetroCuadrado (lado){\r\n return lado * 4 ; \r\n}", "title": "" }, { "docid": "8e1bc8ffc9377c654bcc075a3a2151c2", "score": "0.58027184", "text": "function areaCuadrado(lado){\n return lado * lado;\n}", "title": "" }, { "docid": "ca1193cb6d47310f7844c8751a352c01", "score": "0.58021516", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":if(e===1){r+=t?\"sekundo\":\"sekundi\"}else if(e===2){r+=t||i?\"sekundi\":\"sekundah\"}else if(e<5){r+=t||i?\"sekunde\":\"sekundah\"}else{r+=\"sekund\"}return r;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":if(e===1){r+=t?\"minuta\":\"minuto\"}else if(e===2){r+=t||i?\"minuti\":\"minutama\"}else if(e<5){r+=t||i?\"minute\":\"minutami\"}else{r+=t||i?\"minut\":\"minutami\"}return r;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":if(e===1){r+=t?\"ura\":\"uro\"}else if(e===2){r+=t||i?\"uri\":\"urama\"}else if(e<5){r+=t||i?\"ure\":\"urami\"}else{r+=t||i?\"ur\":\"urami\"}return r;case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":if(e===1){r+=t||i?\"dan\":\"dnem\"}else if(e===2){r+=t||i?\"dni\":\"dnevoma\"}else{r+=t||i?\"dni\":\"dnevi\"}return r;case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":if(e===1){r+=t||i?\"mesec\":\"mesecem\"}else if(e===2){r+=t||i?\"meseca\":\"mesecema\"}else if(e<5){r+=t||i?\"mesece\":\"meseci\"}else{r+=t||i?\"mesecev\":\"meseci\"}return r;case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":if(e===1){r+=t||i?\"leto\":\"letom\"}else if(e===2){r+=t||i?\"leti\":\"letoma\"}else if(e<5){r+=t||i?\"leta\":\"leti\"}else{r+=t||i?\"let\":\"leti\"}return r}}", "title": "" }, { "docid": "3b07d950747ae826900ff14a097a63bf", "score": "0.580179", "text": "function t(e,t,r,o){var n=e+\" \";switch(r){case\"s\":return t||o?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return n+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||o?\"sekundi\":\"sekundah\":e<5?t||o?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return n+=1===e?t?\"minuta\":\"minuto\":2===e?t||o?\"minuti\":\"minutama\":e<5?t||o?\"minute\":\"minutami\":t||o?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return n+=1===e?t?\"ura\":\"uro\":2===e?t||o?\"uri\":\"urama\":e<5?t||o?\"ure\":\"urami\":t||o?\"ur\":\"urami\";case\"d\":return t||o?\"en dan\":\"enim dnem\";case\"dd\":return n+=1===e?t||o?\"dan\":\"dnem\":2===e?t||o?\"dni\":\"dnevoma\":t||o?\"dni\":\"dnevi\";case\"M\":return t||o?\"en mesec\":\"enim mesecem\";case\"MM\":return n+=1===e?t||o?\"mesec\":\"mesecem\":2===e?t||o?\"meseca\":\"mesecema\":e<5?t||o?\"mesece\":\"meseci\":t||o?\"mesecev\":\"meseci\";case\"y\":return t||o?\"eno leto\":\"enim letom\";case\"yy\":return n+=1===e?t||o?\"leto\":\"letom\":2===e?t||o?\"leti\":\"letoma\":e<5?t||o?\"leta\":\"leti\":t||o?\"let\":\"leti\"}}", "title": "" }, { "docid": "2c82e6070ad2fc6fa9e089d1fa1f4eeb", "score": "0.5801556", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "2c82e6070ad2fc6fa9e089d1fa1f4eeb", "score": "0.5801556", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "2c82e6070ad2fc6fa9e089d1fa1f4eeb", "score": "0.5801556", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "2c82e6070ad2fc6fa9e089d1fa1f4eeb", "score": "0.5801556", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "710adee698e0a5d6310411ba5801e236", "score": "0.57966053", "text": "function t(e,t,n,a){var i=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\",i;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\",i;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\",i;case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\",i;case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\",i;case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\",i}}", "title": "" }, { "docid": "79a0ea0be6adb018aaee848323a6035c", "score": "0.5793221", "text": "function t(e,t,a,n){var o=e+\" \";switch(a){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return o+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return o+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return o+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\";case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return o+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\";case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return o+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\";case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return o+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\"}}", "title": "" }, { "docid": "67adb1b1283e8feb3b020dd010c19c2a", "score": "0.5790269", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\",r;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\",r;case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\",r;case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\",r;case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\",r}}", "title": "" }, { "docid": "67adb1b1283e8feb3b020dd010c19c2a", "score": "0.5790269", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\",r;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\",r;case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\",r;case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\",r;case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\",r}}", "title": "" }, { "docid": "67adb1b1283e8feb3b020dd010c19c2a", "score": "0.5790269", "text": "function t(e,t,n,a){var r=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\",r;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\",r;case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\",r;case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\",r;case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\",r}}", "title": "" }, { "docid": "70cca4659759f96f17fb6831d8d18a05", "score": "0.57902116", "text": "function t(e,t,a,n){var i=e+\" \";switch(a){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\",i;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\",i;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\",i;case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\",i;case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\",i;case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\",i}}", "title": "" }, { "docid": "70cca4659759f96f17fb6831d8d18a05", "score": "0.57902116", "text": "function t(e,t,a,n){var i=e+\" \";switch(a){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\",i;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\",i;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\",i;case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\",i;case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\",i;case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\",i}}", "title": "" }, { "docid": "289dbe58ed6da462aed690b72dc3b454", "score": "0.5789325", "text": "function getPelnas1(pajamos, nuostoliai) {\n return pajamos - nuostoliai;\n}", "title": "" }, { "docid": "60114a4cc96feba67df74224828df30e", "score": "0.57875824", "text": "function t(e,t,n,a){var o=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return o+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return o+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return o+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\";case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return o+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\";case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return o+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\";case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return o+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\"}}", "title": "" }, { "docid": "d3716c57bfd778ad434b55c6a0d857e8", "score": "0.57830757", "text": "function atlyginimasPoMokesciu( atlyginimasAntPopieriaus ) {\n var psd = 9;\n var vsd = 24;\n var moketiPsd = (atlyginimasAntPopieriaus * psd / 100);\n var moketiVsd =( (atlyginimasAntPopieriaus / 2) * vsd / 100);\n var visoMokesciu = ( atlyginimasAntPopieriaus * psd / 100);\n console.log( \" sumoketi psd: \" + visoMokesciu);\n\n}", "title": "" }, { "docid": "b86106363db027e5ee377fe0c28e9426", "score": "0.57802576", "text": "function perimetroCuadrado(lado){\n return lado*4;\n}", "title": "" }, { "docid": "c1e25c074eca6bb7da7c8e29b20ca6cf", "score": "0.5780146", "text": "function perimetroCuadrado(lado){\n return lado * 4;\n}", "title": "" }, { "docid": "ce69d4aa0c9aef277f46b162f5c71bd1", "score": "0.577566", "text": "function t(e,t,a,r){var n=e+\" \";switch(a){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return n+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\",n;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return n+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\",n;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return n+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\",n;case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return n+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\",n;case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return n+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\",n;case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return n+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\",n}}", "title": "" }, { "docid": "9732e20fc3b38f3ed7a18587060b59ea", "score": "0.5772617", "text": "function t(e,t,n,a){var o=e+\" \";switch(n){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return o+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\",o;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return o+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\",o;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return o+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\",o;case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return o+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\",o;case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return o+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\",o;case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return o+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\",o}}", "title": "" }, { "docid": "bb6bb5450cd14fda44677bf3606a7c6d", "score": "0.57679963", "text": "function colocarimagem0(ou,t){\r\n\t\toupc = ou;\r\n\t\tconsole.log(\"JOGADOR jogou: \"+ou);\r\n\t\t\r\n\r\n\t\tif(vet[oupc]!=0){ console.log(\"Você não pode jogar ai\"); oupc=10 /*ele recebe 10 porque essa posição não existe*/}else{//nessa linha eu evito que jogue em um lugar que já foi jogado;\r\n\t\t\tt.innerHTML= \"<img src='x.png'>\";\r\n\t\t\tvet[ou]=1;\r\n\t\t\t\r\n\r\n\t\t\tfor(i=0; i< vet.length; i++){ \r\n\t\t\t\tif(vet[i]==0){\r\n\t\t\t\t\tjogadapc();\r\n\t\t\t\t\ti=9;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\tif ((vet[0]>0)&(vet[1]>0)&(vet[2]>0)&(vet[3]>0)&(vet[4]>0)&(vet[5]>0)&(vet[6]>0)&(vet[7]>0)&(vet[8]>0)){\r\n\t\t\t\t\tvencedor();\r\n\t\t\t\t\tswitch (verificarvitoria) { case 1: alert(\"VOCÊ GANHOU\"); break; case 2: alert(\"O PC GANHOU!\"); break; case 0: break; }\r\n\t\t\t\t}\r\n\r\n\t\t\r\n\t}", "title": "" }, { "docid": "386b20b4d14125c972322b1f52898dd9", "score": "0.5763929", "text": "function hitungLuasSegiEmpat(sisi){\n luas =sisi*sisi\n return luas\n}", "title": "" }, { "docid": "5d437d6a8be8ead82cbae3f658186c48", "score": "0.5763077", "text": "function t(e,t,r,a){var n=e+\" \";switch(r){case\"s\":return t||a?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return n+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||a?\"sekundi\":\"sekundah\":e<5?t||a?\"sekunde\":\"sekundah\":\"sekund\",n;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return n+=1===e?t?\"minuta\":\"minuto\":2===e?t||a?\"minuti\":\"minutama\":e<5?t||a?\"minute\":\"minutami\":t||a?\"minut\":\"minutami\",n;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return n+=1===e?t?\"ura\":\"uro\":2===e?t||a?\"uri\":\"urama\":e<5?t||a?\"ure\":\"urami\":t||a?\"ur\":\"urami\",n;case\"d\":return t||a?\"en dan\":\"enim dnem\";case\"dd\":return n+=1===e?t||a?\"dan\":\"dnem\":2===e?t||a?\"dni\":\"dnevoma\":t||a?\"dni\":\"dnevi\",n;case\"M\":return t||a?\"en mesec\":\"enim mesecem\";case\"MM\":return n+=1===e?t||a?\"mesec\":\"mesecem\":2===e?t||a?\"meseca\":\"mesecema\":e<5?t||a?\"mesece\":\"meseci\":t||a?\"mesecev\":\"meseci\",n;case\"y\":return t||a?\"eno leto\":\"enim letom\";case\"yy\":return n+=1===e?t||a?\"leto\":\"letom\":2===e?t||a?\"leti\":\"letoma\":e<5?t||a?\"leta\":\"leti\":t||a?\"let\":\"leti\",n}}", "title": "" }, { "docid": "daf21c99abc9e4c38476bfb08cc118dd", "score": "0.57619846", "text": "function gradoDato(){\n\tw=0;\n\ttermina = false;\n\tvar dato=document.getElementById(\"ancestrosDe\").value;\n\tx = raiz;\n\tcolaPadres = new cola();\n\tcolaPadres.encolar(x);\n\tpad=0;\n\twhile(!colaPadres.esVacia() && !termina){\n\t\tx = colaPadres.desencolar();\n\t\tp = x.retornaLi();\n\t\twhile (p!==null && !termina) {\n\t\t\tif (p.retornaObjeto() == dato) {\n\t\t\t\tp = p.retornaLi();\n\t\t\t\twhile(p != null){\n\t\t\t\t\tw++;\n\t\t\t\t\tp = p.retornaLd();\n\t\t\t\t}\n\t\t\t\tdocument.getElementById(\"gradoNodo\").innerHTML= w;\n\t\t\t\treturn x.retornaObjeto(); \n\t\t\t}\t\n\t\t\tif (p.retornaLi() != null) {colaPadres.encolar(p)}\n\t\t\tp = p.retornaLd();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5dba43e91d9d69fbb29f24803cd78c80", "score": "0.57608706", "text": "function t(e,t,a,n){var s=e+\" \";switch(a){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return s+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return s+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return s+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\";case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return s+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\";case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return s+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\";case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return s+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\"}}", "title": "" }, { "docid": "3970d37b3030224039f7cdca42bd650e", "score": "0.5759655", "text": "function areaCuadrado (lado) {\r\n return lado * lado;\r\n}", "title": "" }, { "docid": "062d61bcac47d6ab015cd3f9e223048b", "score": "0.5757798", "text": "function t(e,t,i,n){var r=e+\" \";switch(i){case\"s\":return t||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||n?\"sekundi\":\"sekundah\":e<5?t||n?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||n?\"minuti\":\"minutama\":e<5?t||n?\"minute\":\"minutami\":t||n?\"minut\":\"minutami\",r;case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||n?\"uri\":\"urama\":e<5?t||n?\"ure\":\"urami\":t||n?\"ur\":\"urami\",r;case\"d\":return t||n?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||n?\"dan\":\"dnem\":2===e?t||n?\"dni\":\"dnevoma\":t||n?\"dni\":\"dnevi\",r;case\"M\":return t||n?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||n?\"mesec\":\"mesecem\":2===e?t||n?\"meseca\":\"mesecema\":e<5?t||n?\"mesece\":\"meseci\":t||n?\"mesecev\":\"meseci\",r;case\"y\":return t||n?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||n?\"leto\":\"letom\":2===e?t||n?\"leti\":\"letoma\":e<5?t||n?\"leta\":\"leti\":t||n?\"let\":\"leti\",r}}", "title": "" }, { "docid": "7a28857601072176293e2ac046348bd8", "score": "0.57576764", "text": "function e(t,e,o,r){var i=t+\" \";switch(o){case\"s\":return e||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||r?\"sekundi\":\"sekundah\":t<5?e||r?\"sekunde\":\"sekundah\":\"sekund\",i;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===t?e?\"minuta\":\"minuto\":2===t?e||r?\"minuti\":\"minutama\":t<5?e||r?\"minute\":\"minutami\":e||r?\"minut\":\"minutami\",i;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===t?e?\"ura\":\"uro\":2===t?e||r?\"uri\":\"urama\":t<5?e||r?\"ure\":\"urami\":e||r?\"ur\":\"urami\",i;case\"d\":return e||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===t?e||r?\"dan\":\"dnem\":2===t?e||r?\"dni\":\"dnevoma\":e||r?\"dni\":\"dnevi\",i;case\"M\":return e||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===t?e||r?\"mesec\":\"mesecem\":2===t?e||r?\"meseca\":\"mesecema\":t<5?e||r?\"mesece\":\"meseci\":e||r?\"mesecev\":\"meseci\",i;case\"y\":return e||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===t?e||r?\"leto\":\"letom\":2===t?e||r?\"leti\":\"letoma\":t<5?e||r?\"leta\":\"leti\":e||r?\"let\":\"leti\",i}}", "title": "" }, { "docid": "d5b84479c017ea6377238c6390361edc", "score": "0.5757484", "text": "function pruebaEj2(){\n var cadena= \" HÓLÁ mÚndÓ téNGO muCHOSs éSSSPáciññós \";\n console.log(modificarCadena(cadena));\n}", "title": "" }, { "docid": "74307ead2b04e30240e5b172b16bfd3f", "score": "0.57570744", "text": "function CeroALaIzq (pantalla,tec){ \n AnimarBoton(tec);\n if(ig==false){\n if (LargoDigitos() == false){ \n var resultado = \"\";\n if (pantalla == \"0\"){\n resultado = tec;\n }else{\n resultado = pantalla+tec;\n }\n return resultado;\n }else{\n return pantalla;\n }\n }else{\n On();\n return tec;\n }\n}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5754832", "text": "function t(e,t,n,r){var a=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.57544166", "text": "function t(e,t,n,i){var r=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "c6a9587c562c3fa54f779938cc729d2e", "score": "0.575372", "text": "function tipuscasella(jugador){\n\tvar casella = jugadors[jugador].pos;\n\t//casella normal\n\tif (tauler[casella].tipus == 'grau' || tauler[casella].tipus == 'uni' || tauler[casella].tipus == 'daus'){\n\t\tif (tauler[casella].propietari == 0 ){\n\t\t\t// Possibilitat de comprar\n\t\t\tif ((jugadors[jugador].mon >= tauler[casella].preu) && volscomprar[jugador]()) {\n\t\t\t\tincrementa (- tauler[casella].preu,jugador);\n\t\t\t\ttauler[casella].propietari = jugador;\n\t\t\t\tactualitzapropietats(jugador);\n\t\t\t}\n\t\t}\n\t\telse if (tauler[casella].propietari == jugador){\n\t\t\t// Res\n\t\t} else {\n\t\t\t// Has de pagar a un altre jugador\n\t\t\tif (tauler[casella].tipus == 'uni') {\n\t\t\t\ttransferencia(taxauni(tauler[casella].propietari),\n\t\t\t\t\ttauler[casella].propietari, jugador);\n\t\t\t} else if (tauler[casella].tipus == 'daus') {\n\t\t\t\ttransferencia(taxadaus()*daus,\n\t\t\t\t\ttauler[casella].propietari, jugador);\n\t\t\t} else {\n\t\t\t\ttransferencia(tauler[casella].taxa[tauler[casella].level],\n\t\t\t\t\ttauler[casella].propietari, jugador);\n\t\t\t}\n\t\t}\n\t}\n\telse if (tauler[casella].tipus == 'festes') festes(jugador);\t\n\telse if (tauler[casella].tipus == 'examens') examens(jugador);\n\telse if (tauler[casella].tipus == 'impostos'){\n\t\tif (casella == 2) incrementa(-200, jugador);\n\t\telse incrementa(-100, jugador);\n\t}\n\telse if (tauler[casella].nom == 'Any sabàtic') jugadors[jugador].missturns = 1;\n\telse if (tauler[casella].nom == 'Aeroport') {\n\t\tjugadors[jugador].pos = Math.floor((Math.random()*ncaselles));\n\t\tif (jugadors[jugador].pos < 24) jugadors[jugador].mon += 200;\n\t\trefreshpos(jugador);\n\t\ttipuscasella(jugador);\n\t}\n\telse if (tauler[casella].nom == 'Corrupció') {\n\t\tjugadors[jugador].mon += iva;\n\t\tiva = 0;\n\t}\n\telse if (tauler[casella].nom == 'Vés a la presó'){\n\t\t\tjugadors[jugador].pos = 10;\n\t\t\tjugadors[jugador].jail == 3;\n\t\t\trefreshpos(jugador);\n\t}\n}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "ed243fc60940f8f42d05103ac7e3860b", "score": "0.57498944", "text": "function t(e,t,n,r){var i=e+\" \";switch(n){case\"s\":return t||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return i+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||r?\"sekundi\":\"sekundah\":e<5?t||r?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return i+=1===e?t?\"minuta\":\"minuto\":2===e?t||r?\"minuti\":\"minutama\":e<5?t||r?\"minute\":\"minutami\":t||r?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return i+=1===e?t?\"ura\":\"uro\":2===e?t||r?\"uri\":\"urama\":e<5?t||r?\"ure\":\"urami\":t||r?\"ur\":\"urami\";case\"d\":return t||r?\"en dan\":\"enim dnem\";case\"dd\":return i+=1===e?t||r?\"dan\":\"dnem\":2===e?t||r?\"dni\":\"dnevoma\":t||r?\"dni\":\"dnevi\";case\"M\":return t||r?\"en mesec\":\"enim mesecem\";case\"MM\":return i+=1===e?t||r?\"mesec\":\"mesecem\":2===e?t||r?\"meseca\":\"mesecema\":e<5?t||r?\"mesece\":\"meseci\":t||r?\"mesecev\":\"meseci\";case\"y\":return t||r?\"eno leto\":\"enim letom\";case\"yy\":return i+=1===e?t||r?\"leto\":\"letom\":2===e?t||r?\"leti\":\"letoma\":e<5?t||r?\"leta\":\"leti\":t||r?\"let\":\"leti\"}}", "title": "" }, { "docid": "1c46b6bd91ae2e0970dc08663057e242", "score": "0.574822", "text": "function t(e,t,n,i){var a=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "1c46b6bd91ae2e0970dc08663057e242", "score": "0.574822", "text": "function t(e,t,n,i){var a=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "1c46b6bd91ae2e0970dc08663057e242", "score": "0.574822", "text": "function t(e,t,n,i){var a=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===e?t?\"minuta\":\"minuto\":2===e?t||i?\"minuti\":\"minutama\":e<5?t||i?\"minute\":\"minutami\":t||i?\"minut\":\"minutami\";case\"h\":return t?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===e?t?\"ura\":\"uro\":2===e?t||i?\"uri\":\"urama\":e<5?t||i?\"ure\":\"urami\":t||i?\"ur\":\"urami\";case\"d\":return t||i?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===e?t||i?\"dan\":\"dnem\":2===e?t||i?\"dni\":\"dnevoma\":t||i?\"dni\":\"dnevi\";case\"M\":return t||i?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===e?t||i?\"mesec\":\"mesecem\":2===e?t||i?\"meseca\":\"mesecema\":e<5?t||i?\"mesece\":\"meseci\":t||i?\"mesecev\":\"meseci\";case\"y\":return t||i?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===e?t||i?\"leto\":\"letom\":2===e?t||i?\"leti\":\"letoma\":e<5?t||i?\"leta\":\"leti\":t||i?\"let\":\"leti\"}}", "title": "" } ]
1508a72ca5a84441e2a0b14d85057c6a
Render connections of the central visualization.
[ { "docid": "5fe4bafa73357ba6529d9f44438fdc87", "score": "0.57360667", "text": "renderConnections() {\n var that = this,\n links = [],\n tempPositions = {},\n linkGen = d3.linkVertical();\n\n for (let i = 0; i < this.data[\"nodes\"].length; i++) {\n tempPositions[this.data[\"nodes\"][i][\"id\"]] = {\"x\": this.data[\"nodes\"][i][\"x\"], \"y\": this.data[\"nodes\"][i][\"y\"]};\n }\n\n for (let i = 0; i < this.data[\"links\"].length; i++) {\n if (this.data[\"links\"][i][\"Year\"] == this.filterYear || this.filterYear == \"\" || this.filterYear == undefined) {\n // 1 Person filtered\n if (this.filterPersons.length == 1 && (this.filterPersons.includes(this.data[\"links\"][i][\"source\"]) || this.filterPersons.includes(this.data[\"links\"][i][\"target\"]))) {\n links.push({\n \"source\": [tempPositions[this.data[\"links\"][i][\"source\"]][\"x\"], tempPositions[this.data[\"links\"][i][\"source\"]][\"y\"]],\n \"target\": [tempPositions[this.data[\"links\"][i][\"target\"]][\"x\"], tempPositions[this.data[\"links\"][i][\"target\"]][\"y\"]],\n \"addressee\": this.data[\"links\"][i][\"target\"],\n \"creator\": this.data[\"links\"][i][\"source\"]\n });\n // Multiple persons filtered\n } else if (this.filterPersons.length > 1 && (this.filterPersons.includes(this.data[\"links\"][i][\"source\"]) && this.filterPersons.includes(this.data[\"links\"][i][\"target\"]))) {\n links.push({\n \"source\": [tempPositions[this.data[\"links\"][i][\"source\"]][\"x\"], tempPositions[this.data[\"links\"][i][\"source\"]][\"y\"]],\n \"target\": [tempPositions[this.data[\"links\"][i][\"target\"]][\"x\"], tempPositions[this.data[\"links\"][i][\"target\"]][\"y\"]],\n \"addressee\": this.data[\"links\"][i][\"target\"],\n \"creator\": this.data[\"links\"][i][\"source\"]\n });\n // No persons filtered\n } else if (this.filterPersons.length === 0) {\n links.push({\n \"source\": [tempPositions[this.data[\"links\"][i][\"source\"]][\"x\"], tempPositions[this.data[\"links\"][i][\"source\"]][\"y\"]],\n \"target\": [tempPositions[this.data[\"links\"][i][\"target\"]][\"x\"], tempPositions[this.data[\"links\"][i][\"target\"]][\"y\"]],\n \"addressee\": this.data[\"links\"][i][\"target\"],\n \"creator\": this.data[\"links\"][i][\"source\"]\n });\n }\n }\n }\n\n this.svg.selectAll(\"path\")\n .data(links)\n .join(\"path\")\n .attr(\"d\", linkGen)\n .attr(\"class\", \"letter\")\n .attr(\"fill\", \"none\")\n .attr(\"stroke\", \"rgba(204, 204, 205, 0.3)\")\n .attr(\"stroke-width\", \"3\")\n .attr(\"stroke-linecap\", \"round\")\n .attr(\"person1\", function(d) { return d[\"addressee\"]; })\n .attr(\"person2\", function(d) { return d[\"creator\"]; })\n .append(\"svg:title\")\n .text(function(d, i) {\n return \"Letters between \" + d[\"creator\"] + \" and \" + d[\"addressee\"];\n });\n\n this.svg.selectAll(\"path\").on(\"click\", function(e) {\n that.renderLettersByPersons([e[\"target\"].getAttribute(\"person1\"), e[\"target\"].getAttribute(\"person2\")]);\n });\n\n // Set animations\n this.svg.selectAll(\"path\").on(\"mouseover\", function(e) {\n e[\"target\"].setAttribute(\"stroke-width\", \"14\");\n });\n\n this.svg.selectAll(\"path\").on(\"mouseout\", function(e) {\n e[\"target\"].setAttribute(\"stroke-width\", \"3\");\n });\n\n this.renderNodes(links); // render this second so nodes are on top\n }", "title": "" } ]
[ { "docid": "47e940a27f1271fd441d8a704a7a542a", "score": "0.6639006", "text": "function drawConnectionsForElements() {\n if (connections.length != 0) {\n for (var i = 0; i < connections.length; i++) {\n var source = getMatchedElement(connections[i].sourceId);\n var target = getMatchedElement(connections[i].targetId);\n var p0 = connections[i].sourceAnchor1;\n var p1 = connections[i].sourceAnchor2;\n var p2 = connections[i].orientation1;\n var p3 = connections[i].orientation2;\n var p4 = connections[i].targetAnchor1;\n var p5 = connections[i].targetAnchor2;\n var p6 = connections[i].orientation3;\n var p7 = connections[i].orientation4;\n // create a common endpoint\n var common = {\n isTarget: true,\n isSource: true,\n maxConnections: -1,\n connector: [\"Flowchart\"],\n connectorStyle: {\n strokeStyle: \"#5c96bc\",\n lineWidth: 1,\n outlineColor: \"transparent\",\n outlineWidth: 4\n },\n anchor: [\n [p0, p1, p2, p3],\n [p4, p5, p6, p7]\n ],\n endpoint: [\"Dot\", {\n radius: 4\n }]\n };\n jsPlumb.connect({\n source: source,\n target: target,\n paintStyle: {\n strokeStyle: \"#5c96bc\",\n lineWidth: 1\n },\n endpointStyle: {\n fillStyle: \"transparent\"\n }\n }, common);\n }\n }\n }", "title": "" }, { "docid": "65438ee0cc046d9e09263bb506989bb3", "score": "0.65807533", "text": "function showConnections(d) {\n\t// Style the neuron that is hovered over\n\td3.select(\"#\" + d.neuron).style(\"fill\",grays[1]);\n\n\t// Style connected neurons\n\tneurons.filter(function(dd){ \n\t\t\tif (dd.neuron.slice(0,3) != d.neuron.slice(0,3) && dd.neuron.slice(0,3) != d.neuron.slice(0,3)) {\n\t\t\t\treturn this\n\t\t\t} else { return null}\n\t\t})\n\t\t.style(\"fill\",grays[1]);\n\n\t// Style related links\n\tlinks.filter(function(dd){ \n\t\t\tif (d.neuron == dd.targetNeuron || d.neuron == dd.sourceNeuron) {\n\t\t\t\treturn this\n\t\t\t} else if (d.x < dd.source[0] || (d.x-1) > dd.source[0]){ \n\t\t\t\treturn this\n\t\t\t} else {\n\t\t\t\treturn null\n\t\t\t}\n\t\t})\n\t\t.datum(function(d) { d.zIndex = 2; return d; })\n\t\t.style(\"stroke\",grays[0]);\n\n\t// Ensure related links appear on top of non-related links\n\tlinks.sort(function(a,b) {\n\t\treturn a.zIndex - b.zIndex;\n\t}); \n}", "title": "" }, { "docid": "828fb4d17526ee35f0eb21c047a22ea5", "score": "0.64872205", "text": "function drawConnectors () {\n\n var showLabels = connectorConfig.showLabels,\n connArr = jsonData.connectors,\n i = connArr && connArr.length,\n connectorItems = [],\n connectorLabelItems = [],\n fromMarker,\n toMarker,\n connectJSON,\n connectItem,\n obj;\n\n if (i) {\n groups.push({\n id: 'connectorLabels',\n fillalpha: '100',\n items: connectorLabelItems\n });\n\n groups.push({\n id: 'connectors',\n fillalpha: '100',\n items: connectorItems\n });\n\n while (i--) {\n obj = connArr[i];\n\n if (!obj.from || !obj.to) {\n continue;\n }\n\n fromMarker = items[obj.from.toLowerCase()];\n toMarker = items[obj.to.toLowerCase()];\n\n if (!fromMarker || !toMarker) {\n continue;\n }\n\n if (connectorConfig.hideOpen &&\n (fromMarker._isHidden || toMarker._isHidden)) {\n continue;\n }\n\n connectors.push(connectItem = new ConnectorItem(obj, fromMarker, toMarker, rapi));\n connectItem.connectJSON = connectJSON = connectItem.computeConnectorJSON();\n\n if (connectJSON) {\n connectorItems.push(connectJSON);\n if (connectJSON.label && showLabels) {\n connectorLabelItems.push(connectItem.getLabelJSON());\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d95167c21e84acd7fcc967629c325f23", "score": "0.6225765", "text": "function drawVisualization() {\n\t\t\n\t\t\t// Create a datatable for the nodes.\n\t\t\tvar nodesTable = new google.visualization.DataTable();\n\t\t\tnodesTable.addColumn('number', 'id');\n\t\t\tnodesTable.addColumn('string', 'text');\n\t\t\tnodesTable.addColumn('string', 'style'); // optional\n\t\t\tfor(i=0 ; i < _bands.length ; i++){\n\t\t\t\tvar _band = new band();\n\t\t\t\t_band = _bands[i];\n\t\t\t\tvar id = Number(_band.id);\n\t\t\t\tnodesTable.addRow([ id , _band.name,\"circle\"]);\n\t\t\t}\n\n\t\t\t\n\t\t\t// create a datatable for the links between the nodes\n\t\t\tvar linksTable = new google.visualization.DataTable();\n\t\t\tlinksTable.addColumn('number', 'from');\n\t\t\tlinksTable.addColumn('number', 'to');\n\t\t\tlinksTable.addColumn('number', 'width'); // optional\n\t\t\tfor(i=0 ; i < _rootsBand.length ; i++){\n\t\t\t\t\tlocalBand = _rootsBand[i];\n\t\t\t\t\tlinksTable.addRow([ localBand.fromBand , localBand.toBand , 1] );\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// specify options\n\t\t\t\n\t\t\tvar options = {\n\t\t\n\t\t\t 'width': \"100%\",\n\t\t\t 'height': \"100%\",\n\t\t\t 'backgroundColor' : \"#9ec5d1\"\t\t\t\t\t \n\t\t\t\t \n\t\t\t};\n\t\t\n\t\t// Instantiate our network object.\n\t\tnetwork = new links.Network(document.getElementById(\"mynetwork\"));\n\t\tgoogle.visualization.events.addListener(network, 'select', onselect);\n\t\t\n\t\t// Draw our network with the created data and options\n\t\t\t\tnetwork.draw(nodesTable, linksTable, options);\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "cbb365caccae6c513fd978d0d7788817", "score": "0.61791635", "text": "static displayAllConnections() {\n\t\tlet keys = _.keys(neuronList);\n\t\tfor(var i=0; i<keys.length;i++) {\n\t\t\tneuronList[keys[i]].displayConnections();\n\t\t}\n\t}", "title": "" }, { "docid": "e39e952b11741cbe6511324ce85b0343", "score": "0.6134572", "text": "function display_connected_edges(D) { \n \n // background svg group clears links on mousedown, so want to stop event from\n // propagating through this circle into the background\n if (d3.event) {\n d3.event.stopPropagation();\n }\n \n // Create only line svgs that are connected to the current node\n var links = svg_links.selectAll(\".link\")\n .data(node_edges[D.id], function(d){return d.edge_id;});\n \n links.enter()\n .append(\"line\")\n .attr(\"class\", \"link\")\n .attr(\"x1\", function (d) { return d.source.x; })\n .attr(\"y1\", function (d) { return d.source.y; })\n .attr(\"x2\", function (d) { return d.target.x; })\n .attr(\"y2\", function (d) { return d.target.y; })\n .style(\"stroke-width\", function (d) { return 0.5*Math.sqrt(d.weight) + 0.25; });\n\n links.exit()\n .remove();\n \n // Test if nodes are in list of neighbor IDs, and if not, dim\n // and clear all hovered\n svg.selectAll('.node')\n .classed('dimmed', function(d,i){ return node_neighbor_ids[D.id].indexOf(i) < 0; })\n .classed('hovered', false);\n \n // TODO: sort un-dimmed nodes to top\n \n // Update info panel\n update_info_panel(D);\n}", "title": "" }, { "docid": "fa16fb1ca51c04c858bd2f576263e02f", "score": "0.61337143", "text": "render() {\n if (this.state) {\n let style = {\n height: this.state.layer.height,\n width: this.state.layer.width,\n left: this.state.layer.left,\n top: this.state.layer.top,\n zIndex: this.state.layer.zIndex\n };\n let connectors = [];\n let endpoints = [];\n for (let c of this.state.connectors) {\n connectors.push(React.createElement(ConnlibConnectionComponent, {\n key: c.guid,\n ref: ref => c.componentRef = ref\n }));\n }\n for (let e of this.state.endpoints) {\n endpoints.push(React.createElement(ConnlibEndpointComponent, {\n key: e.guid,\n ref: ref => e.componentRef = ref\n }));\n }\n return (React.createElement(\"div\", null,\n endpoints,\n React.createElement(\"svg\", { className: \"connlib-instance\", \"data-deepth\": this.state.deepth, style: style, ref: this.ref }, connectors)));\n }\n return null;\n }", "title": "" }, { "docid": "080804e3cff08c20b3521e6d7eabc5de", "score": "0.6107182", "text": "function removeConnectionFormatting() {\n\tlet links = g_Links.selectAll(\".link\")\n\t\tlinks.datum(function(d) { d.zIndex = 0; return d; })\n\t\t.style(\"stroke\",grays[1]);\n\t\n\tg_Neurons.selectAll(\".neuron\")\n\t\t.style(\"fill\",\"white\");\n}", "title": "" }, { "docid": "5da49d6d1add9862e289eeab139c7ff1", "score": "0.6073576", "text": "function recolorConnections() {\r\n api.edges.forEach(function (connection) {\r\n // Path 1\r\n d3.select(\"#connection-\" + connection.id + \"-0\").style(\"stroke\", getConnectionColors(connection, 0)[0]);\r\n // Path 2\r\n d3.select(\"#connection-\" + connection.id + \"-1\").style(\"stroke\", getConnectionColors(connection, 1)[0]);\r\n d3.select(\"#connection-\" + connection.id + \"-1\").style(\"stroke-opacity\", getConnectionColors(connection, 1)[2]);\r\n // Path 3\r\n d3.select(\"#connection-\" + connection.id + \"-2\").style(\"stroke\", getConnectionColors(connection, 2)[0]);\r\n d3.select(\"#connection-\" + connection.id + \"-2\").style(\"stroke-opacity\", getConnectionColors(connection, 2)[2]);\r\n\r\n });\r\n}", "title": "" }, { "docid": "38c4f2c70bc4435456006d4e7218133e", "score": "0.59964067", "text": "showConnections() {\r\n\t\tconsole.log(this.adjacencyList);\r\n\t}", "title": "" }, { "docid": "a342cd3ea3b771e14b1f11fed431796f", "score": "0.5929198", "text": "function renderDiagram() {\n \n project.activeLayer.children = [];\n var diagram = voronoi.compute(sites, bbox);\n \n if (diagram) {\n for (var i = 0, l = sites.length; i < l; i++) {\n // using the index from the sites\n // get me a cell from the diagram\n var cell = diagram.cells[sites[i].voronoiId];\n \n if (cell) {\n var halfedges = cell.halfedges,\n length = halfedges.length;\n \n if (length > 2) {\n var points = [];\n if (sites[i].color == undefined) \n sites[i].color = spotColor;\n\n points.color = sites[i].color;\n for (var j = 0; j < length; j++) {\n v = halfedges[j].getEndpoint();\n v.color = sites[i].color;\n points.push(new Point(v));\n }\n\n createPath(points, sites[i]);\n }\n }\n } \n }\n}", "title": "" }, { "docid": "d87d3ece01bf2a9748b4f082129487cd", "score": "0.5866798", "text": "function makeConnections(dv) {\n if (!dv.showDifferences) {\n return;\n }\n let w = 0;\n if (dv.svg) {\n Private.clear(dv.svg);\n w = dv.gap.offsetWidth;\n Private.attrs(dv.svg, 'width', w, 'height', dv.gap.offsetHeight);\n }\n if (dv.copyButtons) {\n Private.clear(dv.copyButtons);\n }\n const vpEdit = dv.edit.getViewport();\n const vpOrig = dv.orig.getViewport();\n const outerTop = dv.mv.wrap.getBoundingClientRect().top;\n const sTopEdit = outerTop -\n dv.edit.getScrollerElement().getBoundingClientRect().top +\n dv.edit.getScrollInfo().top;\n const sTopOrig = outerTop -\n dv.orig.getScrollerElement().getBoundingClientRect().top +\n dv.orig.getScrollInfo().top;\n for (let i = 0; i < dv.chunks.length; i++) {\n const ch = dv.chunks[i];\n if (ch.editFrom <= vpEdit.to &&\n ch.editTo >= vpEdit.from &&\n ch.origFrom <= vpOrig.to &&\n ch.origTo >= vpOrig.from) {\n drawConnectorsForChunk(dv, ch, sTopOrig, sTopEdit, w);\n }\n }\n}", "title": "" }, { "docid": "3a55293b1f87f1e3d0085cf5933f0e7e", "score": "0.58201766", "text": "connectedCallback() { this.#render() }", "title": "" }, { "docid": "efcd451859d4711bace226a9a27e9332", "score": "0.57416034", "text": "function chart(selection) {\n selection.each(function(data) {\n // Check if there are nodes defined\n if(isEmpty(data.nodes)) { return; }\n if(isEmpty(data.links)) { var noLinks = true;}\n\n // DEBUG info\n if(DEBUG) {\n console.log('--hgiNetwork');\n console.log('properties:');\n console.log({'margin': margin,'size':[width,height],'mapping':mapping,'xDomain':xDomain,'yDomain':yDomain,'addLabels':addLabels});\n console.log('selection:');\n console.log(selection);\n console.log('data:');\n console.log(data);\n }\n\n // Compute link distance if not set\n if(linkDistance == 0) { linkDistance = Math.min( (height)/4 , (width)/4 ); }\n\n // Specify layout\n netLayout\n .linkDistance(function(d,i) {\n // if this link connects to a small node, make the distance small\n if(d.source.weight == 2 || d.target.weight == 2) {\n return linkDistance/2;\n }\n\n // if this link connects to a single node, make the distance even smaller\n if(d.source.weight == 1 || d.target.weight == 1) {\n return linkDistance/3;\n }\n\n return linkDistance;\n })\n .nodes(data.nodes)\n .links(data.links)\n .linkStrength(function(d,i) {\n /* if this link connects a single node, make it stronger\n if(d.source.weight == 1 || d.target.weight == 1) {\n return linkStrength*2;\n }*/\n\n return linkStrength;\n })\n //.charge(charge)\n .charge(function(d,i) {\n if(DEBUG) console.log('Charge:'+(-50*(d.radius*d.radius)));\n if(doWeightedCharge) {\n return (-50*(d.radius*d.radius));\n } else {\n return charge;\n }\n })\n .friction(friction)\n .gravity(gravity)\n .size([width,height])\n .on(\"tick\",tickLayout)\n .start();\n\n\n // Node with most links\n // Obtain center node (i.e. node with most links)\n var centerNode = data.nodes[0];\n data.nodes.forEach(function(node) {(node.weight>centerNode.weight)?centerNode=node:0;});\n\n // Starting positions (pseudo random starting positions)\n data.nodes.forEach(function(node) {\n node.px = Math.floor(random()*(width));\n node.py = Math.floor(random()*(height));\n\n node.x = node.px;\n node.y = node.py;\n\n if(DEBUG) console.log('Node:'+node.name+' ('+node.x+','+node.y+')');\n });\n\n // If we do force based labels than compute a new (alternative) network with labels as nodes linked to original nodes\n // (inspired on code from Moritz Stefaner)\n if(doForceBasedLabels) {\n // Nodes associated with labels\n data.labelNodes = [];\n data.nodes.forEach(function(node) {data.labelNodes.push({node:node});data.labelNodes.push({node:node});});\n\n // Links between each original node and associated label node\n data.labelLinks = [];\n for(var i = 0; i < data.nodes.length; i++) {\n data.labelLinks.push({\n source : i * 2,\n target : i * 2 + 1,\n weight : 1\n });\n }\n\n labelLayout\n .nodes(data.labelNodes)\n .links(data.labelLinks)\n .gravity(0)\n //.friction(0.8)\n .linkDistance(1)\n .linkStrength(8)\n .charge(-250)\n .on(\"tick\",tickLabel)\n .size([width,height]); // NOTE: labels are allowed to go in margin space\n\n if(DEBUG) {\n console.log('Generated force based label network:');\n console.log(data.labelNodes);\n console.log(data.labelLinks);\n console.log('');\n }\n }\n\n\n\n // Start layout\n netLayout.start();\n (doForceBasedLabels) ? labelLayout.start() : 0;\n\n // Create SVG with data appended\n var svg = d3.select(this).selectAll(\"svg\").data([data]);\n var gChart = svg.enter().append(\"svg\").append(\"g\").attr(\"class\", \"network\");\n\n // SVG Definitions\n if(addGradients) {\n var svgdefs = svg.append(\"defs\");\n // Radial gradient for nodes\n var radialGradient = svgdefs.append(\"radialGradient\")\n .attr(\"id\",\"nodeGrad\")\n .attr(\"cx\",\"30%\")\n .attr(\"cy\",\"30%\")\n .attr(\"r\",\"55%\");\n radialGradient\n .append(\"stop\")\n .attr(\"offset\",\"0%\")\n .style(\"stop-color\",\"white\")\n .attr(\"stop-opacity\",\"1.0\");\n\n radialGradient\n .append(\"stop\").attr(\"offset\",\"5%\")\n .style(\"stop-color\",\"white\")\n .attr(\"stop-opacity\",\"1.0\");\n\n radialGradient\n .append(\"stop\")\n .attr(\"offset\",\"100%\")\n .style(\"stop-color\",\"white\")\n .attr(\"stop-opacity\",\"0.0\");\n }\n\n // Set chart width and height\n svg.attr({'width': width + margin.left + margin.right,'height':height + margin.top + margin.bottom});\n\n // Translate chart to adjust for margins\n var gChart = svg.select(\"g\")\n .attr(\"transform\",\"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n //-- Draw lines and nodes\n gLinks = gChart.selectAll(\".link\");\n gArclinks = gChart.selectAll(\".arclink\");\n\n if(!noLinks) {\n\n if(isDirectedGraph) {\n // Check for doubly encoded directionality\n data.links.forEach(function(link) {\n link.doubly = false;\n data.links.forEach(function(d) {\n ( (d.target == link.source) && (d.source == link.target) ) ? link.doubly = true : 0;\n });\n });\n }\n\n var gLinks = gLinks\n .data(data.links.filter(function(d) { if(!isDirectedGraph || d.doubly==false) return d;}))\n .enter().append(\"g\").attr(\"class\",\"link\");\n\n if(isDirectedGraph) {\n var gArclinks = gArclinks\n .data(data.links.filter(function(d) { if(d.doubly==true) return d;}))\n .enter().append(\"g\").attr(\"class\",\"link\");\n }\n\n if(addCoefficientMarkers) {\n if(DEBUG && 1==0) gLinks.append(\"circle\").attr(\"r\",2);\n gLinks.append(\"text\")\n .attr(\"text-anchor\",\"middle\")\n .attr(\"dy\",\"0.3em\")\n .attr(\"class\", function(d) { if(d.coef>0) { return \"positive\"; } else { return \"negative\"} })\n .text(function(d) { (d.coef > 0) ? d.coefSign=\"+\" : d.coefSign=\"-\"; return d.coefSign; });//return d.coef; });\n\n gArclinks.append(\"text\")\n .attr(\"text-anchor\",\"middle\")\n .attr(\"dy\",\"0.3em\")\n .attr(\"class\", function(d) { if(d.coef>0) { return \"positive\"; } else { return \"negative\"} })\n .text(function(d) { (d.coef > 0) ? d.coefSign=\"+\" : d.coefSign=\"-\"; return d.coefSign; });//return d.coef; });\n\n }\n\n\n gLinks.append(\"line\")\n .style(\"stroke-width\", function(d) { d.width=(minStrokeWidth + Math.min(maxStrokeWidth,maxStrokeWidth*Math.max(0,(Math.abs(d.coef)-0.2)*2))); return d.width+\"px\"; });\n\n if(isDirectedGraph) {\n gArclinks.append(\"path\").attr(\"class\",\"arclink\")\n // Stroke width as a function of coefficient strength\n .style(\"stroke-width\", function(d) { d.width=(minStrokeWidth + Math.min(maxStrokeWidth,maxStrokeWidth*Math.max(0,(Math.abs(d.coef)-0.2)*2))); return d.width+\"px\"; });\n }\n\n // Arrow on link if graph is directed\n if(isDirectedGraph) {\n if(DEBUG && 1==0) gLinks.append(\"rect\").attr(\"width\",6).attr(\"height\",6).attr(\"fill\",\"black\").attr(\"x\",-3).attr(\"y\",-3);\n gLinks.append('path')\n .attr('class','arrow')\n .attr('d', function(d) {\n var x = 0, y = -2;\n return \"M0,-5L10,0L0,5\";\n //return 'M ' + x +' '+ y + ' l 4 4 l -8 0 z';\n });\n\n if(DEBUG && 1==0) gArclinks.append(\"rect\").attr(\"width\",6).attr(\"height\",6).attr(\"fill\",\"black\").attr(\"x\",-3).attr(\"y\",-3);\n gArclinks.append('path')\n .attr('class','arrow')\n .attr('d', function(d) {\n var x = 0, y = -2;\n return \"M0,-5L10,0L0,5\";\n //return 'M ' + x +' '+ y + ' l 4 4 l -8 0 z';\n });\n }\n }\n\n // Draw nodes\n var gNodes = gChart.selectAll(\".node\")\n .data(data.nodes)\n .enter().append(\"g\");\n\n gNodes.append(\"circle\")\n .attr(\"class\", function (d) { return \"node \"+d.type; })\n .attr(\"id\", function (d) { return generate_id(d.name); })\n // Radius nodes depends on number of links\n .attr(\"r\", function(d) { if(noLinks) { d.radius = 15; } else { d.radius=(10+10*(d.weight/centerNode.weight)); } return d.radius; })\n\n if(addGradients) {\n gNodes.append(\"circle\")\n .attr(\"class\",\"nodeGrad\")\n .attr(\"r\", function(d) { return d.radius; }) // d.radius=(10+10*(d.weight/centerNode.weight)); return d.radius; })\n .style(\"fill\", \"url(#nodeGrad)\");\n }\n\n //-- Labels\n if(doForceBasedLabels) {\n var gLabelLinks = gChart.selectAll(\".labelLink\")\n .data(data.labelLinks);\n //.enter().append(\"line\").attr(\"class\",\"link\");\n\n var gLabelNodes = gChart.selectAll(\".labelNode\")\n .data(data.labelNodes)\n .enter().append(\"g\").attr(\"class\",\"labelNode\");\n gLabelNodes.append(\"circle\").attr(\"r\",0).style(\"fill\",\"#000\"); // Invisible nodes\n gLabelNodes.append(\"text\").text(function(d, i) { // Text at the place of the text node\n return (i % 2 == 0) ? \"\" : d.node.name;\n });\n }\n\n\n // Allow nodes to be dragged\n if(allowDragging) {\n\n // Enable dragging\n gNodes.call(netLayout.drag);\n\n // Set attribute to fixed whenever they are dragged\n netLayout.drag().on(\"dragstart\", function(d) { d3.select(this).classed(\"fixed\", d.fixed = true); });\n\n if(doForceBasedLabels) { netLayout.drag().on(\"drag\", function() { labelLayout.resume(); } ); }\n\n // On double click release nodes\n gNodes.on(\"dblclick\", function(d) { d3.select(this).classed(\"fixed\", d.fixed = false); });\n }\n\n\n\n\n // Do a static layout by only visualizing the end result of the network simulation\n if(doStaticLayout) {\n\n // Hide chart\n gChart.attr('visibility','hidden');\n\n // Run layout simulation\n setTimeout(function() {\n if(DEBUG) var start = new Date().getTime();\n\n // Run the layout a fixed number of times\n var n = 10;\n\n // Layout\n netLayout.start();\n for (var i = n * n; i > 0; --i) netLayout.tick();\n netLayout.stop();\n\n // Labels\n if(doForceBasedLabels) {\n labelLayout.start();\n for (var i = n * n; i > 0; --i) labelLayout.tick();\n labelLayout.stop();\n }\n\n // Show chart\n gChart.attr('visibility',null);\n\n if(DEBUG) {\n var end = new Date().getTime();\n console.log('Simulation time: ' + (end - start) + 'ms');\n }\n\n }, 10);\n\n } else {\n // Show animation (i.e. update node positions) during layout simulation\n netLayout.start();\n }\n\n\n\n // The layout is based on a physics simulation, each tick of this simulation calls this function\n // We can therefore control the layout by updating node positions during the simulation\n function tickLayout() {\n\n // Center the node with the most links\n if(doCenterNode) {\n data.nodes[centerNode.index].x = width/2;\n data.nodes[centerNode.index].y = height/2;\n // No charge on center node\n data.nodes[centerNode.index].charge = 0;\n }\n\n // Constrain nodes to be within layout, and nodes without links to be part of the layout, circling around the center\n var minx = 10000;\n var miny = 10000;\n var maxx = -10000;\n var maxy = -10000;\n data.nodes.forEach(function(node) {\n if(node.weight<=0)\n {\n // Smaller charge\n node.charge = -30;\n }\n\n // Always keep within borders\n if (node.x < minx) minx = node.x;\n if (node.x > maxx) maxx = node.x;\n if (node.y < miny) miny = node.y;\n if (node.y > maxy) maxy = node.y;\n });\n data.nodes.forEach(function(node) {\n if (maxx-minx > 0.05) node.x = width*(node.x-minx)/(maxx-minx);\n if (maxy-miny > 0.05) node.y = height*(node.y-miny)/(maxy-miny);\n });\n if(doForceBasedLabels && !doStaticLayout) {\n // Simulate label layout\n labelLayout.start();\n }\n\n //-- Update node and link positions\n gLinks.selectAll('line').attr(\"x1\", function(d) { return d.source.x; })\n .attr(\"y1\", function(d) { return d.source.y; })\n .attr(\"x2\", function(d) { return d.target.x; })\n .attr(\"y2\", function(d) { return d.target.y; });\n gArclinks.selectAll('path.arclink').attr(\"d\",linkArc);\n\n if(addCoefficientMarkers) {\n if(DEBUG) { // Draws circles at point where coefficient markers (+ or -) should be drawn\n gLinks.selectAll('circle').attr(\"transform\",function(d) {\n // Position at node with least links if network is undirected (less clutter)\n if( !isDirectedGraph && (d.source.weight < d.target.weight)) {\n targetRadius = d.source.radius; targetX = d.source.x; targetY = d.source.y; fromX = d.target.x; fromY = d.target.y;\n } else {\n targetRadius = d.target.radius; targetX = d.target.x; targetY = d.target.y; fromX = d.source.x; fromY = d.source.y;\n console.log('called..');\n }\n\n maxDistance = coefMarkerDistance + targetRadius;\n\n // First compute place on link at distance defined in coefMarkerDistance\n diffX = fromX - targetX;\n diffY = fromY - targetY;\n distance = Math.sqrt(diffX*diffX + diffY*diffY);\n d.x = targetX + maxDistance * (diffX/distance);\n d.y = targetY + maxDistance * (diffY/distance);\n\n // Next add an offset based on target\n coefMarkerOffsetRad = coefMarkerOffset * Math.PI / 180;\n\n transX = d.x-targetX;\n transY = d.y-targetY;\n d.x = targetX + (transX*Math.cos(coefMarkerOffsetRad) - transY*Math.sin(coefMarkerOffsetRad));\n d.y = targetY + (transX*Math.sin(coefMarkerOffsetRad) + transY*Math.cos(coefMarkerOffsetRad));\n\n return \"translate(\"+d.x+\",\"+d.y+\")\"\n });\n }\n\n gLinks.selectAll('text').attr(\"transform\",function(d) {\n // Position at node with least links (less clutter)\n if( !isDirectedGraph && (d.source.weight < d.target.weight)) {\n targetRadius = d.source.radius; targetX = d.source.x; targetY = d.source.y; fromX = d.target.x; fromY = d.target.y;\n } else {\n targetRadius = d.target.radius; targetX = d.target.x; targetY = d.target.y; fromX = d.source.x; fromY = d.source.y;\n }\n\n maxDistance = coefMarkerDistance + targetRadius;\n\n // First compute place on link at distance defined in coefMarkerDistance\n diffX = fromX - targetX;\n diffY = fromY - targetY;\n distance = Math.sqrt(diffX*diffX + diffY*diffY);\n d.x = targetX + maxDistance * (diffX/distance);\n d.y = targetY + maxDistance * (diffY/distance);\n\n // Next add an offset based on target\n coefMarkerOffsetRad = coefMarkerOffset * Math.PI / 180;\n\n transX = d.x-targetX;\n transY = d.y-targetY;\n d.x = targetX + (transX*Math.cos(coefMarkerOffsetRad) - transY*Math.sin(coefMarkerOffsetRad));\n d.y = targetY + (transX*Math.sin(coefMarkerOffsetRad) + transY*Math.cos(coefMarkerOffsetRad));\n\n return \"translate(\"+d.x+\",\"+d.y+\")\"\n });\n\n gArclinks.selectAll('text').attr(\"transform\",function(d) {\n // Position at node with least links (less clutter)\n if( !isDirectedGraph && (d.source.weight < d.target.weight)) {\n targetRadius = d.source.radius; targetX = d.source.x; targetY = d.source.y; fromX = d.target.x; fromY = d.target.y;\n } else {\n targetRadius = d.target.radius; targetX = d.target.x; targetY = d.target.y; fromX = d.source.x; fromY = d.source.y;\n }\n\n maxDistance = coefMarkerDistance + targetRadius;\n\n // First compute place on link at distance defined in coefMarkerDistance\n diffX = fromX - targetX;\n diffY = fromY - targetY;\n distance = Math.sqrt(diffX*diffX + diffY*diffY);\n d.x = targetX + maxDistance * (diffX/distance);\n d.y = targetY + maxDistance * (diffY/distance);\n\n // Next add an offset based on target\n coefMarkerOffsetRad = coefMarkerOffset * Math.PI / 180;\n\n transX = d.x-targetX;\n transY = d.y-targetY;\n d.x = targetX + (transX*Math.cos(coefMarkerOffsetRad) - transY*Math.sin(coefMarkerOffsetRad));\n d.y = targetY + (transX*Math.sin(coefMarkerOffsetRad) + transY*Math.cos(coefMarkerOffsetRad));\n\n return \"translate(\"+d.x+\",\"+d.y+\")\"\n });\n\n }\n\n if(isDirectedGraph) {\n gLinks.selectAll('.arrow').attr(\"transform\",function(d) {\n maxDistance = coefMarkerDistance + targetRadius;\n\n // First compute place on link\n var alpha = Math.atan((d.target.y-d.source.y)/(d.target.x-d.source.x));\n var factr = 1-((d.width-minStrokeWidth) / maxStrokeWidth);\n d.x = d.source.x + (0.95+0.05*factr)*(Math.cos(alpha) * d.source.radius + 0.5*(d.target.x - d.source.x - Math.cos(alpha) * d.source.radius - Math.cos(alpha) * d.target.radius));\n d.y = d.source.y + (0.95+0.05*factr)*(Math.sin(alpha) * d.source.radius + 0.5*(d.target.y - d.source.y - Math.sin(alpha) * d.source.radius - Math.sin(alpha) * d.target.radius));\n\n\n // Find orientation\n orient = Math.atan((d.target.y-d.source.y)/(d.target.x-d.source.x));\n orientdeg = (orient*180)/Math.PI;\n (d.target.x < d.source.x) ? orientdeg = orientdeg - 180 : 0;\n\n // Translate to middle point, rotate in correct direction, and scale between 1-1.5 according to coefficient weight\n return \"translate(\"+d.x+\",\"+d.y+\") rotate(\"+(orientdeg)+\") scale(\"+(1+(d.width-minStrokeWidth)/(2*(maxStrokeWidth-minStrokeWidth)))+\")\";\n });\n\n\n gArclinks.select('.arrow').attr(\"transform\",function(d, i) {\n // Middle\n var halfLength = gArclinks.select('path.arclink')[0][i].getTotalLength()/2;\n midPoint = gArclinks.select('path.arclink')[0][i].getPointAtLength(halfLength);\n\n // Find orientation\n orient = Math.atan( (d.target.y-d.source.y)/(d.target.x-d.source.x));\n orientdeg = (orient*180)/Math.PI;\n (d.target.x < d.source.x) ? orientdeg = orientdeg - 180 : 0;\n\n // Translate to middle point, rotate in correct direction, and scale between 1-1.5 according to coefficient weight\n return \"translate(\"+midPoint.x+\",\"+midPoint.y+\") rotate(\"+(orientdeg)+\") scale(\"+(1+(d.width-minStrokeWidth)/(2*(maxStrokeWidth-minStrokeWidth)))+\")\";\n });\n }\n\n\n gNodes.selectAll(\".node\")\n .attr(\"cx\", function(d) { return d.x; })\n .attr(\"cy\", function(d) { return d.y; });\n\n // Gradients on top of nodes\n if(addGradients) {\n gNodes.selectAll(\".nodeGrad\")\n .attr(\"cx\", function(d) { return d.x; })\n .attr(\"cy\", function(d) { return d.y; });\n }\n }\n\n\n // The label placement is based on a physics simulation, each tick of this simulation calls this function\n // We can therefore control the layout of the labels by updating positions during the simulation\n function tickLabel() {\n gLabelNodes.each(function(d,i) {\n // Fix 'real' nodes\n if(i % 2 == 0) {\n d.x = d.node.x;\n d.y = d.node.y;\n // Control label nodes\n } else {\n // Compute distance to 'real' node\n diffX = d.x - d.node.x;\n diffY = d.y - d.node.y;\n distance = Math.sqrt(diffX*diffX + diffY*diffY);\n\n // Force on circle, i.e. force the labelDistance from the edge of the node (include node radius)\n maxDistance = labelDistance + d.node.radius;\n // Traverse to closest point on circle\n d.x = d.node.x + maxDistance * ( diffX/distance);\n d.y = d.node.y + maxDistance * ( diffY/distance);\n\n // Check on which side the label node is (topleft,topright,bottomright,bottomleft)\n if(diffX > 0) {\n (diffY > 0) ? d.side = \"bottomright\" : d.side = \"topright\";\n } else {\n (diffY > 0) ? d.side = \"bottomleft\" : d.side = \"topleft\";\n }\n }\n });\n\n // Update node and link positions\n gLabelLinks.attr(\"x1\", function(d) { return d.source.x; })\n .attr(\"y1\", function(d) { return d.source.y; })\n .attr(\"x2\", function(d) { return d.target.x; })\n .attr(\"y2\", function(d) { return d.target.y; });\n gLabelNodes.attr(\"transform\", function(d) { return \"translate(\"+d.x+\",\"+d.y+\")\"; });\n gLabelNodes.selectAll(\"text\")\n .attr(\"dy\", function(d) {\n if(d.side == \"topleft\") return \"-0.1em\";\n if(d.side == \"topright\") return \"-0.1em\";\n if(d.side == \"bottomleft\") return \"0.4em\";\n if(d.side == \"bottomright\") return \"0.4em\";\n })\n .attr(\"text-anchor\", function(d) {\n if(d.side == \"topleft\") return \"end\";\n if(d.side == \"topright\") return \"start\";\n if(d.side == \"bottomleft\") return \"end\";\n if(d.side == \"bottomright\") return \"start\";\n });\n }\n\n // Create arced links\n function linkArc(d) {\n var dx = d.target.x - d.source.x,\n dy = d.target.y - d.source.y,\n dr = Math.sqrt(dx * dx + dy * dy);\n return \"M\" + d.source.x + \",\" + d.source.y + \"A\" + dr + \",\" + dr + \" 0 0,1 \" + d.target.x + \",\" + d.target.y;\n }\n });\n }", "title": "" }, { "docid": "a0b63fbd70c399a82e66f235dad4fb0b", "score": "0.57192945", "text": "function singledisplay() {\n\n split_window(\"#Vergleich2\", \"s\");\n\n if (graphs.length == 2) {\n draw(parent1, child1, \"s_g1\", link1);\n draw(parent2, child2, \"s_g2\", link2);\n }\n\n if (graphs.length >= 3) {\n draw(parent1, child1, \"s_g1\", link1);\n draw(parent2, child2, \"s_g2\", link2);\n draw(parent3, child3, \"s_g3\", link3);\n if (graphs.length == 4) {\n draw(parent4, child4, \"s_g4\", link4);\n }\n }\n}", "title": "" }, { "docid": "dfe773209573ab0621d1a5b912890236", "score": "0.56872404", "text": "drawConnections(ctx) {\n for (let i = 0; i < this.gates.length; i++) {\n for (let j = 0; j < this.gates[i].length; j++) {\n if (this.gates[i][j].operands) {\n if (\n this.gates[i][j] instanceof NOTGate ||\n this.gates[i][j] instanceof Input\n ) {\n const op1 = this.gateLookup.get(this.gates[i][j].operands[0]);\n this.gates[i][j].drawConnections({\n x: op1.outputLocation.x,\n y: op1.outputLocation.y,\n value: op1.value,\n ctx\n });\n } else {\n const op1 = this.gateLookup.get(this.gates[i][j].operands[0]);\n const op2 = this.gateLookup.get(this.gates[i][j].operands[1]);\n\n this.gates[i][j].drawConnections({\n gate1: {\n x: op1.outputLocation.x,\n y: op1.outputLocation.y,\n value: op1.value\n },\n gate2: {\n x: op2.outputLocation.x,\n y: op2.outputLocation.y,\n value: op2.value\n },\n ctx\n });\n }\n }\n }\n }\n }", "title": "" }, { "docid": "c4a362c6aa8b156ba974457545072ede", "score": "0.56641155", "text": "function DrawConnections() {\n for (var i = 0; i < N_PARTICLES; ++i) {\n for(var j = i+1; j < N_PARTICLES; ++j) {\n strokeWeight(1);\n distance = Math.sqrt(Math.pow((particles[i].xx - particles[j].xx), 2) + Math.pow((particles[i].yy - particles[j].yy), 2));\n if (distance > CONN_THRESH) {\n alpha = 0;\n }\n else {\n alpha = (CONN_THRESH - distance) / CONN_THRESH;\n }\n\n // To create a fade effect as one particle is born or dying\n min_age = Math.min((particles[i].life - particles[i].age),\n (particles[j].life - particles[j].age),\n particles[i].age, particles[j].age);\n if (min_age < AGE_CONN_FADE_THRESH) {\n alpha *= min_age/AGE_CONN_FADE_THRESH;\n }\n\n alpha = Math.min(alpha, particles[i].alpha, particles[j].alpha);\n\n alpha *= ALPHA_FINAL_ADJUST;\n\n colorr = int((particles[i].colorr + particles[j].colorr) / 2);\n colorg = int((particles[i].colorg + particles[j].colorg) / 2);\n colorb = int((particles[i].colorb + particles[j].colorb) / 2);\n\n stroke('rgba(' + colorr +', '+ colorg +', '+ colorb +', '+ alpha + ')');\n\n line(particles[i].xx, particles[i].yy, particles[j].xx, particles[j].yy);\n\n }\n }\n}", "title": "" }, { "docid": "bb727be6c4a891720614f576f3d57a9f", "score": "0.5627267", "text": "drawAllWires() {\r\n let me = this;\r\n const FLOW_GAP = 10;\r\n const LINE_SIZE = 6;\r\n const FLOW_SIZE = LINE_SIZE - 3;\r\n Object.keys(me.moduleController.activeModule.getConnectorMap()).forEach((inConnID) => {\r\n let inConn = me.moduleController.activeModule.getConnector(inConnID);\r\n let inConnLoc = me.selectionController.getScreenCoords(inConn.bounds);\r\n me.moduleController.activeModule.getConnectorMap()[inConnID].forEach((outConn) => {\r\n let outConnLoc = me.selectionController.getScreenCoords(outConn.bounds);\r\n let color = outConn.getState() ? 'rgb(0,100,0)' : 'rgb(50,0,0)';\r\n let curvePadding = 30;\r\n me.graphics.beginStroke(color)\r\n .setStrokeStyle(LINE_SIZE)\r\n .moveTo(outConnLoc.x, outConnLoc.y)\r\n .bezierCurveTo(outConnLoc.x + curvePadding, outConnLoc.y, inConnLoc.x - curvePadding, inConnLoc.y, inConnLoc.x, inConnLoc.y)\r\n .endStroke()\r\n .setStrokeStyle();\r\n if (outConn.getState()) {\r\n me.graphics.beginStroke('rgb(0,200,0)')\r\n .setStrokeStyle(FLOW_SIZE)\r\n .setStrokeDash([FLOW_GAP], -me.flowOffset)\r\n .moveTo(outConnLoc.x, outConnLoc.y)\r\n .bezierCurveTo(outConnLoc.x + curvePadding, outConnLoc.y, inConnLoc.x - curvePadding, inConnLoc.y, inConnLoc.x, inConnLoc.y)\r\n .endStroke()\r\n .setStrokeStyle()\r\n .setStrokeDash();\r\n }\r\n });\r\n });\r\n }", "title": "" }, { "docid": "0792f5ffdfa31ae0f24e4e18501b7047", "score": "0.56148213", "text": "function refitVisualise() {\n height('#cluster', height('#content') - height('#infobar'));\n }", "title": "" }, { "docid": "d107c77e69c530c3fe1ce091a2f7ca2e", "score": "0.5611764", "text": "function colorGraph(inner) {\n\n\tinner.selectAll('g.cu-node:not(.selected-node) polygon').style(\"fill\", configuration.readSetting('cuColorFill'));\n\t$(\".cu-node-label\").css(\"color\", configuration.readSetting('cuColorLabel'));\n\n\tinner.selectAll('g.function-node:not(.selected-node) polygon').style(\"fill\", configuration.readSetting('functionColorFill'));\n\t$(\".function-node-label\").css(\"color\", configuration.readSetting('functionColorLabel'));\n\n\tinner.selectAll('g.loop-node:not(.selected-node) polygon').style(\"fill\", configuration.readSetting('loopColorFill'));\n\tinner.selectAll('g.loop-node:not(.selected-node) ellipse').style(\"fill\", configuration.readSetting('loopColorFill'));\n\t$(\".loop-node-label\").css(\"color\", configuration.readSetting('loopColorLabel'));\n\n\tinner.selectAll('g.library-function-node:not(.selected-node) polygon').style(\"fill\", configuration.readSetting('libraryFunctionColorFill'));\n\t$(\".library-function-node-label\").css(\"color\", configuration.readSetting('libraryFunctionColorLabel'));\n\n\tinner.selectAll('g.default-node:not(.selected-node) polygon').style(\"fill\", configuration.readSetting('defaultColorFill'));\n\t$(\".default-node-label\").css(\"color\", configuration.readSetting('defaultColorLabel'));\n\n\tinner.selectAll('g.selected-node polygon').style(\"fill\", configuration.readSetting('selectedNodeColorFill'));\n\tinner.selectAll('g.selected-node ellipse').style(\"fill\", configuration.readSetting('selectedNodeColorFill'));\n\t$(\".selected-node-label\").css(\"color\", configuration.readSetting('selectedNodeColorLabel'));\n\n\t// Edges\n\tinner.selectAll('g.flow-edge path').style(\"stroke\", configuration.readSetting('flowEdgeFill')).style(\"stroke-width\", configuration.readSetting('flowEdgeWidth'));\n\tinner.selectAll('g.flow-edge polygon').style(\"stroke\", configuration.readSetting('flowEdgeFill')).style(\"fill\", configuration.readSetting('flowEdgeWidth'));\n\tinner.selectAll('g.dependency-edge path').style(\"stroke\", configuration.readSetting('dependencyEdgeFill')).style(\"stroke-width\", configuration.readSetting('dependencyEdgeWidth'));\n\tinner.selectAll('g.dependency-edge polygon').style(\"stroke\", configuration.readSetting('dependencyEdgeFill')).style(\"fill\", configuration.readSetting('dependencyEdgeWidth'));\n\tinner.selectAll('g.function-call-edge path').style(\"stroke\", configuration.readSetting('functionCallEdgeFill')).style(\"stroke-width\", configuration.readSetting('functionCallEdgeWidth'));\n\tinner.selectAll('g.function-call-edge polygon').style(\"stroke\", configuration.readSetting('functionCallEdgeFill')).style(\"fill\", configuration.readSetting('functionCallEdgeWidth'));\n}", "title": "" }, { "docid": "64d6df3976a3871e9e7ed0271ebad892", "score": "0.5605109", "text": "function visualize(parsed) {\n const data = { nodes: parsed[0], edges: parsed[1] };\n groups = getGroups(data.nodes);\n groupPos = getGroupPositions(groups);\n color = createColorScale(groups);\n decorate((event) => selectGrouping(data.nodes));\n updateLegend();\n graph(data);\n updateSimulation();\n window.addEventListener(\"resize\", (event) => {\n updateDimensions(data.nodes);\n });\n }", "title": "" }, { "docid": "48e93ab2c550473c0d6a90d4e03d176f", "score": "0.5554864", "text": "function render_simulation() {\n // Update node positions\n nodes.attr(\"transform\", (d) => `translate(${d.x}, ${d.y})` );\n\n // Update link positions\n links.attr(\"x1\", (d) => d.source.x)\n .attr(\"y1\", (d) => d.source.y)\n .attr(\"x2\", (d) => d.target.x)\n .attr(\"y2\", (d) => d.target.y);\n }", "title": "" }, { "docid": "d46ef23cb99f1b31bc5c9b5e020e2698", "score": "0.55536824", "text": "_render({nodes, edges}) {\n return html`\n <style>\n :host {\n display: block;\n }\n :host([hidden]) {\n display: none;\n }\n </style>\n <style>\n #mynetwork {\n width: 600px;\n height: 400px;\n border: 1px solid lightgray;\n }\n </style>\n <h4>GRAPH: ${this.nodes}</h4>\n <div id=\"mynetwork\"></div>\n\n <slot></slot>\n\n `;\n\n\n}", "title": "" }, { "docid": "08c6cbc00474c7f9da033a2780abb017", "score": "0.5534247", "text": "function draw() {\n // Create a data table with nodes.\n nodes = [];\n\n // Create a data table with links.\n edges = [];\n\n // Central nodes\n nodes.push({id: 1, label: 'Monitor', title:'<strong>Main I</strong>', image: DIR + 'storage_sync_camera.png', shape: 'image'});\n nodes.push({id: 2, label: 'Storage', title:'<strong>Storage server Node</strong>', image: DIR + 'pont.png', shape: 'image'});\n nodes.push({id: 3, label: 'Jobs Server', title:'<strong>Jobs Server Node</strong>', image: DIR + 'pont.png', shape: 'image'});\n nodes.push({id: 4, label: 'FTP Directory', title:'<strong>FTP Directory Node</strong>', image: DIR + 'pont.png', shape: 'image'});\n nodes.push({id: 5, label: 'Monitor 2', title:'<strong>Main II</strong>', image: DIR + 'main_2.png', shape: 'image'});\n \n // Central Edges\n edges.push({from: 1, to: 2, arrows:'to'});\n edges.push({from: 1, to: 3, arrows:'to'});\n edges.push({from: 1, to: 4, arrows:'to'});\n edges.push({from: 1, to: 5, arrows:'to'});\n \n\n // Monitor II\n nodes.push({id: 6, label: 'Backup001', title:'<strong>Backup001</strong>', image: DIR + 'backup.png', shape: 'image'});\n nodes.push({id: 7, label: 'Primary001', title:'<strong>Primary001</strong>', image: DIR + 'primary_site.png', shape: 'image'});\n nodes.push({id: 8, label: 'Backup002', title:'<strong>Backup002</strong>', image: DIR + 'backup.png', shape: 'image'});\n edges.push({from: 5, to: 6, arrows:'to'});\n edges.push({from: 5, to: 7, arrows:'to'});\n edges.push({from: 5, to: 8, arrows:'to'});\n\n\n // Storage servers\n nodes.push({id: 9, label: 'HP-DATA-01', title:'<strong>HP-DATA-01</strong>', image: DIR + 'storage_server_alert.png', shape: 'image',\n title:'Disk C:<strong style=\"color:green\"> 600 Go / 1 To</strong></br>Disk D:<strong style=\"color:red\"> 490 Go / 500 Go</strong>'});\n nodes.push({id: 10, label: 'DESKTOP-DATA-01', title:'<strong>DESKTOP-DATA-01</strong>', image: DIR + 'storage_server.png', shape: 'image'});\n nodes.push({id: 11, label: 'SLQAzure001', title:'<strong>SLQAzure001</strong>', image: DIR + 'sql_azure.png', shape: 'image'});\n nodes.push({id: 12, label: 'MySQLServer001', title:'<strong>MySQLServer001</strong>', image: DIR + 'mysql_server.png', shape: 'image'});\n nodes.push({id: 13, label: 'Cloud', title:'<strong>Cloud</strong>', image: DIR + 'pont.png', shape: 'image'});\n nodes.push({id: 14, label: 'Cloud001', title:'<strong>Cloud001</strong>', image: DIR + 'cloud.png', shape: 'image'});\n nodes.push({id: 15, label: 'Cloud002', title:'<strong>Cloud002</strong>', image: DIR + 'cloud.png', shape: 'image'});\n nodes.push({id: 16, label: 'Cloud003', title:'<strong>Cloud003</strong>', image: DIR + 'cloud.png', shape: 'image'});\n edges.push({from: 2, to: 9, arrows:'to'});\n edges.push({from: 2, to: 10, arrows:'to'});\n edges.push({from: 2, to: 11, arrows:'to'}); \n edges.push({from: 2, to: 12, arrows:'to'});\n edges.push({from: 2, to: 13, arrows:'to'});\n edges.push({from: 13, to: 14, arrows:'to'});\n edges.push({from: 13, to: 15, arrows:'to'});\n edges.push({from: 13, to: 16, arrows:'to'});\n\n\n\n // Jobs server\n nodes.push({id: 17, label: 'HP-JOB-02', title:'<strong>HP-JOB-02</strong>', image: DIR + 'job_server.png', shape: 'image'});\n nodes.push({id: 18, label: 'DESKTOP-JOB-02', title:'<strong style=\"color:red\"> Intrusion detect !</strong>', image: DIR + 'job_server_intruision_alert.png', shape: 'image'});\n edges.push({from: 3, to: 17, arrows:'to'});\n edges.push({from: 3, to: 18, arrows:'to'});\n\n\n // FTP directory\n nodes.push({id: 19, label: 'Music', title:'<strong>Music directory</strong>', image: DIR + 'data_type.png', shape: 'image'});\n nodes.push({id: 20, label: 'Videos', title:'<strong style=\"color:red\"> Videos directory corrupted !</strong>', image: DIR + 'data_type_alert.png', shape: 'image'});\n nodes.push({id: 21, label: 'Mooc', title:'<strong style=\"color:red\"> Mooc directory corrupted !</strong>', image: DIR + 'data_type_alert.png', shape: 'image'});\n nodes.push({id: 22, label: 'Documents', title:'<strong>Document directory</strong>', image: DIR + 'data_type.png', shape: 'image'});\n edges.push({from: 4, to: 19, arrows:'to'});\n edges.push({from: 4, to: 20, arrows:'to'});\n edges.push({from: 4, to: 21, arrows:'to'});\n edges.push({from: 4, to: 22, arrows:'to'});\n \n\n\n // create a network\n var container = document.getElementById('mynetwork');\n var data = {\n nodes: nodes,\n edges: edges\n };\n var options = { \n interaction:{\n dragNodes:true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideNodesOnDrag: false,\n hover: true,\n hoverConnectedEdges: true,\n keyboard: {\n enabled: false,\n speed: {x: 10, y: 10, zoom: 0.1},\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: true,\n selectable: true,\n selectConnectedEdges: true,\n tooltipDelay: 200,\n zoomView: true\n } \n };\n network = new vis.Network(container, data, options);\n\n}", "title": "" }, { "docid": "9a1abeeda426954f71e3aff4bcde1b22", "score": "0.5532804", "text": "function showGraph1(){\n\tfor(var i=0; i<this.vertices; ++i){\n\t\tputstr(i + \" => \");\n\t\tfor(var j=0; j<this.vertices; ++j){\n\t\t\tif(this.adj[i][j] != undefined)\n\t\t\t\tputstr(this.adj[i][j] + \" \");\n\t\t}\n\t\tprint();\n\t}\n}", "title": "" }, { "docid": "6b374e495a3c39a2c2310ae660bf0fab", "score": "0.55289406", "text": "render (graph) {\n this._graph = graph\n this._items = graph.getItemKeys()\n\n // bind DOM nodes to items\n this._nodes = this.canvas.select(this.selectors.nodeGroup)\n .selectAll(this.selectors.node)\n .data(this._items, d => d)\n\n this._enterNodes()\n this._updateNodes()\n this._exitNodes()\n\n const nodes = this._graph.getItemKeys()\n const linksArr = this._graph.getLinksArray()\n const links = []\n _.each(linksArr, (link) => {\n const source = nodes.indexOf(link[0])\n const target = nodes.indexOf(link[1])\n links.push({ source, target })\n })\n const data = []\n _.each(nodes, (node) => {\n let coords = {}\n const item = { id: node, x: 0, y: 0 }\n if (this.coords && this.coords[node]) {\n coords = JSON.parse(this.coords[node])\n if (coords[this.constructor.name]) {\n data.push(_.assign({\n fx: coords[this.constructor.name].x,\n fy: coords[this.constructor.name].y,\n }, item))\n } else {\n data.push(item)\n }\n } else {\n data.push(item)\n }\n })\n\n this.layout.update(data, links)\n\n // init edges only after its coord are ready\n this._edges = this.svg.select(this.selectors.edgeGroup)\n .selectAll(this.selectors.link)\n .data(this._graph.getLinksArray())\n\n this._enterEdges()\n this._exitEdges()\n\n this.layout.once('end', () => {\n _.each(this._enteredNodes.nodes(), (node) => {\n const key = node.__data__\n this.children[key].$el.removeClass(`${this.selectors.hidden.slice(1)}`)\n })\n this._enteredEdges.classed(this.selectors.hidden.slice(1), false)\n this._exitedEdges.classed(this.selectors.hidden.slice(1), true)\n this.transform = false\n })\n this.updateLayout()\n }", "title": "" }, { "docid": "65338f18197c0b8dd03a19d757baaa2f", "score": "0.552683", "text": "function draw() {\n \n background(30);\n stroke (255, 39)\n strokeWeight(1)\n createConnections();\n \n}", "title": "" }, { "docid": "b977d3aa3186a76c2aa73a8999d21b50", "score": "0.552108", "text": "function display_graph(){\r\n // initial scaling and position of the graph with a mind-blowing futuristic avant-gardiste animation\r\n svg.call(zoom_handler.transform, translate_to_center(60));\r\n svg.transition().delay(1500).duration(5000).call(zoom_handler.transform, translate_to_center(0.07)).ease(d3.easeBack);\r\n // draw the edges\r\n g.selectAll(\".link\")\r\n .data(Object.values(edges)).enter()\r\n .append(\"line\")\r\n .attr(\"x1\", function(d) {return d.x1;})\r\n .attr(\"y1\", function(d) {return d.y1;})\r\n .attr(\"x2\", function(d) {return d.x2;})\r\n .attr(\"y2\", function(d) {return d.y2;})\r\n .attr(\"id\", function(d) {return d.id;})\r\n .attr(\"class\", function(d) {\r\n return (d.type == 'baseline') ? 'link': 'link indicative_link';\r\n })\r\n .style('stroke', EDGE_COLOR)\r\n .attr('marker-end','url(#arrowhead)');\r\n\r\n // draw the nodes\r\n g.selectAll(\".node\")\r\n .data(Object.values(nodes)).enter()\r\n .append(\"circle\")\r\n .attr(\"cx\", function(d) {return d.x;})\r\n .attr(\"cy\", function(d) {return d.y;})\r\n .attr(\"class\", \"node\")\r\n .attr(\"id\", d => d.id)\r\n .style('fill', NODE_COLOR)\r\n .on(\"click\", function(d) {\r\n on_click_node(d.id);\r\n });\r\n\r\n // add text above nodes\r\n g.selectAll(\"text\")\r\n .data(Object.values(nodes), function(d){return d.id;})\r\n .enter()\r\n .append('text')\r\n .attr('x', function(d){return d.x+5;})\r\n .attr('y', function(d){return d.y-16;})\r\n .attr('id', function(d){return 'title_' + d.id;})\r\n .attr('class', 'node_title')\r\n .text(function(d){ return d.title});\r\n}", "title": "" }, { "docid": "4e35a70b9a6d35e59e0ce257506e73c3", "score": "0.55163306", "text": "function Connections(props) {\n let heading = \"Connections\";\n\n if (props.userViewing === true) {\n heading = \"My Connections\";\n } else if (props.userViewing === false) {\n heading = \"Her Connections\";\n } else if (!props.userViewing) {\n heading = \"Members\";\n }\n\n let userArray = props.users.map((person, index) => {\n let userLastInitial = person.last_name.slice(0, 1) + \".\";\n if (index < 4) {\n return (\n <div key={person.id} className=\"Connections__person\">\n <ProfilePicture type=\"small\" image={person.image ? person.image : require('../../assets/images/profile_default.svg')} />\n <p className=\"Connections--name\">\n {person.first_name} {userLastInitial}\n </p>\n </div>\n );\n } else if (index === 4) {\n return (\n <div className=\"Connections__person\">\n <div className=\"Connections__person__div\">\n <Link className=\"Connections__link\" to={props.to}>\n {props.extraUsers}\n </Link>\n </div>\n </div>\n );\n } else return null;\n });\n return (\n <div className=\"Connections\">\n <h1 className=\"Connections__heading\">{heading}</h1>\n <div className=\"Connections__list\">{userArray}</div>\n </div>\n );\n}", "title": "" }, { "docid": "02f26d0d66573addcd10c8ca41d85e55", "score": "0.55096024", "text": "function renderAll() {\n chart.each(render);\n d3.select(\"aside.catcorr #active\")\n\t\t.text(formatNumber(catcorr.groups[0].all.value()));\n }", "title": "" }, { "docid": "403186d2e84e787f405de402ca67c5d8", "score": "0.55053455", "text": "function draw()\n{\n\tNodes = new vis.DataSet();\n\tRelationships = new vis.DataSet();\n\tSecurityGroupNodes = new vis.DataSet();\n\tSecurityGroupRelationships = new vis.DataSet();\n\n\tvar options =\n {\n\t\tinteraction: \n\t\t{\n\t\t\tnavigationButtons: true, \n\t\t\tkeyboard: true, \n\t\t\thover: true, \n\t\t\thideEdgesOnDrag: true\n\t\t},\n nodes: \n\t\t{\n\t\t\tshape: 'dot', \n\t\t\tborderWidth:3,\n\t\t\tsize:40,\n\t\t\tshapeProperties: \n\t\t\t{ \n\t\t\t\tuseBorderWithImage:true\n\t\t\t},\n\t\t\tcolor: \n\t\t\t{\n\t\t\t\tbackground:'white', \n\t\t\t\tborder:'black', \n\t\t\t\thighlight:\n\t\t\t\t{\n\t\t\t\t\tbackground:'white',\n\t\t\t\t\tborder: 'black '\n\t\t\t\t},\n\t\t\t\thover: \n\t\t\t\t{\n\t\t\t\t\tborder: 'black'\n\t\t\t\t}\n\n\t\t\t},\n\t\t\tfont: \n\t\t\t{\n\t\t\t\tsize:15, color:'white', face:'courier', strokeWidth:3, strokeColor:'black'\n\t\t\t}\t\n\t\t\n\t\t},\n edges: \n\t\t{\n\t\t\twidth: 2,\n\t\t\tsmooth: \n\t\t\t{\n\t\t\t\ttype:\"continuous\",\n\t\t\t\tforceDirection: \"none\",\n\t\t\t\troundness: 0.0\n\t\t\t}\n\t\t},\n\t\tphysics: \n\t\t{\n\t\t\tenabled: false\n\t\t},\n\t\tlayout: \n\t\t{\n\t\t\timprovedLayout:true,\n\t\t\thierarchical: \n\t\t\t{\n\t\t\t\tenabled:true,\n\t\t\t\tlevelSeparation: 200,\n\t\t\t\tnodeSpacing: 200,\n\t\t\t\t//treeSpacing: 300,\n\t\t\t\tblockShifting: true,\n\t\t\t\tedgeMinimization: true,\n\t\t\t\tparentCentralization: true,\n\t\t\t\tdirection: 'UD', // UD, DU, LR, RL\n\t\t\t\tsortMethod: 'directed' // hubsize, directed\n\t\t\t}\n\t\t}\n\t};\n\n\tvar data =\n\t{\n nodes: Nodes,\n edges: Relationships\n\t};\n\n\tvar container = document.getElementById(\"hierarchyVisualizerDiv\");\n\t\n\tnetworkHierarchy = new vis.Network(container, data, options);\n\t\n\tnetworkHierarchy.on( 'selectNode', function(properties) \n\t{\n\t\tvar ids = properties.nodes;\n\t\tvar xhttp = new XMLHttpRequest();\n\t\n\t\txhttp.onreadystatechange = function() \n\t\t{\n\t\t\tif (this.readyState == 4 && this.status == 200) \n\t\t\t{\n\t\t\t\tif(this.responseText!=\"null\")\n\t\t\t\t{\t\n\t\t\t\t\tdocument.getElementById(\"information\").innerHTML = this.responseText;\n\t\t\t\t\tdocument.getElementById(\"fromUUID\").value =ids ;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\txhttp.open(\"GET\", \"http://localhost:8080/NotLikeThisRESTServer_war_exploded/services/getInformation?uuid=\"+ids, true);\n\t\txhttp.send();\n\t\t\n\t\t\n\t\t\n\t\tif(String(ids).startsWith(\"i\")||String(ids).startsWith(\"vpc\"))\n\t\t{\n\t\t\tdrawSecurity(ids);\n\t\t\tdocument.getElementById(\"hierarchyVisualizerDiv\").style.visibility='hidden';\n\t\t\tdocument.getElementById(\"securityGroupDiv\").style.visibility='visible';\n\t\t\tdocument.getElementById(\"closeSecurityImg\").style.visibility='visible';\n\t\t\tcurrentID=ids;\n\t\t}\n\t});\t\n}", "title": "" }, { "docid": "3d52d0c1539c81ea3587cb618304eced", "score": "0.5494216", "text": "function render(){var createNodes=require(\"./create-nodes\"),createClusters=require(\"./create-clusters\"),createEdgeLabels=require(\"./create-edge-labels\"),createEdgePaths=require(\"./create-edge-paths\"),positionNodes=require(\"./position-nodes\"),positionEdgeLabels=require(\"./position-edge-labels\"),positionClusters=require(\"./position-clusters\"),shapes=require(\"./shapes\"),arrows=require(\"./arrows\");var fn=function(svg,g){preProcessGraph(g);var outputGroup=createOrSelectGroup(svg,\"output\"),clustersGroup=createOrSelectGroup(outputGroup,\"clusters\"),edgePathsGroup=createOrSelectGroup(outputGroup,\"edgePaths\"),edgeLabels=createEdgeLabels(createOrSelectGroup(outputGroup,\"edgeLabels\"),g),nodes=createNodes(createOrSelectGroup(outputGroup,\"nodes\"),g,shapes);layout(g);positionNodes(nodes,g);positionEdgeLabels(edgeLabels,g);createEdgePaths(edgePathsGroup,g,arrows);var clusters=createClusters(clustersGroup,g);positionClusters(clusters,g);postProcessGraph(g)};fn.createNodes=function(value){if(!arguments.length)return createNodes;createNodes=value;return fn};fn.createClusters=function(value){if(!arguments.length)return createClusters;createClusters=value;return fn};fn.createEdgeLabels=function(value){if(!arguments.length)return createEdgeLabels;createEdgeLabels=value;return fn};fn.createEdgePaths=function(value){if(!arguments.length)return createEdgePaths;createEdgePaths=value;return fn};fn.shapes=function(value){if(!arguments.length)return shapes;shapes=value;return fn};fn.arrows=function(value){if(!arguments.length)return arrows;arrows=value;return fn};return fn}", "title": "" }, { "docid": "b10e16203ed5353f10ca469a9cf7ad06", "score": "0.5488972", "text": "function render() {\n renderGraph(parsedData, elements, chartConfig);\n }", "title": "" }, { "docid": "08b2e7555a36c330b7b44ee05c8ee29a", "score": "0.54837096", "text": "function updateDisplay() {\n\n\tif ( document.getElementById(\"cluster-color\").selected ) {\n\t\tcolorCluster();\n\t} else if ( document.getElementById(\"gender-color\").selected ) {\n\t\tcolorGender();\n\t} else if ( document.getElementById(\"negara-color\").selected ) {\n\t\tcolorNational();\n\t} else if ( document.getElementById(\"status-color\").selected) {\n\t\tcolorStatus();\n\t} else if ( document.getElementById(\"umur-color\").selected) {\n\t\tcolorAge();\n\t} else if ( document.getElementById(\"rs-color\").selected) {\n\t\tcolorHospital();\n\t}\n\n\tnode\n\t\t.on(\"mouseover\", fade(.1, \"black\"))\n\t\t.on(\"mouseout\",fade(1, \"white\"));\n\n\tlink\n\t\t.style(\"stroke\", \"white\")\n\t\t.style(\"stroke-width\", 3);\n\n\tidText\n\t\t.on(\"mouseover\", fade(.1, \"black\"))\n\t\t.on(\"mouseout\",fade(1, \"white\"));\n\n\t\tvar linkedByIndex = {};\n\t\tgraph.links.forEach(function(d) {\n\t\t\t\tlinkedByIndex[d.source.index + \",\" + d.target.index] = 1;\n\t\t});\n\n\t\t////console.log(linkedByIndex);\n\n\t\tfunction isConnected(a, b) {\n\t\t\t\treturn linkedByIndex[a.index + \",\" + b.index] || linkedByIndex[b.index + \",\" + a.index] || a.index == b.index;\n\t\t}\n\n\t\tfunction fade(opacity,color) {\n\t\t\t\t\t\t\t\t\t return function(d) {\n\n\t\t\t\t\t\t\t\t//node.style(\"stroke-opacity\", function(o) {\n\t\t\t\t\t\t\t\t\t //thisOpacity = isConnected(d, o) ? 1 : opacity;\n\t\t\t\t\t\t\t\t\t //this.setAttribute('fill-opacity', thisOpacity);\n\t\t\t\t\t\t\t\t\t //return thisOpacity;\n\t\t\t\t\t\t\t //});\n\n\t\t var connected = [d];\n\n\t\t node.style(\"stroke-opacity\", function(o) {\n\t\t\t\t thisOpacity = opacity;\n\t\t\t\t connected.forEach(function(e) {\n\t\t\t\t\t\t if(isConnected(e, o)) { thisOpacity = 1; }\n\t\t\t\t });\n\t\t\t\t this.setAttribute('fill-opacity', thisOpacity);\n\t\t\t\t return thisOpacity;\n\t\t });\n\n\n\n\t\t link\n\t\t .style(\"stroke-opacity\", function(o) {\n\t\t\t\t thisOpacity = opacity;\n\t\t\t\t\t\t connected.forEach(function(e) {\n\t\t\t\t\t\t\t\t if(o.source === e || o.target === e) {\n\t\t\t\t\t\t\t\t\t\t thisOpacity = 1;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t });\n\t\t\t\t\t\t return thisOpacity;\n\t\t\t\t\t})\n\t\t\t\t\t.style(\"stroke\", function(o) {\n\t\t\t\t\t\t\t\t thisColor = color;\n\t\t\t\t\t\t\t\t connected.forEach(function(e) {\n\t\t\t\t\t\t\t\t\t\t if(o.source === e || o.target === e) {\n\t\t\t\t\t\t\t\t\t\t\t\t thisColor = \"white\";\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t return thisColor;\n\t\t\t\t\t\t });\n\n\t\t\t\t };\n\n\t\t\t\t }\n}", "title": "" }, { "docid": "f120e952fd3153372c03acbcfe96c41d", "score": "0.5479802", "text": "drawChart () {\n const self = this;\n \n // Draw the nodes\n self.nodeHandler.drawNodes(self.nodeSelection, self);\n \n // Draw the highlighted nodes\n if (self.highlightedNode) {\n self.nodeHandler.drawNodes(self.highlightSelection, self);\n }\n }", "title": "" }, { "docid": "ec620a80d2b7a06afa0cb15a6ee7a986", "score": "0.5473123", "text": "connectedCallback(){\r\n this._firstConnection = true;\r\n this.redraw();\r\n }", "title": "" }, { "docid": "5092fd0c35ee4e9691d0bdc0d462d74c", "score": "0.5469677", "text": "function renderCytoVisual() {\n setCytoVisual(\n <ShowVisualization\n data={{\n elements: cytoElements,\n stylesheet: shumlexCytoscapeStyle,\n }}\n type={visualizationTypes.cytoscape}\n embedLink={mkEmbedLink(stateSchemaParams, {\n visualizationType: embedLinkType,\n visualizationTarget: API.queryParameters.visualization.targets.cyto,\n })}\n />\n );\n }", "title": "" }, { "docid": "c795c70f7e296a9f80acd51045fdb88b", "score": "0.54638547", "text": "function renderGraph(svg, force, graph, cmg, circleDataLoaded) {\"use strict\";\n\n var largeScale = 'scale(2)';\n var smallScale = 'scale(0.2)';\n\n // clear the current graph\n var removedLinks = svg.selectAll(\".link\").remove();\n var removedNodes = svg.selectAll(\".node\").remove();\n\n if (graph.nodes.length < 1) {\n return;\n }\n\n // reset circleMapSvg class elements by creating circleMap elements for each query feature.\n var svgNodeLayer = svg.select('#nodeLayer');\n var nodeNames = graph.getAllNodeNames();\n if (circleDataLoaded) {\n for (var i in nodeNames) {\n var feature = nodeNames[i];\n var circleMapElement = cmg.drawCircleMap(feature, svgNodeLayer);\n }\n }\n\n // start the layout\n force.nodes(graph.nodes).links(graph.links).start();\n\n // links\n var svgLinkLayer = svg.select('#linkLayer');\n var linkSelection = svgLinkLayer.selectAll(\".link\").data(graph.links).enter().append(\"line\").attr('id', function(d, i) {\n return 'link' + i;\n }).attr({\n 'class' : \"link\"\n }).style(\"stroke\", function(d) {\n return colorMapper(d.relation);\n });\n\n linkSelection.style(\"stroke-width\", function(d) {\n return d.value;\n });\n\n // mouse events for links - thicken on mouseover\n linkSelection.on('mouseover', function(d, i) {\n // mouseover event for link\n var linkElement = document.getElementById('link' + i);\n linkElement.setAttributeNS(null, 'style', 'stroke-width:' + (d.value * 3) + ' ; stroke:' + colorMapper(d.relation));\n }).on('mouseout', function(d, i) {\n // mouseout event for link\n var linkElement = document.getElementById('link' + i);\n linkElement.setAttributeNS(null, 'style', 'stroke-width:' + d.value + ' ; stroke:' + colorMapper(d.relation));\n });\n\n // context menu for link\n linkSelection.on(\"contextmenu\", function(d, i) {\n var position = d3.mouse(this);\n var linkDesc = d.source.name + ' ' + d.relation + ' ' + d.target.name;\n console.log('right click on link: ' + linkDesc + '(' + i + ')');\n\n $(showElementDialogBox('edge', graph, i));\n\n d3.event.preventDefault();\n d3.event.stopPropagation();\n });\n\n // nodes\n var nodeSelection = svgNodeLayer.selectAll(\".node\").data(graph.nodes).enter().append(\"g\").attr('class', function(d, i) {\n return \"node \" + d.name + ' ' + d.group;\n });\n if (circleDataLoaded) {\n // mouse events for circleMap nodes\n nodeSelection.each(function(d) {\n // add attribute to the node data\n var circleMapSvgElement = document.getElementById('circleMapSvg' + d['name']);\n var circleMapGElement = circleMapSvgElement.getElementsByClassName(\"circleMapG\");\n circleMapGElement[0].setAttributeNS(null, 'transform', smallScale);\n }).on('mouseover', function(d, i) {\n // mouseover event for node\n var circleMapSvgElement = document.getElementById('circleMapSvg' + d['name']);\n var circleMapGElement = circleMapSvgElement.getElementsByClassName(\"circleMapG\");\n circleMapGElement[0].setAttributeNS(null, 'transform', largeScale);\n }).on('mouseout', function(d, i) {\n // mouseout event for node\n var circleMapSvgElement = document.getElementById('circleMapSvg' + d['name']);\n var circleMapGElement = circleMapSvgElement.getElementsByClassName(\"circleMapG\");\n circleMapGElement[0].setAttributeNS(null, 'transform', smallScale);\n });\n } else {\n // mouse events for sbgn nodes\n nodeSelection.on('mouseover', function(d, i) {\n // mouseover event for node\n var nodeElement = document.getElementsByClassName(\"node \" + d.name + ' ' + d.group);\n var nodeSbgnElement = nodeElement[0].getElementsByClassName('sbgn');\n nodeSbgnElement[0].setAttributeNS(null, 'style', 'stroke-width:4;fill:' + colorMapper(d.group));\n }).on('mouseout', function(d, i) {\n // mouseout event for node\n var nodeElement = document.getElementsByClassName(\"node \" + d.name + ' ' + d.group);\n var nodeSbgnElement = nodeElement[0].getElementsByClassName('sbgn');\n nodeSbgnElement[0].setAttributeNS(null, 'style', 'stroke-width:1;fill:' + colorMapper(d.group));\n });\n }\n nodeSelection.call(force.drag);\n\n // context menu for node\n nodeSelection.on(\"contextmenu\", function(d, i) {\n var position = d3.mouse(this);\n console.log('right click on node: ' + d.name + '(' + i + ')');\n\n $(showElementDialogBox('node', graph, i));\n\n d3.event.preventDefault();\n d3.event.stopPropagation();\n });\n\n // TODO node click\n nodeSelection.on(\"click\", function(d, i) {\n var position = d3.mouse(this);\n console.log('left click on node: ' + d.name + '(' + i + ')');\n\n var nodeClickMode = getNodeClickMode();\n\n console.log('click mode: ' + nodeClickMode);\n\n if (nodeClickMode == 'none' || nodeClickMode == sbgn_config['edgeTypeOptions'][0]) {\n console.log('ignore click event');\n } else {\n addClickedNodeToList(i);\n for (var i in clickedNodesArray) {\n var idx = clickedNodesArray[i];\n console.log(idx);\n }\n\n updateNewEdgeDialog();\n }\n\n d3.event.preventDefault();\n d3.event.stopPropagation();\n });\n\n // node visualization\n var opacityVal = 0.6;\n nodeSelection.append(function(d) {\n var nodeName = d['name'];\n var type = d.group.toString().toLowerCase();\n if ((circleDataLoaded ) && (nodeNames.indexOf(nodeName) >= 0)) {\n // circleMap\n var stagedElement = document.getElementById('circleMapSvg' + nodeName);\n return stagedElement;\n } else if (sbgn_config['nucleicAcidFeatureTypes'].indexOf(type) != -1) {\n var newElement = document.createElementNS(svgNamespaceUri, 'path');\n newElement.setAttributeNS(null, 'class', 'sbgn');\n var path = bottomRoundedRectSvgPath(-20, -15, 40, 30, 10);\n newElement.setAttributeNS(null, 'd', path);\n newElement.setAttributeNS(null, 'opacity', opacityVal);\n newElement.setAttributeNS(null, 'stroke', 'black');\n return newElement;\n } else if (sbgn_config['macromoleculeTypes'].indexOf(type) != -1) {\n var newElement = document.createElementNS(svgNamespaceUri, 'path');\n newElement.setAttributeNS(null, 'class', 'sbgn');\n var path = allRoundedRectSvgPath(-20, -15, 40, 30, 10);\n newElement.setAttributeNS(null, 'd', path);\n newElement.setAttributeNS(null, 'opacity', opacityVal);\n newElement.setAttributeNS(null, 'stroke', 'black');\n return newElement;\n } else if (sbgn_config['simpleChemicalTypes'].indexOf(type) != -1) {\n // circle\n var newElement = document.createElementNS(svgNamespaceUri, 'circle');\n newElement.setAttributeNS(null, 'class', 'sbgn');\n newElement.setAttributeNS(null, 'r', nodeRadius);\n newElement.setAttributeNS(null, 'opacity', opacityVal);\n newElement.setAttributeNS(null, 'stroke', 'black');\n return newElement;\n } else if (sbgn_config['complexTypes'].indexOf(type) != -1) {\n var newElement = document.createElementNS(svgNamespaceUri, 'path');\n newElement.setAttributeNS(null, 'class', 'sbgn');\n var path = allAngledRectSvgPath(-50, -30, 100, 60);\n newElement.setAttributeNS(null, 'd', path);\n newElement.setAttributeNS(null, 'opacity', opacityVal);\n newElement.setAttributeNS(null, 'stroke', 'black');\n return newElement;\n } else {\n // unspecified entity\n var newElement = document.createElementNS(svgNamespaceUri, 'ellipse');\n newElement.setAttributeNS(null, 'class', 'sbgn');\n newElement.setAttributeNS(null, 'cx', 0);\n newElement.setAttributeNS(null, 'cy', 0);\n newElement.setAttributeNS(null, 'rx', 1.5 * d3_config['nodeRadius']);\n newElement.setAttributeNS(null, 'ry', 0.75 * d3_config['nodeRadius']);\n newElement.setAttributeNS(null, 'opacity', opacityVal);\n newElement.setAttributeNS(null, 'stroke', 'black');\n return newElement;\n }\n }).style(\"fill\", function(d) {\n return colorMapper(d.group);\n });\n\n nodeSelection.append(\"svg:text\").attr(\"text-anchor\", \"middle\").attr('dy', \".35em\").text(function(d) {\n return d.name;\n });\n\n // edge tooltips\n linkSelection.append(\"title\").text(function(d) {\n var label = d.source.name + \" \" + d.relation + \" \" + d.target.name;\n return label;\n });\n\n // node tooltips\n nodeSelection.append(\"title\").text(function(d) {\n return d.name + ' : ' + d.group;\n });\n\n // tick handler repositions graph elements\n force.on(\"tick\", function() {\n linkSelection.attr(\"x1\", function(d) {\n return d.source.x;\n }).attr(\"y1\", function(d) {\n return d.source.y;\n }).attr(\"x2\", function(d) {\n return d.target.x;\n }).attr(\"y2\", function(d) {\n return d.target.y;\n });\n\n nodeSelection.attr(\"transform\", function(d) {\n return 'translate(' + d.x + ',' + d.y + ')';\n });\n });\n}", "title": "" }, { "docid": "19e69380c466c38a3b10ac9ca41421dc", "score": "0.54636323", "text": "function drawConnector(A, B, svgClass, svgColor, connectedTo, connect4rom) {\r\n\tvar posnA = {\r\n\t\tx: A.offsetLeft + A.offsetWidth,\r\n\t\ty: A.offsetTop + A.offsetHeight / 2\r\n\t};\r\n\tvar posnB = {\r\n\t\tx: B.offsetLeft,\r\n\t\ty: B.offsetTop + B.offsetHeight / 2\r\n\t};\r\n//\tconnector.setAttribute(\"d\", dStr);\r\n\tnodesconnector((\"M\" +\r\n\t\t(posnA.x) + \",\" + (posnA.y) + \" \" +\r\n\t\t\"C\" +\r\n\t\t(posnA.x + 100) + \",\" + (posnA.y) + \" \" +\r\n\t\t(posnB.x - 100) + \",\" + (posnB.y) + \" \" +\r\n\t\t(posnB.x) + \",\" + (posnB.y)), svgClass, svgColor, connectedTo, connect4rom);\r\n}", "title": "" }, { "docid": "70985824d94849e89e01e15b71ace5dd", "score": "0.5454282", "text": "function displayGraphic() {\n Cayley_diagram = new CayleyDiagram(group, Diagram_name);\n Graphic_context.showGraphic(Cayley_diagram);\n DC.update();\n}", "title": "" }, { "docid": "e8557663278a74bacc8b2e7909bda478", "score": "0.54324067", "text": "function initializeDisplay() {\n\n link = inner.append(\"g\")\n .selectAll(\"line\")\n .data(graph.links)\n .enter().append(\"line\")\n .attr(\"stroke-width\", function(d) { return (d.colabs); })\n .style(\"stroke\", \"white\")\n .on(\"mouseover\", function(d) {\n div2.transition()\n .duration(200)\n .style(\"opacity\", .9);\n div2.html(\"<b>Conexión</b>\" + \"<br/>\" + d.sourcename + \"<br/>\" + d.targetname + \"<br/><i>\" + d.colabs + \" publicaciones</i>\")\n .style(\"left\", (d3.event.pageX) + \"px\")\n .style(\"top\", (d3.event.pageY - 28) + \"px\")\n .style(\"background\", \"white\");\n })\n .on(\"mouseout\", function(d) {\n div2.transition()\n .duration(500)\n .style(\"opacity\", 0);\n });\n\n node = inner.append(\"g\")\n .attr(\"class\", \"nodes\")\n .selectAll(\"circle\")\n .data(graph.nodes)\n .enter().append(\"circle\")\n .attr(\"r\", function(d) {return circlefact*Math.log(d.pubs + 2)})\n .style(\"fill\", function(d) {return d.color})\n .on(\"mouseover\", function(d) {\n div.transition()\n .duration(200)\n .style(\"opacity\", .9);\n div\t.html(\"<b>\" + d.name + \"</b>\"+ \"<br/>\" + \"<i>\" + d.depto + \"</i>\" + \"<br/>\" + \"Publicaciones \" + d.pubs)\n .style(\"left\", (d3.event.pageX) + \"px\")\n .style(\"top\", (d3.event.pageY - 28) + \"px\")\n .style(\"background\", d.color);\n })\n .on(\"mouseout\", function(d) {\n div.transition()\n .duration(500)\n .style(\"opacity\", 0);\n })\n .call(d3.drag()\n .on(\"start\", dragstarted)\n .on(\"drag\", dragged)\n .on(\"end\", dragended));\n}", "title": "" }, { "docid": "9bffb6a2ef53855f54c0e0f1d9113e2a", "score": "0.54314494", "text": "draw() {\n this.canvas.width = retfix(this.canvasWidth)\n this.canvas.height = retfix(this.canvasHeight)\n this.canvas.style.width = this.canvasWidth + 'px'\n this.canvas.style.height = this.canvasHeight + 'px'\n\n const ctx = this.canvas.getContext('2d')\n ctx.fillStyle = '#123'\n ctx.fillRect(0, 0, this.canvas.width, this.canvas.height)\n\n // First draw connections..\n for (let node of this.nodes) {\n const nodeInputs = node.inputs.filter(\n inp => inp && inp.type === 'node')\n for (let input of nodeInputs) {\n\n const i = node.inputs.indexOf(input)\n\n // Powered connections should have a lighter color..\n if (input.node.output) {\n ctx.strokeStyle = '#5A5'\n } else {\n ctx.strokeStyle = '#353'\n }\n\n ctx.lineWidth = 5\n\n const [startX, startY] = this.scrollify(\n this.getOutputWirePos(input.node))\n const [endX, endY] = this.scrollify(\n this.getInputWirePos(node, i))\n\n drawLine(ctx, startX, startY, endX, endY)\n }\n }\n\n // Then draw the actual nodes.\n for (let node of this.nodes) {\n node.draw()\n drawImage(ctx, node.canvas,\n this.scrollifyX(node.x), this.scrollifyY(node.y))\n }\n\n if (this.selectedNode) {\n // Move the node editor beside the node it's focused on.\n Object.assign(this.nodeEditorEl.style, {\n left: this.scrollifyX(this.selectedNode.centerX) + 'px',\n top: this.scrollifyY(this.selectedNode.centerY) + 'px'\n })\n\n // Make the node editor's color be the same as the node it's selected.\n const selColor = this.selectedNode.color\n this.nodeEditorEl.style.backgroundColor = (\n `rgba(${selColor[0]}, ${selColor[1]}, ${selColor[2]}, 0.3)`\n )\n this.nodeEditorEl.style.borderColor = (\n `rgba(${selColor[0]}, ${selColor[1]}, ${selColor[2]}, 0.5)`\n )\n }\n\n // If there's an output wire source thing under our cursor, draw a\n // glowing semicircle there to show that.\n const outputUnderCursor = this.getOutputUnderPos(\n this.mouseX, this.mouseY)\n\n if (outputUnderCursor) drawGrabBubble: {\n // Only draw it if we aren't dragging anything else already, though.\n // The point of the bubble is to show something can be pulled out of\n // that spot, but obviously we can't start dragging something if we're\n // already dragging another thing.\n if (this.draggingNode || this.draggingOutput) {\n break drawGrabBubble\n }\n\n const [outX, outY] = this.scrollify(\n this.getOutputWirePos(outputUnderCursor))\n\n ctx.fillStyle = 'white'\n ctx.filter = 'blur(3px)'\n drawArc(ctx, outX, outY, 8, 0.5 * Math.PI, 1.5 * Math.PI, true)\n ctx.filter = 'none'\n }\n\n // If we're dragging an output wire, draw that wire.\n if (this.draggingOutput) {\n ctx.strokeStyle = 'rgba(75, 150, 75, 0.5)'\n ctx.lineWidth = 5\n const [startX, startY] = this.scrollify(this.getOutputWirePos(\n this.draggingOutput.node))\n const [endX, endY] = this.draggingOutput.pos\n drawLine(ctx, startX, startY, endX, endY)\n\n const inputUnderCursor = this.getInputUnderPos(\n this.mouseX, this.mouseY)\n\n if (inputUnderCursor) {\n const [inputX, inputY] = this.scrollify(this.getInputWirePos(\n inputUnderCursor.node, inputUnderCursor.i))\n ctx.fillStyle = 'white'\n ctx.filter = 'blur(3px)'\n drawArc(ctx, inputX, inputY, 8, 0.5 * Math.PI, 1.5 * Math.PI, false)\n ctx.filter = 'none'\n }\n }\n\n // Don't let the node editor be part outside of the screen.\n // const bounds = this.nodeEditorEl.getBoundingClientRect()\n // if (bounds.bottom > window.innerHeight)\n // this.nodeEditorEl.style.top = (\n // (window.innerHeight - bounds.height) + 'px'\n // )\n // if (bounds.right > window.innerWidth)\n // this.nodeEditorEl.style.left = (\n // (window.innerWidth - bounds.width) + 'px'\n // )\n }", "title": "" }, { "docid": "5aca5b502a157746fafee6147f4d364a", "score": "0.54137295", "text": "connectedCallback() {\n\t\t\t\t\tthis.drawChart();\n\t\t\t\t}", "title": "" }, { "docid": "42000f82d8a572bb4bf860ecb78aea48", "score": "0.5412808", "text": "function addConnection(){\n\t\t//draw relationship between spouses\n\t\tvar gridX = SEPARATION;\n\t\tvar gridY = SEPARATION*1.5;\n\t\tvar headY = SEPARATION/2;\n\n\t\t//var gen1 = this.children.length;\n\t\t//var gen2 = this.grandchildren.length;\n\n\t\tvar gen1Center = Math.floor(0.45 * canvasCompletePedigreeDrawWidth);\n\n\t\t// draw father/mother pairing T\n\t\t//canvasCompletePedigreeDraw.drawLine(gen1Center - gridX / 2, gridY, gen1Center + gridX / 2, gridY, 1);\n\t\t//canvasCompletePedigreeDraw.drawLine(gen1Center, gridY, gen1Center, gridY * 2 - headY, 1);\n\n\t\t//draw horizontal part of connection spouses\n\t\tarrayConnections.push(new Connection2(arrayRelationship[1].begining_x_middle_horizontal, arrayRelationship[1].begining_y_middle_horizonal, arrayRelationship[1].begining_x_middle_horizontal + SEPARATION, (arrayRelationship[1].begining_y_middle_horizonal)));\n\t\tarrayConnections.push(new Connection2(arrayRelationship[3].begining_x_middle_horizontal, arrayRelationship[3].begining_y_middle_horizonal, arrayRelationship[3].begining_x_middle_horizontal + SEPARATION, (arrayRelationship[3].begining_y_middle_horizonal)));\n\t\tarrayConnections.push(new Connection2(arrayRelationship[5].begining_x_middle_horizontal, arrayRelationship[5].begining_y_middle_horizonal, arrayRelationship[5].begining_x_middle_horizontal + SEPARATION, (arrayRelationship[5].begining_y_middle_horizonal)));\n\t\t\n\t\t//draw vertical part of connection spouses\n\t\tarrayConnections.push(new Connection2((arrayRelationship[1].begining_x_middle_horizontal+(SEPARATION)/2), arrayRelationship[1].begining_y_middle_horizonal, (arrayRelationship[1].begining_x_middle_horizontal+(SEPARATION)/2), (arrayRelationship[4].drawY -30)));\n\t\tarrayConnections.push(new Connection2((arrayRelationship[3].begining_x_middle_horizontal+(SEPARATION)/2), arrayRelationship[3].begining_y_middle_horizonal, (arrayRelationship[3].begining_x_middle_horizontal+(SEPARATION)/2), arrayRelationship[8].drawY));\n\t\tarrayConnections.push(new Connection2((arrayRelationship[5].begining_x_middle_horizontal+(SEPARATION)/2), arrayRelationship[5].begining_y_middle_horizonal, (arrayRelationship[5].begining_x_middle_horizontal+(SEPARATION)/2), arrayRelationship[7].drawY));\n\t\t //draw vertical part of connection for siblings\n\t\t arrayConnections.push(new Connection2(arrayRelationship[2].begining_x_middle_vertical, arrayRelationship[2].drawY, arrayRelationship[2].begining_x_middle_vertical, (arrayRelationship[2].drawY -30)));\n\t\t arrayConnections.push(new Connection2(arrayRelationship[4].begining_x_middle_vertical, arrayRelationship[4].drawY, arrayRelationship[4].begining_x_middle_vertical, (arrayRelationship[4].drawY -30)));\n\t\t arrayConnections.push(new Connection2(arrayRelationship[6].begining_x_middle_vertical, arrayRelationship[6].drawY, arrayRelationship[6].begining_x_middle_vertical, (arrayRelationship[6].drawY -30)));\n\t\t //arrayConnections.push(new Connection2(arrayRelationship[8].begining_x_middle_vertical, arrayRelationship[8].drawY, arrayRelationship[8].begining_x_middle_vertical, (arrayRelationship[8].drawY -30)));\n\t\t arrayConnections.push(new Connection2(arrayRelationship[9].begining_x_middle_vertical, arrayRelationship[9].drawY, arrayRelationship[9].begining_x_middle_vertical, (arrayRelationship[9].drawY -30)));\n\t\t //draw horizontal connections for siblings\n\t\t arrayConnections.push(new Connection2(arrayRelationship[6].begining_x_middle_vertical, arrayRelationship[9].drawY -30, arrayRelationship[9].begining_x_middle_vertical, (arrayRelationship[9].drawY -30)));\n\t\t arrayConnections.push(new Connection2(arrayRelationship[2].begining_x_middle_vertical, arrayRelationship[4].drawY -30, arrayRelationship[4].begining_x_middle_vertical, (arrayRelationship[4].drawY -30)));\n\n\t\n\t\n}", "title": "" }, { "docid": "c21848027911135d3fdfb324bfc4ff83", "score": "0.53987795", "text": "view() {\n this.rendered++\n // Isomorphic render function that returns html and sets it for web\n return this.innerHTML = `<h1>connected ${this.rendered}</h1>`;\n }", "title": "" }, { "docid": "9e65cafbc749afa41ab6fa2907bdc6fc", "score": "0.5373095", "text": "function drawGraphs(){\n if (scope.senators.length && scope.links.length && scope.groups.length){\n\n drawSenators(\"#graphCanvas\");\n drawGroups(\"#graphCanvas\");\n\n }\n }", "title": "" }, { "docid": "e1240bc7de412ebb991c942506f1e0d4", "score": "0.53648853", "text": "function drawDisconnectedGraph() {\n\tvar width = 1400, height = 1500;\n\tvar width = (window.innerWidth * .98) - (VIEWS.SharedFunctionality.R * 2);\n\tvar height = (window.innerHeight *.70) + (VIEWS.SharedFunctionality.R * 1);\n\t\t\t\n var color = d3.scale.category20();\n\t\n myCola = cola.d3adaptor().linkDistance( VIEWS.SharedFunctionality.R * 6).avoidOverlaps(true).size([width, height]);\n\t\n\tvar svg = d3.select(\"body\").append(\"svg\").attr({\"id\":\"parentSvgNode\",\"pointer-events\": \"all\"}).on(\"dblclick.zoom\", null);\n\t\n\tsvg.append('rect').attr({'class':'background','width':\"100%\",'height':\"100%\",\"style\":\"stroke-width:4;stroke:grey\"}).call(zoom.on(\"zoom\", redrawWithDrag));\n\t\n\tfunction redrawWithDrag(transition) {\n\t\tif (VIEWS.SharedFunctionality.nodeMouseDown) return;\n\t\t\t(transition ? vis.transition() : vis)\n\t\t\t\t.attr(\"transform\", \"translate(\" + zoom.translate() + \") scale(\" + zoom.scale() + \")\");\n\t}\t\n\t\n\tvar vis = svg.append(\"g\").attr(\"id\", \"svgGraph\");\n\n\tsvg.on(\"mousedown.zoom\", null);\n\tsvg.on(\"mousemove.zoom\", null);\n\tsvg.on(\"dblclick.zoom\", null);\n\tsvg.on(\"touchstart.zoom\", null);\n\tsvg.on(\"wheel.zoom\", null);\n\tsvg.on(\"mousewheel.zoom\", null);\n\tsvg.on(\"MozMousePixelScroll.zoom\", null);\n\t\t\n\tvar nodesData = NETWORK_OBJECTS.busDataObj.dataObjList;\n\tvar edgesData = NETWORK_OBJECTS.branchDataObj.dataObjList;\t\n\n\t//NOTE - THE LOGIC FOR GENERATION OF MULTI LINE NEEDS TO BE CORRECTED - THE CURRENT LOGIC GENERATES THE LINES BUT VIOLATES THE CLASS STRUCTURE. \n\t// THIS NEEDS TO BE FIXED.\n\tvar standardEdgesData = [], transformerEdgesData = [], lineChargeEdgesData = [],MultiLineEdgesData = [], multiEdgeName = \"\",edgeCouple = [];\n\tvar testEdgesData = [];\n\n\t//Sorting the edge data to support cases like 'nesta_case29_edin.m' where the branches are all jumbled up.\n\tedgesData = edgesData.sort(\n\t\tfunction compare(a,b) {\n\t\t\tif (a.edgeName < b.edgeName)\n\t\t\t\treturn -1;\n\t\t\tif (a.edgeName > b.edgeName)\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}\n\t);\n\t\n\tfor(var edgeIndex = 0; edgeIndex <edgesData.length; edgeIndex++) {\n\t\tvar crtEdge = edgesData[edgeIndex];\n\t\t\n\t\tif(crtEdge.edgeType === \"Standard\" && !crtEdge.isMultiLine) {\n\t\t\tstandardEdgesData.push(crtEdge);\n\t\t}\n\t\telse if(crtEdge.edgeType === \"Transformer\" && !crtEdge.isMultiLine) {\n\t\t\ttransformerEdgesData.push(crtEdge);\n\t\t}\n\t\telse if(crtEdge.edgeType === \"TestType\" && !crtEdge.isMultiLine) {\n\t\t\ttestEdgesData.push(crtEdge);\n\t\t}\n\t\telse if(crtEdge.edgeType === \"LineCharge\" && !crtEdge.isMultiLine) {\n\t\t\tlineChargeEdgesData.push(crtEdge);\n\t\t}\n\t\telse if (crtEdge.isMultiLine) {\t\n\t\t\tif(multiEdgeName !== crtEdge.edgeName.slice(0,-2)) {\n\t\t\t\tedgeCouple=[];\n\t\t\t\tmultiEdgeName = crtEdge.edgeName.slice(0,-2);\n\t\t\t\tedgeCouple.push(crtEdge);\n\t\t\t}\n\t\t\telse if (multiEdgeName === crtEdge.edgeName.slice(0,-2)){\n\t\t\t\tedgeCouple.push(crtEdge);\n\t\t\t\tmultiEdgeName = crtEdge.edgeName.slice(0,-2);\n\t\t\t\tMultiLineEdgesData.push(edgeCouple);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tvar standardEdges = new NETWORK.GRAPH.StandardEdges(vis,standardEdgesData);\n\tvar transformerEdges = new NETWORK.GRAPH.TransformerEdges(vis,transformerEdgesData);\n\tvar lineChargeEdges = new NETWORK.GRAPH.LineChargeEdges(vis,lineChargeEdgesData);\n\tvar testEdges = new NETWORK.GRAPH.TestEdges(vis, testEdgesData);\n\t\n\n\tvar MultiLineEdges=[];\n\tfor(var multiIndex = 0; multiIndex<MultiLineEdgesData.length;multiIndex++) {\n\t\t\tMultiLineEdges.push(new NETWORK.GRAPH.MultiLineEdges(vis,MultiLineEdgesData[multiIndex],multiIndex));\n\t}\n\t\n\tvar nodes = new NETWORK.GRAPH.Nodes(nodesData,vis,myCola);\n\t\n\t//This variable has been added to check if the graph file being loaded has fixed locations or not.\n\t//If the graph being loaded has fixed locations then the zoomToFit is called again.\n\tvar fixedLocationGraphLoad = false;\n\tif(typeof NETWORK_OBJECTS.busLocation !== \"undefined\") {\n\t\tfixedLocationGraphLoad = true;\n\t\tVIEWS.SharedFunctionality.hasNodeLocationData = true;\n\t\tVIEWS.SharedFunctionality.autoLayout = false;\n\t\t$(\"#fixedPosition\").removeClass('activeButton').hover(function(){\n\t\t\t//Do nothing on the hover in this case.\n\t\t\t$(this).css({ background : 'grey', color : 'white' });\n\t\t}, function(){\n\t\t\t\t$(this).css({ background : 'white', color : 'grey' });\n\t\t});\n\t\t$(\"#autoLayoutToggle\").removeClass('activeButton');\n\t}\n\telse {\n\t\tVIEWS.SharedFunctionality.hasNodeLocationData = false;\n\t\tVIEWS.SharedFunctionality.autoLayout = true;\n\t\t$(\"#fixedPosition\").removeClass('activeButton').hover(function(){ \n\t\t\t$(this).css({ border: '2px solid grey', color : 'grey', background : 'white' });\n\t\t}, function(){ \n\t\t\t$(this).css({ border: '2px solid grey', color : 'grey', background : 'white' });\n\t\t});\n\t\t$(\"#autoLayoutToggle\").addClass('activeButton');\n\t\t\n\t}\n\t\n\t\n\t$(\"#saveLayout\").removeClass('activeButton').hover(function(){\n\t\t\t$(\"#saveLayout *\").css({ background : 'grey', color : 'white' });\n\t\t}, function(){\n\t\t\t\t$(\"#saveLayout *\").css({ background : 'white', color : 'grey' });\n\t\t});\n\t//Added the last parameters to solve the initial auto fit issue.\n\t\n\t\n\tmyCola.nodes(nodesData).links(edgesData).start(10,10,10);\n\t//Interchange the x and y for the nodes in the graph based on the height and width of the graph.\n\t// Here the Cola object is used instead of the SVG object.\n\tif(myCola.size()[0]>myCola.size()[1]) {\n\t\tmyCola.nodes().forEach(function(node) {\n\t\t\tvar a = node.x;\n\t\t\tnode.x = node.y;\n\t\t\tnode.y = a;\n\t\t});\n\t}\n\t\n\t//Called the Start for the COLA to allow the updates to be done after changing the orientation of the graph.\n\tmyCola.nodes(nodesData).links(edgesData).start();\n\tVIEWS.SharedFunctionality.zoomToFit(true);\n\t\n\t//Hides the snippet as soon as the graph auto fits on the page.\n\t$(\"#LoadSnippet\").hide();\n\n\tmyCola.on(\"tick\", function () {\n\t\t\n\t\tif(VIEWS.SharedFunctionality.goToInitialStateTriggered && $(\"#parentSvgNode\").is(\":visible\")) {\n\t\t\tif(VIEWS.SharedFunctionality.autoLayout) {\n\t\t\t\td3.selectAll(\".node\").each(function(d){\n\t\t\t\t\tvar nodePositions = NETWORK_OBJECTS.busLocation.dataObjList;\n\t\t\t\t\tfor(var index = 0; index < nodePositions.length; index++) {\n\t\t\t\t\t\tif (d.bus_i === nodePositions[index].bus_i) {\n\t\t\t\t\t\t\td.px = parseFloat(nodePositions[index].x);\n\t\t\t\t\t\t\td.py = parseFloat(nodePositions[index].y);\n\t\t\t\t\t\t\td.x = parseFloat(nodePositions[index].x);\n\t\t\t\t\t\t\td.y = parseFloat(nodePositions[index].y);\n\t\t\t\t\t\t\td.fixed |= 8;\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\telse {\n\t\t\t\td3.selectAll(\".node\").each(function(d){\n\t\t\t\t\tvar nodePositions = NETWORK_OBJECTS.busLocation.dataObjList;\n\t\t\t\t\tfor(var index = 0; index < nodePositions.length; index++) {\n\t\t\t\t\t\tif (d.bus_i === nodePositions[index].bus_i) {\n\t\t\t\t\t\t\td.px = parseFloat(nodePositions[index].x);\n\t\t\t\t\t\t\td.py = parseFloat(nodePositions[index].y);\n\t\t\t\t\t\t\td.x = parseFloat(nodePositions[index].x);\n\t\t\t\t\t\t\td.y = parseFloat(nodePositions[index].y);\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/* Setting the value of the trigger to false as the required action for one trigger has been done*/\n\t\t\tVIEWS.SharedFunctionality.goToInitialStateTriggered = false;\n\t\t}\n\t\telse {\n\t\t\tif(VIEWS.SharedFunctionality.autoLayout) {\t\t\t\t\n\t\t\t\td3.selectAll(\".node\").each(function(d){ d.fixed &= ~8; });\n\t\t\t}\n\t\t\telse if(fixedLocationGraphLoad) {\n\t\t\t\t\tif(VIEWS.SharedFunctionality.hasNodeLocationData) {\n\t\t\t\t\t\td3.selectAll(\".node\").each(function(d){\n\t\t\t\t\t\tvar nodePositions = NETWORK_OBJECTS.busLocation.dataObjList;\n\t\t\t\t\t\tfor(var index = 0; index < nodePositions.length; index++) {\n\t\t\t\t\t\t\tif (d.bus_i === nodePositions[index].bus_i) {\n\t\t\t\t\t\t\t\td.px = parseFloat(nodePositions[index].x);\n\t\t\t\t\t\t\t\td.py = parseFloat(nodePositions[index].y);\n\t\t\t\t\t\t\t\td.x = parseFloat(nodePositions[index].x);\n\t\t\t\t\t\t\t\td.y = parseFloat(nodePositions[index].y);\n\t\t\t\t\t\t\t\td.fixed |= 8;\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\tVIEWS.SharedFunctionality.zoomToFit(true);\n\t\t\t\t\t//Setting the variable as false the the zoomToFit is to be called only once.\n\t\t\t\t\tfixedLocationGraphLoad = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnodes.tick();\n\t\t//Added a check on the count of the edges as in some test cases there are no transformer or lineCharge edges.\n\t\tstandardEdges.tick();\n\t\ttransformerEdges.tick();\n\t\tlineChargeEdges.tick();\n\t\ttestEdges.tick();\n\t\tfor(var multiIndex = 0; multiIndex<MultiLineEdges.length;multiIndex++) {\n\t\t\tMultiLineEdges[multiIndex].tick();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "0e82de822c79c387a6a5becf3b30bf0a", "score": "0.53609455", "text": "function draw() {\n $.getJSON(\"network-artists.json\", function(json) {\n nodes = json; \n $.getJSON(\"network-relations.json\", function(json2) {\n edges = json2;\n \n // create people.\n // value corresponds with the age of the person\n // var DIR = '../data/clean/artist_img/';\n var DIR = '/img/';\n for (x in nodes) {\n if (nodes[x].hasOwnProperty('image')) {\n nodes[x].image = DIR+nodes[x].image;\n }else{\n nodes[x].image = DIR+\"noimage.png\"\n }\n }\n\n // create a network\n var container = document.getElementById('mynetwork');\n var data = {\n nodes: nodes,\n edges: edges\n };\n var options = {\n improvedLayout:true,\n nodes: {\n borderWidth:4,\n size:30,\n\t color: {\n border: '#222222',\n background: '#666666'\n },\n font:{color:'#eeeeee'}\n },\n edges: {\n color: 'lightgray'\n }\n };\n network = new vis.Network(container, data, options);\n });\n });\n }", "title": "" }, { "docid": "3f50c1017bc577d2cd5dbd439534f5e7", "score": "0.53604275", "text": "function draw() {\n resp = \"\";\n console.log('Inside draw function to render graph elements (nodes/edges)...');\n \n // Create a data table with nodes.\n nodes = []; //this will be converted to an object below\n // Create a data table with links.\n edges = []; //this will be converted to an object below\n \n nodes = new vis.DataSet();\n //handle events on \"nodes\" object that is added to network\n //for e.g. add a node to the \"nodes\" object invokes this event\n nodes.on(\"*\", function (event) {\n //document.getElementById('nodes').innerHTML = JSON.stringify(nodes.get(), null, 4);\n //console.log('you just added on a node... :');\n //console.log(event);\n });\n \n edges = new vis.DataSet();\n var container = document.getElementById('mynetwork');\n var data = {\n nodes: nodes,\n edges: edges\n };\n \n //options = { };\n \n options = {\n width: (window.innerWidth - 450) + \"px\",\n height: (window.innerHeight - 200) + \"px\",\n layout:{\n randomSeed: undefined,\n improvedLayout:true,\n hierarchical: {\n enabled:false,\n levelSeparation: 5,\n nodeSpacing: 500,\n treeSpacing: 600,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD', // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n \n }\n },\n nodes: {\n shape: 'image'\n }\n };\n \n network = new vis.Network(container, data, options);\n network.on(\"click\", function (params) {\n params.event = \"[original event]\";\n console.log('click event, getNodeAt returns: ' + this.getNodeAt(params.pointer.DOM));\n console.log(this);\n var fromnode = this.getNodeAt(params.pointer.DOM);\n \n if (typeof nodes.get(fromnode).label != \"undefined\") {\n console.log(nodes.get(fromnode).label);\n \n callneptunegetneighbours(fromnode, nodes, edges);\n \n //callneptunegettweets(fromnode, nodes, edges);\n \n //if (nodes.get(fromnode).value == 'Tweet') {\n // console.log('getting user who like this tweet now............');\n // whichusersliketweet(fromnode, nodes, edges);\n //}\n }\n \n \n });\n }", "title": "" }, { "docid": "57e236be41c9f573560b4ecc4db5bb98", "score": "0.5358805", "text": "render(ctx) {\n // if (this.rendered) {\n\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n this.ctx.fillStyle = \"lightblue\";\n this.ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);\n\n \t// Render all edges first\n \tfor (var edge of this.getEdges()) {\n \t\tedge.render(ctx);\n \t}\n ctx.stroke();\n \tfor (var node of this.vertices) {\n \t\t// console.log(this.vertices.length)\n \t\tnode.render(ctx);\n \t}\n //} else {\n //\tthis.setUpGraph()\n //}\n }", "title": "" }, { "docid": "607e2d22e04f1035db0047008dca534e", "score": "0.5356646", "text": "connectedCallback() {\n this.render();\n }", "title": "" }, { "docid": "cb7f4948451cd3088b78d29d35998d85", "score": "0.5354777", "text": "connectedCallback() {\n this.render();\n }", "title": "" }, { "docid": "98bed1b8b08dfe80e41b2481ec11b20c", "score": "0.53426206", "text": "function Connectors (graph) {\n //Properties \n //Property: graph. Description: Elemento gráfico Psi \n this.graph = graph; \n //Property: map. Description: Lista de conectores \n this.map = {}; \n //Property: length. Description: Tamaño de la lista de conectores \n this.length = 0; \n}", "title": "" }, { "docid": "0f2b09e3ba0905d65a405cc124ca5f9f", "score": "0.5338547", "text": "function draw_branches() {\n draw_links();\n draw_link_extensions();\n}", "title": "" }, { "docid": "3aba2e698d9a6696574a00db2cbf8eb1", "score": "0.53282326", "text": "function addConnectionToGui(node1, node2) {\n // creates a visual connection between two nodes in the GUI\n let line = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n line.setAttribute(\"class\", \"link\");\n line.setAttribute(\"x1\", node1.center.x);\n line.setAttribute(\"y1\", node1.center.y);\n line.setAttribute(\"x2\", node2.center.x);\n line.setAttribute(\"y2\", node2.center.y);\n\n // add link to gui and store it in each node\n transformLayer.prepend(line);\n node1.visualLinks.push(line);\n node1.visuallyConnected.add(node2.value);\n node2.visualLinks.push(line);\n node2.visuallyConnected.add(node1.value);\n}", "title": "" }, { "docid": "8d6bfcdfe22d4f354286b249da8911cc", "score": "0.5320146", "text": "render() {\n if (this.state && Array.isArray(this.state.lines)) {\n let dragOverlays = [];\n let overlayClass = \"connlib-line-overlay\";\n let realSource = this.state.realSource.getInstancePosition();\n let realTarget = this.state.realTarget.getInstancePosition();\n let sourcePoint = this.state.sourcePoint;\n let targetPoint = this.state.targetPoint;\n switch (this.state.realSource.direction) {\n case ConnlibDirection.TOP:\n case ConnlibDirection.BOTTOM:\n if (realSource.left != sourcePoint.left)\n console.warn(\"source endpoint is lopsided! (left) \" + realSource.left + \", \" + sourcePoint.left);\n break;\n case ConnlibDirection.LEFT:\n case ConnlibDirection.RIGHT:\n if (realSource.top != sourcePoint.top)\n console.warn(\"source endpoint is lopsided! (top) \" + realSource.top + \", \" + sourcePoint.top);\n break;\n }\n switch (this.state.realTarget.direction) {\n case ConnlibDirection.TOP:\n case ConnlibDirection.BOTTOM:\n if (realTarget.left != targetPoint.left)\n console.warn(\"target endpoint is lopsided! (left) \" + realTarget.left + \", \" + targetPoint.left);\n break;\n case ConnlibDirection.LEFT:\n case ConnlibDirection.RIGHT:\n if (realTarget.top != targetPoint.top)\n console.warn(\"target endpoint is lopsided! (top) \" + realTarget.top + \", \" + targetPoint.top);\n break;\n }\n var d = \"M \" + realSource.left + \",\" + realSource.top;\n if (Connlib.pathCornerRadius > 0) {\n var prevLine = this.state.lines.find(x => x._source == sourcePoint);\n var currLine = this.state.lines.find(x => x._source == prevLine._target);\n if (!currLine) {\n if (!prevLine) {\n console.warn(\"something went wrong: cannot find first two lines of the connector!\", this, prevLine, currLine);\n return null;\n }\n else {\n switch (prevLine.orientation) {\n case ConnlibOrientation.HORIZONTAL:\n dragOverlays.push(prevLine.JSXComponent(overlayClass + \" horizontal\"));\n break;\n case ConnlibOrientation.VERTICAL:\n dragOverlays.push(prevLine.JSXComponent(overlayClass + \" vertical\"));\n break;\n }\n d += \" L\" + realTarget.left + \", \" + realTarget.top;\n return (React.createElement(\"g\", null,\n React.createElement(\"path\", { d: d, stroke: Connlib.connectorColor, fill: \"transparent\", strokeWidth: \"1\" }),\n dragOverlays));\n }\n }\n var targetPointReached = false;\n while (!targetPointReached) {\n let linesLongEnough = (currLine.length > (2 * Connlib.pathCornerRadius)) && (prevLine.length > (2 * Connlib.pathCornerRadius));\n let clockwise = ConnlibExtensions.isClockwise(prevLine, currLine);\n let cW;\n let r = Connlib.pathCornerRadius;\n if (clockwise == null) {\n r = 0;\n }\n else {\n if (clockwise) {\n cW = \"0 0 1\";\n }\n else {\n cW = \"0 0 0\";\n }\n }\n if (prevLine._source == sourcePoint) {\n d += \" L\" + prevLine.sL + \",\" + prevLine.sT + \" L\";\n }\n else {\n d += \" L\";\n }\n if (linesLongEnough && prevLine.orientation == ConnlibOrientation.HORIZONTAL) {\n dragOverlays.push(prevLine.JSXComponent(overlayClass + \" horizontal\"));\n if (prevLine.direction == ConnlibDirection.RIGHT) {\n d += (prevLine.tL - r) + \",\";\n }\n else if (prevLine.direction == ConnlibDirection.LEFT) {\n d += (prevLine.tL + r) + \",\";\n }\n d += prevLine.sT;\n }\n else if (linesLongEnough && prevLine.orientation == ConnlibOrientation.VERTICAL) {\n dragOverlays.push(prevLine.JSXComponent(overlayClass + \" vertical\"));\n d += prevLine.sL + \",\";\n if (prevLine.direction == ConnlibDirection.BOTTOM) {\n d += (prevLine.tT - r);\n }\n else if (prevLine.direction == ConnlibDirection.TOP) {\n d += (prevLine.tT + r);\n }\n }\n else {\n d += prevLine.tL + \",\" + prevLine.tT;\n }\n dragOverlays.push(React.createElement(\"circle\", { cx: prevLine.tL, cy: prevLine.tT, r: \"5\", className: \"connlib-pathpoint-overlay\" }));\n if (linesLongEnough) {\n // HEREEE\n switch (currLine.direction) {\n case ConnlibDirection.TOP:\n d += \" A\" + r + \",\" + r + \" \" + cW + \" \" + prevLine.tL + \",\" + (prevLine.tT - Connlib.pathCornerRadius);\n break;\n case ConnlibDirection.RIGHT:\n d += \" A\" + r + \",\" + r + \" \" + cW + \" \" + (prevLine.tL + Connlib.pathCornerRadius) + \",\" + prevLine.tT;\n break;\n case ConnlibDirection.BOTTOM:\n d += \" A\" + r + \",\" + r + \" \" + cW + \" \" + prevLine.tL + \",\" + (prevLine.tT + Connlib.pathCornerRadius);\n break;\n case ConnlibDirection.LEFT:\n d += \" A\" + r + \",\" + r + \" \" + cW + \" \" + (prevLine.tL - Connlib.pathCornerRadius) + \",\" + prevLine.tT;\n break;\n }\n }\n else {\n d += \" L\" + prevLine.tL + \",\" + prevLine.tT;\n }\n if (currLine._target == targetPoint) {\n d += \" L\" + currLine.tL + \",\" + currLine.tT;\n targetPointReached = true;\n switch (currLine.orientation) {\n case ConnlibOrientation.HORIZONTAL:\n dragOverlays.push(currLine.JSXComponent(overlayClass + \" horizontal target-connected\"));\n break;\n case ConnlibOrientation.VERTICAL:\n dragOverlays.push(currLine.JSXComponent(overlayClass + \" vertical target-connected\"));\n break;\n }\n }\n prevLine = currLine;\n currLine = this.state.lines.find(x => x._source == prevLine._target);\n }\n }\n else {\n d = this.pathWithoutR(d, this.state.lines);\n }\n // final line to final connection point\n d += \" L\" + realTarget.left + \",\" + realTarget.top;\n return (React.createElement(\"g\", null,\n React.createElement(\"path\", { d: d, stroke: Connlib.connectorColor, fill: \"transparent\", strokeWidth: \"1\" }),\n dragOverlays));\n }\n return null;\n }", "title": "" }, { "docid": "d0ab0a6a073c1ecc4b59592f946ec186", "score": "0.5302045", "text": "drawHoveredConnector() {\r\n if (this.selectionController.getActiveState() === States.HOVER_CONNECTOR\r\n || this.selectionController.getActiveState() === States.CONNECTING) {\r\n let hoveredConn = this.selectionController.getHoveredConnector();\r\n if (hoveredConn !== null) {\r\n let location = this.selectionController.getScreenCoords({ x: hoveredConn.bounds.x, y: hoveredConn.bounds.y });\r\n this.graphics.beginFill('rgba(150,0,0,0.5)')\r\n .drawCircle(location.x, location.y, hoveredConn.bounds.width)\r\n .endFill()\r\n .beginStroke('rgba(150,0,0,1)')\r\n .setStrokeStyle(2)\r\n .drawCircle(location.x, location.y, hoveredConn.bounds.width)\r\n .endStroke();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "05480b7854fc15741017cca29b3d87fc", "score": "0.5285232", "text": "function Visualize() {\n for (var i=0; i<numCellsX; i++) {\n for (var j=0; j<numCellsY; j++) {\n \n var mirroredGrid = GridMirror(i,j); // Get symmettry viz\n var m = mirroredGrid[0]; var n = mirroredGrid[1]; // Substitution values\n\n noStroke();\n var c = color(0,0,0);\n // Select Color\n if (cells[m][n] == 0) { // Dead\n c = deadColor;\n } else if (cells[m][n] == 1 && generations == 1) { // Alive\n c = liveColor;\n } else if (cells[m][n] >= 1 && generations > 1) { // Alive, Multigenerational\n\n if (genColMethod == 0) { // Brightening\n c = color(red(liveColor) + round((255 - red(liveColor)) * cells[m][n] / generations), \n green(liveColor) + round((255 - green(liveColor)) * cells[m][n] / generations), \n blue(liveColor) + round((255 - blue(liveColor)) * cells[m][n] / generations)\n );\n } else if (genColMethod == 1) { // Darken Inverse\n c = color(round(red(liveColor) * (1 - cells[m][n] / generations)), \n round(green(liveColor) * (1 - cells[m][n] / generations)), \n round(blue(liveColor) * (1 - cells[m][n] / generations))\n );\n } else if (genColMethod == 2) {\n c = color(round(red(liveColor) * cells[m][n] / generations), \n round(green(liveColor) * cells[m][n] / generations), \n round(blue(liveColor) * cells[m][n] / generations)\n );\n }\n } else {\n c = color(0,0,0);\n }\n fill(c);\n\n // Draw Cell\n square(round(i * cellSize), round(j *cellSize), cellSize)\n }\n }\n }", "title": "" }, { "docid": "273d587beced5866800060752de64341", "score": "0.5263535", "text": "function networkGraphPage() {\n if ($(\"[data-js='networkArea']\").length) {\n var includedArea = $(\"#network-included\");\n var includedTemplate = $(\"#network-included-template\");\n var includedEmptyTemplate = $(\"#network-included-template-empty\");\n\n var excludedArea = $(\"#network-excluded\");\n var excludedTemplate = $(\"#network-excluded-template\");\n var excludedEmptyTemplate = $(\"#network-excluded-template-empty\");\n\n var colours = {\n 0: \"#00FF00\",\n 1: \"#8DFF00\",\n 2: \"#8DFF00\",\n 3: \"#E5FF00\",\n 4: \"#FFF600\",\n 5: \"#FFE400\",\n 6: \"#FFAF00\",\n 7: \"#FF9E00\",\n 8: \"#FF7B00\",\n 9: \"#FF5700\"\n };\n\n var container = document.getElementById('network-graph');\n\n var nodes = new vis.DataSet();\n var edges = new vis.DataSet();\n\n var data = {\n nodes: nodes,\n edges: edges\n };\n\n var options = {};\n\n var network = new vis.Network(container, data, options);\n\n var json = graphData();\n json.nodes.sort(sortByLabel);\n\n var dataURL = \"\";\n\n function sortByLabel(a, b){\n var aName = a.label.toLowerCase();\n var bName = b.label.toLowerCase();\n return ((aName < bName) ? -1 : ((aName > bName) ? 1 : 0));\n }\n\n function addNode(id) {\n var result = $.grep(json.nodes, function( n, i ) {\n return n.id == id;\n });\n\n if (result.length == 1) {\n var node = result[0];\n\n try {\n nodes.add({\n id: node.id,\n label: node.label,\n color: colours[node.group]\n });\n }\n catch (err) { }\n }\n }\n\n function addEdge(id1, id2) {\n var edge1 = $.grep(json.matches, function( n, i ) {\n return n.to == id1 && n.from == id2;\n });\n\n var edge2 = $.grep(json.matches, function( n, i ) {\n return n.to == id2 && n.from == id1;\n });\n\n var array = $.merge(edge1, edge2);\n\n var edge = array[0];\n\n if (array.length > 1 && edge.score < array[1].score) {\n var node = array[1];\n }\n\n var id = Math.min(edge.to, edge.from) + \"_\" + Math.max(edge.to, edge.from);\n\n try {\n edges.add({\n id: id,\n from: edge.from,\n to: edge.to,\n color: colours[edge.group]\n });\n }\n catch (err) { }\n }\n\n function addMatches(id) {\n var to = $.grep(json.matches, function( n, i ) {\n return n.to == id;\n });\n\n var from = $.grep(json.matches, function( n, i ) {\n return n.from == id;\n });\n\n var array = $.merge(to, from);\n\n for (var i = 0; i < array.length; i++) {\n var match = array[i];\n addEdge(match.to, match.from);\n }\n }\n\n function addMatchesIncNodes(id) {\n var to = $.grep(json.matches, function( n, i ) {\n return n.to == id;\n });\n\n for (var i = 0; i < to.length; i++) {\n var match = to[i];\n addEdge(match.to, match.from);\n }\n\n var from = $.grep(json.matches, function( n, i ) {\n return n.from == id;\n });\n\n for (var i = 0; i < from.length; i++) {\n var match = from[i];\n addNode(match.to);\n addEdge(match.to, match.from);\n }\n\n update();\n }\n\n function clickEvent() {\n var edgeDelete = $(\"[data-js='edgeDelete']\");\n var nodeDelete = $(\"[data-js='nodeDelete']\");\n var nodeMatches = $(\"[data-js='nodeMatches']\");\n\n if (network.getSelectedEdges().length == 0) {\n edgeDelete.prop(\"disabled\", true);\n edgeDelete.addClass(\"disabled\");\n } else {\n edgeDelete.prop(\"disabled\", false);\n edgeDelete.removeClass(\"disabled\");\n }\n\n if (network.getSelectedNodes().length == 0) {\n nodeDelete.prop(\"disabled\", true);\n nodeDelete.addClass(\"disabled\");\n\n nodeMatches.prop(\"disabled\", true);\n nodeMatches.addClass(\"disabled\");\n } else {\n nodeDelete.prop(\"disabled\", false);\n nodeDelete.removeClass(\"disabled\");\n\n nodeMatches.prop(\"disabled\", false);\n nodeMatches.removeClass(\"disabled\");\n }\n }\n\n function bindEvents() {\n $(\"[data-js='submissionAdd']\").unbind();\n $(\"[data-js='submissionAdd']\").click(function () {\n var input = $(this);\n var target = input.attr(\"data-js-target\");\n\n addNode(target);\n addMatches(target);\n update();\n });\n\n $(\"[data-js='submissionMatches']\").unbind();\n $(\"[data-js='submissionMatches']\").click(function () {\n var input = $(this);\n var target = input.attr(\"data-js-target\");\n\n addMatchesIncNodes(target);\n });\n\n $(\"[data-js='submissionDelete']\").unbind();\n $(\"[data-js='submissionDelete']\").click(function () {\n var input = $(this);\n var target = input.attr(\"data-js-target\");\n\n nodes.remove({id: target});\n update();\n });\n }\n\n function update() {\n includedArea.html(\"\");\n excludedArea.html(\"\");\n\n var visible = 0;\n var invisible = 0;\n\n for(var i = 0; i < json.nodes.length; i++) {\n var submission = json.nodes[i];\n var node = nodes.get(submission.id);\n\n if (node == null) { //Not visible on graph\n var copy = excludedTemplate.clone();\n copy.find(\".js-label\").text(submission.label);\n copy.find(\".js-id\").attr(\"data-js-target\", submission.id);\n excludedArea.append(copy.html());\n\n invisible++;\n } else { //Visible in graph\n var copy = includedTemplate.clone();\n copy.find(\".js-label\").text(submission.label);\n copy.find(\".js-id\").attr(\"data-js-target\", submission.id);\n includedArea.append(copy.html());\n\n visible++;\n }\n }\n\n if (visible == 0) {\n includedArea.html(includedEmptyTemplate.html());\n }\n\n if (invisible == 0) {\n excludedArea.html(excludedEmptyTemplate.html());\n }\n\n bindEvents();\n clickEvent();\n }\n\n network.on('click', function(properties) {\n clickEvent();\n });\n\n network.on(\"afterDrawing\", function (ctx) {\n dataURL = ctx.canvas.toDataURL();\n });\n\n\n $(\"[data-js='edgeDelete']\").click(function () {\n $(this).blur();\n\n var selectedEdges = network.getSelectedEdges();\n for (var i in selectedEdges) {\n edges.remove(selectedEdges[i]);\n }\n\n update();\n });\n\n $(\"[data-js='nodeDelete']\").click(function () {\n $(this).blur();\n\n var selectedNodes = network.getSelectedNodes();\n for (var i in selectedNodes) {\n nodes.remove(selectedNodes[i]);\n }\n\n update();\n });\n\n $(\"[data-js='nodeMatches']\").click(function () {\n $(this).blur();\n\n var selectedNodes = network.getSelectedNodes();\n for (var i in selectedNodes) {\n addMatchesIncNodes(selectedNodes[i]);\n }\n });\n\n $(\"[data-js='graphDownload']\").click(function () {\n var input = $(this);\n input.blur();\n input.attr(\"href\", dataURL);\n });\n\n update();\n\n var start = getParameter(\"start\");\n if (start.length > 0) {\n addNode(start);\n addMatchesIncNodes(start);\n }\n }\n}", "title": "" }, { "docid": "2dbd0e0f23cedee2051960af9580158e", "score": "0.52572423", "text": "function drawTopology(data){\n\tvar nodes = new vis.DataSet();\n\tvar edges = new vis.DataSet(); \n\t\t\n\t// process file-data\n\t// seperate lines\n\tvar lines = data.split(\"\\n\");\n\t\t\n\t// part = 0 ... # of nodes, 1 .. edges, 2 ... client/server\n\tvar part = -1; \n\tvar edgeInfo; // holds information about a single edge\n\tvar nodeInfo; // holds information about a single node\n\tvar servers = []; // array containing the ids of all servers\n\tvar groups = {}; // contains server -> clients entries\n\tvar numberOfNodes = 0; // total number of nodes\n\t// bitrateBounds[lower_bound, upper_bound]\n\tvar bitrateBounds=[Number.MAX_VALUE, Number.MIN_VALUE];\n\t\n\tfor(var index in lines){\n\t\tif(stringStartsWith(lines[index],\"#\")) {\n\t\t\tpart = part + 1;\n\t\t\tcontinue;\n\t\t}\n\t\t\t\n\t\tif(part == 0){\n\t\t\t// lines[index] contains number of nodes (assumed correct everytime)\n\t\t\tnumberOfNodes = lines[index];\n\t\t\tfor(i = 0; i < numberOfNodes; i++){\n\t\t\t nodes.add({id: i, group: \"router\", shadow: true, color: '#3c87eb', \n\t\t\t\t label: 'Pi #' + i, shape: \"image\", image: images[\"router\"][0],font: \"20px arial black\"});\n\t\t\t}\n\t\t}else if(part == 1){\n\t\t\t// add edges\n\t\t\t// lines[index] contains edge-information\n\t\t\tedgeInfo = lines[index].split(\",\");\n\n\t\t\t// add edge first two entries ... connected nodes ( a -> b)\n\t\t\tedges.add({id: edgeInfo[0] + '-'+ edgeInfo[1], from: edgeInfo[0], \n\t\t\t\tto: edgeInfo[1], value: ((edgeInfo[2], edgeInfo[3]) / 2), \n\t\t\t\ttitle: getEdgeInfoHtml(edgeInfo), shadow: true});\n\t\t\t\t\n\t\t\t// update bitrateBounds statistic\n\t\t\tbitrateBounds = [Math.min(bitrateBounds[0],edgeInfo[2]),Math.max(bitrateBounds[1],edgeInfo[2])];\n\t\t\tbitrateBounds = [Math.min(bitrateBounds[0],edgeInfo[3]),Math.max(bitrateBounds[1],edgeInfo[3])];\n\t\t}else if(part == 2){\n\t\t\t// update node type (Client / Server) => visual apperance\n\t\t\t// and relationship type color (client and server have matching colors, for now)\n\t\t\t// lines[index] contains properties (Client, Server)\n\t\t\t// e.g. 4,18 --> 4 is a client of the server 18\n\t\t\t// console.log(lines[index]);\n\t\t\tnodeInfo = lines[index].split(\",\");\n\t\t\t\n\t\t\t// images from GPL licensed \"Tango Desktop Project\" (tango.freedesktop.org)\n\t\t\t// update groups\t \n\t\t\tif(groups[nodeInfo[1]] === undefined){\n\t\t\t\tgroups[nodeInfo[1]] = [nodeInfo[0]];\n\t\t\t} else {\n\t\t\t\t$.merge(groups[nodeInfo[1]],[nodeInfo[0]]);\n\t\t\t}\n\n\t\t\t// nodeInfo[1] ... id of server - node\n\t\t\tif($.inArray(nodeInfo[1],servers)<0){\n\t\t\t\tservers.push(nodeInfo[1]); // add server-id only if not already present\t\t\t\t\t\n\t\t\t}\t\t\t\t\n\t\t\tnodes.update({id: nodeInfo[1], label: 'Pi #' + nodeInfo[1], group: \"server\",\n\t\t\t\t shadow: true, shape: \"image\", image: images[\"server\"][0], font: \"20px arial \" + colors[$.inArray(nodeInfo[1],servers)]});\n\t\t\t\n\t\t\t// nodeInfo[0] ... id of client - node\t\n\t\t\tnodes.update({id: nodeInfo[0], label: 'Pi #' + nodeInfo[0], group: \"client\",\n\t\t\t\t shadow: true, shape: \"image\", image: images[\"client\"][0], font: \"20px arial \" + colors[$.inArray(nodeInfo[1],servers)]});\n\t\t\t\n\t\t}\n\t}\n\t\n\t// Graph will be drawn in the HTML-Element \"graphContainer\" [<div></div>]\t\n\tvar container = document.getElementById('graphContainer');\n\tvar data = {\n\t\tnodes: nodes,\n\t\tedges: edges\n\t};\n\t\n\t// allow for defining the seed via GET-param\n\tvar seed = parseInt(getUrlVar(\"seed\"));\n\tif(isNaN(seed)) seed = 2;\n\n\tvar options = {\n\t\t// specify randomseed => network is the same at every startup\n\t\tautoResize: false,\n\t\theight: '100%',\n\t\tlayout:{randomSeed: seed}, \n\t\tedges: {\n\t\t\tscaling: {max: 5} \n\t\t},\n\t\tinteraction: {\n\t\t\thover: true,\n\t\t\tselectConnectedEdges: false,\n\t\t\thoverConnectedEdges: false,\n\t\t\ttooltipDelay: 300\n\t\t\t},\n\t\tphysics: {\n\t\t\tstabilization: {\n\t\t\t\tenabled: true\n\t\t\t} ,\n\t\t\tadaptiveTimestep: true,\n\t\t\tbarnesHut: {\n\t\t\t\tavoidOverlap: 1, // maximum overlap avoidance\n\t\t\t\tgravitationalConstant: -4000 // neg. value -> repulsion\n\t\t\t}\n\t\t}\n\t}; \n\t\n\t// draw graph\n\tvar network = new vis.Network(container, data, options);\n\tdrawLegend(network,jQuery.extend({},options),numberOfNodes,groups,bitrateBounds); \n \n // shut down physics when networkLayout has initially stabilized\n network.once(\"stabilized\", function(params) {\n\t\tconsole.log(\"network stabilized!\");\n\t\toptions.physics ={enabled: false};\n\t\tnetwork.setOptions(options);\n\t});\n \n // show cooltip when mouse enters/hovers node\n network.on(\"hoverNode\", function (params) {\n showNodeCooltip(params.node, network);\n });\n \n // hide cooltip when mouse leaves node\n network.on(\"blurNode\", function (params) {\n hideNodeCooltip(params.node);\n });\n \n network.on(\"click\", function (params){\n\t\thighlightSelectedNodes(network);\n\t});\n}", "title": "" }, { "docid": "2708ba585958db8aca2065325bd4e81c", "score": "0.525157", "text": "function _DrawNodeConnectionLine(node1, node2) {\n draw.strokeStyle = \"Blue\";\n draw.lineWidth = 1;\n draw.beginPath();\n draw.moveTo(node1.x, node1.y);\n draw.lineTo(node2.x, node2.y);\n draw.stroke();\n}", "title": "" }, { "docid": "737b15da5b8091fa3d59d18c1c15ba8a", "score": "0.5245771", "text": "function drawGraph(data, initial = true) {\n // lists of vertices and relationships\n let nodes = data.nodes;\n let relationships = data.relationships;\n\n if(initial) {\n // buffer the data to speed up redrawing\n bufferedData = data;\n\n // compute maximum count of all vertices, used for scaling the node sizes\n maxNodeCount = nodes.reduce((acc, node) => {\n return Math.max(acc, Number(node.data.properties['count_*']||0))\n }, 0);\n\n let labels = new Set(nodes.map((node) => {\n return (!useDefaultLabel && getNodeLabelKey() !== 'label') ?\n node['data']['properties'][getNodeLabelKey()] : node['data']['label']\n }));\n\n // generate random colors for the node labels\nconsole.log(labels); \ngenerateRandomColors(labels);\nconsole.log(colorMap);\n // compute maximum count of all relationships, used for scaling the relationship sizes\n maxRelationshipCount = relationships.reduce((acc, relationship) => {\n return Math.max(acc, Number(relationship.data.properties['count_*']||0))\n }, 0);\n }\n\n cy.elements().remove();\n cy.add(nodes);\n cy.add(relationships);\n\n if ($('#hideNullGroups').is(':checked')) {\n hideNullGroups();\n }\n\n if ($('#hideDisconnected').is(':checked')) {\n hideDisconnected();\n }\n\n addQtip();\n\n cy.layout(chooseLayout());\n}", "title": "" }, { "docid": "914555f4dcd5b32d02f7a6f1fecb2a90", "score": "0.52454334", "text": "function initializeDisplay() {\n\t//set the data and properties\tof link lines\n\tlink = g\n\t\t.append(\"g\")\n\t\t.attr(\"class\",\"links\")\n\t\t.selectAll(\"line\")\n\t\t.data(graph.links)\n\t\t.enter()\n\t\t.append(\"line\");\n\n\t//set the data and properties of the node circle\n\tnode = g\n\t\t.append(\"g\")\n\t\t.style(\"z-index\",\"5\")\n\t\t.attr(\"class\", \"nodes\")\n\t\t.selectAll(\"circle\")\n\t\t.data(graph.nodes)\n\t\t.enter()\n\t\t.append(\"circle\")\n\t\t.style(\"z-index\",\"6\")\n\t\t.on(\"click\", clickNode)\n\t\t.on(\"mouseover\", function(d) {\n\t\t\td3.select(this).style(\"cursor\", \"pointer\");\n\t\t})\n\t\t.on(\"mouseout\", function(d) {\n\t\t\td3.select(this).style(\"cursor\", \"default\");\n\t\t})\n\t\t.call(d3.drag()\n\t\t\t.on(\"start\", dragstarted)\n\t\t\t.on(\"drag\", dragged)\n\t\t\t.on(\"end\", dragended));\n\n\t//text on node\n\tidText = g\n\t\t.append(\"g\")\n\t\t.style(\"z-index\",\"7\")\n\t\t.selectAll(\"text\")\n\t\t.data(graph.nodes)\n\t\t.enter()\n\t\t.append(\"text\")\n\t\t\t.style(\"z-index\",\"8\")\n\t\t\t.attr(\"class\",\".text\")\n\t\t\t.attr(\"text-anchor\", \"middle\")\n\t\t\t.attr(\"dy\", \".35em\")\n\t\t\t.text(function(d) { return d.id })\n\t\t\t.style(\"font-family\",\"Lato\")\n\t\t\t.style(\"font-size\", 11)\n\t\t\t.style(\"fill\",\"white\")\n\t\t\t.on(\"click\", clickNode)\n\t\t\t.on(\"mouseover\", function(d) {\n\t\t\t\td3.select(this).style(\"cursor\", \"pointer\");\n\t\t\t})\n\t\t\t.on(\"mouseout\", function(d) {\n\t\t\t\td3.select(this).style(\"cursor\", \"default\");\n\t\t\t})\n\t\t\t.call(d3.drag()\n\t\t\t\t.on(\"start\", dragstarted)\n\t\t\t\t.on(\"drag\", dragged)\n\t\t\t\t.on(\"end\", dragended));\n\n\tsvg.call(d3.drag()\n\t\t.on(\"start\", dragstarted)\n\t\t.on(\"drag\", dragged)\n\t\t.on(\"end\", dragended));\n\n\t//node tooltip\n\tnode\n\t\t.append(\"title\")\n\t\t.text(function(d) { return d.kasus; });\n\n\t//visualize the graph\n\tupdateDisplay();\n\tinitialScale();\n}", "title": "" }, { "docid": "ed1f0d8484febc6f02de64f11b1516d3", "score": "0.52435094", "text": "function better_output() // new default graph output method\n{\n\tdocument.write( this.label, \" \", this.digraph?\"\":\"UNDIRCTED\", \n\t\" - \",this.nv , \" VERTICES, \", this.ne , \" EDGES:<br><br>\" );\n\n\tthis.list_vert();\n\n}", "title": "" }, { "docid": "ad524338edd381e33539104bb1ada358", "score": "0.52146494", "text": "function graphicalRepresentationFormat() {\r\n\t\tvar output = [];\r\n\r\n\t\t// create the div elements for the graphical results\r\n\t\tfor (var key = 0; key < window.ontologies.length; key++) {\r\n\t\t\tvar ontology = window.ontologies[key];\r\n\r\n\t\t\toutput.push(\"<p class='graphical-results-ontology-name'><strong>\", escape(ontology.name), \"</strong></p>\");\r\n\t\t\toutput.push(\"<div class='graphical-results-list' id='\" + ontology.name + \"'></div>\");\r\n\r\n\t\t\toutput.push(\"<div class='legend-container'><ul class='legend'> <li><span class='legend-actors'></span>Actors</li> <li><span class='legend-regular-data'></span>Regular Data</li> <li><span class='legend-sensitive-data'></span>Sensitive Data</li> <li><span class='legend-security-enchancement'></span>Security Enchancement</li> </ul> </div>\");\r\n\t\t\tif (window.ontologies.length > 1 && key < (window.ontologies.length - 1)) {\r\n\t\t\t\toutput.push(\"<hr class='graphical-results-line-space'>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// form the output element with the graphical div elements\r\n\t\tapp.getGraphicalResultsList().innerHTML = output.join(\"\");\r\n\r\n\t\t// create the graph network of each ontology\r\n\t\tfor (var index = 0; index < window.ontologies.length; index++) {\r\n\t\t\tvar ontology = window.ontologies[index];\r\n\r\n\t\t\t// create two arrays with the nodes and edges\r\n\t\t\tvar nodes = [], edges = [];\r\n\r\n\t\t\t// setup nodes for data types\r\n\t\t\tfor (var dataId = 0; dataId < ontology.dataValue.length; dataId++) {\r\n\t\t\t\tvar typedAction = app.retrieveType(index, ontology.dataValue[dataId]);\r\n\t\t\t\tnodes.push({ id: (dataId + 1), label: ontology.dataValue[dataId], shape: \"box\", color: typedAction === \"Regular Data\" ? \"#b8d60e\" : typedAction === \"Sensitive Data\" ? \"#f4c242\" : \"#4682b4\" });\r\n\t\t\t}\r\n\r\n\t\t\t// setup nodes for individuals\r\n\t\t\tfor (var individualId = 0; individualId < ontology.individuals.length; individualId++) {\r\n\t\t\t\tnodes.push({ id: (nodes.length + 1), label: ontology.individuals[individualId].name });\r\n\t\t\t}\r\n\r\n\t\t\t// setup edges between individuals and data types\r\n\t\t\tfor (var i = 0; i < ontology.individuals.length; i++) {\r\n\t\t\t\tvar individual = ontology.individuals[i];\r\n\r\n\t\t\t\tfor (var j = 0; j < individual.actions.length; j++) {\r\n\t\t\t\t\tvar actions = individual.actions[j];\r\n\r\n\t\t\t\t\tif (actions.data.length !== 0) {\r\n\t\t\t\t\t\tvar labelActionType = actions.type;\r\n\r\n\t\t\t\t\t\tfor (var k = 0; k < actions.data.length; k++) {\r\n\t\t\t\t\t\t\tvar connection = setupNodesEdgesConnection(nodes, labelActionType, actions.data[k], individual.name);\r\n\t\t\t\t\t\t\tif (connection !== \"\") {\r\n\t\t\t\t\t\t\t\tedges.push(connection);\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\r\n\t\t\t// create network graph representation using the VIS library\r\n\t\t\tvar container = document.getElementById(ontology.name);\r\n\t\t\tvar options = {};\r\n\t\t\tvar data = {\r\n\t\t\t\tnodes: nodes,\r\n\t\t\t\tedges: edges\r\n\t\t\t};\r\n\r\n\t\t\tnew vis.Network(container, data, options);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0f83427eae483cf5421c0d697f8cca32", "score": "0.5214076", "text": "drawComponents() {\r\n let me = this;\r\n this.moduleController.activeModule.components.forEach((component) => {\r\n let location = me.selectionController.getScreenCoords(component.bounds);\r\n component.paint(me.graphics, location);\r\n\r\n // draw components connectors\r\n component.connectors.forEach((connector) => {\r\n let connLocScreen = me.selectionController.getScreenCoords(connector.bounds);\r\n connector.paint(me.graphics, connLocScreen);\r\n });\r\n \r\n });\r\n }", "title": "" }, { "docid": "e987d976889f8295a5f8f8faab6d18d1", "score": "0.52088493", "text": "function draw() {\r\n // create people.\r\n // value corresponds with the age of the person\r\n var DIR = '../hackathon/icon/';\r\n nodes = [\r\n {id: 1, shape: 'circularImage', image: DIR + '1.png',size:70},\r\n {id: 2, shape: 'circularImage', image: DIR + '2.png',size:50},\r\n {id: 3, shape: 'circularImage', image: DIR + '3.png',size:50},\r\n {id: 4, shape: 'circularImage', image: DIR + '4.png', label:\"Black Panther\",size:50,title:title1},\r\n {id: 5, shape: 'circularImage', image: DIR + '5.png',size:50},\r\n {id: 6, shape: 'circularImage', image: DIR + '6.png',size:50},\r\n {id: 7, shape: 'circularImage', image: DIR + '7.png'},\r\n {id: 8, shape: 'circularImage', image: DIR + '8.png'},\r\n {id: 9, shape: 'circularImage', image: DIR + '9.png'},\r\n {id: 10, shape: 'circularImage', image: DIR + '10.png'},\r\n {id: 11, shape: 'circularImage', image: DIR + '11.png'}\r\n ];\r\n\r\n // create connections between people\r\n // value corresponds with the amount of contact between two people\r\n edges = [\r\n {from: 1, to: 2,length:200},\r\n {from: 1, to: 3,length:200},\r\n {from: 1, to: 4,length:200},\r\n {from: 1, to: 5,length:200},\r\n {from: 1, to: 6,length:200},\r\n {from: 1, to: 7,length:300},\r\n {from: 1, to: 8,length:300},\r\n {from: 1, to: 9,length:300},\r\n {from: 1, to: 10,length:300},\r\n {from: 1, to: 11,length:300}\r\n ];\r\n\r\n // create a network\r\n var container = document.getElementById('mynetwork');\r\n var data = {\r\n nodes: nodes,\r\n edges: edges\r\n };\r\n var options = {\r\n autoResize:true,\r\n nodes: {\r\n borderWidth:5,\r\n size:40,\r\n color: {\r\n border: '#222222',\r\n background: '#666666'\r\n },\r\n font:{color:'black'}\r\n },\r\n edges: {\r\n color: 'lightgray',\r\n width:2\r\n },\r\n\r\n };\r\n network = new vis.Network(container, data, options);\r\n}", "title": "" }, { "docid": "ae9291e60a5360f95efe17e7394cc6cc", "score": "0.51981807", "text": "function updateNetworkOnFirstCall()\n{\n\ttheoryGraph.colorizeNodesByName(getParameterByName(graphDataURLHighlightParameterNameTGView),highlightColorByURI);\n\tgenerateEdgesNodesHideDiv();\n\ttheoryGraph.hideEdges(\"graphmeta\",true);\n\ttheoryGraph.hideEdges(\"meta\",true);\n}", "title": "" }, { "docid": "09cb6789b3f06e79bbab9b3fcfd3d944", "score": "0.5198161", "text": "function showGraph() {\n for (var i = 0; i < this.vertices; i++) {\n var list = i + \" → \";\n for (var j = 0; j < this.vertices; j++) {\n if (this.adj[i][j] !== undefined) {\n list += this.adj[i][j] + \" \";\n }\n }\n console.log(list);\n }\n }", "title": "" }, { "docid": "d461d3f3b2220d7b6bbf44e6960924ed", "score": "0.5194104", "text": "function createGraphic() {\r\n //TODO take rowOrder and columnOrder from pagesInfo.rows & .columns\r\n let rowOrder = getCurrentPageOrder(pagesInfo.rows); \r\n let columnOrder = getCurrentPageOrder(pagesInfo.columns);\r\n\r\n\r\n // Empty container\r\n container.innerHTML = '';\r\n document.getElementById('loader').style.display = 'none';\r\n\r\n // Column page numbers\r\n let columnPageNumbersDiv = createColumnPageNumbersDiv();\r\n container.appendChild(columnPageNumbersDiv);\r\n\r\n // Graph pane\r\n let graphPane = createDiv('graph-pane');\r\n \r\n // Create row page numbers\r\n let rowPageNumbersDiv = createRowPageNumbersDiv();\r\n graphPane.appendChild(rowPageNumbersDiv);\r\n\r\n // Create row labels\r\n let rowLabelDiv = createRowLabelDiv(rowOrder);\r\n graphPane.appendChild(rowLabelDiv);\r\n \r\n // rightDiv includes column labels and content div\r\n let rightDiv = createDiv('graph-right');\r\n \r\n let colLabelDiv = createColLabelDiv(columnOrder);\r\n rightDiv.appendChild(colLabelDiv);\r\n\r\n let contentDiv = createDiv('graph-content');\r\n fillContent(contentDiv, rowOrder, columnOrder);\r\n rightDiv.appendChild(contentDiv);\r\n graphPane.appendChild(rightDiv);\r\n\r\n container.appendChild(graphPane);\r\n}", "title": "" }, { "docid": "d66fd49e1c52f316e9cdaa55b0ee8d70", "score": "0.51883745", "text": "function drawSinks() {\n sink = diagram.append('g')\n .selectAll('.sink')\n .data(sankey.sinks()).enter().append('path')\n .attr('stroke', '#333')\n .attr('stroke-dasharray', '2,2')\n .attr('d', function(d) {\n let x = sankey.nodeWidth() / 2;\n return 'M'+x+','+(margin.top-10)+'L'+x+','+(height-margin.bottom+10);\n })\n .attr('transform', function(d) {\n return 'translate('+d[0].x+',0)'\n });\n }", "title": "" }, { "docid": "c3caf729e8f79883922e38f76fbbf140", "score": "0.5185676", "text": "connect() {\n let current;\n\n for (let row = 0; row < this.rows; row++) {\n\n for (let column = 0; column < this.columns; column++) {\n current = this.nodes[row][column];\n let id = 0;\n\n //North\n if (row !== 0) {\n current.connections.push([id, this.nodes[row - 1][column], true]);\n }\n\n id++;\n\n //East\n if (column !== this.columns - 1) {\n current.connections.push([id, this.nodes[row][column + 1], true]);\n }\n\n id++;\n\n //South\n if (row !== this.rows - 1) {\n current.connections.push([id, this.nodes[row + 1][column], true]);\n }\n\n id++;\n\n //West\n if (column !== 0) {\n current.connections.push([id, this.nodes[row][column - 1], true]);\n }\n\n }\n }\n }", "title": "" }, { "docid": "8e60d2d9ff0dcc77861bb67b4413161b", "score": "0.51759046", "text": "renderGraph_() {\n if (!this.graphRendered_) {\n const self = this;\n const graph = this.makeChart_(self, this.getMetrics_());\n this.loop_(self, graph);\n this.graphRendered_ = true;\n }\n }", "title": "" }, { "docid": "7537009ca8e56187b421a548465c41f1", "score": "0.51747763", "text": "connectedCallback() {\n this.render();\n }", "title": "" }, { "docid": "2700d19f3b1a45c1ce7cf5e242b372a2", "score": "0.5163046", "text": "function getConnectionColors(connection, index) {\r\n // Return directly disrupted color, if the simulation is running\r\n if (api.stores[\"connection\"].items[connection.id].disrupted && simulation) {\r\n if (index == 0) {\r\n return [colors[\"dc\"], \"dc\", 1];\r\n } else {\r\n return [colors[\"dc\"], \"dc\", 0];\r\n }\r\n }\r\n // Get the station colors\r\n var station1 = api.findObjectById(api.nodes, connection.connectsIDs[0]);\r\n var station2 = api.findObjectById(api.nodes, connection.connectsIDs[1]);\r\n var substationColor = null;\r\n // Return directly Substation colors\r\n [station1, station2].forEach(function (station) {\r\n if (station.type == \"substation\") {\r\n if (index == 0) {\r\n substationColor = [getStationColors(station), station.id, 1];\r\n } else {\r\n substationColor = [getStationColors(station), station.id, 0];\r\n }\r\n }\r\n });\r\n if (substationColor) {\r\n return substationColor;\r\n }\r\n // Else merge alternately the colors of the connected stations\r\n var colors1 = getStationColors(station1);\r\n var colors2 = getStationColors(station2);\r\n var colorList = [];\r\n for (var i = 0; i < colors1.length || i < colors1.length; i = i) {\r\n if (colors1[i] && $.inArray(colors1[i], colorList) == -1) {\r\n colorList[i] = colors1[i];\r\n i++;\r\n }\r\n if (colors2[i] && $.inArray(colors2[i], colorList) == -1) {\r\n colorList[i] = colors2[i];\r\n i++\r\n }\r\n }\r\n // Return the color or default color\r\n if (colorList[index]) {\r\n return [colorList[index], colorList[index], 1];\r\n } else if (index == 0) {\r\n return [colors[\"uc\"], \"uc\", 1];\r\n } else {\r\n return [colorList[index], colorList[index], 0];\r\n }\r\n}", "title": "" }, { "docid": "b012451985a36d2587d30e68de1494a2", "score": "0.51538587", "text": "function printNodesAndEdges() {\r\n var output = '';\r\n output += \"NodeId,Age,Generation\\n\";\r\n nodes.forEach( function(node, idx) {\r\n output += (node.id + \",\" + node.age + \",\" + node.generation + '\\n' );\r\n });\r\n\r\n output += \"EdgeFromId,EdgeToId\" + '\\n';\r\n links.forEach( function(l) {\r\n output += l.source.id + ',' + l.target.id + '\\n'; \r\n });\r\n \r\n $('#output').val(output);\r\n}", "title": "" }, { "docid": "10532484958caabafb261c9b002aa564", "score": "0.51513165", "text": "render()\n {\n this.pair.render();\n \n //if transform panel is active(row clicked)\n this.panel.render(this.transformPanelActive);\n \n //render the knobs\n this.renderKnobs();\n }", "title": "" }, { "docid": "15547eef59377ccd3165f447235e1b1c", "score": "0.51454467", "text": "loadGraph() { \n\n this.setState({ seq: Array.from(this.props.project.seq) })\n this.setState({ activeSeq: this.props.project.seq[0] })\n\n\n // Checks if the browser is supported\n if (!mxClient.isBrowserSupported()) {\n // Displays an error message if the browser is not supported.\n mxUtils.error('Browser is not supported!', 200, false);\n }\n else {\n\n\n mxConnectionHandler.prototype.connectImage = new mxImage(Connector, 20, 20);\n\n var sidebar = ReactDOM.findDOMNode(this.refs.graphSidebar);\n //var toolbar = ReactDOM.findDOMNode(this.refs.graphToolbar);\n\n // Creates the div for the graph\n var container = ReactDOM.findDOMNode(this.refs.graphContainer);\n\n var outline = ReactDOM.findDOMNode(this.refs.outlineContainer);\n\n container.style.background = \"url(\" + Grid + \")\"\n\n // Creates a wrapper editor with a graph inside the given container.\n // The editor is used to create certain functionality for the\n // graph, such as the rubberband selection, but most parts\n // of the UI are custom in this example.\n\n var graph = this.editor.graph; \n\n this.editor.validation = true\n\n // Disable highlight of cells when dragging from toolbar\n graph.setDropEnabled(false);\n\n\n // Optional disabling of sizing\n graph.setCellsResizable(false);\n\n this.editor.setGraphContainer(container);\n\n // Disables built-in context menu\n mxEvent.disableContextMenu(container);\n\n //Set styles\n this.setStyle(graph)\n\n //If connection, test condition\n mxConnectionHandler.prototype.insertEdge = (parent, id, value, source, target, style) => { \n \n var encoder = new mxCodec();\n var node = encoder.encode(graph.getModel());\n \n var color = this.state.activeSeq.color\n\n var seqs = node.getElementsByTagName(\"Sequence\")\n seqs = Array.from(seqs);\n\n var edges = seqs.filter(seq => {\n return seq.getAttribute(\"seq\") === this.state.activeSeq.color\n })\n var flag = true;\n edges.every(edge => {\n\n let cell = edge.firstChild\n cell.source = cell.getAttribute(\"source\")\n cell.target = cell.getAttribute(\"target\") \n\n //consition\n if (cell.source === source.id || cell.target === target.id) {\n alert(\"Cannot connect\")\n flag = false\n return false\n\n }\n return true\n })\n\n // Connection without problem\n if (flag) {\n var doc = mxUtils.createXmlDocument();\n var edge = doc.createElement('Sequence')\n edge.setAttribute('seq', color);\n\n graph.insertEdge(parent, id, edge, source, target, 'strokeColor=' + color)\n\n }\n }\n\n //Bind keys\n var keyHandler = new mxDefaultKeyHandler(this.editor);\n keyHandler.bindAction(46, 'delete');\n keyHandler.bindAction(90, 'undo', true);\n keyHandler.bindAction(89, 'redo', true);\n keyHandler.bindAction(88, 'cut', true);\n keyHandler.bindAction(67, 'copy', true);\n keyHandler.bindAction(86, 'paste', true);\n keyHandler.bindAction(107, 'zoomIn');\n keyHandler.bindAction(109, 'zoomOut'); \n\n\n // double click on Shot\n graph.dblClick = (evt, cell) => { \n\n if (cell.edge === true) {\n return\n }\n\n if (this.state.changed) {\n alert(\"Graph wasn't saved\")\n }\n else {\n history.push({\n pathname: '/projects/' + this.props.project._id + '/shots/' + cell.id,\n state: { project: this.props.project }\n })\n }\n // Disables any default behaviour for the double click\n mxEvent.consume(evt);\n\n };\n\n graph.getModel().addListener(mxEvent.CHANGE, (sender, evt) => {\n this.setState({\n changed: true\n })\n })\n\n // Gets the default parent for inserting new cells. This\n // is normally the first child of the root (ie. layer 0).\n var parent = graph.getDefaultParent();\n \n this.readFromXML(graph, parent)\n\n this.addSidebarIcon(graph, sidebar, null,\n newNode);\n\n\n graph.setHtmlLabels(true);\n\n\n // Enables new connections in the graph\n graph.setConnectable(true);\n // Enables moving with right click ang drag\n graph.setPanning(true);\n\n graph.setTooltips(false);\n // graph.setMultigraph(false);\n\n\n // Does not allow dangling edges\n graph.setAllowDanglingEdges(false);\n\n // Stops editing on enter or escape keypress\n new mxRubberband(graph);\n\n // Enables guides (vodici cary)\n mxGraphHandler.prototype.guidesEnabled = true;\n\n // Disable highlight of cells when dragging from toolbar\n graph.setDropEnabled(false);\n\n // Enables snapping waypoints to terminals\n mxEdgeHandler.prototype.snapToTerminals = true;\n\n }\n //Rubberband selection in functions\n RubberBandSelection(container)\n\n new mxOutline(this.editor.graph, outline);\n\n }", "title": "" }, { "docid": "35d9f39f59acac08ea5d3614a6a78f09", "score": "0.51436424", "text": "connectedCallback(){\n\t\tthis.render();\n\t}", "title": "" }, { "docid": "c27768ab5bb99a9b545f318a3250f1f3", "score": "0.5141031", "text": "function render() {\n //targeting div with class display__svg\n const svg = d3.select(\".display__svg\");\n\n //margin convention practice\n const windowsize = {\n height: document.querySelector(\".display\").clientHeight,\n width: document.querySelector(\".display\").clientWidth,\n margin: { top: 20, right: 100, bottom: 180, left: 150 }\n };\n\n //calling graph generator\n drawchart(data, svg, windowsize);\n }", "title": "" }, { "docid": "766fc6a1fee6b3e2c2707f6a193c6ad2", "score": "0.513628", "text": "function _display(fulldata, delta) {\n\t\tif (!_domInitialized) return;\n\n\t\tif (_settings.debug) console.log(\"_display\", fulldata, delta);\n\t\t// First of all, we have to create the container for network rendering if needed\n\t\tif (!_networkContainer) {\n\t\t\t// Create the canvas.\n\t\t\t_networkContainer = $('<div>')\n\t\t\t\t.attr('id', 'network2d')\n\t\t\t\t.appendTo(_right2dContainer);\n\t\t}\n\n\t\t// Checks if the network is currently displayed. If not, the nodes and edges will be\n\t\t// produced from the full meters ( i.e data parameters ).\n\t\t// To be efficient, modes and edges will be created and stored into DataSet objects\n\t\t// and passed as parameters on the Network creation time.\n\t\tif (!_visNetwork) {\n\t\t\t// Reset and Create new nodes and edges to hold data as DataSet\n\t\t\t_nodes = new DataSet(); // new vis.DataSet();\n\t\t\t_edges = new DataSet(); // new vis.DataSet();\n\n\t\t\tif (!_settings.dynamic)\n\t\t\t\t// Create static hard-coded nodes and edges for debugging purpose\n\t\t\t\t_createFakeNodeAndEdgesForTest(_nodes, _edges);\n\t\t\telse\n\t\t\t\t_createAllNodesAndEdgesFromData(_nodes, _edges, fulldata);\n\n\t\t\t// Create the Network to display elements\n\t\t\t// whose global option depends on the configurator.\n\t\t\tvar optionNetwork = {};\n\t\t\tif (_userConfig.view.hierarchical === true || _userConfig.view.hierarchical.orientation) {\n\t\t\t\toptionNetwork = $.extend(true, {}, _options.hierarchical);\n\t\t\t\tif (_userConfig.view.hierarchical.orientation === \"vertical\") {\n\t\t\t\t\toptionNetwork.layout.hierarchical = {\n\t\t\t\t\t\tlevelSeparation: 400,\n\t\t\t\t\t\tnodeSpacing: 10,\n\t\t\t\t\t\t//\t\t\t\t\t\t\tedgeMinimization : false,\n\t\t\t\t\t\t//\t\t\t\t\t\t\tsortMethod: \"directed\",\n\t\t\t\t\t\tdirection: \"UD\" // UD, DU , LR , RL\n\t\t\t\t\t};\n\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\toptionNetwork = $.extend({}, _options.standard);\n\t\t\t}\n\n\t\t\tif (_settings.debug) console.log(\"optionNetwork\", optionNetwork);\n\n\t\t\tvar data = { nodes: _nodes, edges: _edges };\n\t\t\ttry {\n\t\t\t_visNetwork = new Network(_networkContainer.get(0), data, optionNetwork);\n\t\t\t} catch(e) {\n\t\t\t\tconsole.error(\"new Network failed\",e);\n\t\t\t}\n\n\t\t\tif (_settings.debug) console.info(\"_visNetwork.getSeed()\", _visNetwork.getSeed());\n\n\t\t\t// Add interaction handlers to be able to display some information on nodes/edges\n\t\t\t_addInteractionHandlersOnNetwork(_visNetwork);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Here, the delta parameters must be checked for any update.\n\t\t// When delta contains pertinent operation such as 'added','updated' or 'deleted',\n\t\t// nodes and edges must be re-arranged and then the Network is refreshed.\n\t\tif (!delta || (!delta.added && !delta.updated && !delta.deleted)) {\n\t\t\t// No change from previous data, do nothing.\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\t_updateNetWork(delta);\n\t\t} catch (e) {\n\t\t\tconsole.error(\"_updateNetWork(\" + delta + \")\", e);\n\t\t\tif (_settings.dynamic)\n\t\t\t\tthrow e;\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "bd6ab501af83d147cc0f5cdf014b324d", "score": "0.513545", "text": "function drawAllLinksMap(data, type) {\n\n var countries = data.map(d=>d.properties.name)\n var arcData = []\n countries.map(country=>{\n arcData.push(createLinksNet(data, 'net_' + country + \"_\" + newYear))\n })\n arcData = arcData.flat()\n\n lineScale = d3.scaleSqrt()\n .range([0.25, 5])\n .domain([0, d3.max(arcData, d=>d.value)])\n\n var arcPaths = all_arcs.selectAll(\"path\").data(arcData)\n\n arcPaths.exit().remove()\n\n var entered_arcs = arcPaths.enter().append(\"path\")\n .merge(arcPaths)\n //.transition().duration(500)\n .attr(\"class\", \"connector\")\n .attr('id', function(d,i){ return 'connector-' + i })\n .attr('d', function(d) { \n return line(d, 'sourceLocation', 'targetLocation')\n //var a = Math.atan2(d.targetLocation[1] - d.sourceLocation[1], d.targetLocation[0] - d.sourceLocation[0]) * (180 / Math.PI)\n //return arc(d, 'sourceLocation', 'targetLocation', 1)\n })\n .attr('fill', 'none')\n .attr('opacity', function(d) { return type=='show_country' ? 0 : opacityScale(d.value) })\n .attr('stroke-width', function(d) { return lineScale(d.value) })\n .style(\"stroke\", function(d,i) {\n var sx = d.targetLocation[0] - d.sourceLocation[0]\n if (d.category=='net_recipient') {\n return (sx > 0) ? 'url(#destinationLinkStroke1)' : 'url(#destinationLinkStroke2)'\n }\n else {\n return (sx > 0) ? 'url(#originLinkStroke1)' : 'url(#originLinkStroke2)'\n }\n })\n\n}", "title": "" }, { "docid": "288595cfd4fe0ac8023ad032eefc7896", "score": "0.51321197", "text": "render () {\n this._borderTop() // renders top frame\n ._grid() // renders the grid\n ._borderBot() // renders bottom frame\n ._print(EOL)\n return this\n }", "title": "" }, { "docid": "ad9a3a8ce6878cddff24b3e3defe26ff", "score": "0.51294225", "text": "show() {\n fill(\"green\");\n\n beginShape();\n\n for (let i = 0; i < this.vertices.length; i++){\n vertex(this.vertices[i].x, this.vertices[i].y);\n }\n\n endShape(CLOSE);\n }", "title": "" }, { "docid": "351967abcd97d7c182429425f2e957d1", "score": "0.51271904", "text": "function renderGraphs() {\r\n d3.select('.control.speed').remove();\r\n dashboard.\r\n append('svg:rect').\r\n attr('class', 'control speed').\r\n attr('x', 10).\r\n attr('y', 0).\r\n attr('width', 46).\r\n attr('height', 40).\r\n attr('fill', 'transparent');\r\n Tipped.remove('.control.speed');\r\n $('#' + LIST).append($($('.sharing.speed')[0]).clone(true));\r\n\r\n Tipped.create('.control.speed', $('.sharing.speed')[0], {\r\n skin: 'tiny',\r\n offset: {x: 23},\r\n shadow: {opacity: .1},\r\n stem: {spacing: 0},\r\n background: {color: '#333', opacity: .9},\r\n onShow: function() {\r\n const TAB_DASHBOARD = DASHBOARD[tabId] || {};\r\n const BLOCKED_COUNT = TAB_DASHBOARD.blocked || 0;\r\n const TOTAL_COUNT = TAB_DASHBOARD.total || 0;\r\n $('.sharing.speed .text').text((\r\n (BLOCKED_COUNT / TOTAL_COUNT || 0) * TIME_CONSTANT * 100\r\n ).toFixed() + '% (' + (\r\n BLOCKED_COUNT * TRACKING_RESOURCE_TIME / 1000\r\n ).toFixed(1) + 's) faster');\r\n },\r\n fadeIn: 400,\r\n fadeOut: 400\r\n });\r\n\r\n d3.select('.control.bandwidth').remove();\r\n dashboard.\r\n append('svg:rect').\r\n attr('class', 'control bandwidth').\r\n attr('x', 76).\r\n attr('y', 0).\r\n attr('width', 46).\r\n attr('height', 40).\r\n attr('fill', 'transparent');\r\n Tipped.remove('.control.bandwidth');\r\n $('#' + LIST).append($($('.sharing.bandwidth')[0]).clone(true));\r\n\r\n Tipped.create('.control.bandwidth', $('.sharing.bandwidth')[0], {\r\n skin: 'tiny',\r\n offset: {x: 23},\r\n shadow: {opacity: .1},\r\n stem: {spacing: 0},\r\n background: {color: '#333', opacity: .9},\r\n onShow: function() {\r\n const TAB_DASHBOARD = DASHBOARD[tabId] || {};\r\n const BLOCKED_COUNT = TAB_DASHBOARD.blocked || 0;\r\n const TOTAL_COUNT = TAB_DASHBOARD.total || 0;\r\n $('.sharing.bandwidth .text').text((\r\n (BLOCKED_COUNT / TOTAL_COUNT || 0) * SIZE_CONSTANT * 100\r\n ).toFixed() + '% (' + (\r\n BLOCKED_COUNT * TRACKING_RESOURCE_SIZE\r\n ).toFixed() + 'K) less data');\r\n },\r\n fadeIn: 400,\r\n fadeOut: 400\r\n });\r\n\r\n d3.select('.control.security').remove();\r\n dashboard.\r\n append('svg:rect').\r\n attr('class', 'control security').\r\n attr('x', 142).\r\n attr('y', 0).\r\n attr('width', 46).\r\n attr('height', 40).\r\n attr('fill', 'transparent');\r\n Tipped.remove('.control.security');\r\n $('#' + LIST).append($($('.sharing.security')[0]).clone(true));\r\n\r\n Tipped.create('.control.security', $('.sharing.security')[0], {\r\n skin: 'tiny',\r\n offset: {x: 23},\r\n shadow: {opacity: .1},\r\n stem: {spacing: 0},\r\n background: {color: '#333', opacity: .9},\r\n onShow: function() {\r\n const SECURED_COUNT = (DASHBOARD[tabId] || {}).secured || 0;\r\n $('.sharing.security .text').text(\r\n SECURED_COUNT + ' secured' + REQUEST + (SECURED_COUNT - 1 ? 's' : '')\r\n );\r\n },\r\n fadeIn: 400,\r\n fadeOut: 400\r\n });\r\n\r\n const TAB_DASHBOARD = DASHBOARD[tabId] || {};\r\n const BLOCKED_COUNT = TAB_DASHBOARD.blocked || 0;\r\n const TOTAL_COUNT = TAB_DASHBOARD.total || 0;\r\n const SECURED_COUNT = TAB_DASHBOARD.secured || 0;\r\n const ITERATIONS = Math.round(Math.max(\r\n (BLOCKED_COUNT / TOTAL_COUNT || 0) * TIME_CONSTANT,\r\n SECURED_COUNT / TOTAL_COUNT || 0\r\n ) * 13) + 23;\r\n const DUMMY_COUNT = TOTAL_COUNT || 1;\r\n const WEIGHTED = ITERATIONS == 23;\r\n\r\n for (var i = 1; i < ITERATIONS; i++) {\r\n setTimeout(function(index, delay) {\r\n if (index < 21) {\r\n d3.select('.total.speed').remove();\r\n const HEIGHT = (index > 19 ? 19 - index % 19 : index) * 2;\r\n const Y = 38 - HEIGHT;\r\n dashboard.\r\n insert('svg:rect', '.subtotal.speed').\r\n attr('class', 'total speed').\r\n attr('x', 28).\r\n attr('y', Y).\r\n attr('width', 10).\r\n attr('height', HEIGHT).\r\n attr('fill', '#ff3f00');\r\n d3.select('.total.bandwidth').remove();\r\n dashboard.\r\n insert('svg:rect', '.subtotal.bandwidth').\r\n attr('class', 'total bandwidth').\r\n attr('x', 94).\r\n attr('y', Y).\r\n attr('width', 10).\r\n attr('height', HEIGHT).\r\n attr('fill', '#ff7f00');\r\n d3.select('.total.security').remove();\r\n dashboard.\r\n insert('svg:rect', '.subtotal.security').\r\n attr('class', 'total security').\r\n attr('x', 160).\r\n attr('y', Y).\r\n attr('width', 10).\r\n attr('height', HEIGHT).\r\n attr('fill', '#007fff');\r\n }\r\n\r\n if (index > 15) {\r\n const DEFAULT_COUNT = DUMMY_COUNT * .28;\r\n const OFFSET_INDEX = index - 15;\r\n const MODULUS = ITERATIONS - 17;\r\n const FRACTION = (\r\n OFFSET_INDEX > MODULUS ? MODULUS - OFFSET_INDEX % MODULUS :\r\n OFFSET_INDEX\r\n ) / (ITERATIONS - 18);\r\n renderBlockedRequest(\r\n tabId,\r\n Math.min(BLOCKED_COUNT + DEFAULT_COUNT, DUMMY_COUNT) * FRACTION,\r\n DUMMY_COUNT,\r\n WEIGHTED\r\n );\r\n renderSecuredRequest(\r\n tabId,\r\n Math.min(SECURED_COUNT + DEFAULT_COUNT, DUMMY_COUNT) * FRACTION,\r\n DUMMY_COUNT\r\n );\r\n }\r\n\r\n if (timeout) timeout = (ITERATIONS - index - 1) * 25;\r\n }, i * 25, i);\r\n }\r\n}", "title": "" }, { "docid": "a3bf128c78553a24ad4b59bc278794c3", "score": "0.51216686", "text": "function drawCanvas() {\n //Clear everything\n clearCanvas([ctx_edges, ctx_nodes, ctx_hover])\n\n //Draw the edges between the categories and the threats\n ctx_edges.lineWidth = 5\n drawEdgesConcepts()\n //Draw the edges between the categories and the ICH elements\n drawEdgesElements()\n\n //Draw threat categories\n ctx_nodes.textBaseline = 'middle'\n ctx_nodes.textAlign = 'center'\n ctx_nodes.font = \"normal normal 400 24px \" + font_family\n threats.forEach(d => { drawCategories(ctx_nodes, d) })\n\n //Draw the other concepts around the top outside\n ctx_nodes.textBaseline = 'middle'\n ctx_nodes.font = \"normal normal 300 19px \" + font_family // controls font for concepts (applications)\n concepts.forEach(d => { drawConcepts(ctx_nodes, d) })\n\n //Draw the ICH elements around the bottom outside\n elements.forEach(d => { drawElements(ctx_nodes, d) })\n\n //Show the title\n if(mouse_hover_active) {\n if(hover_type === \"element\") showElementTitle(ctx_nodes, \"nodes\", current_hover.label)\n else showElementTitle(ctx_nodes, \"nodes\", null, ICH_num)\n //Show threat concept title when hovered over top threat\n if(hover_type === \"concept\") showConceptTitle(ctx_hover, current_hover)\n if(hover_type === \"category\") showCategoryRing(ctx_nodes, current_hover, 1)\n } else if(click_active) {\n if(hover_type === \"element\") showElementTitle(ctx_nodes, current_click.label, \"nodes\")\n else if(hover_type === \"concept\") showConceptTitle(ctx_hover, current_click)\n } else {\n showElementTitle(ctx_nodes, \"nodes\", null, ICH_num_all)\n }//else\n\n // LOOPS TO TAG EVERY NODE WITH ITS ID FOR DEVELOPMENT\n //DELETETHIS\n // threats.forEach(d => { \n // ctx_nodes.save();\n // ctx_nodes.translate(d.x, d.y-50)\n // ctx_nodes.rotate(0 * Math.PI / 180 + d.x*0.004);\n // ctx_nodes.fillStyle = \"black\";\n // // ctx_nodes.fillText(d.id,0,0); // ids for editing RADAR\n // ctx_nodes.restore();\n // //console.log(ctx_nodes)\n // })\n //DELETETHIS\n //DELETETHIS\n // concepts.forEach(d => { \n // ctx_nodes.save();\n // ctx_nodes.font = \"normal normal 600 19px sans-serif\"\n // ctx_nodes.translate(d.x * 0.97, d.y * 0.97)\n // ctx_nodes.rotate(90 * Math.PI / 180 + d.x*0.001);\n // ctx_nodes.fillStyle = \"black\";\n // // ctx_nodes.fillText(d.id.split(\"_\").pop(),0,0); // ids for editing RADAR\n // // ctx_nodes.fillText(d.id,0,0); // ids for editing RADAR\n // ctx_nodes.restore();\n // })\n // DELETETHIS\n //DELETETHIS\n // elements.forEach(d => { \n // ctx_nodes.save();\n // ctx_nodes.font = \"normal normal 600 19px sans-serif\"\n // ctx_nodes.translate(d.x * 0.97, d.y * 0.97)\n // ctx_nodes.rotate(90 * Math.PI / 180 + d.x*0.001);\n // ctx_nodes.fillStyle = \"black\";\n // // ctx_nodes.fillText(d.id.split(\"_\").pop(),0,0); // ids for editing RADAR\n // // ctx_nodes.fillText(d.id,0,0); // ids for editing RADAR\n // ctx_nodes.restore();\n // })\n // DELETETHIS\n }//function drawCanvas", "title": "" }, { "docid": "85fc6c4f9c5b3d046f9961df168a2da4", "score": "0.5119542", "text": "showGraphs(){\n\t\tthis.data = this.normalizedValuesService.getNormalizedValues();\n\t\tthis.series = this.data.series;\n\t\tthis.labels = this.data.labels;\n\t\tthis.renderChart();\n\t}", "title": "" }, { "docid": "424fbf4cff76470d784cbe322b09b806", "score": "0.5118604", "text": "function ViewConnection() { }", "title": "" }, { "docid": "c6a1dce6058489c1be7fda36e92bfb71", "score": "0.5103488", "text": "show() {\n if (this.data.length > 0) {\n for (let i = this.data.length - 1; i >= 0; i--) {\n let c = this.data[i].color;\n fill(c);\n stroke(0);\n ellipse(this.x, this.y, this.r + i * 10);\n }\n }\n\n for (let neighbor of this.neighbors) {\n line(this.x, this.y, neighbor.x, neighbor.y);\n }\n\n noStroke();\n randomSeed(this.id);\n let r = random(255);\n let g = random(255);\n let b = random(255);\n fill(color(r, g, b));\n ellipse(this.x, this.y, this.size);\n\n noFill();\n strokeWeight(1);\n stroke(0);\n ellipse(this.x, this.y, this.r);\n\n }", "title": "" }, { "docid": "93323f0cbee822c1a42ebb950862a37b", "score": "0.51020366", "text": "function drawGraph(){\n\n var nodes = [];\n var nodes_rich = [];\n var nodes_middle = [];\n var nodes_poor = [];\n var links = [];\n var color;\n var game = Games.findOne({});\n var neighbor;\n //var i = 0;\n\n game.customers.forEach(function (customer) {\n\n //if(i <= 30){\n\n if(customer.customer_product && customer.customer_product.product_color){\n color = customer.customer_product.product_color;\n }else{\n color = \"lightblue\";\n }\n\n var datum = {\n id: customer.customer_id,\n income: customer.customer_income,\n activity: customer.customer_activity,\n color: color,\n group: customer.getIncomeGroup(game),\n };\n\n if(datum.group == \"rich\"){\n nodes_rich.push(datum);\n }else if(datum.group == \"middle\"){\n nodes_middle.push(datum);\n }else if(datum.group == \"poor\"){\n nodes_poor.push(datum);\n }\n\n nodes.push(datum);\n\n customer.customer_neighbors.forEach(function (neighbor_obj) {\n game.customers.forEach(function(customer) {\n if(customer.customer_id == neighbor_obj.customer_id){\n neighbor = customer;\n }\n });\n\n var link = {\n source: customer.customer_id,\n target: neighbor.customer_id,\n weight: neighbor_obj.weight\n };\n links.push(link);\n });\n\n //i++;\n //}\n });\n\n //console.log(nodes);\n //console.log(links);\n\n\n /* Create force graph */\n var w = 1200;\n var h = 800;\n\n var size = nodes.length;\n nodes.forEach(function(d, i) { d.x = d.y = w / size * i});\n\n var svg = d3.select(\"#graph\").append(\"svg\")\n .attr(\"width\", w)\n .attr(\"height\", h);\n\n var force = d3.layout.force()\n .nodes(nodes)\n .links(links)\n .linkStrength(0.2)\n .linkDistance(50)\n .charge(-70)\n .size([w, h]);\n\n setTimeout(function() {\n\n var n = 600\n force.start();\n for (var i = n * n; i > 0; --i) force.tick();\n force.stop();\n\n svg.selectAll(\"line\")\n .data(links)\n .enter().append(\"svg:line\")\n .attr(\"class\", \"graph_line\")\n .attr(\"x1\", function(d) { return d.source.x; })\n .attr(\"y1\", function(d) { return d.source.y; })\n .attr(\"x2\", function(d) { return d.target.x; })\n .attr(\"y2\", function(d) { return d.target.y; })\n .style(\"stroke\", \"black\")\n .style(\"stroke-width\", function(d) { return Math.sqrt(d.weight); });\n\n svg.append(\"svg:g\")\n .selectAll(\"circle\")\n .data(nodes_rich)\n .enter().append(\"svg:polygon\")\n .attr(\"class\", \"graph_circle\")\n .attr(\"points\", function(d) { return (d.x + d.income / 2 * 1.2)+\",\"+(d.y + d.income / 2 * 1.2)\n +\" \"+(d.x)+\",\"+(d.y - d.income / 2 * 1.5)\n +\" \"+(d.x - d.income / 2 * 1.5)+\",\"+(d.y + d.income / 2 * 1.2); })\n .attr(\"fill\", function(d){ if (d.activity == 1){\n return d.color;\n }else{\n return \"red\";\n }\n });\n\n svg.append(\"svg:g\")\n .selectAll(\"circle\")\n .data(nodes_middle)\n .enter().append(\"svg:rect\")\n .attr(\"class\", \"graph_circle\")\n .attr(\"x\", function(d) { return d.x - d.income * 1.2 / 2; })\n .attr(\"y\", function(d) { return d.y - d.income * 1.2 / 2; })\n .attr(\"fill\", function(d){ if (d.activity == 1){\n return d.color;\n }else{\n return \"red\";\n }\n })\n .attr(\"width\", function(d) { return d.income*1.2; })\n .attr(\"height\", function(d) { return d.income*1.2; });\n\n svg.append(\"svg:g\")\n .selectAll(\"circle\")\n .data(nodes_poor)\n .enter().append(\"svg:circle\")\n .attr(\"class\", \"graph_circle\")\n .attr(\"cx\", function(d) { return d.x; })\n .attr(\"cy\", function(d) { return d.y; })\n .attr(\"fill\", function(d){ if (d.activity == 1){\n return d.color;\n }else{\n return \"red\";\n }\n })\n .attr(\"r\", function(d) { return d.income/1.5; });\n\n svg.append(\"svg:g\")\n .selectAll(\"text\")\n .data(nodes)\n .enter().append(\"svg:text\")\n .attr(\"class\", \"graph_text\")\n .attr(\"transform\", function(d) { return \"translate(\" + d.x + \",\" + d.y + \")\"; })\n .attr(\"text-anchor\", \"middle\")\n .attr(\"y\", \".3em\")\n //.text(function(d) { return d.id+\" [\"+d.income+\"]\"; });\n .text(function(d) { return d.id; });\n\n }, 20);\n}", "title": "" }, { "docid": "e5cb938849daab47aca5f8d030b896a7", "score": "0.50970143", "text": "function visualise(results, startDate, endDate, clusters) {\n var json_source = $SCRIPT_ROOT + '/cluster?results=' + results + '&start_date=' + startDate + '&end_date=' + endDate + '&clusters=' + clusters\n // var json_source = $SCRIPT_ROOT + '/static/miserables.json'\n // json_source = $SCRIPT_ROOT + '/static/output.json'\n\n d3.json(json_source, function (error, graph) {\n\n $('body').append('<div id=\"sidePanel\"></div>');\n $('#sidePanel').append('<div id=\"title\"></div>');\n $('#sidePanel').append('<div id=\"features\"></div>');\n $('#sidePanel').append('<div id=\"content\"></div>');\n\n var width = +window.innerWidth;\n var height = +window.innerHeight;\n var zoom = d3.zoom().scaleExtent([.2, 10]).on(\"zoom\", zoomed);\n\n var svg = d3.select(\"svg\").attr(\"viewBox\", \"0 0 \" + width + \" \" + height ).attr(\"preserveAspectRatio\", \"xMinYMin\");\n svg.call(zoom);\n var mainContainer = svg.append(\"g\").attr(\"width\", width).attr(\"height\", height);\n\n var color = d3.scaleOrdinal(d3.schemeCategory20);\n\n var simulation = d3.forceSimulation()\n .force(\"link\", d3.forceLink().id(function (d) {\n return d.id;\n }).distance(function(d){\n return Math.pow(d.value*10,1.1); // increasing the distance a bit for clearer visuals\n }))\n .force(\"charge\", d3.forceManyBody())\n .force(\"center\", d3.forceCenter(width / 2, height / 2));\n\n if (error) throw error;\n\n var link = mainContainer.append(\"g\")\n .attr(\"class\", \"links\")\n .selectAll(\"line\")\n .data(graph.links)\n .enter().append(\"line\")\n .attr(\"stroke-width\", function (d) {\n return 30/(d.value); // the higher the distance, the thinner the line\n });\n\n var node = mainContainer.append(\"g\").attr(\"class\", \"nodes\")\n .selectAll(\"nodes\").data(graph.nodes).enter().append(\"g\").attr(\"class\",\"node\");\n\n var text = node.append(\"text\")\n .attr(\"dx\", 20)\n .attr(\"dy\", \"0.5em\")\n .text(function (d) {\n return d.id;\n })\n .style(\"stroke\", \"gray\");\n\n var circle = node\n .append(\"circle\")\n .attr(\"r\", 13)\n .attr(\"fill\", function (d) {\n return color(d.group);\n })\n .call(d3.drag()\n .on(\"start\", dragstarted)\n .on(\"drag\", dragged)\n .on(\"end\", dragended))\n .on('click', function(d) {\n $('#title').html(\"<h1>\" + d.id + \"</h1>\");\n $('#features').html(d.features);\n $('#content').html(d.bodyhtml);\n });\n\n $('.node').each(function () {\n $(this).children('text').hide();\n $(this).on('mouseover', function () {\n $(this).children('text').show();\n });\n $(this).on('mouseout', function () {\n $(this).children('text').hide();\n });\n })\n\n loading = false;\n $('.loading').attr(\"style\",\"display: none;\");\n\n simulation\n .nodes(graph.nodes)\n .on(\"tick\", ticked);\n\n simulation.force(\"link\")\n .links(graph.links);\n\n function ticked() {\n link\n .attr(\"x1\", function (d) {\n return d.source.x;\n })\n .attr(\"y1\", function (d) {\n return d.source.y;\n })\n .attr(\"x2\", function (d) {\n return d.target.x;\n })\n .attr(\"y2\", function (d) {\n return d.target.y;\n });\n\n d3.selectAll(\"text\")\n .attr(\"x\", function (d) {\n return d.x;\n })\n .attr(\"y\", function (d) {\n return d.y;\n });\n\n d3.selectAll(\"circle\")\n .attr(\"cx\", function (d) {\n return d.x;\n })\n .attr(\"cy\", function (d) {\n return d.y;\n });\n }\n\n function zoomed() {\n mainContainer.attr(\"transform\", d3.event.transform);\n }\n\n function dragstarted(d) {\n if (!d3.event.active) simulation.alphaTarget(0.3).restart();\n d.fx = d.x;\n d.fy = d.y;\n }\n\n function dragged(d) {\n d.fx = d3.event.x;\n d.fy = d3.event.y;\n }\n\n function dragended(d) {\n if (!d3.event.active) simulation.alphaTarget(0);\n d.fx = null;\n d.fy = null;\n }\n });\n\n return true;\n}", "title": "" }, { "docid": "ca879ba42b43b716fb3a531b5b69945f", "score": "0.50959784", "text": "drawWalls(showPaths, gradientMode, biggestFromStart, biggestFromExit) {\n // draws each vertex's walls\n for (let i = 0; i < this.vertices.length; i += 1) {\n let v = this.vertices[i];\n v.drawConnections(showPaths, gradientMode, biggestFromStart, biggestFromExit);\n }\n }", "title": "" }, { "docid": "aaa5d0e060f6bda0ba5adc9779180a8c", "score": "0.5090554", "text": "show() {\n push();\n background([100, 100, 100]);\n translate(this.pos.x, this.pos.y);\n for (let cell of this.cells) {\n cell.show();\n }\n for (let border of this.borders) {\n border.show();\n }\n pop();\n }", "title": "" }, { "docid": "9c856c0e4c828a890c7e6fa5f8b3e39d", "score": "0.50866467", "text": "function layoutNodesEdges(graph) {\n var N = graph.nodes.length, i=0;\n graph.nodes.forEach(function(node) {\n node.labelType = node.neo4j_labels[0];\n node.label = node.neo4j_data[currentSchema.nodes[node.labelType]._default['defaultLabel']];\n var defaultRank = currentSchema.nodes[node.labelType]._default['defaultRank'];\n var rank = (node.neo4j_data.Rank != undefined)?node.neo4j_data.Rank:defaultRank;\n node.size = getNodeSize(rank);\n if(node.neo4j_data.iconUrl == undefined) {\n //node.type = 'def';\n node.color = currentSchema.nodes[node.labelType]._default['defaultColor'];\n }\n else {\n node.type = 'image';\n //node.url = node.neo4j_data.iconUrl;\n node.color = currentSchema.nodes[node.labelType]._default['defaultColor'];\n node.image = {\n url: node.neo4j_data.iconUrl,\n clip: 1,\n scale: 1.4,\n w: 1,\n h: 1\n };\n }\n\n node.border_size = appConfig.graphConfig.nodeBorderSize;\n node.border_color = appConfig.graphConfig.nodeBorderColor;\n sigmaInstance.graph.addNode(node);\n i++;\n });\n graph.edges.forEach(function(edge, key) {\n if(currentSchema['relationships'][edge.neo4j_type] != undefined) {\n edge.label = edge.neo4j_data[currentSchema['relationships'][edge.neo4j_type]['_default']['defaultLabel']];\n edge.color = currentSchema['relationships'][edge.neo4j_type]['_default']['defaultColor'];\n }\n else {\n edge.label = edge.neo4j_data['Name'];\n edge.color = '#000';\n }\n edge.hover_color = '#000';\n edge.type = \"arrow\";\n sigmaInstance.graph.addEdge(edge);\n });\n stopLoader();\n sigma.canvas.edges.autoCurve(sigmaInstance);\n startColaLayout(graph);\n }", "title": "" }, { "docid": "0272aaeaf5fd778122e6a1f7c276379c", "score": "0.5075177", "text": "function runRenderPrivate(provVis) {\n\t /* Save vis object to module scope. */\n\t vis$1 = provVis;\n\t cell = provVis.cell;\n\n\t lNodesBAK = vis$1.graph.lNodes;\n\t aNodesBAK = vis$1.graph.aNodes;\n\t saNodesBAK = vis$1.graph.saNodes;\n\t nodesBAK = vis$1.graph.nodes;\n\t lLinksBAK = vis$1.graph.lLinks;\n\t aLinksBAK = vis$1.graph.aLinks;\n\n\t // width = vis.graph.l.width;\n\t // depth = vis.graph.l.depth;\n\n\t timeColorScale = createAnalysistimeColorScale(vis$1.graph.aNodes, ['white', 'black']);\n\t initDoiTimeComponent(vis$1.graph.aNodes, vis$1);\n\n\t /* Init all nodes filtered. */\n\t initDoiFilterComponent(vis$1.graph.lNodes);\n\t filterAction = 'blend';\n\n\t /* Init all nodes with the motif diff. */\n\t initDoiLayerDiffComponent(vis$1.graph.lNodes, vis$1.graph.aNodes);\n\n\t /* Draw analysis links. */\n\t vis$1.canvas.append('g').classed('aHLinks', true);\n\t vis$1.canvas.append('g').classed('aLinks', true);\n\t updateAnalysisLinks(vis$1.graph);\n\n\t /* Draw layer nodes and links. */\n\t dagreLayerLayout(vis$1.graph, vis$1.cell, updateNodeAndLink);\n\t vis$1.canvas.append('g').classed('lLinks', true);\n\t vis$1.canvas.append('g').classed('layers', true);\n\t updateLayerLinks(vis$1.graph.lLinks);\n\t updateLayerNodes(vis$1.graph.lNodes);\n\n\t /* Draw analysis nodes. */\n\t vis$1.canvas.append('g').classed('analyses', true);\n\t updateAnalysisNodes();\n\n\t /* Draw subanalysis nodes. */\n\t drawSubanalysisNodes();\n\n\t /* Draw nodes. */\n\t drawNodes();\n\n\t /* Concat aNode, saNode and node. */\n\t domNodeset = concatDomClassElements(['lNode', 'aNode', 'saNode', 'node']);\n\n\t /* Add dragging behavior to nodes. */\n\t applyDragBehavior(layer, dragStart, dragging, dragEnd);\n\t applyDragBehavior(analysis, dragStart, dragging, dragEnd);\n\n\t /* Initiate doi. */\n\t vis$1.graph.aNodes.forEach(function (an) {\n\t handleCollapseExpandNode(an, 'c', 'auto');\n\t });\n\t updateNodeFilter();\n\t updateLinkFilter();\n\t updateNodeDoi();\n\n\t /* Draw timeline view. */\n\t drawTimelineView(vis$1);\n\n\t /* Draw doi view. */\n\t drawDoiView();\n\n\t /* Draw colorcoding view. */\n\t drawColorcodingView();\n\n\t /* Event listeners. */\n\t handleEvents(vis$1.graph);\n\n\t /* Set initial graph position. */\n\t fitGraphToWindow(0);\n\t}", "title": "" }, { "docid": "600862af20489cb59f5d72de1a8302ec", "score": "0.5073954", "text": "destroy() {\n this.source.classList.remove(\"connlib-cconnector-start\");\n this.svg.parentNode.removeChild(this.svg);\n if (this.source && Connlib.currentMouseover) {\n console.log(\"connect \" + this.source + \" and \" + Connlib.currentMouseover);\n /*\n connlib.instances[0].connect(this.source.id, connlib.currentMouseover.id);\n connlib.instances[0].render();\n */\n }\n }", "title": "" }, { "docid": "8c64bd286b8165c5f850b186264cda1f", "score": "0.5072443", "text": "renderDataStructures(curInstr: number) {\n var myViz = this; // to prevent confusion of 'this' inside of nested functions\n\n var curEntry = this.curTrace[curInstr];\n var curToplevelLayout = this.curTraceLayouts[curInstr];\n\n myViz.resetJsPlumbManager(); // very important!!!\n\n // for simplicity (but sacrificing some performance), delete all\n // connectors and redraw them from scratch. doing so avoids mysterious\n // jsPlumb connector alignment issues when the visualizer's enclosing\n // div contains, say, a \"position: relative;\" CSS tag\n // (which happens in the IPython Notebook)\n var existingConnectionEndpointIDs = d3.map();\n myViz.jsPlumbInstance.select({scope: 'varValuePointer'}).each(function(c) {\n // This is VERY crude, but to prevent multiple redundant HEAP->HEAP\n // connectors from being drawn with the same source and origin, we need to first\n // DELETE ALL existing HEAP->HEAP connections, and then re-render all of\n // them in each call to this function. The reason why we can't safely\n // hold onto them is because there's no way to guarantee that the\n // *__heap_pointer_src_<src id> IDs are consistent across execution points.\n //\n // thus, only add to existingConnectionEndpointIDs if this is NOT heap->heap\n if (!c.sourceId.match(heapPtrSrcRE)) {\n existingConnectionEndpointIDs.set(c.sourceId, c.targetId);\n }\n });\n\n var existingParentPointerConnectionEndpointIDs = d3.map();\n myViz.jsPlumbInstance.select({scope: 'frameParentPointer'}).each(function(c) {\n existingParentPointerConnectionEndpointIDs.set(c.sourceId, c.targetId);\n });\n\n\n // Heap object rendering phase:\n\n // count everything in curToplevelLayout as already rendered since we will render them\n // in d3 .each() statements\n $.each(curToplevelLayout, function(xxx, row) {\n for (var i = 0; i < row.length; i++) {\n var objID = row[i];\n var heapObjID = myViz.generateHeapObjID(objID, curInstr);\n myViz.jsPlumbManager.renderedHeapObjectIDs.set(heapObjID, 1);\n }\n });\n\n // use d3 to render the heap by mapping curToplevelLayout into <table class=\"heapRow\">\n // and <td class=\"toplevelHeapObject\"> elements\n\n // for simplicity, CLEAR this entire div every time, which totally\n // gets rid of the incremental benefits of using d3 for, say,\n // transitions or efficient updates. but it provides more\n // deterministic and predictable output for other functions. sigh, i'm\n // not really using d3 to the fullest, but oh wells!\n myViz.domRoot.find('#heap')\n .empty()\n .html(`<div id=\"heapHeader\">${myViz.getRealLabel(\"Objects\")}</div>`);\n\n\n var heapRows = myViz.domRootD3.select('#heap')\n .selectAll('table.heapRow')\n .attr('id', function(d, i){ return 'heapRow' + i; }) // add unique ID\n .data(curToplevelLayout, function(objLst) {\n return objLst[0]; // return first element, which is the row ID tag\n });\n\n\n // insert new heap rows\n heapRows.enter().append('table')\n //.each(function(objLst, i) {console.log('NEW ROW:', objLst, i);})\n .attr('id', function(d, i){ return 'heapRow' + i; }) // add unique ID\n .attr('class', 'heapRow');\n\n // delete a heap row\n var hrExit = heapRows.exit();\n hrExit\n .each(function(d, idx) {\n //console.log('DEL ROW:', d, idx);\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // update an existing heap row\n var toplevelHeapObjects = heapRows\n //.each(function(objLst, i) { console.log('UPDATE ROW:', objLst, i); })\n .selectAll('td.toplevelHeapObject')\n .data(function(d, i) {return d.slice(1, d.length);}, /* map over each row, skipping row ID tag */\n function(objID) {return objID;} /* each object ID is unique for constancy */);\n\n // insert a new toplevelHeapObject\n var tlhEnter = toplevelHeapObjects.enter().append('td')\n .attr('class', 'toplevelHeapObject')\n .attr('id', function(d, i) {return 'toplevel_heap_object_' + d;});\n\n // remember that the enter selection is added to the update\n // selection so that we can process it later ...\n\n // update a toplevelHeapObject\n toplevelHeapObjects\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .each(function(objID, i) {\n //console.log('NEW/UPDATE ELT', objID);\n\n // TODO: add a smoother transition in the future\n // Right now, just delete the old element and render a new one in its place\n $(this).empty();\n\n if (myViz.isCppMode()) {\n // TODO: why might this be undefined?!? because the object\n // disappeared from the heap all of a sudden?!?\n if (curEntry.heap[objID] !== undefined) {\n myViz.renderCompoundObject(objID, curInstr, $(this), true);\n }\n } else {\n myViz.renderCompoundObject(objID, curInstr, $(this), true);\n }\n });\n\n // delete a toplevelHeapObject\n var tlhExit = toplevelHeapObjects.exit();\n tlhExit\n .each(function(d, idx) {\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // Render globals and then stack frames using d3:\n\n\n // TODO: this sometimes seems buggy on Safari, so nix it for now:\n function highlightAliasedConnectors(d, i) {\n // if this row contains a stack pointer, then highlight its arrow and\n // ALL aliases that also point to the same heap object\n var stackPtrId = $(this).find('div.stack_pointer').attr('id');\n if (stackPtrId) {\n var foundTargetId = null;\n myViz.jsPlumbInstance.select({source: stackPtrId}).each(function(c) {foundTargetId = c.targetId;});\n\n // use foundTargetId to highlight ALL ALIASES\n myViz.jsPlumbInstance.select().each(function(c) {\n if (c.targetId == foundTargetId) {\n c.setHover(true);\n $(c.canvas).css(\"z-index\", 2000); // ... and move it to the VERY FRONT\n }\n else {\n c.setHover(false);\n }\n });\n }\n }\n\n function unhighlightAllConnectors(d, i) {\n myViz.jsPlumbInstance.select().each(function(c) {\n c.setHover(false);\n });\n }\n\n\n // TODO: coalesce code for rendering globals and stack frames,\n // since there's so much copy-and-paste grossness right now\n\n // render all global variables IN THE ORDER they were created by the program,\n // in order to ensure continuity:\n\n // Derive a list where each element contains varname\n // as long as value is NOT undefined.\n // (Sometimes entries in curEntry.ordered_globals are undefined,\n // so filter those out.)\n var realGlobalsLst = [];\n $.each(curEntry.ordered_globals, function(i, varname) {\n var val = curEntry.globals[varname];\n\n // (use '!==' to do an EXACT match against undefined)\n if (val !== undefined) { // might not be defined at this line, which is OKAY!\n realGlobalsLst.push(varname);\n }\n });\n\n var globalsID = myViz.owner.generateID('globals');\n var globalTblID = myViz.owner.generateID('global_table');\n\n var globalVarTable = myViz.domRootD3.select('#' + globalTblID)\n .selectAll('tr')\n .data(realGlobalsLst,\n function(d) {return d;} // use variable name as key\n );\n\n globalVarTable\n .enter()\n .append('tr')\n .attr('class', 'variableTr')\n .attr('id', function(d, i) {\n return myViz.owner.generateID(varnameToCssID('global__' + d + '_tr')); // make globally unique (within the page)\n });\n\n\n var globalVarTableCells = globalVarTable\n .selectAll('td.stackFrameVar,td.stackFrameValue')\n .data(function(d, i){return [d, d];}) /* map varname down both columns */\n\n globalVarTableCells.enter()\n .append('td')\n .attr('class', function(d, i) {return (i == 0) ? 'stackFrameVar' : 'stackFrameValue';});\n\n // remember that the enter selection is added to the update\n // selection so that we can process it later ...\n\n // UPDATE\n globalVarTableCells\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .each(function(varname, i) {\n if (i == 0) {\n $(this).html(varname);\n }\n else {\n // always delete and re-render the global var ...\n // NB: trying to cache and compare the old value using,\n // say -- $(this).attr('data-curvalue', valStringRepr) -- leads to\n // a mysterious and killer memory leak that I can't figure out yet\n $(this).empty();\n\n // make sure varname doesn't contain any weird\n // characters that are illegal for CSS ID's ...\n var varDivID = myViz.owner.generateID('global__' + varnameToCssID(varname));\n\n // need to get rid of the old connector in preparation for rendering a new one:\n existingConnectionEndpointIDs.remove(varDivID);\n\n var val = curEntry.globals[varname];\n if (myViz.isPrimitiveType(val)) {\n myViz.renderPrimitiveObject(val, curInstr, $(this));\n }\n else if (val[0] === 'C_STRUCT' || val[0] === 'C_ARRAY' || val[0] === 'C_MULTIDIMENSIONAL_ARRAY') {\n // C structs and arrays can be inlined in frames\n myViz.renderCStructArray(val, curInstr, $(this));\n }\n else {\n var heapObjID = myViz.generateHeapObjID(getRefID(val), curInstr);\n\n if (myViz.params.textualMemoryLabels) {\n var labelID = varDivID + '_text_label';\n $(this).append('<div class=\"objectIdLabel\" id=\"' + labelID + '\">id' + getRefID(val) + '</div>');\n $(this).find('div#' + labelID).hover(\n function() {\n myViz.jsPlumbInstance.connect({source: labelID, target: heapObjID,\n scope: 'varValuePointer'});\n },\n function() {\n myViz.jsPlumbInstance.select({source: labelID}).detach();\n });\n }\n else {\n // add a stub so that we can connect it with a connector later.\n // IE needs this div to be NON-EMPTY in order to properly\n // render jsPlumb endpoints, so that's why we add an \"&nbsp;\"!\n $(this).append('<div class=\"stack_pointer\" id=\"' + varDivID + '\">&nbsp;</div>');\n\n assert(!myViz.jsPlumbManager.connectionEndpointIDs.has(varDivID));\n myViz.jsPlumbManager.connectionEndpointIDs.set(varDivID, heapObjID);\n //console.log('STACK->HEAP', varDivID, heapObjID);\n }\n }\n }\n });\n\n\n\n globalVarTableCells.exit()\n .each(function(d, idx) {\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n globalVarTable.exit()\n .each(function(d, i) {\n // detach all stack_pointer connectors for divs that are being removed\n $(this).find('.stack_pointer').each(function(i, sp) {\n existingConnectionEndpointIDs.remove($(sp).attr('id'));\n });\n\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // for aesthetics, hide globals if there aren't any globals to display\n if (curEntry.ordered_globals.length == 0) {\n this.domRoot.find('#' + globalsID).hide();\n }\n else {\n this.domRoot.find('#' + globalsID).show();\n }\n\n\n // holy cow, the d3 code for stack rendering is ABSOLUTELY NUTS!\n\n var stackDiv = myViz.domRootD3.select('#stack');\n\n // VERY IMPORTANT for selectAll selector to be SUPER specific here!\n var stackFrameDiv = stackDiv.selectAll('div.stackFrame,div.zombieStackFrame')\n .data(curEntry.stack_to_render, function(frame) {\n // VERY VERY VERY IMPORTANT for properly handling closures and nested functions\n // (see the backend code for more details)\n return frame.unique_hash;\n });\n\n var sfdEnter = stackFrameDiv.enter()\n .append('div')\n .attr('class', function(d, i) {return d.is_zombie ? 'zombieStackFrame' : 'stackFrame';})\n .attr('id', function(d, i) {return d.is_zombie ? myViz.owner.generateID(\"zombie_stack\" + i)\n : myViz.owner.generateID(\"stack\" + i);\n })\n // HTML5 custom data attributes\n .attr('data-frame_id', function(frame, i) {return frame.frame_id;})\n .attr('data-parent_frame_id', function(frame, i) {\n return (frame.parent_frame_id_list.length > 0) ? frame.parent_frame_id_list[0] : null;\n })\n .each(function(frame, i) {\n if (!myViz.params.drawParentPointers) {\n return;\n }\n // only run if myViz.params.drawParentPointers is true ...\n\n var my_CSS_id = $(this).attr('id');\n\n //console.log(my_CSS_id, 'ENTER');\n\n // render a parent pointer whose SOURCE node is this frame\n // i.e., connect this frame to p, where this.parent_frame_id == p.frame_id\n // (if this.parent_frame_id is null, then p is the global frame)\n if (frame.parent_frame_id_list.length > 0) {\n var parent_frame_id = frame.parent_frame_id_list[0];\n // tricky turkey!\n // ok this hack just HAPPENS to work by luck ... usually there will only be ONE frame\n // that matches this selector, but sometimes multiple frames match, in which case the\n // FINAL frame wins out (since parentPointerConnectionEndpointIDs is a map where each\n // key can be mapped to only ONE value). it so happens that the final frame winning\n // out looks \"desirable\" for some of the closure test cases that I've tried. but\n // this code is quite brittle :(\n myViz.domRoot.find('div#stack [data-frame_id=' + parent_frame_id + ']').each(function(i, e) {\n var parent_CSS_id = $(this).attr('id');\n //console.log('connect', my_CSS_id, parent_CSS_id);\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.set(my_CSS_id, parent_CSS_id);\n });\n }\n else {\n // render a parent pointer to the global frame\n //console.log('connect', my_CSS_id, globalsID);\n // only do this if there are actually some global variables to display ...\n if (curEntry.ordered_globals.length > 0) {\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.set(my_CSS_id, globalsID);\n }\n }\n\n // tricky turkey: render parent pointers whose TARGET node is this frame.\n // i.e., for all frames f such that f.parent_frame_id == my_frame_id,\n // connect f to this frame.\n // (make sure not to confuse frame IDs with CSS IDs!!!)\n var my_frame_id = frame.frame_id;\n myViz.domRoot.find('div#stack [data-parent_frame_id=' + my_frame_id + ']').each(function(i, e) {\n var child_CSS_id = $(this).attr('id');\n //console.log('connect', child_CSS_id, my_CSS_id);\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.set(child_CSS_id, my_CSS_id);\n });\n });\n\n sfdEnter\n .append('div')\n .attr('class', 'stackFrameHeader')\n .html(function(frame, i) {\n\n // pretty-print lambdas and display other weird characters\n // (might contain '<' or '>' for weird names like <genexpr>)\n var funcName = htmlspecialchars(frame.func_name).replace('&lt;lambda&gt;', '\\u03bb')\n .replace('\\n', '<br/>');\n\n var headerLabel = funcName;\n\n // only display if you're someone's parent (unless showAllFrameLabels)\n if (frame.is_parent || myViz.params.showAllFrameLabels) {\n headerLabel = 'f' + frame.frame_id + ': ' + headerLabel;\n }\n\n // optional (btw, this isn't a CSS id)\n if (frame.parent_frame_id_list.length > 0) {\n var parentFrameID = frame.parent_frame_id_list[0];\n headerLabel = headerLabel + ' [parent=f' + parentFrameID + ']';\n }\n else if (myViz.params.showAllFrameLabels) {\n headerLabel = headerLabel + ' [parent=Global]';\n }\n\n return headerLabel;\n });\n\n sfdEnter\n .append('table')\n .attr('class', 'stackFrameVarTable');\n\n\n var stackVarTable = stackFrameDiv\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .select('table').selectAll('tr')\n .data(function(frame) {\n // each list element contains a reference to the entire frame\n // object as well as the variable name\n // TODO: look into whether we can use d3 parent nodes to avoid\n // this hack ... http://bost.ocks.org/mike/nest/\n return frame.ordered_varnames.map(function(varname) {return {varname:varname, frame:frame};});\n },\n function(d) {\n // TODO: why would d ever be null?!? weird\n if (d) {\n return d.varname; // use variable name as key\n }\n }\n );\n\n stackVarTable\n .enter()\n .append('tr')\n .attr('class', 'variableTr')\n .attr('id', function(d, i) {\n return myViz.owner.generateID(varnameToCssID(d.frame.unique_hash + '__' + d.varname + '_tr')); // make globally unique (within the page)\n });\n\n\n var stackVarTableCells = stackVarTable\n .selectAll('td.stackFrameVar,td.stackFrameValue')\n .data(function(d, i) {return [d, d] /* map identical data down both columns */;});\n\n stackVarTableCells.enter()\n .append('td')\n .attr('class', function(d, i) {return (i == 0) ? 'stackFrameVar' : 'stackFrameValue';});\n\n stackVarTableCells\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .each(function(d, i) {\n var varname = d.varname;\n var frame = d.frame;\n\n if (i == 0) {\n if (varname == '__return__')\n $(this).html('<span class=\"retval\">Return<br/>value</span>');\n else\n $(this).html(varname);\n }\n else {\n // always delete and re-render the stack var ...\n // NB: trying to cache and compare the old value using,\n // say -- $(this).attr('data-curvalue', valStringRepr) -- leads to\n // a mysterious and killer memory leak that I can't figure out yet\n $(this).empty();\n\n // make sure varname and frame.unique_hash don't contain any weird\n // characters that are illegal for CSS ID's ...\n var varDivID = myViz.owner.generateID(varnameToCssID(frame.unique_hash + '__' + varname));\n\n // need to get rid of the old connector in preparation for rendering a new one:\n existingConnectionEndpointIDs.remove(varDivID);\n\n var val = frame.encoded_locals[varname];\n if (myViz.isPrimitiveType(val)) {\n myViz.renderPrimitiveObject(val, curInstr, $(this));\n }\n else if (val[0] === 'C_STRUCT' || val[0] === 'C_ARRAY' || val[0] === 'C_MULTIDIMENSIONAL_ARRAY') {\n // C structs and arrays can be inlined in frames\n myViz.renderCStructArray(val, curInstr, $(this));\n }\n else {\n var heapObjID = myViz.generateHeapObjID(getRefID(val), curInstr);\n if (myViz.params.textualMemoryLabels) {\n var labelID = varDivID + '_text_label';\n $(this).append('<div class=\"objectIdLabel\" id=\"' + labelID + '\">id' + getRefID(val) + '</div>');\n $(this).find('div#' + labelID).hover(\n function() {\n myViz.jsPlumbInstance.connect({source: labelID, target: heapObjID,\n scope: 'varValuePointer'});\n },\n function() {\n myViz.jsPlumbInstance.select({source: labelID}).detach();\n });\n }\n else {\n // add a stub so that we can connect it with a connector later.\n // IE needs this div to be NON-EMPTY in order to properly\n // render jsPlumb endpoints, so that's why we add an \"&nbsp;\"!\n $(this).append('<div class=\"stack_pointer\" id=\"' + varDivID + '\">&nbsp;</div>');\n\n assert(!myViz.jsPlumbManager.connectionEndpointIDs.has(varDivID));\n myViz.jsPlumbManager.connectionEndpointIDs.set(varDivID, heapObjID);\n //console.log('STACK->HEAP', varDivID, heapObjID);\n }\n }\n }\n });\n\n\n stackVarTableCells.exit()\n .each(function(d, idx) {\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n stackVarTable.exit()\n .each(function(d, i) {\n $(this).find('.stack_pointer').each(function(i, sp) {\n // detach all stack_pointer connectors for divs that are being removed\n existingConnectionEndpointIDs.remove($(sp).attr('id'));\n });\n\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n stackFrameDiv.exit()\n .each(function(frame, i) {\n $(this).find('.stack_pointer').each(function(i, sp) {\n // detach all stack_pointer connectors for divs that are being removed\n existingConnectionEndpointIDs.remove($(sp).attr('id'));\n });\n\n var my_CSS_id = $(this).attr('id');\n\n //console.log(my_CSS_id, 'EXIT');\n\n // Remove all pointers where either the source or destination end is my_CSS_id\n existingParentPointerConnectionEndpointIDs.forEach(function(k, v) {\n if (k == my_CSS_id || v == my_CSS_id) {\n //console.log('remove EPP', k, v);\n existingParentPointerConnectionEndpointIDs.remove(k);\n }\n });\n\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // Rightward nudge hack to make tree-like structures look more sane\n // without any sophisticated graph rendering code. Thanks to John\n // DeNero for this suggestion in Fall 2012.\n //\n // This hack tries to ensure that all pointers that span different\n // rows point RIGHTWARD (as much as possible), which makes tree-like\n // structures look decent. e.g.,:\n //\n // t = [[['a', 'b'], ['c', 'd']], [[1,2], [3,4]]]\n //\n // Do it here since all of the divs have been rendered by now, but no\n // jsPlumb arrows have been rendered yet.\n if (rightwardNudgeHack) {\n // Basic idea: keep a set of all nudged ROWS for each nudger row, so\n // that when you get nudged, you can, in turn, nudge all of the rows\n // that you've nudged. this algorithm nicely takes care of the fact\n // that there might not be cycles in objects that you've nudged, but\n // there are cycles in entire rows.\n //\n // Key: ID of .heapRow object that did the nudging\n // Value: set of .heapRow ID that were (transitively) nudged by this element\n // (represented as a d3.map)\n var nudger_to_nudged_rows = {};\n\n // VERY IMPORTANT to sort these connector IDs in ascending order,\n // since I think they're rendered left-to-right, top-to-bottom in ID\n // order, so we want to run the nudging algorithm in that same order.\n var srcHeapConnectorIDs = myViz.jsPlumbManager.heapConnectionEndpointIDs.keys();\n srcHeapConnectorIDs.sort();\n\n $.each(srcHeapConnectorIDs, function(i, srcID) {\n var dstID = myViz.jsPlumbManager.heapConnectionEndpointIDs.get(srcID);\n\n var srcAnchorObject = myViz.domRoot.find('#' + srcID);\n var srcHeapObject = srcAnchorObject.closest('.heapObject');\n var dstHeapObject = myViz.domRoot.find('#' + dstID);\n assert(dstHeapObject.attr('class') == 'heapObject');\n\n var srcHeapRow = srcHeapObject.closest('.heapRow');\n var dstHeapRow = dstHeapObject.closest('.heapRow');\n\n var srcRowID = srcHeapRow.attr('id');\n var dstRowID = dstHeapRow.attr('id');\n\n // only consider nudging if srcID and dstID are on different rows\n if (srcRowID != dstRowID) {\n var srcAnchorLeft = srcAnchorObject.offset().left;\n var srcHeapObjectLeft = srcHeapObject.offset().left;\n var dstHeapObjectLeft = dstHeapObject.offset().left;\n\n // if srcAnchorObject is to the RIGHT of dstHeapObject, then nudge\n // dstHeapObject to the right\n if (srcAnchorLeft > dstHeapObjectLeft) {\n // an extra nudge of 32px matches up pretty well with the\n // current CSS padding around .toplevelHeapObject\n var delta = (srcAnchorLeft - dstHeapObjectLeft) + 32;\n\n // set margin rather than padding so that arrows tips still end\n // at the left edge of the element.\n // whoa, set relative CSS using +=, nice!\n dstHeapObject.css('margin-left', '+=' + delta);\n\n //console.log(srcRowID, 'nudged', dstRowID, 'by', delta);\n\n var cur_nudgee_set = nudger_to_nudged_rows[srcRowID];\n if (cur_nudgee_set === undefined) {\n cur_nudgee_set = d3.map();\n nudger_to_nudged_rows[srcRowID] = cur_nudgee_set;\n }\n cur_nudgee_set.set(dstRowID, 1 /* useless value */);\n\n // now if dstRowID itself nudged some other nodes, then nudge\n // all of its nudgees by delta as well\n var dst_nudgee_set = nudger_to_nudged_rows[dstRowID];\n if (dst_nudgee_set) {\n dst_nudgee_set.forEach(function(k, v) {\n // don't nudge if it's yourself, to make cycles look\n // somewhat reasonable (although still not ideal). e.g.,:\n // x = [1,2]\n // y = [3,x]\n // x[1] = y\n if (k != srcRowID) {\n // nudge this entire ROW by delta as well\n myViz.domRoot.find('#' + k).css('margin-left', '+=' + delta);\n\n // then transitively add to entry for srcRowID\n cur_nudgee_set.set(k, 1 /* useless value */);\n }\n });\n }\n }\n }\n });\n }\n\n\n // NB: ugh, I'm not very happy about this hack, but it seems necessary\n // for embedding within sophisticated webpages such as IPython Notebook\n\n // delete all connectors. do this AS LATE AS POSSIBLE so that\n // (presumably) the calls to $(this).empty() earlier in this function\n // will properly garbage collect the connectors\n //\n // WARNING: for environment parent pointers, garbage collection doesn't seem to\n // be working as intended :(\n //\n // I suspect that this is due to the fact that parent pointers are SIBLINGS\n // of stackFrame divs and not children, so when stackFrame divs get destroyed,\n // their associated parent pointers do NOT.)\n myViz.jsPlumbInstance.reset();\n\n\n // use jsPlumb scopes to keep the different kinds of pointers separated\n function renderVarValueConnector(varID, valueID) {\n // special-case handling for C/C++ pointers, just to keep from rocking\n // the boat on my existing (battle-tested) code\n if (myViz.isCppMode()) {\n if (myViz.domRoot.find('#' + valueID).length) {\n myViz.jsPlumbInstance.connect({source: varID, target: valueID, scope: 'varValuePointer'});\n } else {\n // pointer isn't pointing to anything valid; put a poo emoji here\n myViz.domRoot.find('#' + varID).html('\\uD83D\\uDCA9' /* pile of poo emoji */);\n }\n } else {\n myViz.jsPlumbInstance.connect({source: varID, target: valueID, scope: 'varValuePointer'});\n }\n }\n\n\n var totalParentPointersRendered = 0;\n\n function renderParentPointerConnector(srcID, dstID) {\n // SUPER-DUPER-ugly hack since I can't figure out a cleaner solution for now:\n // if either srcID or dstID no longer exists, then SKIP rendering ...\n if ((myViz.domRoot.find('#' + srcID).length == 0) ||\n (myViz.domRoot.find('#' + dstID).length == 0)) {\n return;\n }\n\n //console.log('renderParentPointerConnector:', srcID, dstID);\n\n myViz.jsPlumbInstance.connect({source: srcID, target: dstID,\n anchors: [\"LeftMiddle\", \"LeftMiddle\"],\n\n // 'horizontally offset' the parent pointers up so that they don't look as ugly ...\n //connector: [\"Flowchart\", { stub: 9 + (6 * (totalParentPointersRendered + 1)) }],\n\n // actually let's try a bezier curve ...\n connector: [ \"Bezier\", { curviness: 45 }],\n\n endpoint: [\"Dot\", {radius: 4}],\n //hoverPaintStyle: {lineWidth: 1, strokeStyle: connectorInactiveColor}, // no hover colors\n scope: 'frameParentPointer'});\n totalParentPointersRendered++;\n }\n\n if (!myViz.params.textualMemoryLabels) {\n // re-render existing connectors and then ...\n //\n // NB: in C/C++ mode, to keep things simple, don't try to redraw\n // existingConnectionEndpointIDs since we want to redraw all arrows\n // each and every time.\n if (!myViz.isCppMode()) {\n existingConnectionEndpointIDs.forEach(renderVarValueConnector);\n }\n // add all the NEW connectors that have arisen in this call to renderDataStructures\n myViz.jsPlumbManager.connectionEndpointIDs.forEach(renderVarValueConnector);\n }\n // do the same for environment parent pointers\n if (myViz.params.drawParentPointers) {\n existingParentPointerConnectionEndpointIDs.forEach(renderParentPointerConnector);\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.forEach(renderParentPointerConnector);\n }\n\n /*\n myViz.jsPlumbInstance.select().each(function(c) {\n console.log('CONN:', c.sourceId, c.targetId);\n });\n */\n //console.log('---', myViz.jsPlumbInstance.select().length, '---');\n\n\n function highlight_frame(frameID) {\n myViz.jsPlumbInstance.select().each(function(c) {\n // find the enclosing .stackFrame ...\n var stackFrameDiv = c.source.closest('.stackFrame');\n\n // if this connector starts in the selected stack frame ...\n if (stackFrameDiv.attr('id') == frameID) {\n // then HIGHLIGHT IT!\n c.setPaintStyle({lineWidth:1, strokeStyle: connectorBaseColor});\n c.endpoints[0].setPaintStyle({fillStyle: connectorBaseColor});\n //c.endpoints[1].setVisible(false, true, true); // JUST set right endpoint to be invisible\n\n $(c.canvas).css(\"z-index\", 1000); // ... and move it to the VERY FRONT\n }\n // for heap->heap connectors\n else if (myViz.jsPlumbManager.heapConnectionEndpointIDs.has(c.endpoints[0].elementId)) {\n // NOP since it's already the color and style we set by default\n }\n // TODO: maybe this needs special consideration for C/C++ code? dunno\n else if (stackFrameDiv.length > 0) {\n // else unhighlight it\n // (only if c.source actually belongs to a stackFrameDiv (i.e.,\n // it originated from the stack). for instance, in C there are\n // heap pointers, but we doen't use heapConnectionEndpointIDs)\n c.setPaintStyle({lineWidth:1, strokeStyle: connectorInactiveColor});\n c.endpoints[0].setPaintStyle({fillStyle: connectorInactiveColor});\n //c.endpoints[1].setVisible(false, true, true); // JUST set right endpoint to be invisible\n\n $(c.canvas).css(\"z-index\", 0);\n }\n });\n\n\n // clear everything, then just activate this one ...\n myViz.domRoot.find(\".stackFrame\").removeClass(\"highlightedStackFrame\");\n myViz.domRoot.find('#' + frameID).addClass(\"highlightedStackFrame\");\n }\n\n\n // highlight the top-most non-zombie stack frame or, if not available, globals\n var frame_already_highlighted = false;\n $.each(curEntry.stack_to_render, function(i, e) {\n if (e.is_highlighted) {\n highlight_frame(myViz.owner.generateID('stack' + i));\n frame_already_highlighted = true;\n }\n });\n\n if (!frame_already_highlighted) {\n highlight_frame(myViz.owner.generateID('globals'));\n }\n\n myViz.owner.try_hook(\"end_renderDataStructures\", {myViz:myViz.owner /* tricky! use owner to be safe */});\n }", "title": "" }, { "docid": "ceeb74aec68d20fe9533e12f60012f46", "score": "0.5072443", "text": "renderDataStructures(curInstr: number) {\n var myViz = this; // to prevent confusion of 'this' inside of nested functions\n\n var curEntry = this.curTrace[curInstr];\n var curToplevelLayout = this.curTraceLayouts[curInstr];\n\n myViz.resetJsPlumbManager(); // very important!!!\n\n // for simplicity (but sacrificing some performance), delete all\n // connectors and redraw them from scratch. doing so avoids mysterious\n // jsPlumb connector alignment issues when the visualizer's enclosing\n // div contains, say, a \"position: relative;\" CSS tag\n // (which happens in the IPython Notebook)\n var existingConnectionEndpointIDs = d3.map();\n myViz.jsPlumbInstance.select({scope: 'varValuePointer'}).each(function(c) {\n // This is VERY crude, but to prevent multiple redundant HEAP->HEAP\n // connectors from being drawn with the same source and origin, we need to first\n // DELETE ALL existing HEAP->HEAP connections, and then re-render all of\n // them in each call to this function. The reason why we can't safely\n // hold onto them is because there's no way to guarantee that the\n // *__heap_pointer_src_<src id> IDs are consistent across execution points.\n //\n // thus, only add to existingConnectionEndpointIDs if this is NOT heap->heap\n if (!c.sourceId.match(heapPtrSrcRE)) {\n existingConnectionEndpointIDs.set(c.sourceId, c.targetId);\n }\n });\n\n var existingParentPointerConnectionEndpointIDs = d3.map();\n myViz.jsPlumbInstance.select({scope: 'frameParentPointer'}).each(function(c) {\n existingParentPointerConnectionEndpointIDs.set(c.sourceId, c.targetId);\n });\n\n\n // Heap object rendering phase:\n\n // count everything in curToplevelLayout as already rendered since we will render them\n // in d3 .each() statements\n $.each(curToplevelLayout, function(xxx, row) {\n for (var i = 0; i < row.length; i++) {\n var objID = row[i];\n var heapObjID = myViz.generateHeapObjID(objID, curInstr);\n myViz.jsPlumbManager.renderedHeapObjectIDs.set(heapObjID, 1);\n }\n });\n\n //\n // Modified by Ryo Suzuki\n //\n myViz.domRoot.find('#history')\n .empty()\n // .html(`<div id=\"heapHeader\">${myViz.getRealLabel(\"History\")}</div>`);\n\n\n let data = []\n\n let historyTable = myViz.domRootD3.select('#history')\n .append('div')\n\n let curIndex\n for (let i = 0; i < this.props.beforeEvents.length; i++) {\n let event = this.props.beforeEvents[i]\n if (event.traceIndex === curInstr) {\n curIndex = i\n break\n }\n if (event.traceIndex > curInstr) {\n curIndex = i-0.5\n break\n }\n }\n\n for (let i = 0; i < 2; i++) {\n let key = ['result', 'expected'][i]\n let title = ['Result', 'Expected'][i]\n let events = (i === 0) ? this.props.beforeEvents : this.props.afterEvents\n\n let content = historyTable.append('div')\n .attr('id', key)\n .attr('class', 'history')\n\n content.append('div')\n .attr('class', 'history-title')\n .text(title)\n\n let body = content.append('div')\n .attr('class', 'history-body')\n\n body.append('div')\n .attr('class', 'history-test')\n .html(function(d, i) {\n let html = ''\n html += hljs.highlight('python', myViz.props.test, true).value\n html += '</br>'\n html += '>>> '\n html += hljs.highlight('python', `${myViz.props[key]}`, true).value\n return html\n })\n\n body.append('div')\n .attr('class', 'history-lines-wrapper')\n .append('ul')\n .attr('class', 'history-lines')\n .selectAll('li')\n .data(events)\n .enter()\n .append('li')\n .attr('class', function(d, i) {\n return i === myViz.props.diffIndex ? 'history-line diff-line' : 'history-line'\n })\n .attr('id', function(d, i) {\n return `${key}-history-line-${i}`\n })\n .style('padding-left', function(d, i) {\n return `${10 * d.indent}px`\n })\n .each((function(d, i) {\n $(this).empty()\n if (curInstr > 0 && i === Math.round(curIndex)) {\n $(this).css('border', '3px solid #a6b3b6')\n }\n // if (i === curIndex) {\n // $(this).css('border', '3px solid #a6b3b6')\n // } else if (i+0.5 === curIndex) {\n // $(this).css('border-bottom', '3px solid #a6b3b6')\n // }\n\n let html = ''\n if (i < myViz.props.diffIndex) {\n html += '<span><i class=\"fa fa-check fa-fw\"></i></span>'\n } else {\n html += '<span><i class=\"fa fa-angle-right fa-fw\"></i></span>'\n }\n html += '&nbsp;'\n for (let el of d.html) {\n html += `<span class=\"hljs-${el.className}\">${el.text}</span>`\n }\n\n let showWhy = true\n if (d.type === 'call') showWhy = false\n if (d.updates.length < 2) showWhy = false\n if (myViz.level >= myViz.max) showWhy = false\n /*\n if (showWhy) {\n html += '<span>'\n html += '&nbsp;'\n html += '<i class=\"fa fa-long-arrow-right fa-fw\"></i>'\n html += `<a class=\"why-button\"> why ?</a>`\n html += '</span>'\n }\n */\n $(this).append(html)\n\n }))\n .on('mouseover', function(d, i) {\n $(`#result-history-line-${i}`).addClass('hover')\n $(`#expected-history-line-${i}`).addClass('hover')\n\n $('.current-line').removeClass('current-line')\n $('.highlight-line').removeClass('highlight-line')\n if (i === myViz.props.diffIndex) {\n myViz.owner.cm.addLineClass(d.line-1, '', 'highlight-line')\n } else {\n myViz.owner.cm.addLineClass(d.line-1, '', 'current-line')\n }\n })\n .on('mouseout', function(d, i) {\n $(`#result-history-line-${i}`).removeClass('hover')\n $(`#expected-history-line-${i}`).removeClass('hover')\n\n if (i === myViz.props.diffIndex) {\n myViz.owner.cm.removeLineClass(d.line-1, '', 'highlight-line')\n } else {\n myViz.owner.cm.removeLineClass(d.line-1, '', 'current-line')\n }\n })\n .on('click', function(d, i) {\n // if ($(event.target).hasClass('why-button')) {\n // myViz.updateData(myViz.level+1)\n // }\n let step = myViz.props.beforeEvents[i].traceIndex\n myViz.owner.renderStep(step)\n /*\n let startIndex\n let stopIndex\n if (i === 0) {\n startIndex = 0\n stopIndex = myViz.props.beforeEvents[i].traceIndex\n } else {\n startIndex = myViz.props.beforeEvents[i-1].traceIndex\n stopIndex = myViz.props.beforeEvents[i].traceIndex\n }\n\n let count = startIndex\n const animate = () => {\n let timer = setTimeout(animate, 100)\n myViz.owner.renderStep(count)\n count++\n if (count > stopIndex) {\n clearTimeout(timer)\n }\n }\n animate()\n */\n })\n\n }\n\n historyTable.append('div')\n .attr('id', 'slider')\n .style('width', '20%')\n .style('float', 'left')\n .style('margin-top', '30px')\n .style('margin-left', '10%')\n .append('div')\n .attr('id', 'custom-handle')\n .attr('class', 'ui-slider-handle')\n\n $(\"#slider\").slider({\n range: \"max\",\n min: 0,\n max: myViz.max,\n value: myViz.level,\n slide: function( event, ui ) {\n myViz.updateData(ui.value)\n myViz.owner.updateOutput();\n },\n // create: function() {\n // $('#custom-handle').text($(this).slider('value'));\n // },\n });\n\n\n\n /*\n var historyTable = myViz.domRootD3.select('#history')\n // .selectAll('table.historyRow')\n // .attr('id', function(d, i){ return 'historyRow' + i; }) // add unique ID\n .append('table')\n .attr('id', 'table-history') // add unique ID\n // .selectAll('table.history')\n // .data(history)\n\n historyTable.append('thead')\n .append('tr')\n .selectAll('th')\n .data(['Result', 'Expected'])\n .enter()\n .append('th')\n .text(function(d, i) { return d })\n\n historyTable.append('tbody')\n .selectAll('tr')\n .data(history)\n .enter()\n .append('tr')\n .attr('id', function(d, i){ return 'historyRow' + i; }) // add unique ID\n .attr('class', function(d, i) {\n return d.cur.step === curInstr ? 'historyObj higlightHistoryObj' : 'historyObj'\n })\n .each((function(d, i) {\n $(this).empty()\n let html = ''\n html += '<td>'\n if (d.cur) {\n for (let el of d.cur.html) {\n html += `<span class=\"hljs-${el.className}\">${el.text}</span>`\n }\n }\n html += '</td>'\n html += '<td>'\n if (d.aft) {\n for (let el of d.aft.html) {\n html += `<span class=\"hljs-${el.className}\">${el.text}</span>`\n }\n }\n html += '</td>'\n\n $(this).append(html)\n }))\n */\n\n // use d3 to render the heap by mapping curToplevelLayout into <table class=\"heapRow\">\n // and <td class=\"toplevelHeapObject\"> elements\n\n // for simplicity, CLEAR this entire div every time, which totally\n // gets rid of the incremental benefits of using d3 for, say,\n // transitions or efficient updates. but it provides more\n // deterministic and predictable output for other functions. sigh, i'm\n // not really using d3 to the fullest, but oh wells!\n myViz.domRoot.find('#heap')\n .empty()\n .html(`<div id=\"heapHeader\">${myViz.getRealLabel(\"Objects\")}</div>`);\n\n\n var heapRows = myViz.domRootD3.select('#heap')\n .selectAll('table.heapRow')\n .attr('id', function(d, i){ return 'heapRow' + i; }) // add unique ID\n .data(curToplevelLayout, function(objLst) {\n return objLst[0]; // return first element, which is the row ID tag\n });\n\n\n // insert new heap rows\n heapRows.enter().append('table')\n //.each(function(objLst, i) {console.log('NEW ROW:', objLst, i);})\n .attr('id', function(d, i){ return 'heapRow' + i; }) // add unique ID\n .attr('class', 'heapRow');\n\n // delete a heap row\n var hrExit = heapRows.exit();\n hrExit\n .each(function(d, idx) {\n //console.log('DEL ROW:', d, idx);\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // update an existing heap row\n var toplevelHeapObjects = heapRows\n //.each(function(objLst, i) { console.log('UPDATE ROW:', objLst, i); })\n .selectAll('td.toplevelHeapObject')\n .data(function(d, i) {return d.slice(1, d.length);}, /* map over each row, skipping row ID tag */\n function(objID) {return objID;} /* each object ID is unique for constancy */);\n\n // insert a new toplevelHeapObject\n var tlhEnter = toplevelHeapObjects.enter().append('td')\n .attr('class', 'toplevelHeapObject')\n .attr('id', function(d, i) {return 'toplevel_heap_object_' + d;});\n\n // remember that the enter selection is added to the update\n // selection so that we can process it later ...\n\n // update a toplevelHeapObject\n toplevelHeapObjects\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .each(function(objID, i) {\n //console.log('NEW/UPDATE ELT', objID);\n\n // TODO: add a smoother transition in the future\n // Right now, just delete the old element and render a new one in its place\n $(this).empty();\n\n if (myViz.isCppMode()) {\n // TODO: why might this be undefined?!? because the object\n // disappeared from the heap all of a sudden?!?\n if (curEntry.heap[objID] !== undefined) {\n myViz.renderCompoundObject(objID, curInstr, $(this), true);\n }\n } else {\n myViz.renderCompoundObject(objID, curInstr, $(this), true);\n }\n });\n\n // delete a toplevelHeapObject\n var tlhExit = toplevelHeapObjects.exit();\n tlhExit\n .each(function(d, idx) {\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // Render globals and then stack frames using d3:\n\n\n // TODO: this sometimes seems buggy on Safari, so nix it for now:\n function highlightAliasedConnectors(d, i) {\n // if this row contains a stack pointer, then highlight its arrow and\n // ALL aliases that also point to the same heap object\n var stackPtrId = $(this).find('div.stack_pointer').attr('id');\n if (stackPtrId) {\n var foundTargetId = null;\n myViz.jsPlumbInstance.select({source: stackPtrId}).each(function(c) {foundTargetId = c.targetId;});\n\n // use foundTargetId to highlight ALL ALIASES\n myViz.jsPlumbInstance.select().each(function(c) {\n if (c.targetId == foundTargetId) {\n c.setHover(true);\n $(c.canvas).css(\"z-index\", 2000); // ... and move it to the VERY FRONT\n }\n else {\n c.setHover(false);\n }\n });\n }\n }\n\n function unhighlightAllConnectors(d, i) {\n myViz.jsPlumbInstance.select().each(function(c) {\n c.setHover(false);\n });\n }\n\n\n // TODO: coalesce code for rendering globals and stack frames,\n // since there's so much copy-and-paste grossness right now\n\n // render all global variables IN THE ORDER they were created by the program,\n // in order to ensure continuity:\n\n // Derive a list where each element contains varname\n // as long as value is NOT undefined.\n // (Sometimes entries in curEntry.ordered_globals are undefined,\n // so filter those out.)\n var realGlobalsLst = [];\n $.each(curEntry.ordered_globals, function(i, varname) {\n var val = curEntry.globals[varname];\n\n // (use '!==' to do an EXACT match against undefined)\n if (val !== undefined) { // might not be defined at this line, which is OKAY!\n realGlobalsLst.push(varname);\n }\n });\n\n var globalsID = myViz.owner.generateID('globals');\n var globalTblID = myViz.owner.generateID('global_table');\n\n var globalVarTable = myViz.domRootD3.select('#' + globalTblID)\n .selectAll('tr')\n .data(realGlobalsLst,\n function(d) {return d;} // use variable name as key\n );\n\n globalVarTable\n .enter()\n .append('tr')\n .attr('id', function(d, i) {\n return myViz.owner.generateID(varnameToCssID('global__' + d + '_tr')); // make globally unique (within the page)\n })\n .attr('class', function(d, i) {\n // Modified by Ryo Suzuki\n return myViz.focusKeys.includes(d) ? 'variableTr highlightVariableTr' : 'variableTr'\n })\n\n\n\n var globalVarTableCells = globalVarTable\n .selectAll('td.stackFrameVar,td.stackFrameValue')\n .data(function(d, i){return [d, d];}) /* map varname down both columns */\n\n globalVarTableCells.enter()\n .append('td')\n .attr('class', function(d, i) {return (i == 0) ? 'stackFrameVar' : 'stackFrameValue';});\n\n // remember that the enter selection is added to the update\n // selection so that we can process it later ...\n\n // UPDATE\n globalVarTableCells\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .each(function(varname, i) {\n if (i == 0) {\n $(this).html(varname);\n }\n else {\n // always delete and re-render the global var ...\n // NB: trying to cache and compare the old value using,\n // say -- $(this).attr('data-curvalue', valStringRepr) -- leads to\n // a mysterious and killer memory leak that I can't figure out yet\n $(this).empty();\n\n // make sure varname doesn't contain any weird\n // characters that are illegal for CSS ID's ...\n var varDivID = myViz.owner.generateID('global__' + varnameToCssID(varname));\n\n // need to get rid of the old connector in preparation for rendering a new one:\n existingConnectionEndpointIDs.remove(varDivID);\n\n var val = curEntry.globals[varname];\n if (myViz.isPrimitiveType(val)) {\n myViz.renderPrimitiveObject(val, curInstr, $(this));\n }\n else if (val[0] === 'C_STRUCT' || val[0] === 'C_ARRAY' || val[0] === 'C_MULTIDIMENSIONAL_ARRAY') {\n // C structs and arrays can be inlined in frames\n myViz.renderCStructArray(val, curInstr, $(this));\n }\n else {\n var heapObjID = myViz.generateHeapObjID(getRefID(val), curInstr);\n\n if (myViz.params.textualMemoryLabels) {\n var labelID = varDivID + '_text_label';\n $(this).append('<div class=\"objectIdLabel\" id=\"' + labelID + '\">id' + getRefID(val) + '</div>');\n $(this).find('div#' + labelID).hover(\n function() {\n myViz.jsPlumbInstance.connect({source: labelID, target: heapObjID,\n scope: 'varValuePointer'});\n },\n function() {\n myViz.jsPlumbInstance.select({source: labelID}).detach();\n });\n }\n else {\n // add a stub so that we can connect it with a connector later.\n // IE needs this div to be NON-EMPTY in order to properly\n // render jsPlumb endpoints, so that's why we add an \"&nbsp;\"!\n $(this).append('<div class=\"stack_pointer\" id=\"' + varDivID + '\">&nbsp;</div>');\n\n assert(!myViz.jsPlumbManager.connectionEndpointIDs.has(varDivID));\n myViz.jsPlumbManager.connectionEndpointIDs.set(varDivID, heapObjID);\n //console.log('STACK->HEAP', varDivID, heapObjID);\n }\n }\n }\n });\n\n\n\n globalVarTableCells.exit()\n .each(function(d, idx) {\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n globalVarTable.exit()\n .each(function(d, i) {\n // detach all stack_pointer connectors for divs that are being removed\n $(this).find('.stack_pointer').each(function(i, sp) {\n existingConnectionEndpointIDs.remove($(sp).attr('id'));\n });\n\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // for aesthetics, hide globals if there aren't any globals to display\n if (curEntry.ordered_globals.length == 0) {\n this.domRoot.find('#' + globalsID).hide();\n }\n else {\n this.domRoot.find('#' + globalsID).show();\n }\n\n\n // holy cow, the d3 code for stack rendering is ABSOLUTELY NUTS!\n\n var stackDiv = myViz.domRootD3.select('#stack');\n\n // VERY IMPORTANT for selectAll selector to be SUPER specific here!\n var stackFrameDiv = stackDiv.selectAll('div.stackFrame,div.zombieStackFrame')\n .data(curEntry.stack_to_render, function(frame) {\n // VERY VERY VERY IMPORTANT for properly handling closures and nested functions\n // (see the backend code for more details)\n return frame.unique_hash;\n });\n\n var sfdEnter = stackFrameDiv.enter()\n .append('div')\n .attr('class', function(d, i) {return d.is_zombie ? 'zombieStackFrame' : 'stackFrame';})\n .attr('id', function(d, i) {return d.is_zombie ? myViz.owner.generateID(\"zombie_stack\" + i)\n : myViz.owner.generateID(\"stack\" + i);\n })\n // HTML5 custom data attributes\n .attr('data-frame_id', function(frame, i) {return frame.frame_id;})\n .attr('data-parent_frame_id', function(frame, i) {\n return (frame.parent_frame_id_list.length > 0) ? frame.parent_frame_id_list[0] : null;\n })\n .each(function(frame, i) {\n if (!myViz.params.drawParentPointers) {\n return;\n }\n // only run if myViz.params.drawParentPointers is true ...\n\n var my_CSS_id = $(this).attr('id');\n\n //console.log(my_CSS_id, 'ENTER');\n\n // render a parent pointer whose SOURCE node is this frame\n // i.e., connect this frame to p, where this.parent_frame_id == p.frame_id\n // (if this.parent_frame_id is null, then p is the global frame)\n if (frame.parent_frame_id_list.length > 0) {\n var parent_frame_id = frame.parent_frame_id_list[0];\n // tricky turkey!\n // ok this hack just HAPPENS to work by luck ... usually there will only be ONE frame\n // that matches this selector, but sometimes multiple frames match, in which case the\n // FINAL frame wins out (since parentPointerConnectionEndpointIDs is a map where each\n // key can be mapped to only ONE value). it so happens that the final frame winning\n // out looks \"desirable\" for some of the closure test cases that I've tried. but\n // this code is quite brittle :(\n myViz.domRoot.find('div#stack [data-frame_id=' + parent_frame_id + ']').each(function(i, e) {\n var parent_CSS_id = $(this).attr('id');\n //console.log('connect', my_CSS_id, parent_CSS_id);\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.set(my_CSS_id, parent_CSS_id);\n });\n }\n else {\n // render a parent pointer to the global frame\n //console.log('connect', my_CSS_id, globalsID);\n // only do this if there are actually some global variables to display ...\n if (curEntry.ordered_globals.length > 0) {\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.set(my_CSS_id, globalsID);\n }\n }\n\n // tricky turkey: render parent pointers whose TARGET node is this frame.\n // i.e., for all frames f such that f.parent_frame_id == my_frame_id,\n // connect f to this frame.\n // (make sure not to confuse frame IDs with CSS IDs!!!)\n var my_frame_id = frame.frame_id;\n myViz.domRoot.find('div#stack [data-parent_frame_id=' + my_frame_id + ']').each(function(i, e) {\n var child_CSS_id = $(this).attr('id');\n //console.log('connect', child_CSS_id, my_CSS_id);\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.set(child_CSS_id, my_CSS_id);\n });\n });\n\n sfdEnter\n .append('div')\n .attr('class', 'stackFrameHeader')\n .html(function(frame, i) {\n\n // pretty-print lambdas and display other weird characters\n // (might contain '<' or '>' for weird names like <genexpr>)\n var funcName = htmlspecialchars(frame.func_name).replace('&lt;lambda&gt;', '\\u03bb')\n .replace('\\n', '<br/>');\n\n var headerLabel = funcName;\n\n // only display if you're someone's parent (unless showAllFrameLabels)\n if (frame.is_parent || myViz.params.showAllFrameLabels) {\n headerLabel = 'f' + frame.frame_id + ': ' + headerLabel;\n }\n\n // optional (btw, this isn't a CSS id)\n if (frame.parent_frame_id_list.length > 0) {\n var parentFrameID = frame.parent_frame_id_list[0];\n headerLabel = headerLabel + ' [parent=f' + parentFrameID + ']';\n }\n else if (myViz.params.showAllFrameLabels) {\n headerLabel = headerLabel + ' [parent=Global]';\n }\n\n return headerLabel;\n });\n\n sfdEnter\n .append('table')\n .attr('class', 'stackFrameVarTable');\n\n\n var stackVarTable = stackFrameDiv\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .select('table').selectAll('tr')\n .data(function(frame) {\n // each list element contains a reference to the entire frame\n // object as well as the variable name\n // TODO: look into whether we can use d3 parent nodes to avoid\n // this hack ... http://bost.ocks.org/mike/nest/\n return frame.ordered_varnames.map(function(varname) {return {varname:varname, frame:frame};});\n },\n function(d) {\n // TODO: why would d ever be null?!? weird\n if (d) {\n return d.varname; // use variable name as key\n }\n }\n );\n\n stackVarTable\n .enter()\n .append('tr')\n .attr('id', function(d, i) {\n return myViz.owner.generateID(varnameToCssID(d.frame.unique_hash + '__' + d.varname + '_tr')); // make globally unique (within the page)\n })\n .attr('class', function(d, i) {\n // Modified by Ryo Suzuki\n return myViz.focusKeys.includes(d.varname) ? 'variableTr highlightVariableTr' : 'variableTr'\n })\n\n\n var stackVarTableCells = stackVarTable\n .selectAll('td.stackFrameVar,td.stackFrameValue')\n .data(function(d, i) {return [d, d] /* map identical data down both columns */;});\n\n stackVarTableCells.enter()\n .append('td')\n .attr('class', function(d, i) { return (i == 0) ? 'stackFrameVar' : 'stackFrameValue';})\n\n stackVarTableCells\n .order() // VERY IMPORTANT to put in the order corresponding to data elements\n .each(function(d, i) {\n var varname = d.varname;\n var frame = d.frame;\n\n if (i == 0) {\n if (varname == '__return__')\n $(this).html('<span class=\"retval\">Return<br/>value</span>');\n else\n $(this).html(varname);\n }\n else {\n // always delete and re-render the stack var ...\n // NB: trying to cache and compare the old value using,\n // say -- $(this).attr('data-curvalue', valStringRepr) -- leads to\n // a mysterious and killer memory leak that I can't figure out yet\n $(this).empty();\n\n // make sure varname and frame.unique_hash don't contain any weird\n // characters that are illegal for CSS ID's ...\n var varDivID = myViz.owner.generateID(varnameToCssID(frame.unique_hash + '__' + varname));\n\n // need to get rid of the old connector in preparation for rendering a new one:\n existingConnectionEndpointIDs.remove(varDivID);\n\n var val = frame.encoded_locals[varname];\n if (myViz.isPrimitiveType(val)) {\n myViz.renderPrimitiveObject(val, curInstr, $(this));\n }\n else if (val[0] === 'C_STRUCT' || val[0] === 'C_ARRAY' || val[0] === 'C_MULTIDIMENSIONAL_ARRAY') {\n // C structs and arrays can be inlined in frames\n myViz.renderCStructArray(val, curInstr, $(this));\n }\n else {\n var heapObjID = myViz.generateHeapObjID(getRefID(val), curInstr);\n if (myViz.params.textualMemoryLabels) {\n var labelID = varDivID + '_text_label';\n $(this).append('<div class=\"objectIdLabel\" id=\"' + labelID + '\">id' + getRefID(val) + '</div>');\n $(this).find('div#' + labelID).hover(\n function() {\n myViz.jsPlumbInstance.connect({source: labelID, target: heapObjID,\n scope: 'varValuePointer'});\n },\n function() {\n myViz.jsPlumbInstance.select({source: labelID}).detach();\n });\n }\n else {\n // add a stub so that we can connect it with a connector later.\n // IE needs this div to be NON-EMPTY in order to properly\n // render jsPlumb endpoints, so that's why we add an \"&nbsp;\"!\n $(this).append('<div class=\"stack_pointer\" id=\"' + varDivID + '\">&nbsp;</div>');\n\n assert(!myViz.jsPlumbManager.connectionEndpointIDs.has(varDivID));\n myViz.jsPlumbManager.connectionEndpointIDs.set(varDivID, heapObjID);\n //console.log('STACK->HEAP', varDivID, heapObjID);\n }\n }\n }\n });\n\n\n stackVarTableCells.exit()\n .each(function(d, idx) {\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n stackVarTable.exit()\n .each(function(d, i) {\n $(this).find('.stack_pointer').each(function(i, sp) {\n // detach all stack_pointer connectors for divs that are being removed\n existingConnectionEndpointIDs.remove($(sp).attr('id'));\n });\n\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n stackFrameDiv.exit()\n .each(function(frame, i) {\n $(this).find('.stack_pointer').each(function(i, sp) {\n // detach all stack_pointer connectors for divs that are being removed\n existingConnectionEndpointIDs.remove($(sp).attr('id'));\n });\n\n var my_CSS_id = $(this).attr('id');\n\n //console.log(my_CSS_id, 'EXIT');\n\n // Remove all pointers where either the source or destination end is my_CSS_id\n existingParentPointerConnectionEndpointIDs.forEach(function(k, v) {\n if (k == my_CSS_id || v == my_CSS_id) {\n //console.log('remove EPP', k, v);\n existingParentPointerConnectionEndpointIDs.remove(k);\n }\n });\n\n $(this).empty(); // crucial for garbage collecting jsPlumb connectors!\n })\n .remove();\n\n\n // Rightward nudge hack to make tree-like structures look more sane\n // without any sophisticated graph rendering code. Thanks to John\n // DeNero for this suggestion in Fall 2012.\n //\n // This hack tries to ensure that all pointers that span different\n // rows point RIGHTWARD (as much as possible), which makes tree-like\n // structures look decent. e.g.,:\n //\n // t = [[['a', 'b'], ['c', 'd']], [[1,2], [3,4]]]\n //\n // Do it here since all of the divs have been rendered by now, but no\n // jsPlumb arrows have been rendered yet.\n if (rightwardNudgeHack) {\n // Basic idea: keep a set of all nudged ROWS for each nudger row, so\n // that when you get nudged, you can, in turn, nudge all of the rows\n // that you've nudged. this algorithm nicely takes care of the fact\n // that there might not be cycles in objects that you've nudged, but\n // there are cycles in entire rows.\n //\n // Key: ID of .heapRow object that did the nudging\n // Value: set of .heapRow ID that were (transitively) nudged by this element\n // (represented as a d3.map)\n var nudger_to_nudged_rows = {};\n\n // VERY IMPORTANT to sort these connector IDs in ascending order,\n // since I think they're rendered left-to-right, top-to-bottom in ID\n // order, so we want to run the nudging algorithm in that same order.\n var srcHeapConnectorIDs = myViz.jsPlumbManager.heapConnectionEndpointIDs.keys();\n srcHeapConnectorIDs.sort();\n\n $.each(srcHeapConnectorIDs, function(i, srcID) {\n var dstID = myViz.jsPlumbManager.heapConnectionEndpointIDs.get(srcID);\n\n var srcAnchorObject = myViz.domRoot.find('#' + srcID);\n var srcHeapObject = srcAnchorObject.closest('.heapObject');\n var dstHeapObject = myViz.domRoot.find('#' + dstID);\n assert(dstHeapObject.attr('class') == 'heapObject');\n\n var srcHeapRow = srcHeapObject.closest('.heapRow');\n var dstHeapRow = dstHeapObject.closest('.heapRow');\n\n var srcRowID = srcHeapRow.attr('id');\n var dstRowID = dstHeapRow.attr('id');\n\n // only consider nudging if srcID and dstID are on different rows\n if (srcRowID != dstRowID) {\n var srcAnchorLeft = srcAnchorObject.offset().left;\n var srcHeapObjectLeft = srcHeapObject.offset().left;\n var dstHeapObjectLeft = dstHeapObject.offset().left;\n\n // if srcAnchorObject is to the RIGHT of dstHeapObject, then nudge\n // dstHeapObject to the right\n if (srcAnchorLeft > dstHeapObjectLeft) {\n // an extra nudge of 32px matches up pretty well with the\n // current CSS padding around .toplevelHeapObject\n var delta = (srcAnchorLeft - dstHeapObjectLeft) + 32;\n\n // set margin rather than padding so that arrows tips still end\n // at the left edge of the element.\n // whoa, set relative CSS using +=, nice!\n dstHeapObject.css('margin-left', '+=' + delta);\n\n //console.log(srcRowID, 'nudged', dstRowID, 'by', delta);\n\n var cur_nudgee_set = nudger_to_nudged_rows[srcRowID];\n if (cur_nudgee_set === undefined) {\n cur_nudgee_set = d3.map();\n nudger_to_nudged_rows[srcRowID] = cur_nudgee_set;\n }\n cur_nudgee_set.set(dstRowID, 1 /* useless value */);\n\n // now if dstRowID itself nudged some other nodes, then nudge\n // all of its nudgees by delta as well\n var dst_nudgee_set = nudger_to_nudged_rows[dstRowID];\n if (dst_nudgee_set) {\n dst_nudgee_set.forEach(function(k, v) {\n // don't nudge if it's yourself, to make cycles look\n // somewhat reasonable (although still not ideal). e.g.,:\n // x = [1,2]\n // y = [3,x]\n // x[1] = y\n if (k != srcRowID) {\n // nudge this entire ROW by delta as well\n myViz.domRoot.find('#' + k).css('margin-left', '+=' + delta);\n\n // then transitively add to entry for srcRowID\n cur_nudgee_set.set(k, 1 /* useless value */);\n }\n });\n }\n }\n }\n });\n }\n\n\n // NB: ugh, I'm not very happy about this hack, but it seems necessary\n // for embedding within sophisticated webpages such as IPython Notebook\n\n // delete all connectors. do this AS LATE AS POSSIBLE so that\n // (presumably) the calls to $(this).empty() earlier in this function\n // will properly garbage collect the connectors\n //\n // WARNING: for environment parent pointers, garbage collection doesn't seem to\n // be working as intended :(\n //\n // I suspect that this is due to the fact that parent pointers are SIBLINGS\n // of stackFrame divs and not children, so when stackFrame divs get destroyed,\n // their associated parent pointers do NOT.)\n myViz.jsPlumbInstance.reset();\n\n\n // use jsPlumb scopes to keep the different kinds of pointers separated\n function renderVarValueConnector(varID, valueID) {\n // special-case handling for C/C++ pointers, just to keep from rocking\n // the boat on my existing (battle-tested) code\n if (myViz.isCppMode()) {\n if (myViz.domRoot.find('#' + valueID).length) {\n myViz.jsPlumbInstance.connect({source: varID, target: valueID, scope: 'varValuePointer'});\n } else {\n // pointer isn't pointing to anything valid; put a poo emoji here\n myViz.domRoot.find('#' + varID).html('\\uD83D\\uDCA9' /* pile of poo emoji */);\n }\n } else {\n myViz.jsPlumbInstance.connect({source: varID, target: valueID, scope: 'varValuePointer'});\n }\n }\n\n\n var totalParentPointersRendered = 0;\n\n function renderParentPointerConnector(srcID, dstID) {\n // SUPER-DUPER-ugly hack since I can't figure out a cleaner solution for now:\n // if either srcID or dstID no longer exists, then SKIP rendering ...\n if ((myViz.domRoot.find('#' + srcID).length == 0) ||\n (myViz.domRoot.find('#' + dstID).length == 0)) {\n return;\n }\n\n //console.log('renderParentPointerConnector:', srcID, dstID);\n\n myViz.jsPlumbInstance.connect({source: srcID, target: dstID,\n anchors: [\"LeftMiddle\", \"LeftMiddle\"],\n\n // 'horizontally offset' the parent pointers up so that they don't look as ugly ...\n //connector: [\"Flowchart\", { stub: 9 + (6 * (totalParentPointersRendered + 1)) }],\n\n // actually let's try a bezier curve ...\n connector: [ \"Bezier\", { curviness: 45 }],\n\n endpoint: [\"Dot\", {radius: 4}],\n //hoverPaintStyle: {lineWidth: 1, strokeStyle: connectorInactiveColor}, // no hover colors\n scope: 'frameParentPointer'});\n totalParentPointersRendered++;\n }\n\n if (!myViz.params.textualMemoryLabels) {\n // re-render existing connectors and then ...\n //\n // NB: in C/C++ mode, to keep things simple, don't try to redraw\n // existingConnectionEndpointIDs since we want to redraw all arrows\n // each and every time.\n if (!myViz.isCppMode()) {\n existingConnectionEndpointIDs.forEach(renderVarValueConnector);\n }\n // add all the NEW connectors that have arisen in this call to renderDataStructures\n myViz.jsPlumbManager.connectionEndpointIDs.forEach(renderVarValueConnector);\n }\n // do the same for environment parent pointers\n if (myViz.params.drawParentPointers) {\n existingParentPointerConnectionEndpointIDs.forEach(renderParentPointerConnector);\n myViz.jsPlumbManager.parentPointerConnectionEndpointIDs.forEach(renderParentPointerConnector);\n }\n\n /*\n myViz.jsPlumbInstance.select().each(function(c) {\n console.log('CONN:', c.sourceId, c.targetId);\n });\n */\n //console.log('---', myViz.jsPlumbInstance.select().length, '---');\n\n\n function highlight_frame(frameID) {\n myViz.jsPlumbInstance.select().each(function(c) {\n // find the enclosing .stackFrame ...\n var stackFrameDiv = c.source.closest('.stackFrame');\n\n // if this connector starts in the selected stack frame ...\n if (stackFrameDiv.attr('id') == frameID) {\n // then HIGHLIGHT IT!\n c.setPaintStyle({lineWidth:1, strokeStyle: connectorBaseColor});\n c.endpoints[0].setPaintStyle({fillStyle: connectorBaseColor});\n //c.endpoints[1].setVisible(false, true, true); // JUST set right endpoint to be invisible\n\n $(c.canvas).css(\"z-index\", 1000); // ... and move it to the VERY FRONT\n }\n // for heap->heap connectors\n else if (myViz.jsPlumbManager.heapConnectionEndpointIDs.has(c.endpoints[0].elementId)) {\n // NOP since it's already the color and style we set by default\n }\n // TODO: maybe this needs special consideration for C/C++ code? dunno\n else if (stackFrameDiv.length > 0) {\n // else unhighlight it\n // (only if c.source actually belongs to a stackFrameDiv (i.e.,\n // it originated from the stack). for instance, in C there are\n // heap pointers, but we doen't use heapConnectionEndpointIDs)\n c.setPaintStyle({lineWidth:1, strokeStyle: connectorInactiveColor});\n c.endpoints[0].setPaintStyle({fillStyle: connectorInactiveColor});\n //c.endpoints[1].setVisible(false, true, true); // JUST set right endpoint to be invisible\n\n $(c.canvas).css(\"z-index\", 0);\n }\n });\n\n\n // clear everything, then just activate this one ...\n myViz.domRoot.find(\".stackFrame\").removeClass(\"highlightedStackFrame\");\n myViz.domRoot.find('#' + frameID).addClass(\"highlightedStackFrame\");\n }\n\n\n // highlight the top-most non-zombie stack frame or, if not available, globals\n var frame_already_highlighted = false;\n $.each(curEntry.stack_to_render, function(i, e) {\n if (e.is_highlighted) {\n highlight_frame(myViz.owner.generateID('stack' + i));\n frame_already_highlighted = true;\n }\n });\n\n if (!frame_already_highlighted) {\n highlight_frame(myViz.owner.generateID('globals'));\n }\n\n myViz.owner.try_hook(\"end_renderDataStructures\", {myViz:myViz.owner /* tricky! use owner to be safe */});\n }", "title": "" }, { "docid": "8494034ecb3cfe103476feba62232cb5", "score": "0.50715303", "text": "function render(){\n var {s, x0patch, y0patch, colors, ctx} = drawInfo\n var {viewportSize} = sandboxThis\n setCellDim(s)\n\n var arc = d3.arc()\n .outerRadius(sd/2)\n .innerRadius(sd/2 - 2)\n .context(ctx)\n\n var pie = d3.pie()\n .sort(null)\n .value(d => d)\n\n ctx.clearRect(0, 0, viewportSize.x, viewportSize.y)\n\n curByCell.forEach(cell =>{\n var cx = s * (cell.ci - x0patch)\n var cy = s * (cell.cj - y0patch)\n\n ctx.save()\n ctx.translate(cx, cy)\n\n pie(cell.meanVals).forEach(function(d, i) {\n ctx.beginPath()\n arc(d)\n ctx.fillStyle = colors[i]\n ctx.fill()\n })\n\n ctx.restore()\n })\n }", "title": "" }, { "docid": "15393c8ca14d48e60d519c5814170afe", "score": "0.50594395", "text": "display() {\n push()\n rectMode(CORNERS)\n noStroke();\n fill(this.fill.r, this.fill.g, this.fill.b);\n rect(this.bCornerX, this.bCornerY, this.uCornerX, this.uCornerY)\n pop()\n }", "title": "" } ]
c8b9fd965c3a8791028ae94903ad27e9
display the languages in their drop down lists
[ { "docid": "1e99167de6a1270b383d0259970f52d9", "score": "0.7547028", "text": "function displayLanguages() {\r\n\t\tvar srclist = document.getElementById(\"srclang\");\r\n\t\tvar destlist = document.getElementById(\"destlang\");\r\n\t\t\r\n\t\tsrclist.innerHTML = destlist.innerHTML = \"\";\r\n\r\n\t\tfor (i = 0; i < langsList.length; i++) {\r\n\t\t\tif(langsList[i].code.indexOf(\"-\") === -1) {\r\n\t\t\t\tvar o = document.createElement(\"option\");\r\n\t\t\t\to.text = langsList[i].code + \" - \" + langsList[i].name;\r\n\t\t\t\to.value = langsList[i].code;\r\n\r\n\t\t\t\tif(langsList[i].code === \"en\") {\r\n\t\t\t\t\to.selected = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsrclist.appendChild(o);\r\n\r\n\t\t\t\tvar o = document.createElement(\"option\");\r\n\t\t\t\to.text = langsList[i].code + \" - \" + langsList[i].name;\r\n\t\t\t\to.value = langsList[i].code;\r\n\r\n\t\t\t\tif(langsList[i].code === \"fr\") {\r\n\t\t\t\t\to.selected = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdestlist.appendChild(o);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "7051ffa7504a3bcd6149a87217aca7e5", "score": "0.74301213", "text": "function addLanguagesToDropDown() {\n for (const lang in languages) {\n const opt = document.createElement('option');\n opt.text = languages[lang];\n opt.value = lang;\n domData.cmbLanguages.add(opt);\n }\n}", "title": "" }, { "docid": "ed00d475037b316703303656783db114", "score": "0.7392137", "text": "function loadGUILanguages(item){\n db.each(\"getGUILanguages\", \"\", function (row,err) {\n $(item).append($(\"<option></option>\")\n .attr(\"value\",row.language_short)\n .text(row.language_name));\n });\n }", "title": "" }, { "docid": "d97018c20d127925239ba896d3332095", "score": "0.7388305", "text": "function loadLanguages(item){\n db.each(\"getLanguages\", \"\", function (row,err) {\n $(item).append($(\"<option></option>\")\n .attr(\"value\",row.language_id)\n .text(row.language_name));\n });\n }", "title": "" }, { "docid": "5df1d73747ad3be8615fa2496e8c6c2e", "score": "0.7331592", "text": "function getLang(){\n\t\tvar request = gapi.client.youtube.i18nLanguages.list({\n\t \t\thl: 'en_US',\n\t part: 'snippet'\n\t });\n\t\trequest.execute(function(response) {\n\t \tconsole.log(response);\n\t \tif(response.items.length){\n\t \t\tfor (var j = 0; j <= response.items.length-1; j++) {\n\t \t\t\t$(\"#selectlanguage, #detectlanguage\").append(\n\t '<option value=\"' +\n\t response.items[j].snippet.hl +\n\t '\">' +\n\t response.items[j].snippet.name +\n\t \"</option>\"\n\t );\n\t \t\t}\n\t \t}\n\t });\n\t}", "title": "" }, { "docid": "a6434ac5b264c1b8abd83ff8c9bde013", "score": "0.7273133", "text": "function showLanguages(languages) {\n const languageList = languages.split(\";\");\n for (const language of languageList) {\n const languageElement = document.createElement(\"li\");\n languageElement.textContent = language;\n languageElements.appendChild(languageElement);\n }\n }", "title": "" }, { "docid": "9c376031090fac013eb333968e298dcd", "score": "0.7265096", "text": "async function languageDropdownOptions() {\n\n\n let data = await storage.getUserWords();\n\n \n\n function languageLabel(key) {\n return browserLangMappingUnique[key];\n }\n\n let langs = Object.keys(data);\n // //options for dropdown of saved words languages\n let langOptions = langs.map((l) => {\n return { value: l, label: languageLabel(l) };\n });\n //options for dropdown of all languages\n let allLangOptions = Object.entries(browserLangMappingUnique)\n .map(([key, value]) => {\n return { value: key, label: value };\n })\n .sort((a, b) => (a.label < b.label ? -1 : 1));\n\n\n // Puts currently used languages at top of dropdown list for convenience\n let friendlyLangOptions = [\n { type: 'group', name: 'Your languages', items: langOptions },\n { type: 'group', name: 'All languages', items: allLangOptions },\n ];\n\n return { friendlyLangOptions, allLangOptions, langOptions };\n}", "title": "" }, { "docid": "963b35a81b1f6f31243684c11d36e51b", "score": "0.7231186", "text": "static htmlifyAllAsOptions(){\n return Languages.all.map(lang => `<option value=\"${lang.id}\">${lang.name}</option>`).join('')\n }", "title": "" }, { "docid": "29e33945e7a4c6acfd055e78248a7fdc", "score": "0.7037155", "text": "function appendLanguages(lData){\r\n let toSelector = document.getElementById(\"toLanguages\");\r\n lData.forEach((el) => {\r\n let opt = document.createElement('option');\r\n opt.value = el.code;\r\n opt.textContent = el.name;\r\n toSelector.append(opt);\r\n })\r\n}", "title": "" }, { "docid": "f6a3757b5a5d4fbbe71a509718d2051d", "score": "0.69570875", "text": "function LoadZluLanguages()\r\n {\r\n $.ajax({\r\n \r\n url:\"LanguagesResponse.php\",\r\n method:\"POST\",\r\n success:function(data){\r\n\r\n var jsn = $.parseJSON(data); \r\n for(i=0;i<jsn.t.length;i++)\r\n { \r\n \r\n var LanguageName = jsn.t[i].LanguageName;\r\n $('#phy_lang').append($('<option>', {text:LanguageName}));\r\n }\r\n \r\n }\r\n });\r\n }", "title": "" }, { "docid": "04d6f74a8d6a099f4ba0db1ddbec21cf", "score": "0.68429554", "text": "function generate_lang_selects() {\n var l = '',\n select_langs = {}, // Google Translate API available languages\n trans_msos = msos.config.i18n.select_trans_msos, // You can have more, but Google won't help\n available = jQuery.map(\n msos.translate.available,\n function(n, i) {\n n = n.toLowerCase();\n n = n.replace(/-/g, \"_\");\n return n;\n }\n );\n\n msos.console.debug(temp_mtp + ' - generate_lang_selects -> start.');\n \n // Get our language selection options\n for (l in trans_msos) {\n if (_.indexOf(available, l) > 0) {\n select_langs[l] = trans_msos[l];\n }\n }\n\n msos.common.gen_select_menu(jQuery('#src'), select_langs, msos.default_locale);\n msos.common.gen_select_menu(jQuery('#dst'), select_langs, msos.default_translate);\n\n msos.console.debug(temp_mtp + ' - generate_lang_selects -> start.');\n }", "title": "" }, { "docid": "7ed0ab4ee9c6225f2017b93c7aaefd6d", "score": "0.6827973", "text": "createDropdown(languages) {\n\t\t// populate the dropdown\n\t\tlanguages.forEach(function(lang) {\n\t\t\tif (lang.description) {\n\t\t\t\tvar option = document.createElement('option');\n\t\t\t\t\toption.value = lang.code;\n\t\t\t\t\toption.innerHTML = lang.description;\n\t\t\t\tif (this.lang == lang.code) option.selected = 'selected';\n\t\t\t\tthis.select.appendChild(option);\n\t\t\t}\n\t\t}.bind(this));\n\t\t\n\t\t// onchange event\n\t\tthis.select.onchange = function(e) { window.open(`${DASHBOARD_LANGUAGE_URL}${e.target.value}`,'_self') };\n\n\t\t// init select2 lib\n\t\t$('#language_input').select2();\n\t}", "title": "" }, { "docid": "ad4b8f5060b73c67819c1749a3f82750", "score": "0.6823948", "text": "function listLanguages() {\n return languageNames.concat()\n}", "title": "" }, { "docid": "b900a77cb04863903abae1f5a894add5", "score": "0.6779731", "text": "function makeLanguageMenu(data) {\n return `\n <div class=\"fields\" id=\"${data.id}\">\n <select name=\"select\">\n <option value=\"\">Select Language...</option>\n ${optionsList(data)};\n </select>\n </div>`;\n}", "title": "" }, { "docid": "cbcb942144a087f0c70937b3639041ab", "score": "0.67457306", "text": "function fillLanguageSelect() {\n // get and decode the language cookie\n var lng = getLanguageCookie()\n\n // get all the translations and fill the select with them\n getApiData('/translate/').then(function (data) {\n let languages = Object.entries(data)\n let dropdown = document.getElementById(\"language-select\")\n languages.forEach(function (language) {\n option = document.createElement(\"option\")\n option.value = language[0]\n option.innerHTML = language[1][\"fullname\"]\n if (option.value == lng) {\n option.setAttribute('selected', true)\n }\n dropdown.appendChild(option)\n })\n })\n}", "title": "" }, { "docid": "e7a041b8b383abe595660222d9ceec4b", "score": "0.6626633", "text": "function loadSelectorMenu(lang) {\n\n // Finds and clears the selector options\n let selector = document.querySelector(\".selector\")\n for (i = selector.options.length - 1; i >= 0; i--) {\n selector.remove(i)\n }\n\n // For each text with correct language - add text title to selector options\n textObjects.forEach(element => {\n if (element.language == lang) {\n let option = document.createElement(\"option\");\n option.text = element.title\n selector.add(option);\n }\n });\n\n // Loads first text when changing language\n for (let i = 0; i < textObjects.length; i++) {\n if (textObjects[i].title == selector[0].value) loadTextSelected(textObjects[i]);\n }\n }", "title": "" }, { "docid": "dfae04df6be0e085cad95add45091749", "score": "0.6605806", "text": "function addLanguages(languageSelectElement) {\n\t\tif (languageSelectElement == undefined) {\n\t\t\t$(\".languageinput\").html(\"\");\n\t\t} else {\n\t\t\tlanguageSelectElement.html(\"\");\n\t\t}\n\t\t\n\t\tvar corpusSelElem = $(\"#corpus\");\n\t\tvar selectedCorpus = corpusSelElem.val();\n\t\t$.ajax({\n\t\t\turl: serverURL + \"/v1/corpora/\" + selectedCorpus + \"/summary\",\n\t\t\tsuccess: function(result) {\n\t\t\t\tvar corpusAbbreviation = result.name;\n\t\t\t\tvar languages = result.languages[corpusAbbreviation];\n\t\t\t\tfor(var i in languages){\n\t\t\t\t\tvar langOption = $(\"<option></option>\");\n\t\t\t\t\tvar langString = i + \" (\" + languages[i] + \" igts)\";\n\t\t\t\t\tlangOption.html(langString);\n\t\t\t\t\tlangOption.val(i);\n\t\t\t\t\tif (languageSelectElement == undefined) {\n\t\t\t\t\t\t$(\".languageinput\").append(langOption);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlanguageSelectElement.append(langOption);\n\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}", "title": "" }, { "docid": "14be69f8ef77db0a9db3088182f01223", "score": "0.6571025", "text": "function getAllLanguages() {\r\n\t\tvar xhr = new XMLHttpRequest(),\r\n\t\t\trequestURL = \"api/lang.php\";\r\n\r\n\t\txhr.open(\"GET\", requestURL, true);\r\n\t\t\r\n\t\txhr.onreadystatechange = function() {\r\n\t\t\tif(xhr.readyState === 4) {\r\n\t\t\t\tvar langs = JSON.parse(xhr.responseText.replace(/\\*/g, \"name\"));\r\n\t\t\t\tlangsList = langs.query.languages;\r\n\t\t\t\tdisplayLanguages();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\txhr.send();\r\n\t}", "title": "" }, { "docid": "b5ddd4d8c377fea7892512702236cee4", "score": "0.6488337", "text": "function setLanguageStrings () {\n\tdocument.getElementById(\"menu_nautical_chart\").innerHTML = localize(\"%nautical_chart\", \"Nautical Chart\");\n\tdocument.getElementById(\"menu_wind\").innerHTML = localize(\"%wind\", \"Wind\");\n\tdocument.getElementById(\"menu_air_pressure\").innerHTML = localize(\"%air_pressure\", \"Air pressure\");\n\tdocument.getElementById(\"menu_air_temperature\").innerHTML = localize(\"%temperature\", \"Temperature\");\n\tdocument.getElementById(\"menu_precipitation\").innerHTML = localize(\"%precipitation\", \"Precipitation\");\n\tdocument.getElementById(\"menu_wave_height\").innerHTML = localize(\"%wave_height\", \"Wave height\");\n\tdocument.getElementById(\"menu_help\").innerHTML = localize(\"%help\", \"Help\");\n}", "title": "" }, { "docid": "d8abe60f43b9b6c35b83ff15e1931711", "score": "0.6473116", "text": "function showLanguagesDialog( selectedLanguages, pathToCommon,isForWrite ) {\r\n show2Select1ReturnDialog('selectLanguageDialog.do'+(isForWrite?\"?forwrite=1\":\"\"), selectedLanguages, pathToCommon);\r\n}", "title": "" }, { "docid": "a37f3df0e9c2703407c26277a0e431a9", "score": "0.64690185", "text": "function show_language()\n{\n var obj_lang_dropdown = document.getElementById(\"lang_dropdown\");\n if(obj_lang_dropdown.style.display == \"none\")\n {\n obj_lang_dropdown.style.display = \"block\";\n }else{\n obj_lang_dropdown.style.display = \"none\";\n }\n}", "title": "" }, { "docid": "47a501570a0554fba71befc7c70689a6", "score": "0.6364206", "text": "function getLanguages() {\r\n $.ajax({\r\n type: \"get\",\r\n url: \"languages\",\r\n dataType: \"json\",\r\n success: function (data) {\r\n // data = $.parseJSON(data);\r\n listItems = '';\r\n voices = data;\r\n $.each(data, function (i, item) {\r\n listItems += \"<option value='\" + item.code + \"'>\" + item.name + \"</option>\";\r\n\r\n });\r\n $(\"#languages\").html(listItems);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "f3832523a365bc4521dd05546941d871", "score": "0.6332079", "text": "languages() {\n\t\treturn this.terms.map(h => h.language);\n\t}", "title": "" }, { "docid": "fa035cd0fcccd0ddc3226e2c265c94d0", "score": "0.630926", "text": "function loadLanguages() {\n\t console.log('Load languages called.');\n\t\t$.getJSON(URLS.LANGUAGES).done(function(data){\n\t\t\tlanguages = data;\n\t\t\tapplyLangTemplate();\n\t\t\tlangChangeBinding();\n\t\t}).fail(function(){\n\t\t\t\tconsole.log('Fetch failed for categories');\n\t\t});\n\t}", "title": "" }, { "docid": "a9e6e537eb2851455049c1e54c215f2d", "score": "0.62985146", "text": "function changeLanguage(ln){\n let selectLang=\"\";\n data.languages.forEach(language => {\n if (language.lang===ln){\n selectLang=language;\n };\n });\n return selectLang;\n}", "title": "" }, { "docid": "61de01a699a1920925a8670195b2afba", "score": "0.6286421", "text": "function getLanguagesList() {\n return languages.map(function (language) {\n return language.code + '\\t\\t' + language.name;\n }).join('\\n');\n}", "title": "" }, { "docid": "5c3d2b005b37ca66d18073f11476eebf", "score": "0.6276061", "text": "function loadVoices (voices){\n voices.forEach(voice =>{\n const {name, lang} = voice\n const option = document.createElement('option')\n option.textContent = `${name} -- ${lang}`\n option.value = name\n select.appendChild(option) \n })\n}", "title": "" }, { "docid": "d87258f11e4287d0a9075080ed6aaf2b", "score": "0.62685025", "text": "function dichngonngucombobox(list, language_id) {\n var ed_list = [];\n for (x in list) {\n if (list[x].language_id === language_id) {\n var item = { option: list[x].option, value: list[x].value }\n ed_list.push(item);\n }\n }\n return ed_list;\n}", "title": "" }, { "docid": "ef4d448dd994f7a9289dfd30222ea7c4", "score": "0.625929", "text": "function listLanguages() {\n return hljs.listLanguages();\n}", "title": "" }, { "docid": "ef4d448dd994f7a9289dfd30222ea7c4", "score": "0.625929", "text": "function listLanguages() {\n return hljs.listLanguages();\n}", "title": "" }, { "docid": "52dd7332a2755a907de92c7cbc7bfe4b", "score": "0.62523216", "text": "function displaySourceLang(source) {\n const languages = {\n az: \"Azerbaijan\",\n sq: \"Albanian\",\n am: \"Amharic\",\n en: \"English\",\n ar: \"Arabic\",\n hy: \"Armenian\",\n af: \"Afrikaans\",\n eu: \"Basque\",\n ba: \"Bashkir\",\n be: \"Belarusian\",\n bn: \"Bengali\",\n my: \"Burmese\",\n bg: \"Bulgarian\",\n bs: \"Bosnian\",\n cy: \"Welsh\",\n hu: \"Hungarian\",\n vi: \"Vietnamese\",\n ht: \"Haitian (Creole)\",\n gl: \"Galician\",\n nl: \"Dutch\",\n mrj: \"Hill Mari\",\n el: \"Greek\",\n ka: \"Georgian\",\n gu: \"Gujarati\",\n da: \"Danish\",\n he: \"Hebrew\",\n yi: \"Yiddish\",\n id: \"Indonesian\",\n ga: \"Irish\",\n it: \"Italian\",\n is: \"Icelandic\",\n es: \"Spanish\",\n kk: \"Kazakh\",\n kn: \"Kannada\",\n ca: \"Catalan\",\n ky: \"Kyrgyz\",\n zh: \"Chinese\",\n ko: \"Korean\",\n xh: \"Xhosa\",\n km: \"Khmer\",\n lo: \"Laotian\",\n la: \"Latin\",\n lv: \"Latvian\",\n lt: \"Lithuanian\",\n lb: \"Luxembourgish\",\n mg: \"Malagasy\",\n ms: \"Malay\",\n ml: \"Malayalam\",\n mt: \"Maltese\",\n mk: \"Macedonian\",\n mi: \"Maori\",\n mr: \"Marathi\",\n mhr: \"Mari\",\n mn: \"Mongolian\",\n de: \"German\",\n ne: \"Nepali\",\n no: \"Norwegian\",\n pa: \"Punjabi\",\n pap: \"Papiamento\",\n fa: \"Persian\",\n pl: \"Polish\",\n pt: \"Portuguese\",\n ro: \"Romanian\",\n ru: \"Russian\",\n ceb: \"Cebuano\",\n sr: \"Serbian\",\n si: \"Sinhala\",\n sk: \"Slovakian\",\n sl: \"Slovenian\",\n sw: \"Swahili\",\n su: \"Sundanese\",\n tg: \"Tajik\",\n th: \"Thai\",\n tl: \"Tagalog\",\n ta: \"Tamil\",\n tt: \"Tatar\",\n te: \"Telugu\",\n tr: \"Turkish\",\n udm: \"Udmurt\",\n uz: \"Uzbek\",\n uk: \"Ukrainian\",\n ur: \"Urdu\",\n fi: \"Finnish\",\n fr: \"French\",\n hi: \"Hindi\",\n hr: \"Croatian\",\n cs: \"Czech\",\n sv: \"Swedish\",\n gd: \"Scottish\",\n et: \"Estonian\",\n eo: \"Esperanto\",\n jv: \"Javanese\",\n ja: \"Japanese\"\n };\n\n $('#js-auto-detect').text(languages[source]);\n}", "title": "" }, { "docid": "a93ccb51c4c7fa7ba2f6ade1065ab585", "score": "0.6252151", "text": "function loadLanguage(lange) {\n document.getElementById(\"lang-header\").innerText = lang[lange][\"lang-name\"];\n document.getElementById(\"main-title\").innerHTML = lang[lange][\"main-title\"];\n}", "title": "" }, { "docid": "56b10b56eb22cad0306c76ed8a994dbe", "score": "0.6247666", "text": "setLanguages(languages) {\n // to be overloaded by subclasses\n }", "title": "" }, { "docid": "ae43c5fd5142426177e7c292ac8d2a4c", "score": "0.6247195", "text": "function getLanguages() {\n var promise = staticLookup.get('Language').then(success);\n\n return promise;\n\n function success(data) {\n languages = data;\n\n languages.sort(function (a, b) {\n return a.name > b.name;\n });\n\n return languages;\n }\n }", "title": "" }, { "docid": "2fb7c63157c09b82e3f0d498a61c3993", "score": "0.6238365", "text": "getLanguages() {\n\t\treturn this.state.languages;\n\t}", "title": "" }, { "docid": "6bb7211c6b206839ea87162a55c9fd09", "score": "0.62269944", "text": "loadDataTypes() {\n // Select the select element\n let dataTypeConfigSelect = document.getElementById('chart-configuration-data-type');\n\n // Iterate through the Object of data-types\n Object.keys(dataTypes).forEach((dataTypeId) => {\n\n // Create the entry for the select list\n let optionElement = document.createElement(\"option\");\n optionElement.setAttribute('value', dataTypeId);\n optionElement.appendChild(document.createTextNode(dataTypes[dataTypeId]['translation']));\n\n // Append the element to the list\n dataTypeConfigSelect.appendChild(optionElement);\n\n });\n }", "title": "" }, { "docid": "a50ab2149340e28bd787eecb592d602e", "score": "0.620417", "text": "async getLanguages() {\n\t\tconst replaceLanguages = game.settings.get(\"polyglot\", \"replaceLanguages\");\n\t\tif (CONFIG[game.system.id.toUpperCase()]?.languages) {\n\t\t\tif (replaceLanguages)\n\t\t\t\tCONFIG[game.system.id.toUpperCase()].languages = {};\n\t\t\tthis.languages = CONFIG[game.system.id.toUpperCase()].languages;\n\t\t}\n\t}", "title": "" }, { "docid": "97b6a1a77e5f8c1516c7a71577d3f6f5", "score": "0.6197109", "text": "function setLanguages(language)\n{\n //Populate the dropdown\n const languages_dropdown = document.getElementById('languages');\n for (let i = 0; i < Object.keys(languages).length; i++)\n {\n const option = Object.keys(languages)[i];\n const element = document.createElement(\"option\");\n element.textContent = option;\n element.value = option;\n languages_dropdown.appendChild(element);\n }\n\n if (language)\n {\n languages_dropdown.value = language; //set the currently selected language\n }\n else //no language currently selected, default to English\n {\n chrome.storage.local.set({'language': Object.keys(languages)[0]});\n }\n\n //When the user changes the language, save this value to Chrome storage\n languages_dropdown.onchange = function () {\n const newSelection = languages_dropdown[languages_dropdown.selectedIndex].text;\n chrome.storage.local.set({'language': newSelection});\n };\n}", "title": "" }, { "docid": "3d019d725bf68e8f06931b3254fc1c65", "score": "0.6175282", "text": "function initLanguageSelector() {\n\t\t\tsetTimeout(function() {\n\t\t\t\t$(\"#header .language-selector .goog-te-menu-value span:first-child\").text(\"Translate\");\n\t\t\t\t$(\"#header .language-selector\").show();\n\t\t\t}, 1000);\n\n\t\t}", "title": "" }, { "docid": "ce70dc0a08bedbfd5d65f04190842b52", "score": "0.6155252", "text": "function init_preferred_epg_languages_popup()\n{\n var $container = $('#preferred-epg-languages-popup .widget-content');\n\n get_available_epg_languages(function(avail) {\n for(var i=0; i < avail.length; i++) {\n var langId = avail[i];\n if(langId !== \"auto\") {\n var langName = get_lang_name(langId);\n var $checkbox = $('<input type=\"checkbox\" class=\"preferred-epg-lang\" id=\"preferred-epg-lang-'+langId+'\" value=\"'+langId+'\" />');\n if(params.preferred_epg_languages.indexOf(langId) != -1) {\n $checkbox.prop(\"checked\", true);\n }\n $container.append($checkbox);\n $container.append('<label for=\"preferred-epg-lang-'+langId+'\" style=\"display: inline-block; margin-bottom: 0; margin-left: 5px;\">'+langName+'</label>');\n $container.append('<br/>');\n }\n }\n });\n}", "title": "" }, { "docid": "151d59a0c5494cc24cabdafbd1568ee0", "score": "0.61461514", "text": "function appendLanguageDropdown() {\n\tvar borderColor = $('.WikiaPageHeader .comments').css('border-top-color');\n\tvar server = wgServer.replace(\"http://\",\"\");\n\tvar html = '<nav style=\"border: 1px solid '+borderColor+';\" class=\"wikia-menu-button secondary combined chooselanguage\"><span class=\"drop\"><img style=\"margin-top: 3px; margin-left: 2px; margin-right: 4px;\" class=\"chevron\" src=\"data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D\"></span><ul style=\"min-width: 42px; margin-top: 1px; border: 1px solid '+borderColor+'; border-top: none; text-align:center;\" class=\"WikiaMenuElement\" style=\"min-width:20px;\"></ul></nav>';\n\tflags = {};\n\tflags['sr'] = '<img class=\"sr-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/2/21/Flag_SR.png\" alt=\"Serbian\">';\n\tflags['ru'] = '<img class=\"ru-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/f/fd/Flag_RU.png\" alt=\"Russian\">';\n\tflags['ro'] = '<img class=\"ro-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/f/f4/Flag_RO.png\" alt=\"Romanian\">';\n\tflags['pt'] = '<img class=\"pt-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/8/82/Flag_PT.png\" alt=\"Portuguese\">';\n\tflags['pl'] = '<img class=\"pl-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/3/31/Flag_PL.png\" alt=\"Polish\">';\n\tflags['nl'] = '<img class=\"nl-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/3/3a/Flag_NL.png\" alt=\"Dutch\">';\n\tflags['it'] = '<img class=\"it-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/a/a1/Flag_IT.png\" alt=\"Italian\">';\n\tflags['gl'] = '<img class=\"gl-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/6/6c/Flag_GL.png\" alt=\"Galician\">';\n\tflags['fr'] = '<img class=\"fr-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/e/e8/Flag_FR.png\" alt=\"French\">';\n\tflags['fi'] = '<img class=\"fi-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/4/42/Flag_FI.png\" alt=\"Finnish\">';\n\tflags['es'] = '<img class=\"es-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/1/1c/Flag_ES.png\" alt=\"Spanish\">';\n\tflags['el'] = '<img class=\"el-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/codigo-lyoko/es/images/2/2c/Flag_EL.png\" alt=\"Greek\">';\n\tflags['de'] = '<img class=\"de-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/1/15/Flag_DE.png\" alt=\"German\">';\n\tflags['ca'] = '<img class=\"ca-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/e/e6/Flag_CA.png\" alt=\"Catalan\">';\n\tflags['en'] = '<img class=\"en-image\" width=\"16\" height=\"11\" src=\"https://images.wikia.nocookie.net/wolfenstein/images/5/5d/Flag_EN.png\" alt=\"English\">';\n\t$('.WikiaPageHeader .comments').after(html);\n \n\tlanguages = {};\n\t$('.WikiaArticleInterlang ul li a').each(function() {\n\t\tvar languageFull = $(this).text();\n\t\tvar href = $(this).attr('href');\n\t\tvar pageNameArray = href.split('/')\n\t\tvar pageName = pageNameArray[pageNameArray.length - 1];\n\t\tswitch (languageFull) {\n\t\t\tcase \"Српски / Srpski\":\n\t\t\t\tlanguages['sr'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Русский\":\n\t\t\t\tlanguages['ru'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Română\":\n\t\t\t\tlanguages['ro'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Português\":\n\t\t\t\tlanguages['pt'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Polski\":\n\t\t\t\tlanguages['pl'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Nederlands\":\n\t\t\t\tlanguages['nl'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Italiano\":\n\t\t\t\tlanguages['it'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Galego\":\n\t\t\t\tlanguages['gl'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Français\":\n\t\t\t\tlanguages['fr'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Suomi\":\n\t\t\t\tlanguages['fi'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Español\":\n\t\t\t\tlanguages['es'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"English\":\n\t\t\t\tlanguages['en'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Ελληνικά\":\n\t\t\t\tlanguages['el'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Deutsch\":\n\t\t\t\tlanguages['de'] = href;\n\t\t\t\tbreak;\n\t\t\tcase \"Català\":\n\t\t\t\tlanguages['ca'] = href;\n\t\t\t\tbreak;\n\t\t}\n\t});\n \n\tvar language = wgContentLanguage;\n\t$.each(flags, function (key, value) {\n\t\tif (key === language) {\n\t\t\t$('.WikiaPageHeader .chooselanguage').prepend(flags[key]);\n\t\t} \n\t\telse {\n\t\t\tif (languages[key]) {\n\t\t\t\t$('.WikiaPageHeader .chooselanguage ul').prepend('<a style=\"display: inline; padding: 0; height: 0; line-height: 0;\" class=\"'+ key +'-link\" href=\"' + languages[key] + '\"><li style=\"border-top: 1px solid '+ borderColor +'; padding-top: 3px; padding-bottom: 3px;\" class=\"' + key + '\">' + flags[key] + '</li></a>');\n\t\t\t}\n\t\t}\n\t});\n \n\t$('.WikiaPageHeader .chooselanguage').on('click', function () {\n\t\tif ($(this).hasClass('active') === false) {\n\t\t\t$(this).addClass('active');\n\t\t} \n\t\telse {\n\t\t\t$(this).removeClass('active');\n\t\t}\n\t});\n \n\t$('.WikiaPageHeader .chooselanguage').on('mouseleave', function () {\n\t\tvar that = this;\n\t\tvar timeOut = setTimeout(function () { $(that).removeClass('active'); }, 500);\n \n\t\t$('.chooselanguage').on('mouseenter', function () {\n\t\t\tclearTimeout(timeOut);\n\t\t});\n\t});\n}", "title": "" }, { "docid": "bc222ff2c1a089a7eac8b355e5496ab4", "score": "0.61411786", "text": "get languages() {\n return this.m_languages;\n }", "title": "" }, { "docid": "bc222ff2c1a089a7eac8b355e5496ab4", "score": "0.61411786", "text": "get languages() {\n return this.m_languages;\n }", "title": "" }, { "docid": "ec6d03bc41fa0d9a095be53e353727c1", "score": "0.6113913", "text": "function langOption(){\r\n language = document.getElementById(\"lang\");\r\n var i = language.selectedIndex;\r\n language = language.options[i].value;\r\n return language;\r\n}", "title": "" }, { "docid": "343e1ab591deadceb6d4612f7b4e0561", "score": "0.6112541", "text": "function setOptions () { \r\n\r\n voices = this.getVoices();\r\n\r\n voices.forEach(voice => {\r\n let option = document.createElement('option');\r\n \r\n option.setAttribute('value', voice.lang);\r\n option.innerText = voice.name;\r\n \r\n selectVoices.appendChild(option)\r\n });\r\n}", "title": "" }, { "docid": "606a9d8fcaa17ce3d2b43acaacc617bc", "score": "0.6101201", "text": "function language(lang){\n switch(lang) {\n case \"es\":\n // Spanish translations\n let esPage = \"Generador de perfiles\";\n let esTitles = [\"Información personal\",\"Redes sociales\",\"Experiencia\",\"Formación\"];\n let esSpans = [\"Nombre\",\"Apellidos\",\"Dirección\",\"Ciudad\",\"Teléfono\",\"Correo electrónico\",\"Biografía\",\"Imagen\",\"LinkedIn\",\"GitHub\",\"Twitter\",\"Facebook\"];\n let esButtons = [\"Color\",\"Generar\",\"Borrar\"];\n // Translate page titles\n document.getElementsByTagName(\"h1\")[0].innerHTML = esPage;\n document.title = esPage;\n // Translate form titles\n for (let i = 0; i < document.getElementsByTagName(\"h4\").length; i++) {\n document.getElementsByTagName(\"h4\")[i].innerHTML = esTitles[i];\n }\n // Translate spans\n for (let i = 0; i < document.getElementsByTagName(\"span\").length; i++) {\n document.getElementsByTagName(\"span\")[i].innerHTML = esSpans[i];\n }\n // Translate buttons\n for (let i = 0; i < document.getElementsByTagName(\"button\").length; i++) {\n document.getElementsByTagName(\"button\")[i].innerHTML = esButtons[i];\n }\n break;\n // English as default language\n }\n\n document.getElementsByTagName(\"input\")[0].value = lang;\n document.getElementById(\"language\").style.display=\"none\";\n}", "title": "" }, { "docid": "e2510a1510ccc1ad1983721d7a569dda", "score": "0.60894555", "text": "function updateLanguages() {\n getLanguagesData(function(data) {\n runQuery(\"update\", \"languages\", data, false, true);\n });\n}", "title": "" }, { "docid": "a60fe03a306e22cf84ede174a962d724", "score": "0.60870695", "text": "function getLanguageSupport() { return [\n { code: \"be\", international: \"Belarusian\", local: \"Беларуская мова\" },\n { code: \"bs\", international: \"Bosnian\", local: \"Bosanski jezik\" },\n { code: \"bg\", international: \"Bulgarian\", local: \"Български език\" },\n { code: \"cs\", international: \"Czech\", local: \"Čeština\" },\n { code: \"en\", international: \"English\", local: \"English\" },\n { code: \"fr\", international: \"French\", local: \"Français\" },\n { code: \"de\", international: \"German\", local: \"Deutsch\" },\n { code: \"el\", international: \"Greek\", local: \"Ελληνικά\" },\n { code: \"it\", international: \"Italian\", local: \"Italiano\" },\n { code: \"mk\", international: \"Macedonian\", local: \"Македонски јазик\" },\n { code: \"pl\", international: \"Polish\", local: \"Język polski\" },\n { code: \"pt\", international: \"Portuguese\", local: \"Português\" },\n { code: \"ro\", international: \"Romanian\", local: \"Română\" },\n { code: \"ru\", international: \"Russian\", local: \"Русский\" },\n { code: \"sr\", international: \"Serbian\", local: \"Српски језик\" },\n { code: \"sk\", international: \"Slovak\", local: \"Slovenčina\" },\n { code: \"sl\", international: \"Slovenian\", local: \"Slovenščina\" },\n { code: \"es\", international: \"Spanish\", local: \"Español\" },\n { code: \"sv\", international: \"Swedish\", local: \"Svenska\" },\n { code: \"uk\", international: \"Ukrainian\", local: \"Українська\" },\n]}", "title": "" }, { "docid": "5a0ac7b1ae288d8e9608a80f89fc9d1f", "score": "0.60818976", "text": "function insertAvailableLanguages(el)\n{\n\tif (typeof(el) === \"undefined\" || el === null) { return; }\n\tvar codeBuffer = \"\";\n\t//NOTE: to make it easier, it does not change the hash (but in a deployment it probably should).\n\tfor (var languageCode in LANGUAGES_AVAILABLE)\n\t{\n\t\tcodeBuffer += '<a href=\"#\" id=\"language_' + languageCode + '\" onClick=\"localizeAll(\\'' + languageCode + '\\'); return false;\" class=\"language\">' + LANGUAGES_AVAILABLE[languageCode] + '</a>'; //Faster than using createElement.\n\t}\n\tel.innerHTML = codeBuffer;\n}", "title": "" }, { "docid": "3f04ee91126d78f25901a251f7f82d09", "score": "0.60463655", "text": "function langSelectAction(e) {\n e.target.value == \"swe\" ? loadSelectorMenu(\"swedish\") : loadSelectorMenu(\"english\");\n }", "title": "" }, { "docid": "94b866b8976b60d89653853b44b47aae", "score": "0.6036344", "text": "function choose_country(countries) {\n htmlContentToAppend = `<option selected value=\"0\">Elige un país</option>`;\n for (country of countries) {\n htmlContentToAppend += `<option value=\"` + country.name + `\">` + country.name + `</option>`;\n }\n\n document.getElementById(\"country\").innerHTML = htmlContentToAppend;\n}", "title": "" }, { "docid": "b628c4b82f5cd95cf7944adc98a2a3f5", "score": "0.6035046", "text": "function langset() {}", "title": "" }, { "docid": "70f2f6e0caa2554111f3591f113afb7c", "score": "0.59920377", "text": "function addLanguage() {\r\n\t\t\tvar $iCountInput = 0;\r\n\t\t\tvar $language_select = $('.my_timeline .language_profile.language_driving_content li select');\r\n\t\t\t$language_select.each(function(){\r\n\t\t\t\tif( $(this).val() ) {\r\n\t\t\t\t\t$iCountInput++;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t});\r\n\t\t\tif($iCountInput == $language_select.length)\r\n\t\t\t{\r\n\t\t\t\t//console.log(aListSettingLanguage);\r\n\t\t\t\t$('.my_timeline .language_profile.language_driving_content > ul').append($.Mustache.render('template-candidate-profile-language', \r\n\t\t\t\t\t{ aListSettingLanguage: aListSettingLanguage }\r\n\t\t\t\t));\r\n\t\t\t\t\t\r\n\t\t\t\tvar $added_rating = $('.my_timeline .language_profile.language_driving_content > ul li .added_language_rating');\r\n\t\t\t\t$added_rating.barrating({\r\n\t\t\t\t\tshowValues: false,\r\n\t\t\t\t\tshowSelectedRating: false\r\n\t\t\t\t});\r\n\t\t\t\t$added_rating.removeClass('added_language_rating');\r\n\t\t\t\t\r\n\t\t\t\tvar $added_language_selecter = $('.my_timeline .language_profile.language_driving_content > ul li .added_language_selecter');\r\n\t\t\t\t$added_language_selecter.selecter();\r\n\t\t\t\t$added_language_selecter.removeClass('added_language_selecter');\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "b5e069b1c1a8a050f93329868d991f04", "score": "0.59798855", "text": "function showOptions() {\n\t$('#overlay').fadeIn(300)\n\t$('#lang-select').val(lang)\n}", "title": "" }, { "docid": "b0e48dd3a38c58d59ebb6772906782a9", "score": "0.5974943", "text": "function filter_pages( lang ) {\n\t\t\tif ( \"undefined\" != typeof( pll_page_languages ) ) {\n\t\t\t\t$.each( pll_page_languages, function( lg, pages ) {\n\t\t\t\t\t$.each( pages, function( i ) {\n\t\t\t\t\t\tv = $( '#post_parent option[value=\"' + pll_page_languages[ lg ][ i ] + '\"]' );\n\t\t\t\t\t\tlang == lg ? v.show() : v.hide();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "518d2b7b00230961f4e83713757031af", "score": "0.596037", "text": "function addLanguage(){\n numLanguages = addBox(\"language\",languages,numLanguages);\n}", "title": "" }, { "docid": "ca26c3f4a97cc2136427fb8cbf3a9402", "score": "0.59456944", "text": "function getLanguageNames() {\n return $.getJSON(\"https://api.myjson.com/bins/155kj1\");\n}", "title": "" }, { "docid": "99d64411f7c72b6d401e91d8a223a5cc", "score": "0.5933731", "text": "function getCountries() {\n $.ajax(\"https://www.liferay.com/api/jsonws/country/get-countries/\")\n .done(function (data) {\n $(data).each(function (index, country) {\n $('#countries').append('<option value=\"' + country.a2 + '\"> ' + country.nameCurrentValue + '</option>')\n })\n })\n }", "title": "" }, { "docid": "eed14a348e9d763a3c72fc5cc9ff3912", "score": "0.59221697", "text": "function langLinkSelector(languages) {\n\tvar $list = $('#langList').empty();\n\n\t$.each(languages, function(i, lang) {\n\t\t$(\"<div class='listItemContainer'>\" +\n\t\t\t\"<a class='listItem'>\" +\n\t\t\t\"<span class='text'></span>\" +\n\t\t\t\"</a>\" +\n\t\t\t\"</div>\")\n\t\t.find('.text')\n\t\t\t.text(lang.name)\n\t\t\t.end()\n\t\t.find('a')\n\t\t\t.click(function() {\n\t\t\t\tnavigateToPage(lang.url);\n\t\t\t\thideOverlays();\n\t\t\t})\n\t\t\t.end()\n\t\t.appendTo($list);\n\t});\n}", "title": "" }, { "docid": "c74d2bb32dadf96b05a55652fc0e031a", "score": "0.5919777", "text": "function getLanguage() {\r\n var newsLang = dom.byId(\"langDropdown\").value.toString();\r\n\r\n if (newsLang === \"noneSelected\") {\r\n language = \"\";\r\n } else {\r\n language = \"+sourcelang:\" + newsLang;\r\n }\r\n console.log(language);\r\n return language;\r\n }", "title": "" }, { "docid": "c4db72abc59482b83eb7aeeb89204d69", "score": "0.59177953", "text": "function getLanguageSelect() {\r\n let languageSelector = document.getElementById('language_select');\r\n let selectedIndex = languageSelector.selectedIndex;\r\n let selectedLanguage = languageSelector[selectedIndex].value;\r\n return selectedLanguage;\r\n}", "title": "" }, { "docid": "8c790576ac1d427dc19dc8f87ecc8f4c", "score": "0.59168273", "text": "function setLanguage(domain){\r\n switch (domain){\r\n default: // English\r\n case 'com':\r\n case 'us':\r\n case 'uk':\r\n\tt['Turn filter on'] = 'Turn filter on';\r\n\tt['Turn filter off'] = 'Turn filter off';\r\n\tt['View messages'] = 'View messages';\r\n\tbreak;\r\n case 'ae': // Arabic\r\n\tt['Turn filter on'] = 'فلتر الرسائل لايعمل';\r\n\tt['Turn filter off'] = 'فلتر الرسائل يعمل';\r\n\tt['View messages'] = 'عرض الرسائل';\r\n\tbreak;\r\n case 'de': // German\r\n\tt['Turn filter on'] = 'Filter aktivieren';\r\n\tt['Turn filter off'] = 'Filter deaktivieren';\r\n\tt['View messages'] = 'Zeige nachrichten';\r\n\tbreak;\r\n case 'ro': // Romanian\r\n\tt['Turn filter on'] = 'Activează Filtru';\r\n\tt['Turn filter off'] = 'Dezactivează Filtru';\r\n\tt['View messages'] = 'Citește Mesaje'; \r\n\tbreak;\r\n case 'co': // Hebrew\r\n\tt['Turn filter on'] = 'הפעל מסנן';\r\n\tt['Turn filter off'] = 'כבה מסנן';\r\n\tt['View messages'] = 'בדוק הודעות';\r\n\tbreak;\r\n case 'pt': // Portuguese\r\n case 'br':\r\n\tt['Turn filter on'] = 'Ligar o filtro';\r\n\tt['Turn filter off'] = 'Desligar o filtro';\r\n\tt['View messages'] = 'Ver mensagens';\r\n\tbreak;\r\n case 'rs': // Serbian\r\n\tt['Turn filter on'] = 'Укључи филтер';\r\n\tt['Turn filter off'] = 'Искључи филтер';\r\n\tt['View messages'] = 'Погледај поруке';\r\n\tbreak;\r\n case 'ba': // Bosnian\r\n\tt['Turn filter on'] = 'Uključi filter';\r\n\tt['Turn filter off'] = 'Isključi filter';\r\n\tt['View messages'] = 'Pogledaj poruke';\r\n\tbreak;\r\n }\r\n}", "title": "" }, { "docid": "de5e80b4d16731a5a6230310497b9724", "score": "0.591066", "text": "function switchLanguage() {\r\nswitch (TB3O.language) {\r\ncase \"hu\":\r\n//by geo.\r\nxLang['ALLIANCE'] = 'Klán';\r\nxLang['SIM'] = 'Harc szimulátor';\r\nxLang['AREYOUSURE'] = 'Biztos vagy benne?';\r\nxLang['LOSS'] = 'Veszteség';\r\nxLang['PROFIT'] = 'Nyereség';\r\nxLang['EXTAV'] = 'Fejlesztés elérheto';\r\nxLang['PLAYER'] = 'Játékos';\r\nxLang['VILLAGE'] = 'Falu';\r\nxLang['POPULATION'] = 'Népesség';\r\nxLang['COORDS'] = 'Koordináták';\r\nxLang['MAPTBACTS'] = 'Mozgás:';\r\nxLang['SAVED'] = 'Mentve';\r\nxLang['YOUNEED'] = 'Kell';\r\nxLang['TODAY'] = 'ma';\r\nxLang['TOMORROW'] = 'holnap';\r\nxLang['PAS_MANYANA'] = 'holnapután';\r\nxLang['MARKET'] = 'Piac';\r\nxLang['BARRACKS'] = 'Kaszárnya';\r\nxLang['RALLYPOINT'] = 'Gyülekezotér';\r\nxLang['STABLE'] = 'Istálló';\r\nxLang['WORKSHOP'] = 'Muhely';\r\nxLang['SENDRES'] = 'Nyersanyag küldése';\r\nxLang['COMPRAR'] = 'Vétel';\r\nxLang['SELL'] = 'Eladás';\r\nxLang['SENDIGM'] = 'Üzenet küldése';\r\nxLang['LISTO'] = 'Elérheto';\r\nxLang['ON'] = 'ezen a napon:';\r\nxLang['A_LAS'] = 'ekkor:';\r\nxLang['EFICIENCIA'] = 'Hatékonyság';\r\nxLang['NEVER'] = 'Soha';\r\nxLang['ALDEAS'] = 'Falvak';\r\nxLang['TIEMPO'] = 'Ido';\r\nxLang['OFREZCO'] = 'Felajánlás';\r\nxLang['BUSCO'] = 'Keresés';\r\nxLang['TIPO'] = 'Típus';\r\nxLang['DISPONIBLE'] = 'Csak elfogadhatót';\r\nxLang['CUALQUIERA'] = 'Mind';\r\nxLang['YES'] = 'Igen';\r\nxLang['NO'] = 'Nem';\r\nxLang['LOGIN'] = 'Bejelentkezés';\r\nxLang['MARCADORES'] = 'Könyvjelzok';\r\nxLang['ANYADIR'] = 'Hozzáad';\r\nxLang['ENLACE'] = 'Könyvjelzo URL';\r\nxLang['TEXTO'] = 'Könyvjelzo szövege';\r\nxLang['ELIMINAR'] = 'Törlés';\r\nxLang['MAPA'] = 'Térkép';\r\nxLang['MAXTIME'] = 'Maximum ido';\r\nxLang['ARCHIVE'] = 'Archívum';\r\nxLang['SUMMARY'] = 'Összefoglalás';\r\nxLang['TROPAS'] = 'Egységek';\r\nxLang['CHECKVERSION'] = 'TBeyond frissítése';\r\nxLang['ACTUALIZAR'] = 'Falu információ frissítése';\r\nxLang['VENTAS'] = 'Mentett ajánlatok';\r\nxLang['MAPSCAN'] = 'Térkép vizsgálata';\r\nxLang['BIGICONS'] = 'Bovített ikonok';\r\nxLang['SAVE'] = 'Mentés';\r\nxLang['RPDEFACT'] = 'Gyülekezotér alapmuvelet';\r\nxLang['ATTACKTYPE2'] = 'Támogatás';\r\nxLang['ATTACKTYPE3'] = 'Normál támadás';\r\nxLang['ATTACKTYPE4'] = 'Rablótámadás';\r\nxLang['SHOWCENTERNUMBERS'] = 'Épület szintek mutatása';\r\nxLang['NPCSAVETIME'] = 'Spórolsz: ';\r\nxLang['SHOWCOLORRESLEVELS'] = 'Külterület színjelzése';\r\nxLang['SHOWCOLORBUILDLEVELS'] = 'Épületek színjelzése';\r\nxLang['CNCOLORNEUTRAL'] = 'Szín, ha fejlesztheto<br>(az alaphoz hagyd üresen)';\r\nxLang['CNCOLORMAXLEVEL'] = 'Szín, ha teljesen ki van építve<br>(az alaphoz hagyd üresen)';\r\nxLang['CNCOLORNOUPGRADE'] = 'Szín, ha nem elérheto a fejlesztés<br>(az alaphoz hagyd üresen)';\r\nxLang['CNCOLORNPCUPGRADE'] = 'Szín, ha NPC-vel fejlesztheto<br>(az alaphoz hagyd üresen)';\r\nxLang['TOTALTROOPS'] = 'A faluban képzett egységek';\r\nxLang['SHOWBOOKMARKS'] = 'Könyvjelzok mutatása';\r\nxLang['RACECRTV2'] = 'Nép';\r\nxLang['SERVERVERSION2'] = \"Travian v2.x kiszolgáló\";\r\nxLang['SELECTALLTROOPS'] = \"Minden egység kiválasztása\";\r\nxLang['PARTY'] = \"Ünnepségek\";\r\nxLang['CPPERDAY'] = \"KP/nap\";\r\nxLang['SLOT'] = \"Hely\";\r\nxLang['TOTAL'] = \"Teljes\";\r\nxLang['NOPALACERESIDENCE'] = \"Nincs rezidencia vagy palota a faluban, vagy a faluközpont még nincs megnyitva!\";\r\nxLang['SELECTSCOUT'] = \"Kémek kiválasztása\";\r\nxLang['SELECTFAKE'] = \"Fake kiválasztása\";\r\nxLang['NOSCOUT2FAKE'] = \"Nem használhatsz kémeket fake támadásra!\";\r\nxLang['NOTROOP2FAKE'] = \"Nincsenek egységek fake támadáshoz!\";\r\nxLang['NOTROOP2SCOUT'] = \"Nincsenek egységek kémleléshez!\";\r\nxLang['NOTROOPS'] = \"Nincsenek egységek a faluban!\";\r\nxLang['ALL'] = \"Mind\";\r\nxLang['COLORHELP'] = \"A színeket így add meg:<br>- green vagy red vagy orange stb.<br>- vagy HEX színkóddal #004523<br>- hagyd üresen az alapértelmezett színhez\";\r\nxLang['SHOWORIGREPORT'] = \"Eredeti jelentés (küldéshez)\";\r\nxLang['SHOWCELLTYPEINFO'] = \"Mezo-típus, oázis infó mutatása<br>az egérmutató alatt\";\r\nxLang['WARSIM'] = \"Harcszimulátor link:<br>(bal oldali menü)\";\r\nxLang['WARSIMOPTION1'] = \"Beépített\";\r\nxLang['WARSIMOPTION2'] = \"Külso (kirilloid.ru által)\";\r\nxLang['WSANALYSER'] = \"World Analyser választása\";\r\nxLang['SHOWSTATLINKS'] = \"Linkek a statisztika elemzohöz\";\r\nxLang['NONEWVER'] = \"A legújabb verziót használod\";\r\nxLang['BVER'] = \"Lehet hogy BETA verziód van\";\r\nxLang['NVERAV'] = \"A szkript új verziója elérheto\";\r\nxLang['UPDATESCRIPT'] = \"Frissíted most?\";\r\nxLang['CHECKUPDATE'] = \"Szkript-frissítés keresése. Kérlek várj...\";\r\nxLang['CROPFINDER'] = \"Búzakereso\";\r\nxLang['AVPOPPERVIL'] = \"Falunkénti átlag népesség\";\r\nxLang['AVPOPPERPLAYER'] = \"Játékosonkénti átlag népesség\";\r\nxLang['SHOWRESUPGRADETABLE'] = \"Külterület fejlesztési táblája\";\r\nxLang['SHOWBUPGTABLE'] = \"Épületek fejlesztési táblája\";\r\nxLang['CONSOLELOGLEVEL'] = \"Konzol naplózási szint<br>CSAK PROGRAMOZÓKNAK VAGY HIBAKERESÉSHEZ<br>(Alap = 1)\";\r\nxLang['MARKETPRELOAD'] = \"Piaci ajánlatoknál több oldal elore betöltése<br>A Piac -Vásárlás- oldalán<br>(Alap = 1)\";\r\nxLang['CAPITAL'] = 'Fofalud neve<br><a href=\"spieler.php\">Nézd meg a profilodat a frissítéshez</a>';\r\nxLang['CAPITALXY'] = 'Fofalud koordinátái<br><a href=\"spieler.php\">Nézd meg a profilodat a frissítéshez</a>';\r\nxLang['MAX'] = 'Max';\r\nxLang['TOTALTROOPSTRAINING'] = 'Összes kiképzés alatt álló egység';\r\nxLang['SHOWDISTTIMES'] = 'Távolság/ido mutatása';\r\nxLang['TBSETUPLINK'] = TB3O.shN + ' Beállítások';\r\nxLang['UPDATEALLVILLAGES'] = 'Minden falu frissítése. HASZNÁLD ÓVATOSAN, TILTÁS JÁRHAT ÉRTE!';\r\nxLang['SHOWMENUSECTION3'] = \"További linkek bal oldalon<br>(Traviantoolbox, World Analyser, Travilog, Térkép, stb.)\";\r\nxLang['LARGEMAP'] = 'Nagy térkép';\r\nxLang['USETHEMPR'] = 'Arányos elosztás';\r\nxLang['USETHEMEQ'] = 'Egyenlo elosztás';\r\nxLang['TOWNHALL'] = 'Tanácsháza';\r\nxLang['GAMESERVERTYPE'] = 'Játék kiszolgáló';\r\nxLang['ACCINFO'] = 'Felhasználó információ';\r\nxLang['MENULEFT'] = 'Baloldali menü';\r\nxLang['STATISTICS'] = 'Statisztikák';\r\nxLang['RESOURCEFIELDS'] = 'Külterület';\r\nxLang['VILLAGECENTER'] = 'Faluközpont';\r\nxLang['MAPOPTIONS'] = 'Térkép beállítások';\r\nxLang['COLOROPTIONS'] = 'Szín beállítások';\r\nxLang['DEBUGOPTIONS'] = 'Hibakeresési beállítások';\r\nxLang['SHOWBIGICONMARKET'] = 'Piac';\r\nxLang['SHOWBIGICONMILITARY'] = 'Gyülekezotér/Kaszárnya/Muhely/Istálló';\r\nxLang['SHOWBIGICONMILITARY2'] = \"Tanácsháza/Hosök háza/Páncélkovács/Fegyverkovács\";\r\nxLang['HEROSMANSION'] = \"Hosök háza\";\r\nxLang['BLACKSMITH'] = 'Fegyverkovács';\r\nxLang['ARMOURY'] = 'Páncélkovács';\r\nxLang['NOW'] = 'Most';\r\nxLang['CLOSE'] = 'Bezárás';\r\nxLang['USE'] = 'Használat';\r\nxLang['USETHEM1H'] = 'Egy órai termelés';\r\nxLang['OVERVIEW'] = 'Áttekintés';\r\nxLang['FORUM'] = 'Fórum';\r\nxLang['ATTACKS'] = 'Támadások';\r\nxLang['NEWS'] = 'Hírek';\r\nxLang['ADDCRTPAGE'] = 'Jelenlegi hozzáadása';\r\nxLang['SCRIPTPRESURL'] = 'TBeyond oldal';\r\nxLang['NOOFSCOUTS'] = 'Kémek száma a<br>\"Kémek választása\" funkcióhoz';\r\nxLang['SPACER'] = 'Elválasztó';\r\nxLang['SHOWTROOPINFOTOOLTIPS'] = 'Egység információ mutatása gyorstippben';\r\nxLang['MESREPOPTIONS'] = 'Üzenetek & Jelentések';\r\nxLang['MESREPPRELOAD'] = 'Üzenetek/jelentések elore betöltött oldalainak száma<br>(Default = 1)';\r\nxLang['ATTABLES'] = 'Egység tábla';\r\nxLang['MTWASTED'] = 'Elpazarolva';\r\nxLang['MTEXCEED'] = 'Meghaladja';\r\nxLang['MTCURRENT'] = 'Jelenlegi rakomány';\r\nxLang['ALLIANCEFORUMLINK'] = 'Link külso fórumhoz<br>(belsohöz hagyd üresen)';\r\nxLang['LOCKBOOKMARKS'] = 'Könyvjelzok lezárása<br>(Törlés és mozgatás ikonok eltüntetése)';\r\nxLang['MTCLEARALL'] = 'Mindet törölni';\r\nxLang['UNLOCKBOOKMARKS'] = 'Könyvjelzok feloldása<br>(Törlés és mozgatás ikonok mutatása)';\r\nxLang['CLICKSORT'] = 'Rendezéshez kattints';\r\nxLang['MIN'] = 'Min';\r\nxLang['SAVEGLOBAL'] = 'Minden faluhoz menteni';\r\nxLang['VILLAGELIST'] = 'Falu lista';\r\nxLang['SHOWINOUTICONS'] = \"'dorf1.php' és 'dorf2.php' linkek mutatása\";\r\nxLang['UPDATEPOP'] = 'Népesség frissítése';\r\nxLang['SHOWRPRINFOTOOLTIPS'] = 'Távolság és ido mutatása falvakhoz<br>(Gyülekezotér & Jelentések)';\r\nxLang['EDIT'] = 'Szerkesztés';\r\nxLang['NPCOPTIONS'] = 'NPC segíto beállításai';\r\nxLang['NPCASSISTANT'] = 'NPC segíto számítások és linkek mutatása';\r\nxLang['SHOWMAPTABLE'] = 'Játékosok/falvak/oázisok mutatása a térképnél';\r\nxLang['NEWVILLAGEAV'] = 'Dátum/Ido';\r\nxLang['TIMEUNTIL'] = 'Várakozás';\r\nxLang['SHOWREPDELTABLE'] = '\"Mindet törölni\" mutatása a jelentésekhez';\r\nxLang['SHOWIGMLINKFORME'] = '\"Üzenet küldése\" mutatása magam részére is';\r\nxLang['CENTERMAP'] = 'Térkép középpontjába ezt a falut';\r\nxLang['SHOWCENTERMAPICON'] = 'Mutasd a \"Térkép központosítása\" ikont';\r\nxLang['SENDTROOPS'] = 'Kiküldés';\r\nxLang['SHOWBRSTATDETAILS'] = 'Jelentés statisztika részletezése';\r\nxLang['SHOWBIGICONMISC'] = \"Palota/Rezidencia/Akadémia/Kincstár\";\r\nxLang['PALACE'] = \"Palota\";\r\nxLang['RESIDENCE'] = \"Rezidencia\";\r\nxLang['ACADEMY'] = \"Akadémia\";\r\nxLang['TREASURY'] = \"Kincstár\";\r\nxLang['SHOWBBLINK'] = \"Villogó szintjelzés az éppen fejlesztett épületekhez\";\r\nxLang['SHOWMESOPENLINKS'] = 'Linkek az üzenetek felugró ablakban mutatásához';\r\nbreak;\r\n}\r\n}", "title": "" }, { "docid": "3203bd8ef907e4974b5156f9740bc9ef", "score": "0.5899408", "text": "function populateVoiceList() {\n voices = synth.getVoices();\n\n for(var i = 0; i < voices.length ; i++) {\n var option = document.createElement('option');\n option.textContent = voices[i].name + ' (' + voices[i].lang + ')';\n\n if(voices[i].default) {\n option.textContent += ' -- DEFAULT';\n }\n\n option.setAttribute('data-lang', voices[i].lang);\n option.setAttribute('data-name', voices[i].name);\n voiceSelect.appendChild(option);\n }\n voiceSelect.disabled = false;\n}", "title": "" }, { "docid": "fc3a506351e2a1f123b671c653035802", "score": "0.58836293", "text": "function languageList() {\n const result = { codes: [], names: [] };\n const entries = Object.entries(langs_json_1.translation);\n entries.sort(([k1, v1], [k2, v2]) => {\n return v1.name.localeCompare(v2.name);\n });\n for (const [key, value] of entries) {\n if (value.name === value.nativeName) {\n result.names.push(`${value.name}`);\n }\n else {\n result.names.push(`${value.name} / ${value.nativeName}`);\n }\n result.codes.push(key);\n }\n return result;\n}", "title": "" }, { "docid": "a727ba0979fe010fa29ee4f8503d138d", "score": "0.5882527", "text": "function SelectLanguage(props){\n\tvar languages = ['All', 'Javascript', 'Ruby', 'Java', 'CSS', 'Python']\n\treturn (\n\t\t<ul className=\"languages\">\n\t\t\t{languages.map(function(lang){\n\n\t\t\t\treturn (\n\t\t\t\t\t<li key={lang}\n\t\t\t\t\t\tstyle={lang === props.selectedLanguage ? {color: '#d0021b'}:null }\n\t\t\t\t\t\tonClick={props.onSelect.bind(null, lang)}> \n\t\t\t\t\t\t{lang} \n\t\t\t\t\t</li>\n\t\t\t\t\t)\n\t\t\t})} \n\t\t</ul>\n\t\t)\n}", "title": "" }, { "docid": "ac7815b1556ee8935b4083dbbc614240", "score": "0.587637", "text": "function updateAllWebElements() {\n outputLanguages.forEach(({language}) => {\n // Update web page elements that depend on list of loaded languages.\n // For each select element, update its option items to match loaded languages.\n // Adds all the languages available in the spreadsheet.\n updateSelectList(language);\n });\n}", "title": "" }, { "docid": "7b7ef3526f72a74f8b7156d1d8f66c34", "score": "0.5866096", "text": "function localize() {\n\tdocument.getElementById('saved-text').innerHTML = greetings.saved\n\tdocument.getElementById('save-options').innerHTML = greetings.save\n\tdocument.getElementById('lang-options').innerHTML = greetings.options\n}", "title": "" }, { "docid": "108b22998fac9dd67bc48b6d9d7ca1da", "score": "0.58659226", "text": "async function fetchLanguages() {\n const endpoint = await returnURL();\n const {name, languages} = endpoint.data[0];\n const language = languages.map(language=> {\n return language.name;\n });\n let string = \"The people from \" + name + \" speak \";\n if (languages.length === 1){\n string += languages[0].name + \".\";\n } else {\n string += language.slice(0, language.length-1).join(\", \") + \" and \" + languages[languages.length - 1].name + \".\";\n }\n return string;\n}", "title": "" }, { "docid": "e6c32b8256b681f903ce21a9166b783d", "score": "0.5864887", "text": "languages(input, options) {\n const operationOptions = coreHttp.operationOptionsToRequestOptionsBase(options || {});\n return this.sendOperationRequest({ input, options: operationOptions }, languagesOperationSpec);\n }", "title": "" }, { "docid": "a30be4c9f2df5ee5c5319a7198e7cf4e", "score": "0.58269995", "text": "function displayLayertypes(layertypes){\n\tdiv = document.getElementById('layertypes');\n\thtml='<option selected value=\"\">Choose Data Type</option>';\n\tfor (i in layertypes){\n\t\thtml = html.concat('<option value=\"'+layertypes[i]+'\">'+layertypes[i]+'</option>')\t\n\t}\n\tdiv.innerHTML = html;\n}", "title": "" }, { "docid": "b3f0f3328f32b18f009ec945ba0f779f", "score": "0.58142465", "text": "renderLanguages() {\n const { languages } = this._profile;\n if (!(languages && languages.length)) {\n return null;\n }\n const languageItems = [];\n for (const language of languages) {\n let proficiency = null;\n if (language.proficiency && language.proficiency.length) {\n proficiency = lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <span class=\"language__proficiency\">\n &nbsp;(${language.proficiency})\n </span>\n `;\n }\n languageItems.push(lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <div class=\"token-list__item language\">\n <span class=\"language__title\">${language.displayName}</span>\n ${proficiency}\n </div>\n `);\n }\n return lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <section>\n <div class=\"section__title\">${this.strings.LanguagesSubSectionTitle}</div>\n <div class=\"section__content\">\n <div class=\"token-list\">\n ${languageItems}\n </div>\n </div>\n </section>\n `;\n }", "title": "" }, { "docid": "296b03b69877e1b91bb5f79623bf219d", "score": "0.58107555", "text": "function selectLang()\n{\n\tlang = localStorage[\"language\"];\n\tif (lang!=undefined) { // a lang is defined\n\t\tdocument.getElementById('lang').value = lang;\n\t}\n}", "title": "" }, { "docid": "d2e30aeb25641e2e5ace780d5508a2d2", "score": "0.5810266", "text": "getShowsLanguages() {\n return this.http.get(this.Url + 'languages/shows', this.httpOptions)\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__[\"tap\"])(_ => this.log('fetched languages')), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__[\"catchError\"])(this.handleError('getLanguages', [])));\n }", "title": "" }, { "docid": "06e7c3fb91daee3c37ba925dd8876d8d", "score": "0.580422", "text": "function enhanceLanguageSelector() {\n var $dialog = $(\"[data-component='language-selector-dialog']\");\n dit.components.languageSelector.enhanceDialog($dialog, {\n $controlContainer: $(\"#header-bar .container\")\n });\n\n languageSelectorViewInhibitor(false);\n }", "title": "" }, { "docid": "fd615f45c94b83b41d3669f8aa6eb595", "score": "0.57992494", "text": "function build_language_menu() {\n\n let lang_dropdown_row_div;\n for (let i = 0; i < language_list.length; i++) {\n\n if (i % 2 === 0) {\n lang_dropdown_row_div = document.createElement('div');\n lang_dropdown_row_div.classList.add(\"position-relative\", \"row\", \"lang_row\");\n\n lang_list_ul.appendChild(lang_dropdown_row_div);\n }\n\n let lang_dropdown_col_div = document.createElement('div');\n lang_dropdown_col_div.classList.add(\"position-relative\", \"col-*\", \"lang_col\", \"ml-2\");\n\n\n let lang_div = document.createElement('div');\n let lang_btn = document.createElement('button');\n\n lang_btn.classList.add(\"btn\", \"btn-light\", \"lang_btn\", \"cut-text\", \"mb-2\");\n lang_btn.innerHTML = language_list[i][1];\n\n lang_btn.addEventListener(\"click\", function () {\n translate_text(language_list[i][0].toString(), lang_select_dd_btn);\n });\n\n lang_div.appendChild(lang_btn);\n lang_dropdown_col_div.appendChild(lang_div);\n lang_dropdown_row_div.appendChild(lang_dropdown_col_div);\n\n if (language_list[i][0] === language) {\n lang_select_dd_btn.innerHTML = language_list[i][1];\n }\n }\n}", "title": "" }, { "docid": "0e5130419afbab0ff0cd04c4c3ce599a", "score": "0.57762265", "text": "function getLanguages(){\n var languages = document.getElementById('languageList').getElementsByTagName('input');\n var selectedLanguages = [];\n for (var l = 0; l < languages.length; l++){\n\tvar id = languages[l].id;\n\tvar checked = document.getElementById(id).checked;\n\t// console.log(id + ' ' + checked);\n\tif (checked) {\n\t selectedLanguages.push(id);\n\t}\n } // end for loop\n // console.log('selected languages = ' + selectedLanguages);\n return selectedLanguages;\n}", "title": "" }, { "docid": "c8a4c4f8738c4927264d2f3879baf8e9", "score": "0.57739854", "text": "function loadLanguageLiterals() {\r\n\ttranslate('msgHomeDescription', true);\r\n\ttranslate('msgSelectEnvironment', true);\r\n\ttranslate('msgSelectEnvironmentOption', true);\r\n\ttranslate('msgSelectUser', true);\r\n\ttranslate('msgSelectCredsOption', true);\r\n\ttranslate('msgSlaHome', true);\r\n\ttranslate('msgLoginInject', true);\r\n\ttranslate('msgSettings', true);\r\n\ttranslate('msgMoreOptions', true);\r\n\ttranslate('msgCleanData', true);\r\n\ttranslate('msgChangeLang', true);\r\n\ttranslate('msgHelp', true);\r\n\ttranslate('msgExportSettings', true);\r\n\ttranslate('msgExportToFile', true);\r\n\ttranslate('msgExportToClipboard', true);\r\n\ttranslate('msgImportSettings', true);\r\n\ttranslate('msgImportFromFile', true);\r\n\ttranslate('msgSuggestComms', true);\r\n\ttranslate('msgContact', true);\r\n\ttranslate('msgGithubFork', true);\r\n\ttranslate('msgAbout', true);\r\n\ttranslate('msgAboutContent1', true);\r\n\ttranslate('msgAboutContent2', true);\r\n\ttranslate('msgAboutContent3', true);\r\n\ttranslate('msgAboutContent4', true);\r\n}", "title": "" }, { "docid": "c51b3f75217267861db69c4f127eafd7", "score": "0.5772379", "text": "async function getCountries(){\n\t\tlet url = `https://restcountries.eu/rest/v2/all`;\n\t\tlet response = await fetch(url);\n\t\tlet data = await response.json();\n\t\t\n\t\t// Add countries to drop-down\n\t\tfor (var i = 0; i < data.length; i++){\n\t\t\t$(\"#country\").append(`<option value=${data[i].alpha2Code}> ${data[i].name} </option>`);\n\t\t}\n\t}", "title": "" }, { "docid": "3aa42296a56822590ce16a95c16da7e3", "score": "0.5764961", "text": "getAvailableLanguages() {\n if (!this._availableLanguages) {\n this._availableLanguages = [];\n Object.keys(this._props).forEach(key => {\n this._availableLanguages.push(key);\n });\n }\n return this._availableLanguages;\n }", "title": "" }, { "docid": "119da2c7a90a95362e0129ebc78ef97c", "score": "0.5763411", "text": "function GetReasons() {\n $(\"#Reason option\").remove();\n $.getJSON(\"/List/ListValuesByName?TypeName=计划调整原因\", function (msg) {\n $.each(msg, function (i, n) {\n $(\"#Reason\").append($(\"<option/>\", {\n text: n.Name\n }))\n })\n });\n}", "title": "" }, { "docid": "66a9474e67b56a236f1ae6e6c6a7bb8c", "score": "0.57600725", "text": "function LanguageSelectorPopup()\n{\n\tvar popup = jQuery('#languageSelectorPopup');\n\tif(popup.is(':hidden')) popup.show();\n}", "title": "" }, { "docid": "64fc407aa20d07d43c2d0e8be96a5a88", "score": "0.5752702", "text": "function getConferenceEnums() {\n return TelephonyMediator.getApiModelEnum('telephony.ConferenceLanguageEnum').then((availableLanguages) => {\n // populate language list\n self.availableLanguages = _.map(availableLanguages, languageKey => ({\n value: languageKey,\n label: $translate.instant(`language_${languageKey}_${languageKey !== 'en' ? languageKey.toUpperCase() : 'GB'}`),\n }));\n });\n }", "title": "" }, { "docid": "bff1b2bdc3364d120b2e185b192f91a9", "score": "0.57525104", "text": "function init_translations() {\n\t\t$( '.tr_lang' ).each(function(){\n\t\t\tvar tr_lang = $( this ).attr( 'id' ).substring( 8 );\n\t\t\tvar td = $( this ).parent().parent().siblings( '.pll-edit-column' );\n\n\t\t\t$( this ).autocomplete({\n\t\t\t\tminLength: 0,\n\n\t\t\t\tsource: ajaxurl + '?action=pll_posts_not_translated' +\n\t\t\t\t\t'&post_language=' + $( '.post_lang_choice' ).val() +\n\t\t\t\t\t'&translation_language=' + tr_lang +\n\t\t\t\t\t'&post_type=' + $( '#post_type' ).val() +\n\t\t\t\t\t'&_pll_nonce=' + $( '#_pll_nonce' ).val(),\n\n\t\t\t\tselect: function( event, ui ) {\n\t\t\t\t\t$( '#htr_lang_' + tr_lang ).val( ui.item.id );\n\t\t\t\t\ttd.html( ui.item.link );\n\t\t\t\t},\n\t\t\t});\n\n\t\t\t// When the input box is emptied\n\t\t\t$( this ).blur(function() {\n\t\t\t\tif ( ! $( this ).val() ) {\n\t\t\t\t\t$( '#htr_lang_' + tr_lang ).val( 0 );\n\t\t\t\t\ttd.html( td.siblings( '.hidden' ).children().clone() );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "072b72f9baab84c729bea256aa3e56c6", "score": "0.5741575", "text": "function populateDropdowns() {\n\tbasicTutorials();\n\tbuckyTutorials();\n\tmiscNotes();\n}", "title": "" }, { "docid": "0758a7b7e4f9308f285ceae710dd493f", "score": "0.5730967", "text": "function buildLanguage(replace=false,newLang=null){\n\tvar languageItems = '';\n\tvar currentLanguage = (getCookie('organizrLanguage')) ? getCookie('organizrLanguage') : window.lang.currentLang;\n\t$.each(languageList, function(i,v) {\n\t\tvar active = (v.code == currentLanguage) ? '' : '';\n\t\tlanguageItems += `\n\t\t\t<a onclick=\"window.lang.change('`+v.code+`');buildLanguage(true,'`+v.language+`')\" href=\"javascript:void(0);\" class=\"`+active+`\">\n\t\t\t\t<div class=\"mail-content\"><h5 class=\"m-0\">`+v.language+`</h5><span class=\"mail-desc\" lang=\"en\">`+active+`</span></div>\n\t\t\t</a>\n\t\t`;\n\t});\n\tvar lang = `\n\t\t<li class=\"dropdown\" id=\"languageDropdown\">\n\t\t\t<a class=\"dropdown-toggle waves-effect waves-light\" data-toggle=\"dropdown\" href=\"#\" aria-expanded=\"false\"> <i class=\"fa fa-language\"></i><span></span></a>\n\t\t\t<ul class=\"dropdown-menu mailbox animated bounceInDown\">\n\t\t\t\t<li>\n\t\t\t\t\t<div class=\"drop-title\" lang=\"en\">Choose Language</div>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<div class=\"message-center\" data-simplebar>`+languageItems+`</div>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<!-- /.dropdown-messages -->\n\t\t</li>\n\t`;\n\tif(replace == true){\n\t setLangCookie(newLang);\n\t\t$('#languageDropdown').replaceWith(lang);\n\t\tmessage(\"\",window.lang.translate('Changed Language To')+\": \"+newLang,activeInfo.settings.notifications.position,\"#FFF\",\"success\",\"3500\");\n\t}else if(replace == 'wizard'){\n\t\t$(lang).appendTo('.navbar-right');\n\t}else{\n\t\treturn lang;\n\t}\n}", "title": "" }, { "docid": "e767ad6e2b46356d34c42e1839694f78", "score": "0.572732", "text": "function languageList() {\n const result = { codes: [], names: [] };\n for (const lang of langs_json_1.langs) {\n result.names.push(lang.name);\n result.codes.push(lang.language);\n }\n return result;\n}", "title": "" }, { "docid": "336d45ab709d2c1e2c39089ed7cae6e5", "score": "0.5726187", "text": "function loadLangInfo(langs) {\n for(var i = 0; i < langs.length; i++) {\n var langName = langs[i][LANG_NAME];\n var enrolmentId = langs[i][ENROLMENT_ID];\n languages[enrolmentId] = langName;\n addLangListElement(enrolmentId, langName);\n }\n setLangChange();\n}", "title": "" }, { "docid": "9e4067d2031f6e4e2dc3a77b1cfffb4e", "score": "0.5724768", "text": "function loadCountries(countries) {\n for (country of countries) {\n let option = document.createElement('option')\n option.value = country.alpha2Code;\n option.textContent = country.name\n selectEl.appendChild(option);\n }\n}", "title": "" }, { "docid": "cc11233e8a6a06583aedee2576172122", "score": "0.57241786", "text": "function createDropDown(){\n\t\tvar $form = $(\"div.country-select form\");\n\t\t$form.hide();\n\t\tvar source = $(\".country-options\");\n\t\tsource.removeAttr(\"autocomplete\");\n\t\tvar selected = source.find(\"option:selected\");\n\t\tvar options = $(\"option\", source);\n\t\t$(\".country-select\").append('<dl id=\"target\" class=\"dropdown\"></dl>')\n\t\t$(\"#target\").append('<dt class=\"' + selected.val() + '\"><a href=\"#\"><div class=\"flag-border\"><span class=\"flag\"></span></div><em>' + selected.text() + '</em><span class=\"arrow\"></span></a></dt>')\n\t\t$(\"#target\").append('<dd><ul></ul></dd>')\n\t\toptions.each(function(){\n\t\t\t$(\"#target dd ul\").append('<li class=\"' + $(this).val() + '\"><a href=\"\"><span class=\"flag\"></span><em>' + $(this).text() + '</em></a></li>');\n\t\t});\n\t}", "title": "" }, { "docid": "291f8f75b194f9cb8e34d41ceb8ed195", "score": "0.5722274", "text": "function setUpLocale(language) {\n let text = locale[language].htmlText;\n document.getElementById(\"sr-next\").innerText = text.srNext;\n document.getElementById(\"sr-previous\").innerText = text.srPrevious;\n document.getElementById(\"headingAllergens\").innerText = text.headingAllergens;\n document.getElementById(\"headingSupplements\").innerText = text.headingSupplements;\n document.getElementById(\"headingTags\").innerText = text.headingTags;\n document.getElementById(\"headingPrice\").innerText = text.headingPrice;\n document.getElementById(\"headingCategory\").innerText = text.headingCategory;\n document.getElementById(\"disclaimerText\").innerHTML = text.disclaimerText;\n document.getElementById(\"aboutText\").innerHTML = text.aboutText;\n populateCheckboxes(locale[language].supplements);\n}", "title": "" }, { "docid": "75a8a7bf8d395276f6575772cade40b3", "score": "0.5712408", "text": "function dropdowns () {\n // Set the initial method name (in case it was set by the querystring module)\n setSelectedMethod(form.method.button.val());\n\n // Update each dropdown's label when its value(s) change\n onChange(form.allow.menu, setAllowLabel);\n onChange(form.refs.menu, setRefsLabel);\n onChange(form.validate.menu, setValidateLabel);\n\n // Track option changes\n trackCheckbox(form.allow.json);\n trackCheckbox(form.allow.yaml);\n trackCheckbox(form.allow.text);\n trackCheckbox(form.allow.empty);\n trackCheckbox(form.allow.unknown);\n trackCheckbox(form.refs.external);\n trackCheckbox(form.refs.circular);\n trackCheckbox(form.validate.schema);\n trackCheckbox(form.validate.spec);\n\n // Change the button text whenever a new method is selected\n form.method.menu.find(\"a\").on(\"click\", function (event) {\n form.method.menu.dropdown(\"toggle\");\n event.stopPropagation();\n var methodName = $(this).data(\"value\");\n setSelectedMethod(methodName);\n trackButtonLabel(methodName);\n });\n}", "title": "" }, { "docid": "3d139262b7a42e4bcb2837e008662ea5", "score": "0.5708257", "text": "getCurrentLanguage(val){return this.language[this.currentLocale][val]}", "title": "" }, { "docid": "69f0cc9b055d555d540ac0e38fab5586", "score": "0.57054514", "text": "function populateVoiceList() {\n //if browser cannot suppor speechSynthesis\n if (typeof speechSynthesis === 'undefined') {\n return 'Sorry! It is not support.';\n }\n //console.log(voices);\n voices.forEach(voice => {\n let option = document.createElement('option');\n option.value = voice.name;\n option.innerText = `${voice.name} ${voice.lang}`;\n voiceListEl.appendChild(option);\n })\n}", "title": "" }, { "docid": "11ef101a367dd8c6dbe0d0c4966207cb", "score": "0.5693535", "text": "function disableSourceLanguages(obj) {\n /**\n * Show/Hide editing experience dropdown\n * \n * @TODO Get english language id dynamic\n * from controller.\n */\n\n var motherLang = $(\".motherLang select option:selected\").val();\n\n if (motherLang == 19) {\n $('.motherLangExperience').css('display', 'block');\n $(\".motherLang\").removeClass('col-xs-12').addClass('col-6');\n } else {\n $(\".motherLangExperience select\").val('');\n $('.motherLangExperience').css('display', 'none');\n $(\".motherLang\").removeClass('col-6').addClass('col-xs-12');\n }\n\n // Containing all selected source languages\n var disableList = new Array();\n\n // Get all selected source languages\n $(\".sourceLang select option:selected\").each(function() {\n if ($.inArray($(this).val(), disableList) == -1)\n disableList.push($(this).val());\n });\n // Adding mother language also to not allowed list\n disableList.push(motherLang);\n\n // Disable languages\n $(\".sourceLang select option, .motherLang select option\").each(function() {\n // The selected value of the current select in loop\n var currentVal = $(this).parent().children('option:selected').val();\n\n if (($.inArray($(this).val(), disableList) != -1) && ($(this).val() != '' && $(this).val() != currentVal))\n $(this).attr('disabled', true);\n else\n $(this).attr('disabled', false);\n });\n\n $('#morelangs').find('.state-disabled').removeClass('state-disabled').find('select').prop('disabled', false);\n if(motherLang == 19) {\n $('#morelangs').find('.sourceLang select').each(function () {\n if ($(this).val() == '' && $(this).find(':selected').text() == 'None') {\n $(this).closest('tr').find('.select:not(.sourceLang)').addClass('state-disabled').find('select').prop('disabled', true);\n }\n });\n }\n}", "title": "" }, { "docid": "739f244a6fffd742cfa1f48d6ada73fb", "score": "0.56897354", "text": "renderLanguageSelector() {\n const { languages, setActiveLanguage } = this.props;\n return (\n <ul className=\"selector\">\n {languages.map(lang => (\n <li key={lang.code}>\n <button type=\"button\" onClick={() => setActiveLanguage(lang.code)}>\n {lang.name}\n </button>\n </li>\n ))}\n </ul>\n );\n }", "title": "" }, { "docid": "af1daadc8e54a1c2f9c6990fc1576bfd", "score": "0.568491", "text": "function initBrowserActionDropdowns() {\r\n\tcleanInfoFields();\r\n\tslaUtils.getAllData(function(storedData) {\r\n\t\t_.each(storedData['sema-sla'].environments, function(env) {\r\n\t\t\t$('#environmentValues').append('<option value=\"' + env.envId + '\">' + env.envName + '</option>');\r\n\t\t});\r\n\t});\r\n}", "title": "" }, { "docid": "bf483b3c2f130a095fa8ba4e4c554455", "score": "0.568473", "text": "function getMenuLinksByLang(val) {\n var data = {\n \"lang_id\": val\n };\n addCsrf(data);\n $.ajax({\n type: 'POST',\n url: VrConfig.baseURL + '/AdminController/getMenuLinksByLang',\n data: data,\n success: function (response) {\n $('#parent_links').children('option:not(:first)').remove();\n $(\"#parent_links\").append(response);\n }\n });\n}", "title": "" }, { "docid": "adc4edb3fa69b329c20a3941ec0f4cbf", "score": "0.56842124", "text": "function displayCategory (){\n var category = getCategory(myData);\n var i;\n var text = \"<option value=\\\"\\\"> </option>\";\n for (i = 0; i < (category.length-1); i++) { \n text += \"<option value=\\\"\"+category[i]+\"\\\">\"+category[i]+\"</option>\";\n } \n document.getElementById(\"category\").innerHTML =text;\n}", "title": "" }, { "docid": "ebdad5bdc4ebc31e6a772ec9171884e7", "score": "0.56770647", "text": "function addlang(e) {\n let data = JSON.parse(localStorage.getItem(\"CourseData\"));\n if (e.key == \"Enter\") {\n let arr = [];\n\n let selectValue = document.getElementById(\"selectFilter1\");\n\n data.forEach(function (el) {\n if (selectValue.value == el.lang) {\n console.log(el);\n arr.push(el);\n }\n });\n showData(arr);\n }\n}", "title": "" }, { "docid": "aac40e8fd13a75c7155bfc76c7ffd48b", "score": "0.56763977", "text": "function langtoggle(l){\n\n\tif (l == 'en' ){\n\t\tlocal_lang = lang.en,\n\t\twindow.location.hash = \"#l=en\";\n\t}\n\n\telse if (l == 'fr') {\n\t\tlocal_lang = lang.fr,\n\t\twindow.location.hash = \"#l=fr\";\n\t}\t\n\n\tfor(var key in local_lang) {\n\t\tdocument.getElementById(key).innerHTML = local_lang[key];\n\t}\n}", "title": "" } ]
16cdf7b7edba1d8ed83334115808c579
SAYS EXERCISE7 IS NOT DEFINED REFERENCE ERROR EXERCISE 10. This is question is a modified version of a classic programming question called "Fizz Buzz" Using a conditional, assign a value of: "Fizz" to `answer10` if the value of `num10` is divisible by 3 "Buzz" to `answer10` if the value of `num10` is divisible by 5 "Fizz Buzz" to `answer10` if the value of `num10` is divisible by 15 and if none of these conditions are satisfied, then assign the value of `num10` to `answer10`
[ { "docid": "8c1f19c2bd68f2de109e7f5de478e88f", "score": "0.8529343", "text": "function exercise10(num10) {\n let answer10;\n if (num10%3 === 0 && num10%5 === 0){\n answer10 = \"Fizz Buzz\";\n }\n else if (num10%5 === 0){\n answer10 = \"Buzz\";\n }\n else if (num10%3 === 0){\n answer10 = \"Fizz\";\n }\n else {\n answer10 = num10;\n }\n return answer10;\n }", "title": "" } ]
[ { "docid": "8044c15fe040ddace39ac9fcb5cc9265", "score": "0.7054106", "text": "function fizzBuzz(number) {\n if ((number % 5) == 0 && (number % 3) == 0) {\n return \"FizzBuzz\";\n }else if ((number % 5) == 0) {\n return \"Buzz\";\n }else if ((number % 3) == 0) {\n return \"Fizz\";\n }else{\nreturn number;\n }\n}", "title": "" }, { "docid": "490cb9a574c7494e3a0f77ade726ee97", "score": "0.7017391", "text": "function fizzBuzz(){\r\n if(num % 3 ===0 && num % 5 ===0) console.log('fizzbuzz');\r\n if(num % 3 != 0 && num % 5 !=0) console.log(`$num`);\r\n else if (num % 5) console.log('buzz');\r\n else if (num % 3) console.log('Fizz');\r\n else if (typeof num != 'number') console.log('not a number')\r\n}", "title": "" }, { "docid": "818456f9c4c12e048275358694817bc8", "score": "0.6902524", "text": "function fizzbuzz(num) {\n if (num % 5 === 0 && num % 3 === 0) {\n return 'fizzbuzz';\n } else if (num % 3 === 0) {\n return 'fizz';\n } else if (num % 5 === 0) {\n return 'buzz';\n } else {\n return num;\n }\n}", "title": "" }, { "docid": "36928b289a08fdac654801feafd85d88", "score": "0.6896507", "text": "function fizzbuzz (num) {\n if (num % 3 === 0 && num % 5 === 0) {\n return 'fizzbuzz'\n } else if (num % 3 === 0) {\n return 'fizz'\n } else if (num % 5 === 0) {\n return 'buzz'\n } else\n return num\n}", "title": "" }, { "docid": "3ed27b1b805b82e76699048f2ad165e2", "score": "0.68335426", "text": "function fizzBuzz(number) {\n if (number % 3 === 0 && number % 5 === 0) {\n console.log('FizzBuzz');\n } else if (number % 5 === 0) {\n console.log('Buzz');\n } else if (number % 3 === 0) {\n console.log('Fizz')\n }\n}", "title": "" }, { "docid": "e13c528a269088e3fd7e5dd1d3a18119", "score": "0.6826664", "text": "function fizzbuzz(a){\n if(typeof a === \"number\")\n console.log(\"this is not a number\")\n else if(a%5===1 && a%3===1)\n //= is assignment == is equal === strict equal\n console.log(\"fizzbuzz\")\n else if(a%5===1)\n console.log(\"buzz\")\n else if(a%3===1)\n console.log(\"fizz\")\n else if(a%5!==1 && a%3!==1)\n console.log(\"pe\")\n \n}", "title": "" }, { "docid": "82c368c73457b5306da1810b2e41fa71", "score": "0.67001903", "text": "function fizzbuzz (num) {\n console.log('Solving FizzBuzz Problem'); \n\n for(var i=1; i<=num; i++) {\n if (i%3 === 0 && i%5 === 0) {\n console.log(\"FizzBuzz\");\n } else if (i%3 === 0) {\n console.log(\"Fizz\");\n } else if (i%5 === 0) {\n console.log(\"Buzz\");\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "63e0d8b65f7cd8269943e606bf32ad25", "score": "0.6686074", "text": "function fizzBuzz(numb){\n\n if(numb % 3 == 0 ){\n return(\"Fizz\");\n }\n if( numb % 5 == 0 ){\n return(\"Buzz\");\n }\n if( ( numb % 3 == 0 ) && ( numb % 5 == 0 ) ){\n return('FizzBuzz');\n }\n \t}", "title": "" }, { "docid": "8bfd64f6ed216b7de0d6f43cd5d5f378", "score": "0.66754407", "text": "function Fizzbuzz(){\n\tvar inputValue = parseInt(prompt('Please enter a number, but please no decimals.'));//Create command and prompt to ask the user the instructions.\n\tvar newValueTest = +inputValue;//Define inputValue with a new variable.\n\n\tif (isNaN(newValueTest)) {\n\t\talert('Not a number, please refresh the webpage and enter a number only no demicals or negatives.'); // Not a valid number try again\n\t}\n\n\telse if (newValueTest % 1 !== 0) { //Apply a restriction rule stated on the assignment and also example on stackoverflow.\n\t\talert('Do not use decimals. Please refresh page and enter a whole number.');//Apply alert to let the user know\n\t}\n\t//After creating the conditions then I can apply the for loop to 1 to 100 or more. Similar to the FizzBuzz original.\n\t//.append is from the website w3schools http://www.w3schools.com/jquery/html_append.asp\n\telse for (var i = 1; i <= newValueTest; i++) {\n\t\tif (i % 15 === 0) {\n\t\t\t$(\"body\").append(\"<p> fizzbuzz </p>\");\n\t\t}\n\t\telse if (i % 3 === 0) {\n\t\t\t$(\"body\").append(\"<p> fizz </p>\");\n\t\t}\n\t\telse if (i % 5 === 0) {\n\t\t\t$(\"body\").append(\"<p> buzz </p>\");\n\t\t}\n\t\telse {\n\t\t\t$(\"body\").append(\"<p>\" + i + \"</p>\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6eca3b6a1d083a7a0933ef3b60a61d3c", "score": "0.6661159", "text": "function fizzBuzz() {\n // for(let i = 1; i <= 100; i++) {\n // if(i % 15 === 0) {\n // console.log('FizzBuzz');\n // } else if(i % 3 === 0) {\n // console.log('Fizz');\n // } else if(i % 5 === 0) {\n // console.log('Buzz');\n // } else {\n // console.log(i);\n // }\n // }\n\n // for(let i = 1; i <= 100; i++) {\n // let printNum=true;\n // if(i % 3 === 0)\n // console.log('Fizz');\n // if(i % 5 === 0)\n // console.log('Buzz');\n // // if divisable by 3 then i%3 is zero,\n // // if divisable by 5 then i%5 is zero,\n // // if divisable by 3 or 5 then i%3*i%5 is zero then don't print\n // printNum=((i%3*i%5)!==0);\n // if(printNum) {\n // console.log(i);\n // }\n // }\n for (var i = 1; i <= 100; i++) {\n let output = '';\n if (i % 3 === 0) {\n output += 'fizz';\n }\n if (i % 5 === 0) {\n output += 'buzz';\n }\n console.log(output || i);\n }\n}", "title": "" }, { "docid": "02a8347c0f32ec849ddee9e4b25b47a9", "score": "0.6618983", "text": "function fizz(num){\nfor(let i = 1; i <=100; i += 1){\n if(num % 3 === 0 && num % 5 === 0){\n return(\"FizzBuzz\")\n }else if(num % 3 === 0){\n return(\"Fizz\")\n }else if (num % 5 === 0){\n return(\"Buzz\")\n }else{\n return(num)\n }\n}\n}", "title": "" }, { "docid": "7fca6e6f67ee8ee9076b55acbff83be3", "score": "0.6615444", "text": "function preFizz(n) {\n if (n % 5 === 0 && n % 3 === 0) {\n return \"FizzBuzz\"\n } else if (n % 3 === 0) {\n return \"Fizz\"\n } else if (n % 5 === 0) {\n return \"Buzz\"\n } else {\n return n\n }\n}", "title": "" }, { "docid": "6639cb5e35253444ae3c9aff312f5cdd", "score": "0.6578076", "text": "function myFizzBuzz(num) {\n if (typeof num !== 'number') return false;\n if (num % 3 === 0 && num % 5 === 0) return 'fizzbuzz';\n if (num % 3 === 0) return 'fizz';\n if (num % 5 === 0) return 'buzz';\n return num;\n}", "title": "" }, { "docid": "2b1e17149b6c7dcb7167a0eeb37c17f5", "score": "0.656456", "text": "function FizzBuzz(){\nvar Fizz=\"Fizz\";\n//set variable to display results on the page \n\tvar r =\"\";\n//Check numbers 1-20 to see if they are divisible by 3 or 5 or both. \nfor (var x=1; x<=20; x++) {\n\t//set conditions if divisible by 3 display Fizz and if divisible by 5 display Buzz. If divisible by both display FizzBuzz \n\tif (x%3==0 && x%5==0){\n\t\tconsole.log(Fizz+\"Buzz\");\n\t\tr+=document.getElementById(\"Results\").innerHTML=Fizz+\"Buzz\" + \"<br>\";\n\t}\n\telse if (x%3==0){\n\t\tconsole.log(Fizz);\n\t\tr+=document.getElementById(\"Results\").innerHTML=Fizz + \"<br>\";\n\t}\n\telse if (x%5==0){\n\t\tconsole.log(\"Buzz\");\n\t\tr+=document.getElementById(\"Results\").innerHTML=\"Buzz\" + \"<br>\";\n\t}\n\t//set condition to display x if the number is not divisible by 3 or 5. \n\telse {\n\t\tconsole.log(x);\n\t\tr+=document.getElementById(\"Results\").innerHTML=x + \"<br>\";\n\t}\n\tdocument.getElementById(\"Results\").innerHTML=r;\n}\n\t}", "title": "" }, { "docid": "45d1b52cf829a010e0b490d1d7853ceb", "score": "0.6562943", "text": "function multipleOf(number){\n if (number % 3 === 0 && number % 5 === 0) {\n console.log(\"FizzBuzz\");\n \n } \n else if (number % 5 === 0) {\n console.log(\"Buzz\");\n \n } \n else if (number % 3 === 0) {\n console.log(\"Fizz\");\n }\n \n else {\n console.log(number);\n }\n}// end of func", "title": "" }, { "docid": "a8c78d227df4f674271ca1a26b512565", "score": "0.6560198", "text": "function fizzbuzz(){\n for(let i = 1; i <= 100; i++){ // by creating a for loop we're telling the conditional statements to \n // run between 1 and 100 and to increment by 1\n if(i % 3 === 0 && i % 5 === 0){ // IF the # is modulus of 3 AND 5, return \"FizzBuzz\" to the console\n console.log(\"FizzBuzz\");\n }else if (i % 3 === 0){ // when a # does NOT meet the above IF statement, look for # modulus to JUST 3\n console.log(\"Fizz\"); // and return \"Fizz\" to the console in that case\n }else if (i % 5 === 0){ // IF the conditions of IF and the FIRST else if (you can have multiple else if)\n // then check to print \"Buzz\" to # that are modulus of 5 with 0 remainder\n console.log(\"Buzz\");\n }else{\n console.log(i); // for everything ELSE, return i (in this case, the number)\n }\n }\n}", "title": "" }, { "docid": "951dd3e0f59e3ed4433a9a735a76a7c4", "score": "0.65276974", "text": "function doFizzBuzz() {\n // FILL THIS IN\n for ( var x=1; x <= 100; x++){\n if( x % 3 == 0 ){\n console.log(\"Fizz\")\n }\n if( x % 5 == 0 ){\n console.log(\"Buzz\")\n }\n if( ( x % 3 == 0 ) && ( x % 5 == 0 ) ){\n console.log(\"FizzBuzz\")\n }\n if( ( x % 3 != 0 ) && ( x % 5 != 0 ) ){\n console.log(x)\n }\n }\n }", "title": "" }, { "docid": "fa11cd50d2dc9d2052e8ca0ec8a45d43", "score": "0.65246034", "text": "function fizzBuzz(value) {\n\n switch (true) {\n case value % 3 == 0 && value % 5 == 0:\n return \"FizzBuzz\";\n break;\n case value % 5 == 0 && value % 3 != 0:\n return \"Buzz\";\n break;\n case value % 3 == 0 && value % 5 != 0:\n return \"Fizz\";\n break;\n }\n}", "title": "" }, { "docid": "599fcde784c370646fe8aa87d0f2b918", "score": "0.64989346", "text": "function fizzBuzz(num){\n \n // set up a for loop starting from 1 going until 'num'\n for (var i = 1; i <= num; i++) {\n\n // check if the current iteration (i) is a multiple of 3 and 5, if so print 'FizzBuzz'\n if(i % 3 === 0 && i % 5 === 0) {\n console.log(\"FizzBuzz\");\n }\n // check if the current iteration (i) is a multiple of 3, if so print 'Fizz'\n else if (i % 3 === 0) {\n console.log (\"Fizz\");\n }\n // check if the current iteration (i) is a multiple of 5, if so print 'Buzz'\n else if (i % 5 === 0) {\n console.log (\"Buzz\");\n }\n // else, print 1 \n else {\n console.log(i);\n }\n} \n}", "title": "" }, { "docid": "b574ff70fd9413f19a17c72c7748db85", "score": "0.6485279", "text": "function fizzBuzz(currentNum) {\n $numberInput.value = currentNum;\n if (currentNum % 3 === 0 && currentNum % 5 === 0) {\n $count.innerText = \"FizzBuzz\";\n }\n else if (currentNum % 3 === 0) {\n $count.innerText = \"Fizz\";\n }\n else if (currentNum % 5 === 0) {\n $count.innerText = \"Buzz\";\n }\n else {\n $count.innerText = currentNum;\n }\n}", "title": "" }, { "docid": "bb383f687b5c4b55d92bde08f37429c6", "score": "0.6475515", "text": "function FizzBuzz() {\n for (let i = 1; i < 101; i++) {\n if (i % 3 == 0 && i % 5 != 0) {\n console.log(\"Fizz\");\n }\n else if (i % 3 != 0 && i % 5 == 0) {\n console.log(\"Buzz\");\n }\n else if (i % 3 == 0 && i % 5 == 0) {\n console.log(\"Fizzbuzz\");\n }\n else {console.log(i);}\n\n }\n}", "title": "" }, { "docid": "b7370281f7aae02148e4e10266518d85", "score": "0.6473057", "text": "function calculateFizz(value)\n {\n return doesItDivide(value, 3);\n }", "title": "" }, { "docid": "d4130c8ba40a81fff11673770b76a6b5", "score": "0.6447902", "text": "function printFizzBuzz() {\n const isThreeMultiple = (num) => num && num % 3 === 0;\n const isFiveMultiple = (num) => num && num % 5 === 0;\n const isThreeAndFiveMultiple = (num) => num && num % 15 === 0;\n \n for (let i = 0; i <= 100; i++) {\n if (isThreeAndFiveMultiple(i)) {\n console.log('fizzbuzz');\n } else if (!isThreeAndFiveMultiple(i) && isThreeMultiple(i)) {\n console.log('fizz');\n } else if (!isThreeAndFiveMultiple(i) && isFiveMultiple(i)) {\n console.log('buzz');\n }\n }\n}", "title": "" }, { "docid": "61f05a22f08f62da0fd07ea842bd479c", "score": "0.64305645", "text": "function fizzBuzz(input){\n if (typeof(input) !== 'number') return 'Not a number';\n if ((input % 3)=== 0) return 'Fizz';\n if ((input % 5)=== 0) return 'Buzz';\n if ((input % 3=== 0) && (input % 5 === 0)) return 'FizzBuzz';\n if ((input % 3=== 0) || (input % 5 === 0)) return 'input';\n \n}", "title": "" }, { "docid": "59349e79e8f830dd2e3888b683f084b6", "score": "0.63718575", "text": "function fizzBuzz(){\n for (var i = 1; i <= 100; i++) {\n var f = i % 3 === 0, b = i % 5 === 0;\n console.log(f ? b ? \"FizzBuzz\" : \"Fizz\" : b ? \"Buzz\" : i);\n}\n}", "title": "" }, { "docid": "50b8b2478d96804f3bce9c49f988cd27", "score": "0.6355001", "text": "function fizzBuzz(value){\n if (value%3 == 0) {\n if (value%5 == 0){\n return 'FizzBuzz';\n }\n return 'Fizz';\n }\n if (value%5 == 0) return 'Buzz';\n return value.toString();\n}", "title": "" }, { "docid": "9f5bb05e555708b6a9eef87800eb9cae", "score": "0.6340613", "text": "function fizzBuzz(n) {\n for (let i = 1; i <= n; i++) {\n // Is the number a multiple of 3 and 5?\n if (i % 3 === 0 && i % 5 === 0) {\n console.log('fizzbuzz');\n } else if (i % 3 === 0) {\n // Is the number a multiple of 3?\n console.log('fizz');\n } else if (i % 5 === 0) {\n // Is the number a multiple of 5?\n console.log('buzz');\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "52b2524f7bdad8b740c5775710a39445", "score": "0.6317834", "text": "function fizzBuzz(number) {\n\n if (number === undefined) {\n throw new Error(`Please input a number`);\n return;\n }\n\n //Make input a number\n number = Number(number);\n\n if (number % 15 === 0) {\n return \"FizzBuzz\"\n } else if (number % 5 === 0) {\n return \"Buzz\"\n } else if (number % 3 === 0) {\n return \"Fizz\"\n } else {\n return number;\n }\n}", "title": "" }, { "docid": "f8353895c48fd0a45fa2b9a527254db8", "score": "0.63175476", "text": "function fizzBuzz() {\n\n for (i=1; i<100; i++) {\n\n if (i % 3 == 0 && i % 5 == 0) {\n console.log('FizzBuzz');\n \n } else if (i % 3 == 0) {\n console.log('Fizz');\n \n } else if (i % 5 == 0) {\n console.log('Buzz');\n \n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "0247dee313da2ec6554fd830fb4471c7", "score": "0.63084483", "text": "function fizzBuzz2(num) {\n let word = ''; //set init val of word to ''\n\n if ( num % 3 === 0 ) {\n word = word.concat('fizz'); //divisible by 3 concats ''+'fizz'\n }\n\n if ( num % 5 === 0 ) {\n word = word.concat('buzz'); //divisible by 5 concats ''+'buzz'\n }\n //divisible by 3&&5 concats 'fizz' first then 'buzz'\n return word;\n}", "title": "" }, { "docid": "9c1c4e85ed8da7fd44de2c099c6041ca", "score": "0.6293666", "text": "function fizzBuzz2(m,n){\n if (m % 3 === 0 && m % 5 !== 0) {\n console.log('fizz');\n }\n else if (m % 5 === 0 && m % 3 !== 0) {\n console.log('buzz');\n }\n else if (m % 5 === 0 && m % 3 === 0) {\n console.log('fizzbuzz');\n }\n else {console.log(m)};\n\n if (n % 3 === 0 && n % 5 !== 0) {\n console.log('fizz');\n }\n else if (n % 5 === 0 && n % 3 !== 0) {\n console.log('buzz');\n }\n else if (n % 5 === 0 && n % 3 === 0) {\n console.log('fizzbuzz');\n }\n else {console.log(n)};\n }", "title": "" }, { "docid": "57b20dd028ac09ece55665a720e50921", "score": "0.6289358", "text": "function exercise7(num7) {\n let answer7;\n if (num7 == 1){\n answer7 = \"You won!\";\n }\n else if (num7 == 7){\n answer7 = \"You are lucky!\";\n }\n else if (num7==1000000){\n answer7 = \"You are one in a million!\";\n }\n else if (num7 >= 0){\n answer7 = \"it's just \" + num7 ;\n }\n else {answer7 = num7 + \" probs negative\"};\n return answer7;\n }", "title": "" }, { "docid": "69b39f8edcf4c1ab01cb79a7a029bbdf", "score": "0.6282189", "text": "function fizzBuzz() {\n for(let i=1; i<=100; i++) {\n if(i % 3 === 0 && i % 5 === 0) {\n console.log('FizzBuzz');\n }\n else if(i % 3 === 0) {\n console.log('Fizz');\n } else if(i % 5 === 0) {\n console.log('Buzz');\n }\n else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "b44e4c3d11fdcdb722982ef213f3810a", "score": "0.62776273", "text": "function divisableNum(num) {\n if (num % 3 === 0 && num % 5 === 0) {\n return \"fizzbuz\";\n } else if (num % 3 === 0) {\n return \"fizz\";\n } else if (num % 5 === 0) {\n return \"buzz\";\n } else {\n return \"\";\n }\n}", "title": "" }, { "docid": "f38b5a9cd5a7ad240d0f4caab98ba338", "score": "0.62771493", "text": "function fizzBuzz(num1, num2, range) {\n//create a for loop, create a variable i, when i becomes larger than range, loop stops.\n for (var i = 0; i <= range; i++) {\n //create conditional if statement, using logical operator \"and\" to make sure i modulo num 1 and num2 must be equal exactly zero\n if (i % num1 === 0 && i % num2 === 0) {\n // if above condition is true, print \"fizzbuzz\"\n console.log('fizzbuzz');\n // create conditional statement if i modulo num1 is exactly equal to zero\n } else if (i % num1 === 0) {\n // if above conditional is true, print \"fizz\"\n console.log('fizz');\n // create conditional statement if i modulo num2 is exactly equal to zero\n } else if (i % num2 === 0) {\n // if above conditional is true, print \"buzz\"\n console.log('buzz');\n // every thing else not included in the above 3 scenarios\n } else {\n // if above conditional is true, print i\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "55b7c9d4e55f4336221a6dedc87e0f5d", "score": "0.6268972", "text": "function fizzBuzz4(m,n,fizzNum,buzzNum){\n if (m % fizzNum === 0 && m % buzzNum !== 0) {\n console.log('fizz');\n }\n else if (m % buzzNum === 0 && m % fizzNum !== 0) {\n console.log('buzz');\n }\n else if (m % fizzNum === 0 && m % buzzNum === 0) {\n console.log('fizzbuzz');\n }\n else {console.log(m)};\n\n if (n % fizzNum === 0 && n % buzzNum !== 0) {\n console.log('fizz');\n }\n else if (n % buzzNum === 0 && n % fizzNum !== 0) {\n console.log('buzz');\n }\n else if (n % fizzNum === 0 && n % buzzNum === 0) {\n console.log('fizzbuzz');\n }\n else {console.log(n)};\n }", "title": "" }, { "docid": "b1cb3d838ba3d4e27e89b3760fb118bc", "score": "0.6267955", "text": "function fizzBuzz(n){\n var x = \"\"\n if(n%3==0 && n%5==0){\n return \"FizzBuzz\";\n }\n if(n%3==0){\n return \"Fizz\";\n }\n if(n%5==0){\n return \"Buzz\";\n }else{\n newStr = n+ \"!\"\n return newStr\n }\n}", "title": "" }, { "docid": "b721a5def6fe064d2290790792b854d7", "score": "0.6263848", "text": "function fizzBuzz(num) {\n i = 0\n\n while (i < num) {\n if (i % 3 === 0 || i % 5 === 0){\n return i++\n }\n }\n}\n\n\n/* isFactorOf\n\nDefine a function isFactorOf(number, factor) that returns true if factor is a factor of number. Otherwise, false.\n\nisFactorOf(6,2); //true\nisFactorOf(-6, 2); //true\nisFactorOf(5,0); //false\n */=", "title": "" }, { "docid": "06ca3d6724c26dc55ce01631be44960f", "score": "0.62623125", "text": "function fizzBuzz(input){\nfor (i = 0; i <= input; i++){\n if (i % 3 === 0 && i % 5 === 0){\n console.log('Fizz');\n }else if (i % 5 === 0){\n console.log('Buzz');\n }else if (i % 3 === 0){\n console.log('FizzBuzz');\n }else{\n console.log(i);\n }\n}\n}", "title": "" }, { "docid": "8ac543e52481566e49cead42090ad880", "score": "0.6259101", "text": "function fizzBuzz(n) {\n for (n=0; n.length; n++) {\n \n } if (n % 15 === 0){\n return \"FizzBuzz\";\n } else if (n % 3 === 0) {\n return \"Fizz\";\n }else if (n % 5 === 0){\n return \"Buzz\";\n }\n return n;\n \n}", "title": "" }, { "docid": "c4450ca8c4d7d8736710f17f858eb4b1", "score": "0.6256763", "text": "function fizzBuzz(num1, num2, range) { // declare a function called fizzBuzz\n for (var i = 0; i <= range; i++) { // for loop. delcare a variable that states the index number 0, if its less than or equal to a range\n if (i % num1 === 0 && i % num2 === 0) { // if / else statement\n console.log('fizzbuzz'); // logs fizzbuzz to the console\n } else if (i % num1 === 0) { // if i is divisible by num1 with no remainder, log \"fizz\" to the cconsole\n console.log('fizz'); // log fizz to the console\n } else if (i % num2 === 0) { // if i is divisible by num2 with no remainder, log \"buzz\" to the cconsole\n console.log('buzz'); //log \"buzz\" to the console\n } else { // cacth all case for anything that does not meet above 3 criteria\n console.log(i); // logs the value of i to the console\n }\n }\n}", "title": "" }, { "docid": "80780f3618c39d656a93244b09b2ca88", "score": "0.625402", "text": "function fizzBuzz(x) {\t\t\n\tvar counter = 1;\n\tvar results = \"\";\n\twhile (counter <= x) {\t\t\n\t\tif (counter % 3 === 0 && counter % 5 === 0) {\n\t\t\tresults = \"FizzBuzz<br>\";\n\t\t}\n\t\telse if (counter % 3 === 0 && counter % 5 !== 0) {\n\t\t\tresults = \"Fizz<br>\";\n\t\t}\n\t\telse if (counter % 5 === 0 && counter % 3 !== 0) {\n\t\t\tresults = \"Buzz<br>\";\n\t\t}\n\t\telse {\n\t\t\tresults = counter + \"<br>\";\n\t\t}\n\t\tdocument.write(results);\n\t\tcounter = counter + 1;\n\t}\n}", "title": "" }, { "docid": "e1984f0c7a853647ffae97d88385f033", "score": "0.6248333", "text": "function fizzBuzz () {\n for (var i = 1; i <= 100; i++) {\n if (!(i % 3) && !(i % 5)) {\n console.log('FizzBuzz');\n } else if (!(i % 3)) {\n console.log('Fizz');\n } else if (!(i % 5)) {\n console.log('Buzz');\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "daa815f048c26a3d405d45ed1cf4b8b6", "score": "0.6237938", "text": "function fizzBuzz(){\n for(var i = 0; i < 100; i++){\n if((i % 5 === 0) && (i % 3 === 0)){\n console.log(\"FIZZ BUZZ\") \n } else if( i % 3 === 0){\n console.log(\"FIZZ\")\n } else if(i % 5 === 0){\n console.log(\"BUZZ\")\n } else {\n console.log(i)\n }\n }\n}", "title": "" }, { "docid": "4fb809828a39f2482af9b0c9550da81e", "score": "0.62338966", "text": "function fizzBuzz(number) {\n for(i = 1; i <= number; i++) {\n if (i % 3 === 0 && i % 5 === 0) {\n console.log(\"FizzBuzz\");\n } else if (i % 3 === 0) {\n console.log(\"Fizz\");\n } else if (i % 5 === 0) {\n console.log(\"Buzz\")\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "99ee093f1e505c2f66b278576e3b4298", "score": "0.6232256", "text": "function fizzBuzz(num){\n\tfor (var i = 1; i < num; i++){\n\n\t\tif (i%3 === 0 && i%5 === 0){\n\t\t\tconsole.log(\"FizzBuzz\");\n\t\t}\n\t\telse if(i%3 === 0){\n\t\t\tconsole.log(\"Fizz\");\n\t\t}\n\t\telse if (i%5 === 0){\n\t\t\tconsole.log(\"Buzz\");\t\n\t\t}\n\t\telse{\n\t\t\tconsole.log(i);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "20ce645d44f87a1b64bf2a56c047b765", "score": "0.6222903", "text": "function fizzBuzz() {\n for(var i = 1; i <= 15; i++){\n if(i % 3 === 0 && i % 5 === 0){\n console.log(\"fizzbuzz\");\n } else if(i % 3 == 0){\n console.log(\"fizz\");\n } else if(i % 5 === 0){\n console.log(\"buzz\")\n } else{\n console.log(i); \n }\n }\n\n}", "title": "" }, { "docid": "1b7e550024f2777b9ba0647ae6a0be7e", "score": "0.62204355", "text": "function fizzbuzz(num) {\n const finalArr = [];\n​\n for (let i = 1; i <= num; i += 1) {\n const divI = i % 3 === 0;\n const divII = i % 5 === 0;\n if (divI && divII) {\n finalArr.push('fizzbuzz');\n } else if (divI) {\n finalArr.push('fizz');\n } else if (divII) {\n finalArr.push('buzz');\n } else {\n finalArr.push(i);\n }\n }\n return finalArr;\n}", "title": "" }, { "docid": "afe80aa41d27dbafa689351d13995b66", "score": "0.62105817", "text": "function fizzBuzz() {\n for (var number = 1; number <= 100; number++) {\n var message = number;\n if (number % 15 === 0) {\n message = \"Fizzbuzz\";\n } else if (number % 5 === 0) {\n message = \"Buzz\";\n } else if (number % 3 === 0) {\n message = \"Fizz\";\n }\n console.log(message);\n }\n}", "title": "" }, { "docid": "a6cd81e89dc791d0d4373c29c5a6cac4", "score": "0.62078196", "text": "function SuperFizzBuzz() {\n for (i = 1; i < 51; i++) {\n if (i % 3 === 0 && i % 5 === 0 && i % 7 === 0) {\n console.log(\"SuperFizzBuzz\");\n } else if (i % 3 === 0 && i % 7 === 0) {\n console.log(\"SuperFizz\");\n } else if (i % 5 === 0 && i % 7 === 0) {\n console.log(\"SuperBuzz\");\n } else if (i % 3 === 0 && i % 5 === 0) {\n console.log(\"FizzBuzz\");\n } else if (i % 3 === 0) {\n console.log(\"Fizz\");\n } else if (i % 5 === 0) {\n console.log(\"Buzz\");\n } else if (i % 7 === 0) {\n console.log(\"Super\");\n } else {\n console.log(`${i}`);\n }\n }\n}", "title": "" }, { "docid": "bfe3c0ef4cfa067af758e54bdfbfdf94", "score": "0.62051135", "text": "function fizzBuzz() {\n for (let i = 1; i <= 100; i++) {\n if (i % 3 === 0 && i % 5 === 0) {\n console.log('FizzBuzz');\n } else if (i % 3 === 0) {\n console.log('Fizz');\n } else if (i % 5 === 0) {\n console.log(' Buzz');\n } else console.log(i);\n }\n}", "title": "" }, { "docid": "6174bd986d36efdad21b71a5143d00f2", "score": "0.6202967", "text": "function fizzBuzz(min, max) {\n //loop through the min to the max and print all numbers\n for (i = 0; i < 1001; i++) {\n if (i % 3 === 0 && i % 5 === 0) {\n console.log(`Fizz Buzz`);\n } else if (i % 3 === 0) {\n console.log(`Fizz`);\n } else if (i % 5 === 0) {\n console.log(`Buzz`);\n } else {\n console.log(i);\n }\n }\n //check each number to see if its dividable by 3 or 5\n}", "title": "" }, { "docid": "9b20f812ab1b465fba5cae2325c80e29", "score": "0.6191715", "text": "function fizzBuzz() {\n for (var i = 1; i <= 100; i++) {\n if (i % 3 === 0 && i % 5 === 0) {\n console.log(\"FizzBuzz\");\n }\n else if (i % 5 === 0) {\n console.log(\"Buzz\");\n }\n else if (i % 3 === 0) {\n console.log(\"Fizz\");\n }\n else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "abb7a78988e0638b67cfbd01d04c7d2b", "score": "0.6185619", "text": "function fizz(){\n for(let i=1; i<=100; i++){\n if(i%3 == 0){\n console.log(\"Fizz\");\n }\n if(i%5 == 0){\n console.log(\"Buzz\");\n }\n if(i%5 == 0 && i%3 == 0){\n console.log(\"FizzBuzz\");\n }\n else{\n console.log(i);\n }\n\n }\n}", "title": "" }, { "docid": "f5c0e9d14bab789101f41b8fcce9dc23", "score": "0.61790705", "text": "function fizzBuzz() {\n for(i = 1; i <= 21; i++) {\n if(i % 5 === 0 && i % 3 === 0) {\n console.log('FizzBuzz');\n } else if(i % 3 === 0) {\n console.log('Fizz'); \n } else if(i % 5 === 0) {\n console.log('Buzz');\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "b602ddd11eb67c858dd1bbeb281c4a54", "score": "0.6173806", "text": "function fizzBuzz() {\n // for (i = 1; i <= 100; i++) {\n // if (i % 3 === 0 && i % 5 === 0) {\n // console.log('FizzBuzz');\n // } else if (i % 3 === 0) {\n // console.log('Fizz');\n // } else if (i % 5 === 0) {\n // console.log('Buzz');\n // } else {\n // console.log(i);\n // }\n // }\n}", "title": "" }, { "docid": "9e78a418777a3819b64ebc2e5896b5e4", "score": "0.6167693", "text": "function fizzBuzz(totalNum) {\n\tfor (var i = 0; i < totalNum; i++) {\n\n\t\tif (((i % 3) == 0) && ((i % 5) == 0)) {\n\t\t\tconsole.log(\"FizzBuzz\");\n\t\t}\n\n\t\telse if ((i % 3) == 0) {\n\t\t\tconsole.log(\"Fizz\");\n\t\t}\n\n\t\telse if ((i % 5) == 0) {\n\t\t\tconsole.log(\"Buzz\");\n\t\t}\n\n\t\telse {\n\t\t\tconsole.log(i);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "378534c54f06f4add09bf701ae36f3e0", "score": "0.61667246", "text": "function fizzBuzz(n) {\n for (let i = 1; i<=n; i++) {\n //multiple of 3 & 5 (should only be multiples of 15)\n //could do (i % 15 === 0)\n if (i % 3 === 0 && i % 5 == 0) {\n console.log('fizzbuzz');\n }\n else if (i % 3 === 0) {\n console.log('fizz');\n }\n else if (i % 5 === 0) {\n console.log('buzz');\n }\n else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "70847deaed7e2aa0ac0b36958277852d", "score": "0.61611533", "text": "function fizzBuzz(){\n\n for(var i = 0;i<=100 ; i++ ){\n \n if(i%3 == 0 && i%5 == 0){\n console.log('Fizz Buzz');\n }\n \n else if(i%3 == 0){\n console.log('Fizz');\n }\n else if(i%5 == 0){\n console.log('Buzz');\n }\n else{\n console.log(i);\n }\n }\n\n}", "title": "" }, { "docid": "f5c9c8ad3b78b4bf7ce379ec1aeb57f9", "score": "0.61607033", "text": "function fizzBuzz() {\n for(i = 1; i <= 15; i++) {\n if(i % 3 === 0 && i % 5 === 0) {\n console.log(\"fizzbuzz\");\n } else if(i % 3 === 0) {\n console.log(\"fizz\");\n } else if(i % 5 === 0) {\n console.log(\"buzz\");\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "13fb83e172eea27b844f6a707c53a164", "score": "0.6157769", "text": "function fizzBuzz() {\n //loop through numbers\n for (var num=1; num<=200; num++) {\n //create empty output string\n var outputStr = \"\";\n //if multiple of 3, add Fizz to outputStr\n if (num % 3 == 0) outputStr += \"Fizz\";\n //shrug\n //if multiple of 5, add Buzz to outputStr\n if (num % 5 == 0) outputStr += \"Buzz\";\n //if multiple of 7, add Boom to outputStr\n if (num % 7 == 0) outputStr += \"Boom\";\n //adds Steven to outputStr for every instance of 7 in num\n var numArray = num.toString().split('');\n for (var i=0; i<numArray.length; i++) {\n if (numArray[i] == \"7\") outputStr += \"Steven\";\n }\n //add extra elements to outputStr if not empty\n if (outputStr) outputStr = \" - \" + outputStr + \"!\";\n //append result to output div\n $(\"#output\").append(\"<p>\" + num + outputStr + \"</p>\");\n }\n debugger;\n}", "title": "" }, { "docid": "bd6bbb40e3af58530ed3c80063e1cb30", "score": "0.61567533", "text": "function FizzBuzzSimple(num){\n\t//sobrante = ;\n\t// 0, \"\" NaN, undefined, null -> falsos\n\tif ((num % 2 ) == 0){\n\t\tconsole.log(\"Fizz\")\n\t}else{\n\t\tconsole.log(\"Buzz\")\n\t}\n\n}", "title": "" }, { "docid": "de32875ca15ab8712dae5e3f5074884b", "score": "0.61473155", "text": "function fizzbuzz(n){\n if (i % 15 == 0)\n return 'FizzBuzz';\n else if (i % 5 == 0)\n return 'Buzz';\n else if (i % 3 == 0)\n return 'Fizz';\n else\n return i;\n }", "title": "" }, { "docid": "5380ee0d18a1e58666769e094e38c03a", "score": "0.61460847", "text": "function fizzBuzz() {\n for (let i = 0; i < 100; i++) {\n if (i % 3 === 0 && i % 5 === 0) {\n console.log(`${i} FizzBuzz`);\n } else if (i % 3 === 0) {\n console.log(`${i} Fizz`);\n } else if (i % 5 === 0) {\n console.log(`${i} Buzz`);\n }\n }\n}", "title": "" }, { "docid": "9a55fbde57aa3ab6c12f93c33d8632f3", "score": "0.6128777", "text": "function fizzBuzz() {\n var max = 100\n var result = \"\";\n\n var result = \"\";\n for (var i = 1; i <= max; i++) {\n\n if ( (i % 3 !== 0) && (i % 5 !== 0) ){\n result += i + \" \";\n }\n\n else if ( (i % 3 === 0) && (i % 5 === 0) ){\n result += \" FizzBuzz \";\n }\n else if (i % 3 === 0) {\n result += \" Fizz \";\n }\n else if (i % 5 === 0) {\n result += \" Buzz \";\n }\n }\n\n console.log(result);\n}", "title": "" }, { "docid": "334d6a2a3b3e41e6bf9365a3b9ced2c8", "score": "0.6110425", "text": "function fizzBuzz(){\n\n for(let i=1; i <= 100; i++){\n\n if(i % 3 === 0 && i % 5 === 0){\n console.log(\"fizzbuzz\")\n }\n else if(i % 3 === 0){\n console.log(\"fizz\")\n }\n else if(i % 5 === 0){\n console.log(\"buzz\")\n }\n else{\n console.log(i)\n }\n \n }\n}", "title": "" }, { "docid": "c8aa43cbe755829958047747f37f8449", "score": "0.6092537", "text": "function printFizzBizz() {\n for(i = 1; i <= 100; i++) {\n if(i % 3 == 0 && i % 5 == 0)\n console.log(i + \": FizzBuzz\");\n else if(i % 3 ==0)\n console.log(i +\": Fizz\");\n else if(i % 5 ==0)\n console.log(i + \": Buzz\"); \n }\n}", "title": "" }, { "docid": "2de02cc4eddabf05ea79c092c5979d76", "score": "0.60886097", "text": "function fizzBuzz(input) {\n if (typeof input !== 'number') {\n return NaN;\n } else if (input % 3 === 0 && input % 5 === 0) {\n return 'FizzBuzz';\n } else if (input % 3 === 0) {\n return 'Fizz';\n } else if (input % 5 === 0) {\n return 'Buzz';\n } else {\n return input;\n }\n}", "title": "" }, { "docid": "ec07be0c9a0ec5bb840ebf205db66df0", "score": "0.6087328", "text": "function doFizzBuzz() {\n for (var j=1; j <= 20; j++)\n\t{\n\t\tif (j % 15 == 0)\n console.log(\"FizzBuzz\");\n\t\telse if (j % 3 == 0)\n console.log(\"Fizz\");\n\t\telse if (j % 5 == 0)\n console.log(\"Buzz\");\n\t\telse\n console.log(j);\n\t}\n\n }", "title": "" }, { "docid": "d5652357ec13fbcfd5e24b4c50a20ca8", "score": "0.6079842", "text": "function fizzbuzz(numbers) {\n\n for (var i = 0; i <= numbers; i++) {\n if (i % 3 === 0) {\n console.log(i + \" fizz\")\n } else if (i % 5 === 0) {\n console.log(i + \" buzz\")\n } else if (i % 3 === 0 && i % 5 === 0) {\n console.log(i + \" fizz buzz\")\n } else {\n console.log(i)\n }\n }\n}", "title": "" }, { "docid": "bdaaabeec8f1d11f58df61feaf98130d", "score": "0.6078283", "text": "function fizzbuzz(number) {\n for (var count = 0; count < number; count = count + 1)\n if (count % 15 == 0)\n console.log(\"FizzBuzz\")\n else if (count % 3 == 0)\n console.log(\"Fizz\")\n else if (count % 5 == 0)\n console.log(\"Buzz\")\n else\n console.log(count)\n}", "title": "" }, { "docid": "71d279e8bed44eab19fcaab88c30e2eb", "score": "0.6066481", "text": "function fizzbuzz(){\n\tfor (var i = 1; i <= 100; i++) {\n\t\tif ( i % 3 == 0 && i % 5 == 0) {\n\t\t\tconsole.log(\"FizzBuzz\");\n\t\t}\n\t\telse if (i % 3 == 0) {\n\t\t\tconsole.log(\"Fizz\");\n\t\t}\n\t\telse if (i % 5 == 0) {\n\t\t\tconsole.log(\"Buzz\");\n\t\t}\n\t\telse {\n\t\t\tconsole.log(i);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c83900af4433ed1b382fd9f0b0c9bc51", "score": "0.60590214", "text": "function FizzBuzz()\n{\n let fbResults = '';\n for(var i = 1; i <= 100; i++)\n {\n \n if(i % 3 === 0 && i % 5 === 0)\n {\n fbResults = fbResults + 'FizzBuzz' + '\\n';\n } else if (i % 3 === 0)\n {\n fbResults = fbResults + 'Fizz' + '\\n';\n } else if(i % 5 === 0)\n {\n fbResults = fbResults + 'Buzz' + '\\n';\n } else\n {\n fbResults = fbResults+ i + '\\n';\n }\n \n }\n\n return fbResults;\n}", "title": "" }, { "docid": "7aa4b35d41ce5d43d95016918db09334", "score": "0.60573953", "text": "function\tfizzBuzz(){\n\tfor (let i = 1; i <= 100; i++){\n\t\tif (i % 3 == 0 & i % 5 == 0)\n\t\t\tconsole.log(\"fizzBuzz \" + i);\n\t\telse if (i % 3 == 0)\n\t\t\tconsole.log(\"Fizz \" + i);\n\t\telse if (i % 5 == 0)\n\t\t\tconsole.log(\"Buzz \" + i);\n\t\telse\n\t\t\tconsole.log(i);\n\t}\n}", "title": "" }, { "docid": "f9b31c90d01997f9d9517b2fc0b658bc", "score": "0.6047718", "text": "function fizzbuzz(numbers) {\n\n for (var i = 0; i <= numbers; i++) {\n if (i % 3 === 0 && i % 5 === 0) {\n console.log(i + \" fizz buzz\")\n }\n else if (i % 3 === 0) {\n console.log(i + \" fizz\")\n } else if (i % 5 === 0) {\n console.log(i + \" buzz\")\n } else {\n console.log(i)\n }\n }\n}", "title": "" }, { "docid": "4b86921059a22714105cee849b0a77de", "score": "0.6035271", "text": "function fizzBuzz(num1, num2, range) {\n // Creates a for loop that will run 'range' number of times\n for (var i = 0; i <= range; i++) {\n // Creates a conditional that will print 'fizzbuzz' if both the num1 and num2 arguments are divisible by the current iteration number\n if (i % num1 === 0 && i % num2 === 0) {\n console.log('fizzbuzz');\n // Adds a conditional to run if the previous condition is not met. If the value of num1 is divisible by the current iteration number, print 'fizz'\n } else if (i % num1 === 0) {\n console.log('fizz');\n // Adds a conditional to run if the previous 2 conditions are not met. if the value of num 2 is divisble by the current iteration number, print 'buzz'\n } else if (i % num2 === 0) {\n console.log('buzz');\n // If none of the above conditions are met, prints the value of the current iteration\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "a749fd5b97c352dd455a43ab8faa40d4", "score": "0.6015106", "text": "function exerciseTwo(){\n\tfor(var i = 1; i <= 100; i++){\n\t\tif((i%3==0)&&(i%5==0)){\n\t\t\tconsole.log(\"fizzbuzz\");\n\t\t}\n\t\telse if(i % 3 == 0){\n\t\t\tconsole.log(\"fizz\");\n\t\t}\n\t\telse if(i % 5 == 0){\n\t\t\tconsole.log(\"buzz\");\n\t\t}\n\t\telse{\n\t\t\tconsole.log(i);\n\t\t}\n\t}\n\n\n\t/*Their solution\n\tfor (var n = 1; n <= 100; n++) {\n \t\tvar output = \"\";\n \t\tif (n % 3 == 0)\n\t\t\toutput += \"Fizz\";\n\t\tif (n % 5 == 0)\n \t\toutput += \"Buzz\";\n \t\tconsole.log(output || n);\n\t}\n\t*/\t\n}", "title": "" }, { "docid": "4bccb39f24b706d4a704add79a0f429b", "score": "0.6007796", "text": "function fizzBuzz(n){\n for(let i=1; i <= n; i++){\n if(i===15 || i%15===0){\n console.log('FizzBuzz');\n }else if(i===5 || i%5===0){\n console.log('Buzz');\n }else if(i===3 || i%3===0){\n console.log('Fizz');\n }else{\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "65c8ea8384364cd6e8122ba8aa9d7903", "score": "0.59943926", "text": "function fizzBuzz(n) {\n for(let i = 0; i <= n; i++){\n if(i%3 === 0 && i%5 === 0){\n console.log('fizzbuzz');\n } else if(i%3 === 0){\n console.log('fizz');\n } else if(i%5 === 0){\n console.log('buzz');\n } else {\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "f85c20c5919d29cb480db857661aa262", "score": "0.59866154", "text": "function fizzBuzz(start, end) {\n \n //print 1 to 15 // fizz for every 3 // buzz for every 5// fizzbuzz for both\n \n \n for ( var i = start; i <= end; i++) {\n // i used for loop since we are going through each number \n if ( i%5 === 0 && i%3 === 0 )\n {console.log(\"fizzbuzz\");}\n //if it is a multiple of 5 and 3, it will print fizzbuzz\n else if ( i%3 === 0 ) \n {console.log(\"fizz\");}\n //then we need to say that if it is just a multiple of 3 then it will print fizz\n else if ( i%5 === 0 ) \n {console.log(\"buzz\");}\n //but if it is only a multiple of 5, it will print buzz\n else\n {console.log(i);}\n //if it is none of the above then it will just print the number.\n \n}\n \n \n \n \n \n}", "title": "" }, { "docid": "09f69fbf134f435bcc27efb473159eb1", "score": "0.59838384", "text": "function fizzbuzzReadable(){\n for(var i=1; i <=100; i++){\n var result = '';\n result += (i % 3) == 0 ? \"Fizz\": \"\";\n result += (i % 5) == 0 ? \"Buzz\": \"\";\n console.log(result == '' ? i : result);\n }\n}", "title": "" }, { "docid": "9a9a25f2b8e338bb798fd5e56ee52da4", "score": "0.5970406", "text": "function question(numQuestion)\n{\n var userAnswer = \"\";\n var userAnswerString = \"\";\n var answer = -1;\n\n if (numQuestion === 1)\n {\n // Prompt the user for 1st question\n userAnswerString = prompt(\"10 + 20 = ?\");\n userAnswer = parseInt(userAnswerString);\n\n answer = 30;\n }\n else if (numQuestion === 2)\n {\n // Prompt the user for 2nd question\n userAnswerString = prompt(\"10 * 0 = ?\");\n userAnswer = parseInt(userAnswerString);\n \n answer = 0;\n }\n else if (numQuestion === 3)\n {\n // Prompt the user for 3rd question\n userAnswerString = prompt(\"7 * ? = 63\");\n userAnswer = parseInt(userAnswerString);\n \n answer = 9;\n }\n else\n {\n // invalid\n }\n\n return answer === userAnswer;\n}", "title": "" }, { "docid": "df530361b26e1ea5ba5f8c10d7e412c9", "score": "0.5961201", "text": "function playGame(yourNumber) {\nfor (var counter = 1; counter <= yourNumber; counter++) {\nif (counter % 15 === 0) {\n$('body').append(\"<p>FizzBuzz</p>\");\n} else if (counter % 3 === 0) {\n$('body').append(\"<p>Fizz</p>\");\n} else if (counter % 5 === 0) {\n$('body').append(\"<p>Buzz</p>\");\n} else {\n$('body').append(\"<p>\" + counter + \"</p>\");\n}\n}\n}", "title": "" }, { "docid": "ae5f740543563bdca8174232cf63b2bb", "score": "0.59486663", "text": "function fizzbuzz() {\nif (count % 3 === 0 && count % 5 === 0) {\n output.push(\"FizzBuzz\");\n} else if (count % 3 === 0) {\n output.push(\"Fizz\");\n} else if (count % 5 === 0) {\n output.push(\"Buzz\");\n} else {\n output.push(count);\n}\n\ncount++;\n\n console.log(output);\n}", "title": "" }, { "docid": "64a9ef6be7012af07d57f2f402bf8de7", "score": "0.5942156", "text": "function q6(){\nfor( let i=1 ; i<5; i++){\n\n let correctNumber = prompt('Guess the number of my favorite Movie from 1-10 ?');\n correctNumber = Number(correctNumber);\n console.log(correctNumber);\n\n if(correctNumber == 8){\n alert('Great Thats it !')\n score++;\n break;\n\n }\n\n else if( correctNumber >= 5 && correctNumber < 8 ){\n alert('Too close, Guess again');\n }\n else if( correctNumber >=1 && correctNumber <5 ){\n alert('too Low, Guess again');\n \n }\n else if( correctNumber >= 9 && correctNumber <= 10){\n\n alert('too high, Guess again');\n }\n\n if(i===4){\n\n alert('u are miss all your chances, the correct answer is 8 :(');\n break;\n}}\n}", "title": "" }, { "docid": "b0923ea46a3fbac2954e2240c1001521", "score": "0.5931667", "text": "function buzzMath(){\nlet disp = document.getElementById(\"myForm\"); \n \n\n\n //establish for loop to print 1-100\n for (var i= 1; i <=100; i++){\n\n switch (0){\n case (i % 15):\n disp.innerHTML +=\"Fizz Buzz\"+ \"<br>\";\n \n break;\n//look if it is divisable by 15 if yes log fizzbuzz if not move next \n case (i % 3):\n disp.innerHTML +=\"Fizz\"+ \"<br>\";\n \n break;\n//look if divisable by 3 if yes log fizz if not move next \n case (i % 5):\n disp.innerHTML +=\"Buzz\"+ \"<br>\";\n \n break\n//look if divisable by 5 if yes log buzz if not move next \n default:\n disp.innerHTML +=(i)+ \"<br>\";\n//if none of the previous statements are true log i from the loop\n \n \n }\n }\n }", "title": "" }, { "docid": "42007c56efc7871f1086032c5fcd9a95", "score": "0.59245545", "text": "function test3ToFizz(){\n const replace3ToFizz = (index) => index % 3 === 0 ? `Fizz` : index;\n\n const cases = [\n {\n input: [1, 5, null, replace3ToFizz],\n expect: `1 2 Fizz 4 5`\n }, {\n input: [1, 5, `,`],\n expect: `1,2,3,4,5`\n }, {\n input: [1, 6, `,`, replace3ToFizz],\n expect: `1,2,Fizz,4,5,Fizz`\n }, {\n input: [1, 1],\n expect: `1`\n }\n ];\n\n verifyTestResults(cases);\n}", "title": "" }, { "docid": "8f442ac084b0bc0d428f971be407b8c8", "score": "0.5917961", "text": "function fizzBuzz(n1){\n for(let i = 1;i<=n1;i++){\n if(i%3===0 && i%5===0){\n console.log('fizzbuzz');\n }else if(i%3===0){\n console.log('fizz');\n }else if (i%5===0) {\n console.log('buzz');\n }else{\n console.log(i);\n }\n }\n}", "title": "" }, { "docid": "31cd8ba1522b5da4773240c4340745f4", "score": "0.5911548", "text": "function fizzBuzz () {\n var result = \"\";\n for (i = 1; i <= 100; i++) {\n if (i % 3 == 0) {\n result +=\"Fizz<br>\";\n } else (i % 5 == 0) {\n result +=\"Buzz<br>\";\n } else (i % 3 == 0 && i % 5 == 0) {\n result += \"FizzBuzz<br>\";\n } else\n result += i + \"<br>\";\n }\n$('FizzBuzz').html(result);\n}", "title": "" }, { "docid": "100a720bf130e8cd227e43bde4ec37fb", "score": "0.5910866", "text": "function fizzBuzz(i, max) {\n// for (let i = 1; i <= 100; i++) {\n// switch(true) {\n// case i % 5 === 0 && i % 3 === 0:\n// console.log('Fizzbuzz');\n// break;\n// \n// case i % 3 === 0:\n// console.log('Fizz');\n// break;\n// \n// case i % 5 === 0:\n// console.log('Buzz');\n// break;\n// \n// default:\n// console.log(i);\n// break;\n// }\n// }\n if(i % 5 === 0 && i % 3 === 0) {\n \tconsole.log('Fizzbuzz');\n\t\t}\n if(i % 3 === 0) {\n console.log('Fizz');\n } \n if(i % 5 === 0) {\n console.log('Buzz');\n\t\t}\n console.log(i);\n\t\tif (i < max) {\n\t\t\treturn fizzBuzz(i + 1, max);\t\n\t\t}\n\t\t\n}", "title": "" }, { "docid": "c6f1ffb4e2531a2568c5f97339fa9ddd", "score": "0.5910334", "text": "function printFizzBuzz() {\n var output = document.getElementById('output');\n var msg = document.getElementById('msg');\n var count = document.getElementById(\"count\");\n msg.innerHTML = \"\";\n output.innerHTML = \"\";\n count.innerHTML = \"\";\n let fizz = 0, buzz = 0, fizzbuzz = 0, numberCount = 0; // using for count\n var num = document.getElementById('number').value;\n //writing some edge cases to check empty or negative number \n if (isEmpty()) {\n return isEmpty();\n } else {\n\n msg.innerHTML = \"FizzBuzz from <b> 1 </b> to <b>\" + num + \"</b>\";\n // console.log(num);\n for (var i = 1; i <= num; i++) {\n if (i % 15 == 0) {\n // console.log(\"FizzBuzz\");\n output.innerHTML += ` <span class=\"op1 text-wrap\">${\"FizzBuzz\"}</span>`;\n fizzbuzz++;\n } else if (i % 5 == 0) {\n // console.log(\" Buzz \");\n output.innerHTML += ` <span class=\"op2 text-wrap\">${\"Buzz\"} </span>`;\n buzz++;\n\n } else if (i % 3 == 0) {\n // console.log(\"Fizz\");\n output.innerHTML += ` <span class=\"op3 text-wrap\">${\"Fizz\"} </span>`;\n fizz++;\n\n } else {\n numberCount++;\n // console.log(i);\n output.innerHTML += ` <span class=\"op4 text-wrap\"> ${i} </span>`;\n\n }\n }\n //i am using literals\n count.innerHTML = `Total Fizz :<b> ${fizz}</b> , Total Buzz : <b> ${buzz}</b> ,Total FizzBuzz : <b> ${fizzbuzz}</b> , Total Numbers : <b> ${numberCount}</b> `;\n reset();\n }\n}", "title": "" }, { "docid": "9f4ca4385fb11c1d4d69549e3c9dbb07", "score": "0.5906883", "text": "function fizzbuzz(num) {\n const arr = [];\n for (let i = 1; i <= num; i++) {\n if (i % 3 == 0 && i % 5 !== 0) { arr.push(\"fizz\")}\n else if (i % 3 !== 0 && i % 5 == 0) { arr.push(\"buzz\")}\n else if (i % 3 == 0 && i % 5 == 0) { arr.push(\"fizzbuzz\")}\n else { arr.push(i) }\n }\n return arr;\n}", "title": "" }, { "docid": "f5b0ab3c00bd19db0d58ba35f1247661", "score": "0.59039897", "text": "function questionSeven() {\n // Use a do while loop to execute code to loop through a series of if else statments.\n // Start the loop at 0.\n var counter = 0;\n do {\n counter++;\n var answerSeven = prompt('Knowing that I was in the military, can you guess how many times I\\'ve moved in the past?');\n console.log('The user answer to question seven is: ' + answerSeven);\n\n if(answerSeven <= 10) {\n alert('That\\'s too low aim a little higher.');\n console.log('The user answer to question seven is: ' + answerSeven);\n // Give feedback if answer is less than or equal to 10.\n }\n else if(answerSeven > 10 && answerSeven <= 15) {\n alert('Try again, but aim a little higher.');\n console.log('The user answer to question seven is: ' + answerSeven);\n // Give feedback if answer is greater than 10 and less than or equal to 15.\n }\n else if(answerSeven > 15 && answerSeven <= 19) {\n alert('Your close, but no cigar. Guess again but just a wee bit higher.');\n console.log('The user answer to question seven is: ' + answerSeven);\n // Give feedback if answer is greater than 15 and less than or equal to 19.\n }\n else if(answerSeven > 20){\n alert('Too high!');\n console.log('The user answer to question seven is: ' + answerSeven);\n }\n else if(answerSeven == 20) {\n alert('Wow, you are correct. Good guess!');\n correctAnswers.push(7);\n // Use the keyword break to stop the loop once the correct input is evaluated.\n break;\n // Give feedback if answer is equal to 20.\n // Use double equals to except just the value of 20.\n }\n // Run the loop four times.\n } while (counter < 4);\n}", "title": "" }, { "docid": "7d2eff512544190303730591a86a5fc9", "score": "0.58852345", "text": "function fizzBuzz() {\n startExercise('fizzbuzz');\n for (let i = 1; i <= 100; i++) {\n let str = '';\n if (i % 3 == 0) str += 'fizz';\n if (i % 5 == 0) str += 'buzz';\n if (str) console.log(`[${i}] ${str}`);\n }\n}", "title": "" }, { "docid": "f03af06a00f3166fbb4ef3432a217c5b", "score": "0.58798134", "text": "function fizzbuzz(){\n for(let i = 1; i <= 100; i++){\n if( i % 15 === 0){\n console.log(i,\"fizzbuzz\");\n }\n else if(i % 3 == 0){\n console.log(i,\"Fizz\")\n }\n else if(i % 5 === 0){\n console.log(i,\"Buzz\")\n }\n else\n console.log(i);\n }\n}", "title": "" }, { "docid": "41997494cdd36a4bc83c991a6ef6fb43", "score": "0.58708626", "text": "function fizzBuzzTernary() { \n for (var i = 1; i <= 100; i++) {\n var f = i % 3 == 0, b = i % 5 == 0;\n console.log(f ? b ? \"FizzBuzz\" : \"Fizz\" : b ? \"Buzz\" : i);\n }\n}", "title": "" }, { "docid": "22ef675d012c534b41867893c2d3153a", "score": "0.58700913", "text": "function exercise1(num1) {\n let answer1 = \"\";\n if (num1 > 10) {\n answer1= \"The value of num1 is \" +num1 + \" and is greater than 10\"\n };\n return answer1;\n }", "title": "" }, { "docid": "d9eea38e5fa75c73d0534b89bec3c9de", "score": "0.5867246", "text": "function checkNumber(num) {\n\tfor (let i = 1; i <= num; i++) {\n\t\t// Se crea una nueva etiqueta <li></li>\n\t\tlet element = document.createElement(\"li\");\n\t\telement.innerText = \"\";\n\t\tif (i % 3 === 0) {\n\t\t\telement.innerText += \"Fizz\";\n\t\t\telement.className = \"fb\";\n\t\t}\n\t\tif (i % 5 === 0) {\n\t\t\telement.innerText += \"Buzz\";\n\t\t\telement.className = \"fb\";\n\t\t}\n\t\tif (i % 3 === 0 && i % 5 === 0) {\n\t\t\telement.innerText = \"FizzBuzz\";\n\t\t\telement.className = \"fizzB\";\n\t\t}\n\t\tif (element.innerText === \"\") {\n\t\t\telement.innerText = i;\n\t\t}\n\t\tdocument.getElementById(\"currentP\").appendChild(element);\n\t}\n}", "title": "" }, { "docid": "a57d1321bd15737e89363a622ab19e88", "score": "0.58533174", "text": "function fizzbuzz1(num) {\n let count = 1;\n let result = [];\n while (count <= num) {\n let fizzbuzz = '';\n if (count % 3 === 0) {\n fizzbuzz += 'fizz';\n }\n if (count % 5 === 0) {\n fizzbuzz += 'buzz';\n }\n result.push(fizzbuzz ? fizzbuzz : count);\n count += 1;\n }\n return result;\n}", "title": "" }, { "docid": "e5738cb6d8655a790ab3e34f095947db", "score": "0.5843163", "text": "function whatClassAreYou(num)\n {\n var chosenClass = \"\";\n \n if(num % 3 === 0 && num % 5 === 0)\n {\n chosenClass = \"fizz buzz\";\n }\n if(num % 3 === 0 && num % 5 !== 0)\n {\n chosenClass = \"fizz\";\n }\n if(num % 3 !== 0 && num % 5 === 0)\n {\n chosenClass = \"buzz\";\n }\n return chosenClass;\n }", "title": "" } ]
8ce48be45859659367ba8e23d7848818
// // EXTENSIONS // //////////////////////////////////// // MISC //////////////////////////// // PVector
[ { "docid": "4c396e8b6529645cb4227af14fe9935b", "score": "0.6524768", "text": "function PVector(x, y, z) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }", "title": "" } ]
[ { "docid": "77669f3c999573d871817ed9d4fbf509", "score": "0.68854606", "text": "function Vector(p1, p2, color) {\n this.p1 = (p1 != null && p1.constructor.name == \"GenericObject\" && p1.classname == \"Point\") ? p1 : new Point();\n this.p2 = (p2 != null && p2.constructor.name == \"GenericObject\" && p2.classname == \"Point\") ? p2 : new Point();\n this.rect = new Rect(p1, p2);\n this.origin = new Point();\n GenericObject.call(this, \"Vector\");\n}", "title": "" }, { "docid": "9fd6b6b5bcb035197a1f177f3d2d960f", "score": "0.6867693", "text": "function vectorType(){\n\tfunction Vector(x, y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n\tVector.prototype.plus = function(vector){\n\t\tvar newX = this.x + vector.x;\n\t\tvar newY = this.y + vector.y;\n\t\tvar newVect = new Vector(newX, newY);\n\t\treturn newVect;\n\t};\n\n\tVector.prototype.minus = function(vector){\n\t\tvar newX = this.x - vector.x;\n\t\tvar newY = this.y - vector.y;\n\t\tvar newVect = new Vector(newX, newY);\n\t\treturn newVect;\n\t};\n\n\tvar vectorA = new Vector(3,4);\n\tvar vectorB = new Vector(2,1);\n\tconsole.log(\"vectorA.x , vectorA.y -> \" + vectorA.x + \" , \" + vectorA.y);\n\tconsole.log(\"vectorB.x , vectorB.y -> \" + vectorB.x + \" , \" + vectorB.y);\n\n\tvar vectorAdd = vectorA.plus(vectorB);\n\tconsole.log(\"vectorAdd.x , vectorAdd.y-> \" + vectorAdd.x + \" , \" + vectorAdd.y);\n\n\tvar vectorMinus = vectorA.minus(vectorB);\n\tconsole.log(\"vectorMinus.x , vectorMinus.y -> \" + vectorMinus.x + \" , \" + vectorMinus.y);\n\n\tObject.defineProperty(Vector.prototype, \"length\", {\n\t\tget: function(){\n\t\t\tvar squared = (this.x*this.x) + (this.y*this.y);\n\t\t\treturn Math.sqrt(squared);\n\t\t}\n\t})\n\n\tconsole.log(\"vectorA.length: \" + vectorA.length);\n}", "title": "" }, { "docid": "e0126730832a2de7bc81246ea2fc0b84", "score": "0.6643751", "text": "function AddPointVector(p,v){\r\n\t\t\tvar r = new Point3D(p.x+v.ux,p.y+v.uy,p.z+v.uz);\r\n\t\t\treturn r;\r\n\t\t}", "title": "" }, { "docid": "ad771d81399795bda9421ceebef21af0", "score": "0.6581393", "text": "getVector(){\n return new Vector(this.x, this.y)\n }", "title": "" }, { "docid": "bf0bb10ccc11237c3b4fd87a8e0ac17c", "score": "0.65190935", "text": "function Vector(x, y)\n{\n this.x = x;\n this.y = y;\n this.Add = function(vec)\n { return new Vector(this.x + vec.x, this.y + vec.y)};\n this.Sub = function(vec)\n { return new Vector(this.x - vec.x, this.y - vec.y)};\n this.Scale = function(doub)\n { return new Vector(this.x * doub, this.y * doub)};\n this.Dist = function(vec)\n {\n dx = vec.x - this.x;\n dy = vec.y - this.y;\n return (Math.sqrt(dx * dx + dy * dy));\n };\n this.Dist2 = function(vec)\n {\n dx = vec.x - this.x;\n dy = vec.y - this.y;\n return (dx * dx + dy * dy);\n };\n this.Length = function()\n {\n return (Math.sqrt(this.x * this.x + this.y * this.y));\n };\n this.Length2 = function()\n {\n return (this.x * this.x + this.y * this.y);\n };\n this.Dot = function(vec)\n {\n return (this.x * vec.x + this.y * vec.y);\n };\n this.RowMultiply = function(vec)\n {\n return new Vector(this.x * vec.x, this.y * vec.y);\n };\n this.PerpLeft = function()\n {\n return new Vector(this.y, -this.x);\n };\n}", "title": "" }, { "docid": "9fd9513540b2f11b284c792b2498fcdb", "score": "0.64908135", "text": "function Vector(x, y, z) {\n\tthis.x = x;\n\tthis.y = y;\n\tthis.z = z;\n\t\n\tthis.add = function(vector) {\n\t\tvar rtn = new Vector(0.0, 0.0, 0.0);\n\t\trtn.x = this.x + vector.x;\n\t\trtn.y = this.y + vector.y;\n\t\trtn.z = this.z + vector.z;\n\t\t\n\t\treturn rtn;\n\t}\n\t\n\tthis.sub = function(vector){\n\t\tvar rtn = new Vector(0.0, 0.0, 0.0);\n\t\trtn.x = this.x - vector.x;\n\t\trtn.y = this.y - vector.y;\n\t\trtn.z = this.z - vector.z;\n\t\t\n\t\treturn rtn;\n\t}\n\t\n\tthis.scale = function(scalar) {\n\t\tthis.x = this.x * scalar;\n\t\tthis.y = this.y * scalar;\n\t\tthis.z = this.z * scalar;\n\t}\n\t\n\tthis.scalarMult = function(scalar) {\n\t\tvar rtn = new Vector(this.x, this.y, this.z);\n\t\trtn.x = rtn.x * scalar;\n\t\trtn.y = rtn.y * scalar;\n\t\trtn.z = rtn.z * scalar;\n\t\t\n\t\treturn rtn;\n\t}\n\t\n\tthis.dotProduct = function( vector ) {\n\t\treturn (this.x * vector.x + this.y * vector.y + this.z * vector.z);\n\t}\n\t\n\tthis.copy = function() {\n\t\tvar rtn = new Vector(this.x, this.y, this.z);\n\t\treturn rtn;\n\t}\n\t\n\tthis.toFloat32Array = function() {\n\t\treturn new Float32Array([\n\t\t\tthis.x,\n\t\t\tthis.y,\n\t\t\tthis.z\n\t\t]);\n\t}\n\t\n}", "title": "" }, { "docid": "522c9b287d2b2928a2263ddac0489c88", "score": "0.64741045", "text": "function Vector(x, y){\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "0e3b274ef8c48186a656a53830f9b404", "score": "0.64715046", "text": "function Vector(x, y) { \r\n this.x = x;\r\n this.y = y;\r\n}", "title": "" }, { "docid": "ad13da7b02b34e156dd0ef071ea42b4d", "score": "0.64694786", "text": "function Vector(x, y) {\nthis.x = x;\nthis.y = y;\n}", "title": "" }, { "docid": "554cd1f46c01eb9c4e0e76b5ce78721a", "score": "0.6460928", "text": "function Vector(x,y){\n this.x = x;\n this.y = y\n}", "title": "" }, { "docid": "d3fbdafb9f25abf347c9dfef3e3c8c74", "score": "0.6442587", "text": "function Vector(x,y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "d3fbdafb9f25abf347c9dfef3e3c8c74", "score": "0.6442587", "text": "function Vector(x,y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "4b8de2338f43402d567822696117317d", "score": "0.6436816", "text": "function Vector(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n}", "title": "" }, { "docid": "7dd7ec14d2f15416d656296587449640", "score": "0.64219385", "text": "function Vector(x, y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "7dd7ec14d2f15416d656296587449640", "score": "0.64219385", "text": "function Vector(x, y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "7dd7ec14d2f15416d656296587449640", "score": "0.64219385", "text": "function Vector(x, y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "7dd7ec14d2f15416d656296587449640", "score": "0.64219385", "text": "function Vector(x, y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "a0c0def36177b298e8acb0e07a0684d1", "score": "0.6402095", "text": "add(v) { return new Vector(this.x + v.x , this.y + v.y) }", "title": "" }, { "docid": "4f488f26feedb2dfa93f00f350a7271b", "score": "0.6394576", "text": "function Vector(x,y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "6c42199a1bd7c9062f6ea3880e52b210", "score": "0.63771576", "text": "function Vector(x,y) {\n this.x=x;\n this.y=y;\n //the following functions return new vectors.\n this.minus = function(other) {\n return new Vector(this.x-other.x, this.y-other.y);\n }\n this.add = function(other) {\n return new Vector(this.x+other.x, this.y+other.y);\n }\n this.timesScalar = function(scalar) {\n return new Vector(this.x*scalar, this.y*scalar);\n }\n this.divScalar = function(scalar) {\n return new Vector(this.x/scalar, this.y/scalar);\n }\n this.dot = function(other) {\n return this.x*other.x+this.y*other.y;\n }\n //cross product actually returns a vector, but in the case of two-dimensional vectors (like force and lever arm), the cross product only has one non-zero value (like torque)\n this.cross = function(other) {\n return this.x*other.y-this.y*other.x;\n }\n //magnitude of vector\n this.mag = function() {\n return Math.sqrt(this.x*this.x+this.y*this.y);\n }\n //direction of vector, counterclockwise from east in radians\n this.direc = function() {\n return Math.atan2(this.y, this.x);\n }\n}", "title": "" }, { "docid": "066f94fc73226c482ba814d95c0b323b", "score": "0.637425", "text": "function Vector(x, y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "ed388de13dc791235c23b9320f1ac8b4", "score": "0.6366327", "text": "function getVector(base) {\n\t\tif (isNull(base)) {\n\t\t\tif (\"process\" in global) {\n\t\t\t\tbase = new BaseMetrics();\n\t\t\t} else {\n\t\t\t\t//for Browser (client side)\n\t\t\t\tbase = new CVSS3_Base();\n\t\t\t}\n\t\t}\n\t\treturn base.getVector()\n\t\t\t\t+ '/' + this.e.getVector()\n\t\t\t\t+ '/' + this.rl.getVector()\n\t\t\t\t+ '/' + this.rc.getVector();\n\t}", "title": "" }, { "docid": "8fe3661e14ab5f44b92f41c3c37e8317", "score": "0.6347495", "text": "function Vector(x, y) {\n\tthis.x = x\n\tthis.y = y\n}", "title": "" }, { "docid": "8fe3661e14ab5f44b92f41c3c37e8317", "score": "0.6347495", "text": "function Vector(x, y) {\n\tthis.x = x\n\tthis.y = y\n}", "title": "" }, { "docid": "5731363841ffee8f90665437bd2f1eb2", "score": "0.62778133", "text": "function Vector(x, y) {\n if (y == undefined) y = 0;\n if (x == undefined) x = 0;\n if (typeof x == \"object\") {\n y = x[1];\n x = x[0];\n }\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "b0a14c106866774edd83cf2a61bb5090", "score": "0.6248014", "text": "function vec(vector) {\n return new euk.Vector(vector[0],vector[1]);\n }", "title": "" }, { "docid": "67efca28515c3dd99b793d97ca5c5967", "score": "0.62209404", "text": "function Vector (x, y) {\n\tthis.x = x;\n\tthis.y = y;\n}", "title": "" }, { "docid": "bd77f42c0eeaaaea9d4f560b37a19418", "score": "0.6210408", "text": "function Vector(x, y) {\n\tthis.x = x;\n\tthis.y = y;\n}", "title": "" }, { "docid": "3379f2dcb82c533b1755f8641bc48d2a", "score": "0.6199823", "text": "function Vector(x, y) {\n\t \tthis.x = x;\n\t \tthis.y = y;\n\t\t}", "title": "" }, { "docid": "8b8ec6cf17983e89add952d1d4da9f6f", "score": "0.61675566", "text": "function Vec(x, y) {\n this.x = x;\n this.y = y;\n}", "title": "" }, { "docid": "e329ae59b9d7866fba487c4e7bf82deb", "score": "0.6137477", "text": "function Vector(x, y, z) {\n this.elements = [x, y, z];\n}", "title": "" }, { "docid": "2c1e053e9caac7b384e38e70632e3641", "score": "0.61368257", "text": "add(vector) {\n this.x += vector.x;\n this.y += vector.y;\n }", "title": "" }, { "docid": "75d841d5453fe7a0fa4b8f2222aac719", "score": "0.6134657", "text": "function Vector(x,y)\n{\n\tthis.x = x;\n\tthis.y = y;\n}", "title": "" }, { "docid": "d47177e2570a940a106e03679f035900", "score": "0.61328334", "text": "function Vector(x, y) {\n this.x = x || 0;\n this.y = x || 0;\n}", "title": "" }, { "docid": "b008c13d772f8b8d933313c2c0f3065f", "score": "0.611771", "text": "function Vector(x, y) {\n var xPos = x,\n yPos = y;\n \n this.x = function(val) {\n var ret = xPos;\n if(_.isNumber(val)) {\n xPos = val;\n }\n return ret;\n }\n this.y = function(val) {\n var ret = yPos;\n if(_.isNumber(val)) {\n yPos = val;\n }\n return ret;\n }\n this.toString = function() { return [xPos, yPos].join(', '); }\n this.add = function(vector) { return new Vector(xPos + vector.x() , yPos + vector.y()); }\n this.subtract = function(vector) { return new Vector(xPos - vector.x() , yPos - vector.y()); }\n this.multiply = function(operand) { return new Vector(xPos * operand, yPos * operand); }\n this.distance = function(vector) { return new Vector(Math.abs(xPos - vector.x()), Math.abs(yPos - vector.y())); }\n this.isSame = function(vector) {\n return (vector.x() === xPos && vector.y() === yPos);\n }\n // override this for a operator overriding\n this.valueOf = function() { }\n // return which direction the other vector is in\n this.cardinalDirection = function(vector) {\n var ret = '';\n // if this vector is somewhere north of here \n if(yPos < vector.y()) {\n ret += 'S'; // south\n } else if(yPos > vector.y()) { // if this vector is south of the other\n ret += 'N'; // north\n }\n\n // if this is vector is somewhere West of here\n if(xPos < vector.x()) {\n ret += 'E';\n } else if(xPos > vector.x()) { // if this vector is somewhere east of here\n ret += 'W';\n }\n\n return ret;\n }\n this.cardinalVector = function(dir) {\n var ret = new Vector(0, 0),\n strHas = function(str, q) { return str.indexOf(q) > -1; }\n if(strHas(dir, 'E')) {\n ret.x(1);\n } else if(strHas(dir, 'W')) {\n ret.x(-1);\n } \n if(strHas(dir, 'N')) {\n ret.y(-1);\n } else if(strHas(dir, 'S')) {\n ret.y(1);\n } \n\n return ret;\n };\n this.moveXSpacesTowards = function(x, target) {\n // create a new vector that is that x closer to where we want to go\n return this.cardinalVector(this.cardinalDirection(target))\n .multiply(x)\n .add(this);\n }\n }", "title": "" }, { "docid": "d58dacd9cd5a763ae42da51da7082bf7", "score": "0.6112374", "text": "function Vector(x, y, z) {\n\t\tthis.elements = [ x, y, z ];\n\t}", "title": "" }, { "docid": "d321fb719635f923e5ac842838183272", "score": "0.61122715", "text": "function Vector(x, y) {\r\n this.x = x || 0;\r\n this.y = x || 0;\r\n}", "title": "" }, { "docid": "6157887f21c25cbb50b4358ee8d6a7e2", "score": "0.61080027", "text": "function Vector(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n}", "title": "" }, { "docid": "43ee81897ec87b4ddac65d510d9d0cd9", "score": "0.6082558", "text": "function Vector(x,y)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "title": "" }, { "docid": "e8ef38f7e6a23eb1638736d9ae8a898f", "score": "0.6076027", "text": "function Vector(x, y, z) {\n\tthis.x = x;\n\tthis.y = y;\n\tthis.z = z;\n\t\n\tthis.add = function(vector) {\n\t\tvar rtn = new Vector(0.0, 0.0, 0.0);\n\t\trtn.x = this.x + vector.x;\n\t\trtn.y = this.y + vector.y;\n\t\trtn.z = this.z + vector.z;\n\t\t\n\t\treturn rtn;\n\t}\n\t\n\tthis.sub = function(vector) {\n\t\tvar rtn = new Vector(0.0, 0.0, 0.0);\n\t\trtn.x = this.x - vector.x;\n\t\trtn.y = this.y - vector.y;\n\t\trtn.z = this.z - vector.z;\n\t\treturn rtn;\n\t}\n\t\n\tthis.scale = function(scalar) {\n\t\tthis.x = this.x * scalar;\n\t\tthis.y = this.y * scalar;\n\t\tthis.z = this.z * scalar;\n\t}\n\t\n\tthis.scalarMult = function(scalar) {\n\t\tvar rtn = new Vector(this.x, this.y, this.z);\n\t\trtn.x = rtn.x * scalar;\n\t\trtn.y = rtn.y * scalar;\n\t\trtn.z = rtn.z * scalar;\n\t\t\n\t\treturn rtn;\n\t}\n\t\n\tthis.dotProduct = function( vector ) {\n\t\treturn (this.x * vector.x + this.y * vector.y + this.z * vector.z);\n\t}\n\t\n\tthis.crossProduct = function(vector) {\n\t\t//use sarrus rule\n\t\tvar rtn = new Vector();\n\t\trtn.x = (this.y * vector.z - this.z * vector.y);\n\t\trtn.y = (this.z * vector.x - this.x * vector.z);\n\t\trtn.z = (this.x * vector.y - this.y * vector.x);\n\t\treturn rtn;\n\t}\n\t\n\tthis.magnitude = function() {\n\t\treturn Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2) + Math.pow(this.z, 2));\n\t}\n\t\n\tthis.normalize = function () {\n\t\tvar rtn = new Vector(this.x, this.y, this.z);\n\t\t\n\t\trtn = rtn.scalarMult(1/(this.magnitude()));\n\t\t\n\t\treturn rtn;\n\t}\n\t\n\tthis.copy = function() {\n\t\tvar rtn = new Vector(this.x, this.y, this.z);\n\t\treturn rtn;\n\t}\n\t\n\tthis.equals = function(vector) {\n\t\treturn (this.x == vector.x &&\n\t\t\t\tthis.y == vector.y &&\n\t\t\t\tthis.z == vector.z);\n\t}\n\t\n\tthis.toFloat32Array = function() {\n\t\treturn new Float32Array([\n\t\t\tthis.x,\n\t\t\tthis.y,\n\t\t\tthis.z\n\t\t]);\n\t}\n\t\n\t//normalList is used for determine a vertex normal when treating this as a point\n\tthis.normalList = [];\n\t\n\tthis.addNormal = function(normalVec) {\n\t\tthis.normalList.push(normalVec.copy());\n\t}\n\t\n\tthis.avgNorm = function() {\n\t\tif (this.normalList.length == 0) {\n\t\t\tconsole.log(\"Error : Vector.avgNorm called on empty normal list\");\n\t\t\treturn undefined;\n\t\t}\n\t\t\n\t\tvar basis = this.normalList[0].copy();\n\t\t\n\t\tfor ( var index = 1; index < this.normalList.length; ++index) {\n\t\t\tbasis = basis.add(this.normalList[index]);\n\t\t}\n\t\t\n\t\tbasis.scale(1/(this.normalList.length));\n\t\treturn basis;\n\t\t\n\t}\n\t\n\tthis.toFloat32Array = function() {\n\t\treturn new Float32Array([\n\t\t\tthis.x,\n\t\t\tthis.y,\n\t\t\tthis.z\n\t\t]);\n\t}\n}", "title": "" }, { "docid": "7c56330c3a7a262e773d63c31475552b", "score": "0.6060885", "text": "function Vector(x,y)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\t\n\t\t}", "title": "" }, { "docid": "f0568e9ad34d7ad1b6a6c0c35d701601", "score": "0.604293", "text": "function AddVector(u,v){\r\n\t\t\tvar r = new Vector3D(u.ux+v.ux, u.uy+v.uy, u.uz+v.uz);\r\n\t\t\treturn r;\r\n\t\t}", "title": "" }, { "docid": "efc8e010e1bfbf67ed4374cebb93e27d", "score": "0.6038288", "text": "addVectorToArray(vector)\n {\n let vertices = this.vertices;\n let colors = this.colors;\n\n let heightVec = this.defineHeight(vector);\n\n vertices.push(vector[0] + heightVec[0]);\n vertices.push(vector[1] + heightVec[1]);\n vertices.push(vector[2] + heightVec[2]);\n }", "title": "" }, { "docid": "4a10beacf25c8166a6871c2e64b19c3a", "score": "0.603362", "text": "function vec( x,y,vx,vy)\n{\n this.x = Number(x);\n this.y = Number(y);\n this.vx = Number(vx);\n this.vy = Number(vy);\n \n this.clone = function()\n {\n\treturn new vec(Number(this.x), Number(this.y), Number(this.vx), Number(this.vy) ); \n }\n\n this.normalize = function()\n {\n\tif( this.vx == 0 && this.vy == 0)\n\t{\n\t this.vx = this.vy = 0;\n\t} \n\telse\n\t{\n\t var mag = Math.sqrt( this.vx * this.vx + this.vy * this.vy);\n\t this.vx = this.vx / mag;\n\t this.vy = this.vy /mag;\n\t}\n\treturn this;\n }\n this.toString2 = function()\n {\n\treturn new String( \" \" + this.x + \",\" + this.y + \" , \" + this.vx + \",\" + this.vy ); \n }\n}", "title": "" }, { "docid": "d62d219cd8d48cd6a94f7caf5a0cf2e3", "score": "0.6031717", "text": "function projectOnToVector(point,vector){\r\n var projectionScaleFactor = (DotProduct(point,vector)/DotProduct(vector,vector))\r\n return [ projectionScaleFactor*vector[0],projectionScaleFactor*vector[1] ]\r\n \r\n}", "title": "" }, { "docid": "d16e727385f7150201be615c2f49365e", "score": "0.6019454", "text": "function vec3(){}", "title": "" }, { "docid": "d6f7291e6acb2404d6168c17c92e95ab", "score": "0.6004845", "text": "function Vector(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n}", "title": "" }, { "docid": "d6f7291e6acb2404d6168c17c92e95ab", "score": "0.6004845", "text": "function Vector(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n}", "title": "" }, { "docid": "381c56a44f4360d21e37b99abed0b31e", "score": "0.6003448", "text": "addVector(vector) {\n return new Position(this.collumn + vector.horizontal, this.row + vector.vertical);\n }", "title": "" }, { "docid": "859bb3e873ff42515b9235e6afd7c35c", "score": "0.5987978", "text": "static mult (vector, other) {\r\n if (typeof other === `number`) {\r\n return new Vector2(\r\n vector.x * other,\r\n vector.y * other\r\n );\r\n }\r\n }", "title": "" }, { "docid": "bafe7f51981d0e0057da3f83e2120c67", "score": "0.59828466", "text": "add(vector)\n {\n return new Vector2d(this.x + vector.x, this.y + vector.y);\n }", "title": "" }, { "docid": "e8842999a6138bc9f90ff65d3db6cb1b", "score": "0.59821564", "text": "function vector(magnitude, angle) {\n this.magnitude = magnitude;\n this.angle = angle;\n this.x = magnitude*Math.cos(angle);\n this.y = magnitude*Math.sin(angle);\n \n this.componentSet = function(x,y) {\n this.x = x;\n this.y = y;\n this.magnitude = Math.sqrt(Math.pow(this.x,2) + Math.pow(this.y,2));\n this.angle = Math.atan2(this.y, this.x);\n };\n \n this.add = function(vector2) {\n this.x += vector2.magnitude*Math.cos(vector2.angle);\n this.y += vector2.magnitude*Math.sin(vector2.angle);\n this.magnitude = Math.sqrt(Math.pow(this.x,2) + Math.pow(this.y,2));\n this.angle = Math.atan2(this.y, this.x);\n };\n \n this.resize = function(length) {\n if (this.magnitude !== 0) {\n this.x = length*this.x/this.magnitude;\n this.y = length*this.y/this.magnitude;\n this.magnitude = Math.sqrt(Math.pow(this.x,2) + Math.pow(this.y,2));\n this.angle = Math.atan2(this.y, this.x);\n }\n };\n}", "title": "" }, { "docid": "d33100ca1645686e2f8af7fb8d3582bc", "score": "0.59759706", "text": "function Vector(x, y) {\n\tthis.x = x || 0;\n\tthis.y = y || 0;\n}", "title": "" }, { "docid": "2fab3f62e6dbff5acb0544f7c2bc61e9", "score": "0.59749323", "text": "function Vector(x,y) {\n\tthis.x = x || 0;\n\tthis.y = y || 0;\n}", "title": "" }, { "docid": "63f868bf8b235e18984b8e0218bb41f7", "score": "0.5968547", "text": "plus(vector) {\n\treturn {\n x: this.x + vector.x,\n y: this.y + vector.y\n }\n }", "title": "" }, { "docid": "9a040ba8a0da34c0d38d020d96cc11af", "score": "0.5965506", "text": "static add(v1, v2) {\n try {\n if (!(v1 instanceof Vector) || !(v2 instanceof Vector))\n throw \"Vector.add: non-vector parameter\";\n else\n return (new Vector(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z));\n } // end try\n catch (e) {\n console.log(e);\n return (new Vector(NaN, NaN, NaN));\n }\n }", "title": "" }, { "docid": "4a31d73900d0a6b8899bfe594f1e6cee", "score": "0.59303826", "text": "function _pVec(v) {\n var xx = -v.y/v.x, yy = 1;\n var length = _len({x: xx, y: yy});\n return {x: xx/length, y: yy/length};\n }", "title": "" }, { "docid": "eb0ae997bbb5f4f56a038a4b6589560d", "score": "0.59245265", "text": "static add(v1,v2) {\r\n try {\r\n if (!(v1 instanceof Vector) || !(v2 instanceof Vector))\r\n throw \"Vector.add: non-vector parameter\";\r\n else\r\n return(new Vector(v1.x+v2.x,v1.y+v2.y,v1.z+v2.z));\r\n } // end try\r\n \r\n catch(e) {\r\n console.log(e);\r\n return(new Vector(NaN,NaN,NaN));\r\n }\r\n }", "title": "" }, { "docid": "f6a5d1e17aa74b3d63a4efd6ccd919a9", "score": "0.5920452", "text": "function Vector(x,y){\n\t\t\tthis.x = x || 0;\n\t\t\tthis.y = y || 0;\n\t\t}", "title": "" }, { "docid": "0dd8f992dce5839fa1808a9bf807dc91", "score": "0.59200186", "text": "function DotVector(u,v){\r\n\t\t\treturn u.ux*v.ux+u.uy*v.uy+u.uz*v.uz;\r\n\t\t}", "title": "" }, { "docid": "cd52a3f51cb9ec4f7b34751b05aef28f", "score": "0.591465", "text": "add(vector) {\n return new Vector2d(this.x+vector.getX, this.y+vector.getY);\n }", "title": "" }, { "docid": "148ee466bb1fa23cdac64c9390ebe021", "score": "0.5901128", "text": "transformPoint(vec) {\n if (vec instanceof Vector2) {\n return new Vector2(\n this.values[0]*vec.x+this.values[1]*vec.y,\n this.values[2]*vec.x+this.values[3]*vec.y\n );\n } else {\n throw new TypeError(\"vec not of type Vector2\");\n }\n }", "title": "" }, { "docid": "a03c9c8aeb11c6ec80c336b92f20924d", "score": "0.5870452", "text": "function unvec(vector) {\n return [vector.x,vector.y];\n }", "title": "" }, { "docid": "6c8a8866591e20d2933bbd80c7b0204f", "score": "0.5867655", "text": "function translation(point, vector, multiple){\n\t \tvar newPosition=[point[0]+vector[0]*multiple, point[1]+vector[1]*multiple, point[2]+vector[2]*multiple];\n\t \treturn newPosition;\n\t }", "title": "" }, { "docid": "a247e0fbfd4d8e8341407caf98cb4573", "score": "0.58586425", "text": "get x() {\n return this.vector.x;\n }", "title": "" }, { "docid": "ec55f47eb18d348beb87b50e02b68605", "score": "0.58527654", "text": "function getVectorFrom2Points(x,y,z,x1,y1,z1){\n vector=[x1-x,y1-y,z1-z];\n return vector;\n \n}", "title": "" }, { "docid": "cdf8b4c5f3837ff009c8e039e9376310", "score": "0.58430064", "text": "static add(v1,v2) {\n try {\n if (!(v1 instanceof Vector) || !(v2 instanceof Vector))\n throw \"Vector.add: non-vector parameter\";\n else\n return(new Vector(v1.x+v2.x,v1.y+v2.y,v1.z+v2.z));\n } // end try\n \n catch(e) {\n console.log(e);\n return(new Vector(NaN,NaN,NaN));\n }\n }", "title": "" }, { "docid": "f7fe9f72c61411da14630847e14bebb7", "score": "0.5842597", "text": "add(v) {\n let out = Object.create(Vec3.prototype);\n out.data = [0,0,0];\n out.data[0] = this.data[0] + v.data[0];\n out.data[1] = this.data[1] + v.data[1];\n out.data[2] = this.data[2] + v.data[2];\n\n return out;\n }", "title": "" }, { "docid": "56d75ae268b58aa06765d1d5fbbcf467", "score": "0.58424425", "text": "getUnitVector() {\n return new Point(this.x / this.length, this.y / this.length, this.z / this.length);\n }", "title": "" }, { "docid": "81568206c517b8fcdf9c14fa2af90556", "score": "0.58262914", "text": "static add(v1, v2) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (!(v1 instanceof vector) || !(v2 instanceof vector))\r\n\t\t\t\tthrow \"vector.add: Non-vector parameter\";\r\n\t\t\telse\r\n\t\t\t\treturn(new vector(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z));\r\n\t\t} // end add\r\n\r\n\t\tcatch(e) {\r\n\t\t\tconsole.log(e);\r\n\t\t\treturn(new vector(NaN, NaN, NaN));\r\n\t\t} // end catch\r\n\t\t\r\n\t}", "title": "" }, { "docid": "de654bccb8c770033faaa326be632198", "score": "0.5809667", "text": "static add(vector1, vector2) {\n return new Vector(vector1.x + vector2.x, vector1.y + vector2.y);\n }", "title": "" }, { "docid": "e922489ab31dd040a5edbd65de5ec293", "score": "0.5790243", "text": "function ParticleUtils() {}", "title": "" }, { "docid": "756599964b77e7d0da055bd09590f1e8", "score": "0.57790035", "text": "function SubtractPointVector(p,v){\r\n\t\t\tvar r = new Point3D(p.x-v.ux,p.y-v.uy,p.z-v.uz);\r\n\t\t\treturn r;\r\n\t\t}", "title": "" }, { "docid": "17962b2671705a46572972aa06a668e3", "score": "0.5770696", "text": "static TransformVectorIntoVersor(vector)\n\t{\n\t\t//Tranform curr_sub_ref_x vector in a versor\n\t\tvar magnitude = this.GetMagnitudeOfVector(vector);\n\t\tfor (var i = 0; i < vector.length; i++)\n\t\t{\n\t\t\tvector[i] /= magnitude;\n\t\t}\n\t}", "title": "" }, { "docid": "46819c1c967b830e3790d8b3a9e0c19a", "score": "0.57574534", "text": "function ElementVector(vec, eqnums) {\n // TODO: input check\n this.vector = vec;\n this.eqnums = eqnums;\n}", "title": "" }, { "docid": "d8d4ed77291206eecf9b20e1de178645", "score": "0.575457", "text": "function UnitVector(x, y) {\n this.x = x;\n this.y = y;\n this.axis = undefined;\n this.slope = y / x;\n this.normalSlope = -x / y;\n Object.freeze(this);\n}", "title": "" }, { "docid": "d8d4ed77291206eecf9b20e1de178645", "score": "0.575457", "text": "function UnitVector(x, y) {\n this.x = x;\n this.y = y;\n this.axis = undefined;\n this.slope = y / x;\n this.normalSlope = -x / y;\n Object.freeze(this);\n}", "title": "" }, { "docid": "710b2cb81158c4d5108c6d39849b3a52", "score": "0.5749474", "text": "function vect(x,y){return {x:x,y:y}}", "title": "" }, { "docid": "1d86d5422d643d4b25c89f3483b490bc", "score": "0.5745011", "text": "function multVector(a,b){\n\n\treturn {x: a.x * b, y: a.y * b};\n}", "title": "" }, { "docid": "8af6ec35dc99fdf6135319b508b50f7e", "score": "0.574071", "text": "function dotProd( v1, v2 ) {\n try {\n if ( !( v1 instanceof Vector ) || !( v2 instanceof Vector ) )\n throw \"vector not a vector\";\n \n // Perform dot product calculation\n return ( v1.x * v2.x ) + ( v1.y * v2.y ) + ( v1.z * v2.z );\n } // end try\n \n catch (e) {\n console.log(e);\n }\n} // end dot method", "title": "" }, { "docid": "71a1a06ba6657330309997fe96715f5a", "score": "0.573518", "text": "add(b_vec) {\n var res = new Vector2()\n res.x = this.x + b_vec.x;\n res.y = this.y + b_vec.y;\n return res\n }", "title": "" }, { "docid": "2bc59325180d1e97bc553348d8948d41", "score": "0.5731359", "text": "function _vecInContext(v, m) {\n\t return [\n\t v[0] * m[0] + v[1] * m[4] + v[2] * m[8],\n\t v[0] * m[1] + v[1] * m[5] + v[2] * m[9],\n\t v[0] * m[2] + v[1] * m[6] + v[2] * m[10]\n\t ];\n\t }", "title": "" }, { "docid": "2bc59325180d1e97bc553348d8948d41", "score": "0.5731359", "text": "function _vecInContext(v, m) {\n\t return [\n\t v[0] * m[0] + v[1] * m[4] + v[2] * m[8],\n\t v[0] * m[1] + v[1] * m[5] + v[2] * m[9],\n\t v[0] * m[2] + v[1] * m[6] + v[2] * m[10]\n\t ];\n\t }", "title": "" }, { "docid": "1dfd710e866735f51ec713fca635a466", "score": "0.57231516", "text": "vmul(vector, target = new Vec3()) {\n target.x = vector.x * this.x;\n target.y = vector.y * this.y;\n target.z = vector.z * this.z;\n return target;\n }", "title": "" }, { "docid": "55ce4c35208be2b074f9825a4b291073", "score": "0.5721345", "text": "addVectorLayer() {\n const vectorSource = this.getVectorSource();\n const layer = new VectorLayer({\n source: vectorSource\n });\n this.props.objInput.map.addLayer(layer);\n }", "title": "" }, { "docid": "a5e62dbb81322c0c7f0eb1a08bd090e7", "score": "0.57169217", "text": "function UnitVector(x, y) {\n\t this.x = x;\n\t this.y = y;\n\t this.axis = undefined;\n\t this.slope = y / x;\n\t this.normalSlope = -x / y;\n\t Object.freeze(this);\n\t}", "title": "" }, { "docid": "50be55a85f17bb0c6de7d5eedbf8854d", "score": "0.5713593", "text": "add(v2) {\n\t\tlet newx1 = this.x1 + v2.x1;\n\t\tlet newx2 = this.x2 + v2.x2;\n\t\treturn new Vector2D(newx1, newx2, VECTOR_FORMS.CARTESIAN);\n\t}", "title": "" }, { "docid": "5844749396c37888c9d5ccffa9f7c301", "score": "0.57115316", "text": "dot(vector) {\n return this.x*vector.getX + this.y*vector.getY;\n }", "title": "" }, { "docid": "16219636214b92ff2f8bd87e8f3d7740", "score": "0.5709192", "text": "function createVector(r, d) {\n var gpxUrl = 'data/gpx/'+slugify(r+'_'+d)+'.gpx';\n var vector = new ol_layer_Vector({\n source: new ol_source_Vector({\n url: gpxUrl,\n format: new ol_format_GPX()\n }),\n style: function(feature) {\n var type = feature.getGeometry().getType();\n return style[type+r];\n },\n opacity: 1,\n visible: false\n });\n vectorLayers.push(vector);\n}", "title": "" }, { "docid": "af65ec8e30334a284b29a30a45d1cfe0", "score": "0.5706122", "text": "multiplyVectors(vector1, vector2) {\n\t\tconst y = vector1.y * vector2.y;\n\t\tconst x = vector1.x * vector2.x;\n\t\treturn new Vector(x, y);\n\t}", "title": "" }, { "docid": "cb4c024769cc126b60643a2e66e6cf28", "score": "0.57036155", "text": "constructor(){\n this.position = createVector(0,windowHeight-115);\n this.velocity=createVector(0.5,0.1);\n }", "title": "" }, { "docid": "971e24ebd0230e56b26184d4df2257b6", "score": "0.5703262", "text": "dotVector(vector)\n\t{\n\t\tif (vector != null && vector instanceof TwoVector)\n\t\t{\n\t\t\treturn new TwoVector(this._data[0][0] * vector.x + this._data[0][1] * vector.y,\n\t\t\t\t\t\t\tthis._data[1][0] * vector.x + this._data[1][1] * vector.y\n\t\t\t\t\t\t\t);\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t}", "title": "" }, { "docid": "3d1db1b929ba78b4974b82a437e59c15", "score": "0.5701849", "text": "function vector() {\n var array = [];\n\n return {\n get: function get(i) {\n return array[i];\n },\n store: function store(i, v) {\n array[i] = v;\n },\n append: function append(v) {\n array.push(v);\n }\n };\n}", "title": "" }, { "docid": "c79b9cbfb169592732650c1761578b47", "score": "0.5682452", "text": "function MultiplyVector(u,v){\r\n\t\t\tvar r = new Vector3D(u.ux*v.ux, u.uy*v.uy, u.uz*v.uz);\r\n\t\t\treturn r;\r\n\t\t}", "title": "" }, { "docid": "e08eb7385021a53e6025082717f47040", "score": "0.5665555", "text": "function Vec2 ( foo ) {\n\t\t\n\tif ( foo === undefined ) {\n this.y = 0;\n\t\tthis.x = 0;\n\t} else {\n\t\tif ( foo.x && foo.y ) {\n\t\t\tthis.x = foo.x;\n\t\t\tthis.y = foo.y;\n\t\t} else if ( isArray( foo ) ) {\n\t\t\tthis.x = foo[0];\n\t\t\tthis.y = foo[1];\n\t\t}\n\t}\n\t\n\tthis.copy = function ( vec ) {\n\t\tthis.x = vec.x;\n\t\tthis.y = vec.y;\n\t}\n\t\n\tthis.toInt = function() {\n\t\tvar vect = new Vec2( this );\n\t\tvect.x = justParseInt( vect.x );\n\t\tvect.y = justParseInt( vect.y );\n\t\treturn vect;\n\t}\n\t\n\tthis.unitFromAngle = function ( angle ) {\n\t\tthis.x = Math.cos( angle );\n\t\tthis.y = Math.sin( angle );\n\t}\n\t\n\tthis.normal = function () {\n\t\tvar magn = VSize( this );\n\t\tif ( magn === 0.0 ) {\n\t\t\tmagn = 0.000000001;\n\t\t}\n\t\t\n\t\tvar normal = new Vec2( this );\n\t\tnormal.div( magn );\n\t\treturn normal;\n\t}\n\t\n\tthis.dot = function ( other ) {\n\t\treturn this.x * other.x + this.y * other.y;\n\t}\n\t\n\tthis.lerp = function ( start, end, alpha ) {\n\t\tthis.x = lerp( start.x, end.x, alpha );\n\t\tthis.y = lerp( start.y, end.y, alpha );\n\t}\n\t\n\tthis.rotateCCW = function ( angle ) {\n\t\tthis.rotate( angle, false );\n\t}\n\t\n\tthis.rotateCW = function ( angle ) {\n\t\tthis.rotate( angle, true );\n\t}\n\n\tthis.rotate = function ( angle, cw ) {\n \n\t\tif ( cw ) {\n angle = -angle;\n\t\t}\n\t\t\n\t\tvar cos = Math.cos( angle );\n\t\tvar sin = Math.sin( angle );\n\t\t\n var newX = cos * this.x - sin * this.y;\n var newY = sin * this.x + cos * this.y;\n \n\t\tthis.x = newX;\n this.y = newY;\n }\n\t\n\tthis.div = function ( a ) {\t\t\n\t\tif ( isNumber( a ) ) {\n\t\t\tthis.x /= a;\n\t\t\tthis.y /= a;\n\t\t\treturn this;\n\t\t} else if ( a.x && a.y ) {\n\t\t\tthis.x /= a.x;\n\t\t\tthis.y /= a.y;\n\t\t\treturn this;\n\t\t}\n\t}\n\t\n\tthis.mult = function ( a ) {\t\t\n\t\tif ( isNumber( a ) ) {\n\t\t\tthis.x *= a;\n\t\t\tthis.y *= a;\n\t\t\treturn this;\n\t\t} else if ( a.x && a.y ) {\n\t\t\tthis.x *= a.x;\n\t\t\tthis.y *= a.y;\n\t\t\treturn this;\n\t\t}\n\t}\n\t\n\tthis.add = function ( a ) {\n\t\t\n\t\tif ( isNumber( a ) ) {\n\t\t\tthis.x += a;\n\t\t\tthis.y += a;\n\t\t\treturn this;\n\t\t} else if ( a.x && a.y ) {\n\t\t\tthis.x += a.x;\n\t\t\tthis.y += a.y;\n\t\t\treturn this;\n\t\t}\n\t}\n\t\n\tthis.sub = function ( a ) {\n\t\t\n\t\tif ( isNumber( a ) ) {\n\t\t\tthis.x -= a;\n\t\t\tthis.y -= a;\n\t\t\treturn this;\n\t\t} else if ( a.x && a.y ) {\n\t\t\tthis.x -= a.x;\n\t\t\tthis.y -= a.y;\n\t\t\treturn this;\n\t\t}\n\t}\n\t\n\tthis.toString = function ( ) {\n\t\treturn \"(\" + this.x + \", \" + this.y + \")\";\n\t}\n}", "title": "" }, { "docid": "39b1ae0d36797615a45edd66fa6a7537", "score": "0.566222", "text": "posVec(vec){\n\t\tvec = [for (v of vec) parseFloat(v)];\n\t\tconst vec3 = new THREE.Vector3(vec[0], vec[1], vec[2]);\n\t\t// vec3.setZ(-1.0*vec3.z);\n\t\treturn vec3\n\t\t// return new THREE.Vector3(vec[0], vec[1], vec[2]);\n\t}", "title": "" }, { "docid": "80a9d2e669c6d11fc8fc714d6532b416", "score": "0.565954", "text": "function Vector(x, y, z) {\n\tthis.x = x || 0;\n\tthis.y = y || 0;\n\tthis.z = z || 0;\n}", "title": "" }, { "docid": "b9dc2e78f71d2b81ca616fd7514763cc", "score": "0.5640351", "text": "function vectorSub(e, f) {\n return new Vector(f.x - e.x, f.y - e.y)\n}", "title": "" }, { "docid": "d043774dca46b7e7516b159e35afbf7b", "score": "0.5633396", "text": "function updateExtentsPoint(vec){\n\tif (typeof minX === \"undefined\" || minX > vec.x){\n\t\tminX = vec.x;\n\t}\n\tif (typeof minY === \"undefined\" || minY > vec.y){\n\t\tminY = vec.y;\n\t}\n\tif (typeof minZ === \"undefined\" || minZ > vec.z){\n\t\tminZ = vec.z;\n\t}\n\tif (typeof maxX === \"undefined\" || maxX < vec.x){\n\t\tmaxX = vec.x;\n\t}\n\tif (typeof maxY === \"undefined\" || maxY < vec.y){\n\t\tmaxY = vec.y;\n\t}\n\tif (typeof maxZ === \"undefined\" || maxZ < vec.z){\n\t\tmaxZ = vec.z;\n\t}\n}", "title": "" }, { "docid": "d7abaca144cdc06671a5f1b16c530ba2", "score": "0.56260353", "text": "static add (vector, other) {\r\n if (other instanceof Vector2) {\r\n return new Vector2(\r\n vector.x + other.x,\r\n vector.y + other.y\r\n );\r\n } else if (typeof other === `number`) {\r\n return new Vector2(\r\n vector.x + other,\r\n vector.y + other\r\n );\r\n } else return console.error(`Invalid type.`, typeof other);\r\n }", "title": "" } ]
eb201c92aac65c0612751d2001c157f4
:: STRING, > this Binds value to "attribs" OBJECT with given name:
[ { "docid": "91017546240d6f959c69edc381852849", "score": "0.7072945", "text": "setAttribute(name, value) {\n this._attribs[name] = value;\n return this;\n }", "title": "" } ]
[ { "docid": "55d3808113ae98e5d34fecdd021ae18a", "score": "0.6735408", "text": "getAttribute(name) {\n return this._attribs[name];\n }", "title": "" }, { "docid": "135b669f4e6bb930fc74aee5d22e44dc", "score": "0.6709633", "text": "function addRawAttr(el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({\n name: name,\n value: value\n });\n }", "title": "" }, { "docid": "01d09de24e105c96f27accb23baf8afc", "score": "0.668143", "text": "setAttribute(name,value){this.attributes[name]=value;}", "title": "" }, { "docid": "1692787d774a714fc939dcb925879f5e", "score": "0.664234", "text": "function addRawAttr(el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n }", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "7c4797c153a9ea8329be3221cecff223", "score": "0.6603849", "text": "function addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}", "title": "" }, { "docid": "6fdb0a560f6c5c9b505f833f28b8d2ec", "score": "0.65909445", "text": "function addRawAttr (el, name, value) {\n\t el.attrsMap[name] = value;\n\t el.attrsList.push({ name: name, value: value });\n\t}", "title": "" }, { "docid": "e246e7bbec16a3a9c70220921177b41f", "score": "0.65850097", "text": "function addRawAttr(el, name, value)\n {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n }", "title": "" }, { "docid": "44ecc6ff1a83d0041659959af47718ec", "score": "0.6481726", "text": "attribs(attribs) {\n if (attribs === undefined) {\n return this._attribs;\n } else {\n if (typeof(attribs) === \"object\") {\n this._attribs = attribs;\n return this;\n }\n throw new YngwieError(\"YngwieElement attributes can only be set with OBJECT\", attribs);\n }\n }", "title": "" }, { "docid": "11cf4125247bccc71467672c6a0548b6", "score": "0.6451327", "text": "function addRawAttr(el,name,value,range){\nel.attrsMap[name]=value;\nel.attrsList.push(rangeSetItem({name:name,value:value},range));\n}", "title": "" }, { "docid": "efcc2bcbb4b4f92e25c6cca6bc5e99a6", "score": "0.63771534", "text": "function addRawAttr(el, name, value, range) {\n el.attrsMap[name] = value\n el.attrsList.push(\n rangeSetItem({ name: name, value: value }, range),\n )\n }", "title": "" }, { "docid": "90356b24f790d9c67d1140de919adcdc", "score": "0.63652277", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n }", "title": "" }, { "docid": "90356b24f790d9c67d1140de919adcdc", "score": "0.63652277", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n }", "title": "" }, { "docid": "90356b24f790d9c67d1140de919adcdc", "score": "0.63652277", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n }", "title": "" }, { "docid": "90356b24f790d9c67d1140de919adcdc", "score": "0.63652277", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n }", "title": "" }, { "docid": "90356b24f790d9c67d1140de919adcdc", "score": "0.63652277", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n }", "title": "" }, { "docid": "90356b24f790d9c67d1140de919adcdc", "score": "0.63652277", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n }", "title": "" }, { "docid": "660de426ef7fd4c997db8ed779bfe708", "score": "0.6360627", "text": "function addRawAttr (el, name, value, range) {\r\n el.attrsMap[name] = value;\r\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\r\n }", "title": "" }, { "docid": "b38829ab2f553da257332bee92d46a3f", "score": "0.6354389", "text": "function addRawAttr (el, name, value, range) {\n\t el.attrsMap[name] = value;\n\t el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n\t }", "title": "" }, { "docid": "44fae9e015013244c77095b04f9483bb", "score": "0.63421434", "text": "setAttribute(attribute,value){this.attributes[attribute]=value;}", "title": "" }, { "docid": "047a12abee1d705550a61f516a8025b1", "score": "0.6337512", "text": "setAttribute(attributeName, value = null){\n if (this.attributes.indexOf(attributeName) > -1){\n \n }else{\n this.attributes.push(attributeName)\n }\n\n this[attributeName] = value\n }", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" }, { "docid": "bb71fd9f1e14092df3cf92ca63c0d639", "score": "0.63078207", "text": "function addRawAttr (el, name, value, range) {\n el.attrsMap[name] = value;\n el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}", "title": "" } ]
8daa402f8c8cd4bf608672371dbf2b2b
normalize possible array / string values into Object
[ { "docid": "0a6c9b9a52899e9e9ba9bf15b141278b", "score": "0.0", "text": "function normalizeStyleBinding (bindingStyle) {\n if (Array.isArray(bindingStyle)) {\n return toObject(bindingStyle)\n }\n if (typeof bindingStyle === 'string') {\n return parseStyleText(bindingStyle)\n }\n return bindingStyle\n}", "title": "" } ]
[ { "docid": "22f4f37ca819caa40a604ab1f040a327", "score": "0.608033", "text": "function array_to_object ( a )\r\n{\r\n var o = {};\r\n for ( var i = 0; i < a.length; i++ )\r\n {\r\n o[ a[ i ] ] = \"\";\r\n }\r\n return o;\r\n}", "title": "" }, { "docid": "54ce17e0aa65cd49fe5fefbfac265e46", "score": "0.59842986", "text": "toObject(s, convertCase) {\n let obj = {};\n let kv, key, val;\n angular.forEach((s || '').split('&'), (s) => {\n if (!s) {\n return;\n }\n\n //Split key/value and decode key\n kv = s.replace(/\\+/g, '%20').split('=');\n key = tryDecodeURIComponent(kv[0]);\n\n //If not defined, exit\n if (!angular.isDefined(key)) {\n return;\n }\n\n //Convert case and get value\n key = convertToCase(key, convertCase);\n val = angular.isDefined(kv[1]) ? tryDecodeURIComponent(kv[1]) : true;\n\n //Set property\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n }\n else if (angular.isArray(obj[key])) {\n obj[key].push(val);\n }\n else {\n obj[key] = [obj[key], val];\n }\n });\n return obj;\n }", "title": "" }, { "docid": "a259481832a6537b5bffe2bea385e122", "score": "0.598388", "text": "function _adjust_value(value) {\n\t\tif(!value) value = {};\n\t\tif(!_.isString(value.text)) value.text = '';\n\t\tif(!_.isArray(value.image)) value.image = [];\n\t\tif(!_.isArray(value.video)) value.video = [];\n\t\tif(!_.isArray(value.audio)) value.audio = [];\n\t\treturn value;\n\t}", "title": "" }, { "docid": "a13989438256a9c2e79511e8d881252c", "score": "0.59515494", "text": "function Arrify(input) {\n for (var prop in input) {\n console.log(typeof input[prop]);\n if (typeof input[prop] == 'string') {\n data[prop] = [input[prop]];\n } else {\n data[prop] = input[prop];\n }\n }\n }", "title": "" }, { "docid": "e5fcca1fb33c87b9beb18e50ce15364e", "score": "0.58279186", "text": "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "title": "" }, { "docid": "e5fcca1fb33c87b9beb18e50ce15364e", "score": "0.58279186", "text": "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "title": "" }, { "docid": "e5fcca1fb33c87b9beb18e50ce15364e", "score": "0.58279186", "text": "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "title": "" }, { "docid": "a021bec0ced58c085d94d64027008554", "score": "0.5815778", "text": "function reformat_arr(arr){\n return arr.map(obj =>{ //take the given array and create a new one\n return {\n name: obj.name,\n keywords: obj.keywords.toString().split(\", \") //turn keywords into array\n }\n });\n}", "title": "" }, { "docid": "4f758be1b012e7e8d5d1bee79c69f5b8", "score": "0.5808158", "text": "function _unseialize(input) {\n var length = 0;\n switch (input.charAt(0)) {\n // array\n case 'a':\n length = _serialized_len(input);\n input = input.substr(String(length).length + 4);\n var arr = [];\n var key = null;\n var value = null;\n for (var i = 0; i < length; ++i) {\n key = _unseialize(input);\n input = key[1];\n value = _unseialize(input);\n input = value[1];\n arr[key[0]] = value[0];\n }\n input = input.substr(1);\n return [arr, input];\n break;\n // Objects\n case 'O':\n length = _serialized_len(input);\n var classname = String(input.substr(String(length).length + 4, length));\n input = input.substr(String(length).length + 6 + length);\n var numProperties = Number(input.substring(0, input.indexOf(':')));\n input = input.substr(String(numProperties).length + 2);\n var obj = {};\n var property = null;\n var value = null;\n for (var i = 0; i < numProperties; ++i) {\n key = _unseialize(input);\n input = key[1];\n // Handle private/protected\n key[0] = key[0].replace(new RegExp('^\\x00' + classname + '\\x00'), '');\n key[0] = key[0].replace(new RegExp('^\\x00\\\\*\\x00'), '');\n value = _unseialize(input);\n input = value[1];\n obj[key[0]] = value[0];\n }\n input = input.substr(1);\n return [obj, input];\n break;\n //Strings\n case 's':\n length = _serialized_len(input);\n return [String(input.substr(String(length).length + 4, length)), input.substr(String(length).length + 6 + length)];\n break;\n // Integers and doubles\n case 'i':\n case 'd':\n var num = Number(input.substring(2, input.indexOf(';')));\n return [num, input.substr(String(num).length + 3)];\n break;\n // Booleans\n case 'b':\n var bool = (input.substr(2, 1) == 1);\n return [bool, input.substr(4)];\n break;\n // Null\n case 'N':\n return [null, input.substr(2)];\n break;\n // Unsupported\n case 'o':\n case 'r':\n case 'C':\n case 'R':\n case 'U':\n log('Error: Unsupported PHP data type found!', 'error');\n // Error\n default:\n return [null, null];\n break;\n }\n }", "title": "" }, { "docid": "9db83eff54cc32a3a30b08b005e8b85d", "score": "0.57945025", "text": "function toObject(arr){var res={};for(var i=0;i < arr.length;i++) {if(arr[i]){extend(res,arr[i]);}}return res;}", "title": "" }, { "docid": "9db83eff54cc32a3a30b08b005e8b85d", "score": "0.57945025", "text": "function toObject(arr){var res={};for(var i=0;i < arr.length;i++) {if(arr[i]){extend(res,arr[i]);}}return res;}", "title": "" }, { "docid": "dee7b662c0b6cb208a3d14db9bc48410", "score": "0.57526326", "text": "function abbreviateArray(arr) {\n return arr.map(function (v) {\n if (v instanceof Object && ! directlyAbbreviateObjects[v.constructor.name]) {\n var newv = {}, count = 0;\n for (var k in v) {\n if (v.hasOwnProperty(k)) newv[k] = abbreviateVal(v[k]); // @todo: handle elipses\n if (++count > MAX_OBJECT_PROPS) break;\n }\n return newv;\n } else {\n return abbreviateVal(v);\n }\n });\n}", "title": "" }, { "docid": "4e5d116ac715b7e919276d9437a559e0", "score": "0.57471067", "text": "_postProcess (value) {\n if (isArray(value)) {\n return value\n } else if (isPlainObject(value)) {\n // convert plain object to array.\n var keys = Object.keys(value)\n var i = keys.length\n var res = new Array(i)\n var key\n while (i--) {\n key = keys[i]\n res[i] = {\n $key: key,\n $value: value[key]\n }\n }\n return res\n } else {\n if (typeof value === 'number' && !isNaN(value)) {\n value = range(value)\n }\n return value || []\n }\n }", "title": "" }, { "docid": "31856a8e21d18273f7705687c300d780", "score": "0.5740581", "text": "function convert_ (o) {\n if ( typeof o === 'object' ) {\n const keys = Object.keys(o);\n for ( let key of keys ) {\n if ( key === '_text' ) {\n o._ = o._text;\n delete o._text;\n key = '_';\n } else if ( key === '_attributes' ) {\n o.$ = o._attributes;\n delete o._attributes;\n key = '$';\n }\n o[key] = convert_(o[key]);\n }\n if ( keys.length === 1 &&\n keys[0] === '_text' ) {\n return o._;\n } else {\n return o;\n }\n } else if ( Array.isArray(o) ) {\n return o.map(convert_);\n } else {\n return o;\n }\n}", "title": "" }, { "docid": "4ab2799239c8ae79841b85a05f9cb3d3", "score": "0.5716622", "text": "function convertArraysToObjects(obj) {\n return _.reduce(obj, (acc, value, key) => {\n if (_.isDate(value)) {\n // Don't let the Date object hit the general Object case below.\n acc[key] = value;\n } else if (_.isArray(value)) {\n acc[key] = value.reduce((acc, value, key) => {\n acc[key] = _.isObject(value) ? convertArraysToObjects(value) : value;\n return acc;\n }, {});\n } else if (_.isObjectLike(value)) {\n acc[key] = convertArraysToObjects(value);\n } else {\n acc[key] = value;\n }\n return acc;\n }, {});\n}", "title": "" }, { "docid": "4287e3e8cf4ab7deaad560148ef0f838", "score": "0.568786", "text": "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style);// static style is pre-processed into an object during compilation\n// and is always a fresh object, so it's safe to merge into it\nreturn data.staticStyle?extend(data.staticStyle,style):style;}// normalize possible array / string values into Object", "title": "" }, { "docid": "4287e3e8cf4ab7deaad560148ef0f838", "score": "0.568786", "text": "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style);// static style is pre-processed into an object during compilation\n// and is always a fresh object, so it's safe to merge into it\nreturn data.staticStyle?extend(data.staticStyle,style):style;}// normalize possible array / string values into Object", "title": "" }, { "docid": "4287e3e8cf4ab7deaad560148ef0f838", "score": "0.568786", "text": "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style);// static style is pre-processed into an object during compilation\n// and is always a fresh object, so it's safe to merge into it\nreturn data.staticStyle?extend(data.staticStyle,style):style;}// normalize possible array / string values into Object", "title": "" }, { "docid": "756fe3f5921bc1b67968edea6c592f57", "score": "0.5676756", "text": "normalize(data) {\n if (data && data.constructor !== Array) {\n return [data];\n }\n return (data || []).slice(0);\n }", "title": "" }, { "docid": "6e88541e25df8e95cce5643604ea15cc", "score": "0.5676321", "text": "function convertArrayToObject(array) {\n var obj = {};\n var name = 97;\n for (var i = 0; i < array.length; ++i) {\n // name of the property is a letter of latin alphabet\n // for this take ASCII code (97 - 122)\n if (name <= 122) {\n obj[String.fromCharCode(name)] = array[i];\n ++name;\n }\n // then take digits\n else {\n obj[i - 25] = array[i];\n }\n }\n \n return obj;\n }", "title": "" }, { "docid": "49f35dcfdc044e5e12e6d06ef56dfeb0", "score": "0.56666857", "text": "convertOptions(options) {\n const everyOptionString = options.every(option => typeof option === 'string');\n if (everyOptionString) {\n return options.map(value => ({ label: value, value }));\n }\n return options;\n }", "title": "" }, { "docid": "65f3f56c16e52032a730e749af5775f6", "score": "0.5650579", "text": "function toObject(value) {\n\t if (!Array.isArray(value)) {\n\t return value;\n\t }\n\n\t var map = {};\n\t for (var i = 0; i < value.length; i++) {\n\t map[value[i]] = true;\n\t }\n\t return map;\n\t}", "title": "" }, { "docid": "65f3f56c16e52032a730e749af5775f6", "score": "0.5650579", "text": "function toObject(value) {\n\t if (!Array.isArray(value)) {\n\t return value;\n\t }\n\n\t var map = {};\n\t for (var i = 0; i < value.length; i++) {\n\t map[value[i]] = true;\n\t }\n\t return map;\n\t}", "title": "" }, { "docid": "a8ad4da7c2872288701085d6c25569b1", "score": "0.56450635", "text": "function stringToObject(input) {\n let result = _.fromPairs(input.split('&').map(s => s.split('=')))\n console.log(result);\n}", "title": "" }, { "docid": "99240475dc7570be30737b2ae884546b", "score": "0.5643004", "text": "function convertObj(obj){\r\n\treturn obj.split(',')\r\n\t\t .map(keyVal => {\r\n\t\t\t return keyVal\r\n\t\t .replace(/{/g, \":\")\r\n\t\t\t\t .split(':')\r\n\t\t\t\t .map(_ => _.trim());\r\n\t\t })\r\n\t\t .reduce((accumulator, currentValue) => {\r\n\t\t\t accumulator[currentValue[0]] = currentValue[1]\r\n\t\t\t return accumulator\r\n\t\t }, {});\r\n }", "title": "" }, { "docid": "ca23d52879a1662a06bacbdf7e688d46", "score": "0.5642703", "text": "function fixData (result) {\n _.each(result, function (value, key) {\n if (value instanceof Array) {\n result[key] = _.compact(value);\n } else if (typeof value === 'string') {\n if (value.toLowerCase() === 'true') {\n result[key] = true;\n } else if (value.toLowerCase() === 'false') {\n result[key] = false;\n }\n } else if (typeof value === 'object') {\n fixData(value);\n } \n });\n}", "title": "" }, { "docid": "ee160c48966fc1faa478de96cea52016", "score": "0.5628436", "text": "function normalizeParams(params) {\n if (params === true) {\n return [];\n }\n if (Array.isArray(params)) {\n return params;\n }\n if (isObject(params)) {\n return params;\n }\n return [params];\n}", "title": "" }, { "docid": "7e1a089fb049c1a3c55efaf2f4577318", "score": "0.5620164", "text": "function clean(input) {\n\t return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n\t}", "title": "" }, { "docid": "7e1a089fb049c1a3c55efaf2f4577318", "score": "0.5620164", "text": "function clean(input) {\n\t return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n\t}", "title": "" }, { "docid": "9569e31687b1962445bd0b90a5943b66", "score": "0.56167185", "text": "function normalize(values) {\n return _.map(values, (val) => {\n var nom = val[0].trim().toLowerCase();\n if (normes[nom]) {\n return { nom: normes[nom], nomOrigine: val[0], connaissance: Number(val[1]), envie: Number(val[2]) }\n }\n\n console.log('no norm for: \"' + val[0] + '\"')\n return { nom: val[0].trim().toLowerCase(), nomOrigine: val[0], connaissance: Number(val[1]), envie: Number(val[2]) }\n })\n}", "title": "" }, { "docid": "f59226974a8cb66b35c3dbb17d60e73d", "score": "0.5611286", "text": "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "title": "" }, { "docid": "5d120c373ecf2b1106ba76e29b833c50", "score": "0.55975765", "text": "function arrayToObject(array, extractor) {\n\t return array.reduce(function (result, item, i) {\n\t var nameAndValue = extractor(item, i);\n\t if (nameAndValue) result[nameAndValue[0]] = nameAndValue[1];\n\t return result;\n\t }, {});\n\t}", "title": "" }, { "docid": "4541303aba63645868bb74466ff2ac9a", "score": "0.55761075", "text": "function collectionConverter(input) {\n // determine the inputted data type\n if (typeof input === \"object\" && !Array.isArray(input)) {\n // if Object type and not array [return will be an array]\n let resultArray = [];\n // iterate over the input object\n for (let keys in input) {\n resultArray.push(keys, input[keys]);\n }\n return resultArray;\n } else if (Array.isArray(input)) {\n // if array type [return will object type ]\n let resultObject = {};\n\n for (let i = 0; i < input.length; i += 2) {\n resultObject[input[i]] = input[i + 1];\n }\n return resultObject;\n } else {\n return;\n }\n}", "title": "" }, { "docid": "d58ba66ed3cafff90a0386c793abff87", "score": "0.5561524", "text": "function arrayToObject(array, extractor) {\r\n return array.reduce(function (result, item, i) {\r\n var nameAndValue = extractor(item, i);\r\n if (nameAndValue)\r\n result[nameAndValue[0]] = nameAndValue[1];\r\n return result;\r\n }, {});\r\n}", "title": "" }, { "docid": "e3b2d103150d0a6566566a3f1c97ba33", "score": "0.55567205", "text": "function normalizeOptionsArray(options) {\n if (options.length > 0 && (typeof options[0] === 'string' || typeof options[0] === 'number')) {\n if (typeof options[0] === 'string') {\n options = options.map(item => ({ id: item, name: _.capitalize(item.replace('_', ' ')) }))\n } else if (typeof options[0] === 'number') {\n options = options.map(item => ({ id: item, name: item }))\n }\n } else if (typeof options === 'object' && Object.keys(options).length > 0 && typeof options[Object.keys(options)[0]] === 'string') {\n options = Object.keys(options).map(key => ({ id: options[key], name: key }))\n }\n return options\n}", "title": "" }, { "docid": "1e1d5b1389a511498164d5d1a77eaa2a", "score": "0.55337644", "text": "function normalize$1(data) {\r\n if (typeof data === 'undefined') {\r\n return data;\r\n }\r\n try {\r\n return JSON.parse(JSON.stringify(data));\r\n }\r\n catch (e) {\r\n return data;\r\n }\r\n}", "title": "" }, { "docid": "869d28844a7f0a08817a3d6b7571eafc", "score": "0.55336314", "text": "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "title": "" }, { "docid": "ce4d5cb23e5c4c1481e6033cdde73ddb", "score": "0.55041665", "text": "function arrayToObject(array, extractor) {\n return array.reduce(function (result, item, i) {\n var nameAndValue = extractor(item, i);\n if (nameAndValue) result[nameAndValue[0]] = nameAndValue[1];\n return result;\n }, {});\n}", "title": "" }, { "docid": "ce4d5cb23e5c4c1481e6033cdde73ddb", "score": "0.55041665", "text": "function arrayToObject(array, extractor) {\n return array.reduce(function (result, item, i) {\n var nameAndValue = extractor(item, i);\n if (nameAndValue) result[nameAndValue[0]] = nameAndValue[1];\n return result;\n }, {});\n}", "title": "" }, { "docid": "9b59cbeacbda8b5b74d565e054e31013", "score": "0.5492009", "text": "function arrayToObject(array, extractor) {\n return array.reduce(function (result, item, i) {\n var nameAndValue = extractor(item, i);\n if (nameAndValue)\n result[nameAndValue[0]] = nameAndValue[1];\n return result;\n }, {});\n}", "title": "" }, { "docid": "9b59cbeacbda8b5b74d565e054e31013", "score": "0.5492009", "text": "function arrayToObject(array, extractor) {\n return array.reduce(function (result, item, i) {\n var nameAndValue = extractor(item, i);\n if (nameAndValue)\n result[nameAndValue[0]] = nameAndValue[1];\n return result;\n }, {});\n}", "title": "" }, { "docid": "10215f70443c3727193b38953bf45e85", "score": "0.5460721", "text": "static convert(v, type=this) {\n if (v instanceof Array) {\n if (v[0] instanceof Array) {\n return v.map(t => this.convert(t, type=type));\n } else {\n return type.from(v);\n }\n } else {\n return type.from(v);\n }\n }", "title": "" }, { "docid": "0452f8ececfed221d4145ece1f1bf4f1", "score": "0.5442457", "text": "extract(object, arrayOfValues) {\n const result = {};\n arrayOfValues.forEach((name) => {\n if (name in object) result[name] = object[name];\n });\n return result;\n }", "title": "" }, { "docid": "6cf61b0268da8cc916be2dd714321fa2", "score": "0.541305", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "eb76b538f1f9eacb1bf74a2f3b44da3b", "score": "0.5400341", "text": "function converter(arr) {\n\n let ans = [];\n arr.forEach(element => {\n let obj = {};\n obj[\"label\"] = Object.keys(element)[0].toString();//label: \"Arson\" or \"Arrest\"\n obj[\"Arrests\"] = element[obj[\"label\"]][\"Arrest\"].toString();//the Arrests are given its value\n obj[\"No Arrests\"] = element[obj[\"label\"]][\"noArrest\"].toString();//they are converted to strings in order to be used correctly by d3\n ans.push(obj);\n });\n return ans;\n}", "title": "" }, { "docid": "9ceecd9ffb545555cfdf3a7c5ae85094", "score": "0.5399537", "text": "prepMatchObject(strArr) {\n\t\tconst matches = {};\n\t\tstrArr.forEach((val) => {\n\t\t\tconst stringMatch = val.match(/^(\\w).*(\\w)$/);\n\t\t\tif (matches[stringMatch[1]]) {\n\t\t\t\tmatches[stringMatch[1]].push(stringMatch[2]);\n\t\t\t} else {\n\t\t\t\tmatches[stringMatch[1]] = [stringMatch[2]];\n\t\t\t}\n\t\t});\n\t\treturn matches;\n\t}", "title": "" }, { "docid": "a34ace22a2f473be370281619b454255", "score": "0.53936917", "text": "function toObject(arr) {\n\t var res = arr[0] || {};\n\t for (var i = 1; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res;\n\t}", "title": "" }, { "docid": "730a8a8007b2b3be77f9b0ec1db1885e", "score": "0.5392457", "text": "function coerceAll(obj) {\n var type = Array.isArray(obj) ? 'array' : typeof obj;\n\n switch(type) {\n case 'string':\n return coerce(obj);\n break;\n case 'object':\n if(obj) {\n Object.keys(obj).forEach(function (key) {\n obj[key] = coerceAll(obj[key]);\n });\n }\n break;\n case 'array':\n obj.map(function (o) {\n return coerceAll(o);\n });\n break;\n }\n\n return obj;\n}", "title": "" }, { "docid": "a16f9976bf886eca9ee145cd59be0d97", "score": "0.5386932", "text": "function normalize$3(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n }", "title": "" }, { "docid": "bc7f98361a9321abb8829ca5bd1ef32d", "score": "0.535336", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "bc7f98361a9321abb8829ca5bd1ef32d", "score": "0.535336", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "f6f229f6696038e86ba23ca2025e3841", "score": "0.5336522", "text": "function pe(e){return Array.isArray(e)?e.length>1?{$or:[].concat(e.map(e=>Object.assign({},e)))}:Object.assign({},e[0]):Object.assign({},e)}", "title": "" }, { "docid": "ca4d9b56b3bccfa761fc8f859b2c430d", "score": "0.5306579", "text": "function toObject (arr) {\nvar res = {};\nfor (var i = 0; i < arr.length; i++) {\nif (arr[i]) {\nextend(res, arr[i]);\n}\n}\nreturn res\n}", "title": "" }, { "docid": "d390c6332445f9313bbc7d2854eb7059", "score": "0.5293835", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "d390c6332445f9313bbc7d2854eb7059", "score": "0.5293835", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "d390c6332445f9313bbc7d2854eb7059", "score": "0.5293835", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "11e8a8475ebb2af1761a12d0ff2e10f5", "score": "0.5287353", "text": "function arrayToObject(array){\n return array.reduce((obj,item)=>{\n obj[item]={\n responses:[],\n parameters:[],\n path:\"\"\n };\n return obj;\n },{});\n}", "title": "" }, { "docid": "a96264ba91280880d55b3d1533ce3965", "score": "0.52786887", "text": "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style); // static style is pre-processed into an object during compilation\n// and is always a fresh object, so it's safe to merge into it\nreturn data.staticStyle?extend(data.staticStyle,style):style;} // normalize possible array / string values into Object", "title": "" }, { "docid": "de01038fbc0bcd14222825b17cd01254", "score": "0.52648705", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "de01038fbc0bcd14222825b17cd01254", "score": "0.52648705", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "54c6a29b620098550dcdb6a48e52c693", "score": "0.5264708", "text": "function dataConverter(data){\n const newData = data.map((data) => {\n return {\n //When making data, if colum includes space orso, make String and insert instead\n Name: data.name,\n Age: data.age,\n CPR: data.cpr,\n Phones: multiArrayTableBootStrap(data.phones),\n }\n });\n return newData;\n }", "title": "" }, { "docid": "2df0b86f3640d6b8ebcc4e173bc612a7", "score": "0.5264353", "text": "transformValues(values) {\n const newObj = {}\n\n for (let key in values) {\n const rawValue = values[key]\n const transform = this.settings.transforms[rawValue]\n let value\n\n if (this.settings.transforms.hasOwnProperty(rawValue)) {\n value = typeof transform === 'function' ? transform(rawValue, values) : transform\n } else {\n value = this.escape(rawValue)\n }\n\n newObj[key] = value\n }\n\n return newObj\n }", "title": "" }, { "docid": "4611320fc3708b74855416f64a569ac8", "score": "0.52636325", "text": "function le(e){return Array.isArray(e)?e.length>1?{$or:[].concat(e.map(e=>Object.assign({},e)))}:Object.assign({},e[0]):Object.assign({},e)}", "title": "" }, { "docid": "06b7b83aa73340ab5bf4f9a4e86cbfd5", "score": "0.5262077", "text": "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "72b8bad0b1e853b5988c2f196b2264a4", "score": "0.52591324", "text": "function convertArrayToObject(array) {\n var object = {}\n for (var x = 0; x < gridSize; x++) {\n object[x] = {};\n for (var y = 0; y < gridSize; y++) {\n if (array[x][y].value) {\n object[x][y] = array[x][y].value;\n } else {\n object[x][y] = \"undefined\"\n }\n }\n }\n return object;\n}", "title": "" }, { "docid": "f1f7747b9122b8b11bfab6a84c531e2e", "score": "0.52588856", "text": "function fromDynamoValue(obj) {\n function parse(x) {\n if ('S' in x) return x.S;\n if ('N' in x) return parseFloat(x.N);\n if ('BOOL' in x) return x.BOOL;\n if ('B' in x) return Buffer.from(x.B, 'Base64');\n if ('NULL' in x) return null;\n if ('L' in x) return x.L.map(parse);\n if ('M' in x) return _.mapObject(x.M, parse);\n throw new Error('Unsupported format: ' + JSON.stringify(x));\n }\n\n // top level is an object\n return _.mapObject(obj, parse);\n }", "title": "" }, { "docid": "8094de5ce5253d1081e9cb6ba5f5ebd4", "score": "0.52543634", "text": "function decode(value\n/*: any*/\n)\n/*: any*/\n{\n if (value === null || (0, _typeof2.default)(value) !== 'object') {\n return value;\n }\n\n if ((0, _isArray.default)(value)) {\n var dup = [];\n (0, _forEach.default)(value).call(value, function (v, i) {\n dup[i] = decode(v);\n });\n return dup;\n }\n\n if (typeof value.__op === 'string') {\n return (0, _ParseOp.opFromJSON)(value);\n }\n\n if (value.__type === 'Pointer' && value.className) {\n return _ParseObject.default.fromJSON(value);\n }\n\n if (value.__type === 'Object' && value.className) {\n return _ParseObject.default.fromJSON(value);\n }\n\n if (value.__type === 'Relation') {\n // The parent and key fields will be populated by the parent\n var relation = new _ParseRelation.default(null, null);\n relation.targetClassName = value.className;\n return relation;\n }\n\n if (value.__type === 'Date') {\n return new Date(value.iso);\n }\n\n if (value.__type === 'File') {\n return _ParseFile.default.fromJSON(value);\n }\n\n if (value.__type === 'GeoPoint') {\n return new _ParseGeoPoint.default({\n latitude: value.latitude,\n longitude: value.longitude\n });\n }\n\n if (value.__type === 'Polygon') {\n return new _ParsePolygon.default(value.coordinates);\n }\n\n var copy = {};\n\n for (var k in value) {\n copy[k] = decode(value[k]);\n }\n\n return copy;\n}", "title": "" }, { "docid": "f64997507038ffaed1e49217b533d3db", "score": "0.5244574", "text": "function arrayify(value) {\n if (Array.isArray(value)) {\n return value;\n }\n else if (value) {\n return [value];\n }\n}", "title": "" }, { "docid": "1b524b7b89008d176ca8af2905399eef", "score": "0.5241444", "text": "function arrayToSet(xs) {\n var s = {};\n for (var i = 0; i < xs.length; i++) {\n\ts[JSON.stringify(xs[i])] = xs[i];\n }\n return s;\n}", "title": "" }, { "docid": "e830b7f831a5088d1da039eaf7de8c86", "score": "0.5240436", "text": "function toObject( arr ) {\n\t\tvar res = {};\n\t\tfor ( var i = 0; i < arr.length; i++ ) {\n\t\t\tif ( arr[ i ] ) {\n\t\t\t\textend( res, arr[ i ] );\n\t\t\t}\n\t\t}\n\t\treturn res\n\t}", "title": "" }, { "docid": "32e5b01f423c59a1c772d736b003a89d", "score": "0.5235697", "text": "function normalizeArray(arr) {\n return Array.isArray(arr) ? arr : [arr];\n}", "title": "" }, { "docid": "3224ff8b2e770f70d42a259fdb10d1bb", "score": "0.5233452", "text": "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style); // static style is pre-processed into an object during compilation\n\t// and is always a fresh object, so it's safe to merge into it\n\treturn data.staticStyle?extend(data.staticStyle,style):style;} // normalize possible array / string values into Object", "title": "" }, { "docid": "803f738ab42b333a07bc4b3b93944833", "score": "0.52305365", "text": "function normalizeData({ normalize = _normalize, schema }, data) {\n let normalizedData = data;\n try {\n normalizedData = normalize(data, schema);\n\n if (schema) { // tried normalizing indexed data\n let {\n entities = {}, // indexed resources\n result = [] // just indices\n } = normalizedData;\n\n // normalizr return single id for non-arrays\n result = []\n .concat(result)\n .filter((i) => i || i === 0);\n\n // data is non-indexable (missing ids most likely)\n if (!result.length && Object.keys(entities).length) {\n normalizedData = data; // use raw data\n } else { // everything was a-ok\n return { result, entities };\n }\n }\n } catch (e) { /* carry on */ }\n return {\n result: [normalizedData]\n };\n}", "title": "" }, { "docid": "808426c599cbcee67ce5147458d75ef9", "score": "0.52271855", "text": "function toObject(arr) {\n var res = {};\n for(var i = 0; i < arr.length; i++) {\n if(arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "5e0f0b42375216c5ec6abfd5404fedd0", "score": "0.5224439", "text": "static arrayToObject(array) {\n let result = {};\n\n for (let i = 0; i < array.length; ++i) {\n result[array[i]] = true;\n }\n\n return result;\n }", "title": "" }, { "docid": "4c72282f98a94de0c6f801883ae26bcd", "score": "0.5203495", "text": "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "4c72282f98a94de0c6f801883ae26bcd", "score": "0.5203495", "text": "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "4c72282f98a94de0c6f801883ae26bcd", "score": "0.5203495", "text": "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "4c72282f98a94de0c6f801883ae26bcd", "score": "0.5203495", "text": "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "4c72282f98a94de0c6f801883ae26bcd", "score": "0.5203495", "text": "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "title": "" }, { "docid": "e554acef51038a9a936f821c84e6df81", "score": "0.5203006", "text": "function expandToObject(input) {\n // If the input is a string, encapsulate it as an array\n var retObj = input;\n if (typeof retObj === 'string') {\n retObj = [input];\n }\n\n // If the retObj is an array\n if (Array.isArray(retObj)) {\n // Collect the inputs into an object\n var inputArr = retObj;\n retObj = {};\n\n // Iterate over the inputs\n inputArr.forEach(function (inputStr) {\n // Break down any brace exapansions\n var inputPaths = braceExpand(inputStr);\n\n // Iterate over the paths\n inputPaths.forEach(function (filepath) {\n // Grab the extension and save it under its key\n // TODO: Deal with observer pattern here.\n // TODO: Will probably go `classical` here\n var ext = path.extname(filepath).slice(1);\n retObj[ext] = filepath;\n });\n });\n }\n\n // Return the objectified src\n return retObj;\n }", "title": "" }, { "docid": "c8ced70bcc9cb26a342ea37965ee3db0", "score": "0.51796097", "text": "function headersToObject(headers) {\n var headersObject = {};\n headers.forEach(function (value, name) {\n var isMultiValue = !singleValueHeaders.includes(name.toLowerCase()) && value.includes(',');\n headersObject[name] = isMultiValue\n ? value.split(',').map(function (s) { return s.trim(); })\n : value;\n });\n return headersObject;\n }", "title": "" }, { "docid": "c8ced70bcc9cb26a342ea37965ee3db0", "score": "0.51796097", "text": "function headersToObject(headers) {\n var headersObject = {};\n headers.forEach(function (value, name) {\n var isMultiValue = !singleValueHeaders.includes(name.toLowerCase()) && value.includes(',');\n headersObject[name] = isMultiValue\n ? value.split(',').map(function (s) { return s.trim(); })\n : value;\n });\n return headersObject;\n }", "title": "" }, { "docid": "349b35e81c8fe77e834503dcaf35a6eb", "score": "0.5175621", "text": "_validateValue() {\n const that = this;\n\n if (typeof that.value === 'string') {\n that._parseLinqToValue();\n }\n\n const value = that.value;\n\n if (!Array.isArray(value) ||\n JSON.stringify(value).replace(/[\\[\\]]/g, '') === '') {\n that.value = [[[]]];\n return;\n }\n\n if (value.length === 3 && typeof value[0] === 'string') {\n that.value = [[value]];\n }\n\n if (Array.isArray(value[0]) && value[0].length === 3 && typeof value[0][0] === 'string') {\n that.value = [value];\n }\n\n while (typeof value[0] === 'string') {\n value.shift();\n }\n\n while (typeof value[value.length - 1] === 'string') {\n value.pop();\n }\n\n that.value.forEach(item => {\n if (Array.isArray(item) && item.length === 0) {\n item.push([]);\n }\n });\n }", "title": "" }, { "docid": "a0025de84ec9af30955ca030edecfa9d", "score": "0.5172979", "text": "function arraysToObject(arr) {\n var obj = {};\n for (var i = 0; i < arr.length; i++) {\n obj[arr[i][0]] = arr[i][1]\n }\n return obj;\n}", "title": "" }, { "docid": "7abd8ef6fe571bc5c6b944903202c94c", "score": "0.5169801", "text": "function normalizeToArray(value) {\n return [].concat(value);\n }", "title": "" }, { "docid": "46fd663d363067bdae45defeaec044cb", "score": "0.51604015", "text": "function normalizeToArray(value) {\n return [].concat(value);\n}", "title": "" }, { "docid": "6ddd321cb0f38eecbb639365a3083dd5", "score": "0.5152558", "text": "function getConvertor(value, name) {\n if (isBoolean(value)) {\n return (input) => {\n if (isBoolean(input)) {\n return input;\n }\n if (input === 'true' || input === 'false') {\n return input === 'true';\n }\n\n console.log(\n warningLabel(`Invalid value given for ${chalk.bold(name)}.`),\n `Will use the default ${chalk.bold(value)}.`\n );\n\n return value;\n };\n } else if (Array.isArray(value)) {\n return (input) => {\n let parsed;\n try {\n parsed = JSON.parse(input);\n } catch (err) {\n // Ignore this case\n }\n\n if (Array.isArray(parsed)) {\n return parsed;\n }\n\n return input.toString().split(',');\n };\n } else if (Number.isInteger(value)) {\n return (input) => parseInt(input, 10);\n } else if (!isString(value) && (!value || Object.keys(value).length === 0)) {\n return (input) => JSON.parse(input);\n }\n\n return (input) => input;\n}", "title": "" }, { "docid": "b4c009d36d35ac5ecac410143589b3e8", "score": "0.5142828", "text": "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "title": "" }, { "docid": "b4c009d36d35ac5ecac410143589b3e8", "score": "0.5142828", "text": "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "title": "" }, { "docid": "b4c009d36d35ac5ecac410143589b3e8", "score": "0.5142828", "text": "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "title": "" }, { "docid": "b4c009d36d35ac5ecac410143589b3e8", "score": "0.5142828", "text": "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "title": "" }, { "docid": "a7d66acd6cd378b4ecc9eb4ff20b1285", "score": "0.5141213", "text": "function objectifyForm(formArray) {\n var returnArray = {};\n for (var i = 0; i < formArray.length; i++){\n returnArray[formArray[i]['name']] = formArray[i]['value'];\n }\n return returnArray;\n}", "title": "" }, { "docid": "dd0bf4d16b7a708b694f05e93173078c", "score": "0.51270044", "text": "fromObject(obj, convertCase) {\n\n //No obj?\n if (!obj || !angular.isObject(obj)) {\n return '';\n }\n\n //Initialize parts array\n let parts = [];\n\n //Loop the parameters\n angular.forEach(obj, (value, key) => {\n\n //Skip null/undefined values\n if (value === null || angular.isUndefined(value)) {\n return;\n }\n\n //Convert to array\n if (!angular.isArray(value)) {\n value = [value];\n }\n\n //Loop values\n angular.forEach(value, (v) => {\n\n //Handle objects\n if (angular.isObject(v)) {\n if (angular.isDate(v)) {\n v = v.toISOString();\n }\n else {\n v = angular.toJson(v);\n }\n }\n\n //Convert case?\n switch (convertCase) {\n case 'snake':\n key = $stringConverter.toSnakeCase(key);\n break;\n case 'camel':\n key = $stringConverter.toCamelCase(key);\n break;\n }\n\n //Push to parts\n parts.push(\n tryEncodeURIComponent(key) + '=' + tryEncodeURIComponent(v)\n );\n });\n });\n\n //Any parts?\n if (parts.length > 0) {\n return parts.join('&');\n }\n\n //No parts\n return '';\n }", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" }, { "docid": "d24e379b45b06ae1137ea98562841a25", "score": "0.5124053", "text": "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "title": "" } ]
de0f0ba12079631953a594204f61bce4
remove all event handler
[ { "docid": "af78cd47c1beaddcecb24de80801b7a4", "score": "0.0", "text": "function Clearup(){\n //TO DO:\n EventLogout();\n App.Timer.ClearTime();\n }", "title": "" } ]
[ { "docid": "2d6e0fedccd9e42932d8ba98f69f8841", "score": "0.78809375", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "2d6e0fedccd9e42932d8ba98f69f8841", "score": "0.78809375", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "a753b81897b85eb2882e3c9694062292", "score": "0.7878332", "text": "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "title": "" }, { "docid": "71f10a68b5a47b28b3ba58cf655e9bc6", "score": "0.77916616", "text": "function removeHandlers() {\n document.removeEventListener(\"mousedown\", function() {});\n document.removeEventListener(\"mouseup\", function(){});\n }", "title": "" }, { "docid": "3b3a141441fe09770e459335cf0d7646", "score": "0.7470066", "text": "clearAll() {\n for (channel in this._handlers) {\n this.off(channel);\n }\n }", "title": "" }, { "docid": "cf79464123b5e6622b70e0440813547d", "score": "0.7462429", "text": "_clearHandlers(){\n\t\tthis.$next.off('click.wizard');\n\t\tthis.$previous.off('click.wizard');\n\t\tthis.$submit.off('click.wizard');\n\t\tthis.$navs.each(function(i, e) {\n\t\t\t$(e).off('click.wizard');\n\t\t});\n\t}", "title": "" }, { "docid": "89b0d7432b6cdeb42f1611c45071b3ff", "score": "0.74290544", "text": "_removeHandler(event) {\n delete this._events[event];\n }", "title": "" }, { "docid": "0e4cb5b9e939d3d1e0a6b91123b414a5", "score": "0.73991346", "text": "_clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }", "title": "" }, { "docid": "b958c60f32e2922bcc8e931a3af8869c", "score": "0.739839", "text": "_clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }", "title": "" }, { "docid": "b958c60f32e2922bcc8e931a3af8869c", "score": "0.739839", "text": "_clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }", "title": "" }, { "docid": "2c1135662145f17a121e99e3032207be", "score": "0.7269206", "text": "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "title": "" }, { "docid": "2c1135662145f17a121e99e3032207be", "score": "0.7269206", "text": "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "title": "" }, { "docid": "2c1135662145f17a121e99e3032207be", "score": "0.7269206", "text": "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "title": "" }, { "docid": "2c1135662145f17a121e99e3032207be", "score": "0.7269206", "text": "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "title": "" }, { "docid": "0cfb51a3573a074e4f64dc0592dc8552", "score": "0.72507954", "text": "_removeListeners() {\r\n if (!this._ws) {\r\n return;\r\n }\r\n this._debug('removeListeners');\r\n for (const [type, handler] of this.eventToHandler) {\r\n this._ws.removeEventListener(type, handler);\r\n }\r\n }", "title": "" }, { "docid": "bace39420e7846ca5fe686dc2fe266bd", "score": "0.72394526", "text": "_stopListening() {\n for (const eventName of [\"mousedown\", \"mousemove\", \"mouseup\"]) {\n const listenerName = \"_on\" + eventName;\n const listener = this[listenerName];\n\n if (listener !== null) {\n this.container.removeEventListener(eventName, listener);\n this[listenerName] = null;\n }\n }\n }", "title": "" }, { "docid": "7b9363cf2e418f09c2cc43271865f079", "score": "0.7216846", "text": "static removeAllListeners() {\n Object.keys(this.listeners).forEach((event) => {\n this.listeners[event].forEach(({ listener }) => {\n document.removeEventListener(event, listener);\n });\n });\n this.listeners = {};\n }", "title": "" }, { "docid": "91673c3f22548daf640a86e8a80bbeca", "score": "0.7216186", "text": "function removeEventHandlers() {\r\n $this.off('click.collapse', '> li > .collapsible-header');\r\n }", "title": "" }, { "docid": "a308954a4e988200049c559aa9bff2d7", "score": "0.71691364", "text": "function _unbindEvents() {\n const events = entries( _eventsMap );\n\n events.forEach( ( [ event, handlers ] ) => {\n handlers.forEach( handler => _dom.removeEventListener( event, handler ) );\n } );\n }", "title": "" }, { "docid": "2a1f4aa94c8c55c80c3950e11963b48b", "score": "0.71667916", "text": "unbindEvents() {\n this.listener.destroy();\n }", "title": "" }, { "docid": "399899aa9d2d91f8ec9357130bc14edf", "score": "0.7153146", "text": "detachAllListeners() {\n\t\tfor (var selector in this.eventHandles_) {\n\t\t\tif (this.eventHandles_[selector]) {\n\t\t\t\tthis.eventHandles_[selector].removeListener();\n\t\t\t}\n\t\t}\n\t\tthis.eventHandles_ = {};\n\t\tthis.listenerCounts_ = {};\n\t}", "title": "" }, { "docid": "c931850dfb23238a85cd5dfa309d17a1", "score": "0.7145769", "text": "function removeAllListeners(container, opt) {\n container.children().each(function() {\n try { jQuery(this).die('click'); } catch (e) {}\n try { jQuery(this).die('mouseenter'); } catch (e) {}\n try { jQuery(this).die('mouseleave'); } catch (e) {}\n try { jQuery(this).unbind('hover'); } catch (e) {}\n })\n try { container.die('click', 'mouseenter', 'mouseleave'); } catch (e) {}\n clearInterval(opt.cdint);\n container = null;\n\n\n\n }", "title": "" }, { "docid": "73c4a44699fbf1ce0b7ff58d5496d22a", "score": "0.7138811", "text": "function removeAllListeners(container, opt) {\n container.children().each(function() {\n try {\n jQuery(this).die('click');\n } catch (e) {}\n try {\n jQuery(this).die('mouseenter');\n } catch (e) {}\n try {\n jQuery(this).die('mouseleave');\n } catch (e) {}\n try {\n jQuery(this).unbind('hover');\n } catch (e) {}\n })\n try {\n container.die('click', 'mouseenter', 'mouseleave');\n } catch (e) {}\n clearInterval(opt.cdint);\n container = null ;\n }", "title": "" }, { "docid": "53443f6b058929aff6f035bba54f3a0d", "score": "0.7121624", "text": "function _removeFormListeners() {\n d.body.removeEventListener('keyup', _keyListener, false);\n }", "title": "" }, { "docid": "e7063a483346136d466a91e785d75f4e", "score": "0.71068823", "text": "unlinkAll() {\n this.removeAllListeners();\n }", "title": "" }, { "docid": "a117b5079ee59b4d3fc91ca03a75f8b5", "score": "0.710669", "text": "function removeEventListeners() {\n \t\tvar len = _gridArray.length;\n \t\tfor(var i = 0; i < len; ++i ) {\n \t\t\tvar $box = $(_gridArray[i].instance.el);\n \t\t\t$box.off( 'mouseover', onBoxItemMouseOver );\n \t\t\t$box.off( 'tap', onBoxItemMouseOver );\n \t\t}\n\n \t\t$(document).off( 'click', onDocumentClick );\n \t\t$(document).off( 'mousedown', onDocumentMouseDown );\n \t\t$(document).off( 'mouseup', onDocumentMouseUp );\n \t}", "title": "" }, { "docid": "caa84844b6c3e05235cb43c22d425b24", "score": "0.71037835", "text": "_cleanupDOMEventListeners() {\n // _clean DOM event listener bindings\n for (const callback of this._domEventListenerCleanupQueue.splice(0)) {\n callback();\n }\n }", "title": "" }, { "docid": "1c6bfa37b106951d7d1dcff5a820ee9c", "score": "0.71018946", "text": "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "title": "" }, { "docid": "2423fc4c969dbc1458957a5f2ae07b14", "score": "0.7097436", "text": "function removeEventHandlers() { \n if (mapOnClick_addStops_connect) {\n mapOnClick_addStops_connect.remove();\n }\n if (mapOnClick_addBarriers_connect) {\n mapOnClick_addBarriers_connect.remove();\n }\n if (mapOnClick_addpolylineBarriers_connect) {\n mapOnClick_addpolylineBarriers_connect.remove();\n }\n }", "title": "" }, { "docid": "9b9ef23c67402f762184f2b300edd702", "score": "0.7092257", "text": "function cleanUp() {\n cancelButton.removeEventListener('click', onCancelDelete)\n deleteButton.removeEventListener('click', onDeleteTodo)\n }", "title": "" }, { "docid": "623c39eaf75b35c5f9c412c6427d9564", "score": "0.70900965", "text": "function removeEvents(element) {\n\t\t\t\telement.removeEventListener();\n\t\t\t\telement.removeEventListener();\n\t\t\t\telement.removeEventListener();\n\t\t\t\telement.removeEventListener();\n\t\t\t}", "title": "" }, { "docid": "ac17f183485309f899b9327353235844", "score": "0.7074328", "text": "__removeOpenListeners () {\n // active listeners\n document.removeEventListener('click', this.__onDocumentClick);\n // passive listeners\n document.removeEventListener('scroll', this.__onDocumentScroll);\n window.removeEventListener('resize', this.__onWindowResize);\n }", "title": "" }, { "docid": "723166acb2c83b4edbec02f3cdd3e120", "score": "0.7057265", "text": "function removeListeners() {\n [].map.call(signs, function(sign) {\n sign.removeEventListener('click', click);\n });\n\n [].map.call(items, function(item) {\n item.removeEventListener('mouseover', mouseover);\n item.removeEventListener('mouseout', mouseout);\n });\n\n document.querySelector('#open-close').removeEventListener('click', all);\n }", "title": "" }, { "docid": "f7a377f5d462a18163c0e68de3577f36", "score": "0.70490485", "text": "off(eventName, handlerToRemove) {\n if (this.disposed) {\n return\n }\n\n const handlers = this.handlersByEventName[eventName]\n if (handlers) {\n const handlerIndex = handlers.indexOf(handlerToRemove)\n if (handlerIndex >= 0) {\n handlers.splice(handlerIndex, 1)\n }\n if (handlers.length === 0) {\n delete this.handlersByEventName[eventName]\n }\n }\n }", "title": "" }, { "docid": "5e918c99896f6350cc03e9940ead6669", "score": "0.7016609", "text": "function removeEvents() {\n \t$this.unbind(\"mouseenter\")\n \t$this.unbind(\"mouseleave\");\n }", "title": "" }, { "docid": "84819f252dba116e55d699aca534a30b", "score": "0.701119", "text": "off() {\n this.event.remove();\n }", "title": "" }, { "docid": "216b9b119172ce3766be981258c12e2c", "score": "0.70061076", "text": "unset() {\n if (_utils_is_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].string(this.target)) {\n // remove delegated events\n for (const type in this._scopeEvents.delegatedEvents) {\n const delegated = this._scopeEvents.delegatedEvents[type];\n\n for (let i = delegated.length - 1; i >= 0; i--) {\n const {\n selector,\n context,\n listeners\n } = delegated[i];\n\n if (selector === this.target && context === this._context) {\n delegated.splice(i, 1);\n }\n\n for (let l = listeners.length - 1; l >= 0; l--) {\n this._scopeEvents.removeDelegate(this.target, this._context, type, listeners[l][0], listeners[l][1]);\n }\n }\n }\n } else {\n this._scopeEvents.remove(this.target, 'all');\n }\n }", "title": "" }, { "docid": "95191557eebcd1203199c84790b7dbc9", "score": "0.70052963", "text": "removeListener() {\n }", "title": "" }, { "docid": "7144da4853e86c58df3603b37724f2bb", "score": "0.699469", "text": "resetEventListeners() {\n allOff(this._emitter);\n }", "title": "" }, { "docid": "95f9ec754071d89453bbc30efaf8d7d6", "score": "0.69910455", "text": "function y(e){if(null!=e&&null!=e[d])for(const t in e._handlers)e[d].removeListener(t,e._handlers[t])}", "title": "" }, { "docid": "22ac4e6139570fb7e28313a116b29da6", "score": "0.6990846", "text": "destroy() {\n this.emitter.removeListener(this.event, this.handler);\n this._cleanup();\n }", "title": "" }, { "docid": "6eac8f9fc8a570815817ba052111a7c5", "score": "0.69684005", "text": "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "title": "" }, { "docid": "b787c500ce91d2628b04095b6df121e6", "score": "0.6965868", "text": "dropListeners() {\n let items = this.listeners;\n while(items.length) {\n let item = items.pop();\n item.e.removeEventListener(item.evtname, item.fn, true);\n }\n }", "title": "" }, { "docid": "1b33e09a4ac0e8e695845526358da500", "score": "0.69551617", "text": "function clear() {\r\n __onfireEvents = {};\r\n }", "title": "" }, { "docid": "758c081a182f62fe3c2b0ad2e42a0285", "score": "0.69539046", "text": "function m(t){if(null!=t&&null!=t[f])for(const e in t._handlers)t[f].removeListener(e,t._handlers[e])}", "title": "" }, { "docid": "da963d03ecb30b846465c4a3311ca1c6", "score": "0.695015", "text": "function removeListeners() {\n $($window).unbind('click', Listeners.windowClick);\n\n $($window).unbind('keydown', Listeners.windowKeydown);\n }", "title": "" }, { "docid": "99760015e428e8d8326ae9a5ba7d110b", "score": "0.69463694", "text": "unregisterEventHandler(name,callback){return this.__eventHandlers=this.__eventHandlers.filter(handler=>!(handler.name===name&&(void 0===callback||handler.callback===callback))),this}", "title": "" }, { "docid": "50edf5541c875bf8a1dc5bea40f534cb", "score": "0.6940966", "text": "offAll() {\n Object.keys(this._gsEventHandler).forEach(key => this.off(key));\n return this;\n }", "title": "" }, { "docid": "3ae748c7d72260a88bfa143fd7b35c53", "score": "0.6940204", "text": "cleanup() {\n if (this.boundHandle_) {\n this.win.document.documentElement.removeEventListener(\n 'click', this.boundHandle_);\n }\n }", "title": "" }, { "docid": "d065bd49380146cb2cf7f789d249f49d", "score": "0.6936598", "text": "removeEvents() {\n this._ease.off('complete', this.onComplete);\n }", "title": "" }, { "docid": "a4a9a09ce05a765ed530838c9203ab3f", "score": "0.6921203", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n }", "title": "" }, { "docid": "f8340611b50e68682b26602d49b8c694", "score": "0.6913345", "text": "removeEventListener(type,handler){if(this.__eventListener[type]){this.__eventListener[type]=this.__eventListener[type].filter((e,i)=>{if(e.cb===handler){return!1}else{return!0}})}}", "title": "" }, { "docid": "8b763de3b77ae8f2dde690ace9cd8bda", "score": "0.6912978", "text": "unregisterEvents() {\n this.container.removeEventListener(ApiEvents.ROI_ADDED, this.onRoiAdded);\n this.container.removeEventListener(ApiEvents.ROI_MODIFIED, this.onRoiModified);\n this.container.removeEventListener(ApiEvents.ROI_REMOVED, this.onRoiRemoved);\n this.container.removeEventListener(ApiEvents.ROI_SELECTED, this.onRoiSelected);\n }", "title": "" }, { "docid": "cc406687b8470b937e3a1b34969f7fa8", "score": "0.69091517", "text": "removeListeners() {\n }", "title": "" }, { "docid": "e2a33010e8850071aa1d02368fb17f4f", "score": "0.68981194", "text": "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.contentEl.removeEventListener('click', this._onContentClickBound);\n }", "title": "" }, { "docid": "5a4ea3eadf1c07e5e1f9ce7d6670a89d", "score": "0.6891326", "text": "removeAllListeners() {\n Voice.onSpeechStart = null;\n Voice.onSpeechRecognized = null;\n Voice.onSpeechEnd = null;\n Voice.onSpeechError = null;\n Voice.onSpeechResults = null;\n Voice.onSpeechPartialResults = null;\n Voice.onSpeechVolumeChanged = null;\n\n if (this._listeners) {\n this._listeners.map((listener, index) => listener.remove());\n this._listeners = null;\n }\n }", "title": "" }, { "docid": "2006bb188760d32dccb5fd037ed54782", "score": "0.6888103", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n }", "title": "" }, { "docid": "101947f4b76c915dd4ee6c12ee732443", "score": "0.68858695", "text": "removeCommands () {\r\n this.commandHandler.removeAllListeners();\r\n }", "title": "" }, { "docid": "b2d074c801317fcbdd84c0a2f21da7eb", "score": "0.6879288", "text": "clear() {\n if (this.resizeListener_) {\n window.removeEventListener('resize', this.resizeListener_);\n this.resizeListener_ = null;\n }\n for (let listener of this.keydownListeners) {\n document.removeEventListener('keydown', listener);\n }\n this.keydownListeners = [];\n this.manager_ = null;\n }", "title": "" }, { "docid": "7e112ef371eb3cda7970862684c87bf8", "score": "0.68662757", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n }", "title": "" }, { "docid": "6eec1ab0f4002fcdaca0aab11469d6e7", "score": "0.6854745", "text": "function removePageEvents() {\n\tpageEvents.forEach( ( [ eventName, handler ] ) => {\n\t\tpage.removeListener( eventName, handler );\n\t} );\n}", "title": "" }, { "docid": "bcc2fac1e2803b8d65706b8414beac2a", "score": "0.68397284", "text": "function removeListeners() {\n for (var i in tracker.listeners) {\n if (i === 'saveClick') {\n document.body.removeEventListener('click', tracker.listeners[i]);\n } else {\n document.body.removeEventListener(i, tracker.listeners[i]);\n }\n }\n\n document.body.removeEventListener('killDeckGrid', removeListeners);\n }", "title": "" }, { "docid": "ba0c5ff69b5fcd571a3f83cd8f3fafa2", "score": "0.68374383", "text": "function cleanup() {\r\n observer && observer.disconnect();\r\n removeEvent(wheelEvent, wheel);\r\n removeEvent('mousedown', mousedown);\r\n removeEvent('keydown', keydown);\r\n removeEvent('resize', refreshSize);\r\n removeEvent('load', init);\r\n}", "title": "" }, { "docid": "809b1289ddd7ff05262e450b9d2f90a1", "score": "0.6830122", "text": "function btmIconsRemoveEventListen() {\n\t\tarrayToLoad[0].removeEventListener('touchend', icon1Listener);\n\t\tarrayToLoad[1].removeEventListener('touchend', icon2Listener);\n\t\tarrayToLoad[2].removeEventListener('touchend', icon3Listener);\n\t\tarrayToLoad[3].removeEventListener('touchend', icon4Listener);\n\t\tarrayToLoad[4].removeEventListener('touchend', icon5Listener);\n\t\tarrayToLoad[5].removeEventListener('touchend', icon6Listener);\n\t}", "title": "" }, { "docid": "5b752971160f6192761d5bc0794cb469", "score": "0.6812056", "text": "removeEventHandlers(){\n $(\"#add-product-form\").unbind(\"submit\");\n }", "title": "" }, { "docid": "d2599ce3aabbd7936956c5f763882c14", "score": "0.6810687", "text": "function unbind(eventHandlers) {\n\t Object.keys(eventHandlers).forEach(function (event) {\n\t eventHandlers[event].forEach(function (handler) {\n\t bbcdotcom.pubsub.off(event, handler);\n\t });\n\t });\n\t}", "title": "" }, { "docid": "dbc33e06a155f827e2dfdbd962fd38b4", "score": "0.67989457", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n }", "title": "" }, { "docid": "1a016089b15fedc01ffb77747b9208a6", "score": "0.67955035", "text": "clearListeners() {\n const vals = Object.values(EVENT_TYPES);\n vals.forEach((val) => {\n this.callbacks[val] = [];\n });\n }", "title": "" }, { "docid": "0f728aa05b76779894c1cefa6528b0f8", "score": "0.67950064", "text": "function wrappedHandler() {\n // remove ourself, and then call the real handler with the args\n // passed to this wrapper\n handler.apply(obj.off(eventName, wrappedHandler), arguments);\n } // in order to allow that these wrapped handlers can be removed by", "title": "" }, { "docid": "293d97ae7c193d00db3445175b1c8e97", "score": "0.6793147", "text": "off(eventName, handler) {\n let handlers = this._eventHandlers && this._eventHandlers[eventName]\n if (!handlers) {\n return\n }\n for (let i = 0; i < handlers.length; i++) {\n if (handlers[i] === handler) {\n handler.splice(i--, 1)\n }\n }\n }", "title": "" }, { "docid": "54a52be4450cd8007ceb2ddc32e886fe", "score": "0.6788691", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n}", "title": "" }, { "docid": "54a52be4450cd8007ceb2ddc32e886fe", "score": "0.6788691", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n}", "title": "" }, { "docid": "54a52be4450cd8007ceb2ddc32e886fe", "score": "0.6788691", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n}", "title": "" }, { "docid": "54a52be4450cd8007ceb2ddc32e886fe", "score": "0.6788691", "text": "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n}", "title": "" }, { "docid": "705fc5d065b057bc5c6eece93aa6a1d0", "score": "0.67861193", "text": "removeListeners() {\n const { element } = this;\n element.removeEventListener(\"click\", this.onClick);\n this.clipboard.off(\"success\");\n }", "title": "" }, { "docid": "9be25aff603ce14da25ebe0e79c715e1", "score": "0.67855823", "text": "function removeAddedEvents() {\n // remove added native events\n nativeEvents.forEach(({ key, listener }) => {\n element.removeEventListener(key, listener);\n });\n nativeEvents = [];\n }", "title": "" }, { "docid": "684ef8e20c27c4127ce098f3bb568cf4", "score": "0.67781264", "text": "removeEventListeners(){\n\t\t\tif(!this.document) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\t\tthis.document.removeEventListener(eventName, this.triggerEvent, false);\n\t\t\t}, this);\n\n\t\t}", "title": "" }, { "docid": "cbbd9c064435910a695ed40f0dcf1b31", "score": "0.67756456", "text": "teardownEvents() {\n this.tiltHandler.off();\n }", "title": "" }, { "docid": "0e1218edb9e672d4ccff39e8ce759aca", "score": "0.6767664", "text": "function destroy() {\r\n input.removeEventListener(\"focus\", focusEventHandler);\r\n input.removeEventListener(\"keydown\", keydownEventHandler);\r\n input.removeEventListener(keyUpEventName, keyupEventHandler);\r\n input.removeEventListener(\"blur\", blurEventHandler);\r\n window.removeEventListener(\"resize\", resizeEventHandler);\r\n doc.removeEventListener(\"scroll\", scrollEventHandler, true);\r\n clearDebounceTimer();\r\n clear();\r\n }", "title": "" }, { "docid": "e69967f1e0d06d7947aef87e9e843b06", "score": "0.67579496", "text": "static destroy() {\n $(\".com\").off(\"mouseenter\")\n $(\".com\").off(\"mouseleave\")\n $(\".com\").off(\"click\")\n $(\".comment\").remove()\n }", "title": "" }, { "docid": "405c64d3a666d9427d19b63fd39371a8", "score": "0.6755891", "text": "function clearButtonClickEvents() {\r\n for (let i = 1; i <= POP_CONT_MAX; i++) {\r\n let thisBtn = \".\" + POP_BTN + i;\r\n $(thisBtn).off(\"click\");\r\n }\r\n }", "title": "" }, { "docid": "fcb571a90ea52be0f91e870857eb7f13", "score": "0.6753067", "text": "function remove_options_event_listeners(){\n document.getElementById('answering_option_1').removeEventListener('click', option1_handler);\n document.getElementById('answering_option_2').removeEventListener('click', option2_handler);\n document.getElementById('answering_option_3').removeEventListener('click', option3_handler);\n document.getElementById('answering_option_4').removeEventListener('click', option4_handler);\n}", "title": "" }, { "docid": "6a679840c46568ba386383789fe160d6", "score": "0.67490923", "text": "_unbindTemporaryEvents() {\n for (let i = 0; i < this.temporaryEventFunctions.length; i++) {\n const eventName = this.temporaryEventFunctions[i].event;\n const boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n this.temporaryEventFunctions = [];\n }", "title": "" }, { "docid": "77dc4aaf5f0292dd4dd7fd4b745864bf", "score": "0.6748285", "text": "function destroy(all){\n setAutoScrolling(false, 'internal');\n setAllowScrolling(true);\n setMouseHijack(false);\n setKeyboardScrolling(false);\n addClass(container, DESTROYED);\n\n [\n afterSlideLoadsId, \n afterSectionLoadsId,\n resizeId,\n scrollId,\n scrollId2,\n g_doubleCheckHeightId,\n resizeHandlerId\n ].forEach(function(timeoutId){\n clearTimeout(timeoutId);\n });\n\n window.removeEventListener('scroll', scrollHandler);\n window.removeEventListener('hashchange', hashChangeHandler);\n window.removeEventListener('resize', resizeHandler);\n\n document.removeEventListener('keydown', keydownHandler);\n document.removeEventListener('keyup', keyUpHandler);\n\n ['click', 'touchstart'].forEach(function(eventName){\n document.removeEventListener(eventName, delegatedEvents);\n });\n\n ['mouseenter', 'touchstart', 'mouseleave', 'touchend'].forEach(function(eventName){\n document.removeEventListener(eventName, onMouseEnterOrLeave, true); //true is required!\n });\n\n //lets make a mess!\n if(all){\n destroyStructure();\n }\n }", "title": "" }, { "docid": "66edb6d21eb7ffd7f7d319514593dc0a", "score": "0.6740246", "text": "removeEvents(element, events, handler, options = false){\n this.cycleItems(events, (event) => element.removeEventListener(event, handler, options));\n }", "title": "" }, { "docid": "8638892e9661bde1bc26074a3253d603", "score": "0.67388856", "text": "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "title": "" }, { "docid": "8638892e9661bde1bc26074a3253d603", "score": "0.67388856", "text": "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "title": "" }, { "docid": "8e6a5299d2b1d47a95863710fb5c9ba2", "score": "0.6733651", "text": "removeEventListeners_() {\n if (this.isDesktop_()) {\n this.container_.removeEventListener(\n \"wheel\",\n this.scrollDevice_.bind(this),\n false\n );\n } else {\n this.removeHammerListener_();\n }\n\n this.container_.removeEventListener(\n \"mousemove\",\n this.onMouseMove_.bind(this),\n false\n );\n this.container_.removeEventListener(\n \"click\",\n this.onMouseClick_.bind(this),\n false\n );\n window.removeEventListener(\n \"resize\",\n this.setupResponsive_.bind(this),\n false\n );\n }", "title": "" }, { "docid": "0d1c155eaa5094eefc437316c7c0478e", "score": "0.67236716", "text": "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "title": "" }, { "docid": "0d1c155eaa5094eefc437316c7c0478e", "score": "0.67236716", "text": "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "title": "" }, { "docid": "9e5d201e816e4b2a08617e3536851815", "score": "0.67166156", "text": "function removeEventListeners() {\n\n\t\t\teventsAreBound = false;\n\n\t\t\tdocument.removeEventListener( 'keydown', onDocumentKeyDown, false );\n\t\t\twindow.removeEventListener( 'hashchange', onWindowHashChange, false );\n\t\t\twindow.removeEventListener( 'resize', onWindowResize, false );\n\n\t\t\tdom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );\n\t\t\tdom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );\n\t\t\tdom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );\n\n\t\t\tif( window.navigator.msPointerEnabled ) {\n\t\t\t\tdom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );\n\t\t\t\tdom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );\n\t\t\t\tdom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );\n\t\t\t}\n\n\t\t\tif ( config.progress && dom.progress ) {\n\t\t\t\tdom.progress.removeEventListener( 'click', onProgressClicked, false );\n\t\t\t}\n\n\t\t\t[ 'touchstart', 'click' ].forEach( function( eventName ) {\n\t\t\t\tdom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );\n\t\t\t\tdom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );\n\t\t\t\tdom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );\n\t\t\t\tdom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );\n\t\t\t\tdom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );\n\t\t\t\tdom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );\n\t\t\t} );\n\n\t\t}", "title": "" }, { "docid": "dc294631e39879b02399361bd286d47a", "score": "0.671476", "text": "remove() {\n super.remove();\n\n // Unset event listeners from buttons\n this.buttons.forEach((button) =>\n button.removeEventListener('click', this.handleClick)\n );\n }", "title": "" }, { "docid": "74328f9c12a0cae1b5224cbe9b4aa347", "score": "0.6712416", "text": "function destroy(all){\n setAutoScrolling(false, 'internal');\n setAllowScrolling(true);\n setMouseHijack(false);\n setKeyboardScrolling(false);\n addClass(container, DESTROYED);\n\n [\n afterSlideLoadsId, \n afterSectionLoadsId,\n resizeId,\n scrollId,\n scrollId2,\n g_doubleCheckHeightId,\n resizeHandlerId,\n g_transitionLapseId\n ].forEach(function(timeoutId){\n clearTimeout(timeoutId);\n });\n\n window.removeEventListener('scroll', scrollHandler);\n window.removeEventListener('hashchange', hashChangeHandler);\n window.removeEventListener('resize', resizeHandler);\n\n document.removeEventListener('keydown', keydownHandler);\n document.removeEventListener('keyup', keyUpHandler);\n\n ['click', 'touchstart'].forEach(function(eventName){\n document.removeEventListener(eventName, delegatedEvents);\n });\n\n ['mouseenter', 'touchstart', 'mouseleave', 'touchend'].forEach(function(eventName){\n document.removeEventListener(eventName, onMouseEnterOrLeave, true); //true is required!\n });\n\n //lets make a mess!\n if(all){\n destroyStructure();\n }\n }", "title": "" }, { "docid": "3f0891cbd4c7083609def3719a29887f", "score": "0.67072314", "text": "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "title": "" }, { "docid": "69cbc16383b6c460f05f482d824205a5", "score": "0.67026156", "text": "off(eventName, handler) {\n let handlers = this._eventHandlers?.[eventName];\n if (!handlers) return;\n for (let i = 0; i < handlers.length; i++) {\n if (handlers[i] === handler) {\n handlers.splice(i--, 1);\n }\n }\n }", "title": "" }, { "docid": "307cfa1cfdf51e133d2ca43de451072b", "score": "0.6699363", "text": "deInit() {\n window.removeEventListener('pointermove', this.onPointerMove);\n window.removeEventListener('pointerdown', this.onPointerDown);\n window.removeEventListener('pointerup', this.onPointerUp);\n window.removeEventListener('resize', this.onResize);\n }", "title": "" }, { "docid": "9df72e55a303cafa4bd0a5dd623296a4", "score": "0.66887426", "text": "unlisten() {\n listening = false;\n const node = this[eventsTargetValue];\n node.removeEventListener(ModelingEventTypes.State.Module.created, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Model.created, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Entity.created, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Attribute.created, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Association.created, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Module.deleted, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Model.deleted, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Entity.deleted, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Attribute.deleted, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Association.deleted, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Module.updated, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Model.updated, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Entity.updated, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Attribute.updated, this[changeHandler]);\n node.removeEventListener(ModelingEventTypes.State.Association.updated, this[changeHandler]);\n }", "title": "" }, { "docid": "1b8d5a2acf6a27db5bcb724fd850dc1e", "score": "0.66827434", "text": "_removeListeners() {\r\n console.log(\"Grid Scale | Drawing Layer | **** Running remove listeners ****\");\r\n //console.log(t);\r\n //t.off(\"mousedown\", sgLayer._onMouseDown).off(\"mousemove\", this._onMouseMove).off(\"mouseup\", this._onMouseUp);\r\n //sgLayer.globalEventListeners.forEach((l) => window.removeEventListener(...l));\r\n canvas.stage.removeListener('mousedown', sgLayer.gridonMouseDown);\r\n canvas.stage.removeListener(\"mousemove\",sgLayer.gridonMouseMove);\r\n canvas.stage.removeListener(\"mouseup\",sgLayer.gridonMouseUp);\r\n }", "title": "" }, { "docid": "03e355179b591cc7e16b3e3afc696d83", "score": "0.6679961", "text": "function unbindListeners()\n {\n var i, len, signature;\n\n for(i = 0, len = localEventCache.length; i < len; ++i)\n {\n signature = localEventCache[i];\n window.removeEvent(signature[0], signature[1], signature[2]);\n }\n }", "title": "" }, { "docid": "0d72f8c12cbd1e5df630b5b199569459", "score": "0.6679379", "text": "function clearEventListeners_wrapper() {\n\t\t\twrapper_timeline.home_btn.removeEventListener(\"click\", home_btn);\n\t\t\twrapper_timeline.home_btn.removeEventListener(\"mouseover\", home_btnOpacity);\n\t\t\twrapper_timeline.home_btn.removeEventListener(\"mouseout\", home_btnOpacityOut);\n\t\t\twrapper_timeline.flat1_btn_1.removeEventListener(\"click\", flat1_btn_1);\n\t\t\twrapper_timeline.flat1_btn_2.removeEventListener(\"click\", flat1_btn_2);\n\t\t\twrapper_timeline.flat2_btn_1.removeEventListener(\"click\", flat2_btn_1);\n\t\t\twrapper_timeline.flat2_btn_2.removeEventListener(\"click\", flat2_btn_2);\n\t\t\twrapper_timeline.flat3_btn_1.removeEventListener(\"click\", flat3_btn_1);\n\t\t\twrapper_timeline.flat3_btn_2.removeEventListener(\"click\", flat3_btn_2);\n\t\t\twrapper_timeline.flat4_btn_1.removeEventListener(\"click\", flat4_btn_1);\n\t\t\twrapper_timeline.flat4_btn_2.removeEventListener(\"click\", flat4_btn_2);\n\t\t\twrapper_timeline.flat5_btn_1.removeEventListener(\"click\", flat5_btn_1);\n\t\t\twrapper_timeline.flat5_btn_2.removeEventListener(\"click\", flat5_btn_2);\n\t\t\twrapper_timeline.flat6_btn_1.removeEventListener(\"click\", flat6_btn_1);\n\t\t\twrapper_timeline.flat7_btn_1.removeEventListener(\"click\", flat7_btn_1);\n\t\t\twrapper_timeline.flat7_btn_2.removeEventListener(\"click\", flat7_btn_2);\n\t\t\twrapper_timeline.flat7_btn_3.removeEventListener(\"click\", flat7_btn_3);\n\t\t\twrapper_timeline.flat7_btn_4.removeEventListener(\"click\", flat7_btn_4);\n\t\t\twrapper_timeline.stairs_btn_1.removeEventListener(\"click\", stairs_btn_1);\n\t\t\twrapper_timeline.stairs_btn_2.removeEventListener(\"click\", stairs_btn_2);\n\t\t\twrapper_timeline.stairs_btn_3.removeEventListener(\"click\", stairs_btn_3);\n\t\t\twrapper_timeline.door_btn_1.removeEventListener(\"click\", door_btn_1);\n\t\t}", "title": "" }, { "docid": "d322ce39fd9b1b0ca7d497bad7f1f4c3", "score": "0.66786754", "text": "function removeClickEventsOnButtons() {\n gameButtons.forEach(function (element) {\n element.off('click');\n });\n }", "title": "" } ]
1487e6e02f8aaa9fe1b89fe578c10d77
Do an intelligent CloudFormation join on the given values, producing a minimal expression
[ { "docid": "fc5d083b64db0d317f3c5983a50738ce", "score": "0.6401253", "text": "function minimalCloudFormationJoin(delimiter, values) {\n let i = 0;\n while (i < values.length) {\n const el = values[i];\n if (isSplicableFnJoinIntrinsic(el)) {\n values.splice(i, 1, ...el['Fn::Join'][1]);\n }\n else if (i > 0 && isPlainString(values[i - 1]) && isPlainString(values[i])) {\n values[i - 1] += delimiter + values[i];\n values.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return values;\n function isPlainString(obj) {\n return typeof obj === 'string' && !token_1.Token.isUnresolved(obj);\n }\n function isSplicableFnJoinIntrinsic(obj) {\n if (!isIntrinsic(obj)) {\n return false;\n }\n if (Object.keys(obj)[0] !== 'Fn::Join') {\n return false;\n }\n const [delim, list] = obj['Fn::Join'];\n if (delim !== delimiter) {\n return false;\n }\n if (token_1.Token.isUnresolved(list)) {\n return false;\n }\n if (!Array.isArray(list)) {\n return false;\n }\n return true;\n }\n}", "title": "" } ]
[ { "docid": "ffe9714d0686437c78d2e462caecbf65", "score": "0.6202721", "text": "joinWith(valueA,valueB,connector){\n return this.removeSuffix(valueA,connector) + connector + this.removePrefix(valueB,connector);\n }", "title": "" }, { "docid": "dcb6b9dc817163a00b47b0bda8f0adce", "score": "0.609609", "text": "static concat(left, right) {\n if (left === undefined && right === undefined) {\n return '';\n }\n const parts = new Array();\n if (left !== undefined) {\n parts.push(left);\n }\n if (right !== undefined) {\n parts.push(right);\n }\n // Some case analysis to produce minimal expressions\n if (parts.length === 1) {\n return parts[0];\n }\n if (parts.length === 2 && typeof parts[0] === 'string' && typeof parts[1] === 'string') {\n return parts[0] + parts[1];\n }\n // Otherwise return a Join intrinsic (already in the target document language to avoid taking\n // circular dependencies on FnJoin & friends)\n return { 'Fn::Join': ['', minimalCloudFormationJoin('', parts)] };\n }", "title": "" }, { "docid": "3bbc4977c54220382f5e76a7170a6544", "score": "0.55901045", "text": "function joiner(params) {\r\n\tconst first = params.join(\",\");\r\n\tconst second = params.join(\"+\");\r\n\treturn {first, second};\r\n}", "title": "" }, { "docid": "86b1b5f38adb9b96c7a15b6335a39d36", "score": "0.5466513", "text": "function joinWith(onto, next, separator) {\n // YOUR CODE HERE\n}", "title": "" }, { "docid": "c39f64ebbafd56b1b78321ee9e305b9c", "score": "0.53483707", "text": "_createJoinConditions(semanticmodel) {\n //we only need to check the edges between two entities\n let edges = semanticmodel.getEdgesBetweenTypes(type.CLASS, type.CLASS);\n\n edges.forEach(edge => {\n let sourceNode = semanticmodel.get(edge.source);\n let targetNode = semanticmodel.get(edge.target);\n\n //only when for both nodes the sources are found we can look for the join conditions\n if (sourceNode.sourceDescription && targetNode.sourceDescription) {\n //get the data sources of each node\n let sourceData = this._getDataSourceByID(sourceNode.sourceDescription.id);\n let targetData = this._getDataSourceByID(targetNode.sourceDescription.id);\n\n //get the values between which we need to compare\n let sourceValues = Aligner._getValues(sourceData);\n let targetValues = Aligner._getValues(targetData);\n\n //look for a match\n let match = Aligner._match(sourceValues, targetValues);\n\n //if match is found\n if (match) {\n if (sourceData.sourceDescription.type === 'json') {\n //we need to cut '$.' from the paths\n match.child = match.child.substr(2);\n }\n\n if (targetData.sourceDescription.type === 'json') {\n //we need to cut '$.' from the paths\n match.parent = match.parent.substr(2);\n }\n\n edge.joinConditions.push(match);\n }\n }\n });\n }", "title": "" }, { "docid": "5eb8a3994ac16fb11ed7dbbdcffd1ce4", "score": "0.5338786", "text": "function fancyJoin(a,b) {\n if (a == \"\") { return b; }\t\n else if (b == \"\") { return a; }\n else { return a+\"+\"+b; }\n}", "title": "" }, { "docid": "edacdca32b8682512ffe931c13a5fa1d", "score": "0.53205526", "text": "function joinCost(outer, inner, stats) {\n var pairs = [\n ['Hash-INL', inner['hashCost']],\n ['Primary-BTree-INL', inner['ptreeCost']],\n ['Sec-BTree-INL', inner['streeCost']],\n ['NL', inner['npages']],\n ['HashJoin', 1]\n ];\n var outerCost = outer.cost || outer.npages;\n pairs = _.reject(pairs, function(p) { return _.isNaN(p[1]) || _.isUndefined(p[1]); });\n pairs = _.map(pairs, function(p) {\n if (p[0] == 'HashJoin') {\n return [p[0], outerCost + inner.npages + outer.card * p[1]];\n }\n return [p[0], outerCost + outer.card * p[1]];\n })\n var ret = _.min(pairs, function(p) { return p[1]; });\n return {\n inner: inner,\n outer: outer,\n jointype: ret[0],\n cost: ret[1],\n card: _.min([outer.card, inner.card])\n }\n }", "title": "" }, { "docid": "0bbc88d049658a6cb8c96d8cf9bfff0b", "score": "0.5280472", "text": "function joinVals(args) {\n\tlet result = [];\n\tlet putIn = args.pop();\n\n\targs = derefArgs(args);\n\tif (args === true) return true;\n \n args.reverse(); // to match semantics of JOIN\n\tfor (let arg of args) {\n\t\tif (arg[0] == \"N\") {\n\t\t\tresult.push(arg[1]);\n\t\t} else {\n\t\t\tresult = result.concat(Columns[arg[1]]);\n\t\t}\n\t}\n\tColumns[putIn[1]] = result;\n}", "title": "" }, { "docid": "b9290e9b01e1e817ed8898446a8d7c36", "score": "0.5267617", "text": "function combineGeneratedStrings(vals) {\r\n\t return vals.join(' + ');\r\n\t}", "title": "" }, { "docid": "0db16461a6d6241674bb5f73c58084a5", "score": "0.5226038", "text": "joinMultiSelect(dimension, filters) {\n const values = filters[dimension].values;\n const lookupTable = filters[dimension].lookupTable;\n const idColumn = filters[dimension].idColumn;\n\n const checkedValues = values.filter(value => value.checked === true);\n const subChunks = checkedValues.map(value => `admin_boundary_id = '${value.value}'`);\n\n if (subChunks.length > 0) { // don't set sqlChunks if nothing is selected\n const chunk = `(${subChunks.join(' OR ')})`;\n // these changes to dimension are made to reflect the current columns on carto\n if (dimension === 'cd') dimension = 'commboard';\n if (dimension === 'nta2020') dimension = 'nta';\n return `${idColumn} IN (SELECT feature_id FROM ${lookupTable} WHERE admin_boundary_type = '${dimension}' AND ${chunk})`;\n }\n\n return 'FALSE'; // if no options are checked, make the resulting SQL return no rows\n }", "title": "" }, { "docid": "3b6c25d68edd3c881d65148b6633379d", "score": "0.5208559", "text": "function adjoinReduce(set, value)\n{\n return set.concat([ value ]);\n}", "title": "" }, { "docid": "67f710f56f574f9aeafa6f26efa5ca17", "score": "0.51874", "text": "function multiJoin(arr) {\n\n}", "title": "" }, { "docid": "903fd057612902d71bfa584b34f4b83e", "score": "0.5078792", "text": "joinValuePageFilter(value){\n\n\n let string = '';\n for (let prop in value){\n\n // add if has element\n if(value[prop]){\n\n string = string != '' ? value[prop] + '&' + string : value[prop] ;\n }\n }\n\n return string != '' ? string + '&' : '';\n }", "title": "" }, { "docid": "4b4f0cba31fa9badec4b871573f4cf3e", "score": "0.50473654", "text": "function JoinF() {}", "title": "" }, { "docid": "071b945a2ebb92104f5300c5f781325f", "score": "0.5018978", "text": "joinValuesArrayFilters(value , nameFilter){\n\n // IS ARRAY\n if(Array.isArray(value)){\n let string = '';\n\n let valueReverse = this.reverseArray(value);\n\n for (let prop in valueReverse){\n\n string = string != '' ? valueReverse[prop] + '-' + string : valueReverse[prop] ;\n }\n\n\n return string != '' && string != '0-0' && string != '0' ? nameFilter + '=' + string : '';\n }\n\n\n // IS STRING // NUMBER\n return value ? nameFilter + '=' + value : '';\n\n }", "title": "" }, { "docid": "208e2d4833b99e4f4ea499e15a3e79a2", "score": "0.49698633", "text": "join() {\n return this.__value\n }", "title": "" }, { "docid": "b46bdd5c113c4edfaab460392108143b", "score": "0.48986268", "text": "intersectJoin(b, fn) {\n const out = [];\n let i = 0, j = 0;\n while (i < this.ranges.length && j < b.ranges.length) {\n const r1 = this.ranges[i], r2 = b.ranges[j];\n const rout = IntervalMap.intersection(r1, r2);\n if (rout !== null) {\n // Found an intersection.\n fn(r1, r2, rout);\n out.push(rout);\n if (r1.end == rout.end)\n i++;\n if (r2.end == rout.end)\n j++;\n } else if (this.ranges[i].start < b.ranges[j].start) {\n i++;\n } else {\n j++;\n }\n }\n return new IntervalMap(out);\n }", "title": "" }, { "docid": "ffb330ead88b4e22b93f181dd0c007a0", "score": "0.48101178", "text": "join(...args) {\n return args[0].length > 1 ? args[0].join(args[1]) : args[0];\n }", "title": "" }, { "docid": "e78b6be4dad3b81a81cfe08cc53925ed", "score": "0.48080212", "text": "function joinVarsAdjustSingular (arr1, arr2) {\n // let isSinglular = arr1.map(arr1element => arr1element === 1)\n let beforeJoin = arr1.map(\n arr1element => (\n arr1element.toString() + \" \" + (\n arr1element !== 1 ? \n arr2[arr1.indexOf(arr1element)] :\n arr2[arr1.indexOf(arr1element)].slice(0,arr2.length+1)\n )\n )\n )\n return beforeJoin.join(\" \")\n}", "title": "" }, { "docid": "fb5d1cc2c42c35f95197d34dc00b0ac7", "score": "0.48039326", "text": "function concatenateStrings(value1, value2) {\n const finalstring = value1.concat(value2);\n\n return finalstring;\n}", "title": "" }, { "docid": "3803e89df5bfa46611b551da298189f9", "score": "0.47686243", "text": "join() {\n let sql = '';\n let i = -1;\n const joins = this.grouped.join;\n if (!joins) return '';\n while (++i < joins.length) {\n const join = joins[i];\n const table = join.schema ? `${join.schema}.${join.table}` : join.table;\n if (i > 0) sql += ' ';\n if (join.joinType === 'raw') {\n sql += this.formatter.unwrapRaw(join.table);\n } else {\n sql += join.joinType + ' join ' + this.formatter.wrap(table);\n let ii = -1;\n while (++ii < join.clauses.length) {\n const clause = join.clauses[ii];\n if (ii > 0) {\n sql += ` ${clause.bool} `;\n } else {\n sql += ` ${clause.type === 'onUsing' ? 'using' : 'on'} `;\n }\n const val = this[clause.type].call(this, clause);\n if (val) {\n sql += val;\n }\n }\n }\n }\n return sql;\n }", "title": "" }, { "docid": "1c0b73404b0b1cdcbd281d2d4ccf8291", "score": "0.4762588", "text": "function jointExpression(tokens) {\n\t\t\ttokens.save();\n\t\t\tlet exprs = [assignment(tokens)];\n\t\t\twhile (tokens.save(), tokens.next().type == \",\") { // save in case token is not \",\"\n\t\t\t\ttokens.clearSave(); // the token was \",\" so no need to restore\n\t\t\t\tlet nextExpr = assignment(tokens);\n\t\t\t\tif (!nextExpr) {\n\t\t\t\t\ttokens.error(\"Joint: expected another expression but found none\");\n\t\t\t\t}\n\t\t\t\texprs.push(nextExpr);\n\t\t\t}\n\t\t\ttokens.restore(); // restore since last token was not \",\"\n\t\t\tif (exprs.length > 1) { // if multiple joined expressions\n\t\t\t\treturn new Expr(\"joint\", {exprs: exprs}, tokens.clearSave());\n\t\t\t}\n\t\t\telse { // if only one expression, fall-through\n\t\t\t\ttokens.clearSave();\n\t\t\t\treturn exprs[0];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ed5eebb176a160f2d7c8cdbc97e043ce", "score": "0.47516572", "text": "joinRef(ref) {\n return (ref.table ? ref.table + \"!\" : \"\") +\n (ref.colAbsolute ? \"$\" : \"\") +\n ref.col.toUpperCase() +\n (ref.rowAbsolute ? \"$\" : \"\") +\n Number(ref.row).toString();\n }", "title": "" }, { "docid": "2f744f48ab8c6cbe5aa28dcd5a6977fe", "score": "0.47504655", "text": "join() {\n let sql = '';\n let i = -1;\n const joins = this.grouped.join;\n if (!joins) return '';\n while (++i < joins.length) {\n const join = joins[i];\n const table = join.schema ? `${join.schema}.${join.table}` : join.table;\n if (i > 0) sql += ' '\n if (join.joinType === 'raw') {\n sql += this.formatter.unwrapRaw(join.table)\n } else {\n sql += join.joinType + ' join ' + this.formatter.wrap(table)\n let ii = -1\n while (++ii < join.clauses.length) {\n const clause = join.clauses[ii]\n if (ii > 0) {\n sql += ` ${clause.bool} `;\n } else {\n sql += ` ${clause.type === 'onUsing' ? 'using' : 'on'} `;\n }\n const val = this[clause.type].call(this, clause);\n if (val) {\n sql += val;\n }\n }\n }\n }\n return sql;\n }", "title": "" }, { "docid": "8e1e4340e408e2c16c8bc2be9af7fb8d", "score": "0.47472408", "text": "function w(a,b){return a.trim().split(/\\s+/).map(function(a){return x(a,b)}).join(\" \")}", "title": "" }, { "docid": "f76e53e5c1e508f0688628b2951cc083", "score": "0.4726343", "text": "function merge(el1, el2) {\n return el1.concat(' ' + el2); \n}", "title": "" }, { "docid": "e359e51a6f29fb1aaf6951149b3a3278", "score": "0.47262564", "text": "function test_join() {\n list = ['Vulcan', 'Klingon', 'Borg'];\n assertEquals(list.join(','), 'Vulcan,Klingon,Borg', 'join');\n assertEquals((true ? list : null).join(','), 'Vulcan,Klingon,Borg', 'join order');\n}", "title": "" }, { "docid": "60153f584f2dbace819ba0b7a8040997", "score": "0.4691459", "text": "getJoins(joins) {\n return joins.map(join => ` INNER JOIN \\`${join.includeTable}\\` ON ${join.localField} = ${join.remoteField}`)\n }", "title": "" }, { "docid": "e4452ed8b0afb5195006de080ae0c16d", "score": "0.46813416", "text": "function joinStrings(a, b) {\n return a && b ? a + \" \" + b : a || b;\n}", "title": "" }, { "docid": "e4452ed8b0afb5195006de080ae0c16d", "score": "0.46813416", "text": "function joinStrings(a, b) {\n return a && b ? a + \" \" + b : a || b;\n}", "title": "" }, { "docid": "53c90778fbc983843aeb33437c64122a", "score": "0.4663748", "text": "function concatenateStrings(value1, value2) {\n return value1 + value2;\n}", "title": "" }, { "docid": "a0aad5b672e5b620bf34cebce797b653", "score": "0.4659515", "text": "function joinAnd(strings) {\n if (strings.length === 1) {\n return strings;\n } else if (strings.length === 2) {\n return strings[0] + ' and ' + strings[1];\n }\n\n var joined = \"\";\n for (var i = 0, l = strings.length - 1; i < l; i++) {\n joined += strings[i] + ', ';\n }\n joined += 'and ' + strings[strings.length - 1];\n return joined;\n}", "title": "" }, { "docid": "46338d97c47922f5baf566d72676d56b", "score": "0.46509713", "text": "function concatLetters(left, right) {\n return `Hash(${left} + ${right})`;\n}", "title": "" }, { "docid": "239f7409014c4f557fda986b13dc6b9f", "score": "0.46485785", "text": "function joinList(mylist) {\n var concepts = mylist[0] || \"\"\n for (let i = 1; i < mylist.length; i++) {\n concepts = concepts + \", \" + mylist[i]\n }\n return concepts\n}", "title": "" }, { "docid": "8d196ae32d029aaeb665d932ecc5125b", "score": "0.4648298", "text": "join(separator = ',') {\n let joined = '';\n let result;\n while (true) {\n result = this.source.next();\n if (result.done) {\n break;\n }\n joined += separator + result.value;\n }\n return joined.substr(separator.length);\n }", "title": "" }, { "docid": "02a909df230c0fc6c8aba4cca85d1032", "score": "0.46203706", "text": "function join() {\n var tables = _.toArray(arguments);\n var joinedTable = newEmptyTable();\n\n tables.forEach(function(table) {\n var newJoinedTable = [];\n [].concat(joinedTable).forEach(function(row1) {\n [].concat(table).forEach(function(row2) {\n newJoinedTable.push(_.extend({}, row1, row2));\n });\n });\n joinedTable = newJoinedTable;\n });\n\n return joinedTable;\n }", "title": "" }, { "docid": "e1d6b5ed037817be7ef995e5ea3cfcb3", "score": "0.46119624", "text": "function joinWith(a, glue) {\n return (a) ? a.join(glue) : \"\";\n}", "title": "" }, { "docid": "46c8388a43ab0cfdb3bc87ece2ad8824", "score": "0.4608608", "text": "function join(array, joinWith) {\n return reduce(\n array,\n (result, current, index) => {\n if (index === 0) {\n return current;\n }\n\n return `${result}${joinWith}${current}`;\n },\n \"\"\n );\n}", "title": "" }, { "docid": "ff60058b8abc70f447d533b0a9d32d45", "score": "0.46058375", "text": "add(a, b) {\n var calculateBy = this.props.options.calculateBy.name;\n return a + b[calculateBy];\n }", "title": "" }, { "docid": "fc42193cb1ae85bf215568f70d4b310d", "score": "0.45991662", "text": "function mr1(){\n return db.sgdi.mapReduce(c1,c2,{out:\"outputMR1\"});\n}", "title": "" }, { "docid": "cf1799ff330aa8cdd6ac069141f2888b", "score": "0.45985344", "text": "joinArrays(arr1, arr2, leftId, rightId) {\n let outputArr = [];\n arr1.forEach((item) => {\n //get the matching item in the second array\n let matchingItem = arr2.filter(\n (arr2item) => arr2item[rightId] === item[leftId]\n );\n if (matchingItem.length)\n outputArr.push(Object.assign(item, matchingItem[0]));\n });\n return outputArr;\n }", "title": "" }, { "docid": "3af3161bdaa83a332ae8c290a2855ab2", "score": "0.45885062", "text": "function tuplify(values) {\n return '(' + values.join(', ') + ')';\n}", "title": "" }, { "docid": "a38f9debf9d4eb3fdff0576eab0fa2cc", "score": "0.45853558", "text": "function cellsJoining (table, coords) {\n const mergingRows = [coords[0][0], coords[1][0]].sort()\n const mergingCols = [coords[0][1], coords[1][1]].sort()\n\n let curRow = -1\n let curCol = -1\n let isTopBorder = false\n let isBottomBorder = false\n let isFirstColChar = false\n let inMergingColRange = false\n\n const joined = table.map((row, i) => {\n if (row[0] === '+') curRow++\n\n isTopBorder = i === 0\n isBottomBorder = i === table.length - 1\n\n // If we're above the merging rows, return row\n if (curRow < mergingRows[0]) return row\n\n // If we're below the merging rows, return row\n if (curRow > mergingRows[1]) {\n // Unless this is the bottom row and affected by merging\n if (!(curRow - 1 === mergingRows[1] && isBottomBorder)) {\n return row\n }\n }\n\n // The top merging border doesn't need changes, unless it's literally\n // the top of the table\n if ((curRow === mergingRows[0]) && row[0] === '+' && !isTopBorder) return row\n\n // AT THIS POINT WE'RE IN THE RANGE OF AFFECTED ROWS\n\n // Reset col counter\n curCol = -1\n\n return row.split('').reduce((acc, val, c) => {\n isFirstColChar = false\n\n if (val === '+' || val === '|') {\n curCol++\n isFirstColChar = curCol === mergingCols[0]\n }\n\n /*\n Border rules:\n - i.e. is this literally the top or bottom border of the table\n - (i === 0 || i === table.length - 1)\n - ✅ First char is +\n - ✅ If we're in the range of affected cols, change + to -\n - Last char is +\n\n Column rules (at this point we're sure we're not bottom border):\n - First char is | if inMergingColRange, else val\n - ✅ Last char is either | or +\n - Simply append val when (curCol - 1 === mergingCols[1])\n - If inMergingColRange, replace -, |, and + with ' '\n - Unless it's literally the first char since coming into merge range\n - Append val\n */\n\n inMergingColRange = (curCol >= mergingCols[0] && curCol <= mergingCols[1])\n\n if (isBottomBorder || isTopBorder) {\n if (c === 0) return acc + '+'\n if (val === '+' && inMergingColRange && !isFirstColChar) return acc + '-'\n\n return acc + val\n }\n\n // Handle first char\n if (c === 0) return acc + (inMergingColRange ? '|' : val)\n\n if (inMergingColRange && !isFirstColChar && ['|', '-', '+'].includes(val)) {\n return acc + ' '\n }\n\n // Handle last char\n if (c === row.length - 1) return acc + (acc[c - 1] === '-' ? '+' : '|')\n\n return acc + val\n }, '')\n })\n\n return joined\n}", "title": "" }, { "docid": "ffe1c3fff210821255a149b6cdd772d2", "score": "0.45710886", "text": "function unionExpressions(context, name, unionedElementsList) {\n let duplicateNameElements = unionedElementsList.filter(element => element.name.includes(name));\n const count = duplicateNameElements.length;\n let uniqueName = `${name}_union`;\n if (count > 0) {\n uniqueName = `${name}_union_${count}`;\n }\n\n const expressionToUnion = {\n name: uniqueName,\n expressionList: context.values\n };\n unionedElementsList.push(expressionToUnion);\n context.values = [`\"${uniqueName}\"`];\n}", "title": "" }, { "docid": "a54c03aded8e029630331bfbf57dce7f", "score": "0.4562355", "text": "function makeContact2forContact1( contact_prefix, phone_prefix, contact_phones_count, row ) {\n\n var mapping = {};\n\n mapping[ contact_prefix + 'Birth_date' ] = 'Contact2 Birthdate';\n mapping[ contact_prefix + 'Title_1' ] = 'Contact2 Salutation';\n mapping[ contact_prefix + 'First_Name' ] = 'Contact2 First Name';\n mapping[ contact_prefix + 'Last_Name' ] = 'Contact2 Last Name';\n mapping[ contact_prefix + 'Middle_Name' ] = 'Contact2 Middle Name';\n mapping[ contact_prefix + 'System_ID' ] = 'Contact2 RE ID';\n mapping[ contact_prefix + 'Gender' ] = 'Contact2 Gender';\n\n var contact_row = makeSurjectiveMappingWith( mapping )( row );\n\n contact_row['Contact2 Birthdate'] = format_date( contact_row['Contact2 Birthdate'] );\n contact_row[ 'Contact2 Gender' ] = normalizeGenderRep( contact_row[ 'Contact2 Gender' ] );\n contact_row['Contact2 Salutation'] = condenseSalutation( contact_prefix, row );\n contact_row['Contact2 Suffix'] = condenseSuffix( row[ contact_prefix + 'Suffix_1' ], row[ contact_prefix + 'Suffix_2' ] );\n\n var contact_phones_and_emails = {};\n\n for ( var i = 1; i <= contact_phones_count; i += 1 ) {\n\n var record = makePhonesAndEmails( makeIndexedPrefix( phone_prefix, '1', i ), 'Contact2', row );\n contact_phones_and_emails = merge( contact_phones_and_emails, record );\n\n }\n\n return merge( contact_row, contact_phones_and_emails );\n\n}", "title": "" }, { "docid": "6e252a05b93ae7d12380ecdb83078d40", "score": "0.45483896", "text": "getPropertiesIntersect(se1, se2) {\n const attrs1 = se1.attrs;\n const attrs2 = se2.attrs;\n const assoc = {};\n let assoclen = 0;\n for (const key in attrs1) {\n // only have value token\n if (!attrs1[key].property) {\n continue;\n }\n // not exist in attrs2\n if (!(key in attrs2)) {\n continue;\n }\n if (!attrs2[key].property) {\n continue;\n }\n const attrs1Value = attrs1[key].value.value;\n const attrs2Value = attrs2[key].value.value;\n // value not equal\n if (attrs1Value !== attrs2Value) {\n continue;\n }\n // property has prefix or value has suffix\n // if(attrs1[key].property.ext.prefix || attrs1[key].value.ext.suffix){\n // continue;\n // }\n if (this.isUnMergeProperty(attrs1[key], attrs1, attrs2)) {\n continue;\n }\n assoc[key] = attrs1[key];\n // 2 chars is : and ;\n assoclen +=\n attrs1[key].property.value.length + attrs1[key].value.value.length + 2;\n }\n const length = Object.keys(assoc).length;\n if (length === 0) {\n return false;\n }\n if (\n length !== Object.keys(attrs1).length &&\n length !== Object.keys(attrs2).length\n ) {\n // 3 chars is `, { }`\n const selen = se1.selector.value.length + se2.selector.value.length + 3;\n if (selen >= assoclen) {\n return false;\n }\n }\n return assoc;\n }", "title": "" }, { "docid": "c1f3e52dddb60a246a4377e3d7108361", "score": "0.45376623", "text": "function join(stringOne, stringTwo, stringThree, stringFour) {\n // YOUR CODE BELOW HERE //\n // Create a variable to represent all arguments passed into functions\n // Should accept any num of arguments as an array\n var args = Array.from(arguments);\n \n // Convert array of arguments into a single string\n return args.join('');\n\n // YOUR CODE ABOVE HERE //\n}", "title": "" }, { "docid": "55e7505ef5f795bcdca6dfb358d11a06", "score": "0.4532761", "text": "function join (connector) {\n return function (list) {\n return list.join(connector)\n }\n}", "title": "" }, { "docid": "c3e4e1368685b09df5ead4ba1a395d6c", "score": "0.4530957", "text": "function relationalExpr(stream, a) { return binaryL(additiveExpr, stream, a, ['<','>','<=','>=']); }", "title": "" }, { "docid": "42290b9f8108c7ca86f24c3f2a4f0a07", "score": "0.45269626", "text": "function _join(separator) {\r\n\t\t\t\treturn function(val) {\r\n\t\t\t\t\tif (Array.isArray(val)) {\r\n\t\t\t\t\t\treturn val.join(separator);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar split = val.toString().split(separator);\r\n\t\t\t\t\t\tvar arr = [];\r\n\t\t\t\t\t\tfor (var i = 0; i < split.length; i++) {\r\n\t\t\t\t\t\t\tif (split[i] !== '' && split[i] != null) {\r\n\t\t\t\t\t\t\t\tarr.push(split[i]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn arr.join(separator);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}", "title": "" }, { "docid": "a41254de85c7bfb5d7fb94b8a4fdee26", "score": "0.45263472", "text": "function selectLetters(s1, s2) {\n let result = '';\n result += concat(s1, s2);\n result += concat(s2, s1);\n console.log(result);\n return result;\n}", "title": "" }, { "docid": "97d7c6520860aed972ddb345c2172713", "score": "0.4520493", "text": "function dataJoin(data, name1) {\n var records = [];\n\n for (var i = 0; i < data.length; i++) {\n //---- loop thru all the fields and create a record ----\n var record = {};\n\n for (var a = 0; a < arguments.length; a += 2) {\n var dataX = arguments[a];\n var nameX = arguments[a + 1];\n\n var valueX = dataX[i];\n\n record[nameX] = valueX;\n }\n\n records.push(record);\n }\n\n return records;\n }", "title": "" }, { "docid": "2071a04204217713db0f46f475a06ad4", "score": "0.45004234", "text": "function leftAssociative(head, tail) {\n var result = head;\n for (var i = 0; i < tail.length; i++) {\n result = ast.op(tail[i].op, [result, tail[i].exp]);\n }\n return result;\n }", "title": "" }, { "docid": "3c6472243d6bb66e1f8fdcaff7595909", "score": "0.44899544", "text": "function and(a, b) {\n return a + \" and \" + b;\n}", "title": "" }, { "docid": "5b21dedae4a8be03a714dec9e081a2d0", "score": "0.44861266", "text": "function joinCollections(c1,c2){\n var MergeBands = function(element) {\n // A function to merge the bands together.\n // After a join, results are in 'primary' and 'secondary' properties.\n return ee.Image.cat(element.get('primary'), element.get('secondary'));\n };\n\n var join = ee.Join.inner();\n var filter = ee.Filter.equals('system:time_start', null, 'system:time_start');\n var joined = ee.ImageCollection(join.apply(c1, c2, filter));\n \n joined = ee.ImageCollection(joined.map(MergeBands));\n joined = joined.map(function(img){return img.mask(img.mask().and(img.reduce(ee.Reducer.min()).neq(0)))});\n return joined;\n }", "title": "" }, { "docid": "9f86bd48fa244de9a5c30ef4c4eea358", "score": "0.4480447", "text": "allCombine () {\n let all = (this.rowCombination().concat(this.columnCombination()))\n all.push(this.crossCombination1())\n all.push(this.crossCombination2())\n return all\n }", "title": "" }, { "docid": "de7c75356495b3822356717249b681f1", "score": "0.4476971", "text": "function _join(pre, tail) {\n var _hasBegin = !!pre\n if(!_hasBegin) pre = ''\n if (/^\\[.*\\]$/.exec(tail)) return pre + tail\n else if (typeof(tail) == 'number') return pre + '[' + tail + ']'\n else if (_hasBegin) return pre + '.' + tail\n else return tail\n }", "title": "" }, { "docid": "c2872f3efef680a567630b1188aa4942", "score": "0.4473054", "text": "function JoinAggregate(params) {\n Aggregate.call(this, params);\n}", "title": "" }, { "docid": "24c7efeaf0eaa612a8e87450fcf7cd03", "score": "0.44727552", "text": "function url_join(component, query_string, joiner, param, ds) {\n let str = component.props.appActions.dataSlots[ds].trim();\n let outcome = {\n querystring:\"\",\n urljoiner:\"\"\n };\n if (str) {\n outcome.querystring = query_string + joiner + param + encodeURIComponent(str);\n outcome.urljoiner = \"&\";\n } else {\n outcome.querystring = query_string;\n outcome.urljoiner = joiner;\n }\n return outcome;\n }", "title": "" }, { "docid": "24c7efeaf0eaa612a8e87450fcf7cd03", "score": "0.44727552", "text": "function url_join(component, query_string, joiner, param, ds) {\n let str = component.props.appActions.dataSlots[ds].trim();\n let outcome = {\n querystring:\"\",\n urljoiner:\"\"\n };\n if (str) {\n outcome.querystring = query_string + joiner + param + encodeURIComponent(str);\n outcome.urljoiner = \"&\";\n } else {\n outcome.querystring = query_string;\n outcome.urljoiner = joiner;\n }\n return outcome;\n }", "title": "" }, { "docid": "a795cf539278932e834888acbf135a3b", "score": "0.44716588", "text": "function joinBy(pattern, ...args) {\n return args.join(pattern)\n}", "title": "" }, { "docid": "574b5411a849dc39f070471c4f6b27c2", "score": "0.4467698", "text": "function join(userdata, salarydata, exchangeRatio) {\n let newdata = [];\n userdata.forEach(function (data) {\n id = data.id;\n data.salaryInIDR = salarydata.array.find((d) => d.id === id).salaryInIDR;\n data.salaryInUSD = convertCurrency(data.salaryInIDR, exchangeRatio);\n\n //Website and Company Column not Needed as Stated in PDF\n delete data.website;\n delete data.company;\n\n //Push Joined Record to newdata array\n newdata.push(data);\n });\n return newdata;\n}", "title": "" }, { "docid": "af4461b31cde72d6ede7e9fc30803f28", "score": "0.44667274", "text": "function doJoin (query, scope, h) {\r\n//\tconsole.log('doJoin', arguments);\r\n//\tconsole.log(query.sources.length);\r\n\t// Check, if this is a last join?\r\n\tif(h>=query.sources.length) {\r\n//console.log(query.wherefns);\r\n\t\t// Then apply where and select\r\n//\t\tconsole.log(query);\r\n\t\tif(query.wherefn(scope,query.params, alasql)) {\r\n\r\n//\t\t\tconsole.log(\"scope\",scope.schools);\r\n\r\n//\t\t\tvar res = query.selectfn(scope, query.params, alasql);\r\n//\t\t\tconsole.log(\"last\",res);\r\n\t\t\t// If there is a GROUP BY then pipe to groupping function\r\n\t\t\tif(query.groupfn) {\r\n\t\t\t\tquery.groupfn(scope, query.params, alasql)\r\n\t\t\t} else {\r\n//\t\t\t\tquery.qwerty = 999;\r\n//console.log(query.qwerty, query.queriesfn && query.queriesfn.length,2);\r\n\t\t\t\tquery.data.push(query.selectfn(scope, query.params, alasql));\r\n\t\t\t}\t\r\n\t\t}\r\n\t} else if(query.sources[h].applyselect) {\r\n//\t\tconsole.log('APPLY',scope);\r\n//\t\t\tconsole.log('scope1',scope);\r\n//\t\t\t\tconsole.log(scope);\r\n\t\tvar source = query.sources[h];\r\n\t\tsource.applyselect(query.params, function(data){\r\n\t\t\tif(data.length > 0) {\r\n\t//\t\t\tconsole.log('APPLY CB');\r\n\t\t\t\tfor(var i=0;i<data.length;i++) {\r\n\t\t\t\t\tscope[source.alias] = data[i];\r\n\t\t\t\t\tdoJoin(query, scope, h+1);\r\n\t\t\t\t};\t\t\t\r\n\t\t\t} else {\r\n//\t\t\t\tconsole.log(source.applymode);\r\n\t\t\t\tif (source.applymode == 'OUTER') {\r\n\t\t\t\t\tscope[source.alias] = {};\r\n\t\t\t\t\tdoJoin(query, scope, h+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},scope);\r\n\r\n//\t\tconsole.log(data);\r\n\t} else {\r\n\r\n// STEP 1\r\n\r\n\t\tvar source = query.sources[h];\r\n\t\tvar nextsource = query.sources[h+1];\r\n\r\n//\t\tif(source.joinmode == \"LEFT\" || source.joinmode == \"INNER\" || source.joinmode == \"RIGHT\"\r\n//\t\t\t|| source.joinmode == \"OUTER\" || source.joinmode == \"SEMI\") {\r\n\t\tif(true) {//source.joinmode != \"ANTI\") {\r\n\r\n\t\t\t// if(nextsource && nextsource.joinmode == \"RIGHT\") {\r\n\t\t\t// \tif(!nextsource.rightdata) {\r\n\t\t\t// \t\tconsole.log(\"ok\");\r\n\t\t\t// \t\tnextsource.rightdata = new Array(nextsource.data.length);\r\n\t\t\t// \t\tconsole.log(nextsource.data.length, nextsource.rightdata);\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\tvar tableid = source.alias || source.tableid; \r\n\t\t\tvar pass = false; // For LEFT JOIN\r\n\t\t\tvar data = source.data;\r\n\t\t\tvar opt = false;\r\n\r\n\t\t\t// Reduce data for looping if there is optimization hint\r\n\t\t\tif(!source.getfn || (source.getfn && !source.dontcache)) {\r\n\t\t\t\tif(source.joinmode != \"RIGHT\" && source.joinmode != \"OUTER\" && source.joinmode != \"ANTI\" && source.optimization == 'ix') {\r\n\t\t\t\t\tdata = source.ix[ source.onleftfn(scope, query.params, alasql) ] || [];\r\n\t\t\t\t\topt = true;\r\n//\t\t\t\t\tconsole.log(source.onleftfns);\r\n//\t\t\t\t\tconsole.log(source.ix);\r\n//\tconsole.log(source.onleftfn(scope, query.params, alasql));\r\n//\t\t\t\t\tconsole.log(opt, data, data.length);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Main cycle\r\n\t\t\tvar i = 0;\r\n\t\t\tif(typeof data == 'undefined') {\r\n\t\t\t\tthrow new Error('Data source number '+h+' in undefined')\r\n\t\t\t}\r\n\t\t\tvar ilen=data.length;\r\n\t\t\tvar dataw;\r\n//\t\t\tconsole.log(h,opt,source.data,i,source.dontcache);\r\n\t\t\twhile((dataw = data[i]) || (!opt && (source.getfn && (dataw = source.getfn(i)))) || (i<ilen) ) {\r\n\t\t\t\tif(!opt && source.getfn && !source.dontcache) data[i] = dataw;\r\n//console.log(h, i, dataw);\r\n\t\t\t\tscope[tableid] = dataw;\r\n\t\t\t\t// Reduce with ON and USING clause\r\n\t\t\t\tif(!source.onleftfn || (source.onleftfn(scope, query.params, alasql) == source.onrightfn(scope, query.params, alasql))) {\r\n\t\t\t\t\t// For all non-standard JOINs like a-b=0\r\n\t\t\t\t\tif(source.onmiddlefn(scope, query.params, alasql)) {\r\n\t\t\t\t\t\t// Recursively call new join\r\n//\t\t\t\t\t\tif(source.joinmode == \"LEFT\" || source.joinmode == \"INNER\" || source.joinmode == \"OUTER\" || source.joinmode == \"RIGHT\" ) {\r\n\t\t\t\t\t\tif(source.joinmode != \"SEMI\" && source.joinmode != \"ANTI\") { \r\n//\t\t\t\t\t\t\tconsole.log(scope);\r\n\t\t\t\t\t\t\tdoJoin(query, scope, h+1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// if(source.data[i].f = 200) debugger;\r\n\r\n//\t\t\t\t\t\tif(source.joinmode == \"RIGHT\" || source.joinmode == \"ANTI\" || source.joinmode == \"OUTER\") {\r\n\t\t\t\t\t\tif(source.joinmode != \"LEFT\" && source.joinmode != \"INNER\") {\r\n\t\t\t\t\t\t\tdataw._rightjoin = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for LEFT JOIN\r\n\t\t\t\t\t\tpass = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\ti++;\r\n\t\t\t};\r\n\r\n\r\n\t\t\t// Additional join for LEFT JOINS\r\n\t\t\tif((source.joinmode == 'LEFT' || source.joinmode == 'OUTER' || source.joinmode == 'SEMI' ) && !pass) {\r\n\t\t\t// Clear the scope after the loop\r\n\t\t\t\tscope[tableid] = {};\r\n\t\t\t\tdoJoin(query,scope,h+1);\r\n\t\t\t}\t\r\n\r\n\r\n\t\t}\r\n\r\n\t\t// When there is no records\r\n//\t\tif(data.length == 0 && query.groupfn) {\r\n//\t\t\tscope[tableid] = undefined;\r\n//\t\t\tdoJoin(query,scope,h+1);\r\n//\t\t}\r\n\r\n// STEP 2\r\n\r\n\t\tif(h+1 < query.sources.length) {\r\n\r\n\t\t\tif(nextsource.joinmode == \"OUTER\" || nextsource.joinmode == \"RIGHT\" \r\n\t\t\t\t|| nextsource.joinmode == \"ANTI\") {\r\n\r\n\r\n\t\t\t\tscope[source.alias] = {};\r\n\t\t\t\r\n\t\t\t\tvar j = 0;\r\n\t\t\t\tvar jlen = nextsource.data.length;\r\n\t\t\t\tvar dataw;\r\n\r\n\t\t\t\twhile((dataw = nextsource.data[j]) || (nextsource.getfn && (dataw = nextsource.getfn(j))) || (j<jlen)) {\r\n\t\t\t\t\tif(nextsource.getfn && !nextsource.dontcache) nextsource.data[j] = dataw;\r\n\r\n\t\t\t\t\tif(!dataw._rightjoin) {\r\n\t\t\t\t\t\tscope[nextsource.alias] = dataw;\r\n\t\t\t\t\t\tdoJoin(query, scope, h+2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//dataw._rightjoin = undefined;\t\r\n\t\t\t\t\t\tdelete dataw._rightjoin;\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n//\t\t\t\tconsole.table(nextsource.data);\r\n//\t\t\t\tdebugger;\t\r\n\r\n\t\t\t};\r\n\t\t};\r\n\r\n\r\n\t\tscope[tableid] = undefined;\r\n\r\n/*\r\n\t\tif(h+1 < query.sources.length) {\r\n\t\t\tvar nextsource = query.sources[h+1];\r\n\r\n\t\t\tif(nextsource.joinmode == \"OUTER\" || nextsource.joinmode == \"RIGHT\" \r\n\t\t\t\t|| nextsource.joinmode == \"ANTI\") {\r\n\r\n\r\n\t\t\t\tconsole.log(h,query.sources.length);\r\n\t\t\t\t// Swap\r\n\r\n\r\n//\t\t\t\tswapSources(query,h);\r\n\r\n//\t\t\t\tconsole.log(query.sources);\r\n\t\t\t\t//debugger;\r\n//\t\t\t\tvar source = query.sources[h];\r\n\r\n//\t\t\t\tvar tableid = source.alias || source.tableid; \r\n//\t\t\t\tvar data = source.data;\r\n\r\n\t\t\t\t// Reduce data for looping if there is optimization hint\r\n//\t\t\t\tif(source.optimization == 'ix') {\r\n//\t\t\t\t\tdata = source.ix[ source.onleftfn(scope, query.params, alasql) ] || [];\r\n//\t\t\t\t}\r\n\r\n\t\t\t\t// Main cycle\r\n\t\t\t\tvar pass = false;\r\n//\t\t\t\tconsole.log(tableid, data.length);\r\n\t\t\t\tfor(var i=0, ilen=nextsource.data.length; i<ilen; i++) {\r\n\t\t\t\t\tscope[nextsource.tableid] = nextsource.data[i];\r\n\t\t\t\t\t// Reduce with ON and USING clause\r\n\t\t\t\t\tif(!source.onleftfn || (source.onleftfn(scope, query.params, alasql) == source.onrightfn(scope, query.params, alasql))) {\r\n\t\t\t\t\t\t// For all non-standard JOINs like a-b=0\r\n\t\t\t\t\t\tif(source.onmiddlefn(scope, query.params, alasql)) {\r\n\t\t\t\t\t\t\t// Recursively call new join\r\n//\t\t\t\t\t\t\tif(source.joinmode == \"OUTER\") {\r\n\t\t\t\t\t\t\t\tdoJoin(query, scope, h+2);\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// for LEFT JOIN\r\n\t\t\t\t\t\t\tpass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif(!pass) {\r\n\t\t\t\t\t// Clear the scope after the loop\r\n//\t\t\t\t\t\tscope[tableid] = {};\r\n\t\t\t\t\t\tconsole.log(scope);\r\n\t\t\t\t\t\tdoJoin(query,scope,h+2);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Additional join for LEFT JOINS\r\n\t\t\t\t\tscope[query.sources[h+1].tableid] = {};\r\n\t\t\t\t\tconsole.log(scope);\r\n\r\n\t\t\t\tscope[tableid] = undefined;\r\n\r\n\t\t\t\t// SWAP BACK\r\n\t\t\t\tswapSources(query,h);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n*/\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "af4461b31cde72d6ede7e9fc30803f28", "score": "0.44667274", "text": "function doJoin (query, scope, h) {\r\n//\tconsole.log('doJoin', arguments);\r\n//\tconsole.log(query.sources.length);\r\n\t// Check, if this is a last join?\r\n\tif(h>=query.sources.length) {\r\n//console.log(query.wherefns);\r\n\t\t// Then apply where and select\r\n//\t\tconsole.log(query);\r\n\t\tif(query.wherefn(scope,query.params, alasql)) {\r\n\r\n//\t\t\tconsole.log(\"scope\",scope.schools);\r\n\r\n//\t\t\tvar res = query.selectfn(scope, query.params, alasql);\r\n//\t\t\tconsole.log(\"last\",res);\r\n\t\t\t// If there is a GROUP BY then pipe to groupping function\r\n\t\t\tif(query.groupfn) {\r\n\t\t\t\tquery.groupfn(scope, query.params, alasql)\r\n\t\t\t} else {\r\n//\t\t\t\tquery.qwerty = 999;\r\n//console.log(query.qwerty, query.queriesfn && query.queriesfn.length,2);\r\n\t\t\t\tquery.data.push(query.selectfn(scope, query.params, alasql));\r\n\t\t\t}\t\r\n\t\t}\r\n\t} else if(query.sources[h].applyselect) {\r\n//\t\tconsole.log('APPLY',scope);\r\n//\t\t\tconsole.log('scope1',scope);\r\n//\t\t\t\tconsole.log(scope);\r\n\t\tvar source = query.sources[h];\r\n\t\tsource.applyselect(query.params, function(data){\r\n\t\t\tif(data.length > 0) {\r\n\t//\t\t\tconsole.log('APPLY CB');\r\n\t\t\t\tfor(var i=0;i<data.length;i++) {\r\n\t\t\t\t\tscope[source.alias] = data[i];\r\n\t\t\t\t\tdoJoin(query, scope, h+1);\r\n\t\t\t\t};\t\t\t\r\n\t\t\t} else {\r\n//\t\t\t\tconsole.log(source.applymode);\r\n\t\t\t\tif (source.applymode == 'OUTER') {\r\n\t\t\t\t\tscope[source.alias] = {};\r\n\t\t\t\t\tdoJoin(query, scope, h+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},scope);\r\n\r\n//\t\tconsole.log(data);\r\n\t} else {\r\n\r\n// STEP 1\r\n\r\n\t\tvar source = query.sources[h];\r\n\t\tvar nextsource = query.sources[h+1];\r\n\r\n//\t\tif(source.joinmode == \"LEFT\" || source.joinmode == \"INNER\" || source.joinmode == \"RIGHT\"\r\n//\t\t\t|| source.joinmode == \"OUTER\" || source.joinmode == \"SEMI\") {\r\n\t\tif(true) {//source.joinmode != \"ANTI\") {\r\n\r\n\t\t\t// if(nextsource && nextsource.joinmode == \"RIGHT\") {\r\n\t\t\t// \tif(!nextsource.rightdata) {\r\n\t\t\t// \t\tconsole.log(\"ok\");\r\n\t\t\t// \t\tnextsource.rightdata = new Array(nextsource.data.length);\r\n\t\t\t// \t\tconsole.log(nextsource.data.length, nextsource.rightdata);\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\tvar tableid = source.alias || source.tableid; \r\n\t\t\tvar pass = false; // For LEFT JOIN\r\n\t\t\tvar data = source.data;\r\n\t\t\tvar opt = false;\r\n\r\n\t\t\t// Reduce data for looping if there is optimization hint\r\n\t\t\tif(!source.getfn || (source.getfn && !source.dontcache)) {\r\n\t\t\t\tif(source.joinmode != \"RIGHT\" && source.joinmode != \"OUTER\" && source.joinmode != \"ANTI\" && source.optimization == 'ix') {\r\n\t\t\t\t\tdata = source.ix[ source.onleftfn(scope, query.params, alasql) ] || [];\r\n\t\t\t\t\topt = true;\r\n//\t\t\t\t\tconsole.log(source.onleftfns);\r\n//\t\t\t\t\tconsole.log(source.ix);\r\n//\tconsole.log(source.onleftfn(scope, query.params, alasql));\r\n//\t\t\t\t\tconsole.log(opt, data, data.length);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Main cycle\r\n\t\t\tvar i = 0;\r\n\t\t\tif(typeof data == 'undefined') {\r\n\t\t\t\tthrow new Error('Data source number '+h+' in undefined')\r\n\t\t\t}\r\n\t\t\tvar ilen=data.length;\r\n\t\t\tvar dataw;\r\n//\t\t\tconsole.log(h,opt,source.data,i,source.dontcache);\r\n\t\t\twhile((dataw = data[i]) || (!opt && (source.getfn && (dataw = source.getfn(i)))) || (i<ilen) ) {\r\n\t\t\t\tif(!opt && source.getfn && !source.dontcache) data[i] = dataw;\r\n//console.log(h, i, dataw);\r\n\t\t\t\tscope[tableid] = dataw;\r\n\t\t\t\t// Reduce with ON and USING clause\r\n\t\t\t\tif(!source.onleftfn || (source.onleftfn(scope, query.params, alasql) == source.onrightfn(scope, query.params, alasql))) {\r\n\t\t\t\t\t// For all non-standard JOINs like a-b=0\r\n\t\t\t\t\tif(source.onmiddlefn(scope, query.params, alasql)) {\r\n\t\t\t\t\t\t// Recursively call new join\r\n//\t\t\t\t\t\tif(source.joinmode == \"LEFT\" || source.joinmode == \"INNER\" || source.joinmode == \"OUTER\" || source.joinmode == \"RIGHT\" ) {\r\n\t\t\t\t\t\tif(source.joinmode != \"SEMI\" && source.joinmode != \"ANTI\") { \r\n//\t\t\t\t\t\t\tconsole.log(scope);\r\n\t\t\t\t\t\t\tdoJoin(query, scope, h+1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// if(source.data[i].f = 200) debugger;\r\n\r\n//\t\t\t\t\t\tif(source.joinmode == \"RIGHT\" || source.joinmode == \"ANTI\" || source.joinmode == \"OUTER\") {\r\n\t\t\t\t\t\tif(source.joinmode != \"LEFT\" && source.joinmode != \"INNER\") {\r\n\t\t\t\t\t\t\tdataw._rightjoin = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for LEFT JOIN\r\n\t\t\t\t\t\tpass = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\ti++;\r\n\t\t\t};\r\n\r\n\r\n\t\t\t// Additional join for LEFT JOINS\r\n\t\t\tif((source.joinmode == 'LEFT' || source.joinmode == 'OUTER' || source.joinmode == 'SEMI' ) && !pass) {\r\n\t\t\t// Clear the scope after the loop\r\n\t\t\t\tscope[tableid] = {};\r\n\t\t\t\tdoJoin(query,scope,h+1);\r\n\t\t\t}\t\r\n\r\n\r\n\t\t}\r\n\r\n\t\t// When there is no records\r\n//\t\tif(data.length == 0 && query.groupfn) {\r\n//\t\t\tscope[tableid] = undefined;\r\n//\t\t\tdoJoin(query,scope,h+1);\r\n//\t\t}\r\n\r\n// STEP 2\r\n\r\n\t\tif(h+1 < query.sources.length) {\r\n\r\n\t\t\tif(nextsource.joinmode == \"OUTER\" || nextsource.joinmode == \"RIGHT\" \r\n\t\t\t\t|| nextsource.joinmode == \"ANTI\") {\r\n\r\n\r\n\t\t\t\tscope[source.alias] = {};\r\n\t\t\t\r\n\t\t\t\tvar j = 0;\r\n\t\t\t\tvar jlen = nextsource.data.length;\r\n\t\t\t\tvar dataw;\r\n\r\n\t\t\t\twhile((dataw = nextsource.data[j]) || (nextsource.getfn && (dataw = nextsource.getfn(j))) || (j<jlen)) {\r\n\t\t\t\t\tif(nextsource.getfn && !nextsource.dontcache) nextsource.data[j] = dataw;\r\n\r\n\t\t\t\t\tif(!dataw._rightjoin) {\r\n\t\t\t\t\t\tscope[nextsource.alias] = dataw;\r\n\t\t\t\t\t\tdoJoin(query, scope, h+2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//dataw._rightjoin = undefined;\t\r\n\t\t\t\t\t\tdelete dataw._rightjoin;\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n//\t\t\t\tconsole.table(nextsource.data);\r\n//\t\t\t\tdebugger;\t\r\n\r\n\t\t\t};\r\n\t\t};\r\n\r\n\r\n\t\tscope[tableid] = undefined;\r\n\r\n/*\r\n\t\tif(h+1 < query.sources.length) {\r\n\t\t\tvar nextsource = query.sources[h+1];\r\n\r\n\t\t\tif(nextsource.joinmode == \"OUTER\" || nextsource.joinmode == \"RIGHT\" \r\n\t\t\t\t|| nextsource.joinmode == \"ANTI\") {\r\n\r\n\r\n\t\t\t\tconsole.log(h,query.sources.length);\r\n\t\t\t\t// Swap\r\n\r\n\r\n//\t\t\t\tswapSources(query,h);\r\n\r\n//\t\t\t\tconsole.log(query.sources);\r\n\t\t\t\t//debugger;\r\n//\t\t\t\tvar source = query.sources[h];\r\n\r\n//\t\t\t\tvar tableid = source.alias || source.tableid; \r\n//\t\t\t\tvar data = source.data;\r\n\r\n\t\t\t\t// Reduce data for looping if there is optimization hint\r\n//\t\t\t\tif(source.optimization == 'ix') {\r\n//\t\t\t\t\tdata = source.ix[ source.onleftfn(scope, query.params, alasql) ] || [];\r\n//\t\t\t\t}\r\n\r\n\t\t\t\t// Main cycle\r\n\t\t\t\tvar pass = false;\r\n//\t\t\t\tconsole.log(tableid, data.length);\r\n\t\t\t\tfor(var i=0, ilen=nextsource.data.length; i<ilen; i++) {\r\n\t\t\t\t\tscope[nextsource.tableid] = nextsource.data[i];\r\n\t\t\t\t\t// Reduce with ON and USING clause\r\n\t\t\t\t\tif(!source.onleftfn || (source.onleftfn(scope, query.params, alasql) == source.onrightfn(scope, query.params, alasql))) {\r\n\t\t\t\t\t\t// For all non-standard JOINs like a-b=0\r\n\t\t\t\t\t\tif(source.onmiddlefn(scope, query.params, alasql)) {\r\n\t\t\t\t\t\t\t// Recursively call new join\r\n//\t\t\t\t\t\t\tif(source.joinmode == \"OUTER\") {\r\n\t\t\t\t\t\t\t\tdoJoin(query, scope, h+2);\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// for LEFT JOIN\r\n\t\t\t\t\t\t\tpass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif(!pass) {\r\n\t\t\t\t\t// Clear the scope after the loop\r\n//\t\t\t\t\t\tscope[tableid] = {};\r\n\t\t\t\t\t\tconsole.log(scope);\r\n\t\t\t\t\t\tdoJoin(query,scope,h+2);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Additional join for LEFT JOINS\r\n\t\t\t\t\tscope[query.sources[h+1].tableid] = {};\r\n\t\t\t\t\tconsole.log(scope);\r\n\r\n\t\t\t\tscope[tableid] = undefined;\r\n\r\n\t\t\t\t// SWAP BACK\r\n\t\t\t\tswapSources(query,h);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n*/\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "60df7b63568cdd4a74d2501b410fc1f8", "score": "0.4458584", "text": "function joinNeighborsR(acc, x) {\n if ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)((0,_common__WEBPACK_IMPORTED_MODULE_2__.tail)(acc)) && (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(x))\n return acc.slice(0, -1).concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.tail)(acc) + x);\n return (0,_common__WEBPACK_IMPORTED_MODULE_2__.pushR)(acc, x);\n}", "title": "" }, { "docid": "e0b8935650855ee38c33d0ba6334493d", "score": "0.44482806", "text": "function join(chain_) {\n return chain(identity, chain_);\n }", "title": "" }, { "docid": "e0b8935650855ee38c33d0ba6334493d", "score": "0.44482806", "text": "function join(chain_) {\n return chain(identity, chain_);\n }", "title": "" }, { "docid": "e0b8935650855ee38c33d0ba6334493d", "score": "0.44482806", "text": "function join(chain_) {\n return chain(identity, chain_);\n }", "title": "" }, { "docid": "3843af0f77dc0db4fcd91c9bd4bef664", "score": "0.44456536", "text": "join(row) {\n\t\t\n\t\tlet keys = this.keys\n\n\t\tconst foreignTable = DataBase.table(this.tables['foreign'], this.settings)\n\n\t\tif (this.relationType == 'hasAndBelongsToMany') {\n\t\t\t\n\t\t\tconst table_name = this.getJunction()\n\n\t\t\tconst DB = DataBase.table(table_name, this.settings)\n\n\t\t\tDB.groupBy(this.tables['local']+'_id')\n\t\t\tDB.where(this.tables['local']+'_id', '=', row[keys['local']])\n\t\t\tDB.findAll()\n\t\t\tDB.asArray(null, this.tables['foreign']+'_id')\n\n\t\t\tif (!this.join) return {}\n\n\t\t\treturn foreignTable.where(keys['foreign'], 'IN', this.join[row[keys['local']]])\n\t\t}\n\n\t\treturn foreignTable.where(keys['foreign'], '=', row[keys['local']])\n\t}", "title": "" }, { "docid": "46e4c9dc581b9842d291151d184bebed", "score": "0.44431767", "text": "function createExpression( vp, units ) {\n\n var mqls = []\n , expTmpl = '({prefix}{dimension}:{num}' + units + ')'\n ;\n\n var prefix = [\n 'min-',\n 'max-'\n ];\n\n var mqls = Object.keys( vp ).reduce( function ( acc, dimension ) {\n\n var expressions = [];\n\n vp[ dimension ].forEach( function ( num, index ) {\n expressions.push(\n expTmpl.replace( '{prefix}', prefix[ index ] )\n .replace( '{dimension}', dimension )\n .replace( '{num}', num )\n );\n });\n\n acc.push( expressions.join( ' and ' ) );\n\n return acc;\n\n }, [] );\n\n return mqls.join( ' and ' );\n }", "title": "" }, { "docid": "97c4b9061f3b4a727842d2f5cb5d853c", "score": "0.44372433", "text": "function getJoinFunc(sep) {\n return function () {\n return array_join(arguments, sep);\n };\n }", "title": "" }, { "docid": "d3dcb03ab9325c8f4fbfee4a1cf18e5b", "score": "0.443464", "text": "function s(w1, w2) {\n return w1.concat(w2);\n}", "title": "" }, { "docid": "2175d513f2f86475dbe9709a210791db", "score": "0.44212812", "text": "function generateParameterInsertQuery(fields, values){\n\t\n\t//make the fields lower case \n\tfields = fields.map(v => v.toLowerCase());\n\t\n\t//Validate tech\n\tlet tech = null;\n\tif(fields.indexOf(\"technology\") === -1) throw Error(\"Technology field is missing\");\n\ttech = values[fields.indexOf(\"technology\")];\n\tif(tech.length === 0) throw Error(\"Technology value cannot be empty\");\n\n\t//Validate ci\n\tlet ci = null;\n\tif(fields.indexOf(\"ci\") === -1) throw new Error(\"ci field is missing\");\n\tci = values[fields.indexOf(\"ci\")];\n\tif(ci.length === 0) throw Error(\"ci value cannot be empty\");\n\t\n\t\n\t//Get database table for insertion\n\tlet tableName = getDataCellTable(tech.toLowerCase());\n\t\n\t//Get list of std parameters for technology\n\tconst paramNames = Object.keys(bcf.getTechParameterList(tech.toLowerCase()));\n\t\n\tlet paramValues = paramNames.map(v => '');\n\tlet insFields = [];\t\t\t\t\t\t \n\tlet insValues = [];\n\tlet updatePhrase = [];\n\t\n\tparamNames.forEach((p, i) => {\n\t\n\t\t//Skip parameter that are not there\n\t\tif(fields.indexOf(p) === -1 ) return;\n\n\t\tparamValues[i] = values[fields.indexOf(p)] === undefined ? \"\" : values[fields.indexOf(p)];\n\t\tupdatePhrase.push(`${p} = EXCLUDED.${p}`);\n\t});\n\t\n\tlet sql = `INSERT INTO plan_network.\"${tableName}\"\n\t\t(${paramNames.filter((v, i) => paramValues[i].length > 0).join(\",\")})\n\tVALUES\n\t\t('${paramValues.filter((v, i) => paramValues[i].length > 0).join(\"','\")}')\n\t ON CONFLICT ON CONSTRAINT unq_ci_node_${tableName} DO UPDATE\n\t SET \n\t\t${updatePhrase.join(\",\")}\n\t`;\n\n\treturn sql;\n\n}", "title": "" }, { "docid": "069deeb37e8261ea48badbd26fae3f09", "score": "0.4412652", "text": "_joinType(val) {\n if (arguments.length === 1) {\n this._joinFlag = val;\n return this;\n }\n const ret = this._joinFlag || 'inner';\n this._joinFlag = 'inner';\n return ret;\n }", "title": "" }, { "docid": "90b8b11c9c364a76cde85594cff6d336", "score": "0.4405184", "text": "function join (strings, separator) {\n \n let result = ''\n\n for (let i = 0; i < strings.length; i++) {\n \n result += ((i === 0) ? '' : separator) + strings[i]\n }\n\n log.yellow (result)\n return result \n}", "title": "" }, { "docid": "f1bf446469595c34be61389fe37438fc", "score": "0.43945506", "text": "function join()\r\n{ \r\n \r\n var a=document.getElementById(\"l1\").value;\r\n var n=document.getElementById(\"l2\").value;\r\n var b=a.split(\" \");\r\n var c=b.join(n);\r\n document.getElementById(\"para17\").innerHTML=\"The Result :\"+c;\r\n \r\n}", "title": "" }, { "docid": "b5d795d26a2b65ec83b4de3e04193af3", "score": "0.43860877", "text": "function joinNeighborsR(acc, x) {\n if (predicates_1.isString(common_1.tail(acc)) && predicates_1.isString(x))\n return acc.slice(0, -1).concat(common_1.tail(acc) + x);\n return common_1.pushR(acc, x);\n}", "title": "" }, { "docid": "b5d795d26a2b65ec83b4de3e04193af3", "score": "0.43860877", "text": "function joinNeighborsR(acc, x) {\n if (predicates_1.isString(common_1.tail(acc)) && predicates_1.isString(x))\n return acc.slice(0, -1).concat(common_1.tail(acc) + x);\n return common_1.pushR(acc, x);\n}", "title": "" }, { "docid": "2ebaf79fa8add1ac5fe6231e26be582e", "score": "0.43706322", "text": "function joinNeighborsR(acc, x) {\n if (predicates_1.isString(common_1.tail(acc)) && predicates_1.isString(x)) return acc.slice(0, -1).concat(common_1.tail(acc) + x);\n return common_1.pushR(acc, x);\n}", "title": "" }, { "docid": "906f943b594b42af20ae3c67732b3902", "score": "0.43705365", "text": "function join(stringOne, stringTwo) {\n // YOUR CODE BELOW HERE //\n /* in this exercise, the function join receives any number of arguments \n * and combines them into an array titled args, then joins the elements \n * of the array into a single string with no spaces */\n var args = Array.from(arguments);\n return args.join('');\n\n // YOUR CODE ABOVE HERE //\n}", "title": "" }, { "docid": "ba95cd90bd648ffd497dfb5b075d1bf3", "score": "0.43669704", "text": "function between(first, second) {\n return (source) => first.mapTo(source.endWhen(second)).flatten()\n}", "title": "" }, { "docid": "53119798e7c22e15273b3e4736333529", "score": "0.4356076", "text": "function join() {\n return function(list, separator) {\n if(list === undefined || !Array.isArray(list))\n return list;\n\n list = list.filter(function(n){ return n !== undefined; });\n return list.join(separator || ',');\n };\n }", "title": "" }, { "docid": "d48f580006f649313841e762debaba42", "score": "0.43532336", "text": "async function fetchAllJoinWhere(table1, table2, on, where) {\n let sql = `\n SELECT * FROM ${table1}\n LEFT JOIN ${table2}\n \tON ${on}\n WHERE ${where};\n `;\n\n let res = await db.query(sql);\n\n return res;\n}", "title": "" }, { "docid": "9bc5c225bc3a80799d5c4311a189fc29", "score": "0.4341244", "text": "function joinMany(...args) {\n return args.join('-')\n}", "title": "" }, { "docid": "10994771f7b30bf33fad033d1e88d992", "score": "0.4331184", "text": "function generateParameterInsertQuery(fields, values){\n\t\n\t//make the fields lower case \n\tfields = fields.map(v => v.toLowerCase());\n\t\n\t//Validate tech\n\tlet tech = null;\n\tif(fields.indexOf(\"technology\") === -1) throw Error(\"Technology field is missing\");\n\ttech = values[fields.indexOf(\"technology\")];\n\tif(tech.length === 0) throw Error(\"Technology value cannot be empty\");\n\n\t//Validate ci\n\tlet ci = null;\n\tif(fields.indexOf(\"ci\") === -1) throw Error(\"ci field is missing\");\n\tci = values[fields.indexOf(\"ci\")];\n\tif(ci.length === 0) throw Error(\"ci value cannot be empty\");\n\t\n\t\n\t//Get database table for insertion\n\tlet tableName = getDataCellTable(tech.toLowerCase());\n\t\n\t//Get list of std parameters for technology\n\tconst paramNames = Object.keys(getTechParameterList(tech.toLowerCase()));\n\t\n\tlet paramValues = paramNames.map(v => '');\n\tlet insFields = [];\t\t\t\t\t\t \n\tlet insValues = [];\n\tlet updatePhrase = [];\n\t\n\tparamNames.forEach((p, i) => {\n\t\t//Skip parameter that are not there\n\t\tif(fields.indexOf(p) === -1 ) return;\n\t\tparamValues[i] = values[fields.indexOf(p)];\n\t\tupdatePhrase.push(`${p} = EXCLUDED.${p}`);\n\t});\n\t\n\tlet sql = `INSERT INTO plan_network.\"${tableName}\"\n\t\t(${paramNames.join(\",\")})\n\tVALUES\n\t\t('${paramValues.join(\"','\")}')\n\t ON CONFLICT ON CONSTRAINT unq_ci_node_${tableName} DO UPDATE\n\t SET \n\t\t${updatePhrase.join(\",\")}\n\t`;\n\t\n\treturn sql;\n\n}", "title": "" }, { "docid": "ab426dcc5dd7a8490d8de0208d74c3c0", "score": "0.43230626", "text": "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both sides have resolved.\n if (lhs === EMPTY || rhs === EMPTY) {\n return;\n }\n // If either side resolve with an error, we should continue with\n // the first error.\n if (util.isLeft(lhs)) {\n if (util.isLeft(rhs)) {\n if (fail === lhs) {\n fail = rhs;\n }\n } else {\n fail = lhs;\n }\n step = null;\n head._3 = fail;\n } else if (util.isLeft(rhs)) {\n step = null;\n fail = rhs;\n head._3 = fail;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "title": "" }, { "docid": "c11a51aabe2f287d2c77af33dce9d7ad", "score": "0.43168285", "text": "generateWhereCauseFromFilter(filter, fieldMap) {\n const wheres = [];\n let params = null;\n if (filter.ids) {\n params = [];\n wheres.push(\n `id in ( ${filter.ids\n .map((id) => {\n params.push(id);\n return '?';\n })\n .join(' , ')} )`\n );\n } else {\n params = {};\n Object.keys(filter)\n .filter((key) => key !== 'q')\n .forEach((key) => {\n if (key.indexOf('_lte') !== -1) {\n const realKey = fieldMap[key.replace(/(_lte)$/, '')];\n const valueKey = `$${key}`;\n wheres.push(`${realKey} <= ${valueKey}`);\n params[valueKey] = filter[key];\n return;\n }\n if (key.indexOf('_gte') !== -1) {\n const realKey = fieldMap[key.replace(/(_gte)$/, '')];\n const valueKey = `$${key}`;\n wheres.push(`${realKey} >= ${valueKey}`);\n params[valueKey] = filter[key];\n return;\n }\n if (key.indexOf('_lt') !== -1) {\n const realKey = fieldMap[key.replace(/(_lt)$/, '')];\n const valueKey = `$${key}`;\n wheres.push(`${realKey} < ${valueKey}`);\n params[valueKey] = filter[key];\n return;\n }\n if (key.indexOf('_gt') !== -1) {\n const realKey = fieldMap[key.replace(/(_gt)$/, '')];\n const valueKey = `$${key}`;\n wheres.push(`${realKey} > ${valueKey}`);\n params[valueKey] = filter[key];\n return;\n }\n const valueKey = `$${key}`;\n wheres.push(`${fieldMap[key]} = ${valueKey}`);\n params[valueKey] = filter[key];\n });\n\n if (filter.q) {\n const likes = [];\n const valueKey = `$q`;\n Object.keys(fieldMap).forEach((fieldName) => {\n likes.push(`${fieldMap[fieldName]} like ${valueKey}`);\n });\n if (likes.length) {\n wheres.push(`( ${likes.join(' or ')} )`);\n }\n params[valueKey] = `%${filter.q}%`;\n }\n }\n return [wheres.join(' and '), params];\n }", "title": "" }, { "docid": "6637b1dbedd189aec72301350ba5270a", "score": "0.4313849", "text": "function concat(...params) {\n return output(params).apply(array => array.join(\"\"));\n}", "title": "" }, { "docid": "88566896648a95c6dbae57ac4ea632c9", "score": "0.43127272", "text": "function queryConsumption(data, field, value, compType) {\n // can be queried in place\n var statics = ['count', 'date', 'experience_id', 'location', 'owner'];\n // can be queried as children\n var subfields = ['method', 'drug'];\n var matchingIDs = [];\n\n data.forEach(function(dataField, index) {\n // dynamic comparator call\n dataField.consumptions.forEach(function(consumption) {\n\n if (statics.indexOf(field) > -1) {\n // easy lookup\n if (window['compute_' + compType](consumption[field], value)) {\n if (matchingIDs.indexOf(index) < 0) {\n // no duplicates\n matchingIDs.push(index);\n }\n }\n } else {\n //special lookup\n var seekComponents = field.split('.');\n if (subfields.indexOf(seekComponents[0]) > -1) {\n // drug or method\n if (window['compute_' + compType](consumption[seekComponents[0]][seekComponents[1]], value)) {\n if (matchingIDs.indexOf(index) < 0) {\n // no duplicates\n matchingIDs.push(index);\n }\n }\n } else if (seekComponents[0] === 'friends') {\n consumption.friends.forEach(function(friend) {\n if (window['compute_' + compType](friend[seekComponents[1]], value)) {\n if (matchingIDs.indexOf(index) < 0) {\n // no duplicates\n matchingIDs.push(index);\n }\n }\n });\n } else {\n console.log(\"no such field.\");\n }\n }\n });\n });\n\n return fullData.filter(function(data, index) {\n // filter to only those contained in the matching array\n return matchingIDs.indexOf(index) > -1;\n });\n}", "title": "" }, { "docid": "6eb6a26a74ab5e69e87537e63625621e", "score": "0.43105495", "text": "function c(e){return e.join(o).replace(g,b).replace(d,m)}", "title": "" }, { "docid": "41c1959010fa2ec28e3e5221e887b719", "score": "0.43074292", "text": "function mvZip(values1, values2, delim) {\n if (values1 == null || values2 == null) {\n return null;\n }\n if (delim == null) {\n delim = ',';\n }\n values1 = _.isArray(values1) ? values1 : [values1];\n values2 = _.isArray(values2) ? values2 : [values2];\n return _(_.zip(values1, values2)).map(function(pair) {\n return pair.join(delim);\n });\n }", "title": "" }, { "docid": "a98662770f7a6f27c3a7a5bd479ef4d3", "score": "0.43006974", "text": "function formatCLEQuery(start, end) {\n var ids = $.map(refs.mapSerialTraces, function(tracker, serial) {\n return $.map(tracker.traces, function(trace, id) {\n if (start < trace.timestamp && end > trace.timestamp) {\n return ['[not]/customerLocationId/', id].join('');\n }\n });\n });\n return ids.join('/[AND]/');\n}", "title": "" }, { "docid": "e4711b66fa8ef86dcdee7613379d2012", "score": "0.43002474", "text": "function mergeTbl() {\n // {except_ALL: contains_ALL}\n var t2 = other._first || { [exports.ALL]: other };\n //before tbl={ALL:a1, b:b1, c:c1} t2={ALL:a2,c:c2,d:d2}\n // b1 conts a1 c1 conts a1 c2 conts a2 d2 conts a2\n //after tbl={ALL:a1|a2 , b:b1|a2 c:c1|c2 d:a1|d2 }\n var keys = {};\n for (let k in tbl) { /*if (d) console.log(\"tbl.k=\"+k);*/\n keys[k] = 1;\n }\n for (let k in t2) { /*if (d) console.log(\"t2.k=\"+k);*/\n keys[k] = 1;\n }\n //delete keys[ALL];\n if (tbl[exports.ALL] || t2[exports.ALL]) {\n tbl[exports.ALL] = or(tbl[exports.ALL], t2[exports.ALL]);\n }\n for (let k in keys) {\n //if (d) console.log(\"k=\"+k);\n //if (tbl[k] && !tbl[k].parse) throw \"tbl[\"+k+\"] = \"+tbl[k];\n //if (t2[k] && !t2[k].parse) throw \"t2[\"+k+\"] = \"+tbl[k];\n if (tbl[k] && t2[k]) {\n tbl[k] = or(tbl[k], t2[k]);\n }\n else if (tbl[k] && !t2[k]) {\n tbl[k] = or(tbl[k], t2[exports.ALL]);\n }\n else if (!tbl[k] && t2[k]) {\n tbl[k] = or(tbl[exports.ALL], t2[k]);\n }\n }\n }", "title": "" }, { "docid": "e8a12028f66c63a8ec37c0cf215851c7", "score": "0.42963907", "text": "function join_entities(entityarray){\n var entities = [], entityLabel=[];\n var len = entityarray.length;\n var result = {'trunc': '', 'full': ''}, overflow_idx = -1, overflow_limit = 15;\n var link_prefix = '<a href=\"', link_mid='\" target=\"_blank\">', link_suffix='</a>';\n for (var i=0; i<len; i++){\n var item = '', itemlabel = '';\n item = entityarray[i].split('/');\n itemlabel = item[item.length - 1].split('_').join(' ');\n entityLabel.push(itemlabel);\n \n // insert href for entities\n if (entityarray[i].indexOf('dbpedia') != -1){\n item = link_prefix + entityarray[i] + link_mid;\n }\n else if (entityarray[i].indexOf('wikidata') != -1) {\n item = link_prefix + item.slice(0, item.length - 1).join('/') + link_mid;\n }\n // literals have no href\n else {\n item = '';\n }\n // console.log(item);\n entities.push(item);\n \n if (overflow_idx < 0 && overflow_limit > 0){\n overflow_limit -= itemlabel.length;\n if (overflow_limit <= 0){\n overflow_idx = i;\n }\n }\n }\n // reset overflow limit\n overflow_limit = 15;\n if (overflow_idx >= 0){\n for (var i=0; i<= overflow_idx; i++){\n var end_idx = entityLabel[i].length;\n if (end_idx >= overflow_limit){\n end_idx = overflow_limit;\n }\n if (entities[i].length > 0){\n result['trunc'] += entities[i] + entityLabel[i].slice(0, end_idx+1) + link_suffix;\n }\n else {\n result['trunc'] += entityLabel[i].slice(0, end_idx+1);\n }\n overflow_limit -= end_idx;\n if (i < entities.length - 1){\n result['trunc'] += '; '\n }\n }\n // result = entities.slice(0,overflow_idx+1).join('; ')\n // result = result.slice(0,overflow_limit+1);\n result['trunc'] = result['trunc'] + ' ... (' + (entities.length).toString() + ' in total)';\n }\n // else {\n for (var i=0; i<=entities.length-1; i++){\n if (entities[i].length > 0){\n result['full'] += entities[i] + entityLabel[i] + link_suffix;\n }\n else {\n result['full'] += entityLabel[i];\n }\n if (i < entities.length - 1){\n result['full'] += '; '\n }\n } \n // }\n if (result['trunc'].length == 0) {\n result['trunc'] = result['full'];\n }\n // For empty results\n if (result['full'].length == 0) {\n result['full'] = '-';\n result['trunc'] = '-';\n }\n \n // console.log(entityarray.length);\n // console.log(result);\n return(result);\n}", "title": "" }, { "docid": "d248fe6cf401a31d03850eefcb805fa9", "score": "0.42936218", "text": "function combine(firstName,lastName){\n return firstName+' '+lastName;\n}", "title": "" }, { "docid": "3a916ad9ab0d48f10add577be0e68cf6", "score": "0.42765713", "text": "async merged(f1,f2){\n\nvar list=[];\n\nvar matched;\nfor(var e of f1){\n\t\n\n\nmatched=false;\n \t\t\n// loop over data2;\n \t\tfor(var i of f2){\n\n \t\t\t//console.log(i.CountryCode)\n\n \t\t\t// check if the props' value are same\n \t\t\t// in this case 'Enitity name' and 'countryName';\n\n \t\t\t//if same value then put the props form data2 to data1;\n\n\n\n \t\tif(e.Entity===i.CountryName){\n\n \t\t\tconsole.log(e.Entity)\n \t\t\n\n \t\t// if same country then we add longitiude and latitude and..\n \t\te.capital=i.CapitalName;\n\n \t\t// we make country's longitude to CapitalLongitude and ...\n \t\te.longitude=Number(i.CapitalLongitude);\n \t\te.latitude=Number(i.CapitalLatitude);\n\n\n //push color for population bubbles\n\n e.color='#' + (Math.random().toString(16) + \"000000\").substring(2,8);\n\n \t\t\n\n \t\tmatched=true;\n\n \t\tbreak;\n \t\t\n \t\t}\n\n \t\t\n\n \t\t\t\n\n\n \t\t}\n\n \t\t\n// if the same country then push to make data formation same;\n// if mathced=false then the data props doesnot seems to matched; \n// which means at some point the data is broken so we disgard that data.\n \t\tif(matched){\n \t\t\tlist.push(e);\n \t\t}\n\n \n\n\n}\n\n\nreturn list;\n\n\n \t\n\n\t}", "title": "" }, { "docid": "6297838649773d6372f19b482c5ac82d", "score": "0.42694253", "text": "function tag(strings, ...values) {\n console.log(strings); //strings is an array of strings used inside the template literals\n console.log(values); // these are the items of whatever you have declared inside ${ };\n\n if(values[0] < 20) {\n values[1] = \"awake\";\n } else {\n values[1] = \"sleepy\";\n }\n\n return `${strings[0]}${values[0]}${strings[1]}${values[1]}`;\n}", "title": "" }, { "docid": "41f1196d847dc10864cef5aafc4e9b1b", "score": "0.42670894", "text": "function joinResult(res1, res2) {\n var found_g = false, found_m = false;\n var res = deepCopy(res1);\n for (var i in res2['generic']) {\n for (var j in res1['generic']) {\n if (res1['generic'][j].toJSONObject() === res2['generic'][i].toJSONObject() ) {\n found_g = true;\n break;\n }\n }\n if (found_g == false) {\n res['generic'].push(res2['generic'][i]);\n }\n found_g = false;\n }\n\n for (var m in res2['matched']) {\n for (var n in res1['matched']) {\n if (res1['matched'][n].toJSONObject() === res2['matched'][m].toJSONObject() ) {\n found_m = true;\n break;\n }\n }\n if (found_m == false) {\n res['matched'].push(res2['matched'][m]);\n }\n found_m = false;\n }\n\n return res;\n }", "title": "" }, { "docid": "41f1196d847dc10864cef5aafc4e9b1b", "score": "0.42670894", "text": "function joinResult(res1, res2) {\n var found_g = false, found_m = false;\n var res = deepCopy(res1);\n for (var i in res2['generic']) {\n for (var j in res1['generic']) {\n if (res1['generic'][j].toJSONObject() === res2['generic'][i].toJSONObject() ) {\n found_g = true;\n break;\n }\n }\n if (found_g == false) {\n res['generic'].push(res2['generic'][i]);\n }\n found_g = false;\n }\n\n for (var m in res2['matched']) {\n for (var n in res1['matched']) {\n if (res1['matched'][n].toJSONObject() === res2['matched'][m].toJSONObject() ) {\n found_m = true;\n break;\n }\n }\n if (found_m == false) {\n res['matched'].push(res2['matched'][m]);\n }\n found_m = false;\n }\n\n return res;\n }", "title": "" }, { "docid": "41f1196d847dc10864cef5aafc4e9b1b", "score": "0.42670894", "text": "function joinResult(res1, res2) {\n var found_g = false, found_m = false;\n var res = deepCopy(res1);\n for (var i in res2['generic']) {\n for (var j in res1['generic']) {\n if (res1['generic'][j].toJSONObject() === res2['generic'][i].toJSONObject() ) {\n found_g = true;\n break;\n }\n }\n if (found_g == false) {\n res['generic'].push(res2['generic'][i]);\n }\n found_g = false;\n }\n\n for (var m in res2['matched']) {\n for (var n in res1['matched']) {\n if (res1['matched'][n].toJSONObject() === res2['matched'][m].toJSONObject() ) {\n found_m = true;\n break;\n }\n }\n if (found_m == false) {\n res['matched'].push(res2['matched'][m]);\n }\n found_m = false;\n }\n\n return res;\n }", "title": "" } ]
aed6662acf338497c8b5938fb7566742
named arguments: at the callsite, labeling an input value to indicate which parameter it maps to. just like we can destructure arrays, we can destructure objects
[ { "docid": "09bee7810fb92f8012891e508079e122", "score": "0.55906296", "text": "function foo ( {x, y} = {} ) { // default parameter {} is optional\r\n console.log(x, y);\r\n }", "title": "" } ]
[ { "docid": "5e50bc7c8e62eba234191f93f9032263", "score": "0.5840945", "text": "function gather_w_def(def = \"no args passed\", ...rest){ \n console.log(\"first value passed: \", def );\n console.log(\"remaining values: \", rest);\n}", "title": "" }, { "docid": "b8b902c56a2a3fe3801d9de6a528a819", "score": "0.57995933", "text": "function foo({ x, y }) {\n return { x, y };\n }", "title": "" }, { "docid": "7e0a1a8bc7358f80a6782b0a86d10255", "score": "0.57986456", "text": "function f1([x, y] = [1, 2], {z: z} = {z: 3}) {\n return x + y + z;\n}", "title": "" }, { "docid": "fb75887eb509aa93c1f7894beac5ce7f", "score": "0.5781326", "text": "function name({name, address}){\n // object input {name, address}\n console.log('name: '+name+' '+ 'address: '+address);//++++++++++++++++++++++++++++++++++++++\n}", "title": "" }, { "docid": "ce136a0f994bf4d2ce04b0ca2963143a", "score": "0.57750994", "text": "function dogStuff({name: {firstName}, breed}) {\n console.log(`My dog's name is ${firstName}, and he is an ${breed}`);\n}", "title": "" }, { "docid": "766bf931ec1ada42a0d5dcef243019e6", "score": "0.5695739", "text": "function data(temp = {}) {\n let { a, b } = temp;\n // .....\n}", "title": "" }, { "docid": "1cfa83f5bc3946364a1ab7e05202f429", "score": "0.5603496", "text": "function f ([ name, val ]) {\n console.log(name, val)\n}", "title": "" }, { "docid": "3fe504723edfeac9c4bff172772075ad", "score": "0.5595379", "text": "function somename({ name } = {}, [firstel] = []) {\n console.log(name, firstel)\n}", "title": "" }, { "docid": "7ae8cd0d455784fa70ee828ed0597c7f", "score": "0.55370533", "text": "function assignArg(a) {\n println(\"val = fields['%s'];\", a.name);\n}", "title": "" }, { "docid": "322c9cfd8d6d9c0d781cdc89676a5dc5", "score": "0.55263895", "text": "function f({a: x= 1} = {a: 'y'}) {\n return x;\n }", "title": "" }, { "docid": "322c9cfd8d6d9c0d781cdc89676a5dc5", "score": "0.55263895", "text": "function f({a: x= 1} = {a: 'y'}) {\n return x;\n }", "title": "" }, { "docid": "b6d7bb464dd91a2d34aa71cb7f2e64bd", "score": "0.5512376", "text": "function parseParameter$1(def, spec, scope) {\n var type = def.type,\n value = spec[def.name];\n\n if (type === 'index') {\n return parseIndexParameter(def, spec, scope);\n } else if (value === undefined) {\n if (def.required) {\n vegaUtil.error('Missing required ' + vegaUtil.stringValue(spec.type)\n + ' parameter: ' + vegaUtil.stringValue(def.name));\n }\n return;\n } else if (type === 'param') {\n return parseSubParameters(def, spec, scope);\n } else if (type === 'projection') {\n return scope.projectionRef(spec[def.name]);\n }\n\n return def.array && !isSignal(value)\n ? value.map(function(v) { return parameterValue(def, v, scope); })\n : parameterValue(def, value, scope);\n }", "title": "" }, { "docid": "3d2e211bea5e0c54c8e7cc486e713f02", "score": "0.5443958", "text": "function f({x= 1} = {x: 'y'}) {\n return x;\n }", "title": "" }, { "docid": "114806dd41c77b85a6a46e2fb28f7f4b", "score": "0.5428438", "text": "function personInfo({ name: x, job: y, hobby: z = \"Cricket\" } = {}) {\n console.log(x);\n console.log(y);\n console.log(z);\n}", "title": "" }, { "docid": "c92146c70b3c43969cb159fc4a04a1f4", "score": "0.54185253", "text": "function userInfo({name='tom', age=20, sex=\"boy\"}= {}){\n console.log(name, age, sex);\n}", "title": "" }, { "docid": "ecfa22cad3df51c7403296bce80ad582", "score": "0.53918636", "text": "function f6({ x = 10 } = {}, { y } = { y: 10 }) {\n\tconsole.log( x, y );\n}", "title": "" }, { "docid": "b7312dd4f679d59195555f98402ded91", "score": "0.53781086", "text": "function parseParameter$1(def, spec, scope) {\n var type = def.type,\n value$$1 = spec[def.name];\n\n if (type === 'index') {\n return parseIndexParameter(def, spec, scope);\n } else if (value$$1 === undefined) {\n if (def.required) {\n error$1('Missing required ' + $(spec.type)\n + ' parameter: ' + $(def.name));\n }\n return;\n } else if (type === 'param') {\n return parseSubParameters(def, spec, scope);\n } else if (type === 'projection') {\n return scope.projectionRef(spec[def.name]);\n }\n\n return def.array && !isSignal(value$$1)\n ? value$$1.map(function(v) { return parameterValue(def, v, scope); })\n : parameterValue(def, value$$1, scope);\n}", "title": "" }, { "docid": "cfd4733ddad710d78e1d993bc1295b3a", "score": "0.53567743", "text": "function parameter(incoming){\n console.log(incoming);\n}", "title": "" }, { "docid": "56f87f18c8ef5a8f67f0ddcf8fe3bb96", "score": "0.5344119", "text": "function formatArguments (userArgs, defaultArgs) {\n return defaultArgs.map((input, index) => {\n var typedArg = {}\n\n // if there is a user input at a certain index, create a uniform for this variable so that the value is passed in on each render pass\n // to do (possibly): check whether this is a function in order to only use uniforms when needed\n\n counter.increment()\n typedArg.name = input.name + counter.get()\n typedArg.isUniform = true\n\n if (userArgs.length > index) {\n // console.log(\"arg\", userArgs[index])\n typedArg.value = userArgs[index]\n // if argument passed in contains transform property, i.e. is of type generator, do not add uniform\n if (userArgs[index].transform) typedArg.isUniform = false\n\n if (typeof userArgs[index] === 'function') {\n typedArg.value = (context, props, batchId) => {\n try {\n return userArgs[index](props)\n } catch (e) {\n console.log('ERROR', e)\n return input.default\n }\n }\n } else if (userArgs[index].constructor === Array) {\n // console.log(\"is Array\")\n typedArg.value = (context, props, batchId) => seq(userArgs[index])(props)\n }\n } else {\n // use default value for argument\n typedArg.value = input.default\n }\n // if input is a texture, set unique name for uniform\n if (input.type === 'texture') {\n // typedArg.tex = typedArg.value\n var x = typedArg.value\n typedArg.value = () => (x.getTexture())\n } else {\n // if passing in a texture reference, when function asks for vec4, convert to vec4\n if (typedArg.value.getTexture && input.type === 'vec4') {\n var x1 = typedArg.value\n typedArg.value = src(x1)\n typedArg.isUniform = false\n }\n }\n typedArg.type = input.type\n return typedArg\n })\n}", "title": "" }, { "docid": "56f87f18c8ef5a8f67f0ddcf8fe3bb96", "score": "0.5344119", "text": "function formatArguments (userArgs, defaultArgs) {\n return defaultArgs.map((input, index) => {\n var typedArg = {}\n\n // if there is a user input at a certain index, create a uniform for this variable so that the value is passed in on each render pass\n // to do (possibly): check whether this is a function in order to only use uniforms when needed\n\n counter.increment()\n typedArg.name = input.name + counter.get()\n typedArg.isUniform = true\n\n if (userArgs.length > index) {\n // console.log(\"arg\", userArgs[index])\n typedArg.value = userArgs[index]\n // if argument passed in contains transform property, i.e. is of type generator, do not add uniform\n if (userArgs[index].transform) typedArg.isUniform = false\n\n if (typeof userArgs[index] === 'function') {\n typedArg.value = (context, props, batchId) => {\n try {\n return userArgs[index](props)\n } catch (e) {\n console.log('ERROR', e)\n return input.default\n }\n }\n } else if (userArgs[index].constructor === Array) {\n // console.log(\"is Array\")\n typedArg.value = (context, props, batchId) => seq(userArgs[index])(props)\n }\n } else {\n // use default value for argument\n typedArg.value = input.default\n }\n // if input is a texture, set unique name for uniform\n if (input.type === 'texture') {\n // typedArg.tex = typedArg.value\n var x = typedArg.value\n typedArg.value = () => (x.getTexture())\n } else {\n // if passing in a texture reference, when function asks for vec4, convert to vec4\n if (typedArg.value.getTexture && input.type === 'vec4') {\n var x1 = typedArg.value\n typedArg.value = src(x1)\n typedArg.isUniform = false\n }\n }\n typedArg.type = input.type\n return typedArg\n })\n}", "title": "" }, { "docid": "54c1796377d9323726140ece129f4693", "score": "0.53413665", "text": "function crearJugador(nickname, { hp, sp, clase } = { hp: 100, sp: 50, clase: \"mago\" }) {\n console.log(nickname, hp, sp, clase);\n}", "title": "" }, { "docid": "c9ad10c5a490bea49f4dbaf6d7a51c16", "score": "0.53391165", "text": "function f1([x = 2, y = 3, z]) { ..}", "title": "" }, { "docid": "3ff70f47dd026e7bf0769bbd74c5c217", "score": "0.533775", "text": "function foo(a, [b = 1, c] = [], {c:d = 1, e:{f}}, ...[g,h = 1]) {}", "title": "" }, { "docid": "4a75b458677da053c1354f21a3d7e019", "score": "0.5333966", "text": "visitArgument(ctx) {\r\n console.log(\"visitArgument\");\r\n if (ctx.getChildCount() === 3) {\r\n return {\r\n type: \"Argument\",\r\n key: this.visit(ctx.test(0)),\r\n value: this.visit(ctx.test(1)),\r\n };\r\n } else {\r\n if (ctx.comp_for() !== null) {\r\n // TODO: Support test comp_for argument\r\n } else {\r\n return {\r\n type: \"Argument\",\r\n key: null,\r\n value: this.visit(ctx.test(0)),\r\n };\r\n }\r\n }\r\n return this.visitChildren(ctx);\r\n }", "title": "" }, { "docid": "0136ff42e33a79eabf964c7413bead97", "score": "0.5332135", "text": "function exercise04(param) {\n let [a, b, c, d, e] = param\n return b\n}", "title": "" }, { "docid": "514994c8156695c82f20f8c589fc2ddd", "score": "0.5320061", "text": "function f6({ x = 10 } = {}, { y } = { y: 10 }) {\n console.log(x, y);\n}", "title": "" }, { "docid": "9ad5f1a13b655cb752df1566d1cb3a2a", "score": "0.5315828", "text": "function destructure(thing, inputThing, scope){\n\tthing.identifiers.forEach(function(identifier, index){\n\t\t// Value will be...\n\t\t// the input thing's key that is same as the identifier\n\t\tif (inputThing.keys[identifier]) {\n\t\t\tvar value = inputThing.keys[identifier];\n\t\t}\n\t\t// or the input thing's value\n\t\telse if (inputThing.items[index]) {\n\t\t\tvar value = inputThing.items[index];\n\t\t}\n\t\t// the thing's key that is same as the identifier\n\t\telse if (thing.keys[identifier]) {\n\t\t\tvar value = thing.keys[identifier];\n\t\t}\n\t\t// or the thing's value\n\t\telse if (identifier === thing.identifier) {\n\t\t\tvar value = thing.items[0];\n\t\t}\n\t\t\n\t\t// Create new thing from value\n\t\tvar valueThing = new Thing(identifier, [value]);\n\t\t\n\t\t// Define identifier as the valueThing within scope\n\t\tscope(identifier, valueThing);\n\t})\n}", "title": "" }, { "docid": "8e6be3ab06cfa2379e289503ea3018aa", "score": "0.5303648", "text": "function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) {\n let parameterPath = parameter.parameterPath;\n const parameterMapper = parameter.mapper;\n let value;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n }\n else {\n let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound && fallbackObject) {\n propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath);\n }\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n }\n }\n else {\n if (parameterMapper.required) {\n value = {};\n }\n for (const propertyName in parameterPath) {\n const propertyMapper = parameterMapper.type.modelProperties[propertyName];\n const propertyPath = parameterPath[propertyName];\n const propertyValue = getOperationArgumentValueFromParameter(operationArguments, {\n parameterPath: propertyPath,\n mapper: propertyMapper\n }, fallbackObject);\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}", "title": "" }, { "docid": "5051f741fcc2527f16c6349d921b5fa5", "score": "0.5241002", "text": "function params(x){\n return (x)\n}", "title": "" }, { "docid": "7a80eb8c683d4e7012f8b6f8ecbfa090", "score": "0.5240237", "text": "function NamedArgument() {\n if (typeof arguments[0] === 'string') {\n this.nameArg = null;\n this.valueArg = null;\n this.text = arguments[0];\n this.prefix = arguments[1];\n this.suffix = arguments[2];\n }\n else if (arguments[1] == null) {\n this.nameArg = arguments[0];\n this.valueArg = null;\n this.text = '';\n this.prefix = this.nameArg.toString();\n this.suffix = '';\n }\n else {\n this.nameArg = arguments[0];\n this.valueArg = arguments[1];\n this.text = this.valueArg.text;\n this.prefix = this.nameArg.toString() + this.valueArg.prefix;\n this.suffix = this.valueArg.suffix;\n }\n}", "title": "" }, { "docid": "324ce1fb7585e5dd360e0bb9606632c7", "score": "0.52265745", "text": "function inputHandler(value, name) {\n let obj = {\n [name]: value,\n };\n return obj;\n}", "title": "" }, { "docid": "0e0aa3f22fd3e45e300fb8ee63266d87", "score": "0.5218726", "text": "function add({ x = 1, y = 2 } = {}) {\n\t\t\t//the process below run like this:\n\t\t\t//first get arugments ,but in this case ,the aruments is null ,so it gets nothing\n\t\t\t//then destructuring the default,({x = 1, y = 2} = {}),\n\t\t\t//it means let x = 1;let y = 2;\n\t\t\treturn x + y;\n\t\t}", "title": "" }, { "docid": "538ef7fa7453d3e2f44904f3224a886f", "score": "0.5212901", "text": "function sayHello(param1){\n console.log(param1.name);\n}", "title": "" }, { "docid": "0d15f89672f53a3bfcc7f8f8cc436ca2", "score": "0.51901186", "text": "function arg(name, optional){\r\n if (optional === undefined)\r\n optional = false;\r\n return { name: name, optional: optional };\r\n}", "title": "" }, { "docid": "c38f202b9725237875fa40623f0cd2ab", "score": "0.5171376", "text": "function visitParameter(node) {\n if (node.dotDotDotToken) {\n // rest parameters are elided\n return undefined;\n }\n else if (ts.isBindingPattern(node.name)) {\n // Binding patterns are converted into a generated name and are\n // evaluated inside the function body.\n return ts.setOriginalNode(ts.setTextRange(ts.createParameter(\n /*decorators*/ undefined, \n /*modifiers*/ undefined, \n /*dotDotDotToken*/ undefined, ts.getGeneratedNameForNode(node), \n /*questionToken*/ undefined, \n /*type*/ undefined, \n /*initializer*/ undefined), \n /*location*/ node), \n /*original*/ node);\n }\n else if (node.initializer) {\n // Initializers are elided\n return ts.setOriginalNode(ts.setTextRange(ts.createParameter(\n /*decorators*/ undefined, \n /*modifiers*/ undefined, \n /*dotDotDotToken*/ undefined, node.name, \n /*questionToken*/ undefined, \n /*type*/ undefined, \n /*initializer*/ undefined), \n /*location*/ node), \n /*original*/ node);\n }\n else {\n return node;\n }\n }", "title": "" }, { "docid": "435254d72b2e8d2daafed06aa7d8aa50", "score": "0.51445866", "text": "function parseArgument(lexer$$1) {\n var start = lexer$$1.token;\n return {\n kind: kinds.ARGUMENT,\n name: parseName(lexer$$1),\n value: (expect(lexer$$1, lexer.TokenKind.COLON), parseValueLiteral(lexer$$1, false)),\n loc: loc(lexer$$1, start)\n };\n}", "title": "" }, { "docid": "e3b8b931f679e76011993c9a3adb34c7", "score": "0.51315206", "text": "function collectParams(inps) {\n var args = {}\n\n for (var i = 0; i < inps.length; i++)\n if (inps[i].value)\n args[inps[i].name] = inps[i].value\n\n return args\n}", "title": "" }, { "docid": "123941be170e21c890af6f3defd9769f", "score": "0.5127489", "text": "function printName( {firstName} ){\n console.log(firstName.toUpperCase())\n}", "title": "" }, { "docid": "1cedfe681d63395cffe185ed743075cd", "score": "0.5109657", "text": "function optionalParameter(a, b) {\n console.log(a);\n}", "title": "" }, { "docid": "0342ab2b16131dc346111d3f87158008", "score": "0.5091804", "text": "function foo(x) {\n var [a,b] = x;\n print(a,b)\n}", "title": "" }, { "docid": "40871d019aa0c370010c30309f9af3cb", "score": "0.5086181", "text": "function wish({wish='Hello',name}) {\n console.log(`${wish},${name}`)\n}", "title": "" }, { "docid": "dcec95ac42b410358ebf9dd8e3d22772", "score": "0.5082016", "text": "visitParameters(ctx) {\r\n console.log(\"visitParameters\");\r\n if (ctx.typedargslist() !== null) {\r\n return this.visit(ctx.typedargslist());\r\n } else {\r\n return [];\r\n }\r\n }", "title": "" }, { "docid": "0ddf1dd59a15e70ae796a5456b626b46", "score": "0.5068832", "text": "getParamFromObject(object) {\n return this.parameter.reduce((prev, current) => {\n if (typeof prev === \"object\" && prev) {\n return prev[current];\n }\n return undefined;\n }, object);\n }", "title": "" }, { "docid": "ae44396f01fa93ccce3fcf2ed607bdd9", "score": "0.50685203", "text": "function personName(name) {\n console.log(name); //This is pulling name from the argument\n}", "title": "" }, { "docid": "094fdc5dfaea24b4726f11f774585900", "score": "0.5040792", "text": "function paramobj(id,name,value,order)\n{\n\tthis.id=id;\n\tthis.name=name;\n\tthis.value=value;\n\tthis.order=order;\n}", "title": "" }, { "docid": "257217de7a47f18e51571cbbc026d7a4", "score": "0.5018081", "text": "function imprimirParametros(a=0,b=100,c=\"nada\", ...x){\n console.log(c);\n}", "title": "" }, { "docid": "98a099b42cd4e0032b22c64865dc3928", "score": "0.50092965", "text": "function getArgumentValues(def, node, variableValues) {\n var coercedValues = {};\n var argDefs = def.args;\n var argNodes = node.arguments;\n if (!argDefs || !argNodes) {\n return coercedValues;\n }\n var argNodeMap = Object(__WEBPACK_IMPORTED_MODULE_3__jsutils_keyMap__[\"a\" /* default */])(argNodes, function (arg) {\n return arg.name.value;\n });\n for (var i = 0; i < argDefs.length; i++) {\n var argDef = argDefs[i];\n var name = argDef.name;\n var argType = argDef.type;\n var argumentNode = argNodeMap[name];\n var defaultValue = argDef.defaultValue;\n if (!argumentNode) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_isInvalid__[\"a\" /* default */])(defaultValue)) {\n coercedValues[name] = defaultValue;\n } else if (Object(__WEBPACK_IMPORTED_MODULE_9__type_definition__[\"I\" /* isNonNullType */])(argType)) {\n throw new __WEBPACK_IMPORTED_MODULE_0__error__[\"a\" /* GraphQLError */]('Argument \"' + name + '\" of required type ' + ('\"' + String(argType) + '\" was not provided.'), [node]);\n }\n } else if (argumentNode.value.kind === __WEBPACK_IMPORTED_MODULE_7__language_kinds__[\"VARIABLE\"]) {\n var variableName = argumentNode.value.name.value;\n if (variableValues && Object.prototype.hasOwnProperty.call(variableValues, variableName) && !Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_isInvalid__[\"a\" /* default */])(variableValues[variableName])) {\n // Note: this does not check that this variable value is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n coercedValues[name] = variableValues[variableName];\n } else if (!Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_isInvalid__[\"a\" /* default */])(defaultValue)) {\n coercedValues[name] = defaultValue;\n } else if (Object(__WEBPACK_IMPORTED_MODULE_9__type_definition__[\"I\" /* isNonNullType */])(argType)) {\n throw new __WEBPACK_IMPORTED_MODULE_0__error__[\"a\" /* GraphQLError */]('Argument \"' + name + '\" of required type \"' + String(argType) + '\" was ' + ('provided the variable \"$' + variableName + '\" which was not provided ') + 'a runtime value.', [argumentNode.value]);\n }\n } else {\n var valueNode = argumentNode.value;\n var coercedValue = Object(__WEBPACK_IMPORTED_MODULE_6__utilities_valueFromAST__[\"a\" /* valueFromAST */])(valueNode, argType, variableValues);\n if (Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_isInvalid__[\"a\" /* default */])(coercedValue)) {\n // Note: ValuesOfCorrectType validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new __WEBPACK_IMPORTED_MODULE_0__error__[\"a\" /* GraphQLError */]('Argument \"' + name + '\" has invalid value ' + Object(__WEBPACK_IMPORTED_MODULE_8__language_printer__[\"a\" /* print */])(valueNode) + '.', [argumentNode.value]);\n }\n coercedValues[name] = coercedValue;\n }\n }\n return coercedValues;\n}", "title": "" }, { "docid": "4e95a360488ffeda80928629fe5e1e5f", "score": "0.49926713", "text": "function ParamMap() {}", "title": "" }, { "docid": "d43fd1402850ce6b1b261f4e65c6597b", "score": "0.49875358", "text": "function printHeroe( { name, lastName, power, old = 0 } ) { \n console.log(name, lastName, power, old);\n}", "title": "" }, { "docid": "34346e10d8b8499ed9191a76aa7a2658", "score": "0.49866158", "text": "function param(name, value) {\n if (value == null) {\n return this[name];\n } else {\n this[name] = value;\n return this;\n }\n }", "title": "" }, { "docid": "34346e10d8b8499ed9191a76aa7a2658", "score": "0.49866158", "text": "function param(name, value) {\n if (value == null) {\n return this[name];\n } else {\n this[name] = value;\n return this;\n }\n }", "title": "" }, { "docid": "34346e10d8b8499ed9191a76aa7a2658", "score": "0.49866158", "text": "function param(name, value) {\n if (value == null) {\n return this[name];\n } else {\n this[name] = value;\n return this;\n }\n }", "title": "" }, { "docid": "34346e10d8b8499ed9191a76aa7a2658", "score": "0.49866158", "text": "function param(name, value) {\n if (value == null) {\n return this[name];\n } else {\n this[name] = value;\n return this;\n }\n }", "title": "" }, { "docid": "34346e10d8b8499ed9191a76aa7a2658", "score": "0.49866158", "text": "function param(name, value) {\n if (value == null) {\n return this[name];\n } else {\n this[name] = value;\n return this;\n }\n }", "title": "" }, { "docid": "244d0805d429c3ed00d217a90480ff5b", "score": "0.49851725", "text": "function setParamater(params, name, value) {\n if (!params.hasOwnProperty(name)) {\n params[name] = value;\n }\n}", "title": "" }, { "docid": "7fea4b130de4e5357c174614c615b194", "score": "0.4976366", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: __WEBPACK_IMPORTED_MODULE_3__kinds__[\"ARGUMENT\"],\n name: parseName(lexer),\n value: (expect(lexer, __WEBPACK_IMPORTED_MODULE_2__lexer__[\"a\" /* TokenKind */].COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "c105fae73ec2790f22e064f6287c9454", "score": "0.49759516", "text": "static initialize(obj, target_value, type) { \n obj['target_value'] = target_value || null;\n obj['type'] = type || 'AnyType';\n }", "title": "" }, { "docid": "f721c6a4de928368b147b2b83cd21174", "score": "0.49704927", "text": "function KnownArgumentNames(context) {\n return {\n Argument: function Argument(node, key, parent, path, ancestors) {\n var argDef = context.getArgument();\n if (!argDef) {\n var argumentOf = ancestors[ancestors.length - 1];\n if (argumentOf.kind === __WEBPACK_IMPORTED_MODULE_3__language_kinds__[\"FIELD\"]) {\n var fieldDef = context.getFieldDef();\n var parentType = context.getParentType();\n if (fieldDef && parentType) {\n context.reportError(new __WEBPACK_IMPORTED_MODULE_0__error__[\"a\" /* GraphQLError */](unknownArgMessage(node.name.value, fieldDef.name, parentType.name, Object(__WEBPACK_IMPORTED_MODULE_1__jsutils_suggestionList__[\"a\" /* default */])(node.name.value, fieldDef.args.map(function (arg) {\n return arg.name;\n }))), [node]));\n }\n } else if (argumentOf.kind === __WEBPACK_IMPORTED_MODULE_3__language_kinds__[\"DIRECTIVE\"]) {\n var directive = context.getDirective();\n if (directive) {\n context.reportError(new __WEBPACK_IMPORTED_MODULE_0__error__[\"a\" /* GraphQLError */](unknownDirectiveArgMessage(node.name.value, directive.name, Object(__WEBPACK_IMPORTED_MODULE_1__jsutils_suggestionList__[\"a\" /* default */])(node.name.value, directive.args.map(function (arg) {\n return arg.name;\n }))), [node]));\n }\n }\n }\n }\n };\n}", "title": "" }, { "docid": "a816b43153afcb10ca189f8f319dc5d9", "score": "0.49700308", "text": "function defaultFor(arg, val) { return typeof arg !== 'undefined' ? arg : val; }", "title": "" }, { "docid": "5aa7421ed8ae7486b9688a1ddad49059", "score": "0.49662217", "text": "function getArgumentValues(def, node, variableValues) {\n var coercedValues = {};\n var argNodeMap = Object(_jsutils_keyMap__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node.arguments || [], function (arg) {\n return arg.name.value;\n });\n\n for (var _i4 = 0, _def$args2 = def.args; _i4 < _def$args2.length; _i4++) {\n var argDef = _def$args2[_i4];\n var name = argDef.name;\n var argType = argDef.type;\n var argumentNode = argNodeMap[name];\n\n if (!argumentNode) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_7__[\"isNonNullType\"])(argType)) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_4__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + 'was not provided.', node);\n }\n\n continue;\n }\n\n var valueNode = argumentNode.value;\n var isNull = valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].NULL;\n\n if (valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].VARIABLE) {\n var variableName = valueNode.name.value;\n\n if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_7__[\"isNonNullType\"])(argType)) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_4__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + \"was provided the variable \\\"$\".concat(variableName, \"\\\" which was not provided a runtime value.\"), valueNode);\n }\n\n continue;\n }\n\n isNull = variableValues[variableName] == null;\n }\n\n if (isNull && Object(_type_definition__WEBPACK_IMPORTED_MODULE_7__[\"isNonNullType\"])(argType)) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_4__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of non-null type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + 'must not be null.', valueNode);\n }\n\n var coercedValue = Object(_utilities_valueFromAST__WEBPACK_IMPORTED_MODULE_9__[\"valueFromAST\"])(valueNode, argType, variableValues);\n\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectType validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_4__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" has invalid value \").concat(Object(_language_printer__WEBPACK_IMPORTED_MODULE_6__[\"print\"])(valueNode), \".\"), valueNode);\n }\n\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}", "title": "" }, { "docid": "e73fee03d617a6722b36bd02928911aa", "score": "0.49612933", "text": "function Param(_target, propertyName, index) {\n console.log(propertyName, index);\n}", "title": "" }, { "docid": "f3df0623d02cb56e3202aee8893cd431", "score": "0.49578777", "text": "function arg(_a, ia, def, returnArray) {\n\tvar v = null\n\n\t// if ia is an array, find the\n\t// first correct definition\n\tif (ia.constructor == Array) {\n\t\t/*\n\t\t * Each item is checked. if the\n\t\t * item in the array is\n\t\t * a definition within the oaet\n\t\t * arguments or object - pass it\n\t\t */\n\t\tfor(var i=0; i<ia.length; i++) {\n\t\t\tif(_a[ia[i]]){\n\n\t\t\t\t v = _a[ia[i]];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\t// if ia is just a value\n\t\tif(_a[ia]) v = _a[ia];\n\t}\n\n\tif( (v == null) && (def != undefined) ) {\n\t\tv = def\n\t}\n\n\tif(returnArray){\n\t\treturn [v, ia[i]]\n\t}\n\telse\n\t{\n\t\treturn v\n\t}\n\n}", "title": "" }, { "docid": "1f28636a0dd156b9cf14a883d9988c1a", "score": "0.4950699", "text": "constructor(obj = {}, value) {\r\n this._label = obj.label || '';\r\n this._type = obj.type || 'string';\r\n this._input = obj.input || 'text';\r\n this._options = obj.options || {};\r\n this._attr = obj.attribs || {};\r\n this._val = value || obj.default;\r\n this._id = 'label' + this._label.replace(/\\W/g, ''); // get only word chars (a-Z,0-9,_);\r\n }", "title": "" }, { "docid": "57cf46639feb80ae91c35fa0a80beeb0", "score": "0.49468294", "text": "constructor (param){\n if (typeof param != 'undefined')\n for(var i in param)\n this[i] = param[i];\n }", "title": "" }, { "docid": "12d3c687012718539920d3198461de5e", "score": "0.49450573", "text": "constructor(params) {\n // Ciclo for para asignar las propiedades pasadas como argumento\n for (const param in params) {\n if (params.hasOwnProperty(param)) {\n this[param] = params[param];\n }\n }\n\n // Switch statement para definir el valor de la propiedad \"handle_as\" basado en el valor de \"type_value\"\n switch (this.type_value) {\n case \"boolean\":\n this.handle_as = \"switch\";\n break;\n\n case \"number\":\n this.handle_as = \"input\";\n this.input_type = \"number\";\n break;\n\n default:\n break;\n }\n }", "title": "" }, { "docid": "203177f7a59b095c3ef9f612a94b5c73", "score": "0.4934618", "text": "function firstVal(arg, func) {\n if(Array.isArray(arg) == Array) {\n func(arr[0], index, arr);\n }\n if(arr.constructor == Object) {\n func(arg[key], key, arg);\n}\n}", "title": "" }, { "docid": "a33e5b9962faa8b6492609ade7d3f733", "score": "0.49257192", "text": "function restOperator(...valueOfArgument){\r\n console.log(valueOfArgument);\r\n}", "title": "" }, { "docid": "bf1c1abb5c5d596a692187aa95630a6f", "score": "0.4925209", "text": "static pipe(funct,attribute,optContinue){return(context,next)=>{if(funct){const params=Object.keys(context.params);if(!attribute&&params.length>0){funct(context.params[params[0]],context)}else{funct(attribute,context)}}if(optContinue){next()}}}", "title": "" }, { "docid": "66fc07cbaa1df71296dba7b6ff99e38f", "score": "0.4920497", "text": "function prepareArgument(match, name) {\n\t\tvar result = {\n\t\t\t\ttype: match ? match[1] : false,\n\t\t\t\tname: match ? match[2] : name\n\t\t\t};\n\n\t\tif (match) {\n\t\t\tif (match[4] === '@') {\n\t\t\t\tresult.reference = match[5];\n\t\t\t}\n\t\t\telse if (match[3] === '=') {\n\t\t\t\tresult.value = cast(result.type, match[5]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "title": "" }, { "docid": "76c4213368e0b69ad67852fa3bc0a8cb", "score": "0.4909462", "text": "function say({\n subject,\n verb,\n object\n}) {\n // es6 feature: template strings\n //console.log({subject, verb, object});\n console.log(subject, verb, object);\n} // es6 feature: for..of", "title": "" }, { "docid": "90492afe733763e290f0361ff80166b9", "score": "0.49063036", "text": "constructor(...args) {\n if (args.length === 0) {\n this.h = 0\n this.s = 0\n this.l = 0\n } else if (args.length === 1) {\n const [value] = args\n this.h = 0\n this.s = 0\n this.l = value || 0\n } else {\n const [h, s, l] = args\n this.h = h || 0\n this.s = s || 0\n this.l = l || 0\n }\n }", "title": "" }, { "docid": "c1215a9c959f79e8804dcbcdda90b590", "score": "0.49014387", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.Kind.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "c1215a9c959f79e8804dcbcdda90b590", "score": "0.49014387", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.Kind.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "c1215a9c959f79e8804dcbcdda90b590", "score": "0.49014387", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.Kind.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "3e8a62975b39623cc988b197e8b2a1aa", "score": "0.48859558", "text": "visitParameter_value(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "title": "" }, { "docid": "3fd45d113d40921ab07d770fd21ee939", "score": "0.48709908", "text": "function getArgumentValues(def, node, variableValues = {}) {\n var _a;\n const variableMap = Object.entries(variableValues).reduce((prev, [key, value]) => ({\n ...prev,\n [key]: value,\n }), {});\n const coercedValues = {};\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const argumentNodes = (_a = node.arguments) !== null && _a !== void 0 ? _a : [];\n const argNodeMap = argumentNodes.reduce((prev, arg) => ({\n ...prev,\n [arg.name.value]: arg,\n }), {});\n for (const argDef of def.args) {\n const name = argDef.name;\n const argType = argDef.type;\n const argumentNode = argNodeMap[name];\n if (!argumentNode) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n }\n else if (graphql.isNonNullType(argType)) {\n throw new graphql.GraphQLError(`Argument \"${name}\" of required type \"${inspect(argType)}\" ` + 'was not provided.', node);\n }\n continue;\n }\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === graphql.Kind.NULL;\n if (valueNode.kind === graphql.Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n if (variableValues == null || !(variableName in variableMap)) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n }\n else if (graphql.isNonNullType(argType)) {\n throw new graphql.GraphQLError(`Argument \"${name}\" of required type \"${inspect(argType)}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`, valueNode);\n }\n continue;\n }\n isNull = variableValues[variableName] == null;\n }\n if (isNull && graphql.isNonNullType(argType)) {\n throw new graphql.GraphQLError(`Argument \"${name}\" of non-null type \"${inspect(argType)}\" ` + 'must not be null.', valueNode);\n }\n const coercedValue = graphql.valueFromAST(valueNode, argType, variableValues);\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new graphql.GraphQLError(`Argument \"${name}\" has invalid value ${graphql.print(valueNode)}.`, valueNode);\n }\n coercedValues[name] = coercedValue;\n }\n return coercedValues;\n}", "title": "" }, { "docid": "45b9c3fc4bcdfdd57577adf5c19c4d5c", "score": "0.48673472", "text": "function seeJPMovies({one, two, three},{four, five}){\n console.log(one);\n console.log(two);\n console.log(three);\n console.log(four);\n console.log(five);\n}", "title": "" }, { "docid": "473c859e516edd20fbbec151cdbe6cb3", "score": "0.48670593", "text": "function KnownArgumentNames(context) {\n return {\n Argument: function Argument(node, key, parent, path, ancestors) {\n var argumentOf = ancestors[ancestors.length - 1];\n if (argumentOf.kind === _languageKinds.FIELD) {\n var fieldDef = context.getFieldDef();\n if (fieldDef) {\n var fieldArgDef = (0, _jsutilsFind2['default'])(fieldDef.args, function (arg) {\n return arg.name === node.name.value;\n });\n if (!fieldArgDef) {\n var parentType = context.getParentType();\n (0, _jsutilsInvariant2['default'])(parentType);\n context.reportError(new _error.GraphQLError(unknownArgMessage(node.name.value, fieldDef.name, parentType.name), [node]));\n }\n }\n } else if (argumentOf.kind === _languageKinds.DIRECTIVE) {\n var directive = context.getDirective();\n if (directive) {\n var directiveArgDef = (0, _jsutilsFind2['default'])(directive.args, function (arg) {\n return arg.name === node.name.value;\n });\n if (!directiveArgDef) {\n context.reportError(new _error.GraphQLError(unknownDirectiveArgMessage(node.name.value, directive.name), [node]));\n }\n }\n }\n }\n };\n}", "title": "" }, { "docid": "04b57f28bea8104a1579a5511289386f", "score": "0.48629624", "text": "function nameValue(arr) {\n // TODO: your code here\n}", "title": "" }, { "docid": "0e747f91b1f2cdda4edce618d575b0d8", "score": "0.48608515", "text": "function useIt(...vals) {\n return vals;\n}", "title": "" }, { "docid": "1b9840d74e72c8a2f90ca7b50abf8a3a", "score": "0.48606285", "text": "function parseArgument(lexer) {\n\t var start = lexer.token;\n\t return {\n\t kind: _kinds.ARGUMENT,\n\t name: parseName(lexer),\n\t value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n\t loc: loc(lexer, start)\n\t };\n\t}", "title": "" }, { "docid": "c356e473bde63795d4a0da4f703cc4c4", "score": "0.48598486", "text": "function createArgumentFromStaticValue(value) {\n\tconst rhythmMapObj = rhythmMap();\n\t// convert rhythms into numbers if we catch one\n\treturn {\n\t\tnext: () => rhythmMapObj[value] || value,\n\t};\n}", "title": "" }, { "docid": "7ea235899115c2b42c0d2e657806b3bc", "score": "0.48572052", "text": "function parseSubParameter(def, value$$1, scope) {\n var params, pdef, k, i, n;\n\n // loop over defs to find matching key\n for (i=0, n=def.params.length; i<n; ++i) {\n pdef = def.params[i];\n for (k in pdef.key) {\n if (pdef.key[k] !== value$$1[k]) { pdef = null; break; }\n }\n if (pdef) break;\n }\n // raise error if matching key not found\n if (!pdef) error$1('Unsupported parameter: ' + $(value$$1));\n\n // parse params, create Params transform, return ref\n params = extend(parseParameters(pdef, value$$1, scope), pdef.key);\n return ref(scope.add(Params$2(params)));\n}", "title": "" }, { "docid": "8aa6e624c6881100b5d0487e7807ef07", "score": "0.48567295", "text": "function getArgumentValues(def, node, variableValues) {\n var coercedValues = {};\n var argDefs = def.args;\n var argNodes = node.arguments;\n\n if (!argDefs || !argNodes) {\n return coercedValues;\n }\n\n var argNodeMap = Object(_jsutils_keyMap__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(argNodes, function (arg) {\n return arg.name.value;\n });\n\n for (var i = 0; i < argDefs.length; i++) {\n var argDef = argDefs[i];\n var name = argDef.name;\n var argType = argDef.type;\n var argumentNode = argNodeMap[name];\n var hasValue = void 0;\n var isNull = void 0;\n\n if (argumentNode && argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].VARIABLE) {\n var variableName = argumentNode.value.name.value;\n hasValue = variableValues && hasOwnProperty(variableValues, variableName);\n isNull = variableValues && variableValues[variableName] === null;\n } else {\n hasValue = argumentNode != null;\n isNull = argumentNode && argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].NULL;\n }\n\n if (!hasValue && argDef.defaultValue !== undefined) {\n // If no argument was provided where the definition has a default value,\n // use the default value.\n coercedValues[name] = argDef.defaultValue;\n } else if ((!hasValue || isNull) && Object(_type_definition__WEBPACK_IMPORTED_MODULE_10__[\"isNonNullType\"])(argType)) {\n // If no argument or a null value was provided to an argument with a\n // non-null type (required), produce a field error.\n if (isNull) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_1__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of non-null type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + 'must not be null.', [argumentNode.value]);\n } else if (argumentNode && argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].VARIABLE) {\n var _variableName = argumentNode.value.name.value;\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_1__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + \"was provided the variable \\\"$\".concat(_variableName, \"\\\" \") + 'which was not provided a runtime value.', [argumentNode.value]);\n } else {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_1__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + 'was not provided.', [node]);\n }\n } else if (hasValue) {\n if (argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].NULL) {\n // If the explicit value `null` was provided, an entry in the coerced\n // values must exist as the value `null`.\n coercedValues[name] = null;\n } else if (argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].VARIABLE) {\n var _variableName2 = argumentNode.value.name.value;\n !variableValues ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, 'Must exist for hasValue to be true.') : void 0; // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n coercedValues[name] = variableValues[_variableName2];\n } else {\n var valueNode = argumentNode.value;\n var coercedValue = Object(_utilities_valueFromAST__WEBPACK_IMPORTED_MODULE_7__[\"valueFromAST\"])(valueNode, argType, variableValues);\n\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectType validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_1__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" has invalid value \").concat(Object(_language_printer__WEBPACK_IMPORTED_MODULE_9__[\"print\"])(valueNode), \".\"), [argumentNode.value]);\n }\n\n coercedValues[name] = coercedValue;\n }\n }\n }\n\n return coercedValues;\n}", "title": "" }, { "docid": "a29eb055286db2ffd3063681213f7b48", "score": "0.4856627", "text": "function parameterize(candidate) {\n\t\tcandidate.param = candidate.param.map(function(param) {\n\t\t\tvar value;\n\n\t\t\tif ('value' in param) {\n\t\t\t\tvalue = param.value;\n\t\t\t}\n\t\t\telse if ('reference' in param) {\n\t\t\t\tvalue = candidate.param.reduce(function(p, c) {\n\t\t\t\t\treturn c !== param && !p && param.reference === c.name && 'value' in c ? c.value : p;\n\t\t\t\t}, null);\n\t\t\t}\n\n\t\t\treturn value;\n\t\t});\n\n\t\treturn candidate;\n\t}", "title": "" }, { "docid": "aa05f1afd8119d626da5df6f78c894a8", "score": "0.48562253", "text": "function getArgumentValues(def, node, variableValues) {\n var coercedValues = {};\n var argDefs = def.args;\n var argNodes = node.arguments;\n\n if (!argDefs || !argNodes) {\n return coercedValues;\n }\n\n var argNodeMap = Object(_jsutils_keyMap__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(argNodes, function (arg) {\n return arg.name.value;\n });\n\n for (var i = 0; i < argDefs.length; i++) {\n var argDef = argDefs[i];\n var name = argDef.name;\n var argType = argDef.type;\n var argumentNode = argNodeMap[name];\n var hasValue = void 0;\n var isNull = void 0;\n\n if (argumentNode && argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].VARIABLE) {\n var variableName = argumentNode.value.name.value;\n hasValue = variableValues && hasOwnProperty(variableValues, variableName);\n isNull = variableValues && variableValues[variableName] === null;\n } else {\n hasValue = argumentNode != null;\n isNull = argumentNode && argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].NULL;\n }\n\n if (!hasValue && argDef.defaultValue !== undefined) {\n // If no argument was provided where the definition has a default value,\n // use the default value.\n coercedValues[name] = argDef.defaultValue;\n } else if ((!hasValue || isNull) && Object(_type_definition__WEBPACK_IMPORTED_MODULE_10__[\"isNonNullType\"])(argType)) {\n // If no argument or a null value was provided to an argument with a\n // non-null type (required), produce a field error.\n if (isNull) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of non-null type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + 'must not be null.', [argumentNode.value]);\n } else if (argumentNode && argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].VARIABLE) {\n var _variableName = argumentNode.value.name.value;\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + \"was provided the variable \\\"$\".concat(_variableName, \"\\\" \") + 'which was not provided a runtime value.', [argumentNode.value]);\n } else {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(argType), \"\\\" \") + 'was not provided.', [node]);\n }\n } else if (hasValue) {\n if (argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].NULL) {\n // If the explicit value `null` was provided, an entry in the coerced\n // values must exist as the value `null`.\n coercedValues[name] = null;\n } else if (argumentNode.value.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_8__[\"Kind\"].VARIABLE) {\n var _variableName2 = argumentNode.value.name.value;\n !variableValues ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, 'Must exist for hasValue to be true.') : void 0; // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n coercedValues[name] = variableValues[_variableName2];\n } else {\n var valueNode = argumentNode.value;\n var coercedValue = Object(_utilities_valueFromAST__WEBPACK_IMPORTED_MODULE_7__[\"valueFromAST\"])(valueNode, argType, variableValues);\n\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectType validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"](\"Argument \\\"\".concat(name, \"\\\" has invalid value \").concat(Object(_language_printer__WEBPACK_IMPORTED_MODULE_9__[\"print\"])(valueNode), \".\"), [argumentNode.value]);\n }\n\n coercedValues[name] = coercedValue;\n }\n }\n }\n\n return coercedValues;\n}", "title": "" }, { "docid": "224d2b475ebf727472c647a2c019a2d6", "score": "0.4845331", "text": "function parseParameter(spec, ctx, params) {\n if (!spec || !vegaUtil.isObject(spec)) return spec;\n\n for (let i=0, n=PARSERS.length, p; i<n; ++i) {\n p = PARSERS[i];\n if (vegaUtil.hasOwnProperty(spec, p.key)) {\n return p.parse(spec, ctx, params);\n }\n }\n\n return spec;\n }", "title": "" }, { "docid": "52ab0fd335f3f5e2b16674a38639928b", "score": "0.48442423", "text": "function parameterFunc(beets) {\n console.log(beets);\n}", "title": "" }, { "docid": "b3961aec0fc541a4a91cbc9e183ea77d", "score": "0.48431924", "text": "getAttr(name, defaultValue) {\n const value = this.node.rawAttrs[name];\n if (value.tensor != null) {\n return Object(_executors_utils__WEBPACK_IMPORTED_MODULE_0__[\"getTensor\"])(name, this.tensorMap, this.context);\n }\n if (value.i != null || value.f != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getNumberParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.s != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getStringParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.b != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getBoolParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.shape != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getTensorShapeParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.type != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getDtypeParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list != null) {\n if (value.list.i != null || value.list.f != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getNumericArrayParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.s != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getStringArrayParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.shape != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getTensorShapeArrayParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.b != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getBoolArrayParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.type != null) {\n return Object(_operation_mapper__WEBPACK_IMPORTED_MODULE_1__[\"getDtypeArrayParam\"])(this.node.rawAttrs, name, defaultValue);\n }\n }\n return defaultValue;\n }", "title": "" }, { "docid": "47edd54a7c4eab0dd5f9ededab9d3588", "score": "0.48431078", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "47edd54a7c4eab0dd5f9ededab9d3588", "score": "0.48431078", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "47edd54a7c4eab0dd5f9ededab9d3588", "score": "0.48431078", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "47edd54a7c4eab0dd5f9ededab9d3588", "score": "0.48431078", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds.ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer.TokenKind.COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "0508a12f370a5a4c4948b627027ae96f", "score": "0.4833426", "text": "function useIt(...vals) {\n return vals;\n}", "title": "" }, { "docid": "fca73f2f74e99a01835477ec3d6e77c6", "score": "0.48324114", "text": "function newParams(... myParams){\n console.log(myParams);\n}", "title": "" }, { "docid": "de7103f4dce91b20fabf72ccd9989fd1", "score": "0.4832064", "text": "init_args(rawData) {\n\t\tconst dataType = {\n\t\t\tarray: 'array',\n\t\t\tprimitive: 'primitive',\n\t\t};\n\n\t\tlet args;\n\t\t//If both index and value are specified, then wrap each corresponding pair into a single object\n\t\tif (rawData.value !== undefined && rawData.index !== undefined) {\n\t\t\t//Both value and index are specified as arrays\n\t\t\tif (Array.isArray(rawData.index) && Array.isArray(rawData.value)) {\n\t\t\t\targs = {\n\t\t\t\t\ttype: dataType.array,\n\t\t\t\t\titems: rawData.index.map((item, index) => ({\n\t\t\t\t\t\tindex: rawData.index[index],\n\t\t\t\t\t\tvalue: rawData.value[index],\n\t\t\t\t\t})),\n\t\t\t\t};\n\t\t\t}\n\t\t\t//Both value and index are specified as primitives\n\t\t\telse if (!Array.isArray(rawData.index) && !Array.isArray(rawData.value)) {\n\t\t\t\targs = {\n\t\t\t\t\ttype: dataType.primitive,\n\t\t\t\t\titems: [{ index: rawData.index, value: rawData.value }],\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthrow 'Both index and value should either be of type array or a primitive.';\n\t\t\t}\n\t\t}\n\n\t\t//Else wrap whichever one is defined into a single object each\n\t\telse {\n\t\t\tif (rawData.value !== undefined) {\n\t\t\t\tif (Array.isArray(rawData.value)) {\n\t\t\t\t\targs = {\n\t\t\t\t\t\ttype: dataType.array,\n\t\t\t\t\t\titems: rawData.value.map((item) => ({ value: item })),\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\targs = {\n\t\t\t\t\t\ttype: dataType.primitive,\n\t\t\t\t\t\titems: [{ value: rawData.value }],\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} else if (rawData.index !== undefined) {\n\t\t\t\tif (Array.isArray(rawData.index)) {\n\t\t\t\t\targs = {\n\t\t\t\t\t\ttype: dataType.array,\n\t\t\t\t\t\titems: rawData.index.map((item) => ({ index: item })),\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\targs = {\n\t\t\t\t\t\ttype: dataType.primitive,\n\t\t\t\t\t\titems: [{ index: rawData.index }],\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn args;\n\t}", "title": "" }, { "docid": "4fca52aaef1ce6442b0ec7d12139be31", "score": "0.48197225", "text": "bindObject(name, args, kwargs)\n\t{\n\t\targs = this.bindArray(name, args, kwargs);\n\t\tlet argObject = {};\n\t\tlet i = 0;\n\t\tfor (let param of this.paramsByPos)\n\t\t\targObject[param.name] = args[i++];\n\t\tif (this.varpos !== null)\n\t\t\targObject[this.varpos.name] = args[i++];\n\t\tif (this.varkw !== null)\n\t\t\targObject[this.varkw.name] = args[i++];\n\t\treturn argObject;\n\t}", "title": "" }, { "docid": "4f10072d85e25bb888ef932f1b71bff9", "score": "0.48147488", "text": "function givenVals(...args) {\n let result = \"Given: \";\n args = args.filter(a => typeof a != 'undefined');\n // value (type)\n result += args.map((a) => `${a} (${displayType(a)})`).join(\", \");\n return result;\n}", "title": "" }, { "docid": "dbb1a0c0341e581b90a9c10458f59710", "score": "0.4814746", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer__WEBPACK_IMPORTED_MODULE_3__[\"TokenKind\"].COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" }, { "docid": "dbb1a0c0341e581b90a9c10458f59710", "score": "0.4814746", "text": "function parseArgument(lexer) {\n var start = lexer.token;\n return {\n kind: _kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].ARGUMENT,\n name: parseName(lexer),\n value: (expect(lexer, _lexer__WEBPACK_IMPORTED_MODULE_3__[\"TokenKind\"].COLON), parseValueLiteral(lexer, false)),\n loc: loc(lexer, start)\n };\n}", "title": "" } ]
33c7ca551a75bb819eb2596582ebb386
Override all write methods with queryaware versions.
[ { "docid": "e835fe26dc7a8de57f33aa9e9d3330b9", "score": "0.0", "text": "function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }", "title": "" } ]
[ { "docid": "151bccaaa6280e8bf6d5866bb4c53b35", "score": "0.6610417", "text": "isWriteQuery(query) {\n return ['update', 'del', 'delete', 'insert'].includes(query['_method']);\n }", "title": "" }, { "docid": "934b72420601c59f5054908f78664fd7", "score": "0.6195989", "text": "write(options) {\n let params = options;\n params.query = this.query;\n return this.client.writeQuery(params);\n }", "title": "" }, { "docid": "8427559d945cf09b5cced0084adf0209", "score": "0.5423454", "text": "function ExecuteWriter(queryId, params, consistency) {\n this.queryId = queryId;\n this.params = params ? params : [];\n this.consistency = consistency;\n this.streamId = null;\n if (consistency === null || typeof consistency === 'undefined') {\n this.consistency = types.consistencies.getDefault();\n }\n}", "title": "" }, { "docid": "975e56f79996fe8791d14813f6c8c313", "score": "0.51994056", "text": "updateObjectsByQuery(className, schema, query, update) {\n return notImplemented();\n }", "title": "" }, { "docid": "305b9f61e766fbc2ed6e234e1ff28c9d", "score": "0.5146169", "text": "replaceMethods() {\n for (let name of this.constructor.conditionMethods) {\n let originMethod = this.query[name];\n this.query[name] = (param) => {\n const key = this.query._path;\n param = this.Model.formatField(key, param);\n originMethod.apply(this.query, [param]);\n return this;\n };\n }\n }", "title": "" }, { "docid": "2bddae8573b43de95e54fd3b5ee63ad8", "score": "0.5127392", "text": "write() { throw \"Abstract Method\" }", "title": "" }, { "docid": "cc20091d379ffc01a5fa06b0acba4bd2", "score": "0.5114968", "text": "replaceMethods() {\n for (let name of this.constructor.conditionMethods) {\n let originMethod = this.queryBuilder[name];\n this.queryBuilder[name] = (param) => {\n originMethod.apply(this.queryBuilder, [param]);\n return this;\n };\n }\n }", "title": "" }, { "docid": "459fd535c36c1b751294fb28b7c2ba9e", "score": "0.50910866", "text": "function Queryish() {}", "title": "" }, { "docid": "ce2eff027cf034d13b963ac3ea644dc1", "score": "0.5073698", "text": "writing() {\n // Currently not supported don't use this\n }", "title": "" }, { "docid": "8fb2fc50c88c8729b8a4ea00a3adf4f6", "score": "0.49631852", "text": "get write () {\n return this._write\n }", "title": "" }, { "docid": "8fb2fc50c88c8729b8a4ea00a3adf4f6", "score": "0.49631852", "text": "get write () {\n return this._write\n }", "title": "" }, { "docid": "8fb2fc50c88c8729b8a4ea00a3adf4f6", "score": "0.49631852", "text": "get write () {\n return this._write\n }", "title": "" }, { "docid": "dcd98c1f16854b60680eec27ad4af21a", "score": "0.4952098", "text": "function CouchDBSync () {}", "title": "" }, { "docid": "5a56419f11cc5109cc32f45c982ee3f1", "score": "0.49243137", "text": "function getWriteProvider() {\n return _getWriteProvider.apply(this, arguments);\n}", "title": "" }, { "docid": "5df7020e880be8bacc1a9d170bdc373a", "score": "0.49149153", "text": "querySream(query) {\n\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "b781990ca77195890765526bb8a04ee6", "score": "0.4886877", "text": "visitWrite_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "title": "" }, { "docid": "6cbdea0cbb8c66f3acd5d47bb76ab4d1", "score": "0.48709995", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);\n\n\t var history = createHistory(historyOptions);\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) location.query = parseQueryString(location.search.substring(1));\n\n\t return location;\n\t }\n\n\t function appendQuery(pathname, query) {\n\t var queryString = undefined;\n\t if (query && (queryString = stringifyQuery(query)) !== '') return pathname + (pathname.indexOf('?') === -1 ? '?' : '&') + queryString;\n\n\t return pathname;\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function pushState(state, pathname, query) {\n\t return history.pushState(state, appendQuery(pathname, query));\n\t }\n\n\t function replaceState(state, pathname, query) {\n\t return history.replaceState(state, appendQuery(pathname, query));\n\t }\n\n\t function createPath(pathname, query) {\n\t return history.createPath(appendQuery(pathname, query));\n\t }\n\n\t function createHref(pathname, query) {\n\t return history.createHref(appendQuery(pathname, query));\n\t }\n\n\t function createLocation() {\n\t return addQuery(history.createLocation.apply(history, arguments));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t pushState: pushState,\n\t replaceState: replaceState,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation\n\t });\n\t };\n\t}", "title": "" }, { "docid": "6cbdea0cbb8c66f3acd5d47bb76ab4d1", "score": "0.48709995", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);\n\n\t var history = createHistory(historyOptions);\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) location.query = parseQueryString(location.search.substring(1));\n\n\t return location;\n\t }\n\n\t function appendQuery(pathname, query) {\n\t var queryString = undefined;\n\t if (query && (queryString = stringifyQuery(query)) !== '') return pathname + (pathname.indexOf('?') === -1 ? '?' : '&') + queryString;\n\n\t return pathname;\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function pushState(state, pathname, query) {\n\t return history.pushState(state, appendQuery(pathname, query));\n\t }\n\n\t function replaceState(state, pathname, query) {\n\t return history.replaceState(state, appendQuery(pathname, query));\n\t }\n\n\t function createPath(pathname, query) {\n\t return history.createPath(appendQuery(pathname, query));\n\t }\n\n\t function createHref(pathname, query) {\n\t return history.createHref(appendQuery(pathname, query));\n\t }\n\n\t function createLocation() {\n\t return addQuery(history.createLocation.apply(history, arguments));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t pushState: pushState,\n\t replaceState: replaceState,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation\n\t });\n\t };\n\t}", "title": "" }, { "docid": "133f9c70be7d77077d3c808d76039458", "score": "0.4827433", "text": "function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(unsafeUnwrap(this), arguments));\n };\n }", "title": "" }, { "docid": "dd70299e961ba3eb9100ec4df2865bea", "score": "0.4803074", "text": "function CustomWritable() {\r\n Writable.call(this);\r\n}", "title": "" }, { "docid": "6c8b1a12045a510492185929eaaddd69", "score": "0.47689167", "text": "getQueryClient(query) {\n return this.isWriteQuery(query) ? this.client.getWriteClient() : this.client.getReadClient();\n }", "title": "" }, { "docid": "aff8ffd93bed20d5a99e431fcb8124c5", "score": "0.47638872", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);\n\n var history = createHistory(historyOptions);\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) location.query = parseQueryString(location.search.substring(1));\n\n return location;\n }\n\n function appendQuery(path, query) {\n var queryString = undefined;\n if (!query || (queryString = stringifyQuery(query)) === '') return path;\n\n if (typeof path === 'string') path = _parsePath2['default'](path);\n\n var search = path.search + (path.search ? '&' : '?') + queryString;\n\n return _extends({}, path, {\n search: search\n });\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function pushState(state, path, query) {\n return history.pushState(state, appendQuery(path, query));\n }\n\n function replaceState(state, path, query) {\n return history.replaceState(state, appendQuery(path, query));\n }\n\n function createPath(path, query) {\n return history.createPath(appendQuery(path, query));\n }\n\n function createHref(path, query) {\n return history.createHref(appendQuery(path, query));\n }\n\n function createLocation() {\n return addQuery(history.createLocation.apply(history, arguments));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n pushState: pushState,\n replaceState: replaceState,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation\n });\n };\n}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "d93956844348f24c94a9a0bf97367d46", "score": "0.4741128", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.47364876", "text": "function TQueries() {}", "title": "" }, { "docid": "bf967c5daa6373fec6e77dd13132cc98", "score": "0.47301018", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var history = createHistory(options);\n\t\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\t\n\t true ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\t\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t true ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t true ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\t\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "e633d4cbe3980b6a594504a26df2e555", "score": "0.47195193", "text": "createQuery() {\n var sob = this.connection.sobject(this.resource)\n var q = sob.find(this.createQueryWhere(), this.createQueryFields())\n .sort({[this.options.timeStampField]: 1})\n return q\n }", "title": "" }, { "docid": "8053b65702bd251d6ac0ec4e78825167", "score": "0.47108158", "text": "function useQueries(createHistory){return function(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var stringifyQuery=options.stringifyQuery;var parseQueryString=options.parseQueryString;var historyOptions=_objectWithoutProperties(options,['stringifyQuery','parseQueryString']);var history=createHistory(historyOptions);if(typeof stringifyQuery!=='function')stringifyQuery=defaultStringifyQuery;if(typeof parseQueryString!=='function')parseQueryString=defaultParseQueryString;function addQuery(location){if(location.query==null){var search=location.search;location.query=parseQueryString(search.substring(1));location[SEARCH_BASE_KEY]={search:search,searchBase:''};}// TODO: Instead of all the book-keeping here, this should just strip the\n// stringified query from the search.\nreturn location;}function appendQuery(location,query){var _extends2;var searchBaseSpec=location[SEARCH_BASE_KEY];var queryString=query?stringifyQuery(query):'';if(!searchBaseSpec&&!queryString){return location;}process.env.NODE_ENV!=='production'?_warning2['default'](stringifyQuery!==defaultStringifyQuery||!isNestedObject(query),'useQueries does not stringify nested query objects by default; '+'use a custom stringifyQuery function'):undefined;if(typeof location==='string')location=_PathUtils.parsePath(location);var searchBase=undefined;if(searchBaseSpec&&location.search===searchBaseSpec.search){searchBase=searchBaseSpec.searchBase;}else{searchBase=location.search||'';}var search=searchBase;if(queryString){search+=(search?'&':'?')+queryString;}return _extends({},location,(_extends2={search:search},_extends2[SEARCH_BASE_KEY]={search:search,searchBase:searchBase},_extends2));}// Override all read methods with query-aware versions.\nfunction listenBefore(hook){return history.listenBefore(function(location,callback){_runTransitionHook2['default'](hook,addQuery(location),callback);});}function listen(listener){return history.listen(function(location){listener(addQuery(location));});}// Override all write methods with query-aware versions.\nfunction push(location){history.push(appendQuery(location,location.query));}function replace(location){history.replace(appendQuery(location,location.query));}function createPath(location,query){process.env.NODE_ENV!=='production'?_warning2['default'](!query,'the query argument to createPath is deprecated; use a location descriptor instead'):undefined;return history.createPath(appendQuery(location,query||location.query));}function createHref(location,query){process.env.NODE_ENV!=='production'?_warning2['default'](!query,'the query argument to createHref is deprecated; use a location descriptor instead'):undefined;return history.createHref(appendQuery(location,query||location.query));}function createLocation(location){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}var fullLocation=history.createLocation.apply(history,[appendQuery(location,location.query)].concat(args));if(location.query){fullLocation.query=location.query;}return addQuery(fullLocation);}// deprecated\nfunction pushState(state,path,query){if(typeof path==='string')path=_PathUtils.parsePath(path);push(_extends({state:state},path,{query:query}));}// deprecated\nfunction replaceState(state,path,query){if(typeof path==='string')path=_PathUtils.parsePath(path);replace(_extends({state:state},path,{query:query}));}return _extends({},history,{listenBefore:listenBefore,listen:listen,push:push,replace:replace,createPath:createPath,createHref:createHref,createLocation:createLocation,pushState:_deprecate2['default'](pushState,'pushState is deprecated; use push instead'),replaceState:_deprecate2['default'](replaceState,'replaceState is deprecated; use replace instead')});};}", "title": "" }, { "docid": "71fe3b352952e52bf2bd2ad632831985", "score": "0.4708193", "text": "getWriteable(context, path) {\n if (!this[OBJECT_ID]) {\n throw new RangeError('getWriteable() requires the objectId to be set')\n }\n\n const instance = Object.create(WriteableTable.prototype)\n instance[OBJECT_ID] = this[OBJECT_ID]\n instance.context = context\n instance.entries = this.entries\n instance.opIds = this.opIds\n instance.path = path\n return instance\n }", "title": "" }, { "docid": "71fe3b352952e52bf2bd2ad632831985", "score": "0.4708193", "text": "getWriteable(context, path) {\n if (!this[OBJECT_ID]) {\n throw new RangeError('getWriteable() requires the objectId to be set')\n }\n\n const instance = Object.create(WriteableTable.prototype)\n instance[OBJECT_ID] = this[OBJECT_ID]\n instance.context = context\n instance.entries = this.entries\n instance.opIds = this.opIds\n instance.path = path\n return instance\n }", "title": "" }, { "docid": "f8ea0b35774f8d9b6886c3c42d3f80b0", "score": "0.4681323", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n true ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n true ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n true ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "8233f06198434a145e6e1a6d327b193f", "score": "0.46691358", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n false ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n false ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "b39d4767b0e757b0af4db715fa2a9141", "score": "0.4663948", "text": "onWrite(writeFunc) {\n this._write = writeFunc;\n return this;\n }", "title": "" }, { "docid": "b39d4767b0e757b0af4db715fa2a9141", "score": "0.4663948", "text": "onWrite(writeFunc) {\n this._write = writeFunc;\n return this;\n }", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.465886", "text": "function query() {}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "1ccd92a56e3ea91ac3c3654114204646", "score": "0.46549332", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "803af7887767aad76e2cfde808dea1bb", "score": "0.4653328", "text": "get readWrite() {\n return this;\n }", "title": "" }, { "docid": "803af7887767aad76e2cfde808dea1bb", "score": "0.4653328", "text": "get readWrite() {\n return this;\n }", "title": "" }, { "docid": "db26e97e15a956458b373f7c55b87e1e", "score": "0.4639395", "text": "function write(self) {\n return function(connection, command, callback) {\n // Get the raw buffer\n // Ensure we stop auth if pool was destroyed\n if(self.state == DESTROYED || self.state == DESTROYING) {\n return callback(new MongoError('pool destroyed'));\n }\n\n // Set the connection workItem callback\n connection.workItems.push({\n cb: callback, command: true, requestId: command.requestId\n });\n\n // Write the buffer out to the connection\n connection.write(command.toBin());\n };\n}", "title": "" }, { "docid": "8d28bcc7d7acce2a5251bfcc976989b5", "score": "0.46361968", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t true ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t true ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t true ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "85bdd9931c06ffa2de03ad2227f83f34", "score": "0.46284097", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);\n\t\n\t var history = createHistory(historyOptions);\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var queryString = undefined;\n\t if (!query || (queryString = stringifyQuery(query)) === '') return location;\n\t\n\t process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _parsePath2['default'](location);\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase + (searchBase ? '&' : '?') + queryString;\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t //warning(\n\t // !query,\n\t // 'the query argument to createPath is deprecated; use a location descriptor instead'\n\t //)\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t //warning(\n\t // !query,\n\t // 'the query argument to createHref is deprecated; use a location descriptor instead'\n\t //)\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation() {\n\t return addQuery(history.createLocation.apply(history, arguments));\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _parsePath2['default'](path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _parsePath2['default'](path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.46233192", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.46233192", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.46233192", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.46233192", "text": "function TQueries() { }", "title": "" }, { "docid": "24c9f372b844b3b64b14e0edf7638b18", "score": "0.4620512", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t false ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t false ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "24c9f372b844b3b64b14e0edf7638b18", "score": "0.4620512", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t false ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t false ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "bb32e5104ff85e788a787e8c1bd45a07", "score": "0.46137342", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\t\n\t var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);\n\t\n\t var history = createHistory(historyOptions);\n\t\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\t\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\t\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\t\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\t\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\t\n\t return location;\n\t }\n\t\n\t function appendQuery(location, query) {\n\t var _extends2;\n\t\n\t var queryString = undefined;\n\t if (!query || (queryString = stringifyQuery(query)) === '') return location;\n\t\n\t false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\t\n\t if (typeof location === 'string') location = _parsePath2['default'](location);\n\t\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\t\n\t var search = searchBase + (searchBase ? '&' : '?') + queryString;\n\t\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\t\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\t\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\t\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\t\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\t\n\t function createPath(location, query) {\n\t //warning(\n\t // !query,\n\t // 'the query argument to createPath is deprecated; use a location descriptor instead'\n\t //)\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createHref(location, query) {\n\t //warning(\n\t // !query,\n\t // 'the query argument to createHref is deprecated; use a location descriptor instead'\n\t //)\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\t\n\t function createLocation() {\n\t return addQuery(history.createLocation.apply(history, arguments));\n\t }\n\t\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _parsePath2['default'](path);\n\t\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _parsePath2['default'](path);\n\t\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\t\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "23f128a9f4dda6a97c3be0ed4cb0c337", "score": "0.46071178", "text": "function saveQuery() {\n // append file suffix\n var value = fileName();\n if(value.indexOf(\".\") === -1) {\n value += \".xq\";\n document.getElementById(\"file\").value = value;\n }\n if(queryExists() && !confirm(\"Overwrite existing query?\")) return;\n\n request(\"POST\", \"query-save?name=\" + encodeURIComponent(value),\n document.getElementById(\"editor\").value,\n function(req) {\n refreshDataList(req);\n setInfo(\"Query was saved.\");\n },\n function(req) {\n setErrorFromResponse(req);\n }\n )\n}", "title": "" }, { "docid": "23a961a1556b2b08f19a8b14fd4354e3", "score": "0.4605825", "text": "_slightReturn() {\n if (this.single.isReturning) {\n this.client.logger.warn(\n 'insert/update/delete returning is not supported by redshift dialect'\n );\n }\n }", "title": "" }, { "docid": "92eaf4640c9cb817c2803f63aa2e1fc7", "score": "0.4601925", "text": "function useQueries(createHistory) {\n\t return function () {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t var history = createHistory(options);\n\n\t var stringifyQuery = options.stringifyQuery;\n\t var parseQueryString = options.parseQueryString;\n\n\t if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n\t if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n\t function addQuery(location) {\n\t if (location.query == null) {\n\t var search = location.search;\n\n\t location.query = parseQueryString(search.substring(1));\n\t location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n\t }\n\n\t // TODO: Instead of all the book-keeping here, this should just strip the\n\t // stringified query from the search.\n\n\t return location;\n\t }\n\n\t function appendQuery(location, query) {\n\t var _extends2;\n\n\t var searchBaseSpec = location[SEARCH_BASE_KEY];\n\t var queryString = query ? stringifyQuery(query) : '';\n\t if (!searchBaseSpec && !queryString) {\n\t return location;\n\t }\n\n\t (undefined) !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n\t if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n\t var searchBase = undefined;\n\t if (searchBaseSpec && location.search === searchBaseSpec.search) {\n\t searchBase = searchBaseSpec.searchBase;\n\t } else {\n\t searchBase = location.search || '';\n\t }\n\n\t var search = searchBase;\n\t if (queryString) {\n\t search += (search ? '&' : '?') + queryString;\n\t }\n\n\t return _extends({}, location, (_extends2 = {\n\t search: search\n\t }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n\t }\n\n\t // Override all read methods with query-aware versions.\n\t function listenBefore(hook) {\n\t return history.listenBefore(function (location, callback) {\n\t _runTransitionHook2['default'](hook, addQuery(location), callback);\n\t });\n\t }\n\n\t function listen(listener) {\n\t return history.listen(function (location) {\n\t listener(addQuery(location));\n\t });\n\t }\n\n\t // Override all write methods with query-aware versions.\n\t function push(location) {\n\t history.push(appendQuery(location, location.query));\n\t }\n\n\t function replace(location) {\n\t history.replace(appendQuery(location, location.query));\n\t }\n\n\t function createPath(location, query) {\n\t (undefined) !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createPath(appendQuery(location, query || location.query));\n\t }\n\n\t function createHref(location, query) {\n\t (undefined) !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n\t return history.createHref(appendQuery(location, query || location.query));\n\t }\n\n\t function createLocation(location) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n\t if (location.query) {\n\t fullLocation.query = location.query;\n\t }\n\t return addQuery(fullLocation);\n\t }\n\n\t // deprecated\n\t function pushState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t push(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t // deprecated\n\t function replaceState(state, path, query) {\n\t if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n\t replace(_extends({ state: state }, path, { query: query }));\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t push: push,\n\t replace: replace,\n\t createPath: createPath,\n\t createHref: createHref,\n\t createLocation: createLocation,\n\n\t pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n\t replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n\t });\n\t };\n\t}", "title": "" }, { "docid": "e0afc6ca3ab910eaf9ace16becf873aa", "score": "0.45982227", "text": "function write(self) {\n return function (connection, command, callback) {\n // Get the raw buffer\n // Ensure we stop auth if pool was destroyed\n if (self.state === DESTROYED || self.state === DESTROYING) {\n return callback(new MongoError('pool destroyed'));\n }\n\n // Set the connection workItem callback\n connection.workItems.push({\n cb: callback,\n command: true,\n requestId: command.requestId\n });\n\n // Write the buffer out to the connection\n connection.write(command.toBin());\n };\n}", "title": "" }, { "docid": "351c80a663f7f110b096aee3665fc87e", "score": "0.458893", "text": "function doQuery(target, q){ \n\t\tsetValue(target, q); \n\t}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "ffec57d252fbf36c0645c5eeb1da48b3", "score": "0.4587999", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var queryString = query ? stringifyQuery(query) : '';\n if (!searchBaseSpec && !queryString) {\n return location;\n }\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _PathUtils.parsePath(location);\n\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase;\n if (queryString) {\n search += (search ? '&' : '?') + queryString;\n }\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;\n\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;\n\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));\n if (location.query) {\n fullLocation.query = location.query;\n }\n return addQuery(fullLocation);\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _PathUtils.parsePath(path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "db142eff66e8516e5d4661152f603cc3", "score": "0.45825773", "text": "function customLevelAdapter(db) {\n\n function CustomLevelPouch(opts, callback) {\n var _opts = assign({\n db: db\n }, opts);\n\n CoreLevelPouch.call(this, _opts, callback);\n }\n\n CustomLevelPouch.valid = function () {\n return true;\n };\n CustomLevelPouch.use_prefix = false;\n\n return function (PouchDB) {\n PouchDB.adapter('custom-leveldb', CustomLevelPouch, true);\n };\n}", "title": "" }, { "docid": "f4f34fe17481a66dc61ecf9b1d91d866", "score": "0.45815146", "text": "function doQuery(target, q){ \n\t\tsetValue(target, q, true); \n\t}", "title": "" }, { "docid": "7ea1c159c42078ab7e159da8eb182646", "score": "0.4580476", "text": "saveQueryInDatabase(query, value){\n\n this._idbPromise.then((db) => {\n\n if(!db) return;\n\n let transaction = db.transaction(databaseName, 'readwrite');\n let store = transaction.objectStore(databaseName);\n store.put({value:value, query:query});\n\n })\n }", "title": "" }, { "docid": "79bf7fdb98c439f51c46923e96aee331", "score": "0.4573889", "text": "upsertOneObject(className, schema, query, update) {\n return notImplemented();\n }", "title": "" }, { "docid": "3dc6211dd80315a0a11a1b6b173977b4", "score": "0.45621854", "text": "canWrite() {}", "title": "" }, { "docid": "fe0b3ebec05060655440057d579480da", "score": "0.45487118", "text": "queryUpdated() {\n this.emit('core.state.queryUpdated', this)\n }", "title": "" }, { "docid": "997759cf088eba41a6379204cee53f0b", "score": "0.4535624", "text": "query () {\n return new DSiteDBQuery(this)\n }", "title": "" }, { "docid": "cf7bdedfdf7a2866d6761edcc51874c9", "score": "0.45228508", "text": "function makeQuerySafe(query) {\n // Don't modify the query if the user explicitly sets _type already\n if (query.hasOwnProperty('_type')) return;\n // Deleted documents are kept around so that we can start their version from\n // the last version if they get recreated. When docs are deleted, their data\n // properties are cleared and _type is set to null. Filter out deleted docs\n // by requiring that _type is a string if the query does not naturally\n // restrict the results with other keys\n if (deletedDocCouldSatisfyQuery(query)) {\n query._type = {$type: 2};\n }\n}", "title": "" }, { "docid": "7cf738a9ce255ae9aae6df3e9e3ed13f", "score": "0.45141447", "text": "function doQuery(target, q) {\r\n\t\tsetValue(target, q, true);\r\n\t}", "title": "" }, { "docid": "44e9dd7b319c0d2a0d0b90c8ecc165e8", "score": "0.4509952", "text": "_updateOwnData(updateId: UpdateId, queryResult: OwnDataUpdateResult): void {\n _inTransaction(this._db, () => {\n this._nontransactionallyUpdateOwnData(updateId, queryResult);\n });\n }", "title": "" }, { "docid": "a8c86a7399a2cf1dafdc2d82caed805a", "score": "0.450697", "text": "_decorateQueryBuilder () {\n const self = this\n this.relatedQuery.wherePivot = function () {\n const args = _.toArray(arguments)\n args[0] = `${self.pivotCollection}.${args[0]}`\n this.where.apply(this, args)\n return this\n }\n }", "title": "" }, { "docid": "fbf30502a0229095b830555afb7704a7", "score": "0.45030355", "text": "ensureCanPerformWrites() {\n if (this.client && this.client.mode === 'read') {\n throw new utils_1.Exception('Updates and deletes cannot be performed in read mode');\n }\n }", "title": "" }, { "docid": "82f9398a520293510a726aa59dad8d0c", "score": "0.45027772", "text": "Io(t,e){const n=e?e.Ao:new ko(),s=e?e.Eo:this.Eo;let i=e?e.mutatedKeys:this.mutatedKeys,r=s,o=!1;// Track the last doc in a (full) limit. This is necessary, because some\n// update (a delete, or an update moving a doc past the old limit) might\n// mean there is some other document in the local cache that either should\n// come (1) between the old last limit doc and the new last document, in the\n// case of updates, or (2) after the new last document, in the case of\n// deletes. So we keep this doc at the old limit to compare the updates to.\n// Note that this should never get used in a refill (when previousChanges is\n// set), because there will only be adds -- no deletes or updates.\nconst a=de(this.query)&&s.size===this.query.limit?s.last():null,c=we(this.query)&&s.size===this.query.limit?s.first():null;// Drop documents out to meet limit/limitToLast requirement.\nif(t.inorderTraversal((t,e)=>{const u=s.get(t),h=Re(this.query,e)?e:null,l=!!u&&this.mutatedKeys.has(u.key),f=!!h&&(h.hasLocalMutations||// We only consider committed mutations for documents that were\n// mutated during the lifetime of the view.\nthis.mutatedKeys.has(h.key)&&h.hasCommittedMutations);let d=!1;// Calculate change\nif(u&&h){u.data.isEqual(h.data)?l!==f&&(n.track({type:3/* Metadata */,doc:h}),d=!0):this.Ro(u,h)||(n.track({type:2/* Modified */,doc:h}),d=!0,(a&&this.po(h,a)>0||c&&this.po(h,c)<0)&&(// This doc moved from inside the limit to outside the limit.\n// That means there may be some other doc in the local cache\n// that should be included instead.\no=!0));}else!u&&h?(n.track({type:0/* Added */,doc:h}),d=!0):u&&!h&&(n.track({type:1/* Removed */,doc:u}),d=!0,(a||c)&&(// A doc was removed from a full limit query. We'll need to\n// requery from the local cache to see if we know about some other\n// doc that should be in the results.\no=!0));d&&(h?(r=r.add(h),i=f?i.add(t):i.delete(t)):(r=r.delete(t),i=i.delete(t)));}),de(this.query)||we(this.query))for(;r.size>this.query.limit;){const t=de(this.query)?r.last():r.first();r=r.delete(t.key),i=i.delete(t.key),n.track({type:1/* Removed */,doc:t});}return{Eo:r,Ao:n,Ln:o,mutatedKeys:i};}", "title": "" }, { "docid": "a769cb9f195ff240c3009527f4656fd4", "score": "0.45015395", "text": "function updateAll(query, output, string) {\n \tif (query === null) {\n \t\treturn changeContent(null, output, string);\n \t} else {\n \t\tlet qValue = query.value;\n \t\treturn changeContent(qValue, output, string);\n \t}\n}", "title": "" }, { "docid": "c56ce0eaa6a731236eeb7af38f194776", "score": "0.45015126", "text": "documentSessionUpdated() {\n throw new Error('This method is abstract')\n }", "title": "" }, { "docid": "ff32567730d897709f3c149d326fff5f", "score": "0.44991678", "text": "constructor(/**\n * Set to an instance of DbUnknownDocument if the data for a document is\n * not known, but it is known that a document exists at the specified\n * version (e.g. it had a successful update applied to it)\n */t,/**\n * Set to an instance of a DbNoDocument if it is known that no document\n * exists.\n */e,/**\n * Set to an instance of a Document if there's a cached version of the\n * document.\n */n,/**\n * Documents that were written to the remote document store based on\n * a write acknowledgment are marked with `hasCommittedMutations`. These\n * documents are potentially inconsistent with the backend's copy and use\n * the write's commit version as their document version.\n */s,/**\n * When the document was read from the backend. Undefined for data written\n * prior to schema version 9.\n */i,/**\n * The path of the collection this document is part of. Undefined for data\n * written prior to schema version 9.\n */r){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=s,this.readTime=i,this.parentPath=r;}", "title": "" }, { "docid": "0da0e6b8b8e620a3356846bd33bdbb93", "score": "0.449257", "text": "function doQuery(target, q){\n\t\tsetValue(target, q);\n\t}", "title": "" }, { "docid": "73e0386fcbe1dbcb78186eabc8aeb613", "score": "0.44823128", "text": "function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);\n\n var history = createHistory(historyOptions);\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n function addQuery(location) {\n if (location.query == null) {\n var search = location.search;\n\n location.query = parseQueryString(search.substring(1));\n location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };\n }\n\n // TODO: Instead of all the book-keeping here, this should just strip the\n // stringified query from the search.\n\n return location;\n }\n\n function appendQuery(location, query) {\n var _extends2;\n\n var queryString = undefined;\n if (!query || (queryString = stringifyQuery(query)) === '') return location;\n\n process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;\n\n if (typeof location === 'string') location = _parsePath2['default'](location);\n\n var searchBaseSpec = location[SEARCH_BASE_KEY];\n var searchBase = undefined;\n if (searchBaseSpec && location.search === searchBaseSpec.search) {\n searchBase = searchBaseSpec.searchBase;\n } else {\n searchBase = location.search || '';\n }\n\n var search = searchBase + (searchBase ? '&' : '?') + queryString;\n\n return _extends({}, location, (_extends2 = {\n search: search\n }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));\n }\n\n // Override all read methods with query-aware versions.\n function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n _runTransitionHook2['default'](hook, addQuery(location), callback);\n });\n }\n\n function listen(listener) {\n return history.listen(function (location) {\n listener(addQuery(location));\n });\n }\n\n // Override all write methods with query-aware versions.\n function push(location) {\n history.push(appendQuery(location, location.query));\n }\n\n function replace(location) {\n history.replace(appendQuery(location, location.query));\n }\n\n function createPath(location, query) {\n //warning(\n // !query,\n // 'the query argument to createPath is deprecated; use a location descriptor instead'\n //)\n return history.createPath(appendQuery(location, query || location.query));\n }\n\n function createHref(location, query) {\n //warning(\n // !query,\n // 'the query argument to createHref is deprecated; use a location descriptor instead'\n //)\n return history.createHref(appendQuery(location, query || location.query));\n }\n\n function createLocation() {\n return addQuery(history.createLocation.apply(history, arguments));\n }\n\n // deprecated\n function pushState(state, path, query) {\n if (typeof path === 'string') path = _parsePath2['default'](path);\n\n push(_extends({ state: state }, path, { query: query }));\n }\n\n // deprecated\n function replaceState(state, path, query) {\n if (typeof path === 'string') path = _parsePath2['default'](path);\n\n replace(_extends({ state: state }, path, { query: query }));\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation,\n\n pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),\n replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')\n });\n };\n}", "title": "" }, { "docid": "5dea12eaa2a57fc1fcf24ee01020c532", "score": "0.44664577", "text": "function setSearchQuery(query) {\n return {\n type: types.SET_QUERY,\n data: query,\n };\n}", "title": "" }, { "docid": "c4c36ad51609b958dedc9c9b90bc0d5e", "score": "0.44631037", "text": "function TQuery() {}", "title": "" }, { "docid": "defc146c98a8e960c3dc78f4d01cdf89", "score": "0.4463065", "text": "function _writeToStorageInstance() {\n _writeToStorageInstance = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2(collection, writeRow) {\n var overwrite,\n toStorageInstance,\n writeResult,\n ret,\n _args2 = arguments;\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n overwrite = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : false;\n toStorageInstance = {\n previous: writeRow.previous ? _handleToStorageInstance(collection, (0, _util.flatClone)(writeRow.previous)) : undefined,\n document: _handleToStorageInstance(collection, (0, _util.flatClone)(writeRow.document))\n };\n\n case 2:\n if (!true) {\n _context2.next = 16;\n break;\n }\n\n _context2.prev = 3;\n _context2.next = 6;\n return collection.database.lockedRun(function () {\n return (0, _rxStorageHelper.writeSingle)(collection.storageInstance, toStorageInstance);\n });\n\n case 6:\n writeResult = _context2.sent;\n // on success, just return the result\n ret = _handleFromStorageInstance(collection, writeResult);\n return _context2.abrupt(\"return\", ret);\n\n case 11:\n _context2.prev = 11;\n _context2.t0 = _context2[\"catch\"](3);\n return _context2.delegateYield( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee() {\n var useErr, primary, singleRes;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n useErr = _context2.t0;\n primary = useErr.documentId;\n\n if (!(overwrite && useErr.status === 409)) {\n _context.next = 11;\n break;\n }\n\n _context.next = 5;\n return collection.database.lockedRun(function () {\n return (0, _rxStorageHelper.getSingleDocument)(collection.storageInstance, primary);\n });\n\n case 5:\n singleRes = _context.sent;\n\n if (singleRes) {\n _context.next = 8;\n break;\n }\n\n throw (0, _rxError.newRxError)('SNH', {\n args: {\n writeRow: writeRow\n }\n });\n\n case 8:\n toStorageInstance.previous = singleRes; // now we can retry\n\n _context.next = 16;\n break;\n\n case 11:\n if (!(useErr.status === 409)) {\n _context.next = 15;\n break;\n }\n\n throw (0, _rxError.newRxError)('COL19', {\n collection: collection.name,\n id: primary,\n pouchDbError: useErr,\n data: writeRow\n });\n\n case 15:\n throw useErr;\n\n case 16:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n })(), \"t1\", 14);\n\n case 14:\n _context2.next = 2;\n break;\n\n case 16:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[3, 11]]);\n }));\n return _writeToStorageInstance.apply(this, arguments);\n}", "title": "" }, { "docid": "f4615836c05cfc2aed8bf1081ffa2851", "score": "0.44606662", "text": "queryAll (query) {\n log('queryAll', query);\n }", "title": "" } ]
8a7782c01b1990c93c44f76b339cc7f6
Put all the words into the map Created using python
[ { "docid": "e8c7f4643cd97f0e88d752651a2edf41", "score": "0.576062", "text": "function initialize_map(map){\n\tmap.put(\"abandon\",\"放纵:constraint;放纵:unrestrainedly;放弃:withdraw;停止做某事:put an end to\");\n\tmap.put(\"abase\",\"降低(地位、职位、威望或尊严):lower\");\n\tmap.put(\"abash\",\"使尴尬,使羞愧:self-confidence,embarrass\");\n\tmap.put(\"abate\",\"减轻(程度或者强度):reduce,degree,intensity;减少(数量),降低(价值):reduce,amount,value\");\n\tmap.put(\"abbreviate\",\"v.缩写,缩短:briefer\");\n\tmap.put(\"abdicate\",\"v.正式放弃(权力、责任):throne\");\n\tmap.put(\"aberrant\",\"adj.异常的,非常规的:deviating\");\n\tmap.put(\"abet\",\"v.帮助,怂恿:assist or support;v.鼓励:encourage\");\n\tmap.put(\"abeyance\",\"n.终止,搁置:inactivity\");\n\tmap.put(\"abhor\",\"vt.深恶痛绝,极度厌恶:extreme repugnance\");\n\tmap.put(\"abiding\",\"永久的:enduring\");\n\tmap.put(\"abject\",\"adj.无精打采的:spiritless;adj.(地位、身份)悲惨、凄凉的:low state;adj.卑微的,讨好的:humble\");\n\tmap.put(\"abjure\",\"v.发誓放弃:rejecting,abandoning;v.抵制避免:resist\");\n\tmap.put(\"abnegate\",\"否认:deny,renounce;投降,放弃,交出(权力等):surrender,relinquish\");\n\tmap.put(\"abominate\",\"憎恶:abhor\");\n\tmap.put(\"aboveboard\",\"无欺诈的,光明正大的:free from,deceit or duplicity\");\n\tmap.put(\"abrade\",\"磨损,精神上的折磨:wear away, by friction\");\n\tmap.put(\"abridge\",\"缩短,缩小:shorten;在不改变本意的条件下删减词语,缩写:shorten\");\n\tmap.put(\"abrogate\",\"官方的正式废除:annul;无视(某事的)存在:nonexistent\");\n\tmap.put(\"abscond\",\"偷偷离开:depart secretly\");\n\tmap.put(\"absolute\",\"专制的:unconstrained; 无限的unqualified; 完美的,纯净不惨杂的:free from imperfection, mixture; 不容置疑的,确凿的:unquestionable\");\n\tmap.put(\"absolve\",\"使无罪,解除责任:free from, guilt, exculpate\");\n\tmap.put(\"abstain\",\"自我克制,主动戒绝:refrain, by one’s own choice\");\n\tmap.put(\"abstemious\",\"(吃喝等)有节制的,节俭的:restraint, food or alcohol, sparing\");\n\tmap.put(\"abstract\",\"做总结,概括:abstract, summarize; 使分心:away, attention\");\n\tmap.put(\"abstruse\",\"难以理解的:recondite\");\n\tmap.put(\"absurd\",\"不合理的:unreasonable\");\n\tmap.put(\"abundant\",\"大量的: great plenty\");\n\tmap.put(\"abuse\",\"辱骂,抨击:condemn or vilify; 不正当的或不合理使用的:wrong or improper use; 过分过量使用的:use excessively\");\n\tmap.put(\"abut\",\"邻接,毗邻:adjacent\");\n\tmap.put(\"abysmal\",\"极低的,极可怜的:immeasurably low; (程度)很深的,极端的:immeasurably great\");\n\tmap.put(\"accede\",\"赞成:approval, consent; 就任,就职:come into an office\");\n\tmap.put(\"accelerate\",\"加速:faster; 使提前发生:earlier; 变大,变多:greater\");\n\tmap.put(\"accessible\",\"可以达到的:within easy reach; 可以理解的:understood; 能够获得的:get\");\n\tmap.put(\"accessory\",\"辅助的,附属的:secondary, supplementary, subordinate; 帮凶:one, wrongdoing\");\n\tmap.put(\"accidental\",\"意外发生的,偶然的:unexpectedly; 附带的,不重要的:not being a vital part\");\n\tmap.put(\"acclimate\",\"使适应:to change (something) so as to make it suitable\");\n\tmap.put(\"accolade\",\"同意,赞赏:approval; 赞扬:praise\");\n\tmap.put(\"accommodate\",\"提供所需(例如服务、借贷、寄宿):provide; 改变以适应新情况、新场景:make, suitable;使和谐:free of conflicts\");\n\tmap.put(\"accost\",\"以挑衅的形式搭讪:challenging or aggressive way\");\n\tmap.put(\"accrete\",\"逐渐增长:grow, gradually\");\n\tmap.put(\"accumulate\",\"逐渐增长:increase gradually\");\n\tmap.put(\"acerbic\",\"(心情、心境或者语调)尖酸的:wit, cause hurt feelings\");\n\tmap.put(\"acme\",\"顶点,极点:highest; 最佳典范:most perfect type\");\n\tmap.put(\"acquiesce\",\"勉强同意;默许:accept, tacitly or passively\");\n\tmap.put(\"acrid\",\"辛辣的,刺鼻的:harsh, taste, odor; 刻薄的:wit, cause hurt feelings\");\n\tmap.put(\"acrimonious\",\"刻薄的,充满仇恨的:deep-seated resentment\");\n\tmap.put(\"acumen\",\"不同寻常的洞察力和鉴别力:exceptional discernment and judgment\");\n\tmap.put(\"acute\",\"敏锐的:keen discernment; 严重的,急性的:immediate attention; (程度、影响)极强的:extreme\");\n\tmap.put(\"adamant\",\"固执的,不可动摇的:unshakable, unyielding, inflexible\");\n\tmap.put(\"adapt\",\"修改,使(适应):modify\");\n\tmap.put(\"addict\",\"沉溺,上瘾:surrender, obsessively; 对某事上瘾的人:habitual liking\");\n\tmap.put(\"adhere\",\"依附,粘着:stick; 服从,遵守:according to the commands; 坚定地支持:steadfast support\");\n\tmap.put(\"adjourn\",\"延期,休会:suspend;\");\n\tmap.put(\"adjunct\",\"附属物,非必需部分:not essentially a part\");\n\tmap.put(\"ad-lib\",\"即兴的:without previous thought or preparation\");\n\tmap.put(\"admonish\",\"建议:give advice; 责备:reprove gently\");\n\tmap.put(\"adore\",\"喜爱,因···感到愉悦:pleasure; 宠爱:tenderness\");\n\tmap.put(\"adulate\",\"极度谄媚:praise too much\");\n\tmap.put(\"adulterate\",\"掺杂,加入低等成分:impure, addition\");\n\tmap.put(\"adumbrate\",\"部分地或有保留地揭露:disclose; 预示着:give a slight indication\");\n\tmap.put(\"adventitious\",\"外来的,后天的,非内在的:not inherent or innate\");\n\tmap.put(\"adversary\",\"敌手,对手:resists, enemy\");\n\tmap.put(\"advert\",\"引起注意,提到:refer\");\n\tmap.put(\"advocate\",\"支持,提倡:support\");\n\tmap.put(\"affable\",\"和蔼的,温和的:ease, friendliness\");\n\tmap.put(\"affinity\",\"喜欢,倾向:attraction\");\n\tmap.put(\"affluent\",\"富裕的:sufficient\");\n\tmap.put(\"aggrandize\",\"增加、提高(力量、财富、地位、声誉)等:enhance\");\n\tmap.put(\"aggravate\",\"加重,恶化:worse, serious, severe\");\n\tmap.put(\"aggregate\",\"集合体:units or parts, associated; 集合,聚焦:collect or gather\");\n\tmap.put(\"aggressive\",\"好斗的:attack; 强有力的,强烈的:forcefulness\");\n\tmap.put(\"aggrieve\",\"使苦恼,使悲痛:pain, trouble, distress\");\n\tmap.put(\"agitate\",\"煽动,激起:arouse; 使不安:trouble the mind, disturb\");\n\tmap.put(\"agog\",\"极度感兴趣的:urgent desire or interest\");\n\tmap.put(\"agonize\",\"(使)非常痛苦:deep sadness\");\n\tmap.put(\"airtight\",\"无瑕疵的:no, flaw; 密封的,不透气的:impermeable to air\");\n\tmap.put(\"alacrity\",\"反应迅速,乐意,欣然\");\n\tmap.put(\"alibi\",\"不在场的证明,托辞,借口:excuse\");\n\tmap.put(\"alienate\",\"疏远,离间:make unfriendly; 转移,变卖(财产或权利):convey or transfer\");\n\tmap.put(\"align\",\"使排成一行:line; 调准,校准:adjust\");\n\tmap.put(\"allay\",\"减轻:subdue, reduce, intensity or severity\");\n\tmap.put(\"allegiance\",\"忠诚:devotion or loyalty\");\n\tmap.put(\"alleviate\",\"缓和,减轻:relieve, lessen\");\n\tmap.put(\"allude\",\"间接提到:indirectly\");\n\tmap.put(\"allure\",\"吸引:attract or delight; 诱惑做(某事)lead, pleasure or advantage\");\n\tmap.put(\"ally\",\"盟友,支持者:association; 加入联盟:enter\");\n\tmap.put(\"aloft\",\"在空中:in flight\");\n\tmap.put(\"aloof\",\"孤高的,不合群的:distant\");\n\tmap.put(\"altruism\",\"利他主义:unselfish\");\n\tmap.put(\"amalgamate\",\"合并,混合:combine, unified, unite\");\n\tmap.put(\"ambiguous\",\"有多种理解方式的,不确定的:more than one, doubt, uncertain\");\n\tmap.put(\"amble\",\"漫步,闲逛:walk slowly, leisurely, stroll\");\n\tmap.put(\"ambrosial\",\"(食物)特别美味的,香的:extremely pleasing\");\n\tmap.put(\"ameliorate\",\"改善,改进:become better, improve\");\n\tmap.put(\"amenable\",\"顺从的,服从的:yield, submit\");\n\tmap.put(\"amenity\",\"(环境、设备等的)舒适,人性化:comfort; 融洽,和谐:pleasant, agreeable\");\n\tmap.put(\"amiable\",\"好脾气,友好易相处的:friendly\");\n\tmap.put(\"amicable\",\"友善的:friendly, amiable\");\n\tmap.put(\"amity\",\"友好关系,亲善和睦:friendship, friendly\");\n\tmap.put(\"amorphous\",\"无固定形状的:definite, shapeless; 不可归类的:unclassifiable\");\n\tmap.put(\"analgesic\",\"镇痛剂:medication, reduce, eliminates pain\");\n\tmap.put(\"anarchist\",\"反抗权威的人:rebels against any authority\");\n\tmap.put(\"anathema\",\"诅咒:curse\");\n\tmap.put(\"ancillary\",\"次要的:secondary importance;辅助的,补充的:auxiliary, supplementary\");\n\tmap.put(\"anecdote\",\"短小有趣的故事:short narrative, interesting, amusing\");\n\tmap.put(\"anemic\",\"缺乏力量、活力、精神的:lacking force\");\n\tmap.put(\"anesthetic\",\"止痛剂:relieves pain; 无感觉的,麻木的:lacking awareness or sensitivity\");\n\tmap.put(\"animate\",\"活的:有活力的:life; 使有活力,支持:high-spirited energy; 使行动,驱使:action; 使活灵活现,使栩栩如生:lifelike movement\");\n\tmap.put(\"animus\",\"敌意:spiteful, malevolent, enmity\");\n\tmap.put(\"annoy\",\"不断烦扰:disturb, repeated\");\n\tmap.put(\"annul\",\"宣告无效,取消:legally invalid; 抵消:balance, ineffective\");\n\tmap.put(\"anomalous\",\"不普通的,不平常的:out, ordinary; 反常的,不正常的:departing\");\n\tmap.put(\"anonymous\",\"匿名的:not named, identified; 无特色的:lacking individuality\");\n\tmap.put(\"antagonize\",\"与...敌对,反对:opposition, counteract; 激怒:incur, provoke, hostility\");\n\tmap.put(\"antediluvian\",\"非常古老的,过时的:extremely old, antiquated; 保守的人:old-fashioned\");\n\tmap.put(\"anterior\",\"前面的:before\");\n\tmap.put(\"antic\",\"滑稽可笑的:clownish\");\n\tmap.put(\"apathy\",\"冷漠,缺乏情感:lack, feeling, emotion; 缺乏兴趣,不关心:lack, interest, concern\");\n\tmap.put(\"aphorism\",\"格言,警句:short witty\");\n\tmap.put(\"apocalyptic\",\"预言的,启示的:prophetic; 重要的,转折点的:major turning\");\n\tmap.put(\"apocryphal\",\"假的:doubtful authenticity, spurious\");\n\tmap.put(\"apoplectic\",\"极度愤怒的:extremely angry, furious\");\n\tmap.put(\"apostasy\",\"放弃宗教信仰:renunciation, faith; 变节,背叛:abandonment, previous loyalty\");\n\tmap.put(\"appall\",\"使惊恐:consternation\");\n\tmap.put(\"appeal\",\"申请:application; 起诉:charge, crime, accuse\");\n\tmap.put(\"appealing\",\"吸引人的:attractive, inviting\");\n\tmap.put(\"applause\",\"鼓掌,认可:approval\");\n\tmap.put(\"apposite\",\"相关的,合适的:pertinent, appropriate\");\n\tmap.put(\"appreciable\",\"可感知的,明显的:perceptible\");\n\tmap.put(\"apprehension\",\"忧虑,恐惧:suspicion, fear; 逮捕:arrestment; 理解:understand\");\n\tmap.put(\"apprise\",\"通知,告知:inform\");\n\tmap.put(\"approbation\",\"同意:approval\");\n\tmap.put(\"appropriate\",\"私自挪用:take possession, without permission; 适当的:suitable, fitting\");\n\tmap.put(\"apropos\",\"相关的:relevant; 关于,有关:having to do with\");\n\tmap.put(\"apt\",\"恰当的,合适的:suitable, appropriate; 有倾向的,可能的:tendency, likely; 聪明的:intelligent, responsive\");\n\tmap.put(\"archaic\",\"过时的,久远的:no, current, antiquated\");\n\tmap.put(\"archetype\",\"典范,榜样:ideal; 先驱,鼻祖:earlier; 原型:copies\");\n\tmap.put(\"ardor\",\"狂热:strong enthusiasm, devotion, zeal\");\n\tmap.put(\"arduous\",\"难以做到的,费劲的:difficult\");\n\tmap.put(\"argot\",\"隐语,黑话,行话:specialized, particular\");\n\tmap.put(\"arrest\",\"使不活跃:inactive; 停止:stopping, standstill; 逮捕:keep; 吸引(某人)注意力:hold, attention\");\n\tmap.put(\"arresting\",\"吸引人的:attracting, striking\");\n\tmap.put(\"arrhythmic\",\"不规律的:lacking, regularity\");\n\tmap.put(\"arrogance\",\"傲慢,自大:overbearing pride\");\n\tmap.put(\"articulate\",\"清晰地表达:clearly, distinctly; 表达清晰的:able, express, clearly\");\n\tmap.put(\"ascendant\",\"有影响力的,主宰的:dominant, influence, superior; 上升的:upward, rising\");\n\tmap.put(\"ascetic\",\"苦行的,克己的,禁欲的:self-denial; 禁欲者:person, self-discipline\");\n\tmap.put(\"aseptic\",\"消毒的,无菌的:preventing infection; 缺乏活力的:lacking vitality; 冷漠的:lacking emotion\");\n\tmap.put(\"askew\",\"不成直线的(地),歪的(地):awry\");\n\tmap.put(\"aspect\",\"外表,容貌:appearance\");\n\tmap.put(\"asperity\",\"(举止、性情)粗暴:roughness; (环境)艰苦:rigor, severity\");\n\tmap.put(\"aspersion\",\"诽谤,中伤:harm, reputation\");\n\tmap.put(\"aspirant\",\"有抱负者,有野心者:aspires; 想成为···的:seeking\");\n\tmap.put(\"assent\",\"同意:agree\");\n\tmap.put(\"assert\",\"断言,肯定地说出:declare, forcefully, aggressively\");\n\tmap.put(\"assertive\",\"自信的:bold, assertion, self-assured\");\n\tmap.put(\"assess\",\"评估(重要性、尺寸、价值等):determine; 征收费用(如罚款):charge, penalty\");\n\tmap.put(\"assiduous\",\"勤勉的,专心仔细的:careful\");\n\tmap.put(\"assuage\",\"缓和,减轻:lessen, intensity; 平息,抚慰:pacify, calm; 使满足:satisfying\");\n\tmap.put(\"astounding\",\"令人吃惊的,出乎意料的:astonishment, amazement\");\n\tmap.put(\"astute\",\"机敏的,有洞察力的:shrewdness, perspicacity\");\n\tmap.put(\"asunder\",\"分离成多部分或多片地:separate parts, pieces; 分离地:apart\");\n\tmap.put(\"asylum\",\"收容所,保护所:refuge, protection\");\n\tmap.put(\"asymmetrical\",\"不平衡的,不对称的:no balance, symmetry\");\n\tmap.put(\"atone\",\"赎罪,弥补:amends\");\n\tmap.put(\"atrocious\",\"极坏的,极其残忍的:extremely wicked; 让人极为不满的:extremely unsatisfactory\");\n\tmap.put(\"attenuate\",\"降低(数量、力量、价值):lessen\");\n\tmap.put(\"audacious\",\"大胆的,(但往往)愚勇的:fearlessly, recklessly; 蔑视(法律、礼节)的,无礼的:contemptuous of law; 乐于冒险的:take risks; 大胆创新的:verve\");\n\tmap.put(\"augur\",\"预言家:predicts; 出现好兆头:signs of, successful outcome; 预言:tell, beforehand\");\n\tmap.put(\"authentic\",\"真实的,非仿造的:exactly; 准确的,相符的:original\");\n\tmap.put(\"authority\",\"(某领域的)权威人士:a high level of knowledge; 管辖权,控制:lawful control; 影响力:power to direct; (管束他人的)权力:right, control others; 根据,理由:warrant\");\n\tmap.put(\"autocracy\",\"独裁政府:government, unlimited power\");\n\tmap.put(\"autonomy\",\"政治上的独立:self-governing; 自我主导的自由,(尤其是)精神独立:independence\");\n\tmap.put(\"avarice\",\"贪财,贪婪:insatiable\");\n\tmap.put(\"aver\",\"声称为真:state, forcefully; (态度强硬而明确地)声明:state clearly\");\n\tmap.put(\"aversion\",\"非常讨厌,极厌恶:dislike; 令人厌恶的事物:someone that is hated\");\n\tmap.put(\"avid\",\"急切渴望的:enthusiasm; 贪婪(钱财)的:eager, for material possessions\");\n\tmap.put(\"awash\",\"被淹没的:by water; (如洪水般)泛滥的:filled, covered, overrun\");\n\tmap.put(\"awe\",\"敬畏:dread, veneration, wonder\");\n\tmap.put(\"awkward\",\"缺乏灵活性和技巧的:lacking dexterity; (处理问题)缺乏手段和智谋的:a lack of skill and tact; 臃肿笨拙的,不优雅的:lacking ease; 令人尴尬的:embarrassment; (因过大或过重设计问题)难以操作的:difficult to use\");\n\tmap.put(\"awning\",\"雨篷,遮阳篷:shelter\");\n\tmap.put(\"awry\",\"弯曲的,扭曲的:turned, twisted; 走样的(地),出差错的(地):off, course\");\n\tmap.put(\"axiomatic\",\"公理的:axiom; 不言自明的:self-evident\");\n\tmap.put(\"babble\",\"发出含糊无意义的嘟囔声,胡乱说:utter, meaningless; 闲聊:rambling conversation\");\n\tmap.put(\"backhanded\",\"间接的,含沙射影的,虚情假意的:indirect\");\n\tmap.put(\"badger\",\"不断纠缠或骚扰:harass, persistently\");\n\tmap.put(\"badinage\",\"打趣,善意的玩笑:banter\");\n\tmap.put(\"bait\",\"逗弄,激怒:persecute, exasperate; 引诱:lead away; 诱饵:something, luring\");\n\tmap.put(\"bale\",\"痛苦,悲哀:sorrow\");\n\tmap.put(\"baleful\",\"有害的:harmful; 凶兆的,凶恶的:evil; 致命的:causing death\");\n\tmap.put(\"balk\",\"阻碍:check, obstacle; 不愿接受,拒绝:unwillingness\");\n\tmap.put(\"balky\",\"不服管束的,倔强的:refusing\");\n\tmap.put(\"ballad\",\"(由简单诗节和叠句组成的)民歌:poem\");\n\tmap.put(\"balloon\",\"迅速增加:increase\");\n\tmap.put(\"balm\",\"香油,止痛膏,安慰物:sweet-smelling oil, soothe; 香气:pleasant smell\");\n\tmap.put(\"banal\",\"非原创的,陈腐的:trite\");\n\tmap.put(\"bane\",\"祸根:ruin; 有害物质:kill or injure a living thing\");\n\tmap.put(\"banish\",\"驱逐出境:leave, country; 赶出:force out\");\n\tmap.put(\"banter\",\"幽默、打趣的(地)谈话:humored\");\n\tmap.put(\"barb\",\"尖锐而严厉的批评:critical\");\n\tmap.put(\"barbarous\",\"野蛮的,凶残的:mercilessly; 未开化的:uncivilized\");\n\tmap.put(\"barefaced\",\"公然的,厚颜无耻的:brazen\");\n\tmap.put(\"bargain\",\"协议:agreement; 讨价还价:negotiate\");\n\tmap.put(\"baroque\",\"装饰华丽的,过分雕琢的,复杂的:extravagance, complexity, flamboyance; (程度上)过分的:beyond, limit\");\n\tmap.put(\"barrage\",\"弹幕:curtain; 有压倒之势的、集中倾泻的(如言语):overwhelming, outpouring; (同时)袭来:attack with, overwhelming outpouring\");\n\tmap.put(\"barren\",\"不育的:incapable, producing; 不产生结果的,无效的:no results; 贫瘠的:deficient; 极度匮乏的:lacking\");\n\tmap.put(\"barricade\",\"障碍物:obstruction, rampart; 用障碍物阻止通过:prevent access\");\n\tmap.put(\"barter\",\"以物换物:trade, without\");\n\tmap.put(\"batch\",\"一批次的量:unit; 一小群人:small number of persons\");\n\tmap.put(\"bathetic\",\"平凡的,陈腐的:commonplaceness\");\n\tmap.put(\"bawdy\",\"下流的,猥亵的:indecent\");\n\tmap.put(\"bedeck\",\"装饰,点缀:make more attractive\");\n\tmap.put(\"belabor\",\"(当众)严厉批评:criticize; 就···作过度的说明,喋喋不休:explain, excessively\");\n\tmap.put(\"beleaguer\",\"包围,围攻:to surround; 使困扰,使烦恼,使消沉:trouble\");\n\tmap.put(\"belie\",\"错误的描述,误述:picture falsely; 证明···为假:false, wrong; 掩饰:shut off from view; 与···相对立,与···相矛盾:counter\");\n\tmap.put(\"bellwether\",\"领导者,带头人:lead\");\n\tmap.put(\"beneficent\",\"仁慈的,好慈善的:charity; (对个人或社会)有益的:contributing\");\n\tmap.put(\"benign\",\"好心的,仁慈的:kindness, gentleness; 无害的:not causing\");\n\tmap.put(\"berate\",\"(长时间)严厉指责:scold, vehemently, at length\");\n\tmap.put(\"beseech\",\"(急切地)恳求:beg\");\n\tmap.put(\"besmirch\",\"弄脏,弄污:make dirty; 诽谤,玷污:detract from the honor\");\n\tmap.put(\"bifurcate\",\"(使)分成两支:two branches\");\n\tmap.put(\"bigot\",\"固执己见者,有偏见的人:obstinately devoted\");\n\tmap.put(\"bland\",\"味道平淡的,不刺激的:soothing; 无趣的:dull; 温和的,和蔼的:not harsh\");\n\tmap.put(\"blandishment\",\"甜言蜜语,讨某人好话:coax, cajole\");\n\tmap.put(\"blasé\",\"(过度放纵之后)厌倦享乐的,腻厌的:apathetic\");\n\tmap.put(\"blast\",\"爆炸:explosion; 一阵猛烈的强风:gust; 巨响:loud, sound; 炸裂,爆破:cause to break open;斥责,抨击:criticize harshly\");\n\tmap.put(\"blatant\",\"大声喧哗的:noisy; (让人生厌地)惹人注目的:noticeable\");\n\tmap.put(\"blazon\",\"使知名:make known openly; 修饰,装扮:make more attractive\");\n\tmap.put(\"blemish\",\"缺点,污点:imperfection; 损害,玷污:reduce\");\n\tmap.put(\"blight\",\"(使)枯萎:affect; 损害:impair\");\n\tmap.put(\"bliss\",\"极度快乐:ecstasy; 极乐世界:place of perfect happiness\");\n\tmap.put(\"blithe\",\"愉快高兴的:happy lighthearted; 无忧无虑的,漫不经心的:freedom from worries\");\n\tmap.put(\"blueprint\",\"蓝图,详细计划:architects’ plans; 事先计划:work out, in advance\");\n\tmap.put(\"blunder\",\"过失:error, mistake; 在···方面犯了很愚蠢且通常很严重的错误,糟蹋:make a stupid, error; 蹒跚:unsteadily\");\n\tmap.put(\"blunt\",\"使变钝:less sharp; 减弱(力度等):weaken in strength or feeling; 直率的:direct, brief\");\n\tmap.put(\"blur\",\"(使)变得朦胧,(使)变得不清楚:vague; 使不易理解:unclear to the understanding\");\n\tmap.put(\"blurt\",\"突然说出,冲动地说:abruptly\");\n\tmap.put(\"bluster\",\"狂妄自大地大声说:loudly arrogant; 大声吹嘘,恐吓:loudly; 喧闹的状态:noisy\");\n\tmap.put(\"boggle\",\"(因为怀疑、恐惧)犹豫:hesitate; 笨拙地做:unskillful way\");\n\tmap.put(\"boisterous\",\"喧嚷的,吵闹的:noisily\");\n\tmap.put(\"bolster\",\"支撑(物):provide support;鼓励、使有精力:boost\");\n\tmap.put(\"bombast\",\"夸大的言辞:pompous\");\n\tmap.put(\"bonhomie\",\"温和,和蔼:geniality\");\n\tmap.put(\"boo\",\"嘘(以表示不满或嘲笑):contempt, scorn, disapproval\");\n\tmap.put(\"boon\",\"恩惠,福利:benefit; 喜欢集体活动的:enjoy the company of others\");\n\tmap.put(\"boor\",\"粗鲁的人,不敏感的人:rude\");\n\tmap.put(\"bootless\",\"无用的:useless\");\n\tmap.put(\"bound\",\"界限:beyond which a person or thing cannot go; 给···设置界限:set limits; 投入的,坚定的:fully committed\");\n\tmap.put(\"boycott\",\"联合抵制,拒绝参与:concerted refusal\");\n\tmap.put(\"bracing\",\"令人振奋的,给人带来活力的:giving strength\");\n\tmap.put(\"brake\",\"刹车:less rapid\");\n\tmap.put(\"brash\",\"愚勇的,鲁莽的:foolishly adventurous; 缺乏判断力的,不明智的:poor judgment\");\n\tmap.put(\"brassy\",\"厚脸皮的,不知羞耻的:rude boldness; 华而不实地炫耀:showy\");\n\tmap.put(\"bravado\",\"假装勇敢:pretense; 虚张声势:swaggering\");\n\tmap.put(\"bravura\",\"优秀演技(的):brilliant\");\n\tmap.put(\"brazen\",\"蛮横大胆的,厚颜无耻的:contemptuous boldness; 大胆自信地去面对或从事:bold self-assurance\");\n\tmap.put(\"breach\",\"(对伦理、法律准则的)破坏:breaking, moral or legal code; 违背:fail to keep\");\n\tmap.put(\"brevity\",\"简短,简洁:shortness; 精炼:few words\");\n\tmap.put(\"bribe\",\"贿赂,收买:give, money\");\n\tmap.put(\"bridle\",\"限制\");\n\tmap.put(\"brisk\",\"充满生机的,有活力的:activity; (言辞或方式)尖刻辛辣的,刻薄的:keen or sharp\");\n\tmap.put(\"bristle\",\"怒不可遏,咆哮:anger; 供应充足,充满:copiously\");\n\tmap.put(\"brittle\",\"易碎的,脆弱的,易坏的:broken; 不热心的,不真心的:lacking in friendliness\");\n\tmap.put(\"broach\",\"开启,启封:open; 提出讨论:present\");\n\tmap.put(\"bromide\",\"陈词滥调:hackneyed\");\n\tmap.put(\"brook\",\"忍受,容许:tolerate; 小溪流:creek\");\n\tmap.put(\"browbeat\",\"恐吓:intimidate\");\n\tmap.put(\"bruit\",\"(未经证实地)散播(消息):make, the subject of common talk\");\n\tmap.put(\"buck\",\"阻止,反对:refuse assent; 转移,交接:shift possession\");\n\tmap.put(\"budge\",\"(使)改变立场或态度:alter a position; 停止抵抗,屈服:cease resistance\");\n\tmap.put(\"bulge\",\"凸起:protuberant; 比赛中的优势地位:more favorable condition; 暴涨,突增,在数目或数量上突然而且是临时性的增加:sudden, usually temporary increase; 充满:copiously supplied\");\n\tmap.put(\"bully\",\"欺凌弱小者:intimidating manner; 最好的,最棒的:best\");\n\tmap.put(\"bumptious\",\"专横傲慢的,自以为是的:superiority\");\n\tmap.put(\"bungle\",\"办遭,失败:work clumsily\");\n\tmap.put(\"buoy\",\"使充满勇气和力量,使振作:courage or strength\");\n\tmap.put(\"buoyant\",\"有浮力的:floating; 心情好的:good mood or disposition\");\n\tmap.put(\"burgeon\",\"迅速成长扩大,蓬勃发展:grow, rapidly, flourish\");\n\tmap.put(\"burlesque\",\"夸张滑稽地模仿以嘲弄他人的文学艺术作品,恶搞:make fun of\");\n\tmap.put(\"burnish\",\"擦亮,磨光:make smooth or glossy\");\n\tmap.put(\"buttress\",\"扶墙:supporting, wall building; 为···提供支撑的证据或者信息:provide evidence or information for\");\n\tmap.put(\"byzantine\",\"错综复杂的:complicated, secretive, interrelated\");\n\tmap.put(\"cache\",\"囤货,藏货:supply; 隐藏:hiding\");\n\tmap.put(\"cachet\",\"同意:approval; 声望:prestige\");\n\tmap.put(\"cacophony\",\"刺耳的声音:inharmonious sound\");\n\tmap.put(\"cadge\",\"乞讨,乞求:beg\");\n\tmap.put(\"cajole\",\"哄骗:wheedle\");\n\tmap.put(\"calcify\",\"使僵化:inflexible, unchangeable\");\n\tmap.put(\"calibrate\",\"调整,使标准化:standardize; (根据标准)精确测量:measure precisely\");\n\tmap.put(\"calligraphy\",\"(优美的)书法:elegant handwriting\");\n\tmap.put(\"callous\",\"无同情心的,冷漠的:unfeeling\");\n\tmap.put(\"callow\",\"不老练的,不成熟的:lacking, experience\");\n\tmap.put(\"calumniate\",\"诽谤,造谣,中伤:false statements\");\n\tmap.put(\"camaraderie\",\"友情:friendly\");\n\tmap.put(\"cameo\",\"栩栩如生的描绘,简洁生动的描述或刻画:brief, vivid portrayal; 客串:brief but dramatic appearance\");\n\tmap.put(\"camouflage\",\"伪装,伪装手段:deceive, hide\");\n\tmap.put(\"canard\",\"谣传,误传:misleading\");\n\tmap.put(\"candor\",\"坦率,直率,诚挚:honest, sincere\");\n\tmap.put(\"canon\",\"准则,标准:standard, criterion; 真经,正典:authentic\");\n\tmap.put(\"canvass\",\"仔细检查,详尽讨论:examine carefully or discuss thoroughly; 游说,去(一个地区)的各处或找到(个人)来拉选票或订单:solicits votes or orders\");\n\tmap.put(\"capitulate\",\"投降,默许:give all resistance\");\n\tmap.put(\"caprice\",\"一时冲动的决定:impulsive change; 反复无常,善变:change, impulsively\");\n\tmap.put(\"captivate\",\"吸引:attract\");\n\tmap.put(\"careworn\",\"忧心忡忡的,焦虑的:grief, anxiety\");\n\tmap.put(\"cardinal\",\"主要的,非常重要的:foremost importance, paramount\");\n\tmap.put(\"caricature\",\"用讽刺歪曲等手法的夸张,漫画,讽刺画:exaggeration; 嘲笑性模仿或夸张:copy, exaggerate\");\n\tmap.put(\"carnal\",\"肉体的,物质的:physical; 世俗的:worldly\");\n\tmap.put(\"carouse\",\"畅饮,狂欢作乐:drink, freely\");\n\tmap.put(\"carp\",\"对小事吹毛求疵,挑剔,表现不满:peevish criticism, objections, express dissatisfaction, tiresomely\");\n\tmap.put(\"carve\",\"雕刻:three-dimensional representation; (通过长期不懈努力)开创,开拓:produce or bring about\");\n\tmap.put(\"cast\",\"演员,演员阵容:a set of characters; 选派(演员):assign, actor; 提出:give off; 抛弃:get rid of\");\n\tmap.put(\"castigate\",\"强烈(公开)指责:criticize; 惩罚:penalty\");\n\tmap.put(\"catalyze\",\"成为···的导火索,导致:be the cause of\");\n\tmap.put(\"catastrophe\",\"大灾难:tragedy; 彻底的失败:utter failure\");\n\tmap.put(\"categorical\",\"没有例外的,无条件限制的,绝对的:without, qualification, absolute\");\n\tmap.put(\"catholic\",\"普遍的,包容的:not limited or specialized\");\n\tmap.put(\"caustic\",\"腐蚀性的:destroying, eating away; 挖苦讽刺的,刻薄的:incisive sarcasm\");\n\tmap.put(\"caveat\",\"警告,告诫:warning of a specific limitation\");\n\tmap.put(\"cavil\",\"挑剔,吹毛求疵:quibble\");\n\tmap.put(\"cavort\",\"欢快地蹦跳或行走,雀跃:sprightly\");\n\tmap.put(\"cede\",\"(根据条约)放弃,割让:surrender possession of\");\n\tmap.put(\"cement\",\"粘合,粘合剂:uniting, binding\");\n\tmap.put(\"censor\",\"审查并删除不良的东西:examine, delete\");\n\tmap.put(\"censorious\",\"挑剔指责的:critical\");\n\tmap.put(\"censure\",\"公开表示反对,谴责:public, formal disapproval\");\n\tmap.put(\"census\",\"人口普查:survey, population\");\n\tmap.put(\"cessation\",\"终止,暂停:stopping of a process\");\n\tmap.put(\"chaff\",\"开玩笑:make jokes\");\n\tmap.put(\"chagrin\",\"沮丧,懊恼:mind\");\n\tmap.put(\"chameleon\",\"变色龙,善变的人:changes or adopts opinions\");\n\tmap.put(\"champion\",\"支持:support\");\n\tmap.put(\"chaos\",\"混乱:disorder, confusion\");\n\tmap.put(\"charade\",\"装模作样:intended to deceive; 动作字谜:represented in pantomime\");\n\tmap.put(\"charlatan\",\"骗子,装懂的人:fraudulent\");\n\tmap.put(\"chary\",\"非常谨慎的:cautious\");\n\tmap.put(\"chase\",\"镂雕(金属)以装饰:decorate; 驱赶:force out\");\n\tmap.put(\"chasm\",\"分歧,(意见、利益或忠诚上)明显差异:pronounced difference\");\n\tmap.put(\"chauvinistic\",\"盲目爱国的:excessive favoritism\");\n\tmap.put(\"check\",\"使突然停止,阻止:arrest, abruptly; 同意,一致:agreement\");\n\tmap.put(\"cherubic\",\"天使般可爱的:rosy\");\n\tmap.put(\"chicanery\",\"诡计多端的,欺骗:deception\");\n\tmap.put(\"chide\",\"责备:scold mildly\");\n\tmap.put(\"choleric\",\"易怒的,暴躁的:angered; 生气的:anger, irate\");\n\tmap.put(\"chord\",\"与···和谐一致,符合:accord, agree\");\n\tmap.put(\"chromatic\",\"彩色的:colors\");\n\tmap.put(\"chronic\",\"经常发生的,复发的:frequent recurrence;习惯性的,不可能改变的:not likely, change\");\n\tmap.put(\"churl\",\"粗野的人:rude, boorish; 吝啬鬼:mean, stingy\");\n\tmap.put(\"cipher\",\"无影响或无价值的人:no importance, influence; 计算(价值):determine, mathematical operations; 密码:conceal\");\n\tmap.put(\"circuitous\",\"迂回的,不直接的:not, forthright, direct; 冗长的:more, necessary\");\n\tmap.put(\"circumlocution\",\"绕圈子说话:unnecessarily, indirect, evasion; 冗长:too many\");\n\tmap.put(\"circumscribe\",\"限制:limit; 包围,围绕:surround\");\n\tmap.put(\"circumspect\",\"谨慎的,小心的:careful\");\n\tmap.put(\"circumvent\",\"躲避,不遵从:avoid, comply\");\n\tmap.put(\"civility\",\"彬彬有礼:courteous, politeness\");\n\tmap.put(\"claim\",\"要求(权利):ask for, right; 断言:state as a fact; 剥夺生命:deprive, life; 权利:right\");\n\tmap.put(\"clandestine\",\"隐藏的,秘密的:secret, illicit, improper\");\n\tmap.put(\"clarion\",\"清楚响亮的:loud, clear\");\n\tmap.put(\"clarity\",\"清晰,清楚:clear, lucidity; 清澈透明:easily seen through\");\n\tmap.put(\"clasp\",\"紧握:holding\");\n\tmap.put(\"clement\",\"宽容的,善良的:tolerant, kind; 气候温和的:neither, high, low\");\n\tmap.put(\"cliché\",\"陈词滥调(的):hackneyed\");\n\tmap.put(\"clog\",\"阻碍物:something, movement, progress difficult; 阻碍:difficulty; 堵塞:prevent, through\");\n\tmap.put(\"clot\",\"密集的一群:a number of things, a unit; 堵塞:prevent, through, filling with something; 凝结:jelly\");\n\tmap.put(\"cloudburst\",\"突然的一场暴雨:sudden copious rainfall\");\n\tmap.put(\"clout\",\"权力,影响力:influence\");\n\tmap.put(\"cloying\",\"甜得发腻的,感情用事的:sweet, sentimental\");\n\tmap.put(\"clumsy\",\"笨拙的:lacking, nimbleness, lack, skill; 不文雅的:lacking, grace, inability, graceful; 不精致的:roughly\");\n\tmap.put(\"coagulate\",\"(使)凝结,(使)变稠:coherent, clot\");\n\tmap.put(\"coalesce\",\"合并,融合:whole, fuse\");\n\tmap.put(\"coax\",\"哄骗:pleading, flattery, cajole\");\n\tmap.put(\"coda\",\"终曲:concluding passage\");\n\tmap.put(\"coerce\",\"(以武力)强制:force, threat\");\n\tmap.put(\"coeval\",\"同时代的,同龄的:equal age\");\n\tmap.put(\"cogent\",\"令人信服的:convincing; 相关的:pertinent\");\n\tmap.put(\"cognizant\",\"知道的,意识到的:aware\");\n\tmap.put(\"collapse\",\"突然倒塌或收缩:fall, shrink; 完全耗尽体力:depletion, energy, strength; 失败:unsuccessful\");\n\tmap.put(\"collude\",\"串通,共谋(做坏事):together secretly, fraudulent, deceitful, conspire\");\n\tmap.put(\"colossal\",\"巨大的:size, degree, immense\");\n\tmap.put(\"coltish\",\"不守纪律的:not subjected, discipline; 爱开玩笑的:joking, teasing\");\n\tmap.put(\"coma\",\"昏迷,深度无知觉:profound unconsciousness; 迟钝,冷漠:sluggishness\");\n\tmap.put(\"combustible\",\"可燃的:igniting; 容易激动的:easily excited\");\n\tmap.put(\"comely\",\"漂亮的,吸引人的:pleasing, wholesome, attractive\");\n\tmap.put(\"comity\",\"友好,社会和谐:friendly, harmony\");\n\tmap.put(\"commencement\",\"开始:beginning; 毕业典礼:conferring\");\n\tmap.put(\"commend\",\"赞扬:approbation, praise; 委托保管:entrust; 推荐:recommend\");\n\tmap.put(\"commensurate\",\"同样大小的:equal; 相称的,相当的:proportionate\");\n\tmap.put(\"commingle\",\"充分混合:blend\");\n\tmap.put(\"commitment\",\"致力,投入:obligated, impelled; 确信:belief; 承诺,表态:revealing one’s view\");\n\tmap.put(\"committed\",\"忠诚的,忠实的:loyal\");\n\tmap.put(\"commodious\",\"宽敞舒适的:spacious\");\n\tmap.put(\"commonsensical\",\"符合常识的,有依据的:common sense, sound\");\n\tmap.put(\"commotion\",\"骚乱:disturbance\");\n\tmap.put(\"compendium\",\"摘要:summary, abstract; 目录,各种各样的列表或集合:list, collection\");\n\tmap.put(\"complacency\",\"自满,无忧患意识:self-satisfaction, unawareness of trouble\");\n\tmap.put(\"complaisance\",\"愿意顺从,讨好,彬彬有礼:comply, affability\");\n\tmap.put(\"compliant\",\"顺从的:submissive\");\n\tmap.put(\"compliment\",\"称赞,恭维:praise; 敬意,免费赠送的礼物:respectful\");\n\tmap.put(\"comply\",\"遵从:conform, submit\");\n\tmap.put(\"compose\",\"使镇定:calm; 组成,构成:form, constitute\");\n\tmap.put(\"compound\",\"混合物:something composed;混合的:consisting;混合:together;扩大,增多:greater;和解:agree\");\n\tmap.put(\"compress\",\"压缩(体积):reduce size, volume\");\n\tmap.put(\"compromise\",\"妥协:concessions;使危险:danger\");\n\tmap.put(\"compunction\",\"焦虑,内疚,良心不安:anxiety, guilt\");\n\tmap.put(\"concatenate\",\"连结,混合:bring together\");\n\tmap.put(\"concave\",\"凹的:curved\");\n\tmap.put(\"conceal\",\"隐藏,隐瞒:prevent disclosure\");\n\tmap.put(\"concede\",\"承认:grant;停止抵抗:cease resistance\");\n\tmap.put(\"concentrate\",\"集中:focus;浓缩:less dilute;聚集:together\");\n\tmap.put(\"concerted\",\"共同完成的:accomplished together\");\n\tmap.put(\"conciliate\",\"平息,抚慰:lessen the anger;调解:compatible, reconcile\");\n\tmap.put(\"concise\",\"简洁的:brevity\");\n\tmap.put(\"concord\",\"一致,和睦:harmony, agreement\");\n\tmap.put(\"concur\",\"同意:agreement;同一时间发生、存在:same time;团结合作:joint\");\n\tmap.put(\"condescending\",\"摆出高人一等的姿态的:patronizingly superior\");\n\tmap.put(\"condign\",\"应得的,恰当的:deserved\");\n\tmap.put(\"condole\",\"表达同情:sympathetic\");\n\tmap.put(\"condone\",\"宽恕;忽视:forgive\");\n\tmap.put(\"conducive\",\"有益的,有促进作用的:promote\");\n\tmap.put(\"confident\",\"有信心的,自信的:assurance, self-reliance\");\n\tmap.put(\"confine\",\"禁闭,监禁:imprison;限制:limits\");\n\tmap.put(\"confluence\",\"汇合,混合:together same\");\n\tmap.put(\"confront\",\"直接对抗,直面:face to face\");\n\tmap.put(\"confound\",\"使困惑:uncertainty;无法区分,混淆:fail to differentiate;证明为假,证伪:false\");\n\tmap.put(\"congeal\",\"凝固,固化:solid state\");\n\tmap.put(\"congenial\",\"和善的,友好的:agreement;令人愉悦的:giving pleasure\");\n\tmap.put(\"congruent\",\"和谐一致的:in agreement;全等的:coinciding\");\n\tmap.put(\"conjecture\",\"揣测的结果:conclusion by surmise;猜测,估计(大小、数量等):decide without actual measurement;(没有依据地)认为:form an opinion\");\n\tmap.put(\"connive\",\"暗中合作,共谋:cooperate secretly;纵容:假装忽视或并未采取措施阻止错误:pretend ignorance ought to oppose\");\n\tmap.put(\"connoisseur\",\"鉴赏家(尤指艺术领域):with discrimination, appreciation;专家:high level of knowledge\");\n\tmap.put(\"conscientious\",\"仔细的,一丝不苟的:involving great care;有良心的,正直的:governed by conscience\");\n\tmap.put(\"consensus\",\"一致同意:general agreement\");\n\tmap.put(\"consequence\",\"结果:produced by cause;重要性,价值:importance\");\n\tmap.put(\"conservative\",\"守旧的,不愿改变的:oppose change;不招摇的,低调的:not showy;谨慎小心的:close attentiveness\");\n\tmap.put(\"conservatory\",\"温室:greenhouse;艺术学院:school arts\");\n\tmap.put(\"conserve\",\"保存,避免浪费:keep avoid wasteful\");\n\tmap.put(\"considerable\",\"(数量上)可观(而值得注意)的:large;值得考虑的,重要的:significant\");\n\tmap.put(\"console\",\"安慰,慰藉:alleviate, comfort\");\n\tmap.put(\"consolidate\",\"使联合,统一:join together;加固,使安全:make firm\");\n\tmap.put(\"consonant\",\"和谐一致的:in agreement\");\n\tmap.put(\"conspicuous\",\"显而易见的;吸引人的:obvious\");\n\tmap.put(\"conspire\",\"合谋,密谋:plan secretly\");\n\tmap.put(\"constitute\",\"指派,任命:appoint;构成:make up\");\n\tmap.put(\"constrain\",\"限制:restriction;使人屈服于(压力、感情)等:give in to pressure\");\n\tmap.put(\"constringe\",\"使紧缩:draw together\");\n\tmap.put(\"construct\",\"建造,建立:form;创造,相出:create imagination\");\n\tmap.put(\"consummate\",\"专业的,有造诣的:extremely skilled;无纰漏的,完美的:perfect;最高档次的,最大规模的:highest degree\");\n\tmap.put(\"contagious\",\"传染的:communicate;(情绪等)唤起共鸣的:exciting a similar feeling\");\n\tmap.put(\"contaminate\",\"污染,感染:stain\");\n\tmap.put(\"content\",\"使满足:appease;主题:major subject of interest;内容,内涵:idea that is conveyed\");\n\tmap.put(\"contentious\",\"引起争论的:argumentative;好争论的,好战的:tendency quarrels\");\n\tmap.put(\"contiguous\",\"接壤的,相邻的:sharing an edge\");\n\tmap.put(\"contort\",\"扭曲:twist\");\n\tmap.put(\"contract\",\"契约,合同:binding agreement;收缩:reduce size;感染疾病:become affected\");\n\tmap.put(\"contravene\",\"违反,反对:violate, oppose\");\n\tmap.put(\"contrite\",\"(因为有罪孽或过错而感到)后悔悲痛的:showing remorse\");\n\tmap.put(\"contumacious\",\"不服从的,倔强的:disobedient\");\n\tmap.put(\"conundrum\",\"无法解决的问题,迷:insoluble, dilemma\");\n\tmap.put(\"convalesce\",\"渐渐康复,渐愈:recover gradually\");\n\tmap.put(\"convenience\",\"便利,方便:fitness suitability\");\n\tmap.put(\"convention\",\"常规,习俗:agreement, acceptance;公约,协议:agreement;大会,集会:coming together\");\n\tmap.put(\"converge\",\"汇集,交汇于一点:move toward one\");\n\tmap.put(\"conversant\",\"熟悉的:familiar\");\n\tmap.put(\"convert\",\"被改变宗教信仰的人:converted;使改变信仰:bring over from brief;改变,转化:alter\");\n\tmap.put(\"convex\",\"凸起的:curves outward\");\n\tmap.put(\"convey\",\"运输:transport;传递,交流:communicate\");\n\tmap.put(\"conviction\",\"深信,确信:being convinced;证明有罪:proved guilty\");\n\tmap.put(\"convoke\",\"召集开会:bring together\");\n\tmap.put(\"convoluted\",\"复杂的,费解的:complicated\");\n\tmap.put(\"convulsion\",\"痉挛(强烈的、无法控制的肌肉收缩):involuntary contraction;骚乱:disturbance\");\n\tmap.put(\"coop\",\"监禁,困于…之中:confine\");\n\tmap.put(\"copious\",\"丰富的,大量的:abundant\");\n\tmap.put(\"coquette\",\"调情的女子:flirt;调情,不认真对待:playfully\");\n\tmap.put(\"cordon\",\"警戒线:line preventing;围成一道防线:form cordon\");\n\tmap.put(\"cornucopia\",\"大量:overflowing\");\n\tmap.put(\"coronation\",\"加冕,加冕礼:crowning\");\n\tmap.put(\"corporeal\",\"肉体的:not spiritual;有形的,实体的:not immaterial\");\n\tmap.put(\"corroborate\",\"用证据或权威证实:support with evidence;为…提供证据,支持:provide evidence\");\n\tmap.put(\"corrosive\",\"腐蚀性的:destroy slowly;讽刺性的:sarcastic;\");\n\tmap.put(\"corrugated\",\"褶皱的:folds\");\n\tmap.put(\"cosmopolitan\",\"有世界性眼光的,包容的:worldwide\");\n\tmap.put(\"cosset\",\"宠爱:pamper\");\n\tmap.put(\"countenance\",\"容忍:put up with;赞成,推崇:favorable opinion;沉着,冷静:evenness\");\n\tmap.put(\"counterfeit\",\"仿制的,假冒的:imitation;仿制:fraudulent replica;伪装成:false appearance\");\n\tmap.put(\"countermand\",\"取消,撤销:revoke\");\n\tmap.put(\"court\",\"追求,献殷勤:seek affections\");\n\tmap.put(\"covert\",\"隐蔽的,秘密的:not shown;隐秘庇护所:avoid others\");\n\tmap.put(\"covetous\",\"贪婪的,渴求财富的:inordinate desire\");\n\tmap.put(\"cow\",\"恐吓,威胁:frighten\");\n\tmap.put(\"cowardice\",\"懦弱,不坚定:lack courage\");\n\tmap.put(\"cower\",\"畏缩:cringe\");\n\tmap.put(\"cozen\",\"诱骗:mislead\");\n\tmap.put(\"cramped\",\"狭小的,狭窄的:small\");\n\tmap.put(\"crass\",\"粗俗的,愚钝的:unrefined\");\n\tmap.put(\"crave\",\"热望:intense desire\");\n\tmap.put(\"craven\",\"非常懦弱的,因胆小而遭人鄙视的:lacking courage\");\n\tmap.put(\"crease\",\"折痕:folding\");\n\tmap.put(\"credence\",\"坚信:firm brief\");\n\tmap.put(\"credulous\",\"轻信的,易受骗的:gullible\");\n\tmap.put(\"creek\",\"小溪,小河:smaller\");\n\tmap.put(\"creep\",\"缓慢地行进:slowly;匍匐前进:body close to the ground\");\n\tmap.put(\"crescendo\",\"(声音)渐强:gradual increase;(渐强之后到达的)顶峰:peak\");\n\tmap.put(\"crest\",\"顶部,浪尖,山顶\");\n\tmap.put(\"crestfallen\",\"垂头丧气的,沮丧的:depressed\");\n\tmap.put(\"cronyism\",\"任人唯亲的,对好朋友的偏袒:favoritism friends\");\n\tmap.put(\"crook\",\"使弯曲:away from a straight line\");\n\tmap.put(\"croon\",\"低声歌唱或说话:murmuring\");\n\tmap.put(\"crouch\",\"蹲伏:lower stance\");\n\tmap.put(\"crucial\",\"非常重要的,决定性的:extremely significant\");\n\tmap.put(\"crumple\",\"弄皱:bend;(因外力挤压而)垮塌:fall down\");\n\tmap.put(\"crutch\",\"支撑,支柱:supports\");\n\tmap.put(\"crux\",\"中点,关键点:critical point\");\n\tmap.put(\"cryptic\",\"秘密的:secret;含义模糊的:ambiguous meaning;超出理解能力的:beyond one’s powers to know\");\n\tmap.put(\"culpable\",\"该受谴责的,有罪的:deserving blame\");\n\tmap.put(\"cultivate\",\"提升,加强:improve;种植,培养:promote growth\");\n\tmap.put(\"cumbersome\",\"笨重的,难处理的:difficult to handle\");\n\tmap.put(\"cunning\",\"狡猾的:artful deceptiveness;(手工)灵巧的:skillful;欺诈,欺骗:practice of misleading\");\n\tmap.put(\"curmudgeon\",\"脾气坏的、爱抱怨的人:irritable and complaining\");\n\tmap.put(\"cursory\",\"匆忙的,不注意细节的:excessive or careless speed\");\n\tmap.put(\"curt\",\"言词简略的,直接(以至显得粗鲁)的:direct, brief, and potentially rude;言简意赅的:convey much information\");\n\tmap.put(\"curtail\",\"缩短,削减:less in extent or duration\");\n\tmap.put(\"cynic\",\"愤世嫉俗者:selfishness\");\n\tmap.put(\"dabble\",\"涉猎,对…浅尝辄止:superficially\");\n\tmap.put(\"daft\",\"神经错乱的:abnormal, sick state of mind;不明智的:lack of good sense or judgment\");\n\tmap.put(\"dais\",\"主席台,嘉宾席:raised platform\");\n\tmap.put(\"dally\",\"虚度时光:doing nothing;玩乐:amusement;慢吞吞,磨磨蹭蹭:slowly\");\n\tmap.put(\"damper\",\"抑制因素:restrains, depresses\");\n\tmap.put(\"dandy\",\"纨绔子弟,爱打扮的人:appearance;最佳的,最好的:very best kind\");\n\tmap.put(\"dank\",\"阴湿的:wet\");\n\tmap.put(\"dapper\",\"衣冠整洁的:strikingly neat and trim\");\n\tmap.put(\"dappled\",\"有斑点的,花的:marked with small spots, mottled, spotted;色彩斑斓的:two or more colors\");\n\tmap.put(\"daredevil\",\"大胆鲁莽的(人):foolishly;不考虑后果的:a lack of concern for the consequence\");\n\tmap.put(\"dart\",\"突然移动,猛冲,狂奔:suddenly;公开侮辱:intended to hurt another’s feelings\");\n\tmap.put(\"daunt\",\"使胆怯,吓到:to lessen the courage\");\n\tmap.put(\"dawdle\",\"闲荡,虚度光阴:spend time idly;拖拖拉拉:slowly\");\n\tmap.put(\"deadpan\",\"无趣的,无生气的,不活泼的:impassively\");\n\tmap.put(\"dearth\",\"供应不足:inadequate\");\n\tmap.put(\"debacle\",\"溃败:complete failure\");\n\tmap.put(\"debark\",\"(使)下船(飞机、车等);卸(客、货):unload, from a ship or an airplane\");\n\tmap.put(\"debase\",\"贬低,贬损:lower standing\");\n\tmap.put(\"debilitate\",\"使衰弱:impair strength\");\n\tmap.put(\"debris\",\"废墟:discarded, useless material\");\n\tmap.put(\"debunk\",\"揭穿…的真面目:true nature;证明…为假:false\");\n\tmap.put(\"debut\",\"初次登台,出道:first appearance\");\n\tmap.put(\"decadence\",\"衰落,颓废:deterioration, decline\");\n\tmap.put(\"decant\",\"轻轻倒出:pour off without disturbing\");\n\tmap.put(\"decipher\",\"破译:interpret;对…有清晰的想法,理解,解读:clear idea\");\n\tmap.put(\"decode\",\"解码:change into ordinary language;对…有清晰的想法,理解,解读:clear idea\");\n\tmap.put(\"decorum\",\"礼仪,得体:appropriateness, propriety\");\n\tmap.put(\"decrepit\",\"虚弱的,衰老的,破旧的:weakened\");\n\tmap.put(\"default\",\"不履行义务,玩忽职守:nonperformance\");\n\tmap.put(\"defer\",\"推迟,延期:postpone;遵从:respect\");\n\tmap.put(\"deference\",\"尊崇,顺从:yield to\");\n\tmap.put(\"deficiency\",\"缺乏,不足:inadequate\");\n\tmap.put(\"defile\",\"(山间)小道:a narrow passage;亵渎:treat with great disrespect;使腐坏,污损:make unfit for use\");\n\tmap.put(\"deft\",\"灵巧的,熟练的:skill\");\n\tmap.put(\"defuse\",\"抚慰,减轻:make less tense\");\n\tmap.put(\"defy\",\"反抗,违抗:go against\");\n\tmap.put(\"dehydrate\",\"去除水分,使干燥:remove water;使失去活力:deprive of vitality\");\n\tmap.put(\"deify\",\"把…当作神来崇拜:offer honor or respect to;过分喜爱:love or admire;尊敬,尊崇:high status or value to\");\n\tmap.put(\"deject\",\"使沮丧:lower the spirits, dishearten\");\n\tmap.put(\"deleterious\",\"有害的:harmful\");\n\tmap.put(\"deliberate\",\"深思熟虑的:careful\");\n\tmap.put(\"delicacy\",\"(外貌、结构等)精致,极度兴奋,发狂:fineness\");\n\tmap.put(\"delirium\",\"精神错乱;极度兴奋,发狂:mental disturbance confused\");\n\tmap.put(\"delusion\",\"错觉,妄想:false\");\n\tmap.put(\"deluge\",\"大暴雨:drenching rain;大量:great flow\");\n\tmap.put(\"delve\",\"探究,钻研:detailed search for information\");\n\tmap.put(\"demagogue\",\"蛊惑民心的政客:leader false claims\");\n\tmap.put(\"demanding\",\"难以取悦的,难满足的:satisfied;费时间花心思的:requiring careful attention\");\n\tmap.put(\"demolition\",\"破坏,毁坏:destroying\");\n\tmap.put(\"demonstrate\",\"(通过证据)证明,表明:make clear using examples;使明白易懂:make plain or understandable;表现,表露:make known\");\n\tmap.put(\"demoralize\",\"使士气低落:dishearten;贬低,使堕落:lower in character\");\n\tmap.put(\"demotic\",\"通俗的,大众化的:common\");\n\tmap.put(\"demur\",\"表示异议,反对:opposition, objection;犹豫:doubt acceptability qualm\");\n\tmap.put(\"denigrate\",\"诋毁,污蔑:scornfully\");\n\tmap.put(\"denouement\",\"(小说的)结局:final resolution\");\n\tmap.put(\"denounce\",\"公开指责:public or formal disapproval;宣称…道德上错误、可耻:morally wrong\");\n\tmap.put(\"dent\",\"凹陷,凹痕:depression;(数量,程度上)削弱:make smaller\");\n\tmap.put(\"denude\",\"脱去,使赤裸:bare\");\n\tmap.put(\"deplete\",\"耗尽,使衰竭:make complete use\");\n\tmap.put(\"deplore\",\"哀悼:sorrow\");\n\tmap.put(\"deploy\",\"(有目的地)展开;调度,部署:spread out\");\n\tmap.put(\"deportation\",\"放逐:removal from a country\");\n\tmap.put(\"depose\",\"宣誓作证:testify;废黜,罢免:remove from a throne;摆放:arrange\");\n\tmap.put(\"deposit\",\"自然积累,沉积,矿藏:accumulation;存钱:put in account\");\n\tmap.put(\"depravity\",\"道德败坏:immoral, harmful or offensive\");\n\tmap.put(\"deprecate\",\"不喜欢:unfavorable opinion;贬低,轻视:express scornfully;降低…的重要性,使低调:play down\");\n\tmap.put(\"depreciate\",\"贬低…的价值:lower value;轻视:lower estimation, esteem\");\n\tmap.put(\"depressed\",\"不开心的,情绪不高的,消沉的:unhappiness;生活境况悲催的:healthful environment\");\n\tmap.put(\"deprivation\",\"匮乏:privation\");\n\tmap.put(\"deracinate\",\"根除:pull out\");\n\tmap.put(\"derelict\",\"玩忽职守的,不认真的:lacking duty, carelessly;被社会遗弃的人:social misfit\");\n\tmap.put(\"deride\",\"嘲弄,嘲笑:contemptuous mirth\");\n\tmap.put(\"derivative\",\"非原创的:originality\");\n\tmap.put(\"descend\",\"下降:downward;世代相传:pass by inheritance\");\n\tmap.put(\"descendant\",\"后代:deriving directly from\");\n\tmap.put(\"desecrate\",\"亵渎,玷污:treat shamefully\");\n\tmap.put(\"desiccate\",\"使(食物)脱水以保存,使干燥:drying;使缺乏活力:deprive vitality\");\n\tmap.put(\"designate\",\"任命:to pick for a specific position or duty;命名:give a name to\");\n\tmap.put(\"despicable\",\"令人鄙视的:loathing and disgust;不荣耀的,不得体的:not honor\");\n\tmap.put(\"despise\",\"极其不喜欢的:dislike strongly\");\n\tmap.put(\"despotic\",\"专制的,暴虐的:tyrannical\");\n\tmap.put(\"desultory\",\"无计划的,无目的的:lacking plan;令人失望的:disappointing\");\n\tmap.put(\"detach\",\"使分离:separate\");\n\tmap.put(\"detain\",\"拘留,扣留:hold, keep\");\n\tmap.put(\"deter\",\"吓住,威慑:prevent, discourage\");\n\tmap.put(\"deterioration\",\"恶化,堕落:sinking\");\n\tmap.put(\"detour\",\"偏离正常标准:away from standard;改变方向或者路线,绕道:change direction\");\n\tmap.put(\"detract\",\"贬低,降低价值:diminish;使分心:draw attention\");\n\tmap.put(\"detritus\",\"废品,碎屑,遗骸:product disintegration, destruction, debris\");\n\tmap.put(\"devoted\",\"投入的,忠诚的:loyalty, devotion;示爱的,恩爱的:love\");\n\tmap.put(\"devout\",\"(对于宗教)虔诚的:devoted to religion;忠诚的:allegiance\");\n\tmap.put(\"dexterous\",\"动作灵活的:ready, skilled;头脑灵活的:mentally adroit, skillful\");\n\tmap.put(\"diabolic\",\"恶魔一般的:devil\");\n\tmap.put(\"diaphanous\",\"模糊的;非实在的:vague insubstantial;(质地精致得)几乎透明的:transparent, translucent\");\n\tmap.put(\"diatribe\",\"长篇抨击性演讲:long scolding;挖苦,讽刺的指责:ironic, satirical\");\n\tmap.put(\"didactic\",\"喜欢说教的:teach\");\n\tmap.put(\"diehard\",\"顽固的,保守的/顽固的人,保守的人:determined, devoted/opposes change, refuses new ideas\");\n\tmap.put(\"diffident\",\"不自信的:lack self-confidence;内向的:reserved\");\n\tmap.put(\"diffuse\",\"啰嗦的:verbose;不集中的,扩散的:not concentrated;扩展,散开:extend, scatter\");\n\tmap.put(\"digress\",\"脱离主题:turn aside main subject\");\n\tmap.put(\"dilapidate\",\"(使)荒废:ruin\");\n\tmap.put(\"dilate\",\"(使)膨胀,扩大:enlarge, expand, wide;详细表达:more fully greater detail\");\n\tmap.put(\"dilatory\",\"拖延的,磨蹭的:cause delay procrastination\");\n\tmap.put(\"dilettante\",\"业余爱好者(对艺术或知识领域涉猎浅薄者)/缺乏专业技术的:superficial interest/lacking expert skill\");\n\tmap.put(\"diligent\",\"勤勉的,辛勤的:steady, earnest, energetic\");\n\tmap.put(\"dilute\",\"稀释/经稀释的:concentrated/low strength, concentration;削弱:diminish strength, flavor, brilliance\");\n\tmap.put(\"diminish\",\"(使)变小,(使)减少:smaller, less;轻视,贬低:lessen, belittle\");\n\tmap.put(\"din\",\"喧闹声,嘈杂声:loud noise;重复,使人厌烦地反复灌输:again\");\n\tmap.put(\"dingy\",\"昏暗的;肮脏的:darkened, dirty\");\n\tmap.put(\"diocesan\",\"主教管辖区的:diocese\");\n\tmap.put(\"diplomatic\",\"使用策略的,机智的:tact\");\n\tmap.put(\"dire\",\"不吉利的,不详的:calamity;可怕的,恐怖的:fear;迫切的:immediate, urgent;悲惨的:lacking cheer\");\n\tmap.put(\"dirge\",\"挽歌:solemn, mournful music\");\n\tmap.put(\"disabuse\",\"打消错误念头,纠正:free from error, fallacy, misconception\");\n\tmap.put(\"disaffected\",\"不满的,叛逆的:discontented\");\n\tmap.put(\"disarm\",\"解除武装:reduce armed forces;使息怒,平息,抚慰:lessen;使无害:harmless\");\n\tmap.put(\"disarray\",\"混乱,无秩序:lack order;使混乱:undo order, arrangement\");\n\tmap.put(\"disavow\",\"拒绝承认,否认:disclaim\");\n\tmap.put(\"discern\",\"识别,辨别差异:perceive, detect\");\n\tmap.put(\"discharge\",\"解雇:dismiss;释放:free;不承担责任:freeing obligation, responsibility\");\n\tmap.put(\"disciple\",\"信徒,追随者:follower\");\n\tmap.put(\"discombobulate\",\"使不安,使混乱:upset, confuse\");\n\tmap.put(\"discomfit\",\"使尴尬:embarrassment;阻碍:prevent\");\n\tmap.put(\"discommode\",\"打扰,使不便:trouble\");\n\tmap.put(\"discompose\",\"使不安:disturb composure, perturb;使混乱:undo order, arrangement\");\n\tmap.put(\"disconcert\",\"使不安:disturb\");\n\tmap.put(\"discord\",\"意见不一致,不和谐:lack agreement, harmony\");\n\tmap.put(\"discredit\",\"羞耻,使丧失名誉:damage reputation, disgrace;怀疑,不相信:not true, real\");\n\tmap.put(\"discrepancy\",\"(在事实和宣称之间的)差异或矛盾:divergence, disagreement\");\n\tmap.put(\"discrete\",\"离散的,不连续的:separate\");\n\tmap.put(\"discretion\",\"谨慎:discreet, circumspection;自制,节制:checking\");\n\tmap.put(\"discretionary\",\"自主决定的:one’s own discretion\");\n\tmap.put(\"discriminate\",\"区分:perceive distinguishing, recognize;歧视:difference\");\n\tmap.put(\"discursive\",\"(谈话内容)杂乱的:without order\");\n\tmap.put(\"disdain\",\"轻视,鄙视:scorn\");\n\tmap.put(\"disengage\",\"分开,使脱离:set free, entanglement\");\n\tmap.put(\"disgorge\",\"呕吐出:discharge, vomit;被迫放弃:give up\");\n\tmap.put(\"disgruntle\",\"使发怒,使不满意:discontented;使疏远,使不友好unfriendly\");\n\tmap.put(\"disguise\",\"伪装(防止被认出):prevent recognition;隐藏,掩饰:secret shut off\");\n\tmap.put(\"disinclination\",\"不喜欢,厌恶,不情愿:lack willingness, desire\");\n\tmap.put(\"disinfect\",\"消毒,使无菌:free from infection\");\n\tmap.put(\"disjointed\",\"机能失调的:out orderly function;不连贯的:not connected\");\n\tmap.put(\"disinter\",\"(从墓地里)掘出:take out\");\n\tmap.put(\"disinterested\",\"公正的,无偏见的:free from selfish, unbiased;没有兴趣的:lack interest, concern\");\n\tmap.put(\"disjunctive\",\"分离的:breaks disunity\");\n\tmap.put(\"dismantle\",\"分解,分拆:pieces, destroy integrity\");\n\tmap.put(\"dismay\",\"使失去勇气:lose courage;使不安,使焦虑:trouble, uneasy\");\n\tmap.put(\"disparage\",\"贬低;轻蔑地说:lower, disrespectful\");\n\tmap.put(\"disparate\",\"迥然不同的:distinct, different dissimilar\");\n\tmap.put(\"dispassionate\",\"客观公正的,不易被情绪或偏见影响的:unaffected\");\n\tmap.put(\"dispatch\",\"迅速:promptness;发送,派遣:one place to another;使死亡:deprive life;获胜,胜过…:victory\");\n\tmap.put(\"dispose\",\"使倾向于:tendency incline;处理掉(与of连用,dispose of):get rid of, throw out;有序地布置:orderly\");\n\tmap.put(\"disregard\",\"漠视,不关注:no attention;缺乏兴趣,缺乏关心:interest concern\");\n\tmap.put(\"dissect\",\"仔细分析:examine, analyze minute;切成片(尤其是为了解剖研究):cut apart separate\");\n\tmap.put(\"dissemble\",\"用假象隐藏真相,掩饰:false\");\n\tmap.put(\"disseminate\",\"散播,传播:spread, promulgate\");\n\tmap.put(\"dissension\",\"意见不合:difference, disagreement\");\n\tmap.put(\"dissent\",\"持异议,不同意:differ;反对正统:departure accepted;不和谐:lack harmony\");\n\tmap.put(\"dissipate\",\"驱散:drive away, disperse;浪费:wastefully, squander;放纵:indulge, intemperate\");\n\tmap.put(\"dissolute\",\"放荡的,无节制的:restraint, indulging\");\n\tmap.put(\"dissolve\",\"溶解融化:solution;解散:break into parts, disintegrate;驱散;(使)消失:cease visible;废除,撤销:end\");\n\tmap.put(\"dissonance\",\"(音调)不和谐,刺身;不一致,分歧:disagreeable\");\n\tmap.put(\"dissuade\",\"劝阻,反对:deter persuasion, exhortation\");\n\tmap.put(\"distain\",\"贬损,伤害(某人的)名誉:lose honor, respect, reputation;弄脏:dirty\");\n\tmap.put(\"distal\",\"远离中心的,(神经)末梢的:situated away\");\n\tmap.put(\"distend\",\"(使)膨胀:expand\");\n\tmap.put(\"distill\",\"对…用蒸馏法提高纯度:increase, purify;(使)渗出;(使)滴下:fall drops\");\n\tmap.put(\"distort\",\"扭曲,歪曲:twist\");\n\tmap.put(\"distract\",\"转移(注意力),使分心:draw, direct different;使焦虑,使不安:trouble, uneasy;疯狂的:insane, mad\");\n\tmap.put(\"distraught\",\"精神狂乱的,极疯狂的:agitated, insane\");\n\tmap.put(\"diurnal\",\"白天发生或行动的:daytime;每天的:every day;期刊:publication at regular intervals\");\n\tmap.put(\"diverge\",\"改变方向:change;(使)分叉,散开:different directions central;分歧:different, differ;离题:depart from\");\n\tmap.put(\"diversity\",\"多样性:variety, multiformity;分歧,不同点:different\");\n\tmap.put(\"divert\",\"使转向:turn, deflect;使消遣:agreeably;使分心:draw something else\");\n\tmap.put(\"divestiture\",\"剥夺:taking away\");\n\tmap.put(\"divulge\",\"泄露(秘密):known confidence, secret\");\n\tmap.put(\"dodder\",\"蹒跚,颤巍巍地行进:progress unsteadily\");\n\tmap.put(\"dodge\",\"躲避:avoid\");\n\tmap.put(\"doff\",\"脱下:take off, remove\");\n\tmap.put(\"dogged\",\"坚持的,坚决的:continuing, slackening, yielding];固执的,任性的:sticking to\");\n\tmap.put(\"dogma\",\"教条,信条:doctrine stated authoritatively\");\n\tmap.put(\"doldrums\",\"低迷,中断:inactivity;情绪不佳:low spirits\");\n\tmap.put(\"dolorous\",\"忧伤的:misery, grief\");\n\tmap.put(\"dolt\",\"笨蛋:stupid\");\n\tmap.put(\"domicile\",\"住所,住宅:residence;为…提供住处:provide domicile\");\n\tmap.put(\"dominant\",\"处于支配地位的:controlling others;(基因)显性的:genetic dominance\");\n\tmap.put(\"don\",\"穿上:put on\");\n\tmap.put(\"donor\",\"捐赠人,给体:donates\");\n\tmap.put(\"doodle\",\"(无目的)地乱涂乱画:aimlessly;漫无目的地打发时光:aimless activity\");\n\tmap.put(\"dormant\",\"静止的,不活跃的:inactivity;(动物)冬眠的:suspended\");\n\tmap.put(\"dour\",\"闷闷不乐的,死气沉沉的:gloomy;严厉的:harsh\");\n\tmap.put(\"douse\",\"熄灭:put out;弄湿:wet\");\n\tmap.put(\"downplay\",\"轻描淡写:,不予重视:minimize significance\");\n\tmap.put(\"downpour\",\"倾盆大雨:heavy rain\");\n\tmap.put(\"doyen\",\"有经验的人,资深人士:knowledge experience;(加入时间较长的)高级会员:senior member\");\n\tmap.put(\"doze\",\"小憩:lightly\");\n\tmap.put(\"draconian\",\"极其残酷的,十分严厉的:harsh\");\n\tmap.put(\"drawl\",\"慢吞吞地说:speak slowly\");\n\tmap.put(\"dreary\",\"单调乏味的:nothing cheer;令人不悦的:causing unhappiness\");\n\tmap.put(\"drench\",\"使湿透,浸透:wet thoroughly\");\n\tmap.put(\"drivel\",\"胡言乱语:meaningless;胡言乱语,说傻话:talk stupidity\");\n\tmap.put(\"drizzle\",\"(下)细小、轻柔、似雾的雨,毛毛雨:misty rain\");\n\tmap.put(\"droll\",\"古怪有趣的,离奇可笑的:amusingly odd\");\n\tmap.put(\"drone\",\"低沉单调地说;嗡嗡地叫:talk monotonous;(昆虫振翅般)单调嗡嗡的声音:monotonous sound;混日子:doing nothing\");\n\tmap.put(\"drudgery\",\"苦工;单调、卑贱或无趣的工作:tedious work\");\n\tmap.put(\"dubious\",\"充满不定性的,值得怀疑的:uncertainty, questionable;(对事实等)持怀疑态度的:not feeling sure;迟疑不决的,不愿行动的:slow to begin because of doubts\");\n\tmap.put(\"ductile\",\"可塑的,有延展性的:malleable;易受影响的:easily led\");\n\tmap.put(\"dulcet\",\"悦耳的,令人愉悦的:melodious\");\n\tmap.put(\"dullard\",\"笨蛋:stupid\");\n\tmap.put(\"dupe\",\"复制品,复制:exactly like something else;易受骗的人:easily deceived;欺骗:deceive\");\n\tmap.put(\"duplicity\",\"欺骗,口是心非:deceptiveness\");\n\tmap.put(\"dwindle\",\"逐渐减少:gradually less\");\n\tmap.put(\"dyspeptic\",\"脾气坏的:bad-tempered;消化不良的:dyspepsia\");\n\tmap.put(\"earnest\",\"严肃认真的:serious\");\n\tmap.put(\"earshot\",\"听力所及的范围:range hear\");\n\tmap.put(\"earsplitting\",\"震耳欲聋的:distressingly loud\");\n\tmap.put(\"eavesdrop\",\"偷听:listen secretly\");\n\tmap.put(\"ebullient\",\"热情奔放的:zestfully\");\n\tmap.put(\"eccentric\",\"行为出格的,不循规蹈矩的:deviating conventional\");\n\tmap.put(\"éclat\",\"辉煌成就:success\");\n\tmap.put(\"eclipse\",\"下降,衰退:lower state;使声望下降,使黯然失色:diminish importance;(在数量、品质上)超越:be greater\");\n\tmap.put(\"ecstasy\",\"无法自控的情绪:beyond self-control;狂喜:intense joy\");\n\tmap.put(\"ecumenical\",\"全球基督教会的:whole churches;世界范围的,普遍性的:worldwide\");\n\tmap.put(\"edible\",\"可食用的:eaten\");\n\tmap.put(\"edifice\",\"大厦;大建筑物:massive structure;基础,基本结构:basic form\");\n\tmap.put(\"efface\",\"擦掉,抹去;使不明显:make indistinct\");\n\tmap.put(\"effervesce\",\"冒泡:bubble;兴奋,热情洋溢:high spirits\");\n\tmap.put(\"effete\",\"衰弱的,衰落的:depleted;缺乏信念的,懦弱的:lacking strength of will\");\n\tmap.put(\"effluvium\",\"难闻的气味:offensive smell;没有的副产品,废品:by-product waste\");\n\tmap.put(\"effrontery\",\"厚颜无耻,放肆大胆:disregard, courtesy\");\n\tmap.put(\"effulgent\",\"光辉灿烂的:resplendent\");\n\tmap.put(\"effusive\",\"感情泛滥的/溢于言表的;感情表达不节制的/过度的;过分多情的:unrestrained in emotional expression\");\n\tmap.put(\"egalitarian\",\"平等主义的:promoting equal rights\");\n\tmap.put(\"egoistic\",\"利己的,以自我为中心的:centered in oneself\");\n\tmap.put(\"elaborate\",\"详细的,复杂的:complexity;详细阐述:in detail\");\n\tmap.put(\"elastic\",\"有弹性的:resuming shape;能(迅速从伤痛中)恢复的:recovering from depression\");\n\tmap.put(\"elate\",\"使开心,使自豪:fill with joy\");\n\tmap.put(\"eleemosynary\",\"慈善的:charity\");\n\tmap.put(\"elegy\",\"哀歌(诗),挽歌(诗):expressing sorrow\");\n\tmap.put(\"elephantine\",\"巨大的:enormous size;笨拙的:clumsy\");\n\tmap.put(\"elevate\",\"(在道德、智力、文化水平上)提升:improve;使兴奋:raise spirits\");\n\tmap.put(\"elicit\",\"激起,唤起:bring out\");\n\tmap.put(\"elliptical\",\"含糊不清的:obscurity;椭圆的:ellipse\");\n\tmap.put(\"elucidate\",\"阐明:make lucid\");\n\tmap.put(\"emaciate\",\"使消瘦,使衰弱:become thin;削弱:feeble\");\n\tmap.put(\"emancipate\",\"解放,解除束缚:free\");\n\tmap.put(\"embargo\",\"贸易禁止令:prohibition on commerce\");\n\tmap.put(\"embark\",\"上船:go abroad;开始从事:start\");\n\tmap.put(\"embarrass\",\"使尴尬:experience distress;阻挠,制造障碍:create difficulty\");\n\tmap.put(\"embed\",\"嵌入:enclose\");\n\tmap.put(\"embezzle\",\"盗用:appropriate\");\n\tmap.put(\"embolden\",\"鼓励,使大胆:instill courage\");\n\tmap.put(\"emboss\",\"以浮雕效果妆点,装饰:ornament with raised work\");\n\tmap.put(\"embrace\",\"乐于接受:willingly, eagerly;保围:surround\");\n\tmap.put(\"embroider\",\"(时常伴有夸张和想象内容地)详细说明:give elaborate account\");\n\tmap.put(\"emigrate\",\"移民,移居海外:leave\");\n\tmap.put(\"eminent\",\"杰出:above others\");\n\tmap.put(\"emollient\",\"起缓和作用的:less intense\");\n\tmap.put(\"emulate\",\"效仿并努力超越:excel through imitation\");\n\tmap.put(\"enact\",\"制定或颁布(法律):establish\");\n\tmap.put(\"enamel\",\"涂亮漆;使具有光滑或亮泽的表面:give a glossy surface;用亮丽的表面装饰:adorn\");\n\tmap.put(\"encomium\",\"赞颂之词:praise\");\n\tmap.put(\"encompass\",\"组成,包含:include;包围:envelop\");\n\tmap.put(\"encumber\",\"阻碍,妨碍:impede;给…增添负担:place burden\");\n\tmap.put(\"endemic\",\"地方性的:to a particular region\");\n\tmap.put(\"endorse\",\"公开支持,推崇:express approval\");\n\tmap.put(\"enervate\",\"使衰弱:weaken;使麻木:deprive of emotional vitality\");\n\tmap.put(\"enfranchise\",\"给予…权力(例如选举权):endow rights;解放:set free\");\n\tmap.put(\"engender\",\"引起,使发展:cause;产生,出现:come into existence\");\n\tmap.put(\"engross\",\"使全神贯注:occupy exclusively\");\n\tmap.put(\"enigma\",\"难以理解或解释的事物,谜:hard to understand\");\n\tmap.put(\"enlighten\",\"使知道,启发:inform, instruct;(在道德或精神上)进行教育:provide moral understanding\");\n\tmap.put(\"enmity\",\"敌意:mutual hatred\");\n\tmap.put(\"ennoble\",\"使尊贵:noble\");\n\tmap.put(\"ennui\",\"倦怠;缺乏兴趣:listlessness, lack of interest\");\n\tmap.put(\"ensemble\",\"合唱,合奏曲:two or move vocalists\");\n\tmap.put(\"ensconce\",\"安置:settle securely;隐藏:hiding\");\n\tmap.put(\"ensue\",\"紧随其后:afterward\");\n\tmap.put(\"entangle\",\"使卷入,使纠缠:twist confused mass;使变复杂或困难:complex or difficult\");\n\tmap.put(\"enthusiasm\",\"热情,兴趣:desire or interest\");\n\tmap.put(\"entice\",\"诱使:tempt, lure\");\n\tmap.put(\"entrance\",\"进入权,进入许可:means of entering or participation;使入迷:wonder, enchantment\");\n\tmap.put(\"entrap\",\"诱骗:lure\");\n\tmap.put(\"entreat\",\"恳求:plead persuade, ask urgently\");\n\tmap.put(\"enunciate\",\"清晰地说:articulate;公开宣布,宣称:openly or publicity\");\n\tmap.put(\"ephemeral\",\"短暂的:very short time\");\n\tmap.put(\"epic\",\"宏大的,超凡脱俗的:surpassing the usual\");\n\tmap.put(\"epicure\",\"美食家:discriminating tastes\");\n\tmap.put(\"epigram\",\"机智的短诗,警句:short witty\");\n\tmap.put(\"epilogue\",\"文学作品的结局:concluding section literary;戏剧的收场白:final scene of a paly\");\n\tmap.put(\"epithet\",\"外号,绰号:descriptive name\");\n\tmap.put(\"epitomize\",\"摘要,概括:short statement, main points;代表,体现,是…的典型范例:represent a typical example of\");\n\tmap.put(\"equable\",\"(脾气、性情)温和的:serene\");\n\tmap.put(\"equity\",\"不偏不倚,公平:lack of favoritism\");\n\tmap.put(\"equivalent\",\"等价的,相等的:equal\");\n\tmap.put(\"equivocate\",\"(带有欺骗目的地)模棱两可地说,说谎话:equivocal\");\n\tmap.put(\"erode\",\"侵蚀,慢慢减少:consume gradually\");\n\tmap.put(\"errant\",\"居无定所的:from place to place;误入歧途的,犯错误的:straying proper course or standards\");\n\tmap.put(\"erratic\",\"善变的:not constant;异常的,不同寻常的:different from the ordinary\");\n\tmap.put(\"erudite\",\"博学的:learned\");\n\tmap.put(\"escalate\",\"(使)(战争等)升级,扩大:increase\");\n\tmap.put(\"eschew\",\"刻意避开;戒绝:avoid\");\n\tmap.put(\"esoteric\",\"深奥难懂的:difficult to understand;少数人知道的:not known by the general\");\n\tmap.put(\"espouse\",\"支持;拥护:support;与…结婚:marriage, marry\");\n\tmap.put(\"esteem\",\"尊重:respect, prize\");\n\tmap.put(\"estimable\",\"值得尊敬的:admirable\");\n\tmap.put(\"estrange\",\"使疏远,离间,使感情失和:enmity, indifference, friendliness\");\n\tmap.put(\"etch\",\"蚀刻;留下深刻印象,铭记:produce a vivid impression\");\n\tmap.put(\"eternal\",\"永恒的:infinite duration, everlasting, perpetual\");\n\tmap.put(\"ethereal\",\"轻巧精致的:lightness, highly refined, delicate;天国的:heaven;非物质的,精神(上)的:spiritual, not composed of matter\");\n\tmap.put(\"ethics\",\"道德规范:governing conduct\");\n\tmap.put(\"eulogize\",\"称赞,颂扬:speak in high praise of\");\n\tmap.put(\"euphemism\",\"婉言,委婉的说法:inoffensive expression\");\n\tmap.put(\"euphonious\",\"悦耳的:pleasing\");\n\tmap.put(\"euphoria\",\"感觉极其愉快:overwhelming usually pleasurable\");\n\tmap.put(\"evacuate\",\"撤空:empty or remove;撤退:remove\");\n\tmap.put(\"evanescent\",\"逐渐消失的,短暂的:vanish\");\n\tmap.put(\"evasive\",\"难以发现,捕捉,分离的;含糊其辞的:equivocal\");\n\tmap.put(\"everlasting\",\"永恒的,持久的:forever\");\n\tmap.put(\"evict\",\"赶出,逐出:expel\");\n\tmap.put(\"evince\",\"表明:make known\");\n\tmap.put(\"evoke\",\"唤起,引发:call up\");\n\tmap.put(\"exacerbate\",\"使加剧,使恶化:severe\");\n\tmap.put(\"exacting\",\"严格的,苛求的:rigorous;费时间心思的:requiring time, effort, attention\");\n\tmap.put(\"exalt\",\"提升,提拔:raise;赞扬:praise\");\n\tmap.put(\"exasperate\",\"激怒:excite\");\n\tmap.put(\"excavate\",\"挖掘,挖空:dig out\");\n\tmap.put(\"exceptional\",\"例外的,特别的,非凡的:uncommon, extraordinary\");\n\tmap.put(\"excoriate\",\"严厉批评:criticize harshly publicly\");\n\tmap.put(\"excrete\",\"排泄:discharge\");\n\tmap.put(\"excruciate\",\"折磨,使痛苦:pain\");\n\tmap.put(\"exculpate\",\"声明无罪;开脱,使无罪:clear fault guilt\");\n\tmap.put(\"excursive\",\"离题的;散漫的:passing\");\n\tmap.put(\"execrate\",\"谴责:morally wrong or evil;痛恨:dislike strongly\");\n\tmap.put(\"exemplary\",\"榜样的,值得效仿的:being a pattern, imitated;作为警告的:warning\");\n\tmap.put(\"exempt\",\"使免除:release liability\");\n\tmap.put(\"exhaust\",\"耗尽:consume entirely, complete use of;筋疲力尽:wear out\");\n\tmap.put(\"exhilarate\",\"使高兴;使兴奋:cheerful, excited\");\n\tmap.put(\"exhort\",\"敦促,力劝:urge strong\");\n\tmap.put(\"exigent\",\"紧急的:immediate\");\n\tmap.put(\"exodus\",\"大批离去:departure\");\n\tmap.put(\"exonerate\",\"免除责备:free from blame\");\n\tmap.put(\"exorbitant\",\"过度的:exceeding the customary or appropriate limits\");\n\tmap.put(\"exotic\",\"外来的,不同寻常的:unusual\");\n\tmap.put(\"expansive\",\"广阔的:great expanse;健谈的,外向的:open, talkative, effusive\");\n\tmap.put(\"expedite\",\"加快进程:speed up the progress\");\n\tmap.put(\"expedition\",\"动作迅速:speed\");\n\tmap.put(\"expiate\",\"赎罪,纠正:extinguish the guilt\");\n\tmap.put(\"expire\",\"断气,死亡:die;到期:come to an end\");\n\tmap.put(\"explicit\",\"表达清晰的:fully revealed or expressed;成熟的,完全形成的:fully developed\");\n\tmap.put(\"exploit\",\"英雄行为:notable act;最大程度地利用:employ\");\n\tmap.put(\"exponent\",\"倡导者,支持者:advocates;实践者,典型代表:full realization\");\n\tmap.put(\"expurgate\",\"净化(书等),删去(不当处):remove\");\n\tmap.put(\"exquisite\",\"成都强烈的:extreme;精致精巧的:refined taste\");\n\tmap.put(\"extant\",\"现存的:not destroyed, extinct\");\n\tmap.put(\"extemporize\",\"即兴表现:without prior preparation\");\n\tmap.put(\"extenuate\",\"减轻罪过:lessen the seriousness\");\n\tmap.put(\"extinct\",\"灭绝的:no longer existing\");\n\tmap.put(\"extinguish\",\"熄灭:put out;终止:bring to a complete end\");\n\tmap.put(\"extol\",\"赞美;吹捧:praise\");\n\tmap.put(\"extort\",\"勒索:force, intimidation\");\n\tmap.put(\"extract\",\"用力拔出:take out\");\n\tmap.put(\"extraction\",\"血统:origin, ancestry\");\n\tmap.put(\"extraneous\",\"无关的:no relevance;非主要因素的:not essential\");\n\tmap.put(\"extravagant\",\"挥霍的:spending money freely;过度的,不必要的:beyond normal acceptable limit\");\n\tmap.put(\"extricate\",\"使解脱,救出:free entanglement\");\n\tmap.put(\"exuberant\",\"非常高兴的,热情洋溢的:joyously, unrestrained;大量的,充分的:abundance\");\n\tmap.put(\"exude\",\"分泌,流出:flow forth\");\n\tmap.put(\"exult\",\"感到欢喜:rejoice\");\n\tmap.put(\"fable\",\"寓言故事:story teach a basic truth;神话,传说:story of supernatural happenings;谎言,虚构:statement in order to deceive\");\n\tmap.put(\"fabricate\",\"捏造:make up;搭建,组建,打造:bring into being by combining\");\n\tmap.put(\"facetious\",\"喜欢开玩笑的,轻浮的:joking\");\n\tmap.put(\"facile\",\"表面的,浅尝辄止的:lack of depth;容易的,唾手可得的:easily accomplished\");\n\tmap.put(\"facilitate\",\"使变容易,促进:make easy\");\n\tmap.put(\"faction\",\"派系:a party that is often contentious\");\n\tmap.put(\"fallacious\",\"谬误的,不合逻辑的:containing fallacy;欺骗性的:tending to deceive\");\n\tmap.put(\"fallow\",\"休耕的:untilled;闲置的:not being in a state of use\");\n\tmap.put(\"fail-safe\",\"保险措施:to preclude loss or injury;万无一失的:no chance of failure\");\n\tmap.put(\"falsehood\",\"谎言:untrue, made in order to deceive\");\n\tmap.put(\"falter\",\"蹒跚:walk unsteadily;犹豫踌躇:unsteady in purpose or action\");\n\tmap.put(\"fanatic\",\"狂热者:unreasoning enthusiasm;狂热的;盲信的:intense uncritical devotion\");\n\tmap.put(\"fantasy\",\"幻想:imaginative fiction;产生幻想:form a mental picture\");\n\tmap.put(\"farce\",\"(带有嘲讽元素的)滑稽戏:broadly satirical comedy;闹剧:ridiculous\");\n\tmap.put(\"fascinate\",\"强烈吸引,使入迷:hold an intense interest\");\n\tmap.put(\"fast\",\"绝食,斋戒:abstaining from food;快速的:quick;忠诚的:firm in one’s allegiance;稳固的,难以拆卸的:firmly positioned\");\n\tmap.put(\"fastidious\",\"挑剔的,极仔细的,追求完美的:meticulous attention to detail\");\n\tmap.put(\"fateful\",\"意义重大的:momentous;带来灾难的,毁灭性的:bringing death\");\n\tmap.put(\"fathom\",\"测量(深度):measure the depth;彻底理解,弄懂:come to understand\");\n\tmap.put(\"fatigue\",\"疲惫:weariness or exhaustion;(让人厌倦的)苦差事:causes weariness\");\n\tmap.put(\"fatuous\",\"愚笨的,昏庸的:foolish\");\n\tmap.put(\"faultfinder\",\"吹毛求疵的人:petty criticism\");\n\tmap.put(\"favorable\",\"赞许的:expressing approval;有利的:promote\");\n\tmap.put(\"fawn\",\"阿谀奉承:seek favor by flattery\");\n\tmap.put(\"faze\",\"打扰,使尴尬:disturb the composure\");\n\tmap.put(\"feckless\",\"无成果的,没有价值的:having no worth;粗心不负责任的:careless\");\n\tmap.put(\"fecund\",\"多产,肥沃的:fruitful\");\n\tmap.put(\"feeble\",\"衰弱的:lacking in strength\");\n\tmap.put(\"feign\",\"制造假象,装出…的样子:give a false appearance\");\n\tmap.put(\"fender\",\"缓存装置:cushioning device\");\n\tmap.put(\"feral\",\"野生的:not domesticated;动物性的:nature of a lower animal\");\n\tmap.put(\"fertilize\",\"使肥沃,使多产:make fertile\");\n\tmap.put(\"fervid\",\"酷热的:high temperature;热情的:great passion\");\n\tmap.put(\"fervor\",\"热情,狂热:great warmth\");\n\tmap.put(\"fester\",\"感染,溃烂,腐烂:corrupt\");\n\tmap.put(\"fetid\",\"恶臭的:offensive smell\");\n\tmap.put(\"fetter\",\"枷锁,限制:limits one’s freedom;束缚:restrain from motion\");\n\tmap.put(\"fiasco\",\"大失败:complete failure\");\n\tmap.put(\"fickle\",\"易变的:likely to change;不忠诚的:not true in one’s allegiance\");\n\tmap.put(\"fictitious\",\"虚构的:not real\");\n\tmap.put(\"fidelity\",\"忠诚:being faithful\");\n\tmap.put(\"figurative\",\"比喻的:denoting another\");\n\tmap.put(\"figurine\",\"小雕塑:small statue\");\n\tmap.put(\"filibuster\",\"拖延议事:for the purpose of delaying legislative action\");\n\tmap.put(\"filter\",\"过滤:pass through a filter;去除杂质:remove impurities\");\n\tmap.put(\"finale\",\"终场,结局:closing part\");\n\tmap.put(\"finesse\",\"娴熟技巧:skill;精心策划:plan out with subtle skill;(巧妙地)躲避:keep away from\");\n\tmap.put(\"finicky\",\"过分讲究的,挑剔的:extremely meticulous\");\n\tmap.put(\"flaccid\",\"不结实的,松弛的:lacking firmness\");\n\tmap.put(\"flag\",\"旗帜,象征:symbol;变得衰弱:become feeble\");\n\tmap.put(\"flamboyant\",\"艳丽夺目的,炫耀的,充满装饰的:strikingly elaborate\");\n\tmap.put(\"flatter\",\"拍马屁,奉承,讨好:praise excessively;自我感觉良好:think highly of;使显得更漂亮:show advantageously\");\n\tmap.put(\"flaw\",\"瑕疵,缺点:imperfection;降低,破坏,使不完美:reduce perfection\");\n\tmap.put(\"fledgling\",\"新生:starting out in a field\");\n\tmap.put(\"fleet\",\"舰队,车队:group of a vehicles;迅速的:with great speed;快速涌过:pass swiftly\");\n\tmap.put(\"flexible\",\"灵活的,可变的:readily changed;易受影响的:susceptible to influence\");\n\tmap.put(\"flinch\",\"畏缩;退缩:draw back\");\n\tmap.put(\"flippancy\",\"轻率,无礼:unbecoming levity\");\n\tmap.put(\"flirt\",\"调情:behave amorously;无规则地快速运动:make irregular movements\");\n\tmap.put(\"flit\",\"快速或突然地经过:pass quickly\");\n\tmap.put(\"flock\",\"人群,兽群:creatures massed together;聚集,集体行动:travel in a flock\");\n\tmap.put(\"florid\",\"辞藻华丽的,花哨的:fancy expressions;装饰华丽的:elaborately decorated\");\n\tmap.put(\"flounder\",\"笨拙地行动,挣扎:act clumsily\");\n\tmap.put(\"flourish\",\"茂盛,繁荣:achieve success;装饰:ornamentation\");\n\tmap.put(\"flout\",\"嘲弄性不理会,蔑视:treat with disregard\");\n\tmap.put(\"fluctuate\",\"波动,无规则地变动:shift back and forth\");\n\tmap.put(\"fluent\",\"表达流利的:able to express well;不费力的:minimal difficulty\");\n\tmap.put(\"fluky\",\"侥幸的:happening by good luck;偶然的:by chance\");\n\tmap.put(\"flush\",\"(肤色)健康红润的:healthy reddish;富有的:money in abundance;大量的:abundance;冲洗:pour liquid\");\n\tmap.put(\"fluster\",\"使慌乱:put into agitated confusion\");\n\tmap.put(\"foible\",\"小缺点:minor flaw\");\n\tmap.put(\"foil\",\"挫败:prevent from being successful\");\n\tmap.put(\"foment\",\"助长,煽动:promote the growth\");\n\tmap.put(\"foolproof\",\"十分简单以至于不会失败的:leave no opportunity for error, misuse or failure\");\n\tmap.put(\"footloose\",\"无拘无束的,自由的:having no attachments\");\n\tmap.put(\"forbearance\",\"克制,忍耐:tolerance and restraint;友好仁慈的态度:kind, gentle or compassionate treatment\");\n\tmap.put(\"forebear\",\"祖先:an ancestor\");\n\tmap.put(\"forestall\",\"预先阻止:prevent beforehand\");\n\tmap.put(\"foreword\",\"前言:preface\");\n\tmap.put(\"forge\",\"伪造:imitate falsely;铸造,铸就:form;\");\n\tmap.put(\"formidable\",\"令人害怕的:causing fear;艰难的:requiring effort\");\n\tmap.put(\"forthright\",\"直率的,说话率真的:free in expressing opinions;直接的,不绕弯子的:free from ambiguity or evasiveness:going straight to the point\");\n\tmap.put(\"fortify\",\"加固,鼓励:give physical strength;做好心理准备:prepare mentally\");\n\tmap.put(\"foster\",\"促进,鼓励,培养:help the growth;养育:bring to maturity\");\n\tmap.put(\"founder\",\"建立者:one establishes;完败:fail utterly;沉没:become submerged\");\n\tmap.put(\"fracas\",\"争吵,吵闹:physical dispute, noisy fight\");\n\tmap.put(\"fracture\",\"破裂:breaking;打碎,破坏:separate into pieces\");\n\tmap.put(\"fragile\",\"易碎的:broken;易受伤的,脆弱的:easily injured\");\n\tmap.put(\"frail\",\"虚弱的:weak;(意志)薄弱的:weak;(希望)渺茫的:slight\");\n\tmap.put(\"fraudulent\",\"欺诈的:fraud\");\n\tmap.put(\"fraught\",\"充满的:full;令人忧虑的:emotional distress\");\n\tmap.put(\"frenzy\",\"疯狂,狂怒:mental agitation\");\n\tmap.put(\"frequent\",\"时常拜访:often;时常发生的,重复再现的:short intervals\");\n\tmap.put(\"fretful\",\"易怒的,烦躁的:vexed\");\n\tmap.put(\"friable\",\"易碎的:easily crumbled\");\n\tmap.put(\"friction\",\"摩擦:rubbing;冲突,不和:clashing;\");\n\tmap.put(\"frigid\",\"严寒的:cold;冷漠的:lacking warmth\");\n\tmap.put(\"fringe\",\"边缘:border;与…接壤,位于…的边缘:be adjacent\");\n\tmap.put(\"frivolous\",\"轻浮的:unbecoming levity;不重要的:little importance\");\n\tmap.put(\"frothy\",\"用轻薄材料制作的:light;(内容等)快乐轻佻、不严肃的:gaily frivolous\");\n\tmap.put(\"frowsy\",\"邋遢的:slovenly;味道难闻的:unpleasant smell\");\n\tmap.put(\"frugal\",\"节约的:economy\");\n\tmap.put(\"frustrate\",\"挫败,阻挠:prevent;使沮丧:lessen the courage\");\n\tmap.put(\"full-bodied\",\"重要的:importance;味道浓烈的:richness flavor\");\n\tmap.put(\"fulminate\",\"大声斥责:thunderous denunciation\");\n\tmap.put(\"fumble\",\"笨拙地做:awkward attempts;(无意识的)失误:departure from truth\");\n\tmap.put(\"furor\",\"喧闹,狂怒,激动,狂热:intense excitement\");\n\tmap.put(\"furtive\",\"鬼鬼祟祟的;秘密的:stealth\");\n\tmap.put(\"fury\",\"暴怒:rage\");\n\tmap.put(\"fussy\",\"谨慎的:involving great care;过分雕琢的:excessively decorated;挑剔的:hard to please\");\n\tmap.put(\"fusty\",\"过时的:old-fashioned;腐臭的:stale odors\");\n\tmap.put(\"futile\",\"无效的,无用的:ineffective;不严肃的:lacking in seriousness\");\n\tmap.put(\"gadfly\",\"刺激物:provocative stimulus;令人反感的人:annoys\");\n\tmap.put(\"gaffe\",\"(社交上)失礼,失态:social blunder;明显的错误,错误判断:blatant mistake\");\n\tmap.put(\"gainsay\",\"否认:declare false;反对:oppose\");\n\tmap.put(\"gall\",\"(使)焦躁,激怒:irritate;深深的敌意:ill will;大胆,无耻:boldness\");\n\tmap.put(\"gallant\",\"英勇的:brave, chivalrous;高贵的,慷慨的:dignified and generous\");\n\tmap.put(\"galvanize\",\"(好似用电击)刺激:stimulate excite\");\n\tmap.put(\"gamble\",\"赌博,孤注一掷:bet;(使)受到威胁,冒险:in danger\");\n\tmap.put(\"gambol\",\"欢跳,雀跃:playfully\");\n\tmap.put(\"gangly\",\"身材瘦长的:tall\");\n\tmap.put(\"garble\",\"曲解,篡改,混淆(以至使无法理解):distort misleading;筛选,除杂:remove\");\n\tmap.put(\"gargantuan\",\"巨大的:tremendous;\");\n\tmap.put(\"garish\",\"过于鲜艳的,过于张扬的:strident color\");\n\tmap.put(\"garment\",\"衣服:clothing\");\n\tmap.put(\"garrulous\",\"啰嗦的,话多得令人厌烦的:tiresomely, talkative\");\n\tmap.put(\"gash\",\"深长的伤口或切口:deep cut;砍伤,切开:make gash\");\n\tmap.put(\"gasification\",\"气化:gas;\");\n\tmap.put(\"gauche\",\"笨拙的,缺乏社交经验的:lacking grace\");\n\tmap.put(\"gaudy\",\"俗丽的:excessively showy\");\n\tmap.put(\"gauge\",\"测量标准:measurement standard;判定:determine\");\n\tmap.put(\"gear\",\"调整(以配合):adjust\");\n\tmap.put(\"genial\",\"和蔼亲切的:easygoing;友好的,热心的:kindly feeling;温暖的:neither too high nor too low\");\n\tmap.put(\"genteel\",\"有教养的,不粗俗的:free from vulgarity\");\n\tmap.put(\"germane\",\"有关的,适当的:relevant\");\n\tmap.put(\"gibe\",\"嘲弄:taunting words\");\n\tmap.put(\"giddy\",\"轻率不严肃的:lacking in seriousness;喜悦的:elated\");\n\tmap.put(\"gild\",\"(带欺骗性地)修改,润色:deceptively attractive\");\n\tmap.put(\"gist\",\"要点:main point\");\n\tmap.put(\"gladiator\",\"角斗士:engaged fight death;参与打斗或辩论的人:engaging in controversy\");\n\tmap.put(\"glaze\",\"给…上釉,妆点:coat glaze;使平滑:glossy surface\");\n\tmap.put(\"glib\",\"流利圆滑的(常含有不真诚或欺诈的成分),油腔滑调的:fluency insincere deceitful;缺乏深度的,肤浅的:lacking depth\");\n\tmap.put(\"glisten\",\"闪光:shine sparkling\");\n\tmap.put(\"glitch\",\"小故障:minor malfunction\");\n\tmap.put(\"gloat\",\"幸灾乐祸,自鸣得意:self-satisfaction\");\n\tmap.put(\"gloomy\",\"黯淡无光的:without light;忧郁的:low spirits\");\n\tmap.put(\"gloss\",\"简短解释:brief explanation, obscure;(欺骗性的)光鲜外表:attractive appearance;敷衍潦草做事(甚至忽略):too lightly;开脱(罪名):less bad\");\n\tmap.put(\"glossy\",\"平滑的,有光泽的:smooth surface\");\n\tmap.put(\"glut\",\"使过量,使充满:beyond capacity\");\n\tmap.put(\"glutinous\",\"胶状的粘的:glue\");\n\tmap.put(\"glutton\",\"贪吃者:immoderate food\");\n\tmap.put(\"goad\",\"刺激,驱使,激发:incite rouse\");\n\tmap.put(\"gobble\",\"狼吞虎咽:eat greedily\");\n\tmap.put(\"goggle\",\"凝视:look\");\n\tmap.put(\"goldbrick\",\"逃避工作和责任:shirk responsibilities\");\n\tmap.put(\"gorge\",\"峡谷:canyon;狼吞虎咽:eat greedily\");\n\tmap.put(\"gossamer\",\"虚无缥缈的东西:insubstantial;轻薄的,薄弱的:light\");\n\tmap.put(\"gourmand\",\"嗜食者,大胃王:excessively fond of eating\");\n\tmap.put(\"gourmet\",\"美食家:connoisseur food\");\n\tmap.put(\"grandeur\",\"宏伟,壮丽:grand\");\n\tmap.put(\"grandiloquent\",\"(语言等)浮夸的:extravagantly, bombastic\");\n\tmap.put(\"grandiose\",\"自命不凡的,浮夸的:grandeur;宏大的:greatness\");\n\tmap.put(\"grandstand\",\"为了给人留下印象而表演,哗众取宠:impress\");\n\tmap.put(\"grate\",\"刮擦(以发出刺耳的声音):rasping;骚扰,惹恼:irritate\");\n\tmap.put(\"gratify\",\"使满足:desired please\");\n\tmap.put(\"gratuitous\",\"无根据的,无理由的:unwarranted;无报酬的,免费的:without return;多余的:not needed\");\n\tmap.put(\"green\",\"无经验的:deficient experience\");\n\tmap.put(\"gregarious\",\"爱社交的:enjoy the company;群居的:group with others\");\n\tmap.put(\"grieve\",\"(使)感到悲伤:deep sadness\");\n\tmap.put(\"grimace\",\"因痛苦而面部扭曲,(作)怪相,(作)鬼脸:contortion pain, disgust or disapproval\");\n\tmap.put(\"grin\",\"咧嘴笑,咧嘴笑着表示:express an emotion\");\n\tmap.put(\"gripe\",\"抱怨:dissatisfaction;(通过连续让人讨厌的举动)激怒,惹怒:disturb\");\n\tmap.put(\"grisly\",\"令人反感的,令人恐惧的:repugnance\");\n\tmap.put(\"groove\",\"享受,极其满意,过得快活:take pleasure in\");\n\tmap.put(\"grotesque\",\"难看的:unpleasant\");\n\tmap.put(\"grovel\",\"卑躬屈膝:draw back, fearful submission\");\n\tmap.put(\"grueling\",\"费时间花心思的:requiring\");\n\tmap.put(\"guile\",\"狡猾,狡诈:misleading\");\n\tmap.put(\"guilt\",\"自责,悔恨:wrongdoing\");\n\tmap.put(\"gull\",\"欺骗:untrue\");\n\tmap.put(\"gullible\",\"易受骗的,易被利用的:cheated\");\n\tmap.put(\"gush\",\"(使)大量涌出:great volume;(使)情感强烈外溢:exaggerated display\");\n\tmap.put(\"gust\",\"情感爆发:sudden intense expression\");\n\tmap.put(\"guzzle\",\"狂饮:drink greedily\");\n\tmap.put(\"hack\",\"雇佣文人:writer commercial;乱砍;开辟:irregular blows;成功完成:skillfully or efficiently;忍受:put up with\");\n\tmap.put(\"hackneyed\",\"陈腐的,缺乏创新的:lacking freshness originality\");\n\tmap.put(\"halcyon\",\"宁静的,平静的:free from;繁荣的,丰富的:affluent\");\n\tmap.put(\"hale\",\"强壮的,健壮的:free from infirmity or illness;拖,拉:cause to follow\");\n\tmap.put(\"half-baked\",\"不明智的:lack of good sense or judgment\");\n\tmap.put(\"hallmark\",\"典型的特征:conspicuous feature\");\n\tmap.put(\"hallow\",\"尊敬,把…视为神圣:respect\");\n\tmap.put(\"hallucination\",\"错觉:false idea\");\n\tmap.put(\"ham-handed\",\"笨手笨脚的:lacking dexterity\");\n\tmap.put(\"hammer\",\"屡次重申:repeated\");\n\tmap.put(\"hamper\",\"阻碍:restrict the movement, impede\");\n\tmap.put(\"hamstring\",\"使无效,使无力:ineffective\");\n\tmap.put(\"hangdog\",\"伤心的,沮丧的:sad, dejected\");\n\tmap.put(\"hanker\",\"向往,渴望:desire, yearn\");\n\tmap.put(\"haphazard\",\"无秩序的,无目标的:lack of plan, order or direction\");\n\tmap.put(\"harangue\",\"(发表)长篇大论:long pompous\");\n\tmap.put(\"harass\",\"烦扰:irritate persistently;耗尽…的体力:use up\");\n\tmap.put(\"harbinger\",\"预言者:presages\");\n\tmap.put(\"harbor\",\"提供住处,隐匿:provide habitat;心怀,牢记:keep in one’s mind\");\n\tmap.put(\"hard-bitten\",\"顽强的,经受得住困境、压力的:able to withstand\");\n\tmap.put(\"hardy\",\"顽强的:able to withstand;愿意冒风险的:willing to take risks\");\n\tmap.put(\"harmonious\",\"和谐一致的:agreeably related\");\n\tmap.put(\"harness\",\"利用:utilize\");\n\tmap.put(\"harrow\",\"折磨,使苦恼:distress torment\");\n\tmap.put(\"harry\",\"不断烦扰,骚扰:distress, harass\");\n\tmap.put(\"harsh\",\"粗糙的,不具有美感的:coarse rough disagreeable sense;严厉的:exacting\");\n\tmap.put(\"hasten\",\"促进:speed-up, accelerate\");\n\tmap.put(\"hasty\",\"轻率的:superficial excessive or careless speed\");\n\tmap.put(\"haunt\",\"常去拜访:frequent;不断地想起,萦绕心头:obsess\");\n\tmap.put(\"hauteur\",\"傲慢,自大:arrogance\");\n\tmap.put(\"haven\",\"安全的地方:place of safety\");\n\tmap.put(\"havoc\",\"大混乱:out of order;大范围破坏:nonexistent unsound or useless\");\n\tmap.put(\"headlong\",\"鲁莽的:without deliberation\");\n\tmap.put(\"hearken\",\"倾听,关注:attention\");\n\tmap.put(\"hearten\",\"给予鼓励,鼓舞:give strength courage, encourage\");\n\tmap.put(\"heartrending\",\"令人心碎的:sorrow distress\");\n\tmap.put(\"hedonism\",\"享乐主义:doctrine pleasure\");\n\tmap.put(\"hegemony\",\"霸权,统治权:preponderant authority\");\n\tmap.put(\"heinous\",\"可憎的,十恶不赦的:hatefully\");\n\tmap.put(\"hew\",\"遵守:confirm, hold to something firmly;支持:steadfast support\");\n\tmap.put(\"herald\",\"告知,宣布:make known;预示,预兆:indication of beforehand\");\n\tmap.put(\"heresy\",\"异教,和普遍观点相悖的说话:controversial or unorthodox opinion\");\n\tmap.put(\"heretical\",\"异教的,异端邪说的:departure standards\");\n\tmap.put(\"hermetic\",\"深奥的:abstruseness\");\n\tmap.put(\"hesitance\",\"犹豫,不情愿:hesitant, reluctant\");\n\tmap.put(\"heterodox\",\"非正统的,异端的:unorthodox opinions\");\n\tmap.put(\"hidebound\",\"死板的,极度保守的:tending to favor\");\n\tmap.put(\"hideous\",\"非常丑陋的:ugly\");\n\tmap.put(\"hie\",\"匆匆忙忙:hasten\");\n\tmap.put(\"hike\",\"(使)上涨:rise up to a higher place or position\");\n\tmap.put(\"hilarious\",\"非常好笑的:extremely funny\");\n\tmap.put(\"histrionic\",\"戏剧的,演员的:relating to actors\");\n\tmap.put(\"hive\",\"忙碌之地:activity;储备,积累:store up\");\n\tmap.put(\"hoard\",\"贮藏,秘藏:keep hidden\");\n\tmap.put(\"hoary\",\"极老的:extremely old\");\n\tmap.put(\"hoax\",\"欺骗:cause to believe untrue\");\n\tmap.put(\"hodgepodge\",\"大杂烩:mixture dissimilar\");\n\tmap.put(\"homage\",\"尊敬,敬意:respect\");\n\tmap.put(\"homely\",\"其貌不扬的,朴素简单的:not attractive\");\n\tmap.put(\"homily\",\"冗长乏味的道德演讲或训诫:admonition\");\n\tmap.put(\"homogenize\",\"使统一化:make agree single established standard\");\n\tmap.put(\"hone\",\"磨快:sharpen\");\n\tmap.put(\"hoodwink\",\"欺骗:deceptive\");\n\tmap.put(\"hortative\",\"鼓励的:exhortation\");\n\tmap.put(\"hovel\",\"茅屋:small wretched dirty\");\n\tmap.put(\"hubris\",\"狂妄自大:exaggerated pride, self-confidence\");\n\tmap.put(\"humble\",\"谦逊的:meekness, modesty;顺从的,谦卑的:humility or unseemly submissiveness\");\n\tmap.put(\"humility\",\"谦卑,谦逊:absence of any feeling s better\");\n\tmap.put(\"humor\",\"幽默,令人发笑的事物:comical or amusing;迎合,迁就:comply with\");\n\tmap.put(\"hurricane\",\"飓风:a violent rotating storm;飓风般的事物,引起动荡的事物:resembling a hurricane\");\n\tmap.put(\"husband\",\"节俭,勤俭持家:use economically\");\n\tmap.put(\"husk\",\"(果类或谷物的)外壳:outer covering;剥去:remove\");\n\tmap.put(\"husky\",\"(尤指声音)沙哑的,粗糙的:rough;高大威猛的:muscular\");\n\tmap.put(\"hybrid\",\"杂交品种,混合品种:mixed origin;杂交的:parents of different races\");\n\tmap.put(\"hymn\",\"赞歌,赞美诗:song of praise;赞美:proclaim the glory\");\n\tmap.put(\"hyperbole\",\"夸张:exaggeration used for emphasis\");\n\tmap.put(\"hypnotic\",\"催眠的:cause sleep\");\n\tmap.put(\"hypocritical\",\"虚伪的:not being what one appears to be\");\n\tmap.put(\"iconoclast\",\"特立独行的人:not conform accepted standards\");\n\tmap.put(\"idolatrize\",\"(通常盲目)崇拜:admires intensely\");\n\tmap.put(\"idyll\",\"无忧无虑的生活:carefree episode\");\n\tmap.put(\"ignite\",\"点燃:set fire to;激起,唤起(感情):arouse the passions\");\n\tmap.put(\"ignominy\",\"耻辱:lost the esteem\");\n\tmap.put(\"illiteracy\",\"文盲:unable to read and write\");\n\tmap.put(\"illuminati\",\"智者:enlightened;精英:best of a class\");\n\tmap.put(\"illuminate\",\"照明:make shining;阐明:make plain;启迪,启发:spiritual understanding\");\n\tmap.put(\"illusory\",\"幻觉的,虚幻的:illusion\");\n\tmap.put(\"imbibe\",\"喝水,摄取水分:take in liquid\");\n\tmap.put(\"imbroglio\",\"困境,复杂的局面:complicated situation;纷争:angry expression of differing opinions\");\n\tmap.put(\"imitation\",\"仿制品:like something else\");\n\tmap.put(\"immaculate\",\"干净的,纯净的:free from dirt;完美的,没有任何错误的:without fault\");\n\tmap.put(\"immanent\",\"内在的:innermost\");\n\tmap.put(\"immaterial\",\"非实体的:not composed of matter;无关的,不重要的:no relevance\");\n\tmap.put(\"immature\",\"未完全发展的,未发育成熟的:lacking complete growth;(思维、举止)不够成熟的:lacking maturity\");\n\tmap.put(\"immemorial\",\"古老的:from the distant past\");\n\tmap.put(\"immune\",\"不易被感染的,有免疫力的:having resistance to infection;不受影响的:not affected by influence;不受约束的,免除的:not subject to an obligation\");\n\tmap.put(\"immure\",\"监禁,禁闭;使闭门不出:confine\");\n\tmap.put(\"immutable\",\"不可变的:not capable of changing\");\n\tmap.put(\"impassive\",\"冷漠的,无感情的:no sign of feeling\");\n\tmap.put(\"impeccable\",\"无罪的:free from sin;无暇的,无可挑剔的:free from fault\");\n\tmap.put(\"impecunious\",\"贫穷的:no money\");\n\tmap.put(\"impede\",\"妨碍,阻碍:slow the progress of\");\n\tmap.put(\"impending\",\"即将发生的:soon to take place\");\n\tmap.put(\"impenetrable\",\"不可渗透的,不可穿透的:impossible to get through;难以理解的:incapable of being comprehended\");\n\tmap.put(\"impenitent\",\"不悔悟的:not regretful\");\n\tmap.put(\"imperative\",\"命令:must be obeyed;命令的,强制性的:forcing one’s compliance;迫切的:needing immediate attention;必要的:impossible to do without\");\n\tmap.put(\"imperial\",\"帝国的,帝王的:empire;巨大的,令人惊叹的:impressive in size\");\n\tmap.put(\"imperious\",\"爱发号施令的:ordering people;傲慢的,专横呃:arrogantly domineering;迫切的:compelling\");\n\tmap.put(\"impertinent\",\"无关紧要的:not having relevance;粗鲁无礼的,大胆的:insolent rudeness;不守礼节的,不为他人着想的:lack of manners\");\n\tmap.put(\"imperturbable\",\"沉着冷静的,淡定的:extreme calm\");\n\tmap.put(\"impervious\",\"不可渗透的,不可穿透的:not allowing entrance;不能被破坏的:not capable of being damaged;不为所动的:not capable of being affected\");\n\tmap.put(\"impetuous\",\"冲动的,性急的,轻率的:impulsive vehemence;剧烈的,猛烈的:violence of movement\");\n\tmap.put(\"impious\",\"不敬神的:lacking reverence\");\n\tmap.put(\"implacable\",\"固执的:sticking to an opinion;无法平息的:not capable of being appeased\");\n\tmap.put(\"implement\",\"工具:device;执行,实施:carry out\");\n\tmap.put(\"implode\",\"(使)剧烈收缩,(使)坍塌,(使)内爆:collapse inward\");\n\tmap.put(\"imposing\",\"宏伟壮丽的:impressive\");\n\tmap.put(\"importune\",\"恳求,迫切请求:urgent manner\");\n\tmap.put(\"impostor\",\"冒充者:assumes false identity\");\n\tmap.put(\"impotent\",\"无生育能力的:unable to produce fruit;无力的,无能的:lacking in power\");\n\tmap.put(\"imprecise\",\"不精确的:not precise\");\n\tmap.put(\"impromptu\",\"即席的表演:done extemporaneously;即席的,即兴的:without previous preparation\");\n\tmap.put(\"improvise\",\"即兴而作:perform with little or no preparation\");\n\tmap.put(\"imprudent\",\"不明智的:lacking good judgment\");\n\tmap.put(\"impudent\",\"放肆大胆的,无礼的:boldness or disregard\");\n\tmap.put(\"impugn\",\"责难,攻击,抨击:attack as false\");\n\tmap.put(\"impuissance\",\"无权,虚弱:lack of power\");\n\tmap.put(\"inadvertent\",\"偶然发生的:by chance;疏忽的,不留意的:unintentional lack of care\");\n\tmap.put(\"inalienable\",\"不可剥夺的,不能让与的:cannot be transferred\");\n\tmap.put(\"inane\",\"空洞的:lacking significance\");\n\tmap.put(\"inanimate\",\"无生命的:not living\");\n\tmap.put(\"inaugurate\",\"使就职:induct into an office;开始:begin\");\n\tmap.put(\"incandescent\",\"明亮灿烂的:bright;热情饱满的,感情强烈的:zeal\");\n\tmap.put(\"incantation\",\"咒语:magic power\");\n\tmap.put(\"incarnate\",\"化身的,人性化的:bodily nature and form;使(思想、理论)具体,体现:constitute an embodiment\");\n\tmap.put(\"incendiary\",\"煽动者:person who stirs up;煽动性的:tending to inflame\");\n\tmap.put(\"incense\",\"芳香:pleasant smell;激怒:extremely angry\");\n\tmap.put(\"inception\",\"开端,开始:beginning\");\n\tmap.put(\"incessant\",\"无间断的:without interruption\");\n\tmap.put(\"inch\",\"少量,很短的距离:small degree;(使)慢慢移动:move slowly\");\n\tmap.put(\"inchoate\",\"新生的,才开始的:early stage;未完全成型的:imperfectly formed\");\n\tmap.put(\"incinerate\",\"将…烧成灰烬:burn to ashes\");\n\tmap.put(\"incipient\",\"起初的,初现的:beginning to come into being\");\n\tmap.put(\"incite\",\"煽动,激起:provoke\");\n\tmap.put(\"inclement\",\"(天气等)恶劣的:lacking mildness;无情的,残酷的:unmerciful\");\n\tmap.put(\"incogitant\",\"考虑不周到的,不体谅的:inconsiderate\");\n\tmap.put(\"incongruent\",\"不全等的;不一致的:not conforming\");\n\tmap.put(\"inconsequential\",\"不合逻辑的:not following good reasoning;不重要的:no significance\");\n\tmap.put(\"incontrovertible\",\"无可争议的:not open to question\");\n\tmap.put(\"incorrigible\",\"不可救药的,积习难改的:incapable of being corrected;无法管制的:impossible to control\");\n\tmap.put(\"incriminate\",\"归罪于:accuse of a crime\");\n\tmap.put(\"incubate\",\"孵化:cover and warm eggs;帮助,培养,促进:aid\");\n\tmap.put(\"inculpate\",\"归罪于:incriminate\");\n\tmap.put(\"incursion\",\"入侵:hostile entrance\");\n\tmap.put(\"indelible\",\"(印记等)无法擦除的:impossible to remove;无法忘怀的:not easily forgotten\");\n\tmap.put(\"indemnity\",\"(损害、伤害等的)保险赔偿:compensation\");\n\tmap.put(\"indict\",\"起诉,控告:accuse\");\n\tmap.put(\"indifferent\",\"公平的:impartiality;(质量、档次等)中规中矩的,一般的:average;不感兴趣的,冷漠的:lack of interest\");\n\tmap.put(\"indigenous\",\"土产的,本地的:originating;与生俱来的,先天的:innermost nature\");\n\tmap.put(\"indigent\",\"贫穷的:lacking money\");\n\tmap.put(\"indispensable\",\"必不可少的,不可或缺的:impossible to do without\");\n\tmap.put(\"indoctrinate\",\"教育,灌输思想:instruct\");\n\tmap.put(\"indolent\",\"懒惰的:averse to activity\");\n\tmap.put(\"inducement\",\"动机,刺激源:motive;劝说,游说:pleading with someone to accept\");\n\tmap.put(\"indulgent\",\"(对己)放纵的,(对他人)纵容的:given to indulgence\");\n\tmap.put(\"indurate\",\"铁石心肠的,冷酷无情的:a lack of sympathy;使变硬:physically firm;使习惯于(如艰苦或尴尬之境况):withstand physical hardship\");\n\tmap.put(\"industrious\",\"勤勉的:diligent\");\n\tmap.put(\"ineffable\",\"难以表达的:incapable expressed\");\n\tmap.put(\"ineluctable\",\"无法逃避的,必然的:not to be avoided\");\n\tmap.put(\"inept\",\"愚笨的,荒谬的:lack of judgment;不恰当的,不合时宜的:not appropriate;不称职的,无能力的:incompetent\");\n\tmap.put(\"inert\",\"(人)懒惰缺乏活力的;(物品)惰性的:sluggish, deficient\");\n\tmap.put(\"inevitable\",\"不可避免的,必然的:incapable avoided\");\n\tmap.put(\"inexorable\",\"无法劝阻的,不为所动的:not persuaded\");\n\tmap.put(\"infamous\",\"臭名昭著的:bad reputation\");\n\tmap.put(\"infatuate\",\"使迷恋:inspire unreasoning love\");\n\tmap.put(\"inferno\",\"大火:fire;地狱:resembles hell\");\n\tmap.put(\"infiltrate\",\"秘密潜入:enter surreptitiously\");\n\tmap.put(\"infinite\",\"无尽的,无限的:no boundaries\");\n\tmap.put(\"infirm\",\"虚弱的:weak in body;不果断的,优柔寡断的:lacking firmness of will\");\n\tmap.put(\"inflame\",\"点燃,燃烧:set on fire;使加剧:more violent\");\n\tmap.put(\"infelicitous\",\"不愉快的,不幸的:unfortunate;不恰当的,不合时宜的:not appropriate\");\n\tmap.put(\"influx\",\"涌入:coming in\");\n\tmap.put(\"infuse\",\"灌输,使…充满:fill;鼓舞:inspire\");\n\tmap.put(\"infuriate\",\"激怒:make furious\");\n\tmap.put(\"ingenious\",\"聪明的,有创造才能的:resourceful, cleverness\");\n\tmap.put(\"ingenuity\",\"独创性,创新性:inventive\");\n\tmap.put(\"ingenuous\",\"天真纯朴的:lacking cunning;坦白的:straightforward\");\n\tmap.put(\"ingest\",\"摄入,咽下:take into body\");\n\tmap.put(\"ingrained\",\"本质的,根深蒂固的:firmly established\");\n\tmap.put(\"ingratiating\",\"讨人喜欢的:winning favor;逢迎的,意在奉承的:gain favor\");\n\tmap.put(\"inherent\",\"内在的,本质的:essential\");\n\tmap.put(\"inimical\",\"带有敌意的:hostility;危及某人利益的,不利的:opposed to interests\");\n\tmap.put(\"inimitable\",\"无法效仿的,独特的:not imitated\");\n\tmap.put(\"iniquity\",\"邪恶,不公正:immorality, injustice\");\n\tmap.put(\"initiate\",\"创造,发动促进:cause beginning;刚入门的新手:person initiation\");\n\tmap.put(\"inkling\",\"轻微暗示,小提示:slight indication;略知:vague notion\");\n\tmap.put(\"innocuous\",\"无害的:no injury;乏味的,不会引起敌意的:not arouse\");\n\tmap.put(\"innovative\",\"创新性的:introducing innovations\");\n\tmap.put(\"inquisitive\",\"过分好奇的:inordinately curious\");\n\tmap.put(\"insensible\",\"无知觉的:lost consciousness;漠不关心的:not responsive;粗俗的,没品味的:lacking in refinement\");\n\tmap.put(\"insensitive\",\"缺乏机智圆滑的,缺乏社交技巧的:lacking tact;不敏感的,麻木的:not responsive\");\n\tmap.put(\"insentient\",\"无感觉的,无知觉的:lacking perception;一知半解的,略懂的:not having a deep understanding\");\n\tmap.put(\"insight\",\"深刻的理解:apprehending nature\");\n\tmap.put(\"insipid\",\"(食品)清淡无味的:lacking favor;平淡的,无聊的:lacking interest\");\n\tmap.put(\"insolent\",\"粗野的,无礼的:rude\");\n\tmap.put(\"insouciant\",\"无忧虑的,不在乎的:free from concern\");\n\tmap.put(\"instate\",\"任命:establish rank\");\n\tmap.put(\"instigate\",\"煽动,激起:urge forward, stir up\");\n\tmap.put(\"instill\",\"慢慢滴入:enter;灌输:impart\");\n\tmap.put(\"institute\",\"创立,制定:establish;机构:organization\");\n\tmap.put(\"insubordinate\",\"不服从权威的:not submissive\");\n\tmap.put(\"insular\",\"(观念、想法等)孤立狭隘的:narrow provincial viewpoint\");\n\tmap.put(\"insulate\",\"使绝缘,使隔离:detached situation\");\n\tmap.put(\"insurgent\",\"叛乱分子:opposes authority\");\n\tmap.put(\"intangible\",\"无法感知的,无形的:capable perceived\");\n\tmap.put(\"integral\",\"构成整体所必需的:essential;完整的:not lacking any part\");\n\tmap.put(\"integrity\",\"正直:adherence moral;完整性:being whole\");\n\tmap.put(\"intelligible\",\"可理解的:being understood\");\n\tmap.put(\"intemperate\",\"无节制的,极端的,不温和的:not temperate\");\n\tmap.put(\"intensify\",\"加强,激化:make intense\");\n\tmap.put(\"inter\",\"埋葬:place in grave\");\n\tmap.put(\"intercessor\",\"调停者:mediates\");\n\tmap.put(\"interdict\",\"禁止:forbid;阻止:stop, seize or interrupt\");\n\tmap.put(\"interim\",\"中间过渡时期,间隔:time between event;暂时的:for the time being\");\n\tmap.put(\"interlock\",\"连锁,连结:joined closely\");\n\tmap.put(\"interminable\",\"无尽头的:no end\");\n\tmap.put(\"intermittent\",\"间歇的,断断续续的:not continuous;不定期的:lacking regularity\");\n\tmap.put(\"interregnum\",\"过渡期:break\");\n\tmap.put(\"interrogate\",\"质问,审问:question formally\");\n\tmap.put(\"intimate\",\"有紧密联系的,亲密无间的:close association;不为人知的:not known;密友:person who has a strong liking;迂回地交流,间接地沟通:communicate indirectly\");\n\tmap.put(\"intimidate\",\"威吓:frighten\");\n\tmap.put(\"intoxicant\",\"使人陶醉的东西(尤指酒精饮料):intoxicates\");\n\tmap.put(\"intransigent\",\"不妥协的,固执的:refusal to compromise\");\n\tmap.put(\"intrepid\",\"无谓的:resolute fearlessness\");\n\tmap.put(\"intrigue\",\"阴谋:a secret plan;激起…的兴趣:arouse curiosity\");\n\tmap.put(\"intrinsic\",\"固有的,内在的:essential\");\n\tmap.put(\"intuitive\",\"直觉的:by intuition\");\n\tmap.put(\"inundate\",\"淹没:cover with flood\");\n\tmap.put(\"inure\",\"使习惯接受不好的东西:accustom;使坚强:withstand physical hardship\");\n\tmap.put(\"invective\",\"侮辱性的:characterized by insult\");\n\tmap.put(\"inveigh\",\"激烈抗议,表示强烈不满:protest vehemently\");\n\tmap.put(\"inveigle\",\"诱骗:win over by coaxing\");\n\tmap.put(\"inventory\",\"存货清单:list all goods;(包含要点的)简介:short statement\");\n\tmap.put(\"inveterate\",\"积习的:firmly established\");\n\tmap.put(\"invidious\",\"惹人反感的:cause discontent;羡慕嫉妒恨的:resentment of another’s possessions\");\n\tmap.put(\"invigorate\",\"使精神,使强壮,鼓舞激励:impart vigor\");\n\tmap.put(\"invincible\",\"不可战胜的,不可超越的:incapable conquered\");\n\tmap.put(\"invoke\",\"实施:put into effect;产生,造成:be the cause\");\n\tmap.put(\"irascible\",\"易怒的:easily provoked anger\");\n\tmap.put(\"irate\",\"极其愤怒的:extremely angry\");\n\tmap.put(\"iridescent\",\"五颜六色的:lustrous colors\");\n\tmap.put(\"irk\",\"令人烦恼的事物:source of irritation;使烦恼,使厌倦:irritating\");\n\tmap.put(\"ironclad\",\"非常坚固的,坚不可摧的:unbreakable\");\n\tmap.put(\"irradicable\",\"不能根除的:impossible destroy\");\n\tmap.put(\"irreducible\",\"(数)不可约分的:incapable factored\");\n\tmap.put(\"irrigate\",\"灌溉:supply water;冲洗:flush\");\n\tmap.put(\"irritate\",\"刺激,惹恼:provoke anger\");\n\tmap.put(\"issue\",\"(有争议的)话题,议题:matter that is in dispute;发布(期刊)等:produce and release;(使)流出:flow out\");\n\tmap.put(\"jabber\",\"快而不清楚地说:talk rapidly, indistinctly\");\n\tmap.put(\"jaded\",\"疲惫的:depleted in strength;厌倦的,没兴趣没热情的:patience exhausted\");\n\tmap.put(\"jape\",\"嘲弄:mockingly\");\n\tmap.put(\"jargon\",\"行业术语:specialized or technical language\");\n\tmap.put(\"jarring\",\"刺耳的:discordant;震惊的:strong emotional reaction\");\n\tmap.put(\"jaundice\",\"(因嫉妒或厌世而产生的)偏见:bias\");\n\tmap.put(\"jaunty\",\"轻快呃,活泼的:sprightly\");\n\tmap.put(\"jejune\",\"无趣乏味的:not interesting;幼稚的:annoying qualities children\");\n\tmap.put(\"jettison\",\"丢弃,投弃:cast\");\n\tmap.put(\"jeopardy\",\"危险: risk, danger\");\n\tmap.put(\"jest\",\"轻浮的态度,戏谑:frivolous\");\n\tmap.put(\"jibe\",\"意见一致:agree\");\n\tmap.put(\"jingoist\",\"极端爱国激进分子(通常表现为好战的对外政策):extreme nationalism belligerent\");\n\tmap.put(\"jitters\",\"紧张,不安:panic, nervousness\");\n\tmap.put(\"jocular\",\"搞笑的,欢乐的:joking, playful\");\n\tmap.put(\"jocund\",\"欢快的,高兴的:sprightly lighthearted\");\n\tmap.put(\"jog\",\"慢跑:movement exercise;唤起:rouse\");\n\tmap.put(\"jolt\",\"突然移动:move sudden;惊吓:unpleasant surprise\");\n\tmap.put(\"jot\",\"简要记录:write briefly\");\n\tmap.put(\"jovial\",\"愉快的:good-mannered, jollity, conviviality\");\n\tmap.put(\"jubilant\",\"喜悦的:joyful\");\n\tmap.put(\"judicious\",\"明智的,慎重的:judgment prudent\");\n\tmap.put(\"juggernaut\",\"无法阻挡的力量的,摧毁一切的强大力量:overwhelming force\");\n\tmap.put(\"ken\",\"视野范围:vision;知道,了解(人或物):know\");\n\tmap.put(\"kidnap\",\"绑架勒索:detain unlawful force\");\n\tmap.put(\"kindle\",\"点燃:set fire, ignite\");\n\tmap.put(\"kindred\",\"类似的;具有相似或相近的起源、本性或性质的:similar origin\");\n\tmap.put(\"knack\",\"诀窍,聪明的做法:clever\");\n\tmap.put(\"knead\",\"揉捏,塑造:shape by folding\");\n\tmap.put(\"knit\",\"编织(纱线):interlacing yarn with needles;连接,联系:join closely\");\n\tmap.put(\"knotty\",\"多结的,复杂的,困难的:full of difficulties complications\");\n\tmap.put(\"kudos\",\"名望,名声:fame;夸奖,赞扬:acclaim or praise\");\n\tmap.put(\"labile\",\"易变的,不稳定的:unstable\");\n\tmap.put(\"laborious\",\"勤奋的:industrious;费力的:long, hard work\");\n\tmap.put(\"labyrinthine\",\"迷宫似的,复杂曲折的:extremely complex structure\");\n\tmap.put(\"lacerate\",\"使非常痛苦:cause pain\");\n\tmap.put(\"lackluster\",\"黯淡无光泽的:lacking brightness\");\n\tmap.put(\"laconic\",\"简洁(以至于显得粗鲁或难以理解的):minimum of words, concise\");\n\tmap.put(\"lachrymose\",\"催人泪下的,悲伤的:mournful\");\n\tmap.put(\"lambaste\",\"严厉斥责:scold sharply\");\n\tmap.put(\"lament\",\"悼词:composition grief;抱怨:resentment;为…哀悼,表达痛苦或遗憾:express sorrow\");\n\tmap.put(\"lamentable\",\"值得惋惜的,悲哀的:deplorable\");\n\tmap.put(\"lampoon\",\"讽刺:harsh satire\");\n\tmap.put(\"languid\",\"没精打采的,虚弱的:lacking energy\");\n\tmap.put(\"languish\",\"变得衰弱:become feeble\");\n\tmap.put(\"languor\",\"懒惰:inertness;衰弱:weakness, weariness\");\n\tmap.put(\"lank\",\"细长瘦弱的:long lean;不僵硬的,柔软松弛的:limp, not stiff\");\n\tmap.put(\"lapse\",\"小过失:slight error;结束,终止:end\");\n\tmap.put(\"largesse\",\"捐赠物:without expectation of a return;慷慨:liberality\");\n\tmap.put(\"lash\",\"击打:hard strike;猛击,撞击:strike with force;捆扎:bind\");\n\tmap.put(\"lassitude\",\"乏力,没精打采:diminished energy\");\n\tmap.put(\"latent\",\"潜在的,不活跃的:potential, not evident\");\n\tmap.put(\"latitude\",\"(行动或言论)自由:freedom\");\n\tmap.put(\"laudatory\",\"表示赞扬的:praise\");\n\tmap.put(\"lavish\",\"奢侈的,大量的,无节制的:extravagance and profusion;挥霍,浪费:give readily carelessly\");\n\tmap.put(\"leaven\",\"在…中加入轻松、活泼或变更的因素:mingle permeate\");\n\tmap.put(\"leer\",\"一瞥,斜眼看:sidelong\");\n\tmap.put(\"leery\",\"怀疑的,不信任的:suspicious\");\n\tmap.put(\"legacy\",\"遗产:handed down ancestor\");\n\tmap.put(\"legend\",\"传奇,传说:popular myth;图例:explanatory list map\");\n\tmap.put(\"legion\",\"大量的人,(尤指)军团:large body of men;大量的:numerous\");\n\tmap.put(\"lenient\",\"宽大仁慈的:merciful\");\n\tmap.put(\"lethal\",\"非常有害的,致命的:extremely harmful\");\n\tmap.put(\"lethargic\",\"没精打采的,行动迟缓的:sluggish\");\n\tmap.put(\"levelheaded\",\"明智的:sensible\");\n\tmap.put(\"levity\",\"轻浮:frivolity\");\n\tmap.put(\"liability\",\"责任:liable;障碍,不利条件:creates difficulty\");\n\tmap.put(\"liberal\",\"思想前卫的:not bound;慷慨的,大方的:generosity\");\n\tmap.put(\"libertine\",\"放荡不羁者:without moral restraint\");\n\tmap.put(\"licentious\",\"放荡的,性欲强的:lacking restraints\");\n\tmap.put(\"liken\",\"显示相似,把…比作:show as similar\");\n\tmap.put(\"limber\",\"可塑的,柔软的:flexible\");\n\tmap.put(\"limp\",\"柔软的,松散的:lacking firm;软弱的,没有精神的:lacking strength;跛行,艰难地行走:haltingly or unsteadily\");\n\tmap.put(\"limpid\",\"透明清澈的:transparent clearness;镇定的,淡定的:free from agitation\");\n\tmap.put(\"linger\",\"磨蹭,闲荡:proceed slowly\");\n\tmap.put(\"lissome\",\"柔软的:easily bent;敏捷的,轻盈的:move with ease\");\n\tmap.put(\"list\",\"(使)倾斜:at an angle\");\n\tmap.put(\"lithe\",\"敏捷的,轻盈的:grace;柔软的:easily bent\");\n\tmap.put(\"loath\",\"不情愿的,讨厌的:reluctant\");\n\tmap.put(\"loathe\",\"厌恶:dislike\");\n\tmap.put(\"lofty\",\"崇高的:elevated;高的:rising;自大的:superiority\");\n\tmap.put(\"loll\",\"懒洋洋地行动:lazy;偷懒,打发时间:doing nothing\");\n\tmap.put(\"lopsided\",\"歪的,倾斜的:leaning;不平衡的,不协调的:lacking in balance\");\n\tmap.put(\"loquacious\",\"话多的:excessive talk\");\n\tmap.put(\"loutish\",\"粗鲁的:awkward, stupid and boorish\");\n\tmap.put(\"lubricate\",\"使润滑:reduce friction\");\n\tmap.put(\"lucid\",\"有光亮的:suffused with light;神志清楚的:full use of one’s mind;表达清晰的,简单易懂的:easily understood\");\n\tmap.put(\"lug\",\"拖动,拉动:cause to follow;费力搬运:laboriously\");\n\tmap.put(\"lugubrious\",\"(故作夸张的)悲哀的:mournful\");\n\tmap.put(\"lull\",\"相对平静时期,间隙:momentary halt;使镇静,使安心:free from distress\");\n\tmap.put(\"lullaby\",\"催眠曲:song lull sleep;使镇静,使安心:free from distress\");\n\tmap.put(\"lumber\",\"木材:tree logs;笨拙地行动:clumsiness;使负担(从而拖累):burden\");\n\tmap.put(\"luminary\",\"杰出人物:eminence\");\n\tmap.put(\"lurch\",\"蹒跚:swaying\");\n\tmap.put(\"lurk\",\"潜伏:lie in wait\");\n\tmap.put(\"lush\",\"茂盛呃:vigorously;多产的:producing abundantly;(声音、味道)优美的,令人愉悦的:appealing\");\n\tmap.put(\"lustrous\",\"有光泽的:shiny\");\n\tmap.put(\"luxurious\",\"豪华的:wealth and comfort;奢侈的:excessive gratification\");\n\tmap.put(\"lyric\",\"(可以哼唱的)小曲:musical composition;如诗歌般流畅优美的:suggestive of poetry or music\");\n\tmap.put(\"macabre\",\"恐怖的:horror of death\");\n\tmap.put(\"macerate\",\"浸泡(以软化):soaking or steeping\");\n\tmap.put(\"maculate\",\"使有斑点,弄脏;玷污,损坏:spot\");\n\tmap.put(\"maelstrom\",\"漩涡:violent whirlpool;混乱、动荡的局势:turbulent\");\n\tmap.put(\"magnificent\",\"壮丽的:strikingly impressive\");\n\tmap.put(\"maladroit\",\"笨拙的:lack of nimbleness\");\n\tmap.put(\"malaise\",\"不舒服:bodily discomfort\");\n\tmap.put(\"malcontent\",\"不满分子:opposition;不满的:dissatisfied\");\n\tmap.put(\"malicious\",\"恶意的:deliberately harmful\");\n\tmap.put(\"malign\",\"恶意的:cause suffering;诽谤:utter injuriously\");\n\tmap.put(\"malinger\",\"装病以逃避工作:pretend illness\");\n\tmap.put(\"malleable\",\"可塑的:capable of being shaped;易控制的:capable of being controlled\");\n\tmap.put(\"malodorous\",\"恶臭的:unpleasant smell\");\n\tmap.put(\"mandatory\",\"强制的:forcing compliance\");\n\tmap.put(\"mangle\",\"损毁,使伤残:injury;弄砸:ruin\");\n\tmap.put(\"mangy\",\"卑劣的:contemptible\");\n\tmap.put(\"mania\",\"热衷,狂热:intense enthusiasm\");\n\tmap.put(\"manifest\",\"显然的,明显易懂:understanding;显现,显露:make evident\");\n\tmap.put(\"manipulate\",\"巧妙操作:skillful;巧妙处理,暗中操控:deviously\");\n\tmap.put(\"mannered\",\"不自然的,做作的:artificial\");\n\tmap.put(\"manumit\",\"解放(奴隶):release from slavery\");\n\tmap.put(\"manuscript\",\"手稿:written by hand\");\n\tmap.put(\"mar\",\"污点,坏点:spoils the appearance;破坏,削弱:impair\");\n\tmap.put(\"marsh\",\"沼泽,湿地:wet\");\n\tmap.put(\"martinet\",\"纪律严明之人:strict\");\n\tmap.put(\"marvel\",\"令人惊奇的事物:surprise, admiration or wonder;(因为壮观、美丽等而)表示惊讶:feel amazement\");\n\tmap.put(\"masquerade\",\"面具,伪装:display insincere;伪装,掩饰:disguise\");\n\tmap.put(\"mash\",\"捣碎:pulpy mass\");\n\tmap.put(\"mastery\",\"技艺超群,精通:great skill\");\n\tmap.put(\"matriculate\",\"入学;录取:admit or be admitted\");\n\tmap.put(\"maudlin\",\"过于感伤的:tearfully sentimental\");\n\tmap.put(\"maven\",\"专家:experienced\");\n\tmap.put(\"maverick\",\"特立独行之人:does not conform;标新立异的,不合常规的:deviating\");\n\tmap.put(\"mawkish\",\"过度伤感的:sentimental\");\n\tmap.put(\"meager\",\"贫乏的:deficient\");\n\tmap.put(\"mean\",\"卑贱的:ignoble;吝啬的:sharing little;打算,怀有目的:purpose or goal;意味着:convey, show or indicate\");\n\tmap.put(\"meander\",\"闲逛,漫步:aimlessly and idly\");\n\tmap.put(\"measly\",\"少得可怜的,微不足道的:small\");\n\tmap.put(\"measured\",\"深思熟虑的,审慎的:calculated\");\n\tmap.put(\"meddle\",\"干涉,管闲事:intrude\");\n\tmap.put(\"mediate\",\"调解,调停:bring about an agreement\");\n\tmap.put(\"mediocre\",\"平庸的,质量中等偏下的:moderate\");\n\tmap.put(\"medley\",\"大杂烩,混合物:mixture\");\n\tmap.put(\"meek\",\"谦恭的:humility;顺从的:submissive\");\n\tmap.put(\"meet\",\"合适的:very proper\");\n\tmap.put(\"mellifluous\",\"(曲调)优美的:smooth and sweet\");\n\tmap.put(\"melodramatic\",\"感情夸张的,伤感的:exaggeratedly emotional\");\n\tmap.put(\"menace\",\"威胁,使处于危险:intention to harm\");\n\tmap.put(\"mendacious\",\"撒谎的,虚假的:lies\");\n\tmap.put(\"mentor\",\"导师:guide;教导,指导:give advice\");\n\tmap.put(\"mercenary\",\"(外国军队的)雇佣军:soldier hired;唯利是图的,贪婪的:monetary or material gain\");\n\tmap.put(\"mercurial\",\"(情绪)善变的:changeableness of mood\");\n\tmap.put(\"merited\",\"应得的,理所应当的:what is called for\");\n\tmap.put(\"mesh\",\"诱捕:catch\");\n\tmap.put(\"mesmeric\",\"催命的,催眠术的:mesmerism;令人着迷的,难以抗拒的:attracting\");\n\tmap.put(\"metamorphose\",\"(使)变形:change\");\n\tmap.put(\"metaphysical\",\"哲学上的,理论上的:idea;非尘世的:beyond universe\");\n\tmap.put(\"meteoric\",\"流星般迅速而短暂的:brevity\");\n\tmap.put(\"methodical\",\"井然有序的,有条理的:systematic order\");\n\tmap.put(\"meticulous\",\"极为谨慎的:extreme or excessive care\");\n\tmap.put(\"mettle\",\"勇气:strength of spirit;毅力,耐力:stamina\");\n\tmap.put(\"miff\",\"使恼怒:annoyed\");\n\tmap.put(\"migratory\",\"迁移的:moving from one region to another\");\n\tmap.put(\"milk\",\"榨取(财富、信息等):coerce profit\");\n\tmap.put(\"mime\",\"模仿:model\");\n\tmap.put(\"mimic\",\"仿真的,伪造的:in appearance;滑稽地模仿(以取笑):copy or exaggerate;模仿:model\");\n\tmap.put(\"minatory\",\"带来威胁的,有凶兆的:a sign of evil\");\n\tmap.put(\"mince\",\"切碎:small pieces;小步走:short steps\");\n\tmap.put(\"mingle\",\"mingle:social;混合,结合:mix\");\n\tmap.put(\"minimize\",\"将…减到最少:reduce to smallest;刻意低估:underestimate;表示鄙夷:scornfully low opinion\");\n\tmap.put(\"mint\",\"巨额:abundant amount;无损坏的:unmarred\");\n\tmap.put(\"miniscule\",\"极小的:very small\");\n\tmap.put(\"minute\",\"仔细的,谨小慎微的:careful scrutiny;小的,不重要的:of small importance\");\n\tmap.put(\"minutia\",\"次要的细节,小事:minor detail\");\n\tmap.put(\"mirage\",\"海市蜃楼,幻想:illusory\");\n\tmap.put(\"mire\",\"困境:difficult situation;使陷入困境,拖后腿:hold back\");\n\tmap.put(\"mirth\",\"欢乐,欢笑:gladness laughter\");\n\tmap.put(\"misanthropic\",\"反人类:deep distrust of human\");\n\tmap.put(\"misbehaving\",\"调皮的,行为不端的:childish misbehavior\");\n\tmap.put(\"mischievous\",\"调皮的,淘气的:naughty teasing;有害的:causing harm\");\n\tmap.put(\"misconstrue\",\"误解,曲解:mistake\");\n\tmap.put(\"miscreant\",\"恶棍,罪犯:behaves criminally\");\n\tmap.put(\"misdemeanor\",\"轻罪:crime less serious\");\n\tmap.put(\"miserly\",\"吝啬的:penuriousness\");\n\tmap.put(\"misfortune\",\"不幸:bad fortune\");\n\tmap.put(\"misgiving\",\"担忧,忧虑:doubt\");\n\tmap.put(\"mishap\",\"不幸之事:unfortunate\");\n\tmap.put(\"misrepresent\",\"误传,篡改:give misleading representation\");\n\tmap.put(\"mite\",\"微小的东西,很少的钱:small object\");\n\tmap.put(\"mitigate\",\"减轻痛苦,使缓和:less severe\");\n\tmap.put(\"mobile\",\"可移动的:capable moving;可变的:changeable\");\n\tmap.put(\"mockery\",\"鄙视,嘲弄:ridicule;以嘲笑为目的的模仿:derisive imitation\");\n\tmap.put(\"moderate\",\"使缓和:lessen intensify;适度的,中庸的:within limits\");\n\tmap.put(\"modicum\",\"少量:small portion\");\n\tmap.put(\"mollify\",\"平息,抚慰,缓和:calm\");\n\tmap.put(\"mollycoddle\",\"宠爱,溺爱:excessive indulgence\");\n\tmap.put(\"molt\",\"脱(羽、皮等):shed feathers\");\n\tmap.put(\"momentous\",\"极重要的:utmost importance\");\n\tmap.put(\"momentum\",\"动力;冲力;势头:impetus\");\n\tmap.put(\"mongrel\",\"杂种的,混血儿的:mixed origin\");\n\tmap.put(\"monochromatic\",\"单色的:one color;单调无味的:lacking variety\");\n\tmap.put(\"monologue\",\"独白:by one actor\");\n\tmap.put(\"monotonous\",\"(声音)单调的:unvarying tone;清一色的,无聊的:tediously unvarying\");\n\tmap.put(\"montage\",\"大杂烩:collection\");\n\tmap.put(\"moratorium\",\"延期,暂缓施行:suspension\");\n\tmap.put(\"morbid\",\"疾病的,疾病所致的:by disease;(思想性格)变态的:unwholesome thoughts\");\n\tmap.put(\"mordant\",\"尖酸刻薄的:biting caustic\");\n\tmap.put(\"moribund\",\"即将结束的,垂死的:approaching death;即将过时:obsolete\");\n\tmap.put(\"morose\",\"忧郁的:sullen, gloomy\");\n\tmap.put(\"mosaic\",\"综合物,马赛克般的东西:collection\");\n\tmap.put(\"mosque\",\"清真寺:worship Muslim\");\n\tmap.put(\"moth-eaten\",\"过时的:passed its time\");\n\tmap.put(\"motile\",\"能动的:movement\");\n\tmap.put(\"motivate\",\"刺激,激发:provide incentive\");\n\tmap.put(\"motley\",\"混杂的,富于变化的:variety\");\n\tmap.put(\"mottle\",\"标记上杂色斑点:mark spots\");\n\tmap.put(\"motto\",\"座右铭:guiding principle\");\n\tmap.put(\"mournful\",\"悲伤的:expressing sorrow\");\n\tmap.put(\"movement\",\"运动:moving\");\n\tmap.put(\"muddy\",\"不干净的:not clean;浑浊的,不清晰的:lacking clarity;使难以理解:make unclear\");\n\tmap.put(\"muffle\",\"使消声:deaden the sound\");\n\tmap.put(\"mulish\",\"固执的:obstinate\");\n\tmap.put(\"mumble\",\"说话含糊:utter confused\");\n\tmap.put(\"mundane\",\"尘世的,世俗化的:relating to world;平凡的:commonplaces\");\n\tmap.put(\"munificent\",\"慷慨的:liberal in giving\");\n\tmap.put(\"murky\",\"黯淡的,昏暗的:without light;模糊的,晦涩的:lacking clarity\");\n\tmap.put(\"murmur\",\"小声的话语:low sound;低声抱怨,发牢骚:grumble\");\n\tmap.put(\"mutate\",\"(使)改变,(使)变异:undergo mutation\");\n\tmap.put(\"mute\",\"不说话的,缄默的:refraining from speech;使颜色,音调等柔和:soften;减弱声音:muffle the sound\");\n\tmap.put(\"mutter\",\"低声抱怨:murmur complainingly\");\n\tmap.put(\"myopic\",\"缺乏远见的,缺乏辨别能力的:lack of foresight\");\n\tmap.put(\"myriad\",\"无限的,大量的:indefinite number\");\n\tmap.put(\"nadir\",\"最低点:lowest point\");\n\tmap.put(\"naive\",\"\t天真纯朴的:lacking worldly experience\");\n\tmap.put(\"narcissism\",\"自恋:admiration of oneself\");\n\tmap.put(\"nascent\",\"新生的:recently come into existence\");\n\tmap.put(\"natty\",\"整洁的,时髦的:tidy\");\n\tmap.put(\"nauseate\",\"(使)厌恶,(使)作呕:cause disgust\");\n\tmap.put(\"nautical\",\"航海的:on water\");\n\tmap.put(\"naysay\",\"拒绝,否认:oppose, deny\");\n\tmap.put(\"nebulous\",\"模糊的:indistinct\");\n\tmap.put(\"needy\",\"贫穷的:impoverished\");\n\tmap.put(\"nefarious\",\"极坏的,邪恶的:wicked\");\n\tmap.put(\"negation\",\"否定:opposite\");\n\tmap.put(\"negligent\",\"疏忽大意的:failing care\");\n\tmap.put(\"negotiate\",\"商量,谈判:by mutual agreement;谋划:plan out\");\n\tmap.put(\"neophyte\",\"初学者,新手:beginner\");\n\tmap.put(\"nerve\",\"(坚强的)意志,勇气:power of endurance;给予勇气,鼓励:give courage\");\n\tmap.put(\"nettle\",\"惹怒:arouse anger\");\n\tmap.put(\"neutralize\",\"中和:acid undergo neutralization;破坏,使无效:make inoperative or ineffective\");\n\tmap.put(\"nicety\",\"准确,精准:careful details;细微之处:fine point\");\n\tmap.put(\"nexus\",\"连结:connection;核心,最重要的地带:greatest importance\");\n\tmap.put(\"nibble\",\"小口咬:small bites\");\n\tmap.put(\"nil\",\"不存在,零:nothing\");\n\tmap.put(\"nip\",\"少量:small amount;小口吃喝:in small amounts\");\n\tmap.put(\"nitpick\",\"吹毛求疵:criticize\");\n\tmap.put(\"nocturnal\",\"夜间的:in the night;夜间活动的:active at night\");\n\tmap.put(\"noisome\",\"有害的,有毒的:harmful;恶臭的:offensive smell;非常令人厌恶的:objectionable\");\n\tmap.put(\"nomad\",\"游牧的;居无定所的人:no fixed residence\");\n\tmap.put(\"nominal\",\"不重要的:unimportant;名义上的:something in name\");\n\tmap.put(\"nonchalant\",\"冷漠:indifference\");\n\tmap.put(\"nondescript\",\"平凡的,不吸引人的:lacking distinctive, interesting\");\n\tmap.put(\"nonentity\",\"不重要的人:little consequence;虚构的东西:created no objective reality\");\n\tmap.put(\"nonplus\",\"使迷惑,使困窘:perplex\");\n\tmap.put(\"nonsense\",\"无意义的话,废话:no meaning\");\n\tmap.put(\"notch\",\"刻痕:cut;通过努力获得:obtain\");\n\tmap.put(\"novel\",\"新奇的:new\");\n\tmap.put(\"noxious\",\"有害的,有毒的:harmful, injurious to health;产生强烈厌恶的:causing intense displeasure\");\n\tmap.put(\"nuance\",\"细微的差异:subtle distinction\");\n\tmap.put(\"nudge\",\"用肘推以引起注意:push elbow;说服某人做某事:persuade\");\n\tmap.put(\"nugatory\",\"无关紧要的:consequence, inconsequential\");\n\tmap.put(\"nurture\",\"提供营养:nourishment;培育,培养:provide with understanding\");\n\tmap.put(\"oath\",\"誓言:formal promise\");\n\tmap.put(\"obdurate\",\"固执的:resistant influences;冷酷无情的:lack of sympathy\");\n\tmap.put(\"obedient\",\"服从的,顺从的:submissive authority\");\n\tmap.put(\"obeisance\",\"敬礼,尊重:respect, submission\");\n\tmap.put(\"obfuscate\",\"使困惑,使模糊:confused, opaque\");\n\tmap.put(\"obligatory\",\"强制性的:compulsory;(见得多以至于)无聊的:dull\");\n\tmap.put(\"obliging\",\"乐于助人的:do favors\");\n\tmap.put(\"oblique\",\"斜的:inclined or twisted\");\n\tmap.put(\"obliterate\",\"除去:remove\");\n\tmap.put(\"oblivious\",\"不知道的,不知情的:lacking awareness, not informed\");\n\tmap.put(\"obloquy\",\"谩骂,诽谤:abusively language;恶名,耻辱:lost the esteem\");\n\tmap.put(\"obscure\",\"含义模糊的:not clearly, veiled, uncertain meaning;平凡的,不知名的:famous;使模糊:indistinct\");\n\tmap.put(\"obsequious\",\"谄媚的,奴性的:fawning attentiveness\");\n\tmap.put(\"obsess\",\"迷住的,使困扰:haunt\");\n\tmap.put(\"obstinate\",\"固执的:in spite of persuasion;难以减轻或治愈的:mot easily subdued\");\n\tmap.put(\"obstreperous\",\"难驾驭的,任性的:unruly;吵闹的:loud and insistent cries\");\n\tmap.put(\"obstruct\",\"妨碍,给…制造困难:impede, create difficulty;阻挡:prevent passage\");\n\tmap.put(\"obtuse\",\"愚钝的:absorb ideas readily\");\n\tmap.put(\"obviate\",\"排除,使不必要:unnecessary\");\n\tmap.put(\"occult\",\"难以理解的:not easily apprehended, mysterious;使隐藏或神秘:keep secret\");\n\tmap.put(\"odium\",\"憎恶,讨厌:strong dislike\");\n\tmap.put(\"offbeat\",\"不平常的:different from generally found\");\n\tmap.put(\"offhand\",\"即兴的,没有准备的:without preparation\");\n\tmap.put(\"officious\",\"多管闲事的:thrusting oneself\");\n\tmap.put(\"offish\",\"冷淡的:aloof\");\n\tmap.put(\"off-key\",\"不寻常的,不合适的:out of accord with\");\n\tmap.put(\"ominous\",\"凶兆的:omen, evil\");\n\tmap.put(\"omniscient\",\"无所不知的:complete knowledge\");\n\tmap.put(\"onerous\",\"费时间花心思的:requiring much time, effort\");\n\tmap.put(\"opaque\",\"不透光的:impenetrable by light, neither transparent translucent;晦涩的:obscure\");\n\tmap.put(\"opine\",\"表达观点;想,认为:express opinions\");\n\tmap.put(\"opportune\",\"合适的,恰当的:convenient\");\n\tmap.put(\"opprobrious\",\"辱骂的:reproach;臭名昭著的,令人鄙视的:infamous\");\n\tmap.put(\"oration\",\"(颇有野心、自高自大的)演说:high-flown or pompous manner\");\n\tmap.put(\"orient\",\"使确定方向,使熟悉或适应:determine position, make familiar\");\n\tmap.put(\"original\",\"创新的:creative, inventive;最初的,最早的:before\");\n\tmap.put(\"orthodox\",\"传统的:established form, custom, or rules\");\n\tmap.put(\"oscillate\",\"振动,摇晃:swing;犹豫,变化:vary\");\n\tmap.put(\"ossify\",\"(使)硬化,(使)僵化:hardened, conventional, opposed to change\");\n\tmap.put(\"ostentatious\",\"卖弄炫耀的:conspicuous, pretentious\");\n\tmap.put(\"ostracize\",\"驱逐:exclude\");\n\tmap.put(\"oust\",\"免职:remove from;驱逐:drive out\");\n\tmap.put(\"outgoing\",\"友好的,外向的:extroverted\");\n\tmap.put(\"outlandish\",\"古怪的,奇异的:out of the ordinary, bizarre\");\n\tmap.put(\"outmaneuver\",\"以谋略取胜:overcome\");\n\tmap.put(\"outset\",\"开端,开始:beginning\");\n\tmap.put(\"outwit\",\"瞒骗,以智取胜:surpass cunning\");\n\tmap.put(\"overbearing\",\"专横傲慢的:arrogant;压倒一切的,(在力量或重要性上)势不可挡的;支配的,显著的:overwhelming in power\");\n\tmap.put(\"overlap\",\"(与…)部分重叠:same area\");\n\tmap.put(\"overt\",\"明显的,公开的:open\");\n\tmap.put(\"overture\",\"前言:introductory, preclude;序曲:introduction opera\");\n\tmap.put(\"oxymoron\",\"矛盾修饰法:combination contradictory\");\n\tmap.put(\"pacify\",\"使平静,安慰:ease the anger\");\n\tmap.put(\"padding\",\"夸张,废话:go beyond the facts\");\n\tmap.put(\"paean\",\"欢乐颂:joyous song praise\");\n\tmap.put(\"painstaking\",\"煞费苦心的:diligent care\");\n\tmap.put(\"palatable\",\"感到愉悦满足的:pleasure or contentment\");\n\tmap.put(\"palatial\",\"宫殿般奢华的:ornateness\");\n\tmap.put(\"pall\",\"失去兴趣:interest attraction\");\n\tmap.put(\"palliate\",\"平息,减轻:less severe intense\");\n\tmap.put(\"pallid\",\"无生气的,缺乏活力的:lacking radiance vitality;苍白无血色的:pale\");\n\tmap.put(\"palmy\",\"繁荣的:prosperity\");\n\tmap.put(\"palpable\",\"摸得到的:capable touched;明显的,易觉察的:obvious\");\n\tmap.put(\"palter\",\"欺骗,讨价还价:insincerely deceitfully\");\n\tmap.put(\"paltry\",\"无价值的,微不足道的:importance;让人厌恶的,让人鄙视的:loathing and disgust\");\n\tmap.put(\"pan\",\"严厉批评:harsh criticism\");\n\tmap.put(\"panache\",\"炫耀:flamboyance\");\n\tmap.put(\"pandemic\",\"大范围流行的:widespread\");\n\tmap.put(\"pandemonium\",\"喧嚣,骚动:noise\");\n\tmap.put(\"panegyric\",\"赞颂之词,颂文:eulogistic\");\n\tmap.put(\"panoramic\",\"全景的:complete view\");\n\tmap.put(\"parable\",\"寓言:teach a basic truth\");\n\tmap.put(\"paradigm\",\"典范,模范:pattern\");\n\tmap.put(\"paradise\",\"天堂,极乐世界:perfection and happiness;快乐,狂喜:pleasurable emotion\");\n\tmap.put(\"paradox\",\"表面矛盾实际可能正确的话,悖论:opposed to commonsense\");\n\tmap.put(\"paragon\",\"优秀模范:example;把…比作,显示相似:compare\");\n\tmap.put(\"paramount\",\"最重要的:chief importance\");\n\tmap.put(\"paranoid\",\"多疑的,对他人极端恐惧和怀疑的:extreme fear of distrust\");\n\tmap.put(\"paraphrase\",\"转述,意译,改写;in different words\");\n\tmap.put(\"parch\",\"炽,烤,烤干:dry\");\n\tmap.put(\"parenthesis\",\"间断:interruption\");\n\tmap.put(\"pariah\",\"被排斥或鄙视的人:despised or rejected\");\n\tmap.put(\"parity\",\"相称,同等,平等:being equal\");\n\tmap.put(\"parody\",\"(以嘲笑原作作者的)模仿作品:imitated for ridicule;模仿(以嘲弄):copy to make fun\");\n\tmap.put(\"paroxysm\",\"(感情、动作的)突发:outburst;(政治、社会领域呃)大动荡:disturbance\");\n\tmap.put(\"parrot\",\"(机械地)模仿,复制:imitate without understanding\");\n\tmap.put(\"parry\",\"躲避(问题):evade\");\n\tmap.put(\"parsimonious\",\"过度节俭的,吝啬的:stinginess\");\n\tmap.put(\"partial\",\"偏袒的,偏爱的:biased;部分的,不完整的:lacking\");\n\tmap.put(\"particularize\",\"详述:give details\");\n\tmap.put(\"partisan\",\"跟随者,信徒:follows;(狂热。坚定的)拥护者,支持者:excessively devoted;偏袒的:one side\");\n\tmap.put(\"pastiche\",\"(带嘲讽的)模仿:imitates with satirical intent;大杂烩:hodgepodge\");\n\tmap.put(\"partition\",\"分割,划分:dividing\");\n\tmap.put(\"patent\",\"显而易见的,明显的:readily visible\");\n\tmap.put(\"pathological\",\"不正常的,病态的:markedly abnormal\");\n\tmap.put(\"patina\",\"外表:superficial;(由内而外散发的)氛围,气场:appearance or aura\");\n\tmap.put(\"patrician\",\"贵族,名门望族:high birth;贵族的,地位高的:high birth\");\n\tmap.put(\"patriot\",\"爱国者:loves country\");\n\tmap.put(\"patronize\",\"赞助:provide aid;以高人一等的态度对待:treat haughtily\");\n\tmap.put(\"paucity\",\"少量,缺乏:dearth\");\n\tmap.put(\"paunchy\",\"大腹便便的,大肚子的:potbelly\");\n\tmap.put(\"peck\",\"大量:considerable amount;(不情愿地)小口咬:in small bites\");\n\tmap.put(\"pedagogue\",\"教育者,老师:give formal instruction\");\n\tmap.put(\"pedant\",\"书呆子,墨守成规之人:formal rules\");\n\tmap.put(\"predestine\",\"预先注定:in advance\");\n\tmap.put(\"pedestrian\",\"行人:traveling on foot;平庸无奇的,令人厌倦的:causing weariness\");\n\tmap.put(\"peep\",\"一瞥:brief look;轻声:slight sound\");\n\tmap.put(\"peer\",\"同等地位的人,同辈:equal;好奇地凝视:look\");\n\tmap.put(\"peeve\",\"打扰,惹恼:disturb\");\n\tmap.put(\"pejorative\",\"轻蔑的,贬低的:disparaging\");\n\tmap.put(\"pellucid\",\"透明的:admitting light;清晰明确的,易懂的:clear\");\n\tmap.put(\"pen\",\"监狱:confinement;关押,监禁:close\");\n\tmap.put(\"penalty\",\"(对罪行的)处罚:punishment\");\n\tmap.put(\"penchant\",\"嗜好,迷恋:strong inclination\");\n\tmap.put(\"penitent\",\"悔过的:regretful\");\n\tmap.put(\"pensive\",\"沉思的,(尤指)哀思的:thinking\");\n\tmap.put(\"penury\",\"贫穷:dearth;吝啬,节俭:frugality\");\n\tmap.put(\"perambulate\",\"徒步穿越,走过:travel over\");\n\tmap.put(\"perceptible\",\"可察觉的:being perceived\");\n\tmap.put(\"peremptory\",\"不容反抗的:not allowing contradiction;爱发号施令的:ordering people;傲慢的:feeling of superiority\");\n\tmap.put(\"perfervid\",\"非常热情的:exaggerated emotion\");\n\tmap.put(\"perfidy\",\"不忠,背信弃义:disloyalty\");\n\tmap.put(\"perforate\",\"打孔,穿透:make a hole\");\n\tmap.put(\"perfunctory\",\"例行公事的,敷衍的:superficially;不感兴趣的:lacking in interest\");\n\tmap.put(\"perimeter\",\"边界,界限:outer limit\");\n\tmap.put(\"periodical\",\"期刊:publication;周期性的,有固定间隔的:regular intervals\");\n\tmap.put(\"peripatetic\",\"巡游的,四处游历的:place to place\");\n\tmap.put(\"peripheral\",\"外围的:boundary or periphery;辅助性的:supply\");\n\tmap.put(\"perish\",\"死亡,消亡:cease to exist\");\n\tmap.put(\"permanent\",\"永恒的:continuing or enduring, forever\");\n\tmap.put(\"permeable\",\"可渗透的:penetrated\");\n\tmap.put(\"pernicious\",\"有害的:injurious\");\n\tmap.put(\"peroration\",\"(演讲的)结束语:concluding part;(正式的)演讲,致辞:formal discourse\");\n\tmap.put(\"perpetual\",\"永恒的,不断的:continuing forever\");\n\tmap.put(\"persecute\",\"迫害,折磨:cause suffering\");\n\tmap.put(\"persevere\",\"坚持不懈,不屈不挠:persist\");\n\tmap.put(\"persiflage\",\"打趣:teasing\");\n\tmap.put(\"persistence\",\"坚持,持续:lasting existence\");\n\tmap.put(\"personable\",\"风度翩翩的,吸引人的:attractive\");\n\tmap.put(\"perspicacious\",\"极敏锐的,有洞察力的:penetrating mental discernment\");\n\tmap.put(\"perspicuity\",\"清晰明了的:clearness and lucidity\");\n\tmap.put(\"pertain\",\"有关联的:have a relation\");\n\tmap.put(\"pertinacious\",\"顽固的,固执地坚持的:sticking\");\n\tmap.put(\"pertinent\",\"相关的,恰当的:relevance\");\n\tmap.put(\"perturb\",\"使扰乱,使烦躁不安:trouble the mind\");\n\tmap.put(\"peruse\",\"细读:examine with great care\");\n\tmap.put(\"pervade\",\"弥漫,充满:throughout\");\n\tmap.put(\"pessimistic\",\"悲观的:take the gloomiest possible view\");\n\tmap.put(\"petition\",\"请愿,正式的申请,申请书:supplication or request;(尤指正式地)请求:,make a request\");\n\tmap.put(\"petrify\",\"使僵化,使失去活力:become stiff\");\n\tmap.put(\"petty\",\"细微的,不重要的:small importance\");\n\tmap.put(\"phenomenal\",\"不寻常的,非凡的:out of the ordinary\");\n\tmap.put(\"philanthropic\",\"博爱的,为他人着想的:welfare of others\");\n\tmap.put(\"philistine\",\"市侩(注重物质而鄙视智慧或艺术的人):guided by materialism\");\n\tmap.put(\"phlegmatic\",\"冷静的,无感情的,淡漠的:calm, sluggish temperament\");\n\tmap.put(\"piddling\",\"微不足道的:trifling or trivial\");\n\tmap.put(\"piebald\",\"杂色的:different colors;混合的,杂糅而成的:different sorts\");\n\tmap.put(\"pigment\",\"颜料:color;给…上颜色:color\");\n\tmap.put(\"pilfer\",\"偷窃:steal\");\n\tmap.put(\"pillar\",\"柱子:support;(物质、精神等方面的)支柱:support\");\n\tmap.put(\"pillory\",\"当众嘲弄:public contempt\");\n\tmap.put(\"pilot\",\"领航员,飞行员:steer a ship;初步性的,试验性的:tentative model;带领通过:lead\");\n\tmap.put(\"pine\",\"渴望,奢望:yearn;因渴望而憔悴:lose vigor\");\n\tmap.put(\"pinnacle\",\"顶峰:highest point\");\n\tmap.put(\"pinpoint\",\"非常精确的:extreme precision;精确定位或确认:identify with precision\");\n\tmap.put(\"piquant\",\"辛辣开胃的:pungent taste;令人振奋的:provocative\");\n\tmap.put(\"pique\",\"使愤怒:arouse anger;激起,刺激:excite or arouse\");\n\tmap.put(\"pirate\",\"盗版,盗用:without actual right;海岛:robber seas\");\n\tmap.put(\"pithy\",\"精练的,简洁的:brief\");\n\tmap.put(\"pitiless\",\"没有同情心的:devoid of pity\");\n\tmap.put(\"pittance\",\"少量津贴:small portion\");\n\tmap.put(\"placate\",\"(通过让步以)平息抚慰:lessen the anger\");\n\tmap.put(\"placebo\",\"安慰性的事物:used to appease or reassure\");\n\tmap.put(\"plagiarize\",\"剽窃,抄袭:steal ideas\");\n\tmap.put(\"plangent\",\"轰鸣的:loud sound;凄凉的,哀伤的:plaintive\");\n\tmap.put(\"plastic\",\"可塑的:modified;虚假的,做作的:lacking in natural\");\n\tmap.put(\"plateau\",\"高原:raised above;稳定时期,平台期:stable level\");\n\tmap.put(\"platitude\",\"陈词滥调:banal statement;缺乏原创性:lack of originality\");\n\tmap.put(\"plausible\",\"看似有理的:superficially reasonable\");\n\tmap.put(\"pleat\",\"打褶:fold\");\n\tmap.put(\"plentitude\",\"大量:ample amount\");\n\tmap.put(\"plethora\",\"过量,过剩:excess\");\n\tmap.put(\"pliable\",\"易弯曲的,柔软的:supple;易受影响的,温顺的:easily influenced\");\n\tmap.put(\"pliant\",\"易弯曲的:easily bent;顺从的:yielding\");\n\tmap.put(\"plight\",\"困境:unfortunate\");\n\tmap.put(\"plod\",\"沉重缓慢地走:walk heavily\");\n\tmap.put(\"pluck\",\"敢于面对困难的勇气:courage;弹奏(弦乐):strings pulling releasing\");\n\tmap.put(\"plumb\",\"测深度:measure the depth;垂直的:vertical;仔细深入地检查;探索,探究:examine deeply\");\n\tmap.put(\"plummet\",\"突然下降:decline suddenly\");\n\tmap.put(\"plump\",\"丰满的:well-around;鼎力支持,赞不绝口:give full support\");\n\tmap.put(\"plunge\",\"突然下降:descend suddenly;插入,刺入:penetrate\");\n\tmap.put(\"polarize\",\"使分开对立,使两极分化:break into opposing\");\n\tmap.put(\"polemic\",\"争执:argument\");\n\tmap.put(\"polished\",\"有教养的:high degree of refinement;擦亮的:shiny\");\n\tmap.put(\"politic\",\"精明能干的:shrewdness;合时宜的,明智的:suitable\");\n\tmap.put(\"pompous\",\"浮夸的:ornate;傲慢的:self-importance\");\n\tmap.put(\"ponderable\",\"有价值的,值得考虑的:considerable\");\n\tmap.put(\"ponderous\",\"沉重的:great weight;沉闷无聊的:unpleasantly dull\");\n\tmap.put(\"pontificate\",\"傲慢地说或做:speak pompous\");\n\tmap.put(\"pore\",\"仔细浏览,仔细研究:read or study attentively\");\n\tmap.put(\"porous\",\"多孔可渗透的:admitting liquid\");\n\tmap.put(\"portentous\",\"预兆性的,凶兆的:sign of evil;勾起兴趣的,令人遐想的:eliciting amazement\");\n\tmap.put(\"poseur\",\"故作姿态的,不真诚的人:affected insincere\");\n\tmap.put(\"posit\",\"假定,断定:affirm\");\n\tmap.put(\"postulate\",\"前提条件:starting point;假定为真:assume true\");\n\tmap.put(\"posture\",\"姿势,姿态:way of holding the body;故作姿态,装模作样:pretended attitude\");\n\tmap.put(\"potable\",\"饮品,尤指有酒精饮料:beverage;适于饮用的:suitable for drinking\");\n\tmap.put(\"potentate\",\"有权势的人:has the power\");\n\tmap.put(\"potentiate\",\"激活,加强:more active\");\n\tmap.put(\"pout\",\"(尤指撅嘴或板着脸)表示不悦:show displeasure\");\n\tmap.put(\"practitioner\",\"职业人士:profession\");\n\tmap.put(\"prairie\",\"大草原:treeless grassland\");\n\tmap.put(\"prate\",\"闲聊,空谈:talk idly\");\n\tmap.put(\"preach\",\"传道,布道:sermon\");\n\tmap.put(\"precarious\",\"危险的,不稳定的:lacking security, stability;可疑的,不明确的:uncertain\");\n\tmap.put(\"precedent\",\"先例,前例:earlier occurrence;先前的:prior\");\n\tmap.put(\"precipice\",\"悬崖峭壁:steep\");\n\tmap.put(\"precipitate\",\"匆忙的:careless speed;促使,导致:cause to happen\");\n\tmap.put(\"precipitation\",\"沉积物,尤指降水:deposit, rain, snow;仓促:disorderly speed\");\n\tmap.put(\"precipitous\",\"非常陡峭的:steep;匆忙的:careless speed\");\n\tmap.put(\"preclude\",\"预先阻止:make impossible in advance;排斥:exclude\");\n\tmap.put(\"precursor\",\"先驱者,先导:precedes\");\n\tmap.put(\"predecessor\",\"前任,先辈:previously occupied\");\n\tmap.put(\"predilection\",\"爱好,偏袒:disposition favor\");\n\tmap.put(\"preeminent\",\"优秀的,重要的:paramount\");\n\tmap.put(\"preempt\",\"预先占有:seize, before others;替换:replace\");\n\tmap.put(\"preen\",\"整理(羽毛):smooth feathers;打扮修饰:dress oneself elaborate;自满:take pride\");\n\tmap.put(\"preface\",\"序言:preliminary statement\");\n\tmap.put(\"pregnant\",\"重要的,意味深长的:full of meaning;怀孕的:containing offspring\");\n\tmap.put(\"premeditate\",\"预先考虑:consider beforehand\");\n\tmap.put(\"preoccupation\",\"非常关系,全神贯注:extreme concern\");\n\tmap.put(\"preponderant\",\"占优势的,更重要的:superior importance\");\n\tmap.put(\"prepossessing\",\"给人好感的,有魅力的:impress favorably\");\n\tmap.put(\"preposterous\",\"荒谬的,不符合常理的:contrary common sense\");\n\tmap.put(\"presage\",\"征兆:sign or warning;预示,预言:predict\");\n\tmap.put(\"prescience\",\"预知,先见:knowledge before\");\n\tmap.put(\"prescription\",\"规定,传统的规矩:rule\");\n\tmap.put(\"preservative\",\"防腐剂:protect against decay\");\n\tmap.put(\"prestige\",\"声望,威望:respect\");\n\tmap.put(\"presumptuous\",\"放肆的,冒昧的:overstepping bounds;傲慢的:feeling of superiority\");\n\tmap.put(\"pretense\",\"虚假,伪装:pretending deceive;自大,优越感:exaggerated sense of one’s importance\");\n\tmap.put(\"preternatural\",\"超乎寻常:surpassing usual\");\n\tmap.put(\"prevail\",\"盛行,战胜:greater in strength\");\n\tmap.put(\"prevalent\",\"流行的,普遍的:commonly accepted\");\n\tmap.put(\"prevaricate\",\"支吾其词,撒谎:evade truth\");\n\tmap.put(\"primordial\",\"原始的,最初的:happening first\");\n\tmap.put(\"primp\",\"精心打扮:adorn finicky\");\n\tmap.put(\"principal\",\"主要的,重要的:highest importance, rank\");\n\tmap.put(\"pristine\",\"纯净的,质朴的,未被文明腐蚀的:pure, free from dirt or decay\");\n\tmap.put(\"privation\",\"缺乏,穷困:lack\");\n\tmap.put(\"probe\",\"深入调查:penetrating investigation\");\n\tmap.put(\"probity\",\"正直:moral standards\");\n\tmap.put(\"proclivity\",\"癖性,爱好:inclination\");\n\tmap.put(\"procrastinate\",\"(因为懒散)拖延:put off laziness\");\n\tmap.put(\"procure\",\"获得,取得:get possession\");\n\tmap.put(\"prod\",\"促使…行动:persuade\");\n\tmap.put(\"prodigal\",\"挥霍的:spendthrift;败家子:spends freely\");\n\tmap.put(\"prodigious\",\"巨大的:great in size;惊人的,了不起的:astonishment\");\n\tmap.put(\"profane\",\"亵渎:treat abuse, irreverence, contempt;滥用:bad or improper use\");\n\tmap.put(\"proffer\",\"献出,提供:offer\");\n\tmap.put(\"proficient\",\"熟练的,精通的:advanced competence\");\n\tmap.put(\"profligate\",\"挥金如土的,挥霍的:wasteful;败家子:spends money freely;堕落的人:below the normal moral standard\");\n\tmap.put(\"profundity\",\"深奥,深刻:abstruse\");\n\tmap.put(\"profusion\",\"丰富,大量:abundance;挥霍,浪费:wasteful\");\n\tmap.put(\"prohibitive\",\"禁止的,阻止的:prohibit, restrain;(价格高得)抑制购买的:purchase\");\n\tmap.put(\"proliferate\",\"快速繁殖;激增:grow or multiply by rapidly offspring\");\n\tmap.put(\"prolix\",\"啰嗦的,冗长的:excessive length\");\n\tmap.put(\"prologue\",\"序言:preface\");\n\tmap.put(\"prolong\",\"延长,拖延:lengthen\");\n\tmap.put(\"proofread\",\"校对:find errors and mark corrections\");\n\tmap.put(\"promulgate\",\"正式宣布:make known\");\n\tmap.put(\"propagate\",\"繁殖:increase;传播,宣传:spread out\");\n\tmap.put(\"propensity\",\"倾向,癖好:inclination\");\n\tmap.put(\"prophetic\",\"预言的,预示的:foretelling\");\n\tmap.put(\"propitiate\",\"抚慰,劝解:appease\");\n\tmap.put(\"propitious\",\"吉祥的:favorably happy outcome\");\n\tmap.put(\"proponent\",\"建议者,支持者:support\");\n\tmap.put(\"propriety\",\"礼节:conformity socially acceptable;适当,得体:suitable or fitting\");\n\tmap.put(\"prosaic\",\"单调的,常见的:normal course of events\");\n\tmap.put(\"proscribe\",\"禁止,排斥:forbid\");\n\tmap.put(\"prosecution\",\"实行,执行:doing\");\n\tmap.put(\"proselytize\",\"(使)改变信仰:change religious faith\");\n\tmap.put(\"prospect\",\"探查,勘探:go into discovery;期待,期望的事物:looking forward to\");\n\tmap.put(\"prosperous\",\"成功的,繁盛的:vigorous growth, well-being\");\n\tmap.put(\"prostrate\",\"平躺(的),使平躺:lying flat;衰弱的,使衰竭:weakness\");\n\tmap.put(\"protean\",\"善变的;多才多艺的:diversity, variety, versatile\");\n\tmap.put(\"protocol\",\"正确的礼仪规范:correct conduct\");\n\tmap.put(\"protract\",\"延长,拖长:lengthen, prolong\");\n\tmap.put(\"protrude\",\"突出:project\");\n\tmap.put(\"protuberant\",\"隆起的,凸出的:thrusting out\");\n\tmap.put(\"provident\",\"节俭的:frugal, economical;有远见的:awareness for the future\");\n\tmap.put(\"providential\",\"天意的,幸运(的):divine intervention\");\n\tmap.put(\"provincial\",\"狭隘(的):limited perspective\");\n\tmap.put(\"provisional\",\"临时的:temporary\");\n\tmap.put(\"provisory\",\"有附带条件的;临时的:conditional\");\n\tmap.put(\"provoke\",\"激怒:incite anger;驱使,激起:stir feeling\");\n\tmap.put(\"prowess\",\"英勇,勇敢:superior, courage\");\n\tmap.put(\"prowl\",\"潜行于,巡游以猎取食物,徘徊:roam through search of prey\");\n\tmap.put(\"prude\",\"过分正经的人:一个过分关心自己是否得体、谦逊、或正确的人:greatly concerned seemly behavior and morally\");\n\tmap.put(\"prudish\",\"过分守礼的:prudery\");\n\tmap.put(\"prudent\",\"明智的:wisdom, judiciousness, wise;小心谨慎的,审慎的:circumspection\");\n\tmap.put(\"prune\",\"梅干:plum dried;修剪;修正\");\n\tmap.put(\"pry\",\"刺探,打听:inquire closely, curiously;\");\n\tmap.put(\"pseudonym\",\"假名,笔名:fictitious\");\n\tmap.put(\"psychology\",\"心理学:science mental process and behavior;心理战术:subtle tactical action influence\");\n\tmap.put(\"pucker\",\"撇(嘴),(使)收缩:contracted\");\n\tmap.put(\"puckish\",\"淘气的,顽皮的:mischievous, impish\");\n\tmap.put(\"puerile\",\"幼稚的,不成熟的:immature\");\n\tmap.put(\"puissance\",\"权力:power\");\n\tmap.put(\"pulchritude\",\"美丽:beauty\");\n\tmap.put(\"pulverize\",\"将…研磨成粉;将…彻底摧毁:complete end\");\n\tmap.put(\"pun\",\"双关语:humorous\");\n\tmap.put(\"punctilious\",\"注意细节的,一丝不苟的:attentive details\");\n\tmap.put(\"pundit\",\"权威人士,专家:opinions authoritative\");\n\tmap.put(\"pungent\",\"辛辣的,讽刺的:use of wit cause hurt feelings\");\n\tmap.put(\"puny\",\"微小的,弱小的:inferior size, weak\");\n\tmap.put(\"purity\",\"纯净;纯洁,纯在:clean, morally pure\");\n\tmap.put(\"purlieu\",\"常去的地方:socializing;临近的地区:adjoining region\");\n\tmap.put(\"purloin\",\"偷窃:steal\");\n\tmap.put(\"purvey\",\"(大量)供给,供应:supply\");\n\tmap.put(\"pusillanimous\",\"懦弱的,胆小得令人鄙视的:timidity\");\n\tmap.put(\"quack\",\"骗子医生,江湖郎中:pretender\");\n\tmap.put(\"quaff\",\"大口地喝:drink heartily\");\n\tmap.put(\"quail\",\"胆怯,畏缩:fear, cower\");\n\tmap.put(\"qualify\",\"限定:reduce general;使有资格,使有能力:make competent\");\n\tmap.put(\"quandary\",\"困惑,窘境:perplexity, doubt\");\n\tmap.put(\"quarantine\",\"隔离:isolation\");\n\tmap.put(\"quarry\",\"采石场:stone is obtained;目标,猎物:pursuit\");\n\tmap.put(\"quash\",\"镇压,阻止:put a stop to\");\n\tmap.put(\"quaver\",\"发颤音:quivering voice\");\n\tmap.put(\"quell\",\"压制:suppress;使平静,使安静:pacify\");\n\tmap.put(\"quench\",\"熄灭:put out;使满足:put a complete end to\");\n\tmap.put(\"querulous\",\"抱怨的,爱发牢骚的:complaining\");\n\tmap.put(\"quibble\",\"吹毛求疵:criticize, cavil;牵强之词:微不足道的差别或不切中要点的异议,小反对:minor objection\");\n\tmap.put(\"quiescent\",\"平静的,静止的:quiet, inactive\");\n\tmap.put(\"quixotic\",\"不切实际的,空想的:more by ideals than by reality\");\n\tmap.put(\"quota\",\"配额,限额:proportional\");\n\tmap.put(\"quotidian\",\"每日的,平凡的:commonplace\");\n\tmap.put(\"rabble\",\"混乱的人群;暴民;下层群众:disorganized crowd of people\");\n\tmap.put(\"rabid\",\"狂热的,不冷静的:fanatical\");\n\tmap.put(\"racy\",\"活泼生动的:vigorous\");\n\tmap.put(\"raffish\",\"低俗的:crudeness\");\n\tmap.put(\"raffle\",\"垃圾,废物:discarded, useless\");\n\tmap.put(\"rage\",\"暴怒:violent anger\");\n\tmap.put(\"ragged\",\"衣衫褴褛的:threadbare clothes;凹凸不平的,不光滑的:not smooth\");\n\tmap.put(\"rail\",\"猛骂,猛烈抨击:revile or scold\");\n\tmap.put(\"rakish\",\"放荡的,行为不检的:lowered moral character\");\n\tmap.put(\"ramble\",\"漫步,漫游:move aimlessly;漫谈,长篇大论(并经常离题)地说或写:without a topic\");\n\tmap.put(\"rambunctious\",\"喧闹的,骚乱的:noisy\");\n\tmap.put(\"ramshackle\",\"摇摇欲坠的:ready to collapse\");\n\tmap.put(\"rancor\",\"敌意,深仇:ill will\");\n\tmap.put(\"random\",\"随机的,随意的:lacking pattern\");\n\tmap.put(\"rankle\",\"激怒:cause anger\");\n\tmap.put(\"rant\",\"(尤指长时间的)训斥,责骂:angry scolding;怒吼:noisy, angry or violent manner\");\n\tmap.put(\"rapacious\",\"食量大的,贪食的:huge appetite;过度贪婪的:covetous\");\n\tmap.put(\"rapport\",\"和睦,友好:friendly relationship\");\n\tmap.put(\"rapprochement\",\"和睦,友好:cordial relations\");\n\tmap.put(\"rapscallion\",\"流氓,恶棍:evil\");\n\tmap.put(\"rapt\",\"狂喜的,狂热的:pleasurable emotion;全神贯注的:deeply absorbed\");\n\tmap.put(\"rash\",\"草率的,仓促的:lack caution\");\n\tmap.put(\"rarefy\",\"使稀薄:make rare\");\n\tmap.put(\"raspy\",\"声音刺耳的:harsh;容易生气的:easily irritated\");\n\tmap.put(\"ratify\",\"(官方地)认可,批准:official acceptance\");\n\tmap.put(\"ratiocination\",\"推理:thought processes\");\n\tmap.put(\"ration\",\"定额供应量,配给量:amount allotted;按比例分配:share or portion\");\n\tmap.put(\"rational\",\"合乎逻辑的:logical;理性的:based on reasoning\");\n\tmap.put(\"rave\",\"狂热赞扬:exaggerated display of affection;(发疯般的)怒吼:talk as if in delirium\");\n\tmap.put(\"ravel\",\"解开,松开:separate strands;阐明:clarity by separating;使纠缠,使复杂化:tangle\");\n\tmap.put(\"ravish\",\"使陶醉,使沉迷:overcome with emotion\");\n\tmap.put(\"raze\",\"摧毁,粉碎:destroy completely\");\n\tmap.put(\"react\",\"做出反应:in response\");\n\tmap.put(\"reactionary\",\"反对改革的,极保守的:opposition to progress\");\n\tmap.put(\"ream\",\"怒斥,训斥:criticize\");\n\tmap.put(\"reap\",\"收割,收获:receive\");\n\tmap.put(\"reassure\",\"使安心,打消疑虑:restore to confidence\");\n\tmap.put(\"rebuff\",\"严词拒绝:reject\");\n\tmap.put(\"recalcitrant\",\"顽抗的,不顺从的:resistance defiance\");\n\tmap.put(\"recant\",\"撤回,放弃,改变:withdraw a statement\");\n\tmap.put(\"recessive\",\"(基因等)隐性的,由隐性基因控制的:does not produce a characteristic effect when present with a dominant allele;内向的,内敛的:not comfortable around people\");\n\tmap.put(\"recidivate\",\"回到原先的习惯,尤指重新犯罪:return to criminal habits\");\n\tmap.put(\"reciprocate\",\"往复运动:forward and backward;报答,回报:return\");\n\tmap.put(\"reckless\",\"不考虑后果的,大胆鲁莽的:careless\");\n\tmap.put(\"recluse\",\"隐士:lives away;隐居的,不爱社交的:withdrawal from society\");\n\tmap.put(\"recoil\",\"退却,畏缩:shrink back\");\n\tmap.put(\"reconcile\",\"使和解,协调:harmony\");\n\tmap.put(\"recondite\",\"深奥的,难解的:difficult to comprehend\");\n\tmap.put(\"reconnoiter\",\"侦察,勘查:make a preliminary inspection\");\n\tmap.put(\"reconstitute\",\"重建,(尤其是通过加水)使复原:restore by adding water\");\n\tmap.put(\"reconvene\",\"重新集合,重新召集:gather or summon again\");\n\tmap.put(\"rectitude\",\"正直:moral integrity\");\n\tmap.put(\"recumbent\",\"躺着的:lying down\");\n\tmap.put(\"recuperate\",\"恢复(健康或力量),康复:recover health\");\n\tmap.put(\"redolent\",\"芳香的:fragrance\");\n\tmap.put(\"redoubtable\",\"杰出的,值得尊敬的:worthy of respect;可怕的:arousing fear\");\n\tmap.put(\"redundant\",\"多余的,冗余的:exceeding necessary\");\n\tmap.put(\"reel\",\"感到眩晕:from being twirled around;蹒跚地走路:swaying from side to side\");\n\tmap.put(\"referee\",\"仲裁者;裁判员:impartially resolves a dispute;(就纠纷或争论)给出意见:give an opinion\");\n\tmap.put(\"refine\",\"提纯,精炼:free from impurities;改善,改进:improve or perfect\");\n\tmap.put(\"reflect\",\"反射:change direction;反映,显露:make manifest;思考:think seriously\");\n\tmap.put(\"refractory\",\"倔强的,不顺从的:resisting control\");\n\tmap.put(\"refulgent\",\"辉煌的,灿烂的:shinning radiantly\");\n\tmap.put(\"refute\",\"否认:declare not to be true;证明为假,证伪:prove wrong\");\n\tmap.put(\"regenerate\",\"使重获新生,使焕然一新:bring back to life;(使)洗心革面:better in character\");\n\tmap.put(\"regimen\",\"(政治上的)统治:lawful control\");\n\tmap.put(\"regress\",\"后退:back;退化,恶化:worse\");\n\tmap.put(\"rehabilitate\",\"使复原,使康复:restore to healthy condition;(使)洗心革面:better in character\");\n\tmap.put(\"rehearsal\",\"排练,彩排:practicing in preparation\");\n\tmap.put(\"reign\",\"统治权:right to command;占统治地位或盛行:be predominant\");\n\tmap.put(\"rein\",\"抑制,限制:keeping within certain boundaries;抑制,控制:keep from exceeding\");\n\tmap.put(\"reiterate\",\"重申:state again\");\n\tmap.put(\"rejoice\",\"欣喜,喜悦:feel joy\");\n\tmap.put(\"relapse\",\"故态复萌,再犯:fall back\");\n\tmap.put(\"release\",\"排放:give off;释放,使获得自由:set free;解雇:let go from office\");\n\tmap.put(\"relentless\",\"残酷的,无情的:no abatement or severity;固执的,不肯妥协的:yielding in one’s purpose\");\n\tmap.put(\"relevant\",\"有关系的,重要的:having connection\");\n\tmap.put(\"religion\",\"宗教,信仰:beliefs;(对于宗教信仰的)忠诚,虔诚:loyalty to God\");\n\tmap.put(\"relinquish\",\"放弃(职位,权力等):give up;移交,交出:give control or possession\");\n\tmap.put(\"relish\",\"喜好,偏好:appreciation or liking;(愿望达成时的)高兴,满足感:when wishes are met;享受,喜欢:take pleasure\");\n\tmap.put(\"reluctant\",\"不情愿的,反感的:showing unwillingness\");\n\tmap.put(\"remiss\",\"疏忽的,不留心的:carelessness\");\n\tmap.put(\"remodel\",\"改造,改变结构:alter the structure\");\n\tmap.put(\"remonstrance\",\"抗议,抱怨:expression of protect, complaint\");\n\tmap.put(\"remorse\",\"懊悔,悔恨:bitter regret\");\n\tmap.put(\"remunerate\",\"支付报酬,补偿:pay\");\n\tmap.put(\"rend\",\"撕裂,猛拉:tear or split apart\");\n\tmap.put(\"renegade\",\"背教者,叛徒:rejects allegiance\");\n\tmap.put(\"renounce\",\"(正式地)放弃:give up;宣布与…决裂:refuse to follow\");\n\tmap.put(\"renovate\",\"修复,维修:restore;使重获新生,使焕然一新:bring back to life\");\n\tmap.put(\"repartee\",\"机智的回答:witty response;打趣,善意的玩笑:good-natured teasing\");\n\tmap.put(\"repatriate\",\"遣返:return to country\");\n\tmap.put(\"repeal\",\"撤销,废除(法律等):rescind or annul;宣布与…决裂:refuse to recognize\");\n\tmap.put(\"repel\",\"抵制:fight against;使厌恶:cause aversion\");\n\tmap.put(\"repertoire\",\"(技术、设备或原料等的)详单:complete list\");\n\tmap.put(\"repine\",\"抱怨、表达不满:express discontent;渴望:long for\");\n\tmap.put(\"replete\",\"彻底吃饱了的:appetite completely satisfied;充满…的,富于…的:possessing great numbers\");\n\tmap.put(\"repose\",\"(劳作后的)休息:state of resting;平静,宁静:freedom from storm;休息:take a rest;放置,交给他人:safekeeping or another\");\n\tmap.put(\"reprehend\",\"谴责,责难,批评:express unfavorable opinion\");\n\tmap.put(\"repress\",\"镇压:put down by force;阻止(正常的表达、活动或发展等):prevent expression\");\n\tmap.put(\"reprieve\",\"对...暂缓处刑,免罪:postpone or cancel punishment;维持...的运行:prevent from being closed\");\n\tmap.put(\"reproach\",\"令人羞愧的事物,耻辱:causes shame;批评,责备:express criticism\");\n\tmap.put(\"reprobate\",\"堕落者,道德败坏的人:unprincipled person;堕落的,放荡的:morally corrupt;谴责,痛斥:condemn strongly;拒绝,不提供:unwilling to grant\");\n\tmap.put(\"reproof\",\"批评,反对:criticism\");\n\tmap.put(\"reprove\",\"温和地责备,警告:scold gently;不欣赏,不喜欢:unfavorable opinion\");\n\tmap.put(\"repudiate\",\"否认:declare not to be true;拒绝接受:unwillingness to accept\");\n\tmap.put(\"repugnant\",\"令人厌恶的:arousing aversion;不和谐的,不协调的:not harmony\");\n\tmap.put(\"repulse\",\"使厌恶,排斥:reject with denial\");\n\tmap.put(\"repute\",\"(尤指好的)名声,名誉:good reputation\");\n\tmap.put(\"requite\",\"酬谢,报答:make repayment;报仇:punish in kind\");\n\tmap.put(\"requisite\",\"必需品:something necessary;必不可少的,必备的:necessary\");\n\tmap.put(\"rescind\",\"废除,取消:make void\");\n\tmap.put(\"reserved\",\"内向的,缄默的:restrained\");\n\tmap.put(\"residue\",\"剩余物:remains\");\n\tmap.put(\"resign\",\"辞职,放弃(职位):give up office\");\n\tmap.put(\"resilience\",\"弹力:resume original shape;恢复能力:ability to recover quickly\");\n\tmap.put(\"resolute\",\"坚定的:firm determination\");\n\tmap.put(\"resonant\",\"(声音)洪亮的,共鸣的:strong in tone\");\n\tmap.put(\"resourceful\",\"有创造力的,机智的:act imaginatively\");\n\tmap.put(\"respite\",\"间歇,休息:rest\");\n\tmap.put(\"respire\",\"呼吸:inhale, exhale air\");\n\tmap.put(\"resplendent\",\"华丽辉煌的:brilliantly\");\n\tmap.put(\"responsive\",\"反应的,敏感的:quick to respond\");\n\tmap.put(\"restive\",\"急躁的,忧虑的:impatience, uneasiness;难以管束的:resisting control\");\n\tmap.put(\"restless\",\"不平静的:lack of quite\");\n\tmap.put(\"restrain\",\"限制,控制:limit, restrict\");\n\tmap.put(\"resurgence\",\"复兴:restoration\");\n\tmap.put(\"resuscitate\",\"使复活,使苏醒:restore consciousness\");\n\tmap.put(\"retainer\",\"家仆:service\");\n\tmap.put(\"retaliate\",\"报复,反击:pay back\");\n\tmap.put(\"retard\",\"减速,延迟:cause slowly\");\n\tmap.put(\"retinue\",\"随行人员:group of retainers\");\n\tmap.put(\"reticent\",\"沉默不语的:inclined to be silent;不愿意的:slow to begin\");\n\tmap.put(\"retort\",\"(尤指机智的)回应,回答:quick, witty reply\");\n\tmap.put(\"retouch\",\"润饰,改进:improve\");\n\tmap.put(\"retract\",\"收回,否认:take back\");\n\tmap.put(\"retrench\",\"削减开支:curtail expenses\");\n\tmap.put(\"retribution\",\"报酬,报应:reward or punishment\");\n\tmap.put(\"retrograde\",\"倒退的:moving backward;退步,退化:decline\");\n\tmap.put(\"retrospective\",\"回顾的:looking back\");\n\tmap.put(\"revelry\",\"狂乐,喧闹的作乐:noisy partying\");\n\tmap.put(\"revenge\",\"报复,复仇:retaliating;为...复仇:retaliating in kind\");\n\tmap.put(\"revere\",\"(尤指对神的)尊崇,尊敬:respect\");\n\tmap.put(\"revise\",\"更改,修正:improve\");\n\tmap.put(\"revive\",\"恢复意识:return to consciousness;再获新生:active again\");\n\tmap.put(\"revoke\",\"撤回,宣告无效:annul\");\n\tmap.put(\"revolt\",\"使厌恶,使反感:fill with disgust;反叛:renounce allegiance\");\n\tmap.put(\"ribald\",\"(举止、言语)下流粗鄙的:vulgar\");\n\tmap.put(\"rickety\",\"不稳的:lacking stability\");\n\tmap.put(\"rider\",\"骑马的人:rides;(议案的)附加条款:appended\");\n\tmap.put(\"ridicule\",\"嘲笑:make fun\");\n\tmap.put(\"rife\",\"丰富的,普遍的:great numbers\");\n\tmap.put(\"rift\",\"分裂,不和:break friendly;使开裂:break\");\n\tmap.put(\"rile\",\"刺激,惹怒:make agitated\");\n\tmap.put(\"ripen\",\"使成熟,变成熟:make ripe\");\n\tmap.put(\"riot\",\"喧闹,暴乱:public violence\");\n\tmap.put(\"rite\",\"惯例,仪式:prescribed form\");\n\tmap.put(\"rive\",\"撕开:tear apart\");\n\tmap.put(\"riveting\",\"吸引人的,极迷人的:absorbing engrossing\");\n\tmap.put(\"rivulet\",\"小河,小溪:small stream\");\n\tmap.put(\"robust\",\"精力充沛的,强壮的,健康的:full of strength\");\n\tmap.put(\"roil\",\"搅浑,使混乱:stir up;激怒:displease\");\n\tmap.put(\"roisterer\",\"喝酒喧闹的人:engages in merrymaking\");\n\tmap.put(\"rookie\",\"新兵;新生;菜鸟:recruit\");\n\tmap.put(\"roster\",\"值勤表,花名册:list of personnel\");\n\tmap.put(\"rostrum\",\"讲坛,演讲坛:stage speaking\");\n\tmap.put(\"rouse\",\"激起,煽动:stir up;唤醒:stop sleeping\");\n\tmap.put(\"royalty\",\"皇家身份:regal character;版税;专利权税:payment\");\n\tmap.put(\"rubicund\",\"红润的,健康的:healthy rosiness\");\n\tmap.put(\"rudimentary\",\"初始的,未发展的:earliest development;最根本的,基础的:first principles\");\n\tmap.put(\"rue\",\"后悔,遗憾:feeling of regret\");\n\tmap.put(\"ruffle\",\"皱褶,褶裥花边:strip edge;使粗糙:destroy smoothness;扰乱,打扰:disturb\");\n\tmap.put(\"ruminate\",\"沉思:go over in the mind\");\n\tmap.put(\"rumple\",\"使皱,弄皱:form creases;打乱,使不整齐:undo the proper order\");\n\tmap.put(\"run\",\"(不间断的)连续演出:course of performances\");\n\tmap.put(\"runic\",\"神秘的:mysterious\");\n\tmap.put(\"rupture\",\"打破;打碎,破裂:part\");\n\tmap.put(\"ruse\",\"诡计:subterfuge\");\n\tmap.put(\"rustic\",\"乡下人,头脑简单的人:awkward or simple person;乡村的:open areas with few buildings;粗俗的:lacking polish\");\n\tmap.put(\"rustle\",\"快速地行动:move or act with speed\");\n\tmap.put(\"sabotage\",\"妨害,破坏:hinder a cause;从事破坏活动,阻止:practice sabotage\");\n\tmap.put(\"saccharine\",\"像糖一样的,有甜味的:sugar;做作的,矫情的:appealing to the emotions\");\n\tmap.put(\"sacrilege\",\"亵渎圣物:profanation sacred\");\n\tmap.put(\"saddle\",\"使某人担负:load\");\n\tmap.put(\"safeguard\",\"保护措施:prevent accident;保护:make safe\");\n\tmap.put(\"sage\",\"智者:wisdom\");\n\tmap.put(\"salient\",\"显著的,最突出的:conspicuously\");\n\tmap.put(\"salubrious\",\"有益健康的:promoting health\");\n\tmap.put(\"salutary\",\"有益健康的:promoting health;有利的,利好的:promoting well-being\");\n\tmap.put(\"salutation\",\"致敬,打招呼(表示欢迎和礼貌):greeting;赞扬:praise\");\n\tmap.put(\"salvage\",\"(从灾难中)抢救:save from loss\");\n\tmap.put(\"salve\",\"减轻:缓解:assuage\");\n\tmap.put(\"sanctify\",\"使神圣,将...敬为神:make holy\");\n\tmap.put(\"sanctimonious\",\"假装虔诚的:hypocritically pious\");\n\tmap.put(\"sanction\",\"批准,同意,许可:make valid;制裁:coercive measure\");\n\tmap.put(\"sanctuary\",\"避难所:protection\");\n\tmap.put(\"sand\",\"磨光:make smooth\");\n\tmap.put(\"sanguine\",\"乐观的,确信的:free from doubt;面色红润的:healthy reddish\");\n\tmap.put(\"sanitary\",\"健康的,清洁的:health\");\n\tmap.put(\"sap\",\"削弱:weaken energy vitality;健康,活力:active strength\");\n\tmap.put(\"sapient\",\"聪明的,有洞察力的:deep understanding, intelligent\");\n\tmap.put(\"sarcasm\",\"讽刺,轻蔑:ironic\");\n\tmap.put(\"sartorial\",\"裁缝匠的,裁缝的:clothes\");\n\tmap.put(\"sate\",\"使饱足,充分满足:satisfy fully\");\n\tmap.put(\"satiate\",\"(使)饱足(的),过分满足(的):satisfy fully\");\n\tmap.put(\"satire\",\"讽刺诗,讽刺文学:literary ridicule\");\n\tmap.put(\"satirize\",\"讽刺:ridicule\");\n\tmap.put(\"saturate\",\"使饱和,浸透:wet thoroughly\");\n\tmap.put(\"saturnine\",\"忧郁的,阴沉的:lacking in cheer;讽刺的:sardonic\");\n\tmap.put(\"saunter\",\"闲逛,漫步:by foot\");\n\tmap.put(\"savant\",\"博学之士,学者:learning\");\n\tmap.put(\"savory\",\"口感好的,味道好的:appetizing taste, smell;令人愉悦的,pleasure or contentment\");\n\tmap.put(\"savvy\",\"老练,机智:knowledge actually doing;明确了解:clear idea of;有见识的,精明能干的:practical cleverness or judgment\");\n\tmap.put(\"scads\",\"许多,大量:large number\");\n\tmap.put(\"scant\",\"不足的,缺乏的:scarcely\");\n\tmap.put(\"scathing\",\"尖酸刻薄的:cause hurt feelings\");\n\tmap.put(\"schism\",\"不一致:lack of agreement\");\n\tmap.put(\"scintillate\",\"闪耀:sparks\");\n\tmap.put(\"scion\",\"子孙:descendant\");\n\tmap.put(\"scission\",\"切断,分离,分裂:division\");\n\tmap.put(\"scoff\",\"嘲笑:derision, mock;狼吞虎咽:eat greedily\");\n\tmap.put(\"scorch\",\"炙烤,烘干:burn, make dry\");\n\tmap.put(\"scorn\",\"轻蔑,鄙视,不屑:reject contemptible\");\n\tmap.put(\"scotch\",\"停止:put an end to\");\n\tmap.put(\"scour\",\"用力擦洗:wash vigorously;搜查:to find or discover\");\n\tmap.put(\"scowl\",\"皱眉(表现出不高兴):expression displeasure\");\n\tmap.put(\"scrappy\",\"好斗的,好吵架的:aggressive\");\n\tmap.put(\"scrap\",\"废料,废物:discarded or useless;抛弃:get rid of;终止,放弃原计划:put an end to\");\n\tmap.put(\"scrawl\",\"乱涂,潦草地写:write carelessly\");\n\tmap.put(\"scribble\",\"潦草地书写,乱写:meaningless\");\n\tmap.put(\"scrupulous\",\"正直的:principled;一丝不苟的:great care and effort\");\n\tmap.put(\"scrutable\",\"可以理解的:understood comprehensible\");\n\tmap.put(\"scrutinize\",\"仔细检查:observe great care\");\n\tmap.put(\"scuff\",\"(使)磨损:roughened by wear;脚步拖沓:move heavily\");\n\tmap.put(\"scurrilous\",\"说粗话的:vulgar\");\n\tmap.put(\"scurvy\",\"下流的,让人鄙视的:contemptible\");\n\tmap.put(\"seamy\",\"肮脏的,堕落的:sordid, base\");\n\tmap.put(\"secluded\",\"僻静的,隐蔽的:hidden\");\n\tmap.put(\"secrete\",\"隐藏:conceal;分泌:generate\");\n\tmap.put(\"sedate\",\"淡定的,安静的:free from agitation\");\n\tmap.put(\"sedentary\",\"固定不动的:not migratory\");\n\tmap.put(\"seduce\",\"劝说(使不忠,使不服从),诱...误入歧途:persuade\");\n\tmap.put(\"sedulous\",\"勤奋认真的:careful perseverance\");\n\tmap.put(\"seemly\",\"得体的,遵守礼节的:following the established traditions\");\n\tmap.put(\"segment\",\"分割;部分:separate\");\n\tmap.put(\"self-abasement\",\"自卑,自谦:humiliation\");\n\tmap.put(\"self-absorbed\",\"自恋的,自私的:absorbed in one's own\");\n\tmap.put(\"seminal\",\"有发展性的:contributing later development;创新的:creative\");\n\tmap.put(\"sensation\",\"感觉,知觉:sense;轰动事件:intense interest\");\n\tmap.put(\"sensitive\",\"敏感的:susceptible\");\n\tmap.put(\"sentinel\",\"哨兵,看守:watches over\");\n\tmap.put(\"sepulchral\",\"阴沉的,丧葬的:lacking in cheer\");\n\tmap.put(\"septic\",\"腐败的,感染的:putrefaction\");\n\tmap.put(\"sequela\",\"结果:secondary result\");\n\tmap.put(\"sequester\",\"使隔离,分离:segregate;使隐退:seclusion\");\n\tmap.put(\"sere\",\"干枯的,凋萎的:dried, withered\");\n\tmap.put(\"serendipity\",\"意外发现珍奇(或称心)事物的本领:by accident\");\n\tmap.put(\"serene\",\"安静的:free from uproar;稳重的,镇静的:unaffected, calm\");\n\tmap.put(\"sermon\",\"布道,说教:public speech moral\");\n\tmap.put(\"serpentine\",\"弯曲的:winding\");\n\tmap.put(\"serrate\",\"锯齿状的:notched\");\n\tmap.put(\"serried\",\"密集的:little space\");\n\tmap.put(\"servile\",\"低下的,卑屈的:submissive, abject\");\n\tmap.put(\"severe\",\"严厉的,要求严格的:exacting standards;难以承受的,艰难的:difficult to endure\");\n\tmap.put(\"shackle\",\"束缚:restrictions;限制,阻碍:create difficulty\");\n\tmap.put(\"shadow\",\"偷偷尾随:secretly trail;遮蔽,(使)变暗:gloomy\");\n\tmap.put(\"shallow\",\"浅显的,浅薄的:lack of depth of understanding\");\n\tmap.put(\"sham\",\"欺瞒:deceitfulness;掩饰,假装:present a false appearance;虚假的:fake\");\n\tmap.put(\"shiftless\",\"胸无大志的,懒惰的:lacking ambition\");\n\tmap.put(\"shipshape\",\"井然有序的:order\");\n\tmap.put(\"shirk\",\"逃避,规避:keep away from\");\n\tmap.put(\"shoal\",\"浅的:little depth\");\n\tmap.put(\"shopworn\",\"陈旧的:worn-out\");\n\tmap.put(\"shred\",\"少量:small amount\");\n\tmap.put(\"shrewd\",\"精明的,机敏的:cleverness or judgment;刺骨的,强烈的:discomfort\");\n\tmap.put(\"shrink\",\"(在数量或价值方面)降低,减小:reduced;(使)本能性地退却(如因遇到使人惊恐的事物),(使)退缩:draw back;表示出不情愿,犹豫:hesitate\");\n\tmap.put(\"shroud\",\"隐蔽物,可起隐蔽、保护或屏护作用的物体:conceals, protects, screens;将...从视线中隔离,遮蔽:shut off from sight\");\n\tmap.put(\"shrug\",\"轻视,忽略:dismiss;脱下(衣物等):rid\");\n\tmap.put(\"shun\",\"避开,避免:keep away\");\n\tmap.put(\"sidestep\",\"(通过逃避而)不遵守:avoid having to comply with\");\n\tmap.put(\"signal\",\"(在重要性、成就方面)非同寻常的:standing above;给出信号:direct or notify\");\n\tmap.put(\"simpleton\",\"(缺乏常识的)笨蛋:lacking in common sense\");\n\tmap.put(\"simulate\",\"假装,模仿:take on the appearance;模拟:create a representation\");\n\tmap.put(\"sin\",\"罪恶的事:highly reprehensible\");\n\tmap.put(\"sincere\",\"真诚的,不做作的:without pretense\");\n\tmap.put(\"sinecure\",\"美差:requires little or no work\");\n\tmap.put(\"sinew\",\"活力,力量:vigorous strength\");\n\tmap.put(\"singe\",\"轻微烧焦:burn superficially\");\n\tmap.put(\"sinuous\",\"蜿蜒的,迂回的:irregular curves\");\n\tmap.put(\"sip\",\"(尤指小口地)喝:swallow in liquid form\");\n\tmap.put(\"skeleton\",\"骨架,框架:structural framework\");\n\tmap.put(\"skeptic\",\"怀疑者:doubts, questions or disagrees\");\n\tmap.put(\"skimp\",\"缺乏的,不足的:less plentiful;节省花费,吝啬:give insufficient funds\");\n\tmap.put(\"skirmish\",\"小冲突,争论:minor\");\n\tmap.put(\"skirt\",\"界限,边界:marks the outer limit;绕行,避开:go around\");\n\tmap.put(\"slack\",\"松弛的:not tightly fastened;疏忽的,大意的:failing to give proper care\");\n\tmap.put(\"slake\",\"使满足:satisfy\");\n\tmap.put(\"slant\",\"(看待问题、思考的)角度,看法:way of looking;倾斜的:slanting direction;歪曲(事实等):create a wrong impression\");\n\tmap.put(\"slate\",\"列入名单,计划,安排:put on a list\");\n\tmap.put(\"slew\",\"大量,许多:large amount\");\n\tmap.put(\"slight\",\"不重要的:deficient in weight;轻微的:small in degree;轻蔑,看不起:treat with disdain;忽略,疏忽:fail to give proper attention\");\n\tmap.put(\"sling\",\"投掷:send through the air\");\n\tmap.put(\"slippery\",\"光滑的:slide;隐秘的:acting in secret;意义不明确的:not precise in meaning\");\n\tmap.put(\"slipshod\",\"粗心的,随意的:indifference to exactness, precision, and accuracy\");\n\tmap.put(\"sloppy\",\"邋遢的,不整洁的:lacking neatness;混乱的:lacking in order\");\n\tmap.put(\"sloth\",\"怠惰,懒惰:disinclination to action\");\n\tmap.put(\"slouch\",\"懒人:lazy person;缓慢行走:move slowly\");\n\tmap.put(\"slovenly\",\"邋遢的,不整洁的:lacking neatness\");\n\tmap.put(\"sluggard\",\"懒人:lazy person\");\n\tmap.put(\"sluggish\",\"缓慢的,迟缓的:slow in movement;迟钝的,反应慢的:slow to respond\");\n\tmap.put(\"slumber\",\"睡着:sleep\");\n\tmap.put(\"slur\",\"耻辱:mark of guilt;含糊地发音:indistinctly;疏忽,忽略:without due, consideration\");\n\tmap.put(\"sly\",\"狡猾的:clever or cunning;隐秘的,偷偷的:acting in secret\");\n\tmap.put(\"smarmy\",\"虚情假意的,过分恭维的:hypocritically\");\n\tmap.put(\"smart\",\"反应敏捷的,聪颖的:sharp quick thought;整洁的:strikingly neat;感到疼痛,感到痛苦:suffer acutely\");\n\tmap.put(\"smattering\",\"浅薄的知识:superficial knowledge;少量:small amount\");\n\tmap.put(\"smirk\",\"(自鸣得意地)笑:offensively self-satisfied\");\n\tmap.put(\"smother\",\"使窒息:killed by lack of air;抑制(表达,说出),压制:refrain\");\n\tmap.put(\"smug\",\"自大的,自鸣得意的:opinion of oneself;整洁的,有序的:good order\");\n\tmap.put(\"smuggling\",\"走私,私运:importation or exportation contrary to the law\");\n\tmap.put(\"snare\",\"无法逃脱的困境:catches and holds;捕捉:capture by\");\n\tmap.put(\"snarl\",\"纠缠,纠结:twist;咆哮,怒吼:to anger\");\n\tmap.put(\"sneer\",\"(轻蔑地)嘲笑:scornful\");\n\tmap.put(\"snobbish\",\"谄上傲下的,自大的:offensive air of superiority\");\n\tmap.put(\"snub\",\"轻视,不理睬:contempt or neglect\");\n\tmap.put(\"soak\",\"使...湿透:make thoroughly wet\");\n\tmap.put(\"sober\",\"严肃的:serious-looking;节制的:restraint;有理有据的:sound reasoning\");\n\tmap.put(\"sodden\",\"湿透的:penetrated by water;使...湿透:wet thoroughly\");\n\tmap.put(\"solace\",\"安慰:comfort in sorrow;安慰,安抚:console\");\n\tmap.put(\"solder\",\"连接,联合:unite\");\n\tmap.put(\"solemnity\",\"庄严,严肃:solemn\");\n\tmap.put(\"solicitous\",\"为他人操心的,体谅他人的:happiness of others;迫切的,渴望的:urgent desire\");\n\tmap.put(\"solid\",\"固态的,坚固的:not easily yield to pressure;有理有据的:sound reasoning;坚定的,不迟疑的:not showing weakness\");\n\tmap.put(\"soliloquy\",\"(尤指自言自语的)独白:without addressing a listener\");\n\tmap.put(\"solitude\",\"孤独,避世:being alone\");\n\tmap.put(\"solvent\",\"有偿付能力的:able to pay debts;溶剂:another substance is dissolved\");\n\tmap.put(\"somatic\",\"肉体的:of the body\");\n\tmap.put(\"somber\",\"昏暗的,无光的:shaded;悲伤的,不愉快的:lacking in cheer\");\n\tmap.put(\"somnolence\",\"瞌睡,嗜睡:needing sleep\");\n\tmap.put(\"sonnet\",\"十四行诗:14-line verse form\");\n\tmap.put(\"soothe\",\"带来慰藉,安慰:bring comfort;使镇静,使安心:free from distress;弱化,缓解:less severe\");\n\tmap.put(\"sop\",\"安慰物:placate or soothe;贿赂,回扣:improperly influence a person's conduct;浸湿,湿透:wet thoroughly\");\n\tmap.put(\"sophism\",\"假推理,诡辩:deceptive argumentation\");\n\tmap.put(\"sophisticated\",\"精明的,老于世故的:worldly knowledge or refinement;复杂的:complex\");\n\tmap.put(\"soporific\",\"催眠的药剂,安眠药:induces sleep;催眠的:cause sleep;慵懒的,困倦的:sleepiness or lethargy\");\n\tmap.put(\"sordid\",\"肮脏的,不干净的:not clean;卑鄙的:baseness\");\n\tmap.put(\"sound\",\"牢固的,不可动摇的:withstand stress without structural damage;健康的,强壮的:free from injury;(逻辑)上严谨的:valid reasoning\");\n\tmap.put(\"sparse\",\"稀疏的,稀少的:less plentiful\");\n\tmap.put(\"spartan\",\"简朴的,节约的:simplicity\");\n\tmap.put(\"spat\",\"(小的)争吵:quarrel\");\n\tmap.put(\"spate\",\"突发的洪水:sudden flood;大量:large number\");\n\tmap.put(\"specific\",\"特有的,独特的:exact sort;明确的:clearly expressed\");\n\tmap.put(\"specious\",\"似是而非的,欺骗性的:false look of truth\");\n\tmap.put(\"speck\",\"小点,少量:small amount\");\n\tmap.put(\"spectator\",\"观众,目击者,旁观者:watches\");\n\tmap.put(\"spectrum\",\"光谱,范围,系列:sequence or range\");\n\tmap.put(\"speculate\",\"推测,揣测:take to be true;投机倒买:from market fluctuations\");\n\tmap.put(\"spendthrift\",\"挥霍家,败家子:spends improvidently;挥霍的,不节俭的:spending money freely\");\n\tmap.put(\"spent\",\"精疲力竭的:drained of energy\");\n\tmap.put(\"spindly\",\"细长纤弱的:frail or flimsy\");\n\tmap.put(\"spiny\",\"多刺的:spines;棘手的,麻烦的:requiring exceptional skill\");\n\tmap.put(\"spleen\",\"怒气,怨恨:anger or ill will\");\n\tmap.put(\"splice\",\"接合,叠接:unite\");\n\tmap.put(\"spontaneous\",\"自发的,不经思索的:without apparent thought\");\n\tmap.put(\"spoof\",\"轻松幽默的模仿,小恶搞:exaggerates for comic effect;诱骗,诱使相信:believe what is true\");\n\tmap.put(\"sporadic\",\"偶尔的,零星发生的:not often occurring\");\n\tmap.put(\"sprawl\",\"杂乱无序地发展;蔓生,蔓延:irregularly\");\n\tmap.put(\"sprightly\",\"活泼的,充满活力的:full of vitality\");\n\tmap.put(\"spur\",\"刺激物:arouses action;支撑物:holds up;刺激,激励:incite\");\n\tmap.put(\"spurious\",\"假的,伪造的:lacking authenticity\");\n\tmap.put(\"spurn\",\"摒弃,拒绝:reject with disdain\");\n\tmap.put(\"squabble\",\"口角,小争吵:quarrel\");\n\tmap.put(\"squalid\",\"污秽的,肮脏的:dirty;道德败坏的:repulsive\");\n\tmap.put(\"squall\",\"(通常伴随雨或雪的)风暴,暴风雪,暴风雨:violent windstorm;尖叫:scream\");\n\tmap.put(\"squander\",\"使分散:apart;浪费:spend wastefully\");\n\tmap.put(\"squat\",\"又矮又胖的:broad in build, short in stature\");\n\tmap.put(\"squint\",\"斜视,睥睨:glances sideways\");\n\tmap.put(\"squelch\",\"压制,镇压(运动):stop by force;击溃,使无言以对:put down or silence\");\n\tmap.put(\"stabilize\",\"使稳定;变得稳定:make or become stable\");\n\tmap.put(\"stalwart\",\"无所畏惧的:no fear;(体魄等)强健的:strength vigor;坚定的:firm, resolute\");\n\tmap.put(\"stamina\",\"耐力:moral strength;\");\n\tmap.put(\"stammer\",\"口吃,结巴:speak with pauses\");\n\tmap.put(\"startle\",\"使吓一跳,使大吃一惊:frighten or surprise\");\n\tmap.put(\"static\",\"静态的;停滞的:lack of movement;无改变的:little change\");\n\tmap.put(\"stature\",\"高度,身高:height;才干,水平:quality, status\");\n\tmap.put(\"steadfast\",\"坚定的,忠诚的:firm in belief\");\n\tmap.put(\"stealth\",\"秘密行动:proceeding furtively;秘密的:not to attract attention\");\n\tmap.put(\"steep\",\"浸泡:make wet;陡峭的:approaching perpendicular;过分的,过高的:beyond limit\");\n\tmap.put(\"stench\",\"臭气,恶臭:foul odor\");\n\tmap.put(\"stentorian\",\"声音洪亮的:loud\");\n\tmap.put(\"sterile\",\"贫瘠的:not productive;无菌的:free from bacteria\");\n\tmap.put(\"stickler\",\"坚持细节的人,一丝不苟的人:insist on exactness\");\n\tmap.put(\"stiff\",\"僵硬的,无法弯曲的:lacking suppleness;(在社交场合)缺乏优雅的,不自在的:lacking social grace;过分的,过高的:beyond limit;艰苦的,费力的:requiring effort\");\n\tmap.put(\"stifle\",\"抑制(声音、呼吸等);阻止,扼杀:hold back\");\n\tmap.put(\"stigma\",\"耻辱,污名:mark of shame\");\n\tmap.put(\"stint\",\"吝惜,节省:be frugal\");\n\tmap.put(\"stingy\",\"小气的,吝啬的:unwilling;极少量的:less plentiful\");\n\tmap.put(\"stipple\",\"(雕刻时)点刻,用点标记:mark with small spots\");\n\tmap.put(\"stipulate\",\"规定,特定要求:specify agreement\");\n\tmap.put(\"stitch\",\"突然剧痛:sharp unpleasant sensation\");\n\tmap.put(\"stock\",\"库存,储备:inventory;普通的,常备的:commonly used\");\n\tmap.put(\"stockade\",\"栅栏,围栏:enclosure;监狱:confinement\");\n\tmap.put(\"stodgy\",\"平庸的,乏味的:dull;非常守旧的:old-fashioned\");\n\tmap.put(\"stoke\",\"添加燃料:supply fuel;增大,促进:make greater\");\n\tmap.put(\"stoic\",\"隐忍的,冷静的:unaffected by pleasure or pain\");\n\tmap.put(\"stolid\",\"无动于衷的,感情麻木的:little emotion\");\n\tmap.put(\"stomach\",\"容忍:bear\");\n\tmap.put(\"stonewall\",\"拒绝(合作),阻挠:uncooperative, obstructive\");\n\tmap.put(\"stouthearted\",\"勇敢的:stout, spirit\");\n\tmap.put(\"stratagem\",\"谋略,策略:deceiving\");\n\tmap.put(\"strait\",\"海峡:channel joining water;痛苦:suffering\");\n\tmap.put(\"strand\",\"绳,线之一股:single filament;遗弃,使置之困境:leave in a unfavorable place\");\n\tmap.put(\"stratify\",\"将...分成各种等级:divide into classes\");\n\tmap.put(\"stray\",\"漫无目的:lacking purpose;离群,迷途,偏离:move away, deviate\");\n\tmap.put(\"strength\",\"力量:ability to exert effort;(抵抗攻击、压力的)强度:ability to withstand force\");\n\tmap.put(\"striate\",\"加条纹:mark with striations\");\n\tmap.put(\"stricture\",\"责难,批评:criticism\");\n\tmap.put(\"stride\",\"迈大步走:long steps\");\n\tmap.put(\"strident\",\"刺耳的:harsh sound\");\n\tmap.put(\"strike\",\"攻击:force or violence;铸造(奖牌):form by stamping;击打:deliver a blow;袭击,攻击:violent action;撞击:forceful contact\");\n\tmap.put(\"stringent\",\"紧绷的:tight;严格的:marked by rigor\");\n\tmap.put(\"strip\",\"脱衣,剥去:remove clothing\");\n\tmap.put(\"strut\",\"趾高气昂地走:walk pompous;支柱,压杆strengthen a framework\");\n\tmap.put(\"studio\",\"工作室,画室,摄影室:working place of a painter\");\n\tmap.put(\"stultify\",\"使无效,抑制:render futile\");\n\tmap.put(\"stupor\",\"迟钝,麻痹,无知觉:suspended sense\");\n\tmap.put(\"stunt\",\"阻碍(成长):hinder growth\");\n\tmap.put(\"sturdy\",\"强健的,结实的:strengthen\");\n\tmap.put(\"stygian\",\"极阴暗的:extremely dark\");\n\tmap.put(\"stymie\",\"阻碍:present an obstacle\");\n\tmap.put(\"subdue\",\"使顺从;征服:conquer\");\n\tmap.put(\"subject\",\"臣民,受支配的人:under authority;取决于(其他因素)的:under the influence\");\n\tmap.put(\"subjugate\",\"征服,镇压:bring under control;剥夺...的自由:make subservient\");\n\tmap.put(\"sublime\",\"崇高的,庄严的:high moral;(因为杰出、尊贵、美丽等而)令人惊叹的:inspire awe\");\n\tmap.put(\"subliminal\",\"下意识的,潜在意识的:below perception\");\n\tmap.put(\"submerge\",\"使淹没:under water\");\n\tmap.put(\"submissive\",\"服从的,顺从的,恭顺的:submitting\");\n\tmap.put(\"subordinate\",\"下级的,次要的:lower rank;征服:under one's control\");\n\tmap.put(\"subservient\",\"奉承的,屈从的:obsequiously\");\n\tmap.put(\"subside\",\"下陷,下沉,减弱:tend downward\");\n\tmap.put(\"subsidiary\",\"次要的:secondary importance;起辅助作用的:aid, support\");\n\tmap.put(\"subsidy\",\"补助金,津贴:monetary support\");\n\tmap.put(\"substantial\",\"物质的:having substance;有重大意义的:considerable in importance\");\n\tmap.put(\"substantiate\",\"证实:support with proof;使实体化:give material\");\n\tmap.put(\"substantive\",\"本质的,关键的:relating to the essence\");\n\tmap.put(\"subterfuge\",\"诡计:deception to conceal\");\n\tmap.put(\"subtle\",\"微妙的,难以感知的:difficult perceive;巧妙的,间接或带有欺骗性的:clever deceptive means\");\n\tmap.put(\"subvert\",\"颠覆:overturn\");\n\tmap.put(\"succinct\",\"简明的,简洁的:clear, precise\");\n\tmap.put(\"succor\",\"救援,援助:aid\");\n\tmap.put(\"suffocate\",\"使窒息:deprive of oxygen\");\n\tmap.put(\"suffuse\",\"(色彩等)弥漫,染遍,充满:spread through\");\n\tmap.put(\"sulk\",\"生气,愠怒:resentment\");\n\tmap.put(\"sullen\",\"闷闷不乐的:lacking in cheer\");\n\tmap.put(\"summary\",\"摘要:abstract;就地的,立即的:on the spot\");\n\tmap.put(\"summit\",\"顶点:highest point\");\n\tmap.put(\"summon\",\"召集,召唤:call together;传唤(出庭、出席):command to appear in court\");\n\tmap.put(\"sumptuous\",\"豪华的,奢侈的:extremely luxurious\");\n\tmap.put(\"sunder\",\"分裂,分离:break apart\");\n\tmap.put(\"supercilious\",\"高傲的,傲慢的:haughty\");\n\tmap.put(\"superficial\",\"表面的,肤浅的:lacking depth\");\n\tmap.put(\"superfluous\",\"多余的,过剩的:exceeding sufficient\");\n\tmap.put(\"superimpose\",\"添(声)加(色)(使形象、某因素或性质更加清楚):add distinct\");\n\tmap.put(\"supine\",\"懒散的,倦怠的,消极的,漠不关心的:lethargy, indifference\");\n\tmap.put(\"supple\",\"易弯曲的,柔软的:bent, pliant\");\n\tmap.put(\"supplant\",\"排挤,篡夺...的位置:usurp the place of\");\n\tmap.put(\"supplement\",\"增补,补充:complete for a deficiency\");\n\tmap.put(\"supplicate\",\"恳求,乞求:make a request earnest or urgent\");\n\tmap.put(\"supposition\",\"猜想,推测:little or no evidence\");\n\tmap.put(\"suppress\",\"抑制(表情):inhibit the expression;用暴力终止,镇压:put a stop to, force\");\n\tmap.put(\"surcharge\",\"过高收费:charge much\");\n\tmap.put(\"surfeit\",\"(使)过量,(使)饮食过度:supply excess\");\n\tmap.put(\"surrender\",\"交出,放弃,投降:give over to;使沉溺于:give(oneself)over\");\n\tmap.put(\"surreptitious\",\"偷偷摸摸的,保密的:escape being observed\");\n\tmap.put(\"susceptibility\",\"易受感染的性质或状态:little resistance\");\n\tmap.put(\"suspend\",\"暂停,中止:bring to a formal close;悬挂:hang\");\n\tmap.put(\"suture\",\"缝合:joining\");\n\tmap.put(\"svelte\",\"(女人)体态苗条的,优雅的:slim\");\n\tmap.put(\"swagger\",\"大摇大摆地走,趾高气昂地走:arrogant, pompous;自夸,吹嘘:boast\");\n\tmap.put(\"swear\",\"咒骂:curse;宣誓:oath\");\n\tmap.put(\"sweltering\",\"酷热的:hot\");\n\tmap.put(\"swerve\",\"突然改变方向:turn aside abruptly\");\n\tmap.put(\"swill\",\"痛饮,大口地吃:drink greedily, eat greedily\");\n\tmap.put(\"swindle\",\"欺骗,骗取:cheat\");\n\tmap.put(\"sybarite\",\"沉溺于奢侈逸乐者,酒色之徒:devoted luxury\");\n\tmap.put(\"sycophant\",\"马屁精:flatter\");\n\tmap.put(\"syllabus\",\"提纲,摘要;课文、演讲或研究课题的概要或提纲:summary\");\n\tmap.put(\"syllogism\",\"由一般到个别的推理,演绎:reasoning, deduction\");\n\tmap.put(\"symbiosis\",\"共生关系:living together\");\n\tmap.put(\"symmetry\",\"对称:balanced proportions\");\n\tmap.put(\"synchronous\",\"同时期的,同步的:identical period phase\");\n\tmap.put(\"synergic\",\"合作的:cooperating\");\n\tmap.put(\"synonymous\",\"同义的:same similar meaning\");\n\tmap.put(\"synopsis\",\"摘要,概要:outline, abstract, summary\");\n\tmap.put(\"synthesis\",\"合成,综合:combination\");\n\tmap.put(\"tacit\",\"暗示的:implied, not actually expressed\");\n\tmap.put(\"taciturn\",\"沉默寡言的,话少的:disinclined to talk\");\n\tmap.put(\"tackle\",\"着手处理:start work\");\n\tmap.put(\"tact\",\"机敏,精明,不冒犯:keen sense, maintain good relations\");\n\tmap.put(\"tactile\",\"有触觉的,能触知的:touch tangible\");\n\tmap.put(\"tactless\",\"不机智的,笨拙的:inconsiderate, indiscreet\");\n\tmap.put(\"talisman\",\"护身符:bring good luck, keep away evil\");\n\tmap.put(\"taint\",\"使(品质)污损:morally bad\");\n\tmap.put(\"tamper\",\"恶意篡改,损害:mischievously;玩弄:rashly or foolishly\");\n\tmap.put(\"tangent\",\"离题(的),不相关(的):irrelevant\");\n\tmap.put(\"tangible\",\"可感知的:capable perceived;确凿的,真实的:real or concrete\");\n\tmap.put(\"tangy\",\"刺激的:powerfully stimulating\");\n\tmap.put(\"tantalize\",\"激起,挑逗,引诱:excite\");\n\tmap.put(\"tantamount\",\"等价的,与...相等的:equivalent\");\n\tmap.put(\"tantrum\",\"勃然大怒,发脾气:bad temper\");\n\tmap.put(\"taper\",\"(使)逐渐变细:become narrower, thinner;逐渐减少,减弱:diminish gradually\");\n\tmap.put(\"tardy\",\"缓慢的,迟缓的:slowly;延后的,迟的:delayed\");\n\tmap.put(\"tarnish\",\"玷污:morally bad\");\n\tmap.put(\"tasty\",\"美味的;令人愉悦的:pleasure or contentment\");\n\tmap.put(\"tatty\",\"破旧的,褴褛的:shabby\");\n\tmap.put(\"taunt\",\"嘲弄性质疑,挑衅:challenge, jeer at\");\n\tmap.put(\"taut\",\"紧绷的:not loose;整洁的:proper order, trim shape\");\n\tmap.put(\"tawdry\",\"俗丽的,花哨而庸俗的:gaudy\");\n\tmap.put(\"taxing\",\"繁重的,费力的:requiring much time, effort\");\n\tmap.put(\"tedious\",\"冗长乏味的:tiresome, dullness, boring\");\n\tmap.put(\"teeter\",\"蹒跚,不稳定地行走:unsteadily;犹豫不决:uncertainty\");\n\tmap.put(\"teetotalism\",\"禁酒: abstinence alcoholic\")\n\tmap.put(\"telling\",\"有效的,显著的:effective\");\n\tmap.put(\"temerity\",\"鲁莽,冒失:foolhardy, recklessness\");\n\tmap.put(\"temporize\",\"行动躲躲闪闪以争取时间、躲避争论等:act evasively\");\n\tmap.put(\"temperate\",\"(言行举止)有分寸的:avoiding extremes;有节制的:restraint\");\n\tmap.put(\"tempestuous\",\"突然的,剧烈的:sudden or violent\");\n\tmap.put(\"tenable\",\"有据可依的,无懈可击的:capable defended, reasonable\");\n\tmap.put(\"tenacious\",\"顽固的,不屈不挠的:persistent;粘着的:adhere to\");\n\tmap.put(\"tendentious\",\"有偏见的:biased\");\n\tmap.put(\"tender\",\"正式提出:offer;考虑周到的,关心同情的:sympathy consideration\");\n\tmap.put(\"tenuous\",\"没有实际内容的,空洞的:little substance\");\n\tmap.put(\"tepid\",\"不太热心的:little or no interest\");\n\tmap.put(\"terminology\",\"专业术语:special terms or expressions\");\n\tmap.put(\"terminus\",\"终点,终点站:end\");\n\tmap.put(\"terror\",\"极度恐惧:intense fear\");\n\tmap.put(\"terse\",\"简洁的,简明的:brief\");\n\tmap.put(\"testimony\",\"证词,声明:authentication\");\n\tmap.put(\"testy\",\"易怒的,暴躁的:easily annoyed, irritable\");\n\tmap.put(\"tether\",\"(用绳、铁链)拴系、束缚:fasten, restrain;能力或忍耐力的极限:limit\");\n\tmap.put(\"theatrical\",\"做作的,夸张的,矫揉造作的:exaggerated unnatural\");\n\tmap.put(\"therapeutic\",\"治疗的,有疗效的:treatment disease\");\n\tmap.put(\"thorny\",\"多刺的:full of thorns;棘手的:difficulties\");\n\tmap.put(\"threadbare\",\"陈腐的:hackneyed;贫穷的:lacking possessions;破烂的:worn or torn\");\n\tmap.put(\"throng\",\"大量聚集:crowd in great numbers\");\n\tmap.put(\"thwart\",\"阻挠:oppose\");\n\tmap.put(\"ticklish\",\"易怒的:easily offended;棘手的,对技巧要求高的:exceptional skill or caution\");\n\tmap.put(\"tiff\",\"小争吵:petty quarrel\");\n\tmap.put(\"tightfisted\",\"吝啬的:stingy\");\n\tmap.put(\"timeworn\",\"陈腐的:hackneyed\");\n\tmap.put(\"timid\",\"胆小的,不自信的lacking courage, self-confidence\");\n\tmap.put(\"timorous\",\"胆小的:fearful\");\n\tmap.put(\"tinge\",\"给...着上少量的色彩:color, tint\");\n\tmap.put(\"tinker\",\"乱修,乱调整:thoughtlessly\");\n\tmap.put(\"tint\",\"涂浅色,微染:slight coloration to\");\n\tmap.put(\"tirade\",\"长篇抨击性演讲:angry censorious or denunciatory\");\n\tmap.put(\"toady\",\"马屁精;拍马屁:flatters, gaining favors\");\n\tmap.put(\"tonic\",\"滋补的,有益健康的:stimulating vigor, beneficial\");\n\tmap.put(\"topsy-turvy\",\"混乱的:lacking in order\");\n\tmap.put(\"torpid\",\"麻木的,没有知觉的:sensation;迟钝的,行动迟缓的:slow\");\n\tmap.put(\"torpor\",\"缺乏兴趣:lack of interest;(肉体或精神上的)迟钝,懒散:inertness\");\n\tmap.put(\"torrential\",\"急流的:rapidstreams\");\n\tmap.put(\"torrid\",\"酷热的:intensely hot;热情的,情感深厚的:great depth of feeling\");\n\tmap.put(\"tortuous\",\"转弯抹角的:indirect\");\n\tmap.put(\"tout\",\"极力赞扬:praise\");\n\tmap.put(\"toy\",\"草率或不认真地对待:handle thoughtlessly\");\n\tmap.put(\"tractable\",\"易驾驭的,温顺的:giving in\");\n\tmap.put(\"tranquility\",\"宁静,淡定:freedom from storm\");\n\tmap.put(\"transcend\",\"超越,超过极限:beyond the limits\");\n\tmap.put(\"transfigure\",\"使改变外观:alter appearance, transform\");\n\tmap.put(\"transgress\",\"违背,犯错:fail to keep, commit an offense\");\n\tmap.put(\"transient\",\"短暂的,瞬时的:transitory\");\n\tmap.put(\"transitory\",\"短暂的:lasting only a short time\");\n\tmap.put(\"translucent\",\"透明的:permitting passage light, transparent\");\n\tmap.put(\"transparent\",\"透明的:capable of transmitting light;没有歧义的,清晰易懂的:not subject to misinterpretation\");\n\tmap.put(\"travail\",\"辛苦劳动:arduous\");\n\tmap.put(\"traverse\",\"横穿:pass across\");\n\tmap.put(\"travesty\",\"拙劣的,嘲弄性模仿:exaggerated imitation\");\n\tmap.put(\"treacherous\",\"背叛的:betrayal\");\n\tmap.put(\"trenchant\",\"锐利的:sharp;(言辞)一针见血的:articulate\");\n\tmap.put(\"trepidation\",\"恐惧,战栗:apprehension\");\n\tmap.put(\"trespass\",\"非法入侵;违反;冒犯:enter unlawfully offense\");\n\tmap.put(\"tribute\",\"称颂,颂词:declaration gratitude\");\n\tmap.put(\"trickle\",\"一滴一滴地流,缓缓地流:fall in drops\");\n\tmap.put(\"trite\",\"陈腐的,陈词滥调的:hackneyed\");\n\tmap.put(\"trivial\",\"琐碎的,无足轻重的:little importance\");\n\tmap.put(\"truant\",\"逃避责任(的);逃避责任者:shirking responsibility, shirks duty\");\n\tmap.put(\"truce\",\"休战,休战协定:suspension fighting\");\n\tmap.put(\"truculent\",\"尖酸刻薄的:harsh insulting;好战的,好斗的:eagerness to fight\");\n\tmap.put(\"trudge\",\"吃力而笨拙地走:heavily or clumsily\");\n\tmap.put(\"trumpet\",\"大声说出或宣告:make known\");\n\tmap.put(\"truncate\",\"截短,缩短(时间、篇幅等):shorten\");\n\tmap.put(\"truss\",\"系紧,扎紧:into a tight mass\");\n\tmap.put(\"tumult\",\"骚乱,暴动:disorderly, disturbance\");\n\tmap.put(\"turbid\",\"混浊的:deficient in clarity\");\n\tmap.put(\"turbulent\",\"动荡的:disturbance;湍急的,汹涌的:turmoil\");\n\tmap.put(\"turgid\",\"浮夸的,过分装饰的:embellished\");\n\tmap.put(\"turmoil\",\"骚动,混乱:agitation, commotion\");\n\tmap.put(\"turncoat\",\"叛徒:switches, traitor\");\n\tmap.put(\"turpitude\",\"卑鄙:baseness\");\n\tmap.put(\"twig\",\"了解:have a clear idea\");\n\tmap.put(\"typo\",\"打字错误:error\");\n\tmap.put(\"tyro\",\"新手,业余爱好者:beginner, novice\");\n\tmap.put(\"ubiquitous\",\"无所不在的,普通的:everywhere, often observed\");\n\tmap.put(\"unassailable\",\"无可争辩的,无法否认的,不可亵渎的:not to be violated\");\n\tmap.put(\"uncanny\",\"离奇的,奇异的:extraordinary or abnormal\");\n\tmap.put(\"uncouth\",\"粗俗的,没有品位的:lacking in refinement\");\n\tmap.put(\"unctuous\",\"油嘴滑舌的,谄媚的:flattering;夸张的,做作的:affected, exaggerated\");\n\tmap.put(\"underdog\",\"受害者,输家: loser/victim\");\n\tmap.put(\"undergird\",\"加强,巩固...的底部:strengthen\");\n\tmap.put(\"undermine\",\"削弱,破坏:weaken, injure, impair\");\n\tmap.put(\"underscore\",\"强调:to emphasize\");\n\tmap.put(\"understate\",\"保守陈述:restraint\");\n\tmap.put(\"understudy\",\"替补演员:take another's duties\");\n\tmap.put(\"unexceptionable\",\"无懈可击的:beyond reproach\");\n\tmap.put(\"unflappable\",\"镇定的,从容不迫的:not easily upset\");\n\tmap.put(\"ungainly\",\"笨拙的,不雅的:inability in a graceful manner\");\n\tmap.put(\"unimpeachable\",\"无可置疑的:unquestionable\");\n\tmap.put(\"unkempt\",\"凌乱的,无序的:lacking in order\");\n\tmap.put(\"unlettered\",\"未受教育的,文盲的:deficient in the knowledge, illiterate\");\n\tmap.put(\"unpretentious\",\"低调的,谦逊的:modest;坦诚的,自然的:free from deceive\");\n\tmap.put(\"unproductive\",\"徒然的,无效的:not productive\");\n\tmap.put(\"unrequited\",\"无报答的,无报酬的:not reciprocated\");\n\tmap.put(\"unruly\",\"难驾驭的,不守规矩的:difficult to discipline\");\n\tmap.put(\"untenable\",\"防守不住的,站不住脚的:defended\");\n\tmap.put(\"untold\",\"数不清的,无数的:numerous\");\n\tmap.put(\"untoward\",\"倒霉的,不吉利的:not favorable, unpropitious;难以驯服的,难以驾驭的:resisting control or discipline\");\n\tmap.put(\"unwitting\",\"不知道的,未觉察的:unware;偶然的,并非有意的:by chance, not intended\");\n\tmap.put(\"unwonted\",\"不习惯的,不寻常的:not habitual, ordinary, unusual\");\n\tmap.put(\"upbraid\",\"(严厉地)谴责,责骂:reproach severely\");\n\tmap.put(\"uphold\",\"支持,赞成:support\");\n\tmap.put(\"urbane\",\"彬彬有礼的,文雅的:polite\");\n\tmap.put(\"usurp\",\"篡夺,篡位:seize power without legal authority\");\n\tmap.put(\"utter\",\"出(声),说(话):articulate;完全的,绝对的:entire\");\n\tmap.put(\"vaccinate\",\"预防接种疫苗:produce immunity\");\n\tmap.put(\"vacillate\",\"犹豫不决:hesitate;摇动,摇摆:oscillate\");\n\tmap.put(\"vacuous\",\"茫然的,愚蠢的:lack of intelligence\");\n\tmap.put(\"vagary\",\"不可预测的思想或行为:erratic, unpredictable\");\n\tmap.put(\"vague\",\"表达不清的:not clearly expressed;轮廓不清晰的:lacking definite shape\");\n\tmap.put(\"valediction\",\"告别:bidding farewell;告别词:address farewell\");\n\tmap.put(\"valiant\",\"勇敢的,英勇的:bravery\");\n\tmap.put(\"valid\",\"逻辑上正确的:correct\");\n\tmap.put(\"vanquish\",\"打败,征服:defeat\");\n\tmap.put(\"vapid\",\"无趣的,乏味的:lacking interest\");\n\tmap.put(\"vaporize\",\"使(液体)蒸发:convert by heat;彻底消灭:destroy\");\n\tmap.put(\"variance\",\"不一致,不和谐:lack harmony\");\n\tmap.put(\"variegated\",\"杂色的,斑驳的:different colors\");\n\tmap.put(\"varnish\",\"上清漆,使有光泽:smooth glossy;粉饰(令人不悦的东西):conceal unpleasant\");\n\tmap.put(\"vault\",\"跳起,跳跃:propel oneself upward;一跃而至:leaping suddenly\");\n\tmap.put(\"vaunt\",\"吹嘘:boastfully\");\n\tmap.put(\"veer\",\"(使)转向,(使)改变航线:change direction\");\n\tmap.put(\"vehement\",\"(情感)强烈的,热情的:great depth of feeling\");\n\tmap.put(\"venal\",\"贪污受贿的:open to corrupt\");\n\tmap.put(\"vendor\",\"小贩,商贩:sells\");\n\tmap.put(\"veneer\",\"薄木板,用以贴在家具外面的饰面板:thin surface layer, wood;粉饰(不好的东西):conceal defect\");\n\tmap.put(\"venerate\",\"尊敬:regard with respect\");\n\tmap.put(\"venial\",\"可宽恕的:easily excused\");\n\tmap.put(\"venom\",\"毒液:poisonous matter;恶意,恶毒的用心:desire to cause pain\");\n\tmap.put(\"veracious\",\"诚实的,说实话的:telling the truth;精确的,准确的:precise\");\n\tmap.put(\"verbatim\",\"逐字地,一字不差地:exact words\");\n\tmap.put(\"verbose\",\"冗长的,啰嗦的:more than necessary\");\n\tmap.put(\"verdant\",\"(因长满植物而)翠绿的,郁郁葱葱的:green with vegetation\");\n\tmap.put(\"verify\",\"校验,证实:determine accuracy\");\n\tmap.put(\"verisimilar\",\"貌似真实的:appearing to be true\");\n\tmap.put(\"veritable\",\"真正的,确实的:not false\");\n\tmap.put(\"vernacular\",\"方言:nonstandard language;非正式的,口头的:suitable for speech\");\n\tmap.put(\"versatile\",\"多才多艺的,全能的:different things;易改变的:fluctuating readily\");\n\tmap.put(\"verse\",\"使精通,使熟悉:familiarize;诗歌:rhythm lyrical effect\");\n\tmap.put(\"vertigo\",\"眩晕:dizzy\");\n\tmap.put(\"verve\",\"活力,热情:vitality\");\n\tmap.put(\"vessel\",\"管:tube body fluid;船,舰艇:watercraft\");\n\tmap.put(\"vestige\",\"微小的痕迹;小痕迹:smallest trace\");\n\tmap.put(\"vestigial\",\"退化的,发育不全的:simple structure\");\n\tmap.put(\"veteran\",\"老兵;有丰富经验的人:knowledge through long experience;经验丰富的,资深的:knowledge, experience\");\n\tmap.put(\"veto\",\"否决,禁止:forbid, prohibit\");\n\tmap.put(\"vex\",\"使烦恼,使恼怒:bring agitation\");\n\tmap.put(\"viable\",\"可行的:being done\");\n\tmap.put(\"vicarious\",\"代理的,取代的:substitute for another\");\n\tmap.put(\"vicious\",\"凶恶的,恶毒的:desire to inflict;猛烈的:violence or ferocity\");\n\tmap.put(\"vicissitude\",\"自然变化,变迁兴衰:natural change\");\n\tmap.put(\"victimize\",\"使受骗:subject to deception\");\n\tmap.put(\"vigilant\",\"警醒的,警惕的:alertly watchful\");\n\tmap.put(\"vignette\",\"简介,短文:vivid representation\");\n\tmap.put(\"vigorous\",\"精力旺盛的:active strength;强健的:withstand hardship\");\n\tmap.put(\"vilify\",\"诽谤,辱骂:utter slanderous statements\");\n\tmap.put(\"vim\",\"活力,精力:energy\");\n\tmap.put(\"vindicate\",\"为...平反,为...辩护,使无罪:free from blame;证明,证实:give evidence\");\n\tmap.put(\"vindictive\",\"复仇的,有寻仇倾向的:seek revenge\");\n\tmap.put(\"virtuoso\",\"艺术鉴赏家,专家:masterly skill;经验丰富的,技艺精湛的:exceptional knowledge\");\n\tmap.put(\"virtuous\",\"品德高尚的,正直的:showing moral excellence\");\n\tmap.put(\"virulent\",\"有毒的:poisonous;凶残的:destructive course\");\n\tmap.put(\"viscid\",\"有粘性的:glutinous\");\n\tmap.put(\"viscous\",\"粘稠的,粘的:viscid\");\n\tmap.put(\"visionary\",\"空想的,不切实际的:guided by ideals;幻觉的:in the imagination;有远见的:foresight\");\n\tmap.put(\"vitality\",\"活力,生命力:vigor\");\n\tmap.put(\"vitiate\",\"削弱,损害:reduce the value;(在道德、审美上)降低,堕落:debase in moral\");\n\tmap.put(\"vitriolic\",\"(言辞)刻薄的:scathing\");\n\tmap.put(\"vituperate\",\"谩骂,责骂:abuse or censure\");\n\tmap.put(\"vivacious\",\"活泼的,快活的:lively\");\n\tmap.put(\"vociferous\",\"喧哗的,大叫大嚷的:vehement outcry\");\n\tmap.put(\"volatile\",\"多变的:rapid change\");\n\tmap.put(\"volition\",\"意志,自愿选择的行为:making one's own choices\");\n\tmap.put(\"voluble\",\"健谈的,多话的:ready speech\");\n\tmap.put(\"voluminous\",\"卷数多的,大量的,庞大的:great number\");\n\tmap.put(\"voluptuous\",\"奢侈逸乐的,沉湎酒色的:enjoyments luxury\");\n\tmap.put(\"voracious\",\"有很大食量的,贪吃的:huge appetite;贪婪的,如饥似渴的:insatiable\");\n\tmap.put(\"votary\",\"崇拜者,信徒:fervently devoted\");\n\tmap.put(\"vouch\",\"担保,声称为真:give a guarantee\");\n\tmap.put(\"vulgar\",\"粗俗的,无教养的:crude;口头的,非正式的:suitable for speech\");\n\tmap.put(\"vulnerable\",\"易受攻击的,脆弱的:open to attack\");\n\tmap.put(\"waddle\",\"摇摇摆摆地走:tilt the body from side to side\");\n\tmap.put(\"waffle\",\"胡扯:talk foolishly\");\n\tmap.put(\"waft\",\"飘荡,漂浮:float\");\n\tmap.put(\"wag\",\"诙谐幽默的人:humorous;摆动:move to and fro or up and down\");\n\tmap.put(\"wan\",\"苍白的,病态的:poor health\");\n\tmap.put(\"wanderlust\",\"旅游癖:impulse to travel\");\n\tmap.put(\"wane\",\"减少,衰退,降低:decrease\");\n\tmap.put(\"want\",\"短缺:lacking;渴望:desire\");\n\tmap.put(\"warmonger\",\"好战者:urges war\");\n\tmap.put(\"warp\",\"使偏向:turn;扭曲,变形:twist;曲解:alter the meaning\");\n\tmap.put(\"warrant\",\"向...保证质量:assume responsibility for the satisfactory quality;批准,认可:give official acceptance\");\n\tmap.put(\"wary\",\"小心的,机警的,谨慎的:caution\");\n\tmap.put(\"wastrel\",\"肆意挥霍的人,败家子:expends self-indulgently\");\n\tmap.put(\"watershed\",\"重要关头,分水岭:turning point\");\n\tmap.put(\"wax\",\"月亮渐满:increase in phase of the moon;用蜡涂、处理或上光:coat;增大,增强:increase\");\n\tmap.put(\"waylay\",\"埋伏,伏击:attack\");\n\tmap.put(\"welter\",\"混乱,动乱:disorder\");\n\tmap.put(\"wheedle\",\"(用花言巧语)诱惑,哄骗:persuade by flattery\");\n\tmap.put(\"whet\",\"磨快:sharpen\");\n\tmap.put(\"whiff\",\"微风:slight gust;细微的信号,轻微痕迹:imperceptible sign\");\n\tmap.put(\"whimsical\",\"反复无常的:sudden illogical changes\");\n\tmap.put(\"wholesome\",\"有益身心健康的:promoting health\");\n\tmap.put(\"wicked\",\"邪恶的:morally bad\");\n\tmap.put(\"wince\",\"畏缩:shrink back from pain\");\n\tmap.put(\"windbag\",\"健谈的人:talkative\");\n\tmap.put(\"windy\",\"冗长的:verbosity\");\n\tmap.put(\"winsome\",\"迷人的,漂亮的:pleasing and engaging\");\n\tmap.put(\"wit\",\"机智,智慧:ability to understand;智者,有智慧的人:intelligence\");\n\tmap.put(\"withdraw\",\"撤退:take back\");\n\tmap.put(\"wither\",\"枯萎,凋谢:become sapless\");\n\tmap.put(\"withhold\",\"抑制;扣压,不给予:refrain from giving\");\n\tmap.put(\"wizen\",\"(使)凋谢,(使)枯萎:become wrinkled;凋谢的,枯萎的:dried up\");\n\tmap.put(\"wobble\",\"摇晃,颤抖:move or proceed unsteadily;犹豫不决:show uncertainty\");\n\tmap.put(\"worldly\",\"世间的,世俗的:rather than spiritual;老练的:experienced\");\n\tmap.put(\"worship\",\"崇拜,敬仰:respect;崇拜,膜拜:offer honor or respect\");\n\tmap.put(\"wrangle\",\"纷争,争端:differing opinions;争吵:quarrel\");\n\tmap.put(\"wretched\",\"极差的:poor in quality;沮丧的:dejected\");\n\tmap.put(\"wry\",\"扭曲的:twisted, bent;坚持错误的:stubborn to wrong\");\n\tmap.put(\"xenophobe\",\"仇视(或畏惧)外国人(或外国事物)者:fearful of what is foreign\");\n\tmap.put(\"yoke\",\"连接:become joined\");\n\tmap.put(\"yokel\",\"乡下人,天真纯朴的人:inhabitant of a rural area\");\n\tmap.put(\"zeal\",\"热心,热诚:enthusiastic devotion\");\n\tmap.put(\"zealot\",\"狂热者:a fanatical partisan\");\n\tmap.put(\"zenith\",\"最高点,巅峰:culminating\");\n\tmap.put(\"zesty\",\"刺激的,开胃的:piquant\");\n\tmap.put(\"abreast\",\"并排地:in line;熟知的:knowledge of recent developments\");\n\tmap.put(\"absent\",\"未出现的,缺乏的:not present;不专心的,走神的:lost in thought\");\n\tmap.put(\"acclaim\",\"称赞:public acknowledgment or admiration;赞扬,赞颂:approval\");\n\tmap.put(\"accomplish\",\"实现,完成:completion\");\n\tmap.put(\"accord\",\"一致:consistency;相符合,相一致:in harmony;授予,给予:to grant or give\");\n\tmap.put(\"acknowledge\",\"承认:admit\");\n\tmap.put(\"acquire\",\"获取,获得:get as one's own\");\n\tmap.put(\"acquisitive\",\"贪婪的:desirous\");\n\tmap.put(\"adjudicate\",\"裁决,判定:settle\");\n\tmap.put(\"adversity\",\"厄运,逆境:difficulty\");\n\tmap.put(\"affectation\",\"虚伪,做作:not natural, not genuinely felt\");\n\tmap.put(\"affirm\",\"声称...为真,肯定...属实:valid or confirmed\");\n\tmap.put(\"affix\",\"粘合:attach physically\");\n\tmap.put(\"affliction\",\"痛苦,悲伤,折磨:great suffering\");\n\tmap.put(\"agape\",\"急切盼望的:eagerly awaiting\");\n\tmap.put(\"agility\",\"(身手)敏捷:quickness, ease and grace\");\n\tmap.put(\"*agonize\",\"折磨,使痛苦:agony;感到痛苦:suffer agony\");\n\tmap.put(\"agreeable\",\"令人愉悦的:pleasing to the mind or senses;随和的:easygoing and pleasing manner;相一致:in harmony\");\n\tmap.put(\"*alienate\",\"使...疏远:unfriendly, hostile,indifferent;转让,让渡:convey or transfer\");\n\tmap.put(\"alloy\",\"合金;混合物:combing of two or more different things;掺杂,降低...的纯度:debase by the addition\");\n\tmap.put(\"ambivalent\",\"(尤指感情、态度)矛盾的:opposing feelings\");\n\tmap.put(\"anachronistic\",\"时代错误:chronologically misplaced\");\n\tmap.put(\"analogous\",\"相似的,可比较的:in common\");\n\tmap.put(\"annex\",\"裙楼,副楼:auxiliary building;添加,合并:join;吞并,夺取(土地等):incorporate\");\n\tmap.put(\"annotate\",\"给...作注解:commentary or explanatory notes\");\n\tmap.put(\"antedate\",\"比...早,早于:earlier date\");\n\tmap.put(\"antipathy\",\"厌恶,反感:aversion, dislike;令人反感的事物:objection of aversion\");\n\tmap.put(\"antiquated\",\"古老的,过时的:out of style\");\n\tmap.put(\"antithetical\",\"完全对立的,相反的:direct and unequivocal opposition\");\n\tmap.put(\"apparition\",\"鬼魂,幽灵:ghostly figure\");\n\tmap.put(\"applicable\",\"可用的,可行的:put to use;相关的,有光的:having to do with;合适的,恰当的:meeting the requirements\");\n\tmap.put(\"apprehensive\",\"知晓的,理解的:impressed on the mind;恐惧的,害怕的:anxious, fearful\");\n\tmap.put(\"arable\",\"适合耕作的:growing of crops\");\n\tmap.put(\"arbitrary\",\"专横的,独断专行的:force one's will on others;独裁的,拥有无限权力的:without interference by others;缺乏计划的,随意的:lacking a definite plan\");\n\tmap.put(\"arcane\",\"(语言)晦涩的,隐晦的:veiled, uncertain;深奥的,难以理解的:difficult to understand\");\n\tmap.put(\"argument\",\"争吵,争论:expression of differing opinions;(逻辑上的)论证:from a premise to a conclusion;观点,论点:idea, opinion\");\n\tmap.put(\"arid\",\"干燥的:little or no precipitation;无趣的,无聊的:lack of interest\");\n\tmap.put(\"array\",\"排列,阵列:arrangement;排列,摆放:arrange or display;装饰,装修:dress or decorate\");\n\tmap.put(\"assail\",\"抨击,严厉批评:criticize harshly;攻击,猛攻:violent action against\");\n\tmap.put(\"asymmetry\",\"不对称,不均衡:lack of balance\");\n\tmap.put(\"atrophy\",\"萎缩,衰退:waste away\");\n\tmap.put(\"attest\",\"证实,为...作证:give evidence\");\n\tmap.put(\"attune\",\"使协调,使和谐:into harmony\");\n\tmap.put(\"august\",\"威严的,严重的:formal and serious or reserved manner;盛大的,令人印象深刻的:large and impressive\");\n\tmap.put(\"auspicious\",\"好兆头的:toward a happy outcome\");\n\tmap.put(\"austere\",\"朴素的,朴实无华的:simple;严肃的,令人生畏的:stern and cold\");\n\tmap.put(\"automatic\",\"(机器等)自动的:independent of external influence;自发的,情不自禁的:spontaneously or unconsciously\");\n\tmap.put(\"avowal\",\"承认,公开宣称:declaration\");\n\tmap.put(\"backfire\",\"产生相反的结果,事与愿违:reverse\");\n\tmap.put(\"backslide\",\"(情况等)倒退,故态复萌:revert to a worse condition\");\n\tmap.put(\"baffle\",\"挫败,阻挠:frustrate or check;使疑惑:mental uncertainty\");\n\tmap.put(\"baffling\",\"令人疑惑的,难以理解的:hard to comprehend\");\n\tmap.put(\"bash\",\"猛击:forceful blow;攻击,用力击打:strike violently;抨击,严厉批评:criticize harshly\");\n\tmap.put(\"bask\",\"休息,悠然自得:lie or relax\");\n\tmap.put(\"beholden\",\"欠他人人情的:owing gratitude\");\n\tmap.put(\"behoove\",\"对...有利:necessary, proper, advantageous\");\n\tmap.put(\"beige\",\"缺乏特征的:lacking distinction\");\n\tmap.put(\"belligerence\",\"好斗,好战:aggressive or truculent\");\n\tmap.put(\"belligerent\",\"好斗的,好战的:assertiveness, hostility, combativeness\");\n\tmap.put(\"beset\",\"使苦恼,骚扰:cause persistent suffering;攻击,袭击:set upon\");\n\tmap.put(\"bewitching\",\"迷人的,令人着迷的:attract\");\n\tmap.put(\"blackmail\",\"敲诈,勒索:extortion of money\");\n\tmap.put(\"bluff\",\"直率的,(说话)直截了当的:direct, brief, potentially rude;欺骗:deceive\");\n\tmap.put(\"bogus\",\"伪造的,假冒的:being such in appearance only;虚伪的,做作的:lacking, spontaneous quality\");\n\tmap.put(\"bore\",\"令人讨厌的人或事物:causes boredom;使厌倦,使厌烦:make weary\");\n\tmap.put(\"brandish\",\"(带有威胁性地)挥舞:shake menacingly\");\n\tmap.put(\"brim\",\"边缘,边界:outer margin;充满:full often to overflowing;加满,倒满:as much as can be\");\n\tmap.put(\"bumble\",\"含糊不清地说,杂乱无章地说:rapidly, inarticulately;笨拙地行动:clumsily\");\n\tmap.put(\"bustle\",\"忙乱,喧嚣:noisy, energetic;(快速地)行走,奔忙:move briskly\");\n\tmap.put(\"cachet*\",\"威望,声望:mark or quality\");\n\tmap.put(\"calamity\",\"大灾难:disastrous event\");\n\tmap.put(\"calculated\",\"经过计算(成败得失)的,经过深思熟虑的:reckoning or estimating\");\n\tmap.put(\"calibrate*\",\"校准,调校:check, adjust, determine\");\n\tmap.put(\"canny\",\"精明的,聪明的:careful and shrewed\");\n\tmap.put(\"canonize\",\"过分宠爱,过分崇拜:admire too much;使崇高,使神圣:high status or value\");\n\tmap.put(\"captious\",\"吹毛求疵的,爱挑毛病的:stress faults and raise objections\");\n\tmap.put(\"careen\",\"蹒跚而行。不稳定行走:to lurch or swerve;狂奔,快速运动:rush\");\n\tmap.put(\"carefree\",\"无忧无虑的:no worries or troubles\");\n\tmap.put(\"cascade\",\"(尤指小的)瀑布:small fall\");\n\tmap.put(\"cellular\",\"多孔的:porous\");\n\tmap.put(\"ceremonious\",\"讲究礼节的,庄重的:careful attention to set forms\");\n\tmap.put(\"certitude\",\"确定无疑:certain\");\n\tmap.put(\"channel\",\"水渠:passageway for water;海峡:between two land masses;将...导入,投入:move to a central point\");\n\tmap.put(\"chaperone\",\"同行,护送:go along with\");\n\tmap.put(\"charisma\",\"魅力,吸引力:charm\");\n\tmap.put(\"cherished\",\"受喜爱的,珍爱的:granted special treatment\");\n\tmap.put(\"chivalrous\",\"有骑士风度的,(尤指对女性)彬彬有礼的:gracious courtesy and high-minded consideration\");\n\tmap.put(\"chorale\",\"赞美诗:hymn or psalm;合唱班,合唱团:group of singers\");\n\tmap.put(\"clamor\",\"喧闹;喧哗,噪声:loud, inharmonious\");\n\tmap.put(\"clan\",\"(有共同爱好的)团体,帮派:united by a common interest\");\n\tmap.put(\"cleave\",\"紧贴,坚持:adhere;分隔,割裂,劈开:divide\");\n\tmap.put(\"cling\",\"粘结,粘合:physical sticking;紧贴;坚持:adhere\");\n\tmap.put(\"coarse\",\"粗糙的,表面不平整的:not smooth;(声音)刺耳的,粗声粗气的:rough in tone;粗俗的:lacking refinement;(质量)低劣的:inferior quality\");\n\tmap.put(\"cohesive\",\"有粘性的;有凝聚力的:cohesion or coherence\");\n\tmap.put(\"collaborate\",\"合作:work jointly\");\n\tmap.put(\"commiserate\",\"表示怜悯,同情:sympathy\");\n\tmap.put(\"compatible\",\"一致的,能共存的:in harmony\");\n\tmap.put(\"compelling\",\"极具说服力的:persuade;迫切的,紧迫的:immediate attention\");\n\tmap.put(\"complacent\",\"自满的,自鸣得意的:excessive or unjustified satisfaction;无所谓的,不关心的:lack of interest or concern\");\n\tmap.put(\"complementary\",\"互补的:supplying each other's\");\n\tmap.put(\"complicate\",\"使复杂化:complex or difficult\");\n\tmap.put(\"comprehend\",\"理解,了解:grasp;包括,包含:contain or hold within\");\n\tmap.put(\"concrete\",\"实体的,实在的:matter;事实性的,明确的:in fact\");\n\tmap.put(\"condemn\",\"谴责(...为不道德的、邪恶的):declare to be reprehensible, wrong, or evil\");\n\tmap.put(\"conditional\",\"有条件的,受制约的:dependent\");\n\tmap.put(\"conflagration\",\"大火:large destructive fire;武装冲突:armed violent struggle\");\n\tmap.put(\"conflate\",\"混合:turn into a single mass\");\n\tmap.put(\"conform\",\"使协调:bring into harmony;调整(以适应):change to make it suitable;遵照,遵从:obedient, compliant\");\n\tmap.put(\"conjure\",\"请求,恳求:entreat earnestly;在脑海中浮现,想起:form a mental picture\");\n\tmap.put(\"consent\",\"同意:approval\");\n\tmap.put(\"consign\",\"转交,转移(给他人):control of another\");\n\tmap.put(\"consternation\",\"惊愕,恐慌,恐惧:paralyzing dismay\");\n\tmap.put(\"constrict\",\"压缩,压紧:binding or squeezing\");\n\tmap.put(\"contemplate\",\"沉思,仔细考虑:consider\");\n\tmap.put(\"contempt\",\"蔑视,鄙视:unworthy of one's concern or respect\");\n\tmap.put(\"contend\",\"竞争,争夺:strive or vie in contest;声明,声称:state as a fact\");\n\tmap.put(\"contradict\",\"否认,反驳;与...相矛盾:contrary\");\n\tmap.put(\"contrived\",\"不自然的,刻意的:lacking spontaneous quality\");\n\tmap.put(\"convene\",\"召开,召集:bring together in assembly;聚集,集合:come together\");\n\tmap.put(\"correlate\",\"使...相关联:mutual or reciprocal relation\");\n\tmap.put(\"counterpart\",\"(地位、功能)对等的人或物:same function or characteristics\");\n\tmap.put(\"counterproductive\",\"反效果的,阻碍预期目标的:not producing desired goal\");\n\tmap.put(\"courteous\",\"礼貌的,谦恭有礼的:polished manners\");\n\tmap.put(\"coy\",\"故作羞涩的:flirtatiously shy or modest;不愿与人交往的,内向的:tending to avoid people\");\n\tmap.put(\"credible\",\"可信,值得信赖的:worthy of being accepted\");\n\tmap.put(\"credit\",\"信任,信赖:mental conviction of the truth;表扬,赞扬:acknowledgment or admiration\");\n\tmap.put(\"crow\",\"感到高兴:joy or triumph;自鸣得意:pride in one's own possessions\");\n\tmap.put(\"damn\",\"(在道德上)谴责:morally wrong or evil;非常地,极其地:great degree\");\n\tmap.put(\"dampen\",\"(特指稍稍地)弄湿:wet;抑制,压抑(感情、精力等),泼冷水:diminish the feeling, activity or vigor\");\n\tmap.put(\"dashing\",\"爱好冒险的,大胆的:take risks\");\n\tmap.put(\"dated\",\"过时的:passed its time of use\");\n\tmap.put(\"deadlock\",\"僵局:a state of inaction or neutralization;使陷入僵局,使停顿:to a deadlock\");\n\tmap.put(\"debonair\",\"无忧无虑,不在乎的:freedom from worries or troubles;风度翩翩的:polished and worldly manners\");\n\tmap.put(\"decadent\",\"堕落的,腐败的:lowered moral character;放纵的人:devoted to luxury and sensual pleasures;道德上堕落的人:moral decay\");\n\tmap.put(\"decry\",\"强烈反对,否定:strong disapproval\");\n\tmap.put(\"deflect\",\"使偏斜,使转向:turn aside from a straight course\");\n\tmap.put(\"defray\",\"支付:undertake the payment\");\n\tmap.put(\"deign\",\"(不情愿地)屈尊,俯就:condescend reluctantly\");\n\tmap.put(\"delegate\",\"代理人,代表:representative for another;移交(权力,任务等):possession or safekeeping of another\");\n\tmap.put(\"delineate\",\"勾勒,用线条描绘:by drawn or painted lines;描写,描绘:describe,portray\");\n\tmap.put(\"demote\",\"降职,降级:a lower grade\");\n\tmap.put(\"dependable\",\"可靠的,值得信赖的:depended on\");\n\tmap.put(\"deplorable\",\"可鄙的,可耻的:condemnation or reproach;悲惨的,可悲的:cause great distress\");\n\tmap.put(\"desperate\",\"绝望的:no hope\");\n\tmap.put(\"dichotomy\",\"一分为二,分割:division into two\");\n\tmap.put(\"dictate\",\"指令,命令:command;(仗着地位,权力)下令:request\");\n\tmap.put(\"dike\",\"堤坝,水坝:control or confine water;水沟,水渠:long narrow channel\");\n\tmap.put(\"discreet\",\"(言行)谨慎的:good judgment and restraint;不易察觉的:not readily seen or noticed\");\n\tmap.put(\"disenchant\",\"使清醒:free from illusion\");\n\tmap.put(\"dishearten\",\"使沮丧,使失去信心:lose spirit or morale\");\n\tmap.put(\"disjunctive*\",\"分离的:breaks or disunity\");\n\tmap.put(\"disprove\",\"反驳,证明为假:prove to be false\");\n\tmap.put(\"distinctive\",\"完全不同的:not of the same kind;特征性的,典型的:serving to identify\");\n\tmap.put(\"doctrinaire\",\"教条主义的,照本宣科的:strongly held opinions\");\n\tmap.put(\"domineer\",\"专制统治:overbearing control\");\n\tmap.put(\"drab\",\"单调的,无聊的:dullness and monotony\");\n\tmap.put(\"dramatic\",\"显著的,惹人注意的:striking\");\n\tmap.put(\"dread\",\"恐惧:fear\");\n\tmap.put(\"duplicate\",\"复制品:exactly alike;复制:make a copy;重复,反复:do over or again\");\n\tmap.put(\"dynamic\",\"有力量的,有活力的:productive activity\");\n\tmap.put(\"eclectic\",\"混合的,多元化的:from various sources\");\n\tmap.put(\"efficacious\",\"有效的:produce a desired effect\");\n\tmap.put(\"elude\",\"躲闪,躲避:avoid adroitly;使无法理解,使困惑:escape the perception\");\n\tmap.put(\"enamored\",\"迷恋的,热爱的:intense or excessive love\");\n\tmap.put(\"endeavor\",\"努力,奋斗:conscientious or concerted effort;努力做,拼搏:devote serious and sustained effort\");\n\tmap.put(\"enthrall\",\"(像用魔咒般)吸引:hold the attention\");\n\tmap.put(\"equilibrium\",\"均势,平衡:opposing forces are equal;(感情上的)平静:evenness of emotions\");\n\tmap.put(\"erroneous\",\"错误的,不正确的:containing error\");\n\tmap.put(\"escort\",\"护卫队,护送者:accompanying another;同行,护送:go along with\");\n\tmap.put(\"ethos\",\"道德准则:code of good conduct\");\n\tmap.put(\"exorcise\",\"除去:ger rid of\");\n\tmap.put(\"explicate\",\"解释,说明:detailed explanation\");\n\tmap.put(\"exterminate\",\"根除,消灭:killing off\");\n\tmap.put(\"extrapolate\",\"(通过逻辑)判断:form an opinion through reasoning\");\n\tmap.put(\"fabulous\",\"传说中的:fable;幻想中的,不真实的:in the imagination;令人惊讶的,令人称奇的:causing wonder;极好的:extremely pleasing\");\n\tmap.put(\"fad\",\"(短暂的)流行,时尚:popular for a short time\");\n\tmap.put(\"fallible\",\"可能出错的:erroneous\");\n\tmap.put(\"fanciful\",\"幻想中的:不真实的:in the imagination;不切实际的,荒谬的:without regard for reason\");\n\tmap.put(\"favoritism\",\"偏爱,偏袒:special favor\");\n\tmap.put(\"featureless\",\"缺乏特征的:lacking distinguishing characteristics\");\n\tmap.put(\"feisty\",\"好斗的,好争论的:aggressiveness\");\n\tmap.put(\"felony\",\"重罪:grave crimes\");\n\tmap.put(\"ferocious\",\"极端的,剧烈的:unrelenting intensify;激烈的,爆发性的:bursts of destructive force;凶猛的,残暴的:unfriendly or aggressive\");\n\tmap.put(\"fervent\",\"充满感情的,热情洋溢的:great intensity of feeling\");\n\tmap.put(\"figment\",\"虚构的事物,幻觉:made up\");\n\tmap.put(\"fitful\",\"无规律的,缺乏周期的:erratic or intermittent\");\n\tmap.put(\"fleeting\",\"稍纵即逝的,短暂的:for short time\");\n\tmap.put(\"forage\",\"寻找:search\");\n\tmap.put(\"forebode\",\"预示,预兆:show signs\");\n\tmap.put(\"foreground\",\"强调,重视:indicate the importance\");\n\tmap.put(\"forfeit\",\"罚金:punishment\");\n\tmap.put(\"forsake\",\"彻底放弃,抛弃:renounce\");\n\tmap.put(\"frosty\",\"寒冷的:low temperature;无强烈情感的,冷淡的:lacking in friendliness or warmth\");\n\tmap.put(\"gawky\",\"(举止)笨拙的:inability to move in a graceful manner\");\n\tmap.put(\"germinate\",\"发芽:begin to grow;出现:come into being\");\n\tmap.put(\"glacial\",\"极冷的:extremely cold;冷漠的,无感情的:devoid of warmth\");\n\tmap.put(\"glide\",\"轻松地行动,轻松地通过:smoothly, continuously, effortlessly\");\n\tmap.put(\"glower\",\"怒目而视:stare with anger\");\n\tmap.put(\"graft\",\"移植,移接:implant surgically\");\n\tmap.put(\"grit\",\"(面对困难时所表现出来的)毅力:endure pain or hardship\");\n\tmap.put(\"groggy\",\"虚弱的,(走路)不稳的:weak and unsteady;无法思考的,头脑不清的:not able to think or move\");\n\tmap.put(\"grudge\",\"怨恨,仇恨:ill will\");\n\tmap.put(\"grumble\",\"(尤指低声地)抱怨,埋怨:complain\");\n\tmap.put(\"halfhearted\",\"不感兴趣的,不热情的:lacking heart\");\n\tmap.put(\"heckle\",\"起哄,使难堪:harass\");\n\tmap.put(\"hierarchical\",\"分等级的,等级制的:classified\");\n\tmap.put(\"hobble\",\"跛行,蹒跚而行:haltingly or with difficulty;阻碍,妨碍:hamper the action\");\n\tmap.put(\"humdrum\",\"千篇一律,单调:lack of variety;无聊的,乏味的:lacking excitement\");\n\tmap.put(\"humiliate\",\"羞辱,使丧失尊严:to a lower position\");\n\tmap.put(\"hypothetical\",\"假设,前提条件:starting point;假定的:assumption speculation\");\n\tmap.put(\"idiosyncrasy\",\"独特而奇怪的习惯:odd or peculiar habit\");\n\tmap.put(\"idle\",\"闲置的,未使用的:not turned to use;懒散的:lazy;懒散度日,无所事事:without working\");\n\tmap.put(\"ill-bred\",\"没有教养的,没有礼貌的:impolite\");\n\tmap.put(\"illustrious\",\"著名的,杰出的:distinguished\");\n\tmap.put(\"imperishable\",\"不能被摧毁的:impossible to destroy;不朽的,永恒的:occurring forever\");\n\tmap.put(\"implicit\",\"不言而喻的,心照不宣的:understood though unexpressed;无疑问的,无保留的:without doubt\");\n\tmap.put(\"impostor*\",\"冒名顶替者,骗子:assumes false identity\");\n\tmap.put(\"impunity\",\"免责,免受处罚:freedom from punishment\");\n\tmap.put(\"incentive\",\"刺激,诱因:incites\");\n\tmap.put(\"incumbent\",\"义不容辞的,必须的:obligation duty\");\n\tmap.put(\"indecorous\",\"不合礼节的,不得体的:conflicting with accepted standards\");\n\tmap.put(\"infraction\",\"违背,违反:failure to uphold the requirements\");\n\tmap.put(\"justify\",\"证明...的合理性,为...辩解:prove to be just, right\");\n\tmap.put(\"lag\",\"最终的,最后的:following all others;缓慢行走:slowness;萎靡,失去活力:lose bodily strength\");\n\tmap.put(\"lance\",\"长矛,标枪:long straight handle and sharp head or blade;刺穿,刺破:penetrate\");\n\tmap.put(\"lax\",\"松弛的,不紧的,不严格的:not tense, firm, or rigid;懈怠的,漫不经心的:failing to give proper care\");\n\tmap.put(\"license\",\"许可,认可:approval;自由:move freely;放荡:disregard for standards;准许,授权使用:permit or authorize\");\n\tmap.put(\"lionize\",\"追捧,把...捧为名人:celebrity\");\n\tmap.put(\"ludicrous\",\"荒唐的,可笑的:derisive laughter\");\n\tmap.put(\"luminous\",\"发光的,有光泽的:emitting or reflecting light;杰出的:standing above\");\n\tmap.put(\"lurid\",\"恐怖的:令人反感的:causing revulsion;面色苍白的,病态的:pale in appearance\");\n\tmap.put(\"machination\",\"诡计:scheming or crafty action\");\n\tmap.put(\"madcap\",\"热爱冒险的人:seeks our very dangerous or foolhardy adventures;大胆的,鲁莽的:foolishly adventurous or bold\");\n\tmap.put(\"magnitude\",\"重要,重大:greatness in significance;巨大:greatness in size\");\n\tmap.put(\"malevolent\",\"恶意的,恶毒的:vicious ill will, spite,hatred\");\n\tmap.put(\"malignant\",\"恶毒的,邪恶的:desire to cause someone pain\");\n\tmap.put(\"maneuver\",\"巧妙地操纵:guide with adroitness and design\");\n\tmap.put(\"marginal\",\"边缘的:near a border;不重要的:not of central importance\");\n\tmap.put(\"meditate\",\"思索,沉思:focus\");\n\tmap.put(\"menial\",\"仆人,奴仆:servant;卑贱的,低下的:spirit of humility or unseemly submissiveness\");\n\tmap.put(\"meretricious\",\"艳俗的,俗气的:vulgar manner\");\n\tmap.put(\"milieu\",\"环境,氛围:physical or social setting\");\n\tmap.put(\"military\",\"军事的,军用的:soldiers, arms, or war\");\n\tmap.put(\"misapprehension\",\"错误的理解、判断:failure to understand;wrong judgment\");\n\tmap.put(\"monarch\",\"君主,帝王:rules;巨头,大亨:person of rank, power, or influence\");\n\tmap.put(\"monopolize\",\"垄断,主宰:complete control\");\n\tmap.put(\"nirvana\",\"彻底放松的状态:disregardful or unconscious;天堂,极乐世界:utter perfection and happiness\");\n\tmap.put(\"nostalgia\",\"思乡之情:homesick;怀旧,怀念:sentimental yearning for return\");\n\tmap.put(\"notoriety\",\"(尤指因为丑闻而出名的)名人:widely known something bad;坏名声:ill fame\");\n\tmap.put(\"nourish\",\"养育,培养:provide with food;培养,促进:help with growth\");\n\tmap.put(\"novice\",\"新手,初学者:new\");\n\tmap.put(\"nullification\",\"(尤指法律条文等正式的)废除,废弃:doing away\");\n\tmap.put(\"numb\",\"失去感觉的:devoid of sensation;麻木的,无感情的:devoid of emotion\");\n\tmap.put(\"oaf\",\"愚蠢的人:stupid person\");\n\tmap.put(\"observant\",\"警惕的,警觉的:paying close attention;严格遵守(规章、制度或原则)的:observing\");\n\tmap.put(\"obsolete\",\"过时的,被淘汰的:no longer useful\");\n\tmap.put(\"onset\",\"攻击,进攻:attack, assault;起始,开始:begins\");\n\tmap.put(\"ordeal\",\"严峻的考验:severe trial\");\n\tmap.put(\"ostensible\",\"表面上的,佯装的:appearing to be true\");\n\tmap.put(\"outgrowth\",\"结果,后果:traceable to a cause\");\n\tmap.put(\"outmoded\",\"过时的,废弃的:no longer usable\");\n\tmap.put(\"override\",\"不顾:set aside\");\n\tmap.put(\"overshadow\",\"使变黯淡:make dark, dim;(在重要性上)超越,超过:exceed in importance\");\n\tmap.put(\"overwhelm\",\"淹没:cover;(感情上、精神上)使无所适从,使难以忍受:subject to mental stress\");\n\tmap.put(\"overwrought\",\"十分激动的,非常不安的:agitation;(装饰、文风等)过分华丽的:excessively decorated\");\n\tmap.put(\"palaver\",\"对话,交流:exchange of views;闲聊:profusely or idly\");\n\tmap.put(\"palpitation\",\"(有节奏的)舒张收缩:expanding and contracting\");\n\tmap.put(\"panacea\",\"万能药,万灵药:remedy for all ills\");\n\tmap.put(\"peculiarity\",\"特征,特点:distinguishing characteristic\");\n\tmap.put(\"pedagogical\",\"教学的;教师的:teacher or education\");\n\tmap.put(\"peel\",\"剥去...的皮:strip off;脱去(衣服等):take off clothes\");\n\tmap.put(\"perceptive\",\"敏锐的:sense slight differences;洞察力强的:deep understanding\");\n\tmap.put(\"perilous\",\"危险的:potential loss or injury\");\n\tmap.put(\"perquisite\",\"额外的好处:given in addition\");\n\tmap.put(\"petulant\",\"易怒的,爱发脾气的:easily irritated\");\n\tmap.put(\"pioneer\",\"扩荒者,先驱者:first to settle;最初的,最早的:coming before;开创,创造:open up\");\n\tmap.put(\"pious\",\"(信仰上)虔诚的:devotion to divine worship;忠诚的:firm in one's allegiance\");\n\tmap.put(\"pitfall\",\"陷阱:capture and hold animals;(不易察觉的)危害:hidden danger\");\n\tmap.put(\"pivotal\",\"最关键的,最为重要的:greatest possible importance\");\n\tmap.put(\"placid\",\"宁静的,风平浪静的:free from storms;冷静的,淡定的:free from agitation\");\n\tmap.put(\"playful\",\"爱开玩笑的,好打闹的:joking or teasing\");\n\tmap.put(\"plebeian\",\"平民的,社会下层:low social or economic rank\");\n\tmap.put(\"plentitude*\",\"丰富,充沛:more than sufficient;大量:considerable amount\");\n\tmap.put(\"plodder\",\"行走缓慢的人:moves slowly\");\n\tmap.put(\"plush\",\"(味道等)浓郁的:abundance quality;奢华的,豪华的:notably luxurious\");\n\tmap.put(\"poach\",\"水煮:cook in a liquid\");\n\tmap.put(\"pointer\",\"(仪表上的)指针:scale indicator;忠告,建议:suggestion or hint\");\n\tmap.put(\"pragmatic\",\"实用主义的,务实的:practical approach\");\n\tmap.put(\"premeditate*\",\"预谋:think about beforehand\");\n\tmap.put(\"prerequisite\",\"先决条件,前提:necessary to an end\");\n\tmap.put(\"prerogative\",\"特权,权力:right, power, privilege\");\n\tmap.put(\"proclaim\",\"宣告,使...公之于众:declare publicly\");\n\tmap.put(\"project\",\"方案,计划:specific plan;凸出:extend outward;预测,预计:based on present data or trends\");\n\tmap.put(\"proprietary\",\"所有权:ownership;私营的:privately owned\");\n\tmap.put(\"prototype\",\"原型:original model\");\n\tmap.put(\"rampant\",\"(植物)生长茂盛的:growing thickly;猖獗的,不受限制的:occurring without restraint\");\n\tmap.put(\"ravenous\",\"食量大的,贪食的;贪婪的:huge appetite\");\n\tmap.put(\"redeem\",\"实践,履行(诺言等):required;改过自新:make better\");\n\tmap.put(\"refreshing\",\"令人身心振奋的,提神的:renewing effect\");\n\tmap.put(\"remnant\",\"残余,剩余物:left over\");\n\tmap.put(\"renege\",\"放弃,摒弃:formally reject\");\n\tmap.put(\"replenish\",\"补充:fill again\");\n\tmap.put(\"replicate\",\"复制,复刻:make an exact likeness;重复,反复:do again\");\n\tmap.put(\"residual\",\"剩余的,残存的:residue\");\n\tmap.put(\"restitution\",\"补偿,赔偿:for some injury\");\n\tmap.put(\"resurrect\",\"使重生,使复苏:bring back to life\");\n\tmap.put(\"retentive\",\"记性好的:retain knowledge or information\");\n\tmap.put(\"retrieve\",\"寻回,找回:get back again\");\n\tmap.put(\"reverberate\",\"回荡,回响:continue or be repeated sound waves\");\n\tmap.put(\"rhetorical\",\"语言上的,文字上的:words or language;言辞华丽(却往往无内涵)的:fancy but meaningless\");\n\tmap.put(\"rigmarole\",\"混乱而无意义的话:confused or meaningless talk\");\n\tmap.put(\"ruthless\",\"没有怜悯心的,残忍的:no pity\");\n\tmap.put(\"sacrosanct\",\"极为神圣的,不可侵犯的:most sacred\");\n\tmap.put(\"scourge\",\"祸害:source of harm\");\n\tmap.put(\"screen\",\"掩护物,屏障:shelters, protects, or hides;保护,使...免受攻击:drive attack away;掩护,遮蔽:shut off from view\");\n\tmap.put(\"scrimp\",\"节俭:avoid waste\");\n\tmap.put(\"scruple\",\"(良心上的)不安:uneasy feeling about the rightness\");\n\tmap.put(\"secede\",\"脱离,拖出(组织、团体、联盟等):withdraw from an organization\");\n\tmap.put(\"sectarianism\",\"宗派主义,顽固:adherence prejudices\");\n\tmap.put(\"secular\",\"世俗的,尘世的:worldly or temporal\");\n\tmap.put(\"sequel\",\"结果:result\");\n\tmap.put(\"shift\",\"改变...的位置:change position;改变,变化:pass from;交换:in return\");\n\tmap.put(\"shifty\",\"(显得)狡诈的,(显得)欺诈的:deceitful character\");\n\tmap.put(\"simile\",\"明喻:comparing two unlike things\");\n\tmap.put(\"skittish\",\"容易受到惊吓的,胆小的:easily frightened;容易激动的:easily excited;善变的,多变的:likely to change\");\n\tmap.put(\"sparing\",\"节俭的,节约的:careful restraint;不足的,缺乏的:less plentiful\");\n\tmap.put(\"splinter\",\"尖细条,刺:sharp, slender piece;将...切成细条:break into sharp, slender pieces\");\n\tmap.put(\"splutter\",\"急切而不清楚地说:hastily and incoherently\");\n\tmap.put(\"squeamish\",\"恶心的,晕船的:nausea\");\n\tmap.put(\"stasis\",\"平衡,停滞:balance\");\n\tmap.put(\"staunch\",\"忠诚的,坚定的:steadfast in loyalty\");\n\tmap.put(\"stereotype\",\"成见,老套的理念:conventional, formulaic, and oversimplified opinion\");\n\tmap.put(\"stigmatize\",\"使蒙上污名:disgraceful or ignominious\");\n\tmap.put(\"substitute\",\"取代者,替代品:takes the place of another;取代,替代:take the place of\");\n\tmap.put(\"succumb\",\"屈服:yield to superior strength;死亡:death\");\n\tmap.put(\"supersede\",\"取代,替代:displace\");\n\tmap.put(\"surly\",\"脾气不好的:churlish in mood\");\n\tmap.put(\"surmise\",\"(根据不足的)推测,揣测:based on scantly evidence\");\n\tmap.put(\"surmount\",\"战胜,获得胜利:achieve a victory\");\n\tmap.put(\"surpass\",\"超越,强于:become better;突破(界限、纪录等):beyond the limit\");\n\tmap.put(\"surrogate\",\"替代品:takes the place\");\n\tmap.put(\"surveillance\",\"监视,监控:close observation\");\n\tmap.put(\"tame\",\"被驯化的:reduced from a state of native wildness;无聊的,乏味的:lacking spirit;控制,抑制:keep from exceeding\");\n\tmap.put(\"tangle\",\"困惑,不解:perplexity;纠缠,使....纠结:in a snare\");\n\tmap.put(\"teeming\",\"大量的:great numbers\");\n\tmap.put(\"temporal\",\"世俗的,尘世的:earthly life\");\n\tmap.put(\"tentative\",\"暂时性的,尝试的:not fully developed\");\n\tmap.put(\"thick-skinned\",\"冷漠无情的,不顾他人感受的:unaffected\");\n\tmap.put(\"thrill\",\"强烈的兴奋感,快感:pleasurably intense stimulate;使兴奋,使激动:excitement\");\n\tmap.put(\"timely\",\"及时的,无拖延的:without delay;恰到好处的,合乎时宜的:appropriate\");\n\tmap.put(\"topsy-turvy*\",\"混乱的,不整洁的:lacking in order, neatness\");\n\tmap.put(\"trifle\",\"不重要的事:little importance or value;不正经地对待,玩弄:without serious intent\");\n\tmap.put(\"trifling\",\"细微的,不重要的:lacking in significance\");\n\tmap.put(\"tycoon\",\"大亨,巨头:person of rank, power, influence\");\n\tmap.put(\"tyrant\",\"暴君:oppressively or brutally\");\n\tmap.put(\"umbrage\",\"不悦,生气:feeling of being offended or resentful\");\n\tmap.put(\"unanimous\",\"一致同意的:consent of all\");\n\tmap.put(\"unavailing\",\"徒劳的,无果的:producing no results\");\n\tmap.put(\"unremitting\",\"连续不断的:without any interruptions\");\n\tmap.put(\"versed\",\"熟知的:having information;精通的:exceptional knowledge\");\n\tmap.put(\"vile\",\"丑陋的:unpleasant to look at;(道德上)可鄙的,卑鄙的:morally despicable\");\n\tmap.put(\"vocation\",\"职业:employed\");\n\tmap.put(\"vouchsafe\",\"允诺,给予:grant in a gracious or condescending manner\");\n\tmap.put(\"voyeur\",\"窥淫狂:observing unsuspecting individuals\");\n\tmap.put(\"wanting\",\"未出现的,缺少的:not present;未达到要求的:not being up to standards\");\n\tmap.put(\"wayward\",\"刚愎自用的,不服管束的:following one's own inclinations\");\n\tmap.put(\"weather\",\"安全度过(危机等),经受住:come through\");\n\tmap.put(\"willful\",\"固执的,倔强的:self-willed;故意的:deliberately\");\n\tmap.put(\"willy-nilly\",\"不论是否愿意地:desired or not;无秩序的,随意的:without order\");\n\tmap.put(\"wilt\",\"(花、植物等)萎焉:limp or flaccid;精神萎靡,憔悴:fatigue or exhaustion\");\n\tmap.put(\"wily\",\"狡诈的,狡猾的:deceptive means\");\n\tmap.put(\"wiretap\",\"偷听,窃听:get information\");\n\tmap.put(\"wistful\",\"(带着忧伤而)渴望的,怀念的:yearning or desire with melancholy\");\n\tmap.put(\"wrest\",\"拧,扭动:wringing or twisting movements;辛苦地获得:gain with difficulty\");\n\tmap.put(\"wrongheaded\",\"固执己见的,坚持(错误观点)的:stubborn in adherence\");\n}", "title": "" } ]
[ { "docid": "0b87e5d1d71baa4d29f39fb85acb5228", "score": "0.7045807", "text": "learn(text) {\n const words = text.split(/\\s+/);\n words.push(END);\n\n let key = [];\n\n words.forEach(word => {\n // Key has been built, add it to the map with the current\n // word as the following value\n if(key.length == this.order) {\n // Map can't use array values as keys, so the key is stringified\n // for storage purposes\n const keyStr = key.join(' ');\n\n if(this.map.has(keyStr)) {\n this.map.get(keyStr).add(word);\n }\n else {\n const val = new Set();\n val.add(word);\n this.map.set(keyStr.slice(), val);\n }\n }\n\n // Shift the new word into the key\n if(key.length == this.order){\n key = key.slice(1);\n }\n\n key.push(word);\n });\n }", "title": "" }, { "docid": "84a18aa34e751958e5355460f191af98", "score": "0.6535686", "text": "function indexWords(strings) {\n map = {};\n for (x = 0; x < strings.length; x++) {\n if(strings[x].trim().length==0)\n continue;\n f = strings[x].substring(0, 1);\n if (f in map) {\n list = map[f];\n list.push(strings[x]);\n } else {\n newList = [];\n newList.push(strings[x]);\n map[f] =newList;\n }\n }\n return map;\n }", "title": "" }, { "docid": "1b69b173d4579e3928e08a8a74348db2", "score": "0.6520094", "text": "function addHeatMapFromWords(w){\n\tvar words = $(\"#words\").val().replace(/,/, \" \");\n\tif(w){\n\t\twords = w;\n\t}\n\t//sort by date\n\t//heatMap(words, \"date\", \"asc\", heatMapColors[currentHeatMapColor], 'sentence);'\n\t//sort by length\n\theatMap(words, \"sentence_count\", \"asc\", heatMapColors[currentHeatMapColor], unit);\n\t\n\tcurrentHeatMapColor = (currentHeatMapColor + 1)%heatMapColors.length;\n\t$(\"#words\").val(\"\");\n\t$(\"span.highlight\").click(function(){\n\t\t$('rect[words=\"'+$(this).text()+'\"]').remove();\n\t\t$(this).remove();\n\t})\n\t$(\"#sentence-popup\").click(function(){$(this).hide();});\n}", "title": "" }, { "docid": "c5e77964dfb6cae30b1ee6c38ec26b62", "score": "0.65054464", "text": "function createWordMap(textData) {\n const wordArray = textData.split(' ')\n const countedWordObject = wordArray.reduce((acc, cur, i) => {\n if (acc[cur] === undefined) {\n acc[cur] = 1\n } else {\n acc[cur] += 1\n }\n return acc\n }, {})\n\n const arraOfshit = []\n for (let key in countedWordObject) {\n arraOfshit.push({ word: key, occurence: countedWordObject[key] })\n }\n\n const wordMap = _.sortBy(arraOfshit, 'occurence').reverse().map((e, i) => {\n e['code'] = i\n return e\n })\n\n return wordMap\n}", "title": "" }, { "docid": "c538fbb44902be54a9e37eb5c3a5b842", "score": "0.64928186", "text": "_createPhraseMap(paragraph) {\n this.map = {};\n // poor Big O notation, but gets job done for now\n for(let sentence of paragraph) {\n // array of each word per sentence\n this.words = sentence.match(/\\w+/g);\n\n // starting with first word\n for(let i = 0; i < this.words.length; i ++) {\n // and continuing to 3rd to 10th word in string\n for(let j = i + 2; j < this.words.length && j <= i + 9; j++) {\n this.currentPhrase = this.words.slice(i, j + 1).join(' ');\n\n // add phrase as property to map if it doesn't already exist\n if(!this.map[this.currentPhrase]) this.map[this.currentPhrase] = 0;\n // then increment its occurrence\n this.map[this.currentPhrase] ++;\n }\n }\n }\n }", "title": "" }, { "docid": "0ee5273a0c43c478a676897f10556f25", "score": "0.64776987", "text": "function makeDictionary() {\n for (let i = 0; i < dictionary.length; i++) {\n const word = dictionary[i];\n const length = word.length;\n if (length <= 6) {\n dictMap.set(word, word.length);\n }\n if (length === 6) {\n sixLetterDict.push(word); //keeps track of possible root words\n }\n }\n}", "title": "" }, { "docid": "75cba1413f6aea0dacf96640b1bd09de", "score": "0.6389544", "text": "function jumbleWord(wordArr, mapArray) {\n var textArr = [];\n for (var i in wordArr) {\n textArr[i] = wordArr[mapArray[i]];\n }\n return textArr;\n}", "title": "" }, { "docid": "440f8c69738601c7f07a0a7c4e339fdd", "score": "0.63438284", "text": "function mapString(word) {\n let map = {};\n for (var i = 0; i < word.length; i++) {\n let letter = word[i];\n if (map[letter]) {\n map[letter].push(i);\n } else {\n map[letter] = [i];\n }\n }\n return map;\n}", "title": "" }, { "docid": "de8dceb54ac326ebd5e5ca41aa9f5717", "score": "0.627466", "text": "function map(text){\n\tvar result = []; // the result that will be send to be shuffled and sorted\n\t\n\t// split each word of the sentence, separated by space\n\tvar words = text.split(\" \"); \n\t\n\tfor (var i=0, l=words.length; i<l; i++){\n\t\tvar word = words[i]; // putting the word in a variable to be used later, if used multiple time\n\t\tvar wordAndOccurence = {}; // this is used to store the word as a key and the occurence as value\n\t\twordAndOccurence[word] = 1; // set the occurence to 1\n\t\tresult.push(wordAndOccurence); // add every pair (key,value) to the result array\n\t}\n\tshuffleAndSort(result); // call the shuffle and sort function of the framework\n}", "title": "" }, { "docid": "5caeee0cc453941c2e9cee7b8d4c3854", "score": "0.62316835", "text": "buildWordsMapAndSentences(recordingData) {\n let index = 0, start;\n\n // skip if recording data is same as before\n if (JSON.stringify(recordingData) === JSON.stringify(this.recordingData)) return;\n\n this.mapWords = {};\n this.sentences = [];\n this.recordingData = recordingData;\n\n if (!this.isValidRecordingData()) return;\n\n start = this.getIndexOfFirstWord();\n\n while (start !== -1) {\n let word = recordingData[start][0];\n\n if (typeof this.mapWords[word] === 'undefined') {\n this.mapWords[word] = [];\n }\n\n this.mapWords[word].push(index);\n this.sentences.push(word);\n\n start = recordingData[start][2];\n index += 1;\n }\n }", "title": "" }, { "docid": "b110be2601da47fd91224feeec5a0729", "score": "0.6224086", "text": "function main(wordArray){\n let map = new Map();\n wordList = [];\n\n for(let string of wordArray){\n let counter = 1;\n\n if(map.has(string)){\n let wordCount = map.get(string);\n\n map.set(string, wordCount + 1);\n }else{\n map.set(string, counter);\n }\n }\n wordList = Array.from(map).sort((a, b) => b[1] - a[1]);\n wordList.forEach((word)=> {\n console.log(`${word[0]} -> ${word[1]} times`);\n });\n}", "title": "" }, { "docid": "ab4babb74d47be99fd42dc1b20a98131", "score": "0.6214131", "text": "function buildWordMap() {\n var fill = d3.scale.linear()\n .domain([0, 0.4, 1])\n .range([\"#000000\", \"#395d7f\", \"#62b6d7\"]);\n var membersHeight = $('#members').height()-30; \n\n var layout = d3.layout.cloud()\n .size([558, membersHeight-22])\n .words(word_list)\n .padding(.5)\n .rotate(0)\n// .rotate(function() { return ~~(Math.random() * 1.2) * 90; })\n .font(\"Impact\")\n .fontSize(function(d) { return 10*Math.sqrt(d.size); })\n .on(\"end\", draw);\n\n layout.start();\n\n function draw(words) {\n d3.select(\"#wordMap\").append(\"svg\")\n .attr(\"width\", layout.size()[0])\n .attr(\"height\", layout.size()[1])\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + layout.size()[0] / 2 + \",\" + layout.size()[1] / 2 + \")\")\n .selectAll(\"text\")\n .data(words)\n .enter().append(\"text\")\n .style(\"font-size\", function(d) { return d.size + \"px\"; })\n .style(\"font-family\", \"Impact\")\n .style(\"fill\", function(d, i) { return fill(Math.random()); })\n .attr(\"text-anchor\", \"middle\")\n .attr(\"transform\", function(d) {\n return \"translate(\" + [d.x, d.y] + \")rotate(\" + d.rotate + \")\";\n })\n .text(function(d) { return d.text; })\n .on(\"click\", function (d){\n window.location = urlsBase+\"/individual?uri=\"+d.uri;\n });\n\n\n var vahtml = \"<ul style='list-style:none'>\"\n + \"<li style='font-size:0.9em;text-align:right;padding: 6px 16px 0 0'><a href='\"\n + urlsBase\n + \"/expertise' alt='\"\n + \"view expertise and research index'>\"\n + i18nStrings.viewAllString + \"</a></li></ul>\";\n\n\n $(\"div#wordMap\").append(vahtml);\n\n }\n\n }", "title": "" }, { "docid": "73f03fbe47ff9b3d2d0406f4aad47f9a", "score": "0.62044287", "text": "function KeyWordValues() {\n\tvar theMap = new Map;\n\ttheMap.put('accessories', 0.1)\n\t.put('accountants', 0.1)\n\t.put('active life', 0.1)\n\t.put('acupuncture', 0.1)\n\t.put('adult education', 0.1)\n\t.put('adult entertainment', 0.1)\n\t.put('adult', 0.1)\n\t.put('advertising', 0.1)\n\t.put('afghan', 0.1)\n\t.put('african', 0.1)\n\t.put('airlines', 0.1)\n\t.put('airport shuttles', 0.1)\n\t.put('airports', 0.1)\n\t.put('allergists', 0.1)\n\t.put('altoatesine', 0.1)\n\t.put('amateur sports teams', 0.1)\n\t.put('american', 0.1)\n\t.put('amusement parks', 0.1)\n\t.put('anesthesiologists', 0.11)\n\t.put('animal shelters', 0.17)\n\t.put('antiques', 0.25)\n\t.put('apartments', 0.3)\n\t.put('appliances', 0.3)\n\t.put('appliances & repair', 0.39)\n\t.put('apulian', 0.4)\n\t.put('aquariums', 0.4)\n\t.put('arabian', 0.43)\n\t.put('arcades', 0.47)\n\t.put('archery', 0.47)\n\t.put('architects', 0.5)\n\t.put('argentine', 0.52)\n\t.put('armenian', 0.52)\n\t.put('art galleries', 0.53)\n\t.put('art schools', 0.54)\n\t.put('art supplies', 0.54)\n\t.put('arts & crafts', 0.54)\n\t.put('arts & entertainment', 0.54)\n\t.put('asian fusion', 0.54)\n\t.put('psychics & astrologers', 1.57)\n\t.put('auction houses', 0.55)\n\t.put('audiologist', 0.57)\n\t.put('australian', 0.57)\n\t.put('asutrian', 0.57)\n\t.put('authorized postal representative', 0.58)\n\t.put('auto detailing', 0.58)\n\t.put('auto glass services', 0.58)\n\t.put('auto loan providers', 0.58)\n\t.put('auto parts & supplies', 0.58)\n\t.put('auto repair', 0.59)\n\t.put('automotive', 0.6)\n\t.put('baby gear & furniture', 0.6)\n\t.put('baden', 0.61)\n\t.put('badminton', 0.61)\n\t.put('bagels', 0.61)\n\t.put('baguettes', 0.64)\n\t.put('bail bondsmen', 0.64)\n\t.put('bakeries', 0.64)\n\t.put('opera & ballet', 1.3)\n\t.put('bangladeshi', 0.64)\n\t.put('bankruptcy law', 0.64)\n\t.put('banks & credit unions', 0.65)\n\t.put('barbeque', 0.65)\n\t.put('barbers', 0.66)\n\t.put('barre classes', 0.66)\n\t.put('bars', 0.66)\n\t.put('bartenders', 0.66)\n\t.put('basque', 0.66)\n\t.put('bathing area', 0.66)\n\t.put('bavarian', 0.66)\n\t.put('beach bars', 0.67)\n\t.put('beaches', 0.67)\n\t.put('beauty & spas', 0.68)\n\t.put('bed & breakfast', 0.68)\n\t.put('beer bar', 0.68)\n\t.put('beer garden', 0.68)\n\t.put('beer gardens', 0.69)\n\t.put('beer hall', 0.7)\n\t.put('beer wine & spirits', 0.7)\n\t.put('belgian', 0.7)\n\t.put('bespoke clothing', 0.71)\n\t.put('betting centers', 0.71)\n\t.put('beverage store', 0.71)\n\t.put('bicycle paths', 0.72)\n\t.put('bicycles', 0.72)\n\t.put('bike associations', 0.72)\n\t.put('bike repair/maintenance', 0.72)\n\t.put('bike rentals', 0.72)\n\t.put('bike shop', 0.73)\n\t.put('bikes', 0.73)\n\t.put('bistros', 0.73)\n\t.put('black sea', 0.73)\n\t.put('blow dry/out services', 0.73)\n\t.put('boat charters', 0.73)\n\t.put('boat dealers', 0.74)\n\t.put('boat repair', 0.74)\n\t.put('boating', 0.74)\n\t.put('body shops', 0.74)\n\t.put('bookstores', 0.75)\n\t.put('boot camps', 0.75)\n\t.put('botanical gardens', 0.76)\n\t.put('bowling', 0.76)\n\t.put('boxing', 0.76)\n\t.put('brasseries', 0.76)\n\t.put('brazilian', 0.76)\n\t.put('breakfast & brunch', 0.77)\n\t.put('breweries', 0.77)\n\t.put('bridal', 0.77)\n\t.put('british', 0.77)\n\t.put('bubble tea', 0.77)\n\t.put('buddhist temples', 0.77)\n\t.put('buffets', 0.78)\n\t.put('building supplies', 0.78)\n\t.put('bulgarian', 0.78)\n\t.put('bulk billing', 0.78)\n\t.put('bungee jumping', 0.78)\n\t.put('burgers', 0.78)\n\t.put('burmese', 0.79)\n\t.put('business law', 0.8)\n\t.put('butcher', 0.8)\n\t.put('cafes', 0.8)\n\t.put('cafeteria', 0.81)\n\t.put('cajun/creole', 0.81)\n\t.put('patisserie/cake shop', 1.46)\n\t.put('calabrian', 0.81)\n\t.put('cambodian', 0.81)\n\t.put('campgrounds', 0.83)\n\t.put('canadian ', 0.83)\n\t.put('candy stores', 0.83)\n\t.put('cannabis clinics', 0.83)\n\t.put('canteen', 0.83)\n\t.put('cantonese', 0.84)\n\t.put('car dealers', 0.84)\n\t.put('car rental', 0.85)\n\t.put('gas & service stations', 1.05)\n\t.put('car stereo installation', 0.85)\n\t.put('car wash', 0.85)\n\t.put('cardiologists', 0.85)\n\t.put('cards & stationery', 0.86)\n\t.put('career counseling', 0.86)\n\t.put('caribbean', 0.86)\n\t.put('carpenters', 0.87)\n\t.put('carpet cleaning', 0.87)\n\t.put('carpet installation', 0.87)\n\t.put('carpeting', 0.87)\n\t.put('casinos', 0.88)\n\t.put('castles', 0.88)\n\t.put('catalan', 0.88)\n\t.put('caterers', 0.88)\n\t.put('funeral services & cemeteries', 1.06)\n\t.put('champagne bars', 0.89)\n\t.put('check cashing/pay-day loans', 0.9)\n\t.put('chee kufta', 0.9)\n\t.put('cheese shops', 0.9)\n\t.put('cheesesteaks', 0.9)\n\t.put('chicken shop', 0.9)\n\t.put('chicken wings', 0.9)\n\t.put('child care & day care', 0.96)\n\t.put('chinese bazaar', 0.91)\n\t.put('chinese', 0.92)\n\t.put('chiropractors', 0.92)\n\t.put('chocolatiers & shops', 0.92)\n\t.put('choirs', 0.92)\n\t.put('christmas markets', 0.93)\n\t.put('churches', 0.93)\n\t.put('churros', 0.93)\n\t.put('cinema', 0.93)\n\t.put('circus schools', 0.93)\n\t.put('climbing', 0.93)\n\t.put('children\\'s clothing', 0.93)\n\t.put('men\\'s clothing', 0.94)\n\t.put('women\\'s clothing', 0.94)\n\t.put('clowns', 0.94)\n\t.put('cocktail bars', 0.94)\n\t.put('coffee & tea', 0.94)\n\t.put('coffeeshops', 0.95)\n\t.put('college counseling', 0.95)\n\t.put('colleges & universities', 0.95)\n\t.put('colombian', 0.95)\n\t.put('comedy clubs', 0.95)\n\t.put('comfort food', 0.95)\n\t.put('comic books', 0.96)\n\t.put('commercial real estate', 0.96)\n\t.put('community centers', 0.96)\n\t.put('computers', 0.97)\n\t.put('concept shops', 0.97)\n\t.put('contractors', 0.97)\n\t.put('convenience stores', 0.97)\n\t.put('cooking schools', 0.98)\n\t.put('corsican', 0.98)\n\t.put('cosmetic dentists', 0.98)\n\t.put('cosmetic surgeons', 0.98)\n\t.put('cosmetics & beauty supply', 0.99)\n\t.put('cosmetology schools', 0.99)\n\t.put('costumes', 0.99)\n\t.put('country dance halls', 0.99)\n\t.put('courthouses', 1)\n\t.put('cpr classes', 1)\n\t.put('creperies', 1)\n\t.put('criminal defense law', 1)\n\t.put('embroidery & crochet', 1.05)\n\t.put('csa', 1)\n\t.put('cuban', 1.01)\n\t.put('cucina campana', 1.01)\n\t.put('cultural center', 1.01)\n\t.put('curry sausage', 1.01)\n\t.put('cypriot', 1.01)\n\t.put('czech/slovakian', 1.01)\n\t.put('dance clubs', 1.01)\n\t.put('dance restaurants', 1.01)\n\t.put('dance schools', 1.01)\n\t.put('dance studios', 1.01)\n\t.put('danish', 1.01)\n\t.put('data recovery', 1.02)\n\t.put('day spas', 1.02)\n\t.put('delicatessen', 1.02)\n\t.put('delis', 1.02)\n\t.put('couriers & delivery services', 1.01)\n\t.put('dental hygienists', 1.02)\n\t.put('dentists', 1.03)\n\t.put('department stores', 1.03)\n\t.put('departments of motor vehicles', 1.03)\n\t.put('dermatologists', 1.03)\n\t.put('desserts', 1.04)\n\t.put('diagnostic imaging', 1.04)\n\t.put('diagnostic services', 1.04)\n\t.put('dim sum', 1.04)\n\t.put('diners', 1.04)\n\t.put('disc golf', 1.04)\n\t.put('discount store', 1.04)\n\t.put('dive bars', 1.04)\n\t.put('diving', 1.05)\n\t.put('divorce & family law', 1.05)\n\t.put('djs', 1.05)\n\t.put('do-it-yourself food', 1.05)\n\t.put('doctors', 1.05)\n\t.put('dog parks', 1.05)\n\t.put('dog walkers', 1.05)\n\t.put('dolmus station', 1.05)\n\t.put('dominican', 1.05)\n\t.put('donairs', 1.05)\n\t.put('donuts', 1.06)\n\t.put('driving schools', 1.06)\n\t.put('drugstores', 1.06)\n\t.put('dry cleaning & laundry', 1.06)\n\t.put('dui law', 1.06)\n\t.put('music & dvds', 1.45)\n\t.put('ear nose & throat doctor', 1.07)\n\t.put('eastern european', 1.07)\n\t.put('eastern german', 1.08)\n\t.put('editorial services', 1.08)\n\t.put('education', 1.08)\n\t.put('educational services', 1.09)\n\t.put('egyptian', 1.09)\n\t.put('electricians', 1.09)\n\t.put('electronics', 1.1)\n\t.put('electronics repair', 1.1)\n\t.put('elementary schools', 1.1)\n\t.put('embassy', 1.11)\n\t.put('emilian', 1.11)\n\t.put('employment agencies', 1.11)\n\t.put('employment law', 1.12)\n\t.put('endodontists', 1.12)\n\t.put('estate planning law', 1.12)\n\t.put('ethiopian', 1.12)\n\t.put('ethnic food', 1.13)\n\t.put('ethic grocery', 1.13)\n\t.put('event photography', 1.14)\n\t.put('event planning & services', 1.14)\n\t.put('experiences', 1.14)\n\t.put('eyelash service', 1.14)\n\t.put('eyewear & opticians', 1.14)\n\t.put('fabric stores', 1.15)\n\t.put('family practice', 1.15)\n\t.put('farmers market', 1.15)\n\t.put('fashion', 1.15)\n\t.put('fasil music', 1.16)\n\t.put('fast food', 1.16)\n\t.put('ferries', 1.17)\n\t.put('fertility', 1.17)\n\t.put('festivals', 1.17)\n\t.put('filipino', 1.17)\n\t.put('video/film production', 6.82)\n\t.put('financial advising', 1.18)\n\t.put('financial services', 1.18)\n\t.put('fire departments', 1.18)\n\t.put('fireworks', 1.18)\n\t.put('first aid classes', 1.19)\n\t.put('fish & chips', 1.19)\n\t.put('fishing', 1.19)\n\t.put('flea markets', 1.19)\n\t.put('flight instruction', 1.19)\n\t.put('flooring', 1.19)\n\t.put('florists', 1.2)\n\t.put('flowers', 1.2)\n\t.put('flowers & gifts', 1.2)\n\t.put('fondue', 1.2)\n\t.put('food', 1.2)\n\t.put('food court', 1.21)\n\t.put('food delivery services', 1.21)\n\t.put('food stands', 1.21)\n\t.put('food trucks', 1.21)\n\t.put('formal wear', 1.21)\n\t.put('framing', 1.21)\n\t.put('free diving', 1.21)\n\t.put('french', 1.21)\n\t.put('french southwest', 1.22)\n\t.put('friterie', 1.22)\n\t.put('friulan', 1.22)\n\t.put('ice cream & frozen yogurt', 1.32)\n\t.put('fruits & veggies', 1.23)\n\t.put('fun fair', 1.23)\n\t.put('furniture reupholstery', 1.23)\n\t.put('furniture stores', 1.23)\n\t.put('fuzhou', 1.24)\n\t.put('galician', 1.24)\n\t.put('garage door services', 1.24)\n\t.put('gardeners', 1.24)\n\t.put('nurseries & gardening', 1.57)\n\t.put('gastroenterologist', 1.25)\n\t.put('gastropubs', 1.25)\n\t.put('gay bars', 1.25)\n\t.put('gelato', 1.25)\n\t.put('general dentistry', 1.25)\n\t.put('general festivals', 1.25)\n\t.put('general litigation', 1.25)\n\t.put('georgian', 1.26)\n\t.put('german', 1.26)\n\t.put('gerontologists', 1.27)\n\t.put('giblets', 1.27)\n\t.put('gift shops', 1.27)\n\t.put('gliding', 1.27)\n\t.put('gluten-free', 1.28)\n\t.put('go karts', 1.28)\n\t.put('golf', 1.28)\n\t.put('golf equipment', 1.28)\n\t.put('golf equipment shops', 1.28)\n\t.put('public services & government', 1.95)\n\t.put('gozleme', 1.28)\n\t.put('graphic design', 1.28)\n\t.put('greek', 1.28)\n\t.put('grocery', 1.29)\n\t.put('guest houses', 1.29)\n\t.put('gun/rifle ranges', 2.08)\n\t.put('guns & ammo', 1.29)\n\t.put('gymnastics', 1.29)\n\t.put('gyms', 1.3)\n\t.put('hair extensions', 1.3)\n\t.put('hair removal', 1.3)\n\t.put('hair salon for men', 1.3)\n\t.put('hair salons', 1.3)\n\t.put('hair stylists', 1.3)\n\t.put('haitian', 1.3)\n\t.put('hakka', 1.31)\n\t.put('halal', 1.31)\n\t.put('handyman', 1.32)\n\t.put('hang gliding', 1.33)\n\t.put('hardware stores', 1.33)\n\t.put('hats', 1.33)\n\t.put('hawaiian', 1.33)\n\t.put('health & medical', 1.33)\n\t.put('storefront clinic', 1.33)\n\t.put('health markets', 1.34)\n\t.put('hearing aid providers', 1.34)\n\t.put('hearing aids', 1.34)\n\t.put('heating & air conditioning/HVAC', 1.38)\n\t.put('henghwa', 1.34)\n\t.put('herbs & spices', 1.34)\n\t.put('hessian', 1.34)\n\t.put('middle schools and high schools', 1.54)\n\t.put('hiking', 1.34)\n\t.put('himalayan/nepalese', 1.35)\n\t.put('hindu temples', 1.35)\n\t.put('landmarks & historical buildings', 1.45)\n\t.put('hobby shops', 1.35)\n\t.put('hokkien', 1.35)\n\t.put('naturopathic/holistic', 1.605)\n\t.put('home & garden', 1.36)\n\t.put('home cleaning', 1.36)\n\t.put('home decor', 1.36)\n\t.put('home health care', 1.37)\n\t.put('home inspectors', 1.37)\n\t.put('home organization', 1.37)\n\t.put('home services', 1.37)\n\t.put('home staging', 1.37)\n\t.put('home theatre installation', 1.37)\n\t.put('home window tinting', 1.37)\n\t.put('hookah bars', 1.38)\n\t.put('horse boarding', 1.38)\n\t.put('horse racing', 1.38)\n\t.put('horseback riding', 1.38)\n\t.put('hospice', 1.39)\n\t.put('hospitals', 1.39)\n\t.put('hostels', 1.39)\n\t.put('hot air balloons', 1.39)\n\t.put('hot dogs', 1.4)\n\t.put('hot pot', 1.4)\n\t.put('hot tub & pool', 1.41)\n\t.put('hotel bar', 1.41)\n\t.put('hungarian', 1.41)\n\t.put('iberian', 1.42)\n\t.put('immigration law', 1.43)\n\t.put('indian', 1.43)\n\t.put('indonesian', 1.43)\n\t.put('indoor playcentre', 1.43)\n\t.put('fitness & instruction', 1.32)\n\t.put('insurance', 1.44)\n\t.put('interior design', 1.44)\n\t.put('internal medicine', 1.44)\n\t.put('international', 1.45)\n\t.put('internet cafes', 1.45)\n\t.put('internet service providers', 1.45)\n\t.put('investing', 1.45)\n\t.put('irish pub', 1.45)\n\t.put('irish', 1.45)\n\t.put('irrigation', 1.45)\n\t.put('isl& pub', 1.46)\n\t.put('israeli', 1.46)\n\t.put('it services & computer repair', 1.22)\n\t.put('italian', 1.47)\n\t.put('izakaya', 1.47)\n\t.put('japanese', 1.47)\n\t.put('jazz & blues', 1.47)\n\t.put('jewelry', 1.47)\n\t.put('jewelry repair', 1.47)\n\t.put('jewish', 1.47)\n\t.put('junk removal & hauling', 1.48)\n\t.put('karaoke', 1.48)\n\t.put('kebab', 1.49)\n\t.put('Keyword', 1.49)\n\t.put('kids activities', 1.5)\n\t.put('kiosk', 1.5)\n\t.put('kitchen & bath', 1.5)\n\t.put('kiteboarding', 1.5)\n\t.put('knitting supplies', 1.52)\n\t.put('korean', 1.52)\n\t.put('kosher', 1.52)\n\t.put('kurdish', 1.52)\n\t.put('laboratory testing', 1.53)\n\t.put('lactation services', 1.53)\n\t.put('lakes', 1.54)\n\t.put('landscape architects', 1.54)\n\t.put('landscaping', 1.55)\n\t.put('language schools', 1.55)\n\t.put('laos', 1.55)\n\t.put('laotian', 1.55)\n\t.put('laser eye surgery/lasik', 1.57)\n\t.put('laser hair removal', 1.57)\n\t.put('laser tag', 1.58)\n\t.put('latin american', 1.58)\n\t.put('lawn bowling', 1.59)\n\t.put('lawyers', 1.59)\n\t.put('leather goods', 1.59)\n\t.put('lebanese', 1.59)\n\t.put('leisure centers', 1.59)\n\t.put('libraries', 1.59)\n\t.put('life coach', 1.6)\n\t.put('lighting fixtures & equipment', 1.61)\n\t.put('ligurian', 1.62)\n\t.put('limos', 1.63)\n\t.put('linens', 1.63)\n\t.put('lingerie', 1.63)\n\t.put('live/raw food', 1.63)\n\t.put('local flavor', 1.63)\n\t.put('local services', 1.63)\n\t.put('keys & locksmiths', 1.57)\n\t.put('lounges', 1.64)\n\t.put('luggage', 1.64)\n\t.put('lumbard', 1.64)\n\t.put('lyonnais', 1.65)\n\t.put('magicians', 1.65)\n\t.put('makeup artists', 1.65)\n\t.put('malaysian', 1.66)\n\t.put('mamak', 1.67)\n\t.put('marching bands', 1.67)\n\t.put('market stalls', 1.67)\n\t.put('marketing', 1.68)\n\t.put('martial arts', 1.69)\n\t.put('masonry/concrete', 1.69)\n\t.put('mass media', 1.7)\n\t.put('massage', 1.7)\n\t.put('massage schools', 1.7)\n\t.put('massage therapy', 1.7)\n\t.put('matchmakers', 1.7)\n\t.put('maternity wear', 1.7)\n\t.put('mattresses', 1.71)\n\t.put('meat shops', 1.71)\n\t.put('meatballs', 1.71)\n\t.put('medical centers', 1.71)\n\t.put('medical spas', 1.71)\n\t.put('medical supplies', 1.72)\n\t.put('medical transportation', 1.72)\n\t.put('mediterranean', 1.72)\n\t.put('counseling & mental health', 6.93)\n\t.put('mexican', 1.73)\n\t.put('middle eastern', 1.74)\n\t.put('midwives', 1.75)\n\t.put('milk bars', 1.75)\n\t.put('mini golf', 1.75)\n\t.put('mobile clinics', 1.75)\n\t.put('mobile phone repair', 1.76)\n\t.put('mobile phones', 1.76)\n\t.put('modern australian', 1.76)\n\t.put('modern european', 1.77)\n\t.put('mongolian', 1.77)\n\t.put('moroccan', 1.78)\n\t.put('mortgage brokers', 1.78)\n\t.put('mosques', 1.78)\n\t.put('motorcycle dealers', 1.79)\n\t.put('motorcycle gear', 1.79)\n\t.put('motorcycle rental', 1.79)\n\t.put('motorcycle repair', 1.8)\n\t.put('mountain biking', 1.8)\n\t.put('movers', 1.8)\n\t.put('mulled wine', 1.82)\n\t.put('museums', 1.82)\n\t.put('music venues', 1.84)\n\t.put('musicians', 1.85)\n\t.put('nail salons', 1.86)\n\t.put('neurologist', 1.86)\n\t.put('new zeal&', 1.86)\n\t.put('newspapers & magazines', 1.14)\n\t.put('night food', 1.86)\n\t.put('nightlife', 1.86)\n\t.put('community service/non-profit', 1.42)\n\t.put('no keywords', 0.00)\n\t.put('northern german', 1.88)\n\t.put('notaries', 1.88)\n\t.put('nudist', 1.89)\n\t.put('nutritionists', 1.89)\n\t.put('nyonya', 1.89)\n\t.put('obstetricians & gynecologists', 1.9)\n\t.put('occupational therapy', 1.9)\n\t.put('office cleaning', 1.91)\n\t.put('office equipment', 1.91)\n\t.put('officiants', 1.92)\n\t.put('oil change stations', 1.92)\n\t.put('oncologist', 1.92)\n\t.put('open sandwiches', 1.92)\n\t.put('ophthalmologists', 1.93)\n\t.put('optometrists', 1.93)\n\t.put('oral surgeons', 1.94)\n\t.put('organic stores', 1.94)\n\t.put('oriental', 1.95)\n\t.put('orthodontists', 1.96)\n\t.put('orthopedists', 1.96)\n\t.put('osteopathic physicians', 1.96)\n\t.put('osteopaths', 1.98)\n\t.put('outdoor gear', 1.98)\n\t.put('outlet stores', 1.99)\n\t.put('paddleboarding', 1.99)\n\t.put('arroceria / paella', 1.27)\n\t.put('paintball', 2)\n\t.put('painters', 2)\n\t.put('pakistani', 2.02)\n\t.put('palatine', 2.02)\n\t.put('parent cafes', 2.02)\n\t.put('parking', 2.02)\n\t.put('parks', 2.05)\n\t.put('parma', 2.07)\n\t.put('party & event planning', 2.08)\n\t.put('party bus rentals', 2.1)\n\t.put('party equipment rentals', 2.1)\n\t.put('party supplies', 2.11)\n\t.put('pawn shops', 2.13)\n\t.put('pediatric dentists', 2.13)\n\t.put('pediatricians', 2.13)\n\t.put('performing arts', 2.14)\n\t.put('perfume', 2.16)\n\t.put('periodontists', 2.16)\n\t.put('permanent makeup', 2.19)\n\t.put('persian/iranian', 2.19)\n\t.put('personal assistants', 2.2)\n\t.put('personal chefs', 2.21)\n\t.put('personal injury law', 2.21)\n\t.put('personal shopping', 2.22)\n\t.put('peruvian', 2.23)\n\t.put('pest control', 2.23)\n\t.put('pet boarding/pet sitting', 2.25)\n\t.put('pet groomers', 2.24)\n\t.put('pet services', 2.26)\n\t.put('pet stores', 2.26)\n\t.put('pet training', 2.26)\n\t.put('pets', 2.26)\n\t.put('pharmacy', 2.28)\n\t.put('photographers', 2.29)\n\t.put('photography stores & services', 2.3)\n\t.put('physical therapy', 2.31)\n\t.put('piano bars', 2.31)\n\t.put('piercing', 2.33)\n\t.put('pierogis', 2.33)\n\t.put('pilates', 2.34)\n\t.put('pita', 2.35)\n\t.put('pizza', 2.35)\n\t.put('playgrounds', 2.36)\n\t.put('plumbing', 2.37)\n\t.put('plus size fashion', 2.38)\n\t.put('podiatrists', 2.38)\n\t.put('police departments', 2.38)\n\t.put('polish', 2.38)\n\t.put('pool cleaners', 2.39)\n\t.put('pool halls', 2.39)\n\t.put('pop-up shops', 2.4)\n\t.put('portuguese', 2.41)\n\t.put('post offices', 2.41)\n\t.put('potatoes', 2.42)\n\t.put('poutineries', 2.44)\n\t.put('preschools', 2.45)\n\t.put('pretzels', 2.5)\n\t.put('print media', 2.53)\n\t.put('printing services', 2.53)\n\t.put('private investigation', 2.54)\n\t.put('private schools', 2.56)\n\t.put('private tutors', 2.57)\n\t.put('proctologists', 2.58)\n\t.put('professional services', 2.58)\n\t.put('professional sports teams', 2.58)\n\t.put('property management', 2.59)\n\t.put('psychiatrists', 2.59)\n\t.put('pub food', 2.59)\n\t.put('public plazas', 2.6)\n\t.put('public relations', 2.61)\n\t.put('public transportation', 2.62)\n\t.put('pubs', 2.63)\n\t.put('puerto rican', 2.63)\n\t.put('pulmonologist', 2.64)\n\t.put('race tracks', 2.67)\n\t.put('radio stations', 2.69)\n\t.put('rafting/kayaking', 2.09)\n\t.put('ramen', 2.72)\n\t.put('real estate', 2.72)\n\t.put('real estate agents', 2.74)\n\t.put('real estate law', 2.74)\n\t.put('real estate services', 2.77)\n\t.put('record labels', 2.78)\n\t.put('recreation centers', 2.78)\n\t.put('recycling center', 2.79)\n\t.put('reflexology', 2.8)\n\t.put('registry office', 2.8)\n\t.put('rehabilitation center', 2.8)\n\t.put('recording & rehearsal studios', 2.80)\n\t.put('religious organizations', 2.84)\n\t.put('religious schools', 2.85)\n\t.put('resorts', 2.85)\n\t.put('restaurants', 2.85)\n\t.put('retirement homes', 2.86)\n\t.put('rhinelandian', 2.87)\n\t.put('rice', 2.87)\n\t.put('rock climbing', 2.89)\n\t.put('rolfing', 2.9)\n\t.put('roman', 2.9)\n\t.put('romanian', 2.9)\n\t.put('roofing', 2.92)\n\t.put('rotisserie chicken', 2.93)\n\t.put('rumanian', 2.93)\n\t.put('russian', 2.94)\n\t.put('rv dealers', 2.98)\n\t.put('rv parks', 2.99)\n\t.put('rv rental', 2.99)\n\t.put('sailing', 3)\n\t.put('salad', 3.01)\n\t.put('salvadoran', 3.03)\n\t.put('sandwiches', 3.04)\n\t.put('sardinian', 3.05)\n\t.put('saunas', 3.09)\n\t.put('scandinavian design', 3.1)\n\t.put('scandinavian', 3.12)\n\t.put('scottish', 3.14)\n\t.put('scuba diving', 3.16)\n\t.put('seafood', 3.16)\n\t.put('seafood markets', 3.17)\n\t.put('security services', 3.18)\n\t.put('security systems', 3.19)\n\t.put('self storage', 3.21)\n\t.put('senegalese', 3.22)\n\t.put('serbo croatian', 3.25)\n\t.put('session photography', 3.25)\n\t.put('sewing & alterations', 3.27)\n\t.put('shades & blinds', 3.31)\n\t.put('shanghainese', 3.32)\n\t.put('shared office spaces', 3.32)\n\t.put('shaved ice', 3.35)\n\t.put('shipping centers', 3.4)\n\t.put('shoe repair', 3.4)\n\t.put('shoe stores', 3.41)\n\t.put('shopping', 3.43)\n\t.put('shopping centers', 3.45)\n\t.put('sicilian', 3.46)\n\t.put('signature cuisine', 3.48)\n\t.put('singaporean', 3.48)\n\t.put('skate parks', 3.51)\n\t.put('skating rinks', 3.55)\n\t.put('ski resorts', 3.56)\n\t.put('skiing', 3.57)\n\t.put('skin care', 3.64)\n\t.put('skydiving', 3.65)\n\t.put('sleepwear', 3.66)\n\t.put('smog check stations', 3.7)\n\t.put('juice bars & smoothies', 2.60)\n\t.put('snow removal', 3.71)\n\t.put('soccer', 3.72)\n\t.put('social clubs', 3.74)\n\t.put('solar installation', 3.74)\n\t.put('soul food', 3.76)\n\t.put('soup', 3.78)\n\t.put('south african', 3.79)\n\t.put('southern', 3.79)\n\t.put('souvenir shops', 3.8)\n\t.put('spanish', 3.8)\n\t.put('special bikes', 3.83)\n\t.put('special education', 3.85)\n\t.put('specialty food', 3.86)\n\t.put('specialty schools', 3.91)\n\t.put('speech therapists', 3.97)\n\t.put('spin classes', 4.02)\n\t.put('spiritual shop', 4.03)\n\t.put('sport equipment hire', 4.03)\n\t.put('sporting goods', 4.14)\n\t.put('sports bars', 4.16)\n\t.put('sports clubs', 4.2)\n\t.put('sports medicine', 4.23)\n\t.put('sports wear', 4.25)\n\t.put('squash', 4.25)\n\t.put('stadiums & arenas', 4.32)\n\t.put('steakhouses', 4.41)\n\t.put('street art', 4.43)\n\t.put('street vendors', 4.45)\n\t.put('summer camps', 4.47)\n\t.put('surf shop', 4.5)\n\t.put('surfing', 4.55)\n\t.put('surgeons', 4.67)\n\t.put('sushi bars', 4.7)\n\t.put('swabian', 4.72)\n\t.put('swedish', 4.75)\n\t.put('swimming lessons/schools', 4.78)\n\t.put('swimming pools', 4.78)\n\t.put('swimwear', 4.81)\n\t.put('swiss food', 4.83)\n\t.put('synagogues', 4.84)\n\t.put('szechuan', 4.86)\n\t.put('screen printing/t-shirt printing', 4.03)\n\t.put('tabernas', 4.91)\n\t.put('tablao flamenco', 5)\n\t.put('tableware', 5.01)\n\t.put('tai chi', 5.02)\n\t.put('taiwanese', 5.11)\n\t.put('talent agencies', 5.19)\n\t.put('tanning', 5.2)\n\t.put('tapas bars', 5.22)\n\t.put('tapas/small plates', 5.32)\n\t.put('tattoo', 5.32)\n\t.put('tattoo removal', 5.32)\n\t.put('tax office', 5.34)\n\t.put('tax services', 5.34)\n\t.put('taxidermy', 5.41)\n\t.put('taxis', 5.46)\n\t.put('tea rooms', 5.47)\n\t.put('musical instruments & teachers', 3.68)\n\t.put('television service providers', 5.53)\n\t.put('television stations', 5.54)\n\t.put('tennis', 5.6)\n\t.put('teochew', 5.67)\n\t.put('teppanyaki', 5.71)\n\t.put('test preparation', 5.73)\n\t.put('tex-mex', 5.78)\n\t.put('thai', 5.84)\n\t.put('thrift stores', 5.97)\n\t.put('ticket sales', 5.97)\n\t.put('tickets', 6.02)\n\t.put('tires', 6.08)\n\t.put('tobacco shops', 6.12)\n\t.put('tours', 6.13)\n\t.put('towing', 6.15)\n\t.put('toy stores', 6.16)\n\t.put('trade fairs', 6.24)\n\t.put('traditional chinese medicine', 6.29)\n\t.put('traditional norwegian', 6.3)\n\t.put('traditional swedish', 6.36)\n\t.put('train stations', 6.46)\n\t.put('trainers', 6.58)\n\t.put('trampoline parks', 6.61)\n\t.put('translation services', 6.62)\n\t.put('transportation', 6.73)\n\t.put('hotels & travel', 4.17)\n\t.put('travel services', 7.05)\n\t.put('tree services', 7.07)\n\t.put('trinidadian', 7.08)\n\t.put('trophy shops', 7.16)\n\t.put('truck rental', 7.22)\n\t.put('tubing', 7.46)\n\t.put('turkish ravioli', 7.59)\n\t.put('turkish', 7.71)\n\t.put('tuscan', 7.91)\n\t.put('tutoring centers', 8.19)\n\t.put('ukrainian', 8.29)\n\t.put('uniforms', 8.43)\n\t.put('university housing', 8.44)\n\t.put('urgent care', 8.72)\n\t.put('urologists', 8.79)\n\t.put('used bookstore', 9.05)\n\t.put('used vintage & consignment', 9.07)\n\t.put('utilities', 9.24)\n\t.put('vacation rental agents', 9.69)\n\t.put('vacation rentals', 9.74)\n\t.put('vegan', 10.11)\n\t.put('vegetarian', 10.19)\n\t.put('venetian', 10.21)\n\t.put('venezuelan', 10.23)\n\t.put('venison', 10.38)\n\t.put('venues & event spaces', 10.93)\n\t.put('veterinarians', 11.12)\n\t.put('books, mags, music & video', 3.98)\n\t.put('videos & video game rental', 3.17)\n\t.put('videographers', 12.72)\n\t.put('vietnamese', 13.19)\n\t.put('vinyl records', 13.2)\n\t.put('vocational & technical school', 9.405)\n\t.put('walk-in clinics', 13.34)\n\t.put('watch repair', 13.92)\n\t.put('watches', 13.94)\n\t.put('water taxis', 14.04)\n\t.put('web design', 14.22)\n\t.put('wedding planning', 14.41)\n\t.put('weight loss centers', 14.81)\n\t.put('wholesale stores', 14.94)\n\t.put('wigs', 15.32)\n\t.put('window washing', 15.33)\n\t.put('windows installation', 16.39)\n\t.put('windshield installation & repair', 17.79)\n\t.put('wine bars', 27.79)\n\t.put('wineries', 29.67)\n\t.put('wok', 66.89); \n\treturn theMap; \n}", "title": "" }, { "docid": "f2f60551e1df8f34fc29141c26bab6ae", "score": "0.6195233", "text": "function keywordTransform(wordMap) {\n return reduce(wordMap, (acc, val, key) => {\n const wordArray = map(val.split(','), word => word ? toLower(word) : false)\n acc[key] = compact(wordArray)\n return acc\n }, {})\n}", "title": "" }, { "docid": "05563307c6483878cccac065c5328843", "score": "0.605934", "text": "function transformWord(word, raw){\n\t\tdictionaryEntries[word] = [];\n\t\tword.split(\"\").map(eachLetterFromWord => dictionaryEntries[word].push(transformLetter(eachLetterFromWord, raw)));\n\n\t}", "title": "" }, { "docid": "0b96fa25dc03e1ef2b54bf8904242c30", "score": "0.60187906", "text": "function formVocabularyMap() {\n var measurementFontSize = 10;\n outputContext.font = measurementFontSize + 'px ' + state.font;\n words = state.vocabulary.trim().split(' ')\n .map(function(word) {\n return {\n ratio: outputContext.measureText(word).width / measurementFontSize,\n word: word\n };\n })\n .sort(function(a, b) {\n return a.ratio - b.ratio;\n });\n }", "title": "" }, { "docid": "0fe643cff2e8a78c726155ee716e087b", "score": "0.601423", "text": "function build_mappings(mappingsString){\r\n var maps = mappingsString.split('\\n');\r\n for(var i = 0; i < maps.length - 1; i++){\r\n to_map = maps[i].split(',');\r\n insertAndMapData(to_map[1],to_map[2],to_map[0]);\r\n }\r\n}", "title": "" }, { "docid": "38e309b4f5541b8a123f616f569b403b", "score": "0.5983349", "text": "addContent(name, content) {\n //@TODO\t \n \n let content_array = content.split(/\\s+/); \n const normalized_content = content_array.map((w)=>normalize(w)); \n const filtered_words = normalized_content.filter((w) => !this.noise_w_set.has(w)); \n this.indexing_structure[name] = new Map(); \n let index_stored ; \n this.total_content[name] = new Array();\n this.total_content[name].push(content); \n let doc_name = Object.keys(this.total_content);\n for(let l = 0;l<doc_name.length;l++){\n \t\t\tthis.offset_data[doc_name[l]] = new Map();\n \t\t\tlet matchword;\n \t\t\tlet temp_data = new Map();\n \t\t\twhile (matchword = WORD_REGEX.exec(this.total_content[doc_name[l]][0])) {\n \t\t\t\tconst [word, offset] = [matchword[0], matchword.index]; \n \t\t\t\t\tif(!temp_data.has(normalize(word)))\n \t\t\t\t\t\ttemp_data.set(normalize(word),offset);\n \n }\n this.offset_data[doc_name[l]] = temp_data;\n } \n \n for(const i of filtered_words){ \t\n \tif(this.indexing_structure[name].get(i) === undefined || this.indexing_structure[name].get(i) === \"\" ){\n \t\t\t\tthis.indexing_structure[name].set(i,1); \t\t\t\t\n \t}\t\t\t\n \telse{\n \t\tthis.indexing_structure[name].set(i,this.indexing_structure[name].get(i)+1 ); \n \t}\t\t\t\n }\t\n }", "title": "" }, { "docid": "89c523c49ec1b3ac3fdb598fcc25926c", "score": "0.5958791", "text": "function createWords(){\n for(var i = 0; i < self.g_levels[self.g_level].words; i++){\n var wordIndex = utils.getRandom(self.g_words.length);\n var wordText = g_wordsList[wordIndex];\n \n self.g_words.push(new word(wordText));\n\n\n\n //removing the word from our words array\n g_wordsList.splice(wordIndex, 1);\n }\n }", "title": "" }, { "docid": "c2be7b9e0d291d9974354eff2114cac7", "score": "0.59579206", "text": "function createMap() {\n\n var objTypes = \"String Number Date Array Boolean RegExp Function Object Undefined Null\";\n var tagTypes = \"a abbr acronym address applet area article aside audio \"+\n \"b base bdi bdo big body br button \"+\n \"canvas caption center cite code col colgroup command \"+\n \"datalist dd del details dfn dir div dl dt \"+\n \"em embed \"+\n \"fieldset figcaption figure font footer form frame frameset \"+\n \"h1 h2 h3 h4 h5 h6 head header hgroup hr html \"+\n \"i iframe img input ins \"+\n \"kbd \"+\n \"label legend li link \"+\n \"map mark menu meta meter \"+\n \"nav noframes noscript \"+\n \"ol optgroup option output \"+\n \"p param pre progress \"+\n \"q \"+\n \"rp rt ruby \"+\n \"s samp script section select small source span strike strong style sub summary sup svg \"+\n \"table tbody td textarea tfoot th thead time title tr track tt \"+\n \"u ul \"+\n \"var video \"+\n \"wbr\"+\n \"xmp\";\n var specialTagTypes =\"object\";\n\n objTypes.split(' ').forEach( mapObject );\n tagTypes.split(' ').forEach( mapTag );\n specialTagTypes.split(' ').forEach( mapSpecialTag );\n\n var tn = document.createTextNode( 'test' );\n var cn = document.createComment( 'test' );\n var tntype = Object.prototype.toString.call( tn );\n var cntype = Object.prototype.toString.call( cn );\n var windowtype = Object.prototype.toString.call( $.window );\n map[ tntype ] = 'textnode';\n map[ cntype ] = 'commentnode';\n map[ windowtype ] = 'window';\n //TODO: add isTextNode and isCommentNode selector functions\n //TODO: add support for blockquote\n }", "title": "" }, { "docid": "a491467c755f835fce7a7716fef5fcab", "score": "0.59410626", "text": "function populateEnteredWords(arr) {\n // Reset words.\n let entered_words = element(\"entered-words\");\n entered_words.textContent = \"\";\n for (word of arr) {\n let elem = document.createElement(\"span\");\n elem.classList.add(\"entered-word\");\n elem.textContent = capitalizeInitial(word);\n if (isPangram(word)) {\n elem.classList.add(\"highlight-background\");\n elem.style.color = \"var(--color-text-gray-highlight)\";\n }\n entered_words.insertBefore(elem, entered_words.firstChild);\n }\n}", "title": "" }, { "docid": "ca052ac42bc940ce0dece861a3024ddb", "score": "0.5916308", "text": "function countUniqueWords() {\n var textAreaOne = document.getElementById(\"textInput\");\n var textAreaFive = document.getElementById(\"counter\");\n var res = textAreaOne.value;\n\n //array of all words\n arr = res.split(\" \");\n\n //initializes a map\n var wordsMap = {}\n \n //create a JS object as a map\n //forEach() executes a function on an array element\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n arr.forEach(function(key){\n if(wordsMap.hasOwnProperty(key)){\n wordsMap[key]++\n }else {\n wordsMap[key] = 1;\n }\n });\n console.log(wordsMap);\n\n //need to properly display a Javascript object\n var output = '';\n for (var prop in wordsMap) {\n output += prop + ': ' + wordsMap[prop] + ', ';\n }\n console.log(output);\n\n //set text area value to string with object results\n textAreaFive.value = output;\n\n}", "title": "" }, { "docid": "12e17513ed8e2bdd75f799b61ade953d", "score": "0.58946186", "text": "function initialize() {\n\tvar alphabet = 'abcdefghijklmnopqrstuvwxyz';\n\n\t// Empty array for each letter\n\tfor (var i = 0; i < alphabet.length; i++) {\n\t\tdictionary[alphabet.charAt(i)] = [];\n\t} // Put all the words into the right spot.\n\tfor (var _i = 0; _i < _moreWords2.default.length; _i++) {\n\t\tdictionary[_moreWords2.default[_i].charAt(0)].push(_moreWords2.default[_i]);\n\t}\n}", "title": "" }, { "docid": "bf3011fcc1347c9bfc7551a9ac0ecaed", "score": "0.5880038", "text": "function newWord() {\n // Stores the random word\n answer = randomWord();\n // Stores each letter of \"answer\" to an element of an array\n answerArr = answer.split(\"\");\n // Generates a jumbled \"map\" of the word\n mapArr = jumbleMap(answerArr);\n // Maps the word to their jumbled indices\n jumbledArr = jumbleWord(answerArr, mapArr);\n // Makes a string out of the \"jumbledArr\" to log to screen\n jumbled = jumbledArr.join(\"\");\n}", "title": "" }, { "docid": "2d68c7ca47a510d056839d294df3f1af", "score": "0.5873844", "text": "function countWords(theString) {\n var arr1 = []; //theString will be broken down and placed here.\n var arr2 = []; //this is where to put processed array of strings.\n var map = { //the object that will hold the words and their counts.\n };\n var contentArea = document.getElementById('content');\n var wordDiv = document.createElement('div');\n var countDiv = document.createElement('div');\n var maxArea = contentArea.appendChild(document.createElement('h2'));\n contentArea.appendChild(wordDiv);\n contentArea.appendChild(countDiv);\n\n // var wordP = document.createElement('p');\n // var countP = document.createElement('p');\n // wordP.className = \"words-class\";\n // countP.className = \"counts-class\";\n\n function cleanUp() {\n /* iterate through string and build an array of words by replacing newlines with spaces, then splitting by spaces. */\n arr1 = theString.replace(/\\n/g, \" \").split(\" \");\n /* go through the array and for each item, test for character-length, revert to lower case, remove punctuation using:[replace(/[.,\\/#!$%\\^&\\*;:{}=\\-_`~();:]/g,\"\")], add acceptable array items to new array */\n for (var item in arr1) {\n //character.replace punctuation with \"\" and changes to lower case\n arr1[item] = arr1[item].replace(/[!.,?'\"-:;]/g, \"\").toLowerCase();\n /* push the item to arr2 if more than one character long */\n if (arr1[item].length > 1) {\n arr2.push(arr1[item]); // the cleaned up items are now stored in arr2.\n }\n }\n }\n\n function addItemsToMapObject() {\n for (var item1 in arr2) {\n var word = arr2[item1]; //word is set to the item at index item1\n /* if the map contains the key word, retrieve the property and add one. */\n if (map[word]) { //tests if the item at index item1 exists as a key in the map object\n var count = map[word]; //if it exists, save that value in count.\n count++;\n map[word] = count;\n /* if the map doesn't contain the word, then set the value of map.word to 1 and add map.word to map */\n } else {\n map[word] = 1;\n }\n }\n for(var prop in map) { /* iterate again for the actual printing out. */\n var wordP = document.createElement('p');\n wordP.className = 'words';\n wordDiv.appendChild(wordP);\n wordP.innerHTML = prop;\n var countP = document.createElement('p');\n countP.className = 'counts';\n countDiv.appendChild(countP);\n countP.innerHTML = map[prop];\n console.log(prop + \": \" + map[prop]);\n }\n mostUsedWord();\n }\n\n function mostUsedWord() {\n var maxValue = 0;\n var maxKey;\n for (var key in map) {\n var value = parseInt(map[key]);\n if (value > maxValue) {\n maxKey = key;\n maxValue = value;\n }\n }\n maxArea.innerHTML = \"'\" + maxKey + \"' is the most-used word. It is repeated \" + maxValue + \" times.\";\n console.log(\"maxKey = \" + maxKey + \": \" + maxValue);\n return key;\n }\n cleanUp();\n addItemsToMapObject();\n\n} //end of countWords function", "title": "" }, { "docid": "3c2cb0853b6b0952303b36942dc1fd05", "score": "0.58712196", "text": "function generateWordMap() {\n let wordIdPair = {\n id: generateId(wordList),\n word: generateSecretWord(wordList)\n };\n wordIdMap.push(wordIdPair);\n console.log(wordIdMap);\n return wordIdPair[\"id\"];\n}", "title": "" }, { "docid": "419b141ff6843c7a3e6cfa411d41f723", "score": "0.5847699", "text": "function pushDefinitions(data) {\n data.forEach(function(item) {\n entry = document.createElement('div');\n word = document.createElement('h3');\n definition = document.createElement('p');\n\n word.textContent = item.word;\n word.classList = 'word';\n\n definition.classList = 'definition';\n definition.innerHTML = item.definition;\n\n entry.classList = 'entry';\n entry.appendChild(word);\n entry.appendChild(definition);\n\n document.querySelector('#dictionary').appendChild(entry);\n });\n console.log('Dictionary loaded and rendered.');\n}", "title": "" }, { "docid": "711b92133b4aae4719a1b680863bad41", "score": "0.5828581", "text": "function createWordsFromData(data) {\n // Run through the words in the data and create them according to the saved information\n for (let i = 0; i < data.words.length; i++) {\n let wordData = data.words[i];\n createWord(wordData.word, wordData.x, wordData.y);\n }\n}", "title": "" }, { "docid": "99765a12abecf017e3b2f27877255b54", "score": "0.5820959", "text": "function countWords(text){\n text = text.join('\\n');\n input = text.split(/\\W/).filter(e => e!==\"\").map(e => e.toLowerCase())\n let words = new Map()\n\n for (let i = 0; i < input.length; i++) {\n if (!words.has(input[i])) {\n words.set(input[i], 0)\n }\n \n words.set(input[i], words.get(input[i]) + 1)\n }\n\n for (const word of Array.from(words.keys()).sort()) {\n console.log(`'${word}' -> ${words.get(word)} times`);\n }\n}", "title": "" }, { "docid": "1f509f2e924813d6019a9ef67f440fa0", "score": "0.5803257", "text": "function generateMapFromStrings(list){var result={};for(var x=0;x<list.length;x++){// make the mapped names underscored instead of dash\nresult[list[x].replace(/-/g,'_')]=list[x];}return result;}", "title": "" }, { "docid": "95e28a4ab83a99a803f5631fd81d6cfb", "score": "0.57925004", "text": "function pushToSyllableMap(word, syllables){\n\tif (!(syllables in syllableMap)){\n\t\tsyllableMap[syllables] = [word];\n\t} else {\n\t\tsyllableMap[syllables].push(word);\n\t}\n}", "title": "" }, { "docid": "a2267ea2c4722a3525e7777c9fda44e7", "score": "0.575769", "text": "createWords(node) {\n let nonTerminalAux = this.stringLoop(node.getData());\n if(nonTerminalAux[0] !== ''){\n let production = this.productionRules[this.filterKeySource(nonTerminalAux[0])];\n let productionsList = production.target.split('|');\n for (let i = 0; i < productionsList.length; i++) {\n this.idCounter++;\n let aux;\n if(node.getId() !== 1) {\n aux = new Node(\n this.idCounter,\n this.insert(this.removeByIndex(node.getData(), nonTerminalAux[1]), productionsList[i], nonTerminalAux[1]),\n 0,\n 0\n );\n this.checkWord(aux.getData());\n if (!this.wordExist) {\n this.words.push(aux.getData());\n }\n } else {\n aux = new Node(\n this.idCounter,\n productionsList[i],\n 0,\n 0\n );\n }\n if(this.wordsCounter < 1000) {\n this.wordsCounter++;\n this.wordExist = false;\n this.createWords(aux);\n } else {\n this.wordsCounter = 0;\n }\n }\n }\n }", "title": "" }, { "docid": "bd0a99b96811db976a738923860cbb5a", "score": "0.5755114", "text": "function addDictionaryPopovers(customWordsDict) {\n\n // create an array that sorts the keys in the customWordsDict by length\n var customWordsKeyset = [];\n for (var customWord in customWordsDict) {\n customWordsKeyset.push(customWord);\n }\n\n customWordsKeyset.sort(function(a, b){\n if (a.length > b.length) {\n return -1;\n }\n\n if (a.length == b.length) {\n return 0;\n }\n\n return 1;\n });\n\n function collectTextNodes(element, texts) {\n var classes = element.hasAttribute(\"class\") ? element.getAttribute(\"class\").split(/\\s+/) : {};\n if (jQuery.inArray(element.nodeName, SKIP_ELEMENTS) == -1 && jQuery.inArray(\"pressgangMenu\", classes) == -1) {\n for (var child= element.firstChild; child!==null; child= child.nextSibling) {\n if (child.nodeType===3) {\n // Ignore text nodes that are just whitespace or new lines\n if (!whitespaceRE.test(child.nodeValue))\n texts.push(child);\n } else if (child.nodeType===1) {\n collectTextNodes(child, texts);\n }\n }\n }\n }\n\n var texts = [];\n collectTextNodes(document.body, texts);\n\n var batchsize = 20;\n\n function processTextNodes(texts, index) {\n if (index < texts.length) {\n for (var textIndex = index, textCount = texts.length; textIndex < textCount && textIndex < index + batchsize; ++textIndex) {\n var textNode = texts[textIndex];\n var initialText = encodeXml(jQuery(textNode).text());\n var fixedText = initialText;\n\n // mark up the dictionary matches\n for (var customWordIndex = 0, customWordCount = customWordsKeyset.length; customWordIndex < customWordCount; ++customWordIndex) {\n // Check to see if the custom word is in the text\n var customWord = customWordsKeyset[customWordIndex];\n if (fixedText.indexOf(customWord) == -1) continue;\n\n var replacementMarkers = {};\n\n // Go through and replace all previously matches text with markers\n var spanRE = /\\<span.*?\\<\\/span\\>/;\n var spanMatch = null;\n while ((spanMatch = fixedText.match(spanRE)) != null) {\n var replacementString = \"[\" + (Math.random() * 1000) + \"]\";\n\n while (fixedText.indexOf(replacementString) != -1) {\n replacementString = \"[\" + (Math.random() * 1000) + \"]\";\n }\n\n fixedText = fixedText.replace(spanRE, replacementString);\n replacementMarkers[replacementString] = spanMatch[0];\n }\n\n var customWordDetails = customWordsDict[customWord];\n var borderStyle = \"\";\n if (customWordDetails.tagId == VALID_WORD_EXTENDED_PROPERTY_TAG_ID) {\n borderStyle = \"border-color: green\";\n } else if (customWordDetails.tagId == INVALID_WORD_EXTENDED_PROPERTY_TAG_ID) {\n borderStyle = \"border-color: red\";\n } else if (customWordDetails.tagId == DISCOURAGED_WORD_EXTENDED_PROPERTY_TAG_ID) {\n borderStyle = \"border-color: purple\";\n } else if (customWordDetails.tagId == DISCOURAGED_PHRASE_EXTENDED_PROPERTY_TAG_ID) {\n borderStyle = \"border-color: purple\";\n }\n fixedText = fixedText.replace(new RegExp(\"\\\\b\" + encodeRegex(customWord) + \"\\\\b\", \"g\"), \"<span style='text-decoration: none; border-bottom: 1px dashed; \" + borderStyle + \"' onclick='javascript:displayDictionaryTopic(\" + customWordDetails.id + \")'>\" + customWord + \"</span>\");\n\n // replace the markers with the original text\n for (var replacement in replacementMarkers) {\n fixedText = fixedText.replace(replacement, replacementMarkers[replacement]);\n }\n }\n\n // If the content has changed, ie a dictionary match was found, then update the text node\n if (initialText !== fixedText) {\n jQuery(textNode).replaceWith(fixedText);\n }\n }\n\n setTimeout(function() {\n processTextNodes(texts, index + batchsize);\n }, 0);\n\n }\n }\n\n processTextNodes(texts, 0);\n}", "title": "" }, { "docid": "494b6ce309c55757aa4dfafc1f75aabc", "score": "0.5749836", "text": "function add_to_defns(word, data) {\n var meanings = [];\n var sentences = [];\n // Traverse Glosbe's JSON return value; extract meanings\n for (var t in data.tuc) {\n for (var m in data.tuc[t].meanings) {\n var defn = data.tuc[t].meanings[m];\n if (defn.language == \"eng\") {\n meanings.push(defn.text.toLowerCase());\n }\n }\n }\n\n for (var e in data.examples) {\n sentences.push(data.examples[e].first + \"<br>\");\n sentences.push(\"(<i>\" + data.examples[e].second + \"</i>)<br><br>\");\n }\n\n // Remove duplicate meanings\n var unique_meanings = [];\n $.each(meanings, function(i, el){\n if($.inArray(el, unique_meanings) === -1) unique_meanings.push(el);\n });\n\n var numbered_meanings = [];\n $.each(unique_meanings, function(i, el) {\n if (i==0) {\n numbered_meanings.push(\"1. <strong>\" + el.replace(/,+$/, \"\") + \"</strong><br>\");\n } else {\n numbered_meanings.push(i+1 + \". \" + el.replace(/,+$/, \"\") + \"<br>\");\n }\n })\n\n word_list[word] = numbered_meanings.join(\"\");\n word_list[word.hashCode()] = sentences.join(\"\");\n\n}", "title": "" }, { "docid": "f3ab881ee35c10efd5fb9ff6800d560c", "score": "0.57431114", "text": "function MapTermsToPages(terms) {\n var mapped = {};\n\n //loop pages of story data and look for terms - start form 1 to ignore title page\n for (var page = 0; page < storyData.length; page++) {\n \n //check if this page has a glossary\n if(storyData[page].hasOwnProperty('glossary'))\n {\n //get current glossary in current lang\n var glossary = storyData[page].glossary[writtenLang];\n\n var termsLeft = terms;\n\n //loop through glossary terms\n Object.keys(glossary).forEach(function (term) {\n //compare to terms in the game\n for (var i = 0; i < terms.length; i++) {\n //compare glossary term to term at i\n if (term == terms[i]) {\n //they match! - remove from terms left and add to the term map\n termsLeft.splice(i, 1);\n mapped[term] = page;\n }\n }\n });\n\n //update terms\n terms = termsLeft;\n }\n }\n return mapped;\n}", "title": "" }, { "docid": "f6db1d080cc8c11aae3ead194c710173", "score": "0.5739322", "text": "function createStrMap(arr) {\n //Instantiate a new map\n const map = new Map();\n for (let str of arr) {\n //sort all string in the array mapping them out using the spread operator\n let sortedArr = [...str].sort().join(\"\");\n\n //check whether an element with a specific key exist in the map or not.\n if (map.has(sortedArr)) {\n //if no,get string from the sorted array and add\n map.get(sortedArr).push(str);\n } else {\n //if yes, stores the value by the key\n map.set(sortedArr, [str]);\n }\n }\n //speard out all the values of the stored keys\n let charMap = [...map.values()];\n //return the arraries\n return charMap;\n}", "title": "" }, { "docid": "ca3522ec94abc0ba13994b5ad40817de", "score": "0.5732948", "text": "function getWords(i) {\r\n //console.log(\"data:\", data)\r\n //console.log(\"data[0:]\", data['10'])\r\n return wordCount[i]\r\n .replace(/[!\\.,:;\\?]/g, '')\r\n .split(' ')\r\n .map(function(d) {\r\n topWord = wordData[0].Word;\r\n return {text: wordData[d].Word, size: xScale(wordData[d].Rank)};\r\n })\r\n}", "title": "" }, { "docid": "b7b91ae6fac8b63cd444d64cb6b47ae3", "score": "0.5726522", "text": "function NivelUnoEjercicioTres() {\r\n let miNombre3 = ['E', 'E', 'R', 'I', 'C', 'C'];\r\n\r\n let map3 = new Map();\r\n\r\n miNombre3.forEach(letter => {\r\n if (map3.has(letter)) {\r\n let letterCount = map3.get(letter);\r\n map3.set(letter, letterCount + 1);\r\n } else {\r\n map3.set(letter, 1);\r\n }\r\n })\r\n console.log(\" \");\r\n console.log(\"Nivel 1 - Ejercicio 3\")\r\n\r\n console.log(\"Partim del nom \" + miNombre3);\r\n console.log(map3);\r\n}", "title": "" }, { "docid": "61f2ec1db626e8d59e1dfc6bf487544a", "score": "0.5689202", "text": "function catWords(w, pos, id){\r\n for (i = 0; i < w.length ; i++){\r\n if( tempWordCat[w[i]]){\r\n tempWordCat[w[i]].in_sentence.push(id);\r\n }else{\r\n tempWordCat[w[i]] = {\r\n in_sentence: [id],\r\n function: [pos[i]]\r\n };\r\n }\r\n }\r\n wordCat = tempWordCat;\r\n writeNewWordCat();\r\n}", "title": "" }, { "docid": "35874965f6305b4467272607c274d62b", "score": "0.5672607", "text": "function wordsTraciker(strArr) {\n let words = new Map()\n let reqWords = strArr.shift().split(' ');\n for (let el of reqWords) {\n words.set(el, 0)\n }\n for (let word of strArr) {\n let times = 1\n if (words.has(word)) {\n let currentTimes = words.get(word)\n let newTimes = currentTimes + times\n words.set(word, newTimes)\n }\n }\n let sorted = Array.from(words).sort((a, b) => b[1] - a[1])\n for (let el of sorted) {\n console.log(`${el[0]} - ${el[1]}`)\n }\n}", "title": "" }, { "docid": "1c07bf324203dd092488f205abfa4d19", "score": "0.565262", "text": "function aclean(arr) {\n let map = new Map();\n \n for (let word of arr) {\n // split the word by letters, sort them and join back\n let sorted = word.toLowerCase().split('').sort().join(''); // (*)\n map.set(sorted, word);\n }\n \n return Array.from(map.values());\n }", "title": "" }, { "docid": "1c07bf324203dd092488f205abfa4d19", "score": "0.565262", "text": "function aclean(arr) {\n let map = new Map();\n \n for (let word of arr) {\n // split the word by letters, sort them and join back\n let sorted = word.toLowerCase().split('').sort().join(''); // (*)\n map.set(sorted, word);\n }\n \n return Array.from(map.values());\n }", "title": "" }, { "docid": "783648ddddb1d746c19913b671028ef9", "score": "0.56385744", "text": "function generate() {\n\n\tvar patt = []; // TODO: May be remove it\n\n\t// Step 1: Save all bases into the dictionary\n\n\tvar ddd = {}; \t// Dictionary of dictionaries with entries by their length\n\tvar gg = htest.gwords.slice();\t// Copy of array with good words\n\tvar ad = []; // Global array for entries\n\n\tfor(var i=0;i<ST;i++) {\n\t\tddd[MX-i] = {}; // Prepare dictionary nest\n\n\t\tvar dd = {};\t// Local dictionary with entries\n\t\tvar ad1 = []; \t// Local array for entries\n\n\t\tgg.forEach(function(w){\t\t\t// Save into the dictionary number of good words\n\t\t\tvar k = w.substr(0,MX-i);\t\n\t\t\tif(!dd[k]) dd[k] = {k:k,q:0}; // k - is a word, q = number of words\n\t\t\tdd[k].q++;\n\t\t});\n\n\t\t// Save all antries with number of good words > LIM\n\t\tfor(var kd in dd) {\n\t\t\td = dd[kd];\n\n\t\t\tif(d.q > LIM) {\n\t\t\t\tddd[MX-i][d.k] = []; // Save the dictionary\n\t\t\t\tad.push(d.k);\t// Save key in the global list for packing\n\t\t\t\tad1.push(d.k); // Save the key in the local list \n\t\t\t}\n\t\t}\n\n\t\t// Save all endings\n\n\t\t// Clear array of good words (gg) from selected entries (e)\n\t\tgg = gg.filter(w => !ad1.some(e => w.substr(0,e.length)==e));\n\t\tconsole.log('Step:',i, ad1.length, gg.length, gg.length/htest.gwords.length);\n\t}\n\tad = ad.sort(); // For packing\n\tconsole.log('Entries:',ad.length);\n\n\n\t// Step 2: Put all the tails into array\n\n\thtest.gwords.forEach(function(w) {\n\t\tfor(var i=0;i<ST;i++) {\n\t\t\tif(ddd[MX-i][w.substr(0,MX-i)]) {\n\t\t\t\tvar cw = bi(w.substr(MX-i));\n\t\t\t\tddd[MX-i][w.substr(0,MX-i)].push(cw);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\n\tvar saa = '';\n\tvar saa = [];\n\tvar akk = [];\n\tfor(var i=0;i<ST;i++) {\n\t\takk = akk.concat(Object.keys(ddd[MX-i]));\n\t}\n\takk = akk.sort();\n\n\takk.forEach(function(cw){\n\n\t\tvar aa = createDict(ddd[cw.length][cw], AB);\n\t\tvar sa = codeDictPass1(aa);\n\t\tsaa = saa.concat(sa);\n\n\t\tif(false) {\n\t\t// Для тестирования\n\t\t\tvar a = {};\n\t\t\tddd[cw.length][cw].forEach(function(f) {\n\t\t\t\ta[f] = true;\n\t\t\t});\n\t\t\tddd[cw.length][cw] = a;\n\t\t}\n\n\t});\n\n\tvar bs = '';\n\n\tvar bpairs = packArray(htest.fpairs,2);\t// Pack bad pairs\n\n\tvar bad = packArray(ad,MX);\t\t\t\t// Pack dictionary\n\n\tvar hf = createHuffman(saa);\t\t\t// Pack tails with Huffman tree\n\n\tvar ns = packNodeLevel(hf.node);\t\t// Pack nodes\n\n\tbs += bpairs + bad + ns + hf.res;\n\n\t// Step 4: Create binary buffer from binary string\n\n\tlet len = Math.ceil(bs.length/8);\n\tconst buf = new Buffer(len);\n\tfor(let i=0;i<len;i++) {\n\t\tbuf[i] = parseInt((bs.substr(i*8,8)+'00000000').substr(0,8),2);\n\t}\t\n\n\treturn buf;\n}", "title": "" }, { "docid": "4a459bbf4b85bf89400409286bad46e2", "score": "0.5638167", "text": "async addContent(name, contentText) {\n if (!contentText.endsWith('\\n')) contentText += '\\n';\n this.contents.set(name, contentText);\n this._wordsLow(contentText).forEach((pair) => {\n const [word, offset] = pair;\n let wordIndex = this.indexes.get(word);\n if (!wordIndex) this.indexes.set(word, wordIndex = new Map());\n else if(!(wordIndex instanceof Map))wordIndex = new Map(Object.entries(wordIndex));\n let wordInfo = wordIndex.get(name);\n if (!wordInfo) wordIndex.set(name, wordInfo = [0, offset]);\n wordInfo[0]++;\n });\n await this.database.collection('wordMap').updateOne({name:'map'}, {$set:{name:'map', content:this.indexes}}, {upsert: true});\n await this.database.collection('titles').updateOne({name:'map2'}, {$set:{name:'map2', content:this.contents}}, {upsert:true});\n this.isComplete = false;\n }", "title": "" }, { "docid": "2b0e0f0af1bc75977b5061b54cce248b", "score": "0.56325686", "text": "function designerPdfViewer(h, word) {\n let wordArr = Array.from(word);\n let myMap = new Map();\n let heightArr = [];\n let alphabet = [];\n let maxHeight = 0;\n const start = \"a\".charCodeAt(0);\n const last = \"z\".charCodeAt(0);\n for (var i = start; i <= last; i += 1) {\n alphabet.push(String.fromCharCode(i));\n }\n console.log(alphabet);\n for (let i = 0; i < alphabet.length; i += 1) {\n myMap.set(alphabet[i], h[i]);\n }\n console.log(myMap);\n for (var i = 0; i < wordArr.length; i += 1) {\n heightArr.push(myMap.get(wordArr[i]));\n }\n maxHeight = Math.max(...heightArr);\n console.log(maxHeight);\n console.log(maxHeight * word.length);\n}", "title": "" }, { "docid": "bb1acc18d840204ccbb20d5726a597f2", "score": "0.5628664", "text": "function jumbleMap(wordArr) {\n var jumbArr = seqArr(wordArr);\n jumbArr = jumbleIndex(jumbArr);\n return jumbArr;\n}", "title": "" }, { "docid": "44e6bf0c583ce7e2b3c8c185240a8d6c", "score": "0.56257325", "text": "function loadWords() {\n var words = new PS.VectorWords();\n\n // Load wordList into VectorWords object\n wordList.forEach(function (wordPair) {\n words.push_back(wordPair);\n });\n\n if (recognizer.addWords(words) != PS.ReturnType.SUCCESS) {\n // Probably bad format used for pronunciation\n console.log('Error while adding words');\n }\n \n words.delete()\n}", "title": "" }, { "docid": "c379c84c8dd78b38f4056aed7a1beadf", "score": "0.56203383", "text": "function filterWordData(pos_list) {\n // can turn to true for some helpful console logs!\n var DEBUG = true;\n //console.log('input', pos_list)\n var words_data_filtered = [];\n var words_data_keys = Object.getOwnPropertyNames(words_data);\n\n /* So needed to do is identify 'Adverb, preposition' as 'adverb'\n * and 'preposition'. I made a dictionary (pos_dictionary) with a\n * list of everything it should add when it finds that word.\n * So 'Adverb' will be:\n * 'Adverb' : ['Adverb', 'Adverb, Conjunction', 'Adverb, Preposition'] etc.\n */\n // #################################################\n /* We used to add it based on the thing we were adding, but now we make it based on all possibilties\n * This separates out what we want to include and make pos_dict\n // Intialize a dictionary with all the parts of speech we want to add\n var pos_dictionary = {};\n for (var i=0; i<pos_list.length; i++){\n\tvar pos = pos_list[i];\n\tpos_dictionary[pos]= [];\n\n }\n */\n\n var pos_dictionary = {\n \"Adjective\" : [],\n \"Adjective_1\": [],\n \"Adjective_2\": [],\n \"Adjective_3\": [],\n \"Adjective_5\": [],\n \"Adjective_6\": [],\n \"Adjective_\" : [],\n \"Noun\" : [],\n \"Noun_1\": [],\n \"Noun_2\": [],\n \"Noun_3\": [],\n \"Noun_4\": [],\n \"Noun_5\": [],\n \"Noun_6\": [],\n \"Verb\": [],\n \"Verb_1\" : [],\n \"Verb_2\" : [],\n \"Verb_3\" : [],\n \"Verb_4\" : [],\n \"Verb_5\" : [],\n \"Article\": [],\n \"Particle\": [],\n \"Adverb\": [],\n \"Conjunction\": [],\n \"Interjection\": [],\n \"Preposition\": [],\n \"Pronoun\": [],\n \"Reg_Adv\": [],\n \"Idiom\": [],\n \"Number\": [],\n \"Proper_nouns\": [],\n \"\": [],\n \"CATCH_BAD\" : [],\n \"Noun_\" : [],\n \"stop_words\" : [],\n };\n\n\n if(DEBUG==true) {\n //console.log(\"pos_dictionary\", pos_dictionary);\n }\n // Now add (hopefully) all pos from the data appropriately\n\n // neither adj_2 or adj_ are buttons in the slideout, so we have to add them separate\n // We group them with adj_1\n for (var i=0; i<words_data_keys.length; i++) {\n\tvar key = words_data_keys[i];\n if (key == 'Proper_nouns'){\n //console.log('looking at a proper noun where we build the words to display')\n pos_dictionary['Proper_nouns'].push('Proper_nouns')\n // this should do nothing, but might make them visible.\n }\n if (key == 'stop_words'){\n pos_dictionary['stop_words'].push('stop_words')\n }\n\n\n\n // These things aren't 'real' parts of speech, so they would\n // always get filtered in this function.\n // To get around that, we 'tie' them to a real POS!\n if (key == 'Adjective_2'){\n pos_dictionary['Adjective_1'].push('Adjective_2');\n }\n if (key == 'Adjective_'){\n pos_dictionary['Adjective_1'].push('Adjective_');\n\t}\n if (key == 'Adjective'){\n pos_dictionary['Adjective_1'].push('Adjective');\n\t}\n if (key == 'Adjective_6'){\n\t pos_dictionary['Adjective_5'].push('Adjective_6');\n\t}\n if (key == 'Noun_'){\n pos_dictionary['Noun_1'].push('Noun_');\n }\n\n if (key == 'Noun'){\n pos_dictionary['Noun_1'].push('Noun');\n }\n\n\n // Now we split things listed like \"Pronoun, Adjective\"\n // and add \"Pronoun, Adjective\" to both \"Pronoun\" and \"Adjective\"\n // A regex that matches 1 or more commas and any number of spaces\n var prop_list = [];\n console.log(key)\n\n\n if (key.includes(\"_\") ) {\n\n var split = key.split(\"_\");\n var base_pos = split[0];\n var extra_pos = split[1]\n if (extra_pos){\n var extra_pos = split[1].split(',');\n for (var n=0; n< extra_pos.length; n++) {\n prop_list.push(base_pos + \"_\" + extra_pos[n]);\n }\n }\n }\n else{\n prop_list = key.split(/,+\\s*/); // old thing which worked!\n }\n\n console.log(prop_list);\n\tfor (var j=0; j<prop_list.length; j++){\n var prop = prop_list[j];\n console.log(prop);\n\t if(pos_dictionary[prop] != undefined){\n\t pos_dictionary[prop].push(key);\n }\n\n\n\t else{\n console.log(\"WARNING: Part of speech: '\" + prop + \"' from key: '\" + key + \"' is being added to CATCH_BAD which will always be displayed\");\n console.log(\"See instuctions at this line in main.js\")\n /* Basically, there is a lot of weird POS data that you\n * can't make any assumptions about. You can 'tie' the\n * bad data to good data by adding the bad pos to a\n * a real one in pos_dictionary.\n * For example, if \"Noun_\" is being caught by catch bad\n * (1) Make a note of how many items are currently being returned in the search as indicated AT THE BOTTOM OF THE PAGE\n because the top return number sometimes fibs\n * (2) Add the bad POS (\"Noun_\") to the if statements above, and push it onto the pos we want to tie to (I chose Noun_1, but ask Bret).\n * (3) In the initial pos_dictionary definition, add the bas pos (\"Noun_\")\n * (4) Check to make sure the warning isn't diplayed and the number of items being returned is the same\n\n * SIDE RELATED TIP: sometimes, there are non-english characters in the POS that look\n * TOTALLY NORMAL. For instance 'Αdjective' != 'Adjective'. So if it is not finding something in the POS_dictionary that\n * you clearly of just put in the dictionary, you probably have this sort of problem on your hands.\n * What should you do? Probably just complain on the Bridge Slack channel (politely).\n */\n\n\n pos_dictionary['CATCH_BAD'].push(key)\n }\n\t}\n\n }\n\n if (DEBUG == true){\n console.log(pos_dictionary, \"POS_DICT\");\n }\n // pos_dictionary now complete\n\n //console.log(\"pos_list (things to be displayed)\", pos_list);\n\n\n // modified should probably be called added\n var modified = {}; // modified: tracks the things we have already changed so we don't double add\n for (var i=0; i<words_data_keys.length; i++) {\n var key = words_data_keys[i];\n var key_index = pos_list.indexOf(key);\n\tif (key_index>=0){\n\t for(var j=0; j<pos_dictionary[key].length; j++){\n\t var prop = pos_dictionary[key][j];\n\t if (modified[prop] == undefined){\n\t modified[prop] = true;\n\n words_data_filtered = words_data_filtered.concat(words_data[prop]);\n\t }\n\n\t }\n\t // We used to removed items instead of marking them as modified\n\t // but then you couldn't properly view the list in console\n\t // so I switched it, but here is the line a removed\n // pos_list.splice(key_index,1); //rm that key from pos_list\n }\n else {\n if (DEBUG == true){\n console.log(\"WARNING: Not displaying\", key, \"(this might be expected)\");\n }\n }\n }\n // We separately add all the things in CATCH_BAD\n for(var j=0; j<pos_dictionary['CATCH_BAD'].length; j++){\n var prop = pos_dictionary['CATCH_BAD'][j];\n if (modified[prop] == undefined){\n\t modified[prop] = true;\n\t if (DEBUG == true){\n console.log(prop, \"POS added to data (but it was in CATCH_BAD)\");\n }\n\n words_data_filtered = words_data_filtered.concat(words_data[prop]);\n }\n }\n if (DEBUG == true){\n console.log(words_data_filtered, 'Words returned by filter');\n }\n return words_data_filtered;\n}", "title": "" }, { "docid": "b924413c88727c8711c0b9afca3709bd", "score": "0.5619647", "text": "function getWords() {\n return words\n .join(' ')\n .replace(/[!\\.,:;\\?]/g, '')\n .split(' ')\n .map(function(d) {\n return {text: d, size: 10 + Math.random() * 60};\n })\n}", "title": "" }, { "docid": "5602741b1a41c704aacfae381298b192", "score": "0.56108135", "text": "function populate () {\n\tcurrentWord.forEach(function(letter){\n\t\tconsole.log(letter);\n\t});\n\ttiles.forEach(function(element, index){\n\t\tconsole.log(\"tile\", element, \"at index\", index);\n\t\tconsole.log(\"should have letter \", currentWord[index]);\n\t\telement.innerText = currentWord[index];\n\t});\n}", "title": "" }, { "docid": "3242eb42e9b4927daef2c66dc2201642", "score": "0.56028724", "text": "function wordFrequency(string) {\n const wordMap = new Map();\n\n let wordStart = 0;\n // looping through word array\n for (let i = 0; i <= string.length; i++) {\n // if we hit an empty space or end of string\n if (string[i] === \" \" || i === string.length) {\n // sanitize word\n let word = string\n .slice(wordStart, i)\n .replace(/[.,;:]/, \"\")\n .toLowerCase();\n\n // if it exists in our map, we increment, else initialize to 1\n wordMap.get(word) ? (wordMap[word] += 1) : (wordMap[word] = 1);\n\n // set our new indexes\n wordStart = i + 1;\n }\n }\n\n return wordMap;\n}", "title": "" }, { "docid": "4aa0894a96fc61f2eca8265a7ed5929e", "score": "0.5596072", "text": "addContent(name, content) {\n\t\t//@TODO\n\t\t//aad each of the non-noise normalized words in the document content to your indexing structure\n\t\t//split the content based on \\n ->\n\t\tvar lines = content.match(/[^\\r\\n]+/g);\n\t\tfor(var i=0; i < lines.length;i++){\n\t\t\t//console.log(lines[i]);\n\t\t\tthis.words(lines[i]).forEach((w) => {\n\t\t\t\t\t//console.log(\" \", w, \" \");\n\t\t\t\t\tvar temp = normalize(w);\n\t\t\t\t\tif(!(this.is_noise_word(temp))){\n\t\t\t\t\tthis.set2.add(temp);\n\t\t\t\t\tif(!(this.structure.has(temp)))//if the structure does not contain the word\n\t\t\t\t\t{\n\t\t\t\t\t//console.log(temp, \" \" ,name);\n\t\t\t\t\tvar doc_record = new Map();\n\t\t\t\t\tdoc_record.set(name,{count : 1, first_line : lines[i],idx:i});\n\t\t\t\t\tthis.structure.set(temp,doc_record);\n\t\t\t\t\tif(!(this.structure.get(temp).has(name))){\n\t\t\t\t\tvar doc_record = this.structure.get(temp);\n\t\t\t\t\tdoc_record.set(name,{count : 1, first_line : lines[i], idx:i});\n\t\t\t\t\tthis.structure.set(temp,doc_record);\n\t\t\t\t\t}\n\t\t\t\t\t}else if(!(this.structure.get(temp).has(name))){\n\t\t\t\t\t//console.log(name,\" \", temp)\n\t\t\t\t\tvar doc_record = this.structure.get(temp);\n\t\t\t\t\t//console.log(this.structure.get(temp));\n\t\t\t\t\tdoc_record.set(name,{count : 1, first_line : lines[i],idx:i});\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tlet get_doc_record = this.structure.get(temp).get(name);\n\t\t\t\t\t\tget_doc_record[\"count\"]+=1;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "8cf449f663a5e41b8c0d026fcd6cff15", "score": "0.55959946", "text": "function initMap(){\n var x,i,m;\n\n x=createLevelCode(lS);\n m=createMap(x);\n map=m.split('');\n placeHeroSomewhere();\n\n /*\n for(i=X*Y;i<lS*16*7;++i)\n {map[i]='0';}\n */\n}", "title": "" }, { "docid": "98f557df06572836bdeeb20b54b71e1a", "score": "0.5593234", "text": "function mapping(letters) {\n\tlet y = letters.reduce((acc, elem) => {\n acc[elem] = elem.toUpperCase();\n return acc;\n}, {})\n\treturn y;\n}", "title": "" }, { "docid": "d6cb6a09a9bee9805f6a3218f291b5e7", "score": "0.55929935", "text": "function wordFreq(book, word) {\n var letterMap = new Map();\n letterMap.set('a', 1);\n letterMap.set('b', 1);\n letterMap.set('c', 1);\n letterMap.set('d', 1);\n letterMap.set('e', 1);\n letterMap.set('f', 1);\n letterMap.set('g', 1);\n letterMap.set('h', 1);\n letterMap.set('i', 1);\n letterMap.set('j', 1);\n letterMap.set('k', 1);\n letterMap.set('l', 1);\n letterMap.set('m', 1);\n letterMap.set('n', 1);\n letterMap.set('o', 1);\n letterMap.set('p', 1);\n letterMap.set('q', 1);\n letterMap.set('r', 1);\n letterMap.set('s', 1);\n letterMap.set('t', 1);\n letterMap.set('u', 1);\n letterMap.set('v', 1);\n letterMap.set('w', 1);\n letterMap.set('x', 1);\n letterMap.set('y', 1);\n letterMap.set('z', 1);\n\n var bookWords = book.split(' ');\n\n var bookMap = new Map();\n for (let i = 0; i < bookWords.length; i++) {\n if (!letterMap.has(bookWords[i][bookWords[i].length - 1])) {\n bookWords[i] = (bookWords[i].slice(0, bookWords[i].length - 1)).toLowerCase();\n if (bookMap.has(bookWords[i])) {\n bookMap.set(bookWords[i], bookMap.get(bookWords[i] + 1));\n }\n else {\n bookMap.set(bookWords[i], 1);\n }\n }\n else if (bookMap.has(bookWords[i].toLowerCase())) {\n bookMap.set(bookWords[i].toLowerCase(), bookMap.get(bookWords[i].toLowerCase()) + 1);\n }\n else {\n bookMap.set(bookWords[i].toLowerCase(), 1);\n }\n }\n\n if (bookMap.has(word.toLowerCase())) {\n return bookMap.get(word.toLowerCase());\n }\n else {\n return 0;\n }\n}", "title": "" }, { "docid": "406d3de79984751388ab484774a6f68e", "score": "0.55927587", "text": "function generateWordDistribution() {\t\t\t\n\t\tvar zipf = [15,8,5,4,3,3,2,2];\n\t\tvar words_and_distributions = [[],[],[]];\n\t\tfor (var ma = 0; ma < 3; ma++) {\n\t\t\tfor (var iq = 0; iq < 8; iq++) {\n\t\t\t\twords_and_distributions[ma].push([selected_words[ma][iq], zipf[iq]]);\n\t\t\t}\n\t\t}\t\n\t\treturn words_and_distributions\n\t}", "title": "" }, { "docid": "c23b6383fca200f2c29d043a6b769efd", "score": "0.55880517", "text": "function PuplishMap(){}", "title": "" }, { "docid": "b03f58b2fc1121d09842b8bf54d1b2f5", "score": "0.55757666", "text": "function addToPage(words){\n for (var i = 0; i < words.length; i++){\n var word = words[i];\n var wordP = $(\"<p class='thesaurus-word' style='width: 300px; margin-left: 10px; display: inline;'>\");\n wordP.append(word);\n thesaurusOutput.append(wordP);\n thesaurusOutput.append(\"<br>\");\n }\n}", "title": "" }, { "docid": "fa67f4fbf411bc4ef85c01ee64a31f17", "score": "0.55749977", "text": "function buildDictionary (){\n //create empty dictionary\n var dictionary =[];\n //put all vocab entries from each student into dictionary\n students.forEach(function(el,i){\n dictionary = dictionary.concat(students[i].vocab);\n});\n //sort dictionary alpabetically by incorrect spellings\n dictionary.sort(alphaIncorrect);\n//print dictionary to glossary page\n dictionary.forEach(function(el,i){\n $(\"#glossary\").append(\"<span>\");\n $(\"#glossary span:last-of-type\").append(dictionary[i].incorrect);\n $(\"#glossary\").append(\" <ins>\");\n $(\"#glossary ins:last-of-type\").append(dictionary[i].correct);\n $(\"#glossary\").append(\"<br>\");\n });\n}", "title": "" }, { "docid": "d19ed1d68f85c42fa0fd3a87fd6ece93", "score": "0.55727315", "text": "mapWordGrid(transformFn) {\n return map2d(this.words.grid, transformFn)\n }", "title": "" }, { "docid": "0bfcfd30d8fe5424a69fd442c631206a", "score": "0.55675185", "text": "function dictionary(initial, words) {\n\tconst result = words.filter(word => word.startsWith(initial));\n\treturn result;\n}", "title": "" }, { "docid": "9eefc54c8c7641ef8465db1dcda46a6d", "score": "0.55643123", "text": "function encoderSolution(raw, coded_words) {\n mapping = {}\n ans = []\n var uniqueRaw = Array.from(new Set(raw));\n for (i=0; i<uniqueRaw.length; i++) {\n mapping[uniqueRaw[i]] = coded_words[i]\n }\n for (i of raw) {\n ans.push(mapping[i]);\n }\n return ans\n}", "title": "" }, { "docid": "0a7bc1b4c43dfb1e75811dc6234dbac3", "score": "0.55622643", "text": "function map(arr, anonymousFunction){\n newWords = [];\n arr.forEach(function(word) {\n currentFunction = anonymousFunction(word)\n newWords.push(currentFunction);\n });\n console.log(newWords)\n}", "title": "" }, { "docid": "af5648931e2fd8367d936f119524950e", "score": "0.55559653", "text": "function extractwords(x) {\n var start = 0;\n var temp = '';\n var q;\n x = x.toLowerCase();\n for (q = 0; q < x.length; q++) {\n if (!(x[q] >= 'a' && x[q] <= 'z') && q == 0) {\n q++;\n }\n if ((x[q] >= 'a' && x[q] <= 'z')) {\n temp = temp + x[q];\n }\n else {\n \n if (temp == 'terriblytinytales') {\n if (words['terribly']) {\n words['terribly']++;\n }\n else {\n words['terribly'] = 1;\n }\n if (words['tiny']) {\n words['tiny']++;\n }\n else {\n words['tiny'] = 1;\n }\n if (words['tales']) {\n words['tales']++;\n }\n else {\n words['tales'] = 1;\n }\n }\n else if (temp == 'terriblytinytalkies') {\n if (words['terribly']) {\n words['terribly']++;\n }\n else {\n words['terribly'] = 1;\n }\n if (words['tiny']) {\n words['tiny']++;\n }\n else {\n words['tiny'] = 1;\n }\n if (words['talkies']) {\n words['talkies']++;\n }\n else {\n words['talkies'] = 1;\n }\n }\n else if (temp == 'terriblytiny') {\n if (words['terribly']) {\n words['terribly']++;\n }\n else {\n words['terribly'] = 1;\n }\n if (words['tiny']) {\n words['tiny']++;\n }\n else {\n words['tiny'] = 1;\n }\n }\n else if (words[temp]) {\n words[temp]++;\n }\n else {\n words[temp] = 1;\n }\n temp = '';\n }\n \n }\n list.push(temp)\n}", "title": "" }, { "docid": "c3ab96b10af22cb3586e03d5a5494abf", "score": "0.5542867", "text": "function setupClusters(callback){\n wordmap = {};\n for (var i = items.length - 1; i >= 0; i--) {\n addToWordMap(workmap[items[i]],wordmap);\n // if (items[i] == \"37762683\") console.log(\"found \" + workmap[items[i]].title);\n };\n //console.log(wordmap);\n titleitems = items.slice(0); // grab a copy of the whole item list\n buildTitleCluster(callback);\n\n}", "title": "" }, { "docid": "2ae40bef7d7a5e5349ea2d2dfb022855", "score": "0.5536828", "text": "function setWords(text){\n words.text = text;\n}", "title": "" }, { "docid": "78e69e8c912d26216112564dd481df1d", "score": "0.5533172", "text": "function getWords(i) {\n return words[i]\n .replace(/[!\\.,:;\\?]/g, '')\n .split(' ')\n .map(function(d) {\n return {text: d, size: 10 + Math.random() * 60};\n })\n}", "title": "" }, { "docid": "51aa88fd3843824e4dd5acbde49d6074", "score": "0.5525994", "text": "function makeWordList(){\n for (var i = 0; i < word.length; i++){\n assignValues(i);\n }\n renderQuestion();\n}", "title": "" }, { "docid": "274ef08cf68c89cb7003eb3c82fdd5ab", "score": "0.5504247", "text": "function createWordsFromString(string) {\n // Split the string into separate words (using spaces as the division point)\n let wordsArray = string.split(` `);\n // Run through the array generating words\n for (let i = 0; i < wordsArray.length; i++) {\n // Get the word\n let word = wordsArray[i];\n // Choose a random location on the page\n // (Multiplying by 0.9 as a not-amazing way to make sure they don't display off the edge)\n let x = Math.random() * window.innerWidth * 0.9;\n let y = Math.random() * window.innerHeight * 0.9;\n // Create the word at that location\n createWord(word, x, y);\n }\n // Once all words are generated, save them so they'll be available and in the same place\n // next time\n saveWords();\n}", "title": "" }, { "docid": "2ba654030a9ced088ab44f30c0227bb0", "score": "0.5501525", "text": "function wordLen(strings) {\n map = {};\n for (x = 0; x < strings.length; x++) {\n temp = strings[x];\n map[temp] =temp.length;\n }\n return map;\n}", "title": "" }, { "docid": "ba84e4568320dcf748943aef2162a2c6", "score": "0.5499625", "text": "function SpaceMap(){}", "title": "" }, { "docid": "67fff539bcd4f7e463409ab4cd9eb385", "score": "0.54952157", "text": "function mapReverse(arr) {\n let map = new Map();\n\n for (let word of arr) {\n map[reverseWord(word)] = word;\n }\n\n return map;\n}", "title": "" }, { "docid": "62fef41a65befac523d4d3cd914ca8bf", "score": "0.54945314", "text": "makeText(numWords = 100) {\n\n let rand_key_func = random.uniformInt(0, this.words.length - 1);\n let rand_key_num = rand_key_func();\n let key = this.words[rand_key_num];\n\n let vals = null;\n\n let rand_val_func = null;\n let rand_val_num = null;\n let val = null;\n\n let retval = key;\n\n for (let i = 0; i < numWords; i++) {\n\n vals = [...this.map.get(key)];\n\n if (vals.length > 1) {\n\n rand_val_func = random.uniformInt(0, vals.length - 1);\n rand_val_num = rand_val_func();\n val = vals[rand_val_num];\n\n } else {\n\n val = vals[0];\n\n }\n\n if (val == null) {\n\n break;\n\n } else {\n\n retval += \" \" + val;\n\n }\n\n key = val;\n }\n\n return retval;\n }", "title": "" }, { "docid": "7cb8388264486fa10f4cf1d00f468599", "score": "0.5492486", "text": "newProcess(txt, all, dates) {\n var token = txt.toLowerCase();\n for (let i = 0; i < all.length; i++) {\n let str = all[i];\n if (str.includes(token)) {\n this.dict[str] = dates[i];\n this.keys.push(str);\n this.indices.push(i);\n }\n }\n }", "title": "" }, { "docid": "1c008fdc8df304f0f432f1d89f04374b", "score": "0.5489374", "text": "function makeWordGist() {\n \n /*\n pushes the code to the \n data obj to property wordGist\n */\n data.wordGist.push({\n name: prompt('name'),\n code: editor.getValue(),\n translated_code: data.code\n });\n\n}", "title": "" }, { "docid": "b2d54750a00f187aea9e2c4c51743f2c", "score": "0.5486924", "text": "constructor() {\n\n\t\t//@TODO\n\t\tthis.set1 = new Set(); //contains noiseWords\n\t\tthis.structure = new Map(); //Contains offical structure Map[Map]\n\t\tthis.set2 = new Set();\n\t}", "title": "" }, { "docid": "3e354ff3eb032215f3db59539b20fb4a", "score": "0.5467121", "text": "function addWords() {\n // clear existing word-section\n let wordSection = $(\"#word-section\")[0];\n // wordSection.innerHTML = \"\";\n //$(\"#typebox\")[0].value = \"\";\n var wll = wordList.length;\n\t let tword = parseFloat($(\"#tword\")[0].value);\n for (let i = 0; i < tword; i++) {\n // let words = wordList;\n let words = shuffle(wordList);\n let wordSpan = '<span>'+ words[i] +'</span>';\n // wordSection.innerHTML += wordSpan;\n }\n // mark first word as current-word\n // wordSection.firstChild.classList.add(\"current-word\");\n\n // mark last word with magic-box\n // let magicBox = document.createElement(\"DIV\");\n // magicBox.classList.add(\"magic-box\");\n // wordSection.appendChild(magicBox);\n}", "title": "" }, { "docid": "9fcb1f55f97f51aa5d314236b7ec4d01", "score": "0.546324", "text": "saveWords(tree = this.tree) {\n var tokens = [];\n var concatWithNext = false;\n var leaves = Parser.getLeaves(tree);\n for (let i = 0; i < leaves.length; i++) {\n if (concatWithNext) {\n if (leaves[i].root.includes(\"</w>\")) {\n concatWithNext = false;\n }\n tokens[tokens.length-1] = tokens[tokens.length-1].concat(leaves[i].root);\n }\n else {\n if (/<w id=\"w\\d+\">/.test(leaves[i].root) && !leaves[i].root.includes(\"</w>\")) {\n concatWithNext = true;\n }\n tokens.push(leaves[i].root);\n }\n }\n for (let token of tokens) {\n if (/^<w id=\\\"w\\d+\\\">(.+)<\\/w>$/g.test(token)) {\n this.words.push(/^<w id=\\\"w\\d+\\\">(.+)<\\/w>$/g.exec(token)[1])\n }\n }\n }", "title": "" }, { "docid": "117634926efde91b932d88c20059d8c0", "score": "0.5461961", "text": "function initializeMappings()\n{\n // Map bin->frequency and frequency->note\n for(var i=0; i<frequencyBinCount; i++)\n {\n var freq = binIndexToFrequency(i);\n bin_frequency_map.push(freq);\n frequency_note_map[freq] = frequencyToNote(freq);\n }\n // Map key no -> Note letter\n keys.forEach(function(x){\n key_no_to_note_letter_map[x[\"key_no\"]] = x[\"note\"];\n });\n // console.log(bin_frequency_map);\n // console.log(frequency_note_map);\n // console.log(key_no_to_note_letter_map);\n}", "title": "" }, { "docid": "84c7f4d6129276bbef4ac66344a9389c", "score": "0.5459328", "text": "function tercer() {\n let nom = \"CESAR\";\n let array = [];\n let contador;\n // Creamos el objeto map.\n let aMap = new Map();\n //Introduce en la array los carácteres del string 1 a 1.\n array = nom.split(\"\");\n let i;\n let j;\n //Recorre el array con \n for (i = 0; i < array.length; i++) {\n //Inicializa contador.\n contador = 0;\n //Comparamos si los elementos del array se repiten.\n for (j=0; j < array.length; j++) {\n //Si el elemento se repite incrementamos contador.\n if (array[j]==array[i]) {\n contador++\n }\n //Guardamos el elemento y el n veces que se repite en el map.\n aMap.set(array[i],contador);\n }\n \n }\n console.log(aMap);\n}", "title": "" }, { "docid": "f988cdb0e3b109192a2fc45097d75f8b", "score": "0.5449416", "text": "set normalMap(value) {}", "title": "" }, { "docid": "1550cc247b83e2df637b184fb5be7189", "score": "0.54372877", "text": "function wordOccurrences(strArr) {\n let words = new Map()\n for (let word of strArr) {\n let times = 1\n if (words.has(word)) {\n let currentTimes = words.get(word)\n let newTimes = currentTimes + times\n words.set(word, newTimes)\n } else {\n words.set(word, times)\n }\n }\n let sorted = Array.from(words).sort((a, b) => b[1] - a[1])\n for (let el of sorted) {\n console.log(`${el[0]} -> ${el[1]} times`)\n }\n}", "title": "" }, { "docid": "df6e958c714c6232ad448b5497f19966", "score": "0.5425605", "text": "function angrams(n){\nconst group={};\nvar word=n.map(n => n.toLowerCase().split('').sort());\n//console.log(Object.keys(word))\n\nword.forEach(function (word, index){\n group[word]=group[word] ||[];\n group[word].push(n[index]);\n});\n\nObject.keys(group).forEach(function(word, index){\n var combinate= group[word];\n if(combinate.length>1){ \n console.log(index + \" \" + combinate.join(' '));\n \n }\n});\n \n//console.log(group);\n}", "title": "" }, { "docid": "a8eda4480c1fad1d8e5c64cbe7042dac", "score": "0.5415839", "text": "makeText(numWords = 100) {\n let text = [];\n let numMappedWords = this.keys.length;\n let word;\n\n function startText(keys) {\n word = keys[randNum(numMappedWords)];\n let capword = word.charAt(0).toUpperCase() + word.slice(1);\n text.push(capword);\n }\n startText(this.keys);\n for (let i = 0; i < numWords - 1; i++) {\n let options = this.wordMap[word];\n word = options[randNum(options.length)];\n if (!word) {\n text.push(\". \");\n startText(this.keys);\n } else {\n text.push(word);\n }\n }\n // console.log(text.join(\" \"));\n return text.join(\" \");\n }", "title": "" }, { "docid": "3f3835c195458a1491de4f081dd1b8eb", "score": "0.54022974", "text": "function fillWordsFunc () { \n const initPikaWords = [\"Pikachu \", \"PIII...KAAAA...CHUUUU! \", \"Pikapi \", \"Pika \", \"Pika Pika \"];\n const fillPikaWords = [\"pikachu \", \"pikapi \", \"chu, \", \"piiiikapikapiiii \", \"chu pika chu, \", \"pika pi? \", \"pikachu! \", \"pika?! \", \"pikachu \", \"pi pikapi \"];\n const firstWord = initPikaWords[Math.floor(Math.random() * initPikaWords.length)];\n let fillWordsArr = [];\n for(let i = 0; i < 40; i++) {\n let pikaWord = fillPikaWords[Math.floor(Math.random() * fillPikaWords.length)];\n fillWordsArr.push(pikaWord);\n }\n let fillWords = fillWordsArr.join(\" \");\n let paragraph = firstWord + fillWords;\n return paragraph;\n}", "title": "" }, { "docid": "eb9fc68f6898acd2063e9b367ac7ff79", "score": "0.54007274", "text": "function setupWordBubbles(p, words) {\r\n\r\n}", "title": "" }, { "docid": "ee38d3a3a2cd5474298c25ab10d13280", "score": "0.5389943", "text": "add(text){cov_25grm4ggn6.f[1]++;cov_25grm4ggn6.s[4]++;if(!text){cov_25grm4ggn6.b[0][0]++;cov_25grm4ggn6.s[5]++;return this;}else{cov_25grm4ggn6.b[0][1]++;}cov_25grm4ggn6.s[6]++;if(text instanceof Vocabulary){cov_25grm4ggn6.b[1][0]++;cov_25grm4ggn6.s[7]++;return this.addVocabulary(text);}else{cov_25grm4ggn6.b[1][1]++;}//create a hash table of words and their frequency\ncov_25grm4ggn6.s[8]++;text.toString().match(/\\w+/g).forEach(word=>{cov_25grm4ggn6.f[2]++;cov_25grm4ggn6.s[9]++;this.addString(word.toLowerCase());});cov_25grm4ggn6.s[10]++;return this;}", "title": "" }, { "docid": "a2a867d462213eba56ef16f0c41ffede", "score": "0.5382025", "text": "function dictionary(content) {\n\tvar lines = content.split(\"\\n\");\n\t\n\t// TODO: file validation? i.e. no duplicates, no empty strings, etc.\n\tvar wordToFrequency = {};\n\tfor (var line of lines) {\n\t\tvar lineSep = line.split(\",\");\n\t\tif (lineSep.length == 2) {\n\t\t\twordToFrequency[lineSep[0]] = parseInt(lineSep[1]);\t\n\t\t}\n\t}\n\n\tthis.addText = function(text) {\n\t\ttext = filterText(text);\n\t\tfor (var word of text.split(\" \")) {\n\t\t\tif (word != \"\") {\n\t\t\t\tincrementWordFrequency(word);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.getWordFrequencies = function() {\n\t\treturn wordToFrequency;\n\t}\n\n\tthis.merge = function(dict) {\n\t\tfor (var word in dict.getWordFrequencies()) {\n\t\t\tif (word in wordToFrequency) {\n\t\t\t\twordToFrequency[word] = Math.max(wordToFrequency[word], dict.getWordFrequencies()[word]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\twordToFrequency[word] = dict.getWordFrequencies()[word];\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.save = function(filename) {\n\t\tvar fileString = \"\";\n\t\tfor (var word of getSortedWordList()) {\n\t\t\tvar wordFrequency = wordToFrequency[word];\n\t\t\tfileString += `${word},${wordFrequency}\\n`\n\t\t}\n\n\t\tfs.writeFileSync(filename, fileString, \"utf-8\");\n\t}\n\n\t// TODO: for a slight speed boost on the app, sort by the frequency instead\n\tfunction getSortedWordList() {\n\t\tvar words = [];\n\t\tfor (var word in wordToFrequency) {\n\t\t\twords.push(word);\n\t\t}\n\n\t\treturn words.sort();\n\t}\n\n\tfunction filterText(text) {\n\t\ttext = text.replace(/[.,\\/#!$%\\^&\\*;:{}=\\-_`~()\"@<>]/g,\"\")\n\t\t\t.replace(/\\n/, \" \")\n\t\t\t.replace(/\\s{2,}/g, \" \");\n\t\treturn text.toLowerCase();\n\t}\n\n\tfunction incrementWordFrequency(word) {\n\t\tif (!(word in wordToFrequency)) {\n\t\t\twordToFrequency[word] = 0;\n\t\t}\n\t\twordToFrequency[word] += 1;\n\t}\n}", "title": "" }, { "docid": "4a438d7736fd532f07fc309d565e35fc", "score": "0.5379579", "text": "function populateWord(pString){\n let result = [];\n //...\n return result;\n}", "title": "" }, { "docid": "af5ccd0904daf0c3291455fcd6b7df9e", "score": "0.5378858", "text": "words(content) {\n //@TODO\n let content_array = content.split(/\\s+/);\n const normalized_content = content_array.map((w)=>normalize(w));\n const words = normalized_content.filter((w) => !this.noise_w_set.has(w)); \n return words;\n }", "title": "" }, { "docid": "b8cde5e157ff9d5e51db5d8862dbcc1f", "score": "0.5376813", "text": "function createWordArray(word){ \n for (var i = 0; i < word.length; i++) {\n var letterData = new Letter (word[i]); //create new constructor object for each individual letter in word.\n lettersofWord[i] = letterData;//pass in new object into index of array\n }\n // console.log(lettersofWord);\n}", "title": "" }, { "docid": "7275ef3097645effddefd2ef49ac077d", "score": "0.53763306", "text": "function update_words(key_HTU) {\n\tthisword = Array(6);\n\tword_HTUs = '';\n\tfor(w = 0; w <= word_climb.length; w++) {\n\t\tword_HTUs = word_location[w];\n\t\tmatched = false;\n\t\tfor (letter=0; letter < 7; letter++) {\n\t\t\tif(key_HTU == word_HTUs[letter]) {\n\t\t\t\tmatched = true;\n\t\t\t}\n\t\t}\n\t\tif(matched) {\n\t\t\tfor (letter=0; letter < 7; letter++) {\n\t\t\t\ttmp1 = Key_HTU[letter];\n\t\t\t\ttmp2 = word_HTUs[letter];\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tthisword[0] = wordstring[0];\n\t\t\n\t}\n}", "title": "" }, { "docid": "c4b26514187a04625679cf2e25e13352", "score": "0.5376228", "text": "initializeDict(dict) {\n let dictHashTable = {};\n dict.forEach(word => {\n //check if key exists already\n let hash = this.hashWord(word);\n if (hash in dictHashTable) {\n //add word to possible results of this hash\n dictHashTable[hash].push(word);\n } else {\n //first time for this hash, add list with one item\n dictHashTable[hash] = [word];\n }\n })\n return dictHashTable;\n }", "title": "" }, { "docid": "a9b7daeba1ae8c7a28c1264c168c1ad1", "score": "0.5374055", "text": "addNoiseWords(noiseWords) {\n //@TODO\n const temp_w_noise = new Set();\n this.words(noiseWords).forEach(function(element) {\n \t\t\ttemp_w_noise.add(element);\n\t\t}); \t\n\t\t\n\t\tthis.noise_w_set = temp_w_noise;\n\t \n }", "title": "" }, { "docid": "76da38adbe988c6de7489c59d1e8b9f0", "score": "0.5372597", "text": "function createS(s){\r\n var w;\r\n for (i = 0; i < s.length; i++){\r\n if(s[i] != \"\"){\r\n getWords(s[i]);\r\n }\r\n }\r\n bun = tempBun;\r\n}", "title": "" }, { "docid": "580625ba35d767a0463e7a2140d811c7", "score": "0.53708625", "text": "function siteMap(){\n fill (0);\n textSize (40);\n text(\"Press the following keys to travel to each city\", 50, 75);\n textSize(28);\n text ('[1]- Milano', 175, 125);\n text ('[2]- Cinque Terre', 175, 175);\n text ('[3]- Firenze', 175, 225);\n text ('[4]-Montepulciano',175, 275);\n text ('[5]-Amalfi', 175, 325);\n\n textAlign(LEFT);\n textSize(40);\n text('Eat', width-width/2.5, 200);\n textSize(50);\n text('See', width-width/3, 250);\n textSize(60);\n text ('Love', width- width/3.5, 300);\n textSize(70);\n text ('Italy', width-width/4, 350);\n }", "title": "" }, { "docid": "29377b58e431cea7c5d794af762f1294", "score": "0.5366105", "text": "function Dictionary(words) {\n this.words = words;\n}", "title": "" }, { "docid": "001c3a5ba19ca47498e80f3f0f8d1b24", "score": "0.53639686", "text": "function getWords(i) {\n\t\t\treturn words[i]\n\t\t\t\t\t.replace(/[!\\.,:;\\?]/g, '')\n\t\t\t\t\t.split(' ')\n\t\t\t\t\t.map(function(d) {\n\t\t\t\t\t\treturn {text: d, size: 10 + Math.random() * 60};\n\t\t\t\t\t})\n\t\t}", "title": "" }, { "docid": "6364ea63a09846ea39c44f3971ae53a8", "score": "0.53563327", "text": "function anagramGrouping(strings){\n const map = new Map();\n\n strings.forEach(string => {\n let key = string.split('').sort().join('');\n //console.log(key);\n if (map.has(key)) {\n map.set(key, [...map.get(key),string]);\n } else {\n map.set(key, [string]);\n }\n });\n \n const result = [];\n \n map.forEach(value => result.push(value));\n \n return result;\n}", "title": "" }, { "docid": "6c0e5d76f696e4da3f4f10009de1127f", "score": "0.53470427", "text": "function loadWordData(data) {\n // Group word objects by filtering category:\n var words_data = {}; // Obj containing array of wordTables objects. Logging these will allow you see the word objects with all of their fields as populated by django.\n for (var i=0; i<data.length; i++) {\n var word = data[i];\n var pos = word.fields[\"part_of_speech\"];\n //if(word.fields[\"proper\"] == 1) {\n\n if(word.fields[\"proper\"] == 1) {\n //Reading the Proper column of the database to determine if there's a proper noun.\n pos = \"Proper_nouns\"\n //console.log(\"trying to make a proper noun in load word data\", word)\n\n }\n if(word.fields['stopword'] ==1){\n pos = 'stop_words'\n }\n // Add declension or conjugation to part of speech:\n if (pos == \"Noun\" || pos == \"Adjective\") {\n pos = pos+ (\"_\" + word.fields[\"decl\"]);\n }\n else if (pos == \"Verb\") {\n\t if (word.fields['conj'] != undefined) {\n pos = pos+ (\"_\" + word.fields[\"conj\"]);\n\t }\n\t}\n // Add word to existing POS array, else create a new array:\n if (words_data.hasOwnProperty(pos)) {\n words_data[pos].push(word);\n }\n else {\n words_data[pos] = [word];\n }\n }\n //console.log(\"WORDS_DATA\", words_data);\n return words_data;\n}", "title": "" } ]
afa65ab19c3cb373d3823c3d42fb384e
Set global variables from Chrome storage or set default values.
[ { "docid": "123de4d9b2749f05bbdacd376cfd1ccc", "score": "0.66880447", "text": "function setVariables() {\r\n chrome.storage.sync.get('language', function(data) {\r\n if (data.language == null ) {\r\n changeButton(\"englishButton\");\r\n chrome.storage.sync.set({\"language\": \"English\"});\r\n } else {\r\n var langStatus = findId(data.language);\r\n changeButton(langStatus);\r\n }\r\n });\r\n chrome.storage.sync.get('voice', function(data) {\r\n if (data.voice == null ) {\r\n changeButton(\"americanVoice\");\r\n chrome.storage.sync.set({\"voice\": \"US English Female\"});\r\n } else {\r\n var voiceStatus = findId(data.voice);\r\n changeButton(voiceStatus);\r\n }\r\n });\r\n chrome.storage.sync.get('control', function(data) {\r\n if (data.control == null ) {\r\n changeButton(\"controlOn\");\r\n chrome.storage.sync.set({\"control\": \"on\"});\r\n } else {\r\n var controlStatus = findId(data.control);\r\n changeButton(controlStatus);\r\n }\r\n });\r\n}", "title": "" } ]
[ { "docid": "58c21576e8bdc1cd27a806d281b155f4", "score": "0.63592935", "text": "function saveSettingsValues() {\n browser.storage.local.set({delayBeforeClean: document.getElementById(\"delayBeforeCleanInput\").value});\n\n browser.storage.local.set({activeMode: document.getElementById(\"activeModeSwitch\").checked});\n\n browser.storage.local.set({statLoggingSetting: document.getElementById(\"statLoggingSwitch\").checked});\n\n browser.storage.local.set({showNumberOfCookiesInIconSetting: document.getElementById(\"showNumberOfCookiesInIconSwitch\").checked});\n\n browser.storage.local.set({notifyCookieCleanUpSetting: document.getElementById(\"notifyCookieCleanUpSwitch\").checked});\n\n browser.storage.local.set({contextualIdentitiesEnabledSetting: document.getElementById(\"contextualIdentitiesEnabledSwitch\").checked});\n\n page.onStartUp();\n}", "title": "" }, { "docid": "16db38d64fd94fb226fb9c3168bc878f", "score": "0.6340742", "text": "static reset() {\n Preferences.preferenceCache = {};\n switch (RoKA.Utilities.getCurrentBrowser()) {\n case Browser.CHROME:\n chrome.storage.sync.remove(Object.keys(Preferences.defaults));\n break;\n }\n }", "title": "" }, { "docid": "16db38d64fd94fb226fb9c3168bc878f", "score": "0.6340742", "text": "static reset() {\n Preferences.preferenceCache = {};\n switch (RoKA.Utilities.getCurrentBrowser()) {\n case Browser.CHROME:\n chrome.storage.sync.remove(Object.keys(Preferences.defaults));\n break;\n }\n }", "title": "" }, { "docid": "091940e0a9b27df4d65a7ad589713637", "score": "0.633255", "text": "function setGlobals() {\n const env = (global || window);\n if (!env.hasOwnProperty(\"FormData\")) {\n env.FormData = require(\"form-data\");\n }\n if (!env.hasOwnProperty(\"fetch\")) {\n env.fetch = require(\"node-fetch\");\n }\n}", "title": "" }, { "docid": "92b04b3aa66991148a61e963b2856e6f", "score": "0.6330589", "text": "function loadPageVariables() {\r\n \"use strict\";\r\n var tmp = JSON.parse(localStorage.getItem('TrimpzSettings'));\r\n if (tmp !== null) {\r\n trimpzSettings = tmp;\r\n }\r\n}", "title": "" }, { "docid": "5ad2ee1fd80e6fa4b1b1229d6591f878", "score": "0.63102484", "text": "function getStorage() {\r\n chrome.storage.local.get(null, function (data) {\r\n\t\tdocument.getElementById(\"pi_uri_base\").defaultValue = data.pi_uri_base;\r\n document.getElementById(\"api_key\").defaultValue = data.api_key;\r\n document.getElementById(\"max_time\").defaultValue = data.max_time;\r\n });\r\n}", "title": "" }, { "docid": "dacd02e440a0e37753cf97bf7ac69297", "score": "0.63037735", "text": "function setGlobal(parameters) {\n\twindow[parameters.name] = parameters.value;\n}", "title": "" }, { "docid": "eb01db4b23f6d9f19c2b9cf84bc8b16a", "score": "0.629038", "text": "function setSavedOptions() {\n log('Getting saved options.');\n GM_setValue(\"opt_loggingEnabled\", opt_loggingEnabled);\n GM_setValue(\"opt_hidefedded\", opt_hidefedded);\n GM_setValue(\"opt_hidefallen\", opt_hidefallen);\n GM_setValue(\"opt_hidetravel\", opt_hidetravel);\n GM_setValue(\"opt_showcaymans\", opt_showcaymans);\n GM_setValue(\"opt_hidehosp\", opt_hidehosp);\n GM_setValue(\"opt_disabled\", opt_disabled);\n }", "title": "" }, { "docid": "513b280be73789997d7e1cad2ba3bd40", "score": "0.6278876", "text": "static set(key, value) {\n Preferences.preferenceCache[key] = value;\n switch (RoKA.Utilities.getCurrentBrowser()) {\n case Browser.CHROME:\n chrome.storage.sync.set(Preferences.preferenceCache);\n break;\n }\n }", "title": "" }, { "docid": "513b280be73789997d7e1cad2ba3bd40", "score": "0.6278876", "text": "static set(key, value) {\n Preferences.preferenceCache[key] = value;\n switch (RoKA.Utilities.getCurrentBrowser()) {\n case Browser.CHROME:\n chrome.storage.sync.set(Preferences.preferenceCache);\n break;\n }\n }", "title": "" }, { "docid": "1a60b0e4f2f589dbd665c3fcc624d89d", "score": "0.62508404", "text": "static setDefaultValuesInStorage() {\n localStorage.setItem('workSessionDuration', 25);\n localStorage.setItem('shortBreakDuration', 5);\n localStorage.setItem('longBreakDuration', 30);\n localStorage.setItem('numSessionsBeforeLongBreak', 4);\n localStorage.setItem('pauseBeforeBreak', false);\n localStorage.setItem('pauseAfterBreak', true);\n localStorage.setItem('hideSeconds', false);\n localStorage.setItem('muteAudio', false);\n localStorage.setItem('hideAlerts', false);\n }", "title": "" }, { "docid": "8dfc7ebe7fe238061e580a7139c948ac", "score": "0.62418014", "text": "set UseGlobal(value) {}", "title": "" }, { "docid": "dbfba9173655d061e99c2d5d59cafa8a", "score": "0.62343115", "text": "static initialise(callback) {\n Preferences.preferenceCache = {};\n switch (RoKA.Utilities.getCurrentBrowser()) {\n case Browser.CHROME:\n /* Get the Chrome cloud sync preferences stored for RoKA. */\n chrome.storage.sync.get(null, function (settings) {\n Preferences.preferenceCache = settings;\n if (callback) {\n callback();\n }\n });\n break;\n }\n }", "title": "" }, { "docid": "dbfba9173655d061e99c2d5d59cafa8a", "score": "0.62343115", "text": "static initialise(callback) {\n Preferences.preferenceCache = {};\n switch (RoKA.Utilities.getCurrentBrowser()) {\n case Browser.CHROME:\n /* Get the Chrome cloud sync preferences stored for RoKA. */\n chrome.storage.sync.get(null, function (settings) {\n Preferences.preferenceCache = settings;\n if (callback) {\n callback();\n }\n });\n break;\n }\n }", "title": "" }, { "docid": "786238eb5077bbd26ef04503b25debf1", "score": "0.62085307", "text": "function loadPageVariables() {\n var tmp = JSON.parse(localStorage.getItem('autoTrimpSettings'));\n if (tmp !== null) {\n autoTrimpSettings = tmp;\n }\n}", "title": "" }, { "docid": "775217f32217316249b7f95431f40834", "score": "0.6102311", "text": "function init_setup(){\n // TODO: Manage active sessions over different windows\n var init_active = {};\n var last_open = {};\n var init_saved = [];\n\n sessionData = {\n active_session: init_active, \n saved_sessions: init_saved, \n previous_tabs: last_open,\n };\n console.log(JSON.stringify(sessionData));\n\n storage.set({'sessionData': JSON.stringify(sessionData)}, function() {\n console.log(\"Initial data successfully saved.\");\n });\n\n}", "title": "" }, { "docid": "c375f60df280bf58c3e2fdb8f8cfc47f", "score": "0.6065889", "text": "function setGlobalVariables() {\n officeName = officeLoc[beach].name;\n beachID = officeLoc[beach].beachID;\n weatherID = officeLoc[beach].weatherID;\n officeLatCoord = officeLoc[beach].lat;\n officeLonCoord = officeLoc[beach].lon;\n transit = officeLoc[beach].transit;\n videoLetterboxed = officeLoc[beach].videoLetterboxed;\n measurements = homeOfficeInfo[0].measurements;\n\n if (measurements === english) {\n heightUnit = 'ft';\n surflineVar = 'e';\n tempUnit = 'f';\n } else if (measurements === metric) {\n heightUnit = 'm';\n surflineVar = 'm';\n tempUnit = 'c';\n }\n}", "title": "" }, { "docid": "7c56b90cbc68b881b2b411e351a14fa7", "score": "0.6065197", "text": "function onLoad(){\n\tconsole.log('Setting Default Values');\n\tchrome.storage.sync.get('monitor', function(value){\n\t\tvar currentStatus = value['monitor'];\n\t\tif(currentStatus === undefined || currentStatus == 'inactive' ){\n\t\t\tmonitorButton.value = 'Monitor';\n\t\t}else{\n\t\t\tmonitorButton.value ='Monitor Enabled';\n\t\t}\n\t});\n\n\tchrome.storage.sync.get('autologout', function(value){\n\t\tvar currentStatus = value['autologout'];\n\t\tif(currentStatus === undefined || currentStatus == 'inactive' ){\n\t\t\tautologoutButton.value = 'Auto Logout';\n\t\t}else{\n\t\t\tautologoutButton.value ='Auto Logout Enabled';\n\t\t}\n\t});\n}", "title": "" }, { "docid": "445da5d0fb60520a9f7c6e4a55f695c0", "score": "0.6051177", "text": "function setGlobalVars() {\n\t\t\t/**\n\t\t\t * Is the mobile view being displayed\n\t\t\t */\n\t\t if( $( '#mobile-nav-icon' ).css( \"display\" ) == 'none' ) {\n\t\t \t\tmobileView = false;\n\t\t \t} else {\n\t\t\t \tmobileView = true;\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Toggle the mobile menu depending on whether the mobile view is being displayed.\n\t\t\t */\n\t\t\tif( mobileView ) {\n\t\t\t\t$( '#mobile-nav-dropdown' ).hide();\t\n\t\t\t} else {\n\t\t\t\t$( '#mobile-nav-dropdown' ).show();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3f5604f385179896338be12f845a7f00", "score": "0.60497624", "text": "function setDefaultPrefs() {\r\n console.debug(\"setDefaultPrefs CP1\");\r\n let branch = Services.prefs.getDefaultBranch(PREF_BRANCH);\r\n for (let key of Object.keys(PREFS)) {\r\n let val = PREFS[key];\r\n console.debug(\"setDefaultPrefs CP2: key=\" + key + \" val=\" + val);\r\n switch (typeof val) {\r\n case \"boolean\":\r\n branch.setBoolPref(key, val);\r\n break;\r\n case \"string\":\r\n branch.setCharPref(key, val);\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "fe05e77c8e093283112204d2a9d89aed", "score": "0.597048", "text": "function LocalSettingStorage() {\n}", "title": "" }, { "docid": "5298acd896d16e1b078eec1d9bf5137e", "score": "0.59369445", "text": "function restore_options() {\n chrome.storage.local.get(null, function(items) {\n const fetchedValues = Object(items);\n document.querySelector(\"#localserverid\").value = fetchedValues.local_server_id || null;\n document.querySelector(\"#remoteserverid\").value = fetchedValues.remote_server_id || DEFAULT_MYOPENHAB_URL;\n document.querySelector(\"#pathid\").value = fetchedValues.path_id || DEFAULT_PATH;\n document.querySelector(\"#widthid\").value = fetchedValues.width_id || DEFAULT_WIDTH;\n document.querySelector(\"#heightid\").value = fetchedValues.height_id || DEFAULT_HEIGHT;\n });\n}", "title": "" }, { "docid": "3044f312ca0549aa0115c94345d86188", "score": "0.5924922", "text": "function syncDefinitions() {\n // Save it using the Chrome extension storage API.\n chrome.storage.sync.set({'count': Object.keys(allVars).length});\n}", "title": "" }, { "docid": "b3ddd32852d82288095554def14184ae", "score": "0.5902929", "text": "function update_Prefs() {\r\n let prefs = {\r\n //string aString: document.getElementById(\"aNumber\").value\r\n //integer aNumber: parseInt(document.getElementById(\"aNumber\").value, 10)\r\n //boolean aboolean: document.getElementById(\"aboolean\").checked\r\n\r\n localOnly: document.getElementById(\"localOnly\").checked,\r\n spf_slider: document.getElementById(\"spf_slider\").value,\r\n tz_slider: document.getElementById(\"tz_slider\").value,\r\n bl_slider: document.getElementById(\"bl_slider\").value,\r\n origin_slider: document.getElementById(\"origin_slider\").value,\r\n api_slider: document.getElementById(\"api_slider\").value,\r\n needed_score_slider: document.getElementById(\"needed_score_slider\").value\r\n };\r\n browser.storage.local.set({\"Prefs\": prefs});\r\n}", "title": "" }, { "docid": "b39597543d454aa7105f82eb7ae8df74", "score": "0.589563", "text": "function updateStoredSettings() {\n let settings = {}\n document.querySelectorAll('div[class^=\"gymContent\"] input[type=\"checkbox\"]').forEach(checkbox => settings[checkbox.name] = checkbox.checked);\n\n GM_setValue('gymTabHiderSettings', settings);\n}", "title": "" }, { "docid": "7dcb3f0a8c040d16e6440c519a38e704", "score": "0.58860546", "text": "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n ns_server: '',\n ns_username: \"\",\n ns_password: \"\",\n zd_server: '',\n zd_username: \"\",\n zd_password: \"\"\n }, function(items) {\n document.getElementById('server').value = items.ns_server;\n document.getElementById('username').value = items.ns_username;\n document.getElementById('password').value = items.ns_password;\n document.getElementById('zdserver').value = items.zd_server;\n document.getElementById('zdusername').value = items.zd_username;\n document.getElementById('zdpassword').value = items.zd_password;\n });\n}", "title": "" }, { "docid": "3366fb33486ec54f2b76fae5d77036c0", "score": "0.58729464", "text": "function initialize() {\r\n browser.storage.local.get().then((conf) => {\r\n config = conf;\r\n toggleCacheListener();\r\n reloadIcon();\r\n });\r\n}", "title": "" }, { "docid": "826d420eee52ce834a22b55a8ef3c363", "score": "0.58663315", "text": "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({ settings: \n {\n targethost: '127.0.0.1',\n targetport: '9666',\n targetproto: 'http',\n targetuser: \"\",\n targetpasswd: \"\"\n\n }\n }, function(storage) {\n console.log(storage.settings)\n document.getElementById('targethost').value = storage.settings.targethost;\n document.getElementById('targetport').value = parseInt(storage.settings.targetport);\n document.getElementById('targetproto').value = storage.settings.targetproto;\n document.getElementById('targetuser').value = storage.settings.targetuser;\n document.getElementById('targetpasswd').value = storage.settings.targetpasswd;\n });\n}", "title": "" }, { "docid": "bdfffee3eda1c2f9d7bebf4773619efe", "score": "0.58468026", "text": "function restore_options() {\n\n chrome.storage.local.get(null, function (result) {\n\n document.getElementById('wpmSetting').value = result.rapidReadWPM;\n document.getElementById('chunkSizeSetting').value = result.rapidReadChunkSize;\n \n});\n}", "title": "" }, { "docid": "4656e7c52fce47633ddc497d2f4c5922", "score": "0.5843695", "text": "function loadPreferencesOnStartup() {\n\t\tthis.language = this.setLanguage();\n\t\tthis.dictionary = window['lang_' + this.language];\n\t\tthis.routingLanguage = this.setRoutingLanguage();\n\t\tthis.distanceUnit = this.setDistanceUnit();\n\t\tthis.version = this.setVersion();\n\n\t\t//return GET variables that have to be applied to other objects\n\t\treturn readGetVars();\n\t}", "title": "" }, { "docid": "53789c79163e0e908daed6d3273b7ec6", "score": "0.58301723", "text": "function loadDefaultPreferences() {\n \tfor (var key in defaultPreferences) {\n \t\t// Skip this ones.\n \t\tif (/firstrun|version|updatechecktime/.test(key))\n \t\t\tcontinue;\n\n \t\tpref.setPref(key, defaultPreferences[key]);\n \t}\n\n \tlog.info(\"prefs:\",\n \t\t\"Preferences are (re)setted to default values.\"\n \t);\n }", "title": "" }, { "docid": "8ec5671aff026ccf85beb7d5dd494777", "score": "0.58113164", "text": "function loadUserPreferences(){\n\t\toptions = getUserPreferences();\n\t}", "title": "" }, { "docid": "f19b21702e51eedf698f7196d965a02e", "score": "0.58090925", "text": "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n wpt_base_url: \"http://www.webpagetest.org/\"\n }, function(items) {\n document.getElementById('wpt_base_url').value = items.wpt_base_url;\n document.getElementById('wpt_base_url').disabled = false;\n });\n}", "title": "" }, { "docid": "972b50f93270b70876ffe1e596fc6524", "score": "0.5807911", "text": "function set_basic_settings(){ \r\n var saved_settings=[\"USERNAME\", \"RACE\",\r\n \r\n \"SPECIAL_LOCATIONS\",\"VILLAGES\",\"USE_TIMELINE\",\"USE_ALLY_LINES\",\r\n \"USE_CUSTOM_SIDEBAR\",\"USE_MARKET_COLORS\",\"USE_ENHANCED_RESOURCE_INFO\",\r\n \"USE_EXTRA_VILLAGE\",\"USE_SERVER_TIME\",\"USE_DEBUG_MODE\", \r\n \"SHOW_TIMELINE_REPORT_INFO\", \"COLLAPSE_TIMELINE\",\r\n \r\n \"TIMELINE_SIZES_HISTORY\",\"TIMELINE_SIZES_FUTURE\", \"TIMELINE_DISTANCE_HISTORY\",\r\n \"TIMELINE_SIZES_HEIGHT\", \"TIMELINE_SIZES_WIDTH\", \"TIME_DIFFERENCE\",\r\n \"TIMELINE_COLLAPSED_WIDTH\", \"TIMELINE_COLOR\", \"KEEP_TIMELINE_UPDATED\",\r\n \"TIMELINE_SCALE_WARP\",\r\n\r\n \"BUILDING_COLOR\", \"ATTACK_COLOR\", \"REPORT_COLOR\",\r\n \"MARKET_COLOR\", \"RESEARCH_COLOR\", \"PARTY_COLOR\"\r\n ];\r\n\r\n for (i in saved_settings) {\r\n var v = saved_settings[i];\r\n x = GM_getValue(prefix(v)); \r\n if (x!==undefined && x!==\"\") {\r\n try {\r\n eval(v+\"=\"+x);\r\n } catch (e) {\r\n eval(v+\"=x\"); \r\n }\r\n }\r\n }\r\n TIMELINE_EVENT_COLORS = [BUILDING_COLOR, ATTACK_COLOR, REPORT_COLOR, MARKET_COLOR, RESEARCH_COLOR, PARTY_COLOR];\r\n }", "title": "" }, { "docid": "ffc0779ac65e5be14eb95d17b2f904a4", "score": "0.5799023", "text": "function save_options() {\n\tsetLocal(\"sense_facebook\");\n\tsetLocal(\"sense_google\");\n\tsetLocal(\"sense_twitter\");\n\tsetLocal(\"sense_youtube\");\n\tsetLocal(\"sense_4Chan\");\n\tsetLocal(\"sense_selector\");\n\tsetLocal(\"sense_color\");\n\tcheckAPI();\n}", "title": "" }, { "docid": "fec411167bcc0d49725fbf702654ceb2", "score": "0.5796246", "text": "function setDefaults() {\n\tconfig.all = {\n\t\ttitleStyle: {\n\t\t\t'font-src': 'http://fonts.googleapis.com/css?family=Chango',\n\t\t\t'font-family': 'Chango, cursive',\n\t\t\t'color': '#000000',\n\t\t\t'font-size': '48px'\n\t\t},\n\t\ttimerStyle: {\n\t\t\t'background-color': '#32cd32',\n\t\t\t'font-src': 'http://fonts.googleapis.com/css?family=Chango',\n\t\t\t'font-family': 'Chango, cursive',\n\t\t\t'color': '#000000',\n\t\t\t'font-size': '48px'\n\t\t},\n\t\ttimers: [],\n\t\twindowSettings: {\n\t\t\twidth: 650,\n\t\t\theight: 350\n\t\t},\n\t\tusername: '',\n\t\tpassword: '',\n\t\tchannel: '',\n\t\tidInc: 0,\n\t\tactiveID: null\n\t}\n}", "title": "" }, { "docid": "0334d19c3651632b9226fb25f8b6e698", "score": "0.5782745", "text": "function restore_options() {\n\tchrome.storage.sync.get(\n\t{\n\t\taddress: 'address',\n\t\tport: 'port',\n\t\tlogin: 'login',\n\t\tpassword: 'password'\n\t}, \n\tfunction(items) {\n\t\tdocument.getElementById('address').value = items.address;\n\t\tdocument.getElementById('port').value= items.port;\n\t\tdocument.getElementById('login').value = items.login;\n\t\tdocument.getElementById('password').value= items.password;\n\t});\n}", "title": "" }, { "docid": "5750cc121f9f61b4e61b2a7185293602", "score": "0.5782719", "text": "function initSettings() {\n\t\tns.settings.exampleSetting = 1337;\n\t}", "title": "" }, { "docid": "d13120d1565a18c578ab58972336783f", "score": "0.5780521", "text": "function setHost() {\r\n window.localStorage.setItem(\"type\", \"host\");\r\n}", "title": "" }, { "docid": "fbec405b2484eb3f54ef2d51101af3c9", "score": "0.57795507", "text": "function savePrefs()\n{\n let preferences = collatePrefs( prefs );\n browser.storage.local.set({\"preferences\": preferences});\n}", "title": "" }, { "docid": "45ba26cce3e24a23189dee22603abd12", "score": "0.5765902", "text": "function test(){\n\ttesting(globalval);\n\twriting(globalval);\n\tchrome.storage.sync.set({'Enabled': globalval, 'Blur_Strength': 5, 'Choice': \"Blur Iggy's Images\", 'Substitute': \"Igloo Australia\"});\n}", "title": "" }, { "docid": "0edd641f27964e9faada15a4bb728bc5", "score": "0.57609314", "text": "function updateGlobalParamsWithValuesFromStorage(params) {\n if (!analytics.util.isBrowserSupportWebStorage()) {\n return;\n }\n\n var globalParamList = analytics.configuration.getGlobalParamList();\n for (var i = 0; i < globalParamList.length; i++) {\n var globalParamName = globalParamList[i];\n var storedParam = getGlobalParamFromStorage(globalParamName);\n if (typeof params[globalParamName] == \"undefined\"\n && storedParam != null) {\n params[globalParamName] = storedParam;\n }\n }\n }", "title": "" }, { "docid": "556da7945279d2ffa747e8c5eafc1143", "score": "0.575475", "text": "function saveToStorage(){\n\tchrome.storage.sync.set(settings);\n}", "title": "" }, { "docid": "4acd81c63ef7e588af2009a60a2ce351", "score": "0.57484007", "text": "function saveSettings() {\n\n chrome.storage.local.set({\n\n words: wordArray,\n pages: pagesArray\n\n }, function() {\n\n \t//**********************************\n\t// OPTIONS SAVED INTO LOCAL STORAGE\n\t//**********************************\n\n });\n\n}", "title": "" }, { "docid": "c27f3f29f9334e7ebc121449484b067e", "score": "0.5743374", "text": "function restore_options() {\r\n chrome.storage.sync.get({\r\n hostname: 'localhost',\r\n port_number: 8888,\r\n debug_mode: false\r\n }, (items) => {\r\n document.getElementById('hostname').value = items.hostname;\r\n document.getElementById('port-number').value = items.port_number;\r\n document.getElementById('debug-mode').checked = items.debug_mode;\r\n });\r\n}", "title": "" }, { "docid": "01c36be60030c6bb3e56580cc468bc78", "score": "0.5741543", "text": "function _updateGlobals() {\n let globalVars = last(globalsToUseStack);\n for (let obj of allGlobalsRequested) {\n for (let key of Object.keys(obj)) {\n obj[key] = globalVars[key];\n }\n }\n}", "title": "" }, { "docid": "72f3b0938917a91449d07da3a8b18723", "score": "0.5727887", "text": "function setFromLocal () {\n _.each(settings, (v, k) => {\n var value = localStorage.getItem(k);\n if (value) {\n settings[k] = JSON.parse(value);\n }\n });\n}", "title": "" }, { "docid": "3ead17e4f45a718887521fdd24f05007", "score": "0.57162344", "text": "function setTextBoxDefaults(deploy) {\n \n //Function to extract the values stored in local storage\n function callback(tabs) {\n\n //Get either the SaaS tenant ID or the Managed environment ID from local storage\n let currentTab = tabs[0]; \n tenant = getTenantId(currentTab.url, deploy); \n console.log(\"retrieving values for \" + tenant);\n\n //Using the ID above extract the values from local storage\n chrome.storage.local.get([tenant], function(result) {\n \n //If there are no values stored, then set the text fields to blank\n if(result[tenant] != undefined) {\n if (result[tenant].api_key == null && result[tenant].api_key == \"\") {\n document.getElementById(\"api_key\").value = \"\";\n } else {\n document.getElementById(\"api_key\").value = result[tenant].api_key;\n }\n\n if (result[tenant] == undefined && result[tenant].tag_filter_key == null) {\n document.getElementById(\"tag_filter_key\").value = \".*\";\n } else {\n document.getElementById(\"tag_filter_key\").value = result[tenant].tag_filter_key;\n }\n\n if (result[tenant] == undefined && result[tenant].tenant_color == null) {\n document.getElementById(\"tenant_color\").value = \"#000000\";\n } else {\n document.getElementById(\"tenant_color\").value = result[tenant].tenant_color;\n }\n }\n }); \n } \n \n //Query the local storage and start the functionality\n chrome.tabs.query(query, callback);\n}", "title": "" }, { "docid": "a86101f95cfcb801d6d7f009c68c60e7", "score": "0.5715682", "text": "function restore_options() {\n chrome.storage.local.get({\n host: 'http://localhost',\n port: 5800,\n PIN: 1234\n }, function (items) {\n document.getElementById('hostadd').value = items.host;\n document.getElementById('port').value = items.port;\n document.getElementById('PIN').value = items.PIN;\n });\n}", "title": "" }, { "docid": "e280430fdd57c70ea079d3cdc6198613", "score": "0.5694309", "text": "function clearGlobalsVariables(){\n\tglobalFileName = null;\n\tglobalFileContent = null;\n\tglobalFileMimeType = null;\n\tglobalFilePath = null;\n\tglobalFileExtension = null;\n}", "title": "" }, { "docid": "b0f7307cd314962c718c09a70b9b2aac", "score": "0.56831306", "text": "function initialise() {\n\n\tchrome.storage.local.get({\n\n\t words: [],\n\t pages: [],\n\t defaultWord: false,\n\t customWords: true,\n\t imageSensoring: true\n\n\t}, function(items) {\n\n\t \t// Set local variables to the stored values\n\t \twordArray = items.words;\n\t \tpagesArray = items.pages;\n\n\t \t// Loop thorugh all words\n\t \tfor (var word in wordArray) {\n\n\t \t\t// Create a word cell\n\t\t\tcreateWordCell(wordArray[word]);\n\n\t \t}\n\n\t \t// Loop thorugh all pages\n\t \tfor (var page in pagesArray) {\n\n\t \t\t// Create a page cell\n\t\t\tcreatePageCell(pagesArray[page]);\n\n\t \t}\n\n\t \t// Set the value of the default words switch\n\t \tdocument.getElementById('generalSettings1').checked = items.defaultWord\n\t \tdocument.getElementById('generalSettings2').checked = items.imageSensoring\n\n\t});\n\n}", "title": "" }, { "docid": "875d680139b78fd38132f08bb83ff4d7", "score": "0.56791806", "text": "function setDefaults(){\n // Default debug email from current user\n if(userProp.getProperty(g_debugEmail_key) === null)\n userProp.setProperty(g_debugEmail_key, Session.getActiveUser().getEmail());\n\n // Default debug state\n if(userProp.getProperty(g_debug_key) === null)\n userProp.setProperty(g_debug_key, g_debug_val);\n}", "title": "" }, { "docid": "d29845fa04f93b2b0300efc32cc7f170", "score": "0.56752205", "text": "function restore_options() {\n chrome.storage.sync.get({\n definitionsCheckbox: 0,\n examplesCheckbox: 0,\n windowWidth: 1024,\n windowHeight: 768\n }, function (items) {\n document.getElementById('definitionsCheckbox').checked = items.definitionsCheckbox;\n document.getElementById('examplesCheckbox').checked = items.examplesCheckbox;\n document.getElementById('windowWidth').value = items.windowWidth;\n document.getElementById('windowHeight').value = items.windowHeight;\n });\n}", "title": "" }, { "docid": "45e2454fb38e4378e749bb73b6a66cd3", "score": "0.5674096", "text": "function loadLocalSettings() {\n if (typeof (window.localStorage) === 'undefined') {\n console.log(\"Local settings cannot be saved. No web storage support!\");\n return;\n }\n\n if (typeof (localStorage.favoritePresets) !== 'undefined' && localStorage.favoritePresets !== null) {\n favoritePresetID = JSON.parse(localStorage.favoritePresets);\n console.log(\"Loading Parameter [localStorage.favoritePresets]:\");\n console.log(favoritePresetID);\n }\n\n if (typeof (localStorage.currentAddress) !== 'undefined' && localStorage.currentAddress !== null) {\n address = localStorage.currentAddress;\n console.log(\"Loading Parameter [localStorage.currentAddress]:\");\n console.log(address);\n }\n}", "title": "" }, { "docid": "0641cd49962fff078d914b872300fcdf", "score": "0.5665902", "text": "function setDefaultOptions()\n{\n function defaultOptionValue(opt, val)\n {\n if(!(opt in localStorage))\n localStorage[opt] = val;\n }\n\n defaultOptionValue(\"shouldShowIcon\", \"true\");\n defaultOptionValue(\"shouldShowBlockElementMenu\", \"true\");\n\n removeDeprecatedOptions();\n}", "title": "" }, { "docid": "41b44dde3ca755296677a066e03ed22a", "score": "0.5648487", "text": "function setPref(id,p) {\n\n\tif (id === \"mtd_core_theme\") {\n\t\treturn;\n\t}\n\n\tif (exists(store)) {\n\t\tstore.set(id,p);\n\t} else {\n\t\tlocalStorage.setItem(id,p);\n\t}\n\n\tif (debugStorageSys)\n\t\tconsole.log(\"setPref \"+id+\" to \"+p);\n}", "title": "" }, { "docid": "90bfafb4a00c3f620fd7ddb19d355d98", "score": "0.5643731", "text": "function init() {\n console.log('options.js init');\n\n $('#saveButton').on('click', saveData);\n $('#initWithPresetsButton').on('click', initWithPresets);\n\n chrome.storage.local.get(['groups'], function(result) {\n console.log('load result');\n if (result && result.groups) {\n groups = JSON.parse(result.groups);\n } else {\n console.log('no groups loaded from chrome.storage');\n }\n initSettingsFields();\n });\n}", "title": "" }, { "docid": "9d7e9b07a949660dad35a591f8e4c5ab", "score": "0.564368", "text": "function initDomStorage(value) {\n window.localStorage.setItem('foo', 'local-' + value);\n window.sessionStorage.setItem('bar', 'session-' + value);\n}", "title": "" }, { "docid": "2cf2efdffb5218ceae4455c0c181f8bd", "score": "0.5639966", "text": "function loadOptions() {\n chrome.storage.sync.get(['project', 'user'], function(items) {\n if (!chrome.runtime.error) {\n document.getElementById('project').value = (items.project) ? items.project : '';\n document.getElementById('user').value = (items.user) ? items.user : '';\n }\n });\n}", "title": "" }, { "docid": "06c351ce7527bc44a5820acbcc94bb8b", "score": "0.56343883", "text": "function getOrInitPref(name,default_value) {\r\n\t\tvalue = GM_getValue(name);\r\n\t\tif (value == undefined) {\r\n\t\t\tGM_setValue(name,default_value);\r\n\t\t\treturn default_value;\r\n\t\t}\r\n\t\telse { return value; }\r\n\t}", "title": "" }, { "docid": "0cc6f89d0dabb4370c301bedd6e29ce4", "score": "0.56328464", "text": "createBaseVars() {\n this.defaultList().forEach(name => {\n this.setVar(name.replace(`--default`, ''), this.getVar(name));\n });\n }", "title": "" }, { "docid": "b9acc823d75d6d464b6c0a60e9818a64", "score": "0.5630241", "text": "function syncToStorage() {\n\tvar settings_object = {};\n\tObject.keys(localStorage).forEach(function(key) {\n\t\tsettings_object[key] = localStorage[key];\n\t});\n\tchrome.storage.sync.set(settings_object);\n}", "title": "" }, { "docid": "4f7826a88e7792bf7d1189b383fcc4a7", "score": "0.562971", "text": "function loadOptions() {\n chrome.storage.sync.get(\"settings\", function(items) {\n loadSetting(items.settings.timerLength, 'time', 300);\n loadSetting(items.settings.tabGoal, 'tabGoal', 10);\n loadSetting(items.settings.tabLimit, 'tabLimit', 15);\n });\n}", "title": "" }, { "docid": "841a64af0b5d83f293dec6d6f2d70753", "score": "0.562685", "text": "function restore_options() {\n\t\n\t// Use default value of true for all and none for blacklist\n\tchrome.storage.sync.get({\n\t\tvisitThreshold: \t3,\t\n\t\tpageVisitThreshold: 9, \t\t//--\n\t\ttypedWeight: \t\t2, \t\t//--\n\t\ttimeThreshold: \t\t28,\t\n\t\tignoreList: \t\t\"\",\t\n\t\tcheckFrequency: \t5,\t\t//---\n\t\ttimeRounding: \t\t1,\t\t//---\n\t\tnewZero: \t\t\t4,\t\t//---\n\t\ttrackAfter: \t\t\"00:00\",//---\n\t\ttrackBefore: \t\t\"23:59\",//---\n\t\tautoNotifications: \tfalse, \t//---\n\t\tautoCount: \t\t\t20, \t//---\n\t\trejectedThreshold: \t3 \t\t//---\n\t}, function(items) {\n\t\t\n\t\tdocument.getElementById('visitThresholdSite').value\t\t= items.visitThreshold;\n\t\tdocument.getElementById('visitThresholdPage').value\t\t= items.pageVisitThreshold; //--\n\t\tdocument.getElementById('typedWeight').value \t\t\t= items.typedWeight; \t\t//--\n\t\tdocument.getElementById('timeThreshold').value \t\t\t= items.timeThreshold;\n\t\tdocument.getElementById('blacklist').value \t\t\t\t= items.ignoreList;\n\t\tdocument.getElementById('checkFrequency').value \t\t= items.checkFrequency;\n\t\tdocument.getElementById('timeRounding').value \t\t\t= items.timeRounding;\n\t\tdocument.getElementById('newZero').value \t\t\t\t= items.newZero;\t\t\t//----\n\t\tdocument.getElementById('trackAfter').value \t\t\t= items.trackAfter;\t\t\t//---\n\t\tdocument.getElementById('trackBefore').value \t\t\t= items.trackBefore;\t\t//---\n\t\tdocument.getElementById('autoNotifications').checked \t= items.autoNotifications; \t//--\n\t\tdocument.getElementById('autoCount').value \t\t\t\t= items.autoCount;\t\t\t//---\n\t\tdocument.getElementById('rejectedThreshold').value \t\t= items.rejectedThreshold;\t//---\n\t});\n}", "title": "" }, { "docid": "65ff3b5ecdaf1effe2d1dbf2c96951eb", "score": "0.56259686", "text": "function initBackground() {\n // Check config, init sequences\n chrome.storage.local.get(null, function(items) {\n\n // Get local strage, if undefined, Set default values\n let myLocation = items.myLocation || 'APAC';\n let instanceKeys = items.instanceKeys || ['AP0', 'CS5'];\n let intervalMin = items.intervalMin || '60';\n\n // Restore(Init) Configs\n chrome.storage.local.set({\n 'myLocation': myLocation,\n 'instanceKeys': instanceKeys,\n 'intervalMin': intervalMin,\n }, function() {\n\n // Init Instance List\n updateInstances();\n\n // Init Trust Data\n updateTrust();\n\n // Setup New-Timer\n resetUpdateTrustTimer();\n });\n });\n}", "title": "" }, { "docid": "6575e4e9f675cc157e76f96b3d6ffcef", "score": "0.5622287", "text": "function setupStorage(){\n\t\tif(localStorage['addressBook'] === undefined){\n\t\t\tlocalStorage['addressBook'] = '';\n\t\t}\n\t\tif(localStorage['orgBook'] === undefined){\n\t\t\tlocalStorage['orgBook'] = '';\n\t\t}\n\t}", "title": "" }, { "docid": "372b09b2b15758289ebb4b36aad161f3", "score": "0.5614486", "text": "function fillInSettings() {\n chrome.storage.sync.get(['bigbluebutton_settings', 'settings_time'], result => {\n document.getElementById('gl-url').value = result.bigbluebutton_settings.gl_url;\n });\n }", "title": "" }, { "docid": "c69f8d13e025582ba3c90829f0bdcb1f", "score": "0.56077164", "text": "async function init() {\n // re use value from last time it was set\n let { value } = browser.local.storage.get('value');\n // if first time then value is set to 0\n if (!value) {\n value = 0;\n }\n input.value = value;\n // once we get it from storage now adjust value\n setValue(value);\n}", "title": "" }, { "docid": "1fa9721e298b1a17e04cfc466c114d50", "score": "0.5606709", "text": "function restoreOptions() {\r\n try {\r\n var api = chrome || browser;\r\n api.storage.sync.get(null, (res) => {\r\n document.querySelector(\"#voice\").value = res.voice || getFirstVoice();\r\n document.querySelector(\"#speed\").value = res.speed || 1;\r\n document.querySelector(\"#pitch\").value = res.pitch || 1;\r\n document.querySelector(\"#colorBackground\").value =\r\n res.colorBackground || \"light\";\r\n restoreColor();\r\n document.querySelector(\"#fontSize\").value = res.fontSize || \"medium\";\r\n\t restoreFontSize();\r\n if (\r\n res.experimentalMode &&\r\n res.definiteArticleCheck &&\r\n res.definiteArticleColor\r\n ) {\r\n colorDefiniteArticles(res.definiteArticleColor);\r\n }\r\n if (\r\n res.experimentalMode &&\r\n res.indefiniteArticleCheck &&\r\n res.indefiniteArticleColor\r\n ) {\r\n colorIndefiniteArticles(res.indefiniteArticleColor);\r\n }\r\n if (res.experimentalMode && res.eclipseMode) {\r\n eclipseMode();\r\n }\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n}", "title": "" }, { "docid": "a471b182586044389d094430c07bf6f1", "score": "0.5605609", "text": "function saveLocalSettings() {\n if (typeof (window.localStorage) === 'undefined') {\n console.log(\"Local settings cannot be saved. No web storage support!\");\n return;\n }\n\n localStorage.favoritePresets = JSON.stringify(favoritePresetID);\n console.log(\"Saving Parameter [localStorage.favoritePresets]:\");\n console.log(localStorage.favoritePresets);\n\n localStorage.currentAddress = address;\n console.log(\"Saving Parameter [localStorage.currentAddress]:\");\n console.log(localStorage.currentAddress);\n}", "title": "" }, { "docid": "c3bafdd2a584970f57b0e065431abe89", "score": "0.5603971", "text": "function load_settings() {\n chrome.storage.local.get(usedKeys, function (result) {\n enabled.checked = result[usedKeys[0]];\n interval.value = result[usedKeys[1]];\n });\n}", "title": "" }, { "docid": "253fafa77aea743de8fb721866c56711", "score": "0.56016845", "text": "function updateConfig() {\n\t// get settings, default to current values\n\tbrowser.storage.local.get({\n\t\tmac: mac,\n\t\talt: keyAlt,\n\t\tctrl: keyCtrl,\n\t\tmeta: keyMeta,\n\t\tshift: keyShift,\n\t\tmouse: btnMouse,\n\t\tlimit: limit,\n\t}).then(result => {\n\t\tmac = result.mac;\n\t\tkeyAlt = result.alt;\n\t\tkeyCtrl = result.ctrl;\n\t\tkeyMeta = result.meta;\n\t\tkeyShift = result.shift;\n\t\tbtnMouse = result.mouse;\n\t\tlimit = +result.limit;\n\t});\n}", "title": "" }, { "docid": "ed27fe7078acf3cce785500cb32a3559", "score": "0.5599888", "text": "function getSettings() {\n chrome.storage.sync.get({\n apiToken: '',\n addresses: {}\n }, function(items) {\n apiToken = items.apiToken;\n addresses = items.addresses;\n checkTravelTimes();\n });\n}", "title": "" }, { "docid": "56f3f9615013bce95b4dc777eb75ffc0", "score": "0.5598062", "text": "function restoreSettingValues() {\n browser.storage.local.get()\n .then(function(items) {\n document.getElementById(\"delayBeforeCleanInput\").value = items.delayBeforeClean;\n document.getElementById(\"activeModeSwitch\").checked = items.activeMode;\n\t\tdocument.getElementById(\"statLoggingSwitch\").checked = items.statLoggingSetting;\n document.getElementById(\"showNumberOfCookiesInIconSwitch\").checked = items.showNumberOfCookiesInIconSetting;\n document.getElementById(\"notifyCookieCleanUpSwitch\").checked = items.notifyCookieCleanUpSetting;\n document.getElementById(\"contextualIdentitiesEnabledSwitch\").checked = items.contextualIdentitiesEnabledSetting;\n\n });\n}", "title": "" }, { "docid": "e8a177738fa5d305752b36bdba688c69", "score": "0.5597994", "text": "function settingsInit() {\r\n\tvar settingsCookie = cookieRead('settings');\r\n\t\r\n\t// If the cookie exists, read it into settings, otherwise load the defaults\r\n\ttry {\r\n\t\tsettings = JSON.parse( decodeURIComponent(settingsCookie) );\r\n\t\t\r\n\t\tif ( settingsUpdate() )\r\n\t\t\tsettingsSave();\r\n\t\t\t\r\n\t} catch (err) {\r\n\t\talert('Your saved settings are corrupt, so the defaults have been loaded instead.\\nIf you have saved your settings, try to import them.\\nError: '+err);\r\n\t\tcookieDelete('settings');\r\n\t\tindexReload();\r\n\t}\r\n\t\r\n\tsettingsElements = {};\t\t\r\n}", "title": "" }, { "docid": "383cd920789d462edfb79c2339409962", "score": "0.5592904", "text": "static _getSettings(page) {\n // Util.purgeSettings();\n const allValues = GM_listValues();\n if (MP.DEBUG) {\n console.log('_getSettings(', page, ')\\nStored GM keys:', allValues);\n }\n Object.keys(page).forEach((scope) => {\n Object.keys(page[Number(scope)]).forEach((setting) => {\n const pref = page[Number(scope)][Number(setting)];\n if (MP.DEBUG) {\n console.log('Pref:', pref.title, '| Set:', GM_getValue(`${pref.title}`), '| Value:', GM_getValue(`${pref.title}_val`));\n }\n if (pref !== null && typeof pref === 'object') {\n const elem = (document.getElementById(pref.title));\n const cases = {\n checkbox: () => {\n elem.setAttribute('checked', 'checked');\n },\n textbox: () => {\n elem.value = GM_getValue(`${pref.title}_val`);\n },\n dropdown: () => {\n elem.value = GM_getValue(pref.title);\n },\n };\n if (cases[pref.type] && GM_getValue(pref.title))\n cases[pref.type]();\n }\n });\n });\n }", "title": "" }, { "docid": "2024b7e854276e26465c3ece078f2b73", "score": "0.55923307", "text": "function refresh_globals() {\n widget_data.global_div.innerHTML = '<h3 style=\"text-align:center;\">Global Variables</h3>';\n if(widget_data.globals !== undefined) {\n var details_div = document.createElement(\"div\");\n details_div.style.padding = \"5px\";\n Object.keys(widget_data.globals).forEach(function(key, index) {\n var p = document.createElement('p');\n p.innerHTML = `<b>${key}:</b> ${widget_data.globals[key]}`;\n details_div.appendChild(p);\n });\n widget_data.global_div.appendChild(details_div);\n }\n }", "title": "" }, { "docid": "29388b86e21e821bb61624739de38129", "score": "0.5588458", "text": "function resetValues () {\n Preferences.set('visualCascade', false);\n Preferences.set('browsers', Preferences.defaults.browsers);\n\n init();\n }", "title": "" }, { "docid": "90c8502e7c0dbfdf07e359447e367104", "score": "0.5573471", "text": "function local_setValue(name, value) { name=\"GMxs_\"+name; if ( ! value && value !=0 ) { localStorage.removeItem(name); return; }\n var str=JSON.stringify(value); localStorage.setItem(name, str );\n }", "title": "" }, { "docid": "f63fc035dfa4ef8c3a36d2f88cc40bc7", "score": "0.55693775", "text": "async function load_Prefs() {\r\n let prefs = await browser.storage.local.get(\"Prefs\");\r\n let settings = prefs.Prefs;\r\n if (settings != null && settings != undefined){\r\n for (let key of Object.keys(settings)){\r\n let elem = document.getElementById(key);\r\n if (!elem) {\r\n continue;\r\n }\r\n if (elem.type == \"checkbox\") {\r\n elem.checked = settings[key];\r\n } else {\r\n elem.value = settings[key];\r\n }\r\n }\r\n }else{\r\n resetValues();\r\n }\r\n update_shown_Values();\r\n}", "title": "" }, { "docid": "f5286c54cc55f992de28391b4965956a", "score": "0.55669755", "text": "function wpsc_var_set( name, value ) {\n\tif ( typeof wpsc_vars !== 'undefined' ) {\n\t\twpsc_vars[name] = value;\n\t\treturn value;\n\t}\n\n\treturn undefined;\n}", "title": "" }, { "docid": "d628ca80f0ac9014819898dd62196ab0", "score": "0.5557061", "text": "clearNearbyPrefs() {\n chrome.send('clearNearbyPrefs');\n }", "title": "" }, { "docid": "798f57373e2178e12adf59303779b1e4", "score": "0.5556252", "text": "function retrieveAndSetPreference(){\n if(typeof(Storage) !== \"undefined\") { //Check if the browser supports local storage\n if(localStorage.guddi_ca_xkcd_user_preference){\n var userPreferenceRetrieved = JSON.parse(localStorage.getItem(\"guddi_ca_xkcd_user_preference\"));\n totWords.value = userPreferenceRetrieved[0];\n totSpChars.value = userPreferenceRetrieved[1];\n totNumbers.value = userPreferenceRetrieved[2];\n useSeparator.value = userPreferenceRetrieved[3];\n wordCase.value = userPreferenceRetrieved[4];\n savePreference.checked = userPreferenceRetrieved[5];\n } //End of inner IF\n } else {\n console.log(\"Error log: Web local storage is not supported in this browser!\");\n }//End of outer IF\n }", "title": "" }, { "docid": "39f7f0494c9415993c1f1f36bd7af021", "score": "0.55404866", "text": "function populateScope () {\n var $hook = $('#script-data-scope'),\n attrs;\n\n // Isolate data attributes & pull just those which have the var-* prefix\n attrs = $hook.data();\n\n // Assign each value into the scope, do not override existing values\n _.forEach(attrs, function (value, key) {\n var varName = _.camelCase(key.replace(/^var/i, ''));\n\n key.match(/^var/) &&\n !_.has(scope, varName) &&\n (scope[varName] = value);\n });\n}", "title": "" }, { "docid": "39f7f0494c9415993c1f1f36bd7af021", "score": "0.55404866", "text": "function populateScope () {\n var $hook = $('#script-data-scope'),\n attrs;\n\n // Isolate data attributes & pull just those which have the var-* prefix\n attrs = $hook.data();\n\n // Assign each value into the scope, do not override existing values\n _.forEach(attrs, function (value, key) {\n var varName = _.camelCase(key.replace(/^var/i, ''));\n\n key.match(/^var/) &&\n !_.has(scope, varName) &&\n (scope[varName] = value);\n });\n}", "title": "" }, { "docid": "55b90d2313c08b17fe908b420781d521", "score": "0.55402917", "text": "function restore_options() {\n\tbrowser.storage.sync.get({ sheetIdValue: '', baseUrlValue: '', debugModeValue: ''}).then( (items) => {\n\t\tconsole.log(items);\n\t\tdocument.getElementById('sheet_id').value = items.sheetIdValue;\n\t\tdocument.getElementById(\"base_url\").value = items.baseUrlValue;\n\t\tdocument.getElementById(\"debug_mode\").checked = items.debugModeValue;\n\n\t})\n}", "title": "" }, { "docid": "f22fd00c1fc6e0b05908d5be76259673", "score": "0.5534732", "text": "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n preferredName: '',\n investmentUrl: '',\n donationUrl: ''\n }, function(items) {\n $('#preferred-name').val(items.preferredName)\n $('#investment-url').val(items.investmentUrl)\n $('#donation-url').val(items.donationUrl)\n });\n}", "title": "" }, { "docid": "50243826161e7bfc2b0be5b9b2113d77", "score": "0.5530559", "text": "function getUserOptions() {\n\n\t/* READ USER SETTINGS FILE HERE */\t\n\twindow.gBulkDeleteDays = 3;\n\twindow.gMarkReadOnVisit = true;\n\twindow.gFeedOrder = 0;\n\twindow.gDefaultFormats = [ 0, 1, 0];\n\twindow.gFormat = gDefaultFormats[gcSTATUS_UNREAD];\n}", "title": "" }, { "docid": "0fd9c951c0d634da0399605dfaf48bcc", "score": "0.5521726", "text": "function defaultsClick() {\n Common.defaultSettings();\n setControlValues();\n Common.setTheme(document.getElementById('theme').value);\n}", "title": "" }, { "docid": "042510969caf9357f3f8a24f9ae2f4df", "score": "0.5521053", "text": "function saveData(){\n chrome.storage.local.set({'tabDict': myTabDict}, function() {\n console.log('Value is set to ' + myTabDict);\n });\n}", "title": "" }, { "docid": "4a9eea7ddbee64682393e7ea4b1370a0", "score": "0.5521023", "text": "function loadOptions(){\n chrome.storage.sync.get({\n project: 'Sunshine',\n user: 'nyx.linden',\n\tmaximumresults: 50\n }, function(items) {\n document.getElementById(ELEMENT_PROJECT_ID).value = items.project;\n document.getElementById(ELEMENT_USER_ID).value = items.user;\n\tdocument.getElementById(ELEMENT_MAXIMUMRESULTS_ID).value = items.maximumresults;\n });\n}", "title": "" }, { "docid": "8ca4a86fb9f68ee01c63b7dc1064422f", "score": "0.5518019", "text": "function attachSettingListeners() {\n document.getElementById('bbb-web-extension-cancel').addEventListener('click', () => {\n window.close();\n });\n document.getElementById('bbb-web-extension-submit').addEventListener('click', () => {\n var gl_url = document.getElementById('gl-url').value.replace(/\\/$/, '');\n\n chrome.storage.sync.set({\n bigbluebutton_settings: {\n gl_url\n }\n })\n console.log(\"submit\");\n });\n }", "title": "" }, { "docid": "702cd35ce8fa79b60236e8ffeb114062", "score": "0.55111384", "text": "function load_all_preferences() {\n // load the domains\n load_domains();\n // load the main options\n load_main_options();\n}", "title": "" }, { "docid": "e220301e58e064cb45068e8ee0b239dd", "score": "0.55101746", "text": "function TestPrefs() {\n}", "title": "" }, { "docid": "12d6916b8bf90cd1ff976137643a7ac5", "score": "0.55099976", "text": "function saveSetting() {\n try {\n var data = {\n language: $(\"#select-script-language-id\").val()\n };\n browser.storage.local.set(data);\n } catch (e) {\n console.log(e);\n }\n}", "title": "" }, { "docid": "6e4e457a17a8fd1edff25b1e155a4fa6", "score": "0.5508325", "text": "function restore_options() {\n // use default values\n chrome.storage.sync.get(\n {\n beginWork: \"08:00\",\n lunchTime: \"11:00\",\n backToWork: \"13:00\",\n byeTime: \"19:00\"\n },\n function(items) {\n document.getElementById(\"begin-work\").value = items.beginWork;\n document.getElementById(\"lunch-time\").value = items.lunchTime;\n document.getElementById(\"back-to-work\").value = items.backToWork;\n document.getElementById(\"bye-time\").value = items.byeTime;\n }\n );\n}", "title": "" }, { "docid": "733db9c86283bcda5c2c280691949394", "score": "0.5507329", "text": "function getSettingsAndStart() {\n chrome.storage.local.get(null, function (settings) {\n // Begin parsing and injecting views\n if (window.location.href.indexOf('spryker-simplicity') !== -1) {\n if (window.location.href.indexOf('merge_requests') !== -1) {\n if ($.isNumeric(window.location.pathname.split('/')[4])) {\n addPipelineButton()\n addEnvironmentButton()\n }\n }\n }\n })\n}", "title": "" }, { "docid": "a20a3b00b77dced94ef6726f81c5b4d5", "score": "0.5492111", "text": "function setLocalStorageData() {\n if ($.isEmptyObject(localStorage.inUse)) {\n //Set defaults\n localStorage.inUse = 'true';\n localStorage.sounds = 'true';\n localStorage.tracking = 'true';\n localStorage.logggedWorkouts = '[]';\n }\n if ($.isEmptyObject(localStorage.logggedWorkouts)) {\n localStorage.logggedWorkouts = '[]';\n $('#previousworkout-btn').hide();\n } else if (localStorage.logggedWorkouts === '[]') {\n $('#previousworkout-btn').hide();\n }\n if (localStorage.sounds === 'true') {\n $('#flip-alert').val('on');\n } else {\n $('#flip-alert').val('off');\n }\n if (localStorage.tracking === 'true') {\n $('#flip-track').val('on');\n } else {\n $('#flip-track').val('off');\n }\n }", "title": "" }, { "docid": "b143db94a3ff845fd6c990ddba120f8e", "score": "0.54789865", "text": "function saveInitialValues() {\n\t//Iterate through all inputs, selects and textareas\n\t$$('#'+standardPrefix+'FormContents input,#'+standardPrefix+'FormContents select,#'+standardPrefix+'FormContents textarea').each(function(el) {\n\t\t//Check that change tracking is not disabled for this element\n\t\tif(!el.hasClass('noChangeTrack'))\n\t\t\tel.store('initialValue',el.value);\n\t});\t\n}", "title": "" }, { "docid": "f29c641a9abb6c73e423e920f57d309c", "score": "0.5478238", "text": "function restore_options() {\n chrome.storage.local.get({\n username: '',\n password: ''\n }, function(options) {\n document.getElementById('username').value = options.username;\n document.getElementById('password').value = options.password;\n });\n}", "title": "" } ]
359a761928b736d7111fb1414ebe08bb
if the window is resized, resize the canvas to match
[ { "docid": "ea30e1be2ab557aeb1cdd436f83c0275", "score": "0.8471642", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight)\n}", "title": "" } ]
[ { "docid": "18d64f8dde6fae4c36323ac3524ebcb0", "score": "0.85902315", "text": "function windowResized() {\n resizeCanvas(canvasX, canvasY);\n}", "title": "" }, { "docid": "5c17227d14588e50758d2aa825a38d2b", "score": "0.8561757", "text": "function windowResized() {\n resizeCanvas(canvasWidth, canvasHeight);\n}", "title": "" }, { "docid": "a9c3d2d85435671f43d334e987f33c5d", "score": "0.8540747", "text": "function resizeCanvas() {\n\t\tcanvas.width = (window.innerWidth) - 150;\n\t\tcanvas.height = (window.innerHeight) - 100;\n\t\tredraw();\n\t}", "title": "" }, { "docid": "082939a32ad0028925fe343005df1b4f", "score": "0.85248554", "text": "function windowResized() {\n resizeCanvas(width, height);\n}", "title": "" }, { "docid": "1af70147af2f818d4dc3047ac1131d93", "score": "0.8497194", "text": "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight);\r\n}", "title": "" }, { "docid": "1af70147af2f818d4dc3047ac1131d93", "score": "0.8497194", "text": "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight);\r\n}", "title": "" }, { "docid": "38c240357e53fc7824b77b11090d7473", "score": "0.8488847", "text": "function windowResized(){\n canvas.resize(windowWidth, windowHeight - canvasadjust);\n}", "title": "" }, { "docid": "1cf3f72672bdaa7d24c2ac46369e25e8", "score": "0.84704924", "text": "function windowResized() {\n resizeCanvas(innerWidth, innerHeight);\n}", "title": "" }, { "docid": "a80472247b36d7ec40125dccff8de36c", "score": "0.84693325", "text": "function windowResized() {\n resizeCanvas(canvasContainer.clientWidth, canvasContainer.clientHeight);\n}", "title": "" }, { "docid": "1941a5d212bcd4df2bb2ab3d9f70fc4f", "score": "0.8464511", "text": "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight)\r\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "811d801c22e98b975a33a476464c7058", "score": "0.8456728", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "349534ec307632701d20607f315920dc", "score": "0.8456312", "text": "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "70d567fdd02e718d317b9904a5a690a9", "score": "0.84466404", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}//end windowResized", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0888d811d7ba71cb2932d8f8c6e9fd1d", "score": "0.8444396", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "25b9ea0e9bd0f5d51fdb6524d08527ad", "score": "0.84406394", "text": "function windowResized() {\n\tresizeCanvas(innerWidth, innerHeight);\n}", "title": "" }, { "docid": "e6f019bd24f90a24752f2cab354ce8bd", "score": "0.84366184", "text": "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight, false);\r\n}", "title": "" }, { "docid": "b24de28d39128926a25df1a437a6d524", "score": "0.8427102", "text": "function resizeCanvas() {\n\t\tcanvas.width = (window.innerWidth) * .67;\n\t\tcanvas.height = (window.innerHeight) * .69;\n\t\tredraw();\n\t}", "title": "" }, { "docid": "6461d9e5d56b8f9470646d9e16bec5c2", "score": "0.84137046", "text": "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n resize=1;\n}", "title": "" }, { "docid": "20cf88ec98faf9e851cdcc1955f8b71a", "score": "0.841332", "text": "function resize_canvas() {\n\t\t\tcanvas_elem.width = window.innerWidth / 2;\n\t\t\tcanvas_elem.height = window.innerWidth / 2;\n\n\t\t\tupdate_needed = true;\n\t\t}", "title": "" }, { "docid": "5bac70eaffd4cb19fde42c83b2cadb41", "score": "0.83996844", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight - 50);\n}", "title": "" }, { "docid": "1dbc400102708c599877699b7cabc691", "score": "0.83903694", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "title": "" }, { "docid": "1dbc400102708c599877699b7cabc691", "score": "0.83903694", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "title": "" }, { "docid": "1dbc400102708c599877699b7cabc691", "score": "0.83903694", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "title": "" }, { "docid": "1dbc400102708c599877699b7cabc691", "score": "0.83903694", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "title": "" }, { "docid": "fb4fa1e7b916f08dae79293a5f62cfa0", "score": "0.83822477", "text": "function windowResized(){\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "fb4fa1e7b916f08dae79293a5f62cfa0", "score": "0.83822477", "text": "function windowResized(){\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "e11400c25fcd27cca9f52ed07d0cf620", "score": "0.8380002", "text": "function windowResized(){\n if(windowWidth > 800){\n resizeCanvas(windowWidth,windowHeight);\n }\n}", "title": "" }, { "docid": "b8ed627b77a9536df75032edc5acabb6", "score": "0.83416975", "text": "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "b8ed627b77a9536df75032edc5acabb6", "score": "0.83416975", "text": "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "07b57cf8de66a8b63a57f4ae0621b240", "score": "0.8329257", "text": "function windowResized () {\n\tresizeCanvas(windowWidth, windowHeight);\n }", "title": "" }, { "docid": "e291f668bc2a9a823b3cd4208db0b13c", "score": "0.83168703", "text": "function resize() {\n canvas.height = window.innerHeight\n canvas.width = window.innerWidth\n }", "title": "" }, { "docid": "fadc67b9ffa48963c10b389dd03d322e", "score": "0.82724845", "text": "function resizeCanvas() {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n\n redrawCanvas();\n }", "title": "" }, { "docid": "15e4a600503fc5eb35ab11141f3aec0e", "score": "0.821579", "text": "canvasResize()\n {\n View.canvas.setAttribute(\"width\", this.floatToInt(window.innerWidth*0.95));\n View.canvas.setAttribute(\"height\",this.floatToInt(window.innerHeight*0.95));\n\n //update objects with the new size\n this.updateCharacterDim();\n this.updateVirusDim();\n this.updateSyringesDim();\n this.background.resize();\n\n }", "title": "" }, { "docid": "5bdffdc05213497fbad06e817104844a", "score": "0.8212772", "text": "function windowResize() {\n resiveCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "b3934defd5891349b99d1a0af7335e87", "score": "0.8205504", "text": "function resize() {\n width = canvas.width = window.innerWidth;\n height = canvas.height = window.innerHeight - 60;\n }", "title": "" }, { "docid": "413aeea2a02a4d2a3bdee69030b97458", "score": "0.8179547", "text": "function windowResized() {\n\twindowW = window.innerWidth;\n\twindowH = window.innerHeight;\n resizeCanvas(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "814e5840dd2fe83f9c247dac4c59d274", "score": "0.8167858", "text": "resize() {\n if (this._isShutDown) return;\n this._canvas.width = window.innerWidth;\n this._canvas.height = window.innerHeight;\n this.redraw();\n }", "title": "" }, { "docid": "78a5f318887e38d61d7d52438810ca56", "score": "0.8166958", "text": "function windowResized() {\n console.log('resized');\n resizeCanvas(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "6e2e1f98b4803e0917ddd52c9feb9ea8", "score": "0.81487036", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n scaleMaximums();\n}", "title": "" }, { "docid": "26ed9ff0f2c2fc066b38f018ec2256d4", "score": "0.81367064", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n draw();\n}", "title": "" }, { "docid": "741e11ac441cb0cdf38bc6ff8900de4d", "score": "0.81337124", "text": "function resizeCanvas() {\n\tvar newHeight = window.innerHeight;\n\tvar newWidth = initWidth/initHeight * newHeight;\n\tcanvas.setWidth(newWidth);\n\tcanvas.setHeight(newHeight);\n\tcanvas.calcOffset();\n}", "title": "" }, { "docid": "d67e01c30da1c4994fd9ba393bcbe372", "score": "0.8124217", "text": "function resizeCanvas(){\n\tif (canvas.width < window.innerWidth){\n\t\tcanvas.width = window.innerWidth-15;\n\t}\n\tif (canvas.height < window.innerHeight){\n\t\tcanvas.height = window.innerHeight;\n\t}\n}", "title": "" }, { "docid": "8fe43d79ca08c68fe9fd28c4733969ba", "score": "0.81154984", "text": "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n init();\n}", "title": "" }, { "docid": "c711aaf9831366042fb35cc5de111045", "score": "0.8091377", "text": "function resizeCanvas() {\n \t\t\t\thtmlCanvas.width = window.innerWidth;\n \t\t\t\thtmlCanvas.height = window.innerHeight;\n \t\t\t\tredraw();\n \t\t\t}", "title": "" }, { "docid": "00fa102c534f976e767958051100460f", "score": "0.80893785", "text": "function resizeCanvas() {\n //low level\n c.width = window.innerWidth;\n c.height = window.innerHeight;\n //update wrapper\n st.canvas.width = c.width;\n st.canvas.height = c.height;\n //update objects and redraw\n updateObjects();\n}", "title": "" }, { "docid": "fa2cd7c81c09e741c5a166677b045eb6", "score": "0.808351", "text": "function resize() {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n}", "title": "" }, { "docid": "fa2cd7c81c09e741c5a166677b045eb6", "score": "0.808351", "text": "function resize() {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n}", "title": "" }, { "docid": "3ef0871f05e0ca5145fb7c09308fb028", "score": "0.8077468", "text": "function doResize()\n{\n\tcanvas.width = window.innerWidth;\n\tcanvas.height = window.innerHeight;\n}", "title": "" }, { "docid": "a04df2a5bc2c6513c464c2cf184394e6", "score": "0.80763406", "text": "function resize() {\n ctx.canvas.width = window.outerWidth;\n ctx.canvas.height = window.outerHeight;\n}", "title": "" }, { "docid": "b6b9fd12d13ff3012a50e4dfc4ee8d74", "score": "0.80674773", "text": "function windowResized() {\n resizeCanvas(canvasWidth, canvasHeight);\n canvasWidth = windowWidth-100;\n canvasHeight = windowHeight-120;\n background(240,100,15,0.2);\n}", "title": "" }, { "docid": "8295ae5147ccebace51bd8db6342b39b", "score": "0.8065029", "text": "function windowResized() {\n // We can use the resizeCanvas() function to resize our canvas to the new window dimensions\n resizeCanvas(windowWidth,windowHeight);\n}", "title": "" }, { "docid": "544d91a5e3276d86750296a27ebfde74", "score": "0.8036024", "text": "function windowResized() {\n\n getWrapperWidth();\n resizeCanvas(wrapperWide, wrapperWide);\n\n widthVar = (width - 40) / 100;\n drawArea = (width - 40);\n\n switchBox();\n}", "title": "" }, { "docid": "50a21827bd35d2cc69be88f4893b0828", "score": "0.8033515", "text": "function canvas_resize()\n{\n canvas.style.width = window.innerWidth + 'px';\n canvas.style.height = window.innerHeight + 'px';\n}", "title": "" }, { "docid": "87429935a1d05103e3be72c2c5b2976a", "score": "0.8022318", "text": "function resize() {\r\n ctx.canvas.width = window.innerWidth;\r\n ctx.canvas.height = window.innerHeight;\r\n}", "title": "" }, { "docid": "f66c1aed0d9eb46d1be0f12027a6b0ef", "score": "0.8004616", "text": "function canvasResizer() {\n if (window.innerWidth < 505) {\n gElCanvas.width = 250;\n gElCanvas.height = 250;\n resizer = 0.5;\n } else if (window.innerWidth < 1100) {\n gElCanvas.width = 350;\n gElCanvas.height = 350;\n resizer = 0.7;\n } else {\n gElCanvas.width = 500;\n gElCanvas.height = 500;\n resizer = 1;\n }\n\n renderCanvas();\n}", "title": "" }, { "docid": "cc8f1d90e066a11ab6c01de18b431994", "score": "0.79963034", "text": "function windowResized() {\n repositionCanvas();\n}", "title": "" }, { "docid": "6700eafc3a5f8e87e709944964f12182", "score": "0.7992038", "text": "function resizeCanvas()\r\n{\r\n\tvar canvas = getCanvas();\r\n\tcanvas.width = window.innerWidth;\r\n canvas.height = window.innerHeight;\r\n\t\r\n\tpaintClock();\r\n}", "title": "" }, { "docid": "f04fec47d8b79d564d9a96292c523196", "score": "0.7977749", "text": "function resizeCanvas() {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n}", "title": "" }, { "docid": "1bd1e94e5d1072d2573ee6d50b6ae88b", "score": "0.7976586", "text": "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n\tLogo.resize();\n}", "title": "" }, { "docid": "8067daa9c6eb1fc9db154c700210820b", "score": "0.79736626", "text": "function resizeCanvas() {\n\tvar rect = setFlex.getBoundingClientRect()\n\tcanvas.width = rect.width - 20\n\tcanvas.height = rect.height - 20\n\tcanvasObj.canvasWidth = canvas.width\n\tcanvasObj.canvasHeight = canvas.height\n\twinObj.windowWidth = window.innerWidth\n\twinObj.windowHeight = window.innerHeight\n\tupdateWinCanvasDivs()\n\tdrawOnCanvas(canvas.width, canvas.height)\n}", "title": "" }, { "docid": "f505b37bd1c91e5c3190dab3ca6b6135", "score": "0.79649514", "text": "function onResize() {\n canvas.width = window.innerWidth * 0.75;\n canvas.height = window.innerHeight;\n }", "title": "" }, { "docid": "66e0ffd7e2bf2a6de84b1d156657be00", "score": "0.7962609", "text": "function canvas_resize() {\r\n win.w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\r\n win.h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\r\n resizeCanvas(win.w, win.h, true);\r\n}", "title": "" }, { "docid": "b5f82c6ee25e888769c52838bfc5e746", "score": "0.7959904", "text": "function windowResized() {\n\tlet w = window.innerWidth / 2;\n\tlet h = window.innerWidth / 2 / 475 * 600;\n\tresizeCanvas(w, h);\n\tcnv.position(window.innerWidth / 2, 0, \"absolute\");\n\t// reposition all shapes back in initial position relative to canvas\n\tinit_shapes();\n}", "title": "" }, { "docid": "ab5b79165a69d76f645fd6a7950bb40f", "score": "0.7957413", "text": "function resizeCanvas() {\n canvas.height = window.innerHeight * 0.95;\n canvas.width = window.innerWidth * 0.95;\n stage.update();\n }", "title": "" } ]
f1b74fe10e6b9d113267d17186009f29
Get sticky column offset width
[ { "docid": "016e7ca1f4108b4f892c2d9007c3c68c", "score": "0.5821206", "text": "function useStickyOffsets(colWidths, columnCount, direction) {\n var stickyOffsets = (0, React.useMemo)(function () {\n var leftOffsets = [];\n var rightOffsets = [];\n var left = 0;\n var right = 0;\n\n for (var start = 0; start < columnCount; start += 1) {\n if (direction === 'rtl') {\n // Left offset\n rightOffsets[start] = right;\n right += colWidths[start] || 0; // Right offset\n\n var end = columnCount - start - 1;\n leftOffsets[end] = left;\n left += colWidths[end] || 0;\n } else {\n // Left offset\n leftOffsets[start] = left;\n left += colWidths[start] || 0; // Right offset\n\n var _end = columnCount - start - 1;\n\n rightOffsets[_end] = right;\n right += colWidths[_end] || 0;\n }\n }\n\n return {\n left: leftOffsets,\n right: rightOffsets\n };\n }, [colWidths, columnCount, direction]);\n return stickyOffsets;\n}", "title": "" } ]
[ { "docid": "a48a82a44c8d2c201acf69c8ca6f11f6", "score": "0.6791609", "text": "_getStickyStartColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = 0; i < widths.length; i++) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }", "title": "" }, { "docid": "54a0824d12f2393b25118b275afb66a9", "score": "0.67650664", "text": "function posCalc(){\n var width = document.innerWidth;\n var colLength = width/3;\n }", "title": "" }, { "docid": "1c336c4f50c3a8bcf2691623590c2a6c", "score": "0.666696", "text": "function calcNestColWidth(){\n var windowWidth = $window.width();\n if (windowWidth > 1024) {\n return windowWidth / 14;\n } else if (windowWidth < 768) {\n return windowWidth / 4;\n } else {\n return windowWidth / 9;\n }\n }", "title": "" }, { "docid": "d1b09f5e01ed063ef58a962b8b88a686", "score": "0.66365695", "text": "lineupGetColumnWidth (name, col, fixed) {\n let width = col.width || 0;\n let colname = col.column || col.type;\n /* Get the column scaling based on the user settings, if available */\n if (this.lineupColumns && this.lineupColumns[name] && this.lineupColumns[name][colname]) {\n width = this.lineupColumns[name][colname] + fixed;\n }\n let colWidth = width < fixed ? 0 : (width - fixed);\n if (col === 'rank') { /* defined in LineUp */\n colWidth = this.lineupRankWidth;\n }\n col.widthBasis = colWidth;\n col.widthFixed = fixed;\n return col.widthBasis;\n }", "title": "" }, { "docid": "c9e2bbe4a7b606625e1d333743f50446", "score": "0.6480225", "text": "get _scrollWidth() {\n const that = this;\n\n if (that.__scrollWidth) {\n return that.__scrollWidth;\n }\n\n let width = 0;\n\n for (let i = 0; i < that.viewColumns.length; i++) {\n const column = that.viewColumns[i];\n\n if (!column.visible) {\n continue;\n }\n\n width += column.computedWidth;\n }\n\n width = parseInt(width);\n that.__scrollWidth = width;\n that._scrollView.scrollWidth = width - that._clientSize.width;\n\n return that.__scrollWidth;\n }", "title": "" }, { "docid": "c1237e011bfe33dac47540e7ae677de5", "score": "0.6409878", "text": "@computed(\n 'hasFixedColumn',\n 'bodyColumns.firstObject.width',\n 'allColumnWidths',\n '_width'\n ) get horizontalScrollWrapperStyle() {\n let columns = this.get('bodyColumns');\n let visibility = this.get('_width') < this.get('allColumnWidths') ? 'visibility' : 'hidden';\n let left;\n if (get(columns, 'length') > 0 && this.get('hasFixedColumn')) {\n left = get(columns[0], 'width');\n } else {\n left = 0;\n }\n\n return htmlSafe(`visibility: ${visibility}; left: ${left}px; right: 0px;`);\n }", "title": "" }, { "docid": "2b1a8e162decdb8120f6a5b4358fd853", "score": "0.6397846", "text": "get fixedContainerPosition() {\r\n return -(this.overflowCellsLimit * this.fullCellWidth);\r\n }", "title": "" }, { "docid": "835d0e4143c5809063d78ca01355f40d", "score": "0.63937783", "text": "get _scrollWidth() {\n const that = this;\n\n if (that.__scrollWidth) {\n return that.__scrollWidth;\n }\n\n let width = 0;\n\n for (let i = 0; i < that.viewColumns.length; i++) {\n const column = that.viewColumns[i];\n\n if (!column.visible || column.adaptiveVisible) {\n continue;\n }\n\n width += column.computedWidth;\n }\n\n if (that.adaptivityMode.responsiveLayout.enabled) {\n const responsiveWidth = that.adaptivityMode.responsiveLayout.width;\n const scrollViewWidth = 1 + that.$.scrollView.offsetWidth;\n\n if (scrollViewWidth <= responsiveWidth) {\n return 0;\n }\n }\n\n if (that.adaptivityMode.adaptiveLayout.enabled) {\n const adaptiveWidth = that.adaptivityMode.adaptiveLayout.width;\n const scrollViewWidth = 1 + that.$.scrollView.offsetWidth;\n\n if (scrollViewWidth <= adaptiveWidth) {\n return 0;\n }\n }\n\n width = parseInt(width);\n that.__scrollWidth = width;\n that._scrollView.scrollWidth = width - that._clientSize.width;\n\n return that.__scrollWidth;\n }", "title": "" }, { "docid": "03dbad3286ae9b3ba9f00e6ffa2ce74c", "score": "0.63786316", "text": "_getStickyEndColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = widths.length; i > 0; i--) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }", "title": "" }, { "docid": "4c98b5a553e4723731781afa6c6b1fa2", "score": "0.6359991", "text": "_calcColumnWidths() {\n if (!this._container) {\n return;\n }\n\n const columnWidths = Array.prototype.slice.call(this._container.querySelectorAll('.md-panel-header'))\n .reduce((maxes, row) => {\n const columns = row.querySelectorAll('.md-panel-column');\n for (let i = 0; i < columns.length; i++) {\n // Only need to include the offsetWidth of the column because the child will really\n // determine the width of the column. Since it has already been defined at this point,\n // no additional work needs to be done.\n maxes[i] = Math.max(\n columns[i].offsetWidth,\n maxes[i] || 0\n );\n }\n\n return maxes;\n }, [0]);\n\n this.setState({ columnWidths });\n }", "title": "" }, { "docid": "a96de4d45ba3b0c8875f9aef861eb968", "score": "0.63380754", "text": "function calcWidth() {\n\t\tstickyHeader.style.width = window.getComputedStyle(document.querySelector(mountQuerySelector), null).getPropertyValue('width');\n\t}", "title": "" }, { "docid": "abf3b49380f3afb7eae9a3953df2b360", "score": "0.6328055", "text": "static get COLUMN_WIDTH() { return _COLUMN_WIDTH; }", "title": "" }, { "docid": "d186a36dec321aeab950233cf3ba06a8", "score": "0.626745", "text": "alignmentOffset() {\n // Get the absolute x coordinate position of the tooltip.\n const absoluteX = document.getElementById(this.props.columnTooltip.get('columnName') + '-QuestionMark').getBoundingClientRect().left -\n (window.innerWidth - this.props.viewport.get('x'))/2 +\n Constants.getIn(['questionMark', 'size'])/2\n\n // Check if the tooltip can be fully displayed within the viewport.\n if(absoluteX + Constants.getIn(['columnTooltip', 'width']) > this.props.viewport.get('x')) \n return Constants.getIn(['columnTooltip', 'width'])\n\n // No offset is needed otherwise.\n return 0\n }", "title": "" }, { "docid": "64e08c464964a934c99cd34b91a87112", "score": "0.6170435", "text": "get _width() {\n // The container event's width is determined by the maximum number of\n // events in any of its rows.\n if (this.rows) {\n const columns =\n this.rows.reduce((max, row) => {\n return Math.max(max, row.leaves.length + 1) // add itself\n }, 0) + 1 // add the container\n\n return 100 / columns\n }\n\n const availableWidth = 100 - this.container._width\n\n // The row event's width is the space left by the container, divided\n // among itself and its leaves.\n if (this.leaves) {\n return availableWidth / (this.leaves.length + 1)\n }\n\n // The leaf event's width is determined by its row's width\n return this.row._width\n }", "title": "" }, { "docid": "7587673770d69ec02d2ba7c713b34e81", "score": "0.61472934", "text": "checkSpaceLeft() {\n const { theme } = this.props;\n const middleContainer = document.getElementById('middle_container');\n if (middleContainer) {\n const middleWidth = middleContainer.offsetWidth;\n const nextColumnWidth = parseInt(theme.column.width, 10);\n return Math.floor(middleWidth / nextColumnWidth);\n }\n return 1;\n }", "title": "" }, { "docid": "3bfb6d14cda30db5e03c0c39d045ac52", "score": "0.6098362", "text": "@computed('hasFixedColumn', '[email protected]')\n get horizontalScrollStyle() {\n let style = '';\n let hasFixedColumn = this.get('hasFixedColumn');\n let columns = this.get('bodyColumns');\n let width = 0;\n\n for (let i = hasFixedColumn ? 1 : 0; i < columns.length; i++) {\n width += get(columns[i], 'width');\n }\n\n style = `width: ${width}px;`;\n return htmlSafe(style);\n }", "title": "" }, { "docid": "80aedbaeb21543a312f9b5c6bde8b7df", "score": "0.60614306", "text": "get cellWidth() {\n return (min(width, height) - 2*GRID_BUFFER) / this.cols;\n }", "title": "" }, { "docid": "41d09223586070cc2c2fd363d061927c", "score": "0.60299474", "text": "function applyFixedColGridWidth() {\n var fixedColContainerEl = _fixedColGrid.getContainerNode(),\n innerWrapper = fixedColContainerEl.parentNode,\n width = parseInt(_fixedColGrid.getCanvasNode().style.width, 10);\n\n innerWrapper.style.width = width + 'px';\n fixedColContainerEl.style.width = width + _scrollbarDim.width + _containerBorderDim.left + _containerBorderDim.right + 'px';\n }", "title": "" }, { "docid": "f495a7bb05ef93bddd15c74ddf3adbea", "score": "0.6026335", "text": "function getScrollbarWidth() {\n if ($(\"html\").is(\"[data-minimalscrollbar]\")) {\n return 0\n }\n let $t = $(\"<div/>\").css({\n position: \"absolute\",\n top: \"-100px\",\n overflowX: \"hidden\",\n overflowY: \"scroll\"\n }).prependTo(\"body\")\n let out = $t[0].offsetWidth - $t[0].clientWidth\n $t.remove()\n return out\n }", "title": "" }, { "docid": "a16658e2bb4f3d71e00566ef6817f6b4", "score": "0.6014355", "text": "function returnScrollbarWidth() {\n let scrollbarWidth = innerWindowWidth() - doc.querySelector('html').clientWidth;\n\n return scrollbarWidth;\n}", "title": "" }, { "docid": "93cf53607847d86685300fbe3dcb29ee", "score": "0.5992207", "text": "function useStickyOffsets(colWidthsRef, columnCountRef, directionRef) {\n var stickyOffsets = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {\n var leftOffsets = [];\n var rightOffsets = [];\n var left = 0;\n var right = 0;\n var colWidths = colWidthsRef.value;\n var columnCount = columnCountRef.value;\n var direction = directionRef.value;\n for (var start = 0; start < columnCount; start += 1) {\n if (direction === 'rtl') {\n // Left offset\n rightOffsets[start] = right;\n right += colWidths[start] || 0;\n // Right offset\n var end = columnCount - start - 1;\n leftOffsets[end] = left;\n left += colWidths[end] || 0;\n } else {\n // Left offset\n leftOffsets[start] = left;\n left += colWidths[start] || 0;\n // Right offset\n var _end = columnCount - start - 1;\n rightOffsets[_end] = right;\n right += colWidths[_end] || 0;\n }\n }\n return {\n left: leftOffsets,\n right: rightOffsets\n };\n });\n return stickyOffsets;\n}", "title": "" }, { "docid": "efde6c19a8fe87c5bf33937945419f8d", "score": "0.5966104", "text": "function returnScrollbarWidth() {\n let scrollbarWidth = innerWindowWidth() - document.querySelector('html').clientWidth;\n \n return scrollbarWidth;\n}", "title": "" }, { "docid": "84dd57c178e3854f545f170d45cc9e99", "score": "0.5957689", "text": "getHeaderWidth() {\n return this._rows[0].getWidth();\n }", "title": "" }, { "docid": "dea56dcdc28d9cf4f56a1b0566c64e78", "score": "0.5950754", "text": "_freezeColumnWidth() {\n this._forEachRowCell(this._containerHead, 0, (cell, columnIndex) => {\n const width = cell.width; // get current numeric width\n cell.width = width; // set width to style.width\n this._columns[columnIndex].width = cell.width; // fetch real width again and store it\n });\n }", "title": "" }, { "docid": "a4e482d42aba949b9f3219af1abc4fd3", "score": "0.5949671", "text": "function repositionStickyCol() {\n\t\t\tif ( $stickyWrap.scrollLeft() > 0 ) {\n\t\t\t\t// When left of wrapping parent is out of view...\n\t\t\t\t$stickyCol.add( $stickyIntersect ).css({\n\t\t\t\t\t'opacity': 1,\n\t\t\t\t\t'left': $stickyWrap.scrollLeft()\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// When left of wrapping parent is in view...\n\t\t\t\t$stickyCol.css({ 'opacity': 0 }).add( $stickyIntersect ).css({ 'left': 0 });\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "11038019cd91f67b32c2c17024a2e4f2", "score": "0.5937721", "text": "function getColLeft(n) {\n return n * colWidthPct + '%';\n }", "title": "" }, { "docid": "af2dff65e1ab1947284aa88f13462dad", "score": "0.59253675", "text": "function getOffsetWidth(cellsNumber) {\n if (cellsNumber < 80) return 0;\n if (cellsNumber < 140) return 5;\n if (cellsNumber < 200) return 15;\n if (cellsNumber < 300) return 20;\n if (cellsNumber < 500) return 25;\n return 30;\n }", "title": "" }, { "docid": "e4328e93673c4590b01f35ece6517496", "score": "0.5916913", "text": "function _minWidth (col) {\n var padding = col.padding || []\n \n return 1 + (padding[left] || 0) + (padding[right] || 0)\n }", "title": "" }, { "docid": "1377f8cdfb7ee28db8204c4cc38719fb", "score": "0.59006", "text": "calculateMinWidthForSafari() {\n let minWidth = 0,\n columns = this.columns.visibleColumns;\n\n columns.forEach((column) => {\n minWidth += column.calculateMinWidth();\n });\n\n return minWidth;\n }", "title": "" }, { "docid": "66b468294d6beafa925bcbe20b4ccbb7", "score": "0.58976835", "text": "calculateMinWidthForSafari() {\n let minWidth = 0,\n columns = this.columns.visibleColumns;\n columns.forEach(column => {\n minWidth += column.calculateMinWidth();\n });\n return minWidth;\n }", "title": "" }, { "docid": "4b9fa78c65f40837a32e4f12b9489080", "score": "0.58904046", "text": "get width()\n\t{\n\t\tlet width = Math.max(this._width, this.minWidth);\n\n\t\tif (this.tree.theme.hasGridBehavior)\n\t\t{\n\t\t\tlet step = this.tree.theme.gridSize;\n\t\t\twidth = Math.ceil(width / step) * step;\n\t\t}\n\n\t\treturn width;\n\t}", "title": "" }, { "docid": "b24360db886292d8dee05334ad271a98", "score": "0.5887631", "text": "function getRowWidth(r) {\n return ( r * 64); // reconfigure ? dynamically get width instead\n}", "title": "" }, { "docid": "091c274d714dc68fd17954f9b0dd8001", "score": "0.5877412", "text": "_xToCol(x) { return Math.floor((x-this.left_col_px-this._getSidebarPx())/this._colWidth()); }", "title": "" }, { "docid": "bc12eca4f26f18d70e375306303d10a5", "score": "0.58671445", "text": "function getScrollbarOffset() {\n try {\n if (window.innerWidth > document.documentElement.clientWidth) {\n return window.innerWidth - document.documentElement.clientWidth;\n }\n } catch (err) {}\n\n return 0;\n}", "title": "" }, { "docid": "89ec1f11e71e9c93dda682bdb242ccb7", "score": "0.5848569", "text": "function useStickyOffsets(colWidths, columnCount, direction) {\n var stickyOffsets = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react__[\"useMemo\"])(function () {\n var leftOffsets = [];\n var rightOffsets = [];\n var left = 0;\n var right = 0;\n\n for (var start = 0; start < columnCount; start += 1) {\n if (direction === 'rtl') {\n // Left offset\n rightOffsets[start] = right;\n right += colWidths[start] || 0; // Right offset\n\n var end = columnCount - start - 1;\n leftOffsets[end] = left;\n left += colWidths[end] || 0;\n } else {\n // Left offset\n leftOffsets[start] = left;\n left += colWidths[start] || 0; // Right offset\n\n var _end = columnCount - start - 1;\n\n rightOffsets[_end] = right;\n right += colWidths[_end] || 0;\n }\n }\n\n return {\n left: leftOffsets,\n right: rightOffsets\n };\n }, [colWidths, columnCount, direction]);\n return stickyOffsets;\n}", "title": "" }, { "docid": "699a3aabda9c50e76da4e2e838d0c6e6", "score": "0.5804658", "text": "getOuterWidth() {\n mustInherit();\n }", "title": "" }, { "docid": "da2da1921e82fca0784d9ae513318b72", "score": "0.5800524", "text": "calculateMinWidth() {\n const me = this,\n width = me.measureSize(me.width),\n minWidth = me.measureSize(me.minWidth);\n let minChildWidth = 0;\n\n if (me.children) {\n minChildWidth = me.children.reduce((result, column) => {\n return result + column.calculateMinWidth();\n }, 0);\n }\n\n return Math.max(width, minWidth, minChildWidth);\n }", "title": "" }, { "docid": "d7164b910af4d587d2567aa8a9f8679c", "score": "0.57965934", "text": "function useStickyOffsets(colWidths, columCount, direction) {\n var stickyOffsets = (0, _react.useMemo)(function () {\n var leftOffsets = [];\n var rightOffsets = [];\n var left = 0;\n var right = 0;\n\n for (var start = 0; start < columCount; start += 1) {\n if (direction === 'rtl') {\n // Left offset\n rightOffsets[start] = right;\n right += colWidths[start] || 0; // Right offset\n\n var end = columCount - start - 1;\n leftOffsets[end] = left;\n left += colWidths[end] || 0;\n } else {\n // Left offset\n leftOffsets[start] = left;\n left += colWidths[start] || 0; // Right offset\n\n var _end = columCount - start - 1;\n\n rightOffsets[_end] = right;\n right += colWidths[_end] || 0;\n }\n }\n\n return {\n left: leftOffsets,\n right: rightOffsets\n };\n }, [colWidths, columCount, direction]);\n return stickyOffsets;\n}", "title": "" }, { "docid": "26b2c96bc9201cba846e855af0e10a19", "score": "0.5793109", "text": "function getScrollbarWidth() {\n return window.innerWidth - document.documentElement.clientWidth;\n}", "title": "" }, { "docid": "97c5fabaf64ae6e567c507bf59ca10d2", "score": "0.5790822", "text": "calculateMinWidth() {\n const me = this,\n width = me.measureSize(me.width),\n minWidth = me.measureSize(me.minWidth);\n\n let minChildWidth = 0;\n\n if (me.children) {\n minChildWidth = me.children.reduce((result, column) => {\n return result + column.calculateMinWidth();\n }, 0);\n }\n\n return Math.max(width, minWidth, minChildWidth);\n }", "title": "" }, { "docid": "a1167b1215367e1dbe9b17a774507c88", "score": "0.57801706", "text": "innerWidthDependsOnChilds(){if(this.__controlStretchedWidth)return!0;if(this.__columnOptions)for(const columnOption of this.__columnOptions)if(\"Content\"===columnOption.widthMode)return!0;return super.innerWidthDependsOnChilds()}", "title": "" }, { "docid": "11c2f553859812b49794a5678ecdfbd3", "score": "0.5769687", "text": "function setOuterWidth() {\n outerWidth = wrap.offsetWidth;\n dragBarPos = calcDragBarPosFromCss() || Math.floor(outerWidth / 2) - 5;\n }", "title": "" }, { "docid": "2675de900ba10c6b392d08ebc16d52cf", "score": "0.5768697", "text": "function useStickyOffsets(colWidths, columCount, direction) {\n var stickyOffsets = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useMemo\"])(function () {\n var leftOffsets = [];\n var rightOffsets = [];\n var left = 0;\n var right = 0;\n\n for (var start = 0; start < columCount; start += 1) {\n if (direction === 'rtl') {\n // Left offset\n rightOffsets[start] = right;\n right += colWidths[start] || 0; // Right offset\n\n var end = columCount - start - 1;\n leftOffsets[end] = left;\n left += colWidths[end] || 0;\n } else {\n // Left offset\n leftOffsets[start] = left;\n left += colWidths[start] || 0; // Right offset\n\n var _end = columCount - start - 1;\n\n rightOffsets[_end] = right;\n right += colWidths[_end] || 0;\n }\n }\n\n return {\n left: leftOffsets,\n right: rightOffsets\n };\n }, [colWidths, columCount, direction]);\n return stickyOffsets;\n}", "title": "" }, { "docid": "c0ab60cb4812b1b66770083a57355643", "score": "0.57631224", "text": "get oldWidth() {\n if (this.i.b == null) {\n return null;\n }\n if (!this.i.b.externalObject) {\n let e = new IgrColumnWidth();\n e._implementation = this.i.b;\n this.i.b.externalObject = e;\n }\n return this.i.b.externalObject;\n }", "title": "" }, { "docid": "83ae14702aaf4b1b232317a996400ed0", "score": "0.5759814", "text": "get width() {\n const noOverlap = this._width\n const overlap = Math.min(100, this._width * 1.7)\n\n // Containers can always grow.\n if (this.rows) {\n return overlap\n }\n\n // Rows can grow if they have leaves.\n if (this.leaves) {\n return this.leaves.length > 0 ? overlap : noOverlap\n }\n\n // Leaves can grow unless they're the last item in a row.\n const { leaves } = this.row\n const index = leaves.indexOf(this)\n return index === leaves.length - 1 ? noOverlap : overlap\n }", "title": "" }, { "docid": "175f2ad8deb0aac4c54d9f33c80a3dbd", "score": "0.5753846", "text": "fixWidths() {\n const me = this,\n {\n element,\n header,\n footer\n } = me;\n\n if (!me.collapsed) {\n if (me.flex) {\n header.flex = me.flex;\n\n if (footer) {\n footer.flex = me.flex;\n }\n\n element.style.flex = me.flex;\n } else {\n // If width is calculated and no column is using flex, check if total width is less than width. If so,\n // recalculate width and bail out of further processing (since setting width will trigger again)\n if (me.hasCalculatedWidth && !me.columns.some(col => !col.hidden && col.flex) && me.totalFixedWidth !== me.width) {\n me.width = me.totalFixedWidth; // Setting width above clears the hasCalculatedWidth flag, but we want to keep it set to react correctly\n // next time\n\n me.hasCalculatedWidth = true;\n return;\n }\n\n let totalWidth = me.width;\n\n if (!totalWidth) {\n totalWidth = 0; // summarize column widths, needed as container width when not using flex widths and for correct\n // overflow check in Edge\n\n for (const col of me.columns) {\n if (!col.flex && !col.hidden) totalWidth += col.width;\n }\n } // rows are absolutely positioned, meaning that their width won't affect container width\n // hence we must set it, if not using flex\n\n element.style.width = `${totalWidth}px`;\n header.width = totalWidth;\n\n if (footer) {\n footer.width = totalWidth;\n }\n }\n\n me.syncScrollingPartners(false);\n }\n }", "title": "" }, { "docid": "34f0927f04565f2cf1b13f8ad8a47b91", "score": "0.57376635", "text": "recalculateColumnWidths(){if(!this._columnTree){return;// No columns\n}const cols=this._getColumns().filter(col=>!col.hidden&&col.autoWidth);this._recalculateColumnWidths(cols)}", "title": "" }, { "docid": "d875edcb1b9d9f1549e5a90a360be986", "score": "0.5733356", "text": "function _minWidth (col) {\n var padding = col.padding || []\n var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)\n if (col.border) minWidth += 4\n return minWidth\n}", "title": "" }, { "docid": "d875edcb1b9d9f1549e5a90a360be986", "score": "0.5733356", "text": "function _minWidth (col) {\n var padding = col.padding || []\n var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)\n if (col.border) minWidth += 4\n return minWidth\n}", "title": "" }, { "docid": "d875edcb1b9d9f1549e5a90a360be986", "score": "0.5733356", "text": "function _minWidth (col) {\n var padding = col.padding || []\n var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)\n if (col.border) minWidth += 4\n return minWidth\n}", "title": "" }, { "docid": "d875edcb1b9d9f1549e5a90a360be986", "score": "0.5733356", "text": "function _minWidth (col) {\n var padding = col.padding || []\n var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)\n if (col.border) minWidth += 4\n return minWidth\n}", "title": "" }, { "docid": "d875edcb1b9d9f1549e5a90a360be986", "score": "0.5733356", "text": "function _minWidth (col) {\n var padding = col.padding || []\n var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)\n if (col.border) minWidth += 4\n return minWidth\n}", "title": "" }, { "docid": "5264d327f5acb115e81b91a8efe2b3cb", "score": "0.5723949", "text": "touchSidebarWidth() {\n // if the sidebar is open and start point of drag is inside the sidebar\n // we will only drag the distance they moved their finger\n // otherwise we will move the sidebar to be below the finger.\n\n const { pullRight, open, width } = this.props;\n const { touchStartX, touchCurrentX } = this.state;\n\n if (pullRight) {\n if (open && window.innerWidth - touchStartX < width) {\n if (touchCurrentX > touchStartX) {\n return width + touchStartX - touchCurrentX;\n }\n return width;\n }\n return Math.min(window.innerWidth - touchCurrentX, width);\n }\n\n if (open && touchStartX < width) {\n if (touchCurrentX > touchStartX) {\n return width;\n }\n return width - touchStartX + touchCurrentX;\n }\n return Math.min(touchCurrentX, width);\n }", "title": "" }, { "docid": "1db15e285a31be119d1cb7c800124a05", "score": "0.5717504", "text": "function wa(e){for(var t=e.display,a={},n={},r=t.gutters.clientLeft,f=t.gutters.firstChild,o=0;f;f=f.nextSibling,++o)a[e.options.gutters[o]]=f.offsetLeft+f.clientLeft+r,n[e.options.gutters[o]]=f.clientWidth;return{fixedPos:xa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:a,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}", "title": "" }, { "docid": "f701cbc7d1efb3ff130081bd57c984d8", "score": "0.57039", "text": "function getWidth(type){\r\n\t\t\t\tvar width = 0;\r\n\t\t\t\tif (type == 'header'){\r\n\t\t\t\t\twidth = getCellWidth(headerCell);\r\n\t\t\t\t} else {\r\n\t\t\t\t\topts.finder.getTr(target,0,type).find('td[field=\"' + field + '\"] div.datagrid-cell').each(function(){\r\n\t\t\t\t\t\tvar w = getCellWidth($(this));\r\n\t\t\t\t\t\tif (width < w){\r\n\t\t\t\t\t\t\twidth = w;\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\treturn width;\r\n\t\t\t\t\r\n\t\t\t\tfunction getCellWidth(cell){\r\n\t\t\t\t\treturn cell.is(':visible') ? cell._outerWidth() : tmp.html(cell.html())._outerWidth();\r\n\t\t\t\t}\r\n\t\t\t}", "title": "" }, { "docid": "b3fb331d43a6702c39458506799fda2e", "score": "0.5655731", "text": "function scrollWidth() {\n var div = document.createElement('div');\n div.style.overflowY = 'scroll';\n div.style.width = '50px';\n div.style.height = '50px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n var paddingRight = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n\n return paddingRight;\n }", "title": "" }, { "docid": "c40b8397f11c170d125f45db984ae349", "score": "0.56480694", "text": "function getScrollbarWidth() {\n var div = $('<div style=\"width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;\"><div style=\"height:100px;\"></div></div>');\n $('body').append(div);\n var w1 = $('div', div).innerWidth();\n div.css('overflow-y', 'auto');\n var w2 = $('div', div).innerWidth();\n $(div).remove();\n return (w1 - w2);\n }", "title": "" }, { "docid": "7e6d207485f482864569aa83fbf7c2b2", "score": "0.56366026", "text": "get width() {\n\t\treturn this._viewport[2];\n\t}", "title": "" }, { "docid": "47e2d909aa6b83d096c6ee40c4e9aa0d", "score": "0.5632895", "text": "getUsedWidth() {\n return this.usedWidth;\n }", "title": "" }, { "docid": "a2a26aca667dde9136c1338cb4813c3f", "score": "0.5624357", "text": "_getWidth() {\n const measurer = this._document.createElement('div');\n measurer.className = 'modal-scrollbar-measure';\n const body = this._document.body;\n body.appendChild(measurer);\n const width = measurer.getBoundingClientRect().width - measurer.clientWidth;\n body.removeChild(measurer);\n return width;\n }", "title": "" }, { "docid": "f6d42e7c20dfcac584d943f4550709d7", "score": "0.56123203", "text": "get minWidth() {}", "title": "" }, { "docid": "fc7eb91f03151ffe8f86df90fd1ab408", "score": "0.5607291", "text": "function getWidth(self) {\r\n return (\r\n parseInt(self.clientWidth) -\r\n parseInt(window.getComputedStyle(self).getPropertyValue(\"padding-left\")) -\r\n parseInt(window.getComputedStyle(self).getPropertyValue(\"padding-right\"))\r\n );\r\n}", "title": "" }, { "docid": "7d3d33ea72064b90573c324c0ce3038c", "score": "0.5606945", "text": "fixWidths() {\n const me = this,\n { element, header, footer } = me;\n\n if (me.flex) {\n header.flex = me.flex;\n if (footer) {\n footer.flex = me.flex;\n }\n element.style.flex = me.flex;\n } else {\n // If width is calculated and no column is using flex, check if total width is less than width. If so,\n // recalculate width and bail out of further processing (since setting width will trigger again)\n if (\n me.hasCalculatedWidth &&\n !me.columns.some((col) => !col.hidden && col.flex) &&\n me.totalFixedWidth !== me.width\n ) {\n me.width = me.totalFixedWidth;\n // Setting width above clears the hasCalculatedWidth flag, but we want to keep it set to react correctly\n // next time\n me.hasCalculatedWidth = true;\n return;\n }\n\n let totalWidth = me.width;\n\n if (!totalWidth) {\n totalWidth = 0;\n\n // summarize column widths, needed as container width when not using flex widths and for correct\n // overflow check in Edge\n for (let col of me.columns) {\n if (!col.flex && !col.hidden) totalWidth += col.width;\n }\n }\n\n // rows are absolutely positioned, meaning that their width won't affect container width\n // hence we must set it, if not using flex\n element.style.width = `${totalWidth}px`;\n\n header.width = totalWidth;\n if (footer) {\n footer.width = totalWidth;\n }\n }\n\n me.syncScrollingPartners(false);\n }", "title": "" }, { "docid": "72f7d12bb4b787d4b2d4d023dc37a50e", "score": "0.56066096", "text": "function getColumnsCount() {\r\n}", "title": "" }, { "docid": "730789f31390fc040ccca0f8373f6416", "score": "0.5605417", "text": "function getRelativeColStart(col) {\r\n\t\tvar loc = new Point(sets.columns[col],0);\r\n\t\tvar offset = getRelativePoint(loc);\r\n\t\treturn offset.x;\r\n\t}", "title": "" }, { "docid": "0a545f2240985cd18d142352fbae0d51", "score": "0.55965227", "text": "function getWidth(opts, type) {\n var width = 0;\n opts.finder.getTr(target, 0, type, undefined, state).find('td[field=\"' + field + '\"] div.datagrid-cell').each(function () {\n var w = $(this)._outerWidth();\n if (width < w) {\n width = w;\n }\n });\n return width;\n }", "title": "" }, { "docid": "921f62f326b8da39f3f9e0ba17073286", "score": "0.55960125", "text": "_handleFrozenColumnPositions() {\r\n const that = this,\r\n rightToLeft = that.rightToLeft,\r\n columns = that._columns;\r\n let frozenNear = [],\r\n frozenFar = [],\r\n selectionModifier = 0;\r\n\r\n function applyStyle(property, index, value, i, zIndex) {\r\n Array.from(that.$.tableContainer.querySelectorAll(`th:nth-child(${index + 1}), td:nth-child(${index + 1})`)).\r\n forEach(td => {\r\n td.style[property] = value + 'px';\r\n\r\n if (zIndex) {\r\n td.style.zIndex = 2 + i;\r\n }\r\n });\r\n }\r\n\r\n if (that.selection) {\r\n if (!rightToLeft) {\r\n frozenNear.push(0);\r\n }\r\n else {\r\n frozenFar.push(0);\r\n }\r\n\r\n selectionModifier = 1;\r\n }\r\n\r\n for (let i = 0 + selectionModifier; i < columns.length + selectionModifier; i++) {\r\n const column = columns[i - selectionModifier];\r\n\r\n if (!column.freeze) {\r\n continue;\r\n }\r\n\r\n if (!rightToLeft && column.freeze === 'far' ||\r\n rightToLeft && column.freeze !== 'far') {\r\n frozenFar.push(i);\r\n }\r\n else {\r\n frozenNear.push(i);\r\n }\r\n }\r\n\r\n if (frozenNear.length < 2 && frozenFar.length < 2) {\r\n return;\r\n }\r\n\r\n const headerCells = that.$.tableContainer.firstElementChild.querySelectorAll('th'),\r\n widths = [];\r\n\r\n for (let i = 0; i < headerCells.length; i++) {\r\n widths.push(headerCells[i].offsetWidth);\r\n }\r\n\r\n if (!rightToLeft) {\r\n for (let i = 1; i < frozenNear.length; i++) {\r\n const index = frozenNear[i];\r\n let left = 0;\r\n\r\n for (let j = 0; j < index; j++) {\r\n if (frozenNear.indexOf(j) !== -1) {\r\n left += widths[j];\r\n }\r\n }\r\n\r\n applyStyle('left', index, left, i, false);\r\n }\r\n\r\n for (let i = 0; i < frozenFar.length - 1; i++) {\r\n const index = frozenFar[i];\r\n let right = 0;\r\n\r\n for (let j = index + 1; j < widths.length; j++) {\r\n if (frozenFar.indexOf(j) !== -1) {\r\n right += widths[j];\r\n }\r\n }\r\n\r\n applyStyle('right', index, right, i, true);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // right-to-left\r\n for (let i = 0; i < frozenNear.length - 1; i++) {\r\n const index = frozenNear[i];\r\n let left = 0;\r\n\r\n for (let j = index + 1; j < widths.length; j++) {\r\n if (frozenNear.indexOf(j) !== -1) {\r\n left += widths[j];\r\n }\r\n }\r\n\r\n applyStyle('left', index, left, i, true);\r\n }\r\n\r\n for (let i = 1; i < frozenFar.length; i++) {\r\n const index = frozenFar[i];\r\n let right = 0;\r\n\r\n for (let j = 0; j < index; j++) {\r\n if (frozenFar.indexOf(j) !== -1) {\r\n right += widths[j];\r\n }\r\n }\r\n\r\n applyStyle('right', index, right, i, false);\r\n }\r\n }", "title": "" }, { "docid": "23b44c899175d80a2547774f66e99469", "score": "0.55945235", "text": "function computeCustomizedWidth(){\n\tvar note_div = document.querySelector('#note_div');\n\tvar largeWidth = note_div.offsetWidth;\n\tvar margin = NOTE_MARGIN;\n\t//border = 2px\n\tvar border = window.getComputedStyle(note_div).borderWidth[0];\n\treturn (largeWidth - (2*border))/numOfKey -(2*margin) -1;\n}", "title": "" }, { "docid": "049d1313f5b5b8b4d62bdfb1b0a0952e", "score": "0.5592315", "text": "_getScrollbarWidth() {\n if (this._scrollbarWidth === null) {\n const $el = $('<div>test</div>')\n .css({\n visibility: 'hidden',\n position: 'absolute',\n left: -10000,\n top: -10000,\n })\n .appendTo(document.body);\n const width = $el.width();\n\n $el.css('overflow-y', 'scroll');\n const newWidth = $el.width();\n\n $el.remove();\n\n this._scrollbarWidth = newWidth - width;\n }\n\n return this._scrollbarWidth;\n }", "title": "" }, { "docid": "a71d23b1abb7cd56c1ee9c92b05bd437", "score": "0.5591466", "text": "getActualWidth(row) {\n let width = 0;\n if (row.childWidgets.length > 0) {\n for (let i = 0; i < row.childWidgets.length; i++) {\n width += row.childWidgets[i].cellFormat.cellWidth;\n }\n }\n return width;\n }", "title": "" }, { "docid": "4978e0babb7dc9792ae1092113a24643", "score": "0.55899405", "text": "function _calc() {\n var winW = $w.width() < $t.width() ? $t.width() : $w.width();\n var realW = winW - 2 * cfg.navWidth - cfg.perNumber;\n var itemW = Math.floor(realW / cfg.perNumber);\n return itemW;\n }", "title": "" }, { "docid": "485b38da7ff3e1a82fdff50e461f88b3", "score": "0.5574904", "text": "function getCursorXoffset(){\n\t//Get Main content left padding\n\tvar mainContentStyle = getComputedStyle(document.getElementById(\"MainContent\"), null);\n\tvar leftPad = measureToNumber(mainContentStyle.paddingLeft);\n\t//Get Frame width for left and top and get frame top margin\n\tvar frameStyle = getComputedStyle(document.getElementById(\"Frame\"), null);\n\tvar frameLeftWidth = measureToNumber(frameStyle.borderLeftWidth);\n\treturn leftPad+frameLeftWidth;\n}", "title": "" }, { "docid": "4d19c9e349d251a1f102f2ccf2d3a669", "score": "0.5562732", "text": "cellCenterX(col) {\n return this.cellWidth * 1/2 + this.cellWidth * col\n }", "title": "" }, { "docid": "c0ffbf11c7ca5baf12d79b7efeace041", "score": "0.55599594", "text": "function getOffsetWidth(node, shouldBeMoreThan, defaultOffsetWidth) {\n\t\t\tvar minOffsetWidth = shouldBeMoreThan ? shouldBeMoreThan : 10;\n\t\t\tvar defValue = defaultOffsetWidth ? defaultOffsetWidth : 200;\n\n\t\t\tvar offsetWidth = minOffsetWidth;\n\t\t\twhile (node && node.offsetWidth != undefined) {\n\t\t\t\tif (node.offsetWidth > minOffsetWidth) {\n\t\t\t\t\toffsetWidth = node.offsetWidth;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toffsetWidth = offsetWidth > minOffsetWidth ? offsetWidth : defValue;\n\n\t\t\treturn offsetWidth;\n\t\t}", "title": "" }, { "docid": "9fd3920d64d93574cb7859b6190e44d9", "score": "0.5559735", "text": "get columnsCount() {\n return (this.endColumn - this.startColumn) + 1\n }", "title": "" }, { "docid": "1dade00865a27d33f8fe86dfdbb1f9d7", "score": "0.55554414", "text": "createLineupAdjustWidth (elem, name, spec, fixed) {\n let rankWidth = 0;\n let total = 0;\n let count = 0;\n let c1, c2;\n /* The final width value of 30 is to leave room for a scroll bar. */\n let width = $(elem)[0].getBoundingClientRect().width - fixed * 2 - 30;\n let col = spec.dataspec.layout.primary;\n for (c1 = 0; c1 < col.length; c1 += 1) {\n if (col[c1].children) {\n for (c2 = 0; c2 < col[c1].children.length; c2 += 1) {\n count += 1;\n total += this.lineupGetColumnWidth(name, col[c1].children[c2], fixed);\n }\n } else {\n if (col[c1].type === 'rank') { /* LineUp wants this to be 50 */\n rankWidth = this.lineupRankWidth + fixed;\n continue;\n }\n count += 1;\n total += this.lineupGetColumnWidth(name, col[c1], fixed);\n }\n }\n let avail = width - count * fixed - rankWidth;\n avail -= count + (rankWidth ? 1 : 0); // I'm not sure why this is necessary\n let scale = avail / total;\n for (c1 = 0; c1 < col.length; c1 += 1) {\n if (col[c1].children) {\n for (c2 = 0; c2 < col[c1].children.length; c2 += 1) {\n col[c1].children[c2].width = fixed + col[c1].children[c2].widthBasis * scale;\n }\n } else {\n col[c1].width = fixed + col[c1].widthBasis * scale;\n if (col[c1].type === 'rank') { /* LineUp wants this to be fixed */\n col[c1].width = this.lineupRankWidth + fixed;\n }\n }\n }\n return scale;\n }", "title": "" }, { "docid": "29e9ed0c7dc2d7a203ae936c54359ddc", "score": "0.55520517", "text": "function scrollbarWidth() {\n if (typeof document === 'undefined') {\n return 0;\n }\n\n var body = document.body;\n var box = document.createElement('div');\n var boxStyle = box.style;\n boxStyle.position = 'fixed';\n boxStyle.left = 0;\n boxStyle.visibility = 'hidden';\n boxStyle.overflowY = 'scroll';\n body.appendChild(box);\n var width = box.getBoundingClientRect().right;\n body.removeChild(box);\n return width;\n}", "title": "" }, { "docid": "06cee769cc1758f6bfedaeb810419be9", "score": "0.55502975", "text": "function findWidth() {\n if (noteStack == \"stack_bar_top\") {\n return \"100%\";\n }\n if (noteStack == \"stack_bar_bottom\") {\n return \"70%\";\n } else {\n return \"290px\";\n }\n }", "title": "" }, { "docid": "087d1d4180428fc13442aea30bfb5587", "score": "0.554021", "text": "getWidth() {\n return this.content >> 22 /* WIDTH_SHIFT */;\n }", "title": "" }, { "docid": "3b5da4f6f3323a4aaf07d726f0b31673", "score": "0.551755", "text": "getCurrentClosetWidth() {\n return this.closet.getClosetWidth();\n }", "title": "" }, { "docid": "9e26d017506d5933c03d48009770d7a2", "score": "0.55162686", "text": "getInnerWidth() {\n mustInherit();\n }", "title": "" }, { "docid": "98e09531ebedb99f93bed4331fcfb3c9", "score": "0.55053115", "text": "get col() {\n return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n }", "title": "" }, { "docid": "e7f537a350ef9fd05f2a47b2484fc9e6", "score": "0.5502091", "text": "topColumn() {\n return INDEX2COL(this.topLeft);\n }", "title": "" }, { "docid": "dbfe003dbed85980f09d856601fac0df", "score": "0.55014545", "text": "get gridItemWidth() {\n return windowWidth / this.perRow;\n }", "title": "" }, { "docid": "dbfe003dbed85980f09d856601fac0df", "score": "0.55014545", "text": "get gridItemWidth() {\n return windowWidth / this.perRow;\n }", "title": "" }, { "docid": "8f41c1b29d3fa9ff21706c015c67fd86", "score": "0.54961526", "text": "function redips_column(std){\n\tvar nrows = std.hall.nrows;\n\treturn nrows - 1 - (std.hall_position.charCodeAt(0) - 65); // 'A' is 65, 'B' is 66, .. Vertical offset -1\n}", "title": "" }, { "docid": "0528644de52d166c9a7c0f2cd0cc52ad", "score": "0.54898596", "text": "getWidth(index) {\n return this._data[index * CELL_SIZE + 0 /* CONTENT */] >> 22 /* WIDTH_SHIFT */;\n }", "title": "" }, { "docid": "60eeeb8438298f4dc16ace995030f8d2", "score": "0.5484278", "text": "function getOffset() {\n if (innerHeight < 600 || innerWidth < 1000) {\n return 105;\n }\n else {\n return 55;\n }\n}", "title": "" }, { "docid": "b4c01f9c4c062284785e1b18d2717bc5", "score": "0.5477608", "text": "getColumnsAmount() { //metodo para calcular a quantidade de coluna disponivel baseado no tamanho do bloco, para saber as dimensoes do celular\n const width = Dimensions.get('window').width\n return Math.floor(width / this.blockSize)\n }", "title": "" }, { "docid": "7360ee6d4a29bcc365db4c123987f7fa", "score": "0.547443", "text": "function columnwidth(){\n\t//this should affect whole page, so first we need to find every .row element\n\tlet allMyRows = document.querySelectorAll('.row');\n\t\n\t//we want a base minimum width for every column, I don't want them smaller than 150px\n\tlet baseWidth = 150;\n\t\n\t//loop through all of the rows \n\tallMyRows.forEach(function(e){\n\t\t//we need to know how wide the width is for the parent row\n\t\tlet myWidth = e.offsetWidth;\n\t\t\n\t\t//find direct children columns and how many there are\n\t\tlet allMyChildren = e.querySelectorAll(':scope >.column');//only selects the direct children of element\n\n\t\tlet myLength = allMyChildren.length;\n\t\t\n\t\t//find all the factors for my Length, take a number then try to divide it equally by every number smaller then itself, each success is a factor and can be put into an array.\n\t\tlet myFactors = [];\n\t\tfor (let num = myLength ; num > 0; num--){\t\n\t\t\tif (myLength % num === 0){\n\t\t\t\tmyFactors.push(num);//this array will have all positive factors, and will result in 2 length for primes.\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction setMinWidt(myarray,myvalue){\n\t\t\tfor (let i=0; i<myarray.length; i++){\n\t\t\t\tmyarray[i].style.minWidth = myvalue;\n\t\t\t}\n\t\t}\n\t\t//determine width of columns based on factors, baseWidth, and myWidth\n\t\t//first check if all columns will fit in space, if so do nothing\n\t\tif(baseWidth*myLength < myWidth){\n\t\t\tlet v = 150 + 'px'; //reset min width if enlarging\n\t\t\tsetMinWidt(allMyChildren,v); \n\t\t\t\n\t\t\t//do some different math for prime number of columns, lets set it up so that it tries to evenly spread the groups of columns, like a row of 6 then 5, or 2 rows of 4 then a row of 3, ect.\n\t\t} else if (myWidth <= 320){\n\t\t\tsetMinWidt(allMyChildren,'100%');\n\t\t} else if (myFactors.length === 2 ){\n\t\t\t\t for (let i=2; i < myLength; i++){\n\t\t\t\t\t let val = Math.ceil(Math.round(myLength/i));\n\t\t\t\t\t if (val*baseWidth < myWidth && val !== 1){ //if equal to one, let it default to normal widths/distributions\n\t\t\t\t\t\t let v = 100/val + '%';\n\t\t\t\t\t\t setMinWidt(allMyChildren,v);\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \n\t\t} else { // here we determine how much space we have and divide columns accordingly\n\t\t\tfor (let value of myFactors){\n\t\t\t\tif (value*baseWidth < myWidth && myWidth > 320){ //if smaller than 320 only allow single columns\n\t\t\t\t\tlet v = 100/value + '%';\t\n\t\t\t\t\tsetMinWidt(allMyChildren,v);\n\t\t\t\t\tbreak; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\t\n\t});\n}//end of column width function", "title": "" }, { "docid": "fb8d852b21f022b0e774ebf189cd0a94", "score": "0.5457964", "text": "function lisha_get_el_offsetWidth(el)\r\n{\r\n\treturn document.getElementById(el).offsetWidth;\r\n}", "title": "" }, { "docid": "c62e981c9b9357a6f4bd9fa8cfac85c8", "score": "0.54563177", "text": "function xa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}", "title": "" }, { "docid": "5c13e071e17167f959ac3c1be574fd32", "score": "0.54294825", "text": "function innerWidth(el){\n var style = window.getComputedStyle(el, null);\n return el.clientWidth -\n parseInt(style.getPropertyValue('padding-left'), 10) -\n parseInt(style.getPropertyValue('padding-right'), 10);\n }", "title": "" }, { "docid": "c0dcbc686bd9be7abb9bab57580f0052", "score": "0.5423298", "text": "private_getActiveColumnFromPosition()\n\t{\n\t\tif (g_mouse.x < this.coords.x || g_mouse.x > this.coords.x + this.size.x)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\tif (g_mouse.y < this.coords.y || g_mouse.y > this.coords.y + this.size.y)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t// Mouse is over the board, so return the column it's in\n\t\tlet columnSize = this.size.x / this.columns;\n\t\tlet distance = g_mouse.x - this.coords.x;\n\t\treturn Math.floor(distance / columnSize);\n\t}", "title": "" }, { "docid": "5ef0ae772a1cac108d5ccee7876d23a5", "score": "0.54157215", "text": "getWidth() {\n return this.$node.innerWidth();\n }", "title": "" }, { "docid": "b5460b409faf6fbf60025e669fe69fcf", "score": "0.54100746", "text": "function getElementWidth(element) {\n // Optimization: Check style.width first as we probably set it already before reading\n // offsetWidth which triggers layout.\n return coercePixelsFromCssValue(element.style.width) || element.offsetWidth;\n }", "title": "" }, { "docid": "98eef6bc9c598eb7caa42dc0be9c257e", "score": "0.5409924", "text": "function colsFromRowBeginning(currX, bufferService) {\n return currX - 1;\n}", "title": "" }, { "docid": "6748cdfe5df21516c6a5bd2cbdc4c7ac", "score": "0.54095495", "text": "function getScrollbarWidths(el){var leftRightWidth=el[0].offsetWidth-el[0].clientWidth;var bottomWidth=el[0].offsetHeight-el[0].clientHeight;var widths;leftRightWidth=sanitizeScrollbarWidth(leftRightWidth);bottomWidth=sanitizeScrollbarWidth(bottomWidth);widths={left:0,right:0,top:0,bottom:bottomWidth};if(getIsLeftRtlScrollbars()&&el.css('direction')==='rtl'){// is the scrollbar on the left side?\nwidths.left=leftRightWidth;}else{widths.right=leftRightWidth;}return widths;}", "title": "" }, { "docid": "d378bdaf0f52a896e5b2a82a7bcd15ed", "score": "0.5389158", "text": "function get_scroll_bar_width() {\n\n // no need on responsive mode.\n if ($(\"body\").hasClass(\"yp-responsive-device-mode\")) {\n return 0;\n }\n\n // If no scrollbar, return zero.\n if (iframe.height() <= $(window).height() && $(\"body\").hasClass((\"yp-metric-disable\"))) {\n return 0;\n }\n\n var inner = document.createElement('p');\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n var outer = document.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var w2 = inner.offsetWidth;\n if (w1 == w2) w2 = outer.clientWidth;\n\n document.body.removeChild(outer);\n\n return (w1 - w2);\n\n }", "title": "" }, { "docid": "199df2814b937f74ca09cca982439f74", "score": "0.5383237", "text": "function elementWidth(el) {\n var rect = el.getBoundingClientRect();\n return rect.right - rect.left;\n }", "title": "" } ]
6c4aa13e43a0885976ce209006d97682
Insert into profile page
[ { "docid": "21155098cb0649f55f917538c35c06e2", "score": "0.0", "text": "function insertLi(screen_name) {\n var span = $('<span>Twibes Profile</span>');\n\n var anchor = $('<a href=\"http://www.twibes.com/user/' + screen_name + '\"></a>');\n anchor.attr('target', '_blank');\n anchor.attr('id', 'twibes_anchor');\n anchor.attr('title', 'A twibe is a group of Twitter people with a common interest.');\n anchor.append(span);\n\n var tab = $('<li></li>');\n tab.attr('id', 'twibes_tab');\n tab.append(anchor);\n\n var nav = $('#primary_nav');\n nav.append(tab); \n}", "title": "" } ]
[ { "docid": "8be97355e8cac9b089f8beee36cd0205", "score": "0.68335354", "text": "function addProfile(){\n $('#profilename').append(decodeURI(QueryString.name));\n $('#profileage').append(decodeURI(QueryString.age));\n $('#profileresidence').append(decodeURI(QueryString.residence));\n $('#profilediagnosis').append(decodeURI(QueryString.diagnosis));\n }", "title": "" }, { "docid": "3c1cd7ab247801e2ed362851444b9599", "score": "0.662353", "text": "function addProfile() {\n validateURLParam();\n\n if(typeFeed == \"mentor\"){\n loadMentorData(username, \"profile\");\n }\n\n if(typeFeed == \"mentee\"){\n loadMenteeData(username, \"profile\");\n }\n}", "title": "" }, { "docid": "9c01ce97d0aaaaaf0cfd9bf4dc06da7c", "score": "0.6619858", "text": "function profile(profile){\n \n $(\"#Ufirstname\").val(`${profile[0]}`);\n $(\"#Ulastname\").val(`${profile[1]}`);\n $(\"#Uemail\").val(`${profile[2]}`);\n $(\"#Upassword\").val(`${profile[3]}`);\n $(\"#Uphone\").val(`${profile[4]}`);\n $(\"#Uaddress\").val(`${profile[5]}`);\n }", "title": "" }, { "docid": "1782da597f1b7c0effe3d72cd5b8eba7", "score": "0.6553933", "text": "function addUser(profile) {\n\tvar key = profile.provider + profile.id\n\tvar sql = 'SELECT providerID from usertable WHERE providerID = \\'' + key + '\\''\n\tcon.query(sql, function(err,rows,fields) {\n\tconsole.log(\"Outputing result of sql usertable find\",rows);\n\n\tconsole.log(profile.email);\n\tif (err)\n\t\tconsole.log(err);\n\tif (rows.length == 0) {\n\t\t var value = {providerID : key,\n\t\t\t\t\t\t\t\t\tdisplayName : profile.displayName,\n\t\t\t\t\t\t\t\t\tfirstName : profile.name.givenName,\n\t\t\t\t\t\t\t\t\tlastName : profile.name.familyName,\n\t\t\t\t\t\t\t\t\temail : profile.emails[0].value,\n\t\t\t\t\t\t\t\t\tphotoURL : \"foo.jpg\"}\n\t\t console.log(key);\n\t\t con.query('INSERT INTO usertable SET ?',value,function(err,rows,fields) {\n\t\t\t if (err)\n\t\t\t\tconsole.log(err)\n\t\t\telse {\n\t\t\t\tconsole.log(\"Added new user!!!\")\n\t\t\t }\n\t\t})\n\t}\n\t});\n}", "title": "" }, { "docid": "a63bfe817ffea3c85fb56872ad7dbd1b", "score": "0.648199", "text": "function generateProfile() {\n $(\"#profile-name\").text(`Name: ${currentUser.name}`);\n $(\"#profile-username\").text(`Username: ${currentUser.username}`);\n $(\"#profile-account-date\").text(`Account Created: ${currentUser.createdAt.slice(0, 10)}`);\n\n $navUserProfile.text(`${currentUser.username}`);\n }", "title": "" }, { "docid": "08eacae014f03962b0a1d175f565e81d", "score": "0.64223504", "text": "function generateProfile() {\n $(\"#profile-name\").text(`Name: ${currentUser.name}`);\n $(\"#profile-username\").text(`Username: ${currentUser.username}`);\n $(\"#profile-account-date\").text(`Account Created: ${currentUser.createdAt.slice(0, 10)}`);\n $(\"#profile-last-active\").text(`Last Active: ${currentUser.updatedAt.slice(0, 10)}`)\n $(\"#profile-favorited-number\").text(`Number of Favorited Articles: ${currentUser.favorites.length}`);\n $(\"#profile-submitted-number\").text(`Number of Submitted Articles: ${currentUser.ownStories.length}`);\n $(\"navUserProfile\").text(`${currentUser.username}`);\n }", "title": "" }, { "docid": "1df1af7000f395897a902b05df5b5ec9", "score": "0.6258699", "text": "function displayProfiles(profiles) {\n member = profiles.values[0];\n console.info(member);\n $(\"#first_name_id\").val(member.firstName);\n $(\"#last_name_id\").val(member.lastName);\n if( typeof member.emailAddress !=\"undefined\"){\n \t $(\"#id_email_1\").val(member.emailAddress)\n }\n if( typeof member.location !=\"undefined\"){\n \tif(typeof member.location.country !=\"undefined\"){\n \t\tvar country = member.location.country.code;\n \t\t$('#id_country').val(country.toUpperCase());\n \t}\n \t $(\"#address_id\").val(member.location.name);\n \t \n }\n /*\n document.getElementById(\"profiles\").innerHTML = \n \"<p id=\\\"\" + member.id + \"\\\">Hello \" + member.firstName + \" \" + member.lastName + \"</p>\";*/\n }", "title": "" }, { "docid": "38ecb887c6bede02c7549fdb476b9170", "score": "0.6253833", "text": "function insertUser(name, color, photo, id, fileid){\n\t/*var new_user = \"<img class=\\\"user-photo\\\" id=\\\"img_\" + id + \"\\\" src=\\\"\"+ photo +\"\\\" height=\\\"53px\\\" width=\\\"53px\\\" style=\\\"border:solid 4px \"+ color +\"\\\">\";\n\t$(\".users-container[data-fileid='\"+fileid+\"']\").html( $(\".users-container[data-fileid='\"+fileid+\"']\").html() + new_user);*/\n\t\n\tMessenger().post({\n\t\tmessage: name + \" joined\",\n\t\ttype: 'info',\n\t\tshowCloseButton: true\n\t});\n}", "title": "" }, { "docid": "04b29b2692447ab481b6bb96a62aa729", "score": "0.6199673", "text": "addProfileToUI({id, name, email, profession }) {\r\n // crating tr\r\n const tr = document.createElement('tr');\r\n tr.className = 'profile-list'\r\n tr.innerHTML = `\r\n <th scope=\"row\">${id}</th>\r\n <td>${name}</td>\r\n <td>${email}</td>\r\n <td>${profession}</td>\r\n <input type =\"hidden\" data-id = ${id}>\r\n <td\">Delete <i class=\"fas fa-trash delete\"></i></td>\r\n `\r\n document.querySelector('#profile-output').appendChild(tr);\r\n }", "title": "" }, { "docid": "33add00d3775c8426c92ed049ef925eb", "score": "0.61775", "text": "function createProfile(e) {\n e.preventDefault();\n\n // Get all values\n const name = profileName.value;\n const profe = profileProfe.value;\n const skills = profileSkills.value;\n const about = profileAbout.value;\n\n if (!name || !profe || !skills || !about || !about) {\n // Show basic alerts\n inputs.forEach((input) => {\n if (!input.value) {\n displayAlert(\"Input Your Data\", \"alert__danger\", input.parentElement);\n }\n });\n if (!about) {\n displayAlert(\"Input Your Data\", \"alert__danger\", textarea.parentElement);\n }\n } else {\n // Set data at profile section\n addProfile(name, profe, skills, about);\n\n displaySuccess(\"Added Profile successfully!\", \"alert__success\");\n\n // Back to Default\n backToDefault();\n\n // Add Local Storage\n addLocalStorage(name, profe, skills, about);\n }\n}", "title": "" }, { "docid": "ddf6d5a09b0a6ee4ab7f38180e17a5cb", "score": "0.6165728", "text": "function PROFILE_CreateProfile()\n{\n\treturn MESSAGE_SetProfile(\"\", MainData.Username, \"\", \"\", \"\");\n}", "title": "" }, { "docid": "4aeb17c07d57ca2f61f5846f5af24c86", "score": "0.61383283", "text": "regist() {\n const profile = this.state.profile;\n if (!profile.name || profile.name.replace(/\\s/g, '') === '') {\n Alert.alert('Profile', 'Please input your name.');\n return;\n }\n\n const emailFilter = /^\\w+([\\\\.-]?\\w+)*@\\w+([\\\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n if (emailFilter.test(profile.email) === false) {\n Alert.alert('Profile', 'Please input your correct email.');\n return;\n }\n\n let image = '';\n if (profile.imageResource) {\n image = profile.imageResource.data;\n }\n\n const education = this.cleanHistory(profile.education, 'edu');\n const experience = this.cleanHistory(profile.experience, 'work');\n\n const fieldSet = {\n name: profile.name,\n email: profile.email,\n location: profile.location,\n about: profile.about || '',\n education,\n experience,\n image,\n };\n\n UserUtil.editGeneral(this.onUploadCallback.bind(this), fieldSet);\n }", "title": "" }, { "docid": "e78ad6f7c8ba24c83aa43b29bbf81860", "score": "0.6134296", "text": "function displayProfile() {\n // display the profile\n $('.user-ava img').attr('src', userProfile.picture);\n $('.user-name').text(userProfile.name);\n }", "title": "" }, { "docid": "ebdaab4caeb9ee0c8e0d672ec3197145", "score": "0.6123671", "text": "function appendUserData() {\n document.querySelector('#name').value = _currentUser.displayName;\n document.querySelector('#mail').value = _currentUser.email;\n document.querySelector('#imagePreview').src = _currentUser.img;\n}", "title": "" }, { "docid": "5f806681dd5fe033358e3193b7562054", "score": "0.6103216", "text": "function querySuccess(tx, results) {\r\n\tvar user = results.rows.item(0);\r\n\t\r\n\t// add user favorite destination info to template\r\n $('#profile_info').append('<p>Crawl Destination: ' + user['favdest'] + '</p><p><a href=\"./profilechangedest.html\" rel=\"external\">Change Destination</a></p>');\r\n\t// add user favorite beer info to template\r\n $('#profile_info').append('<p>Favorite Beer: ' + user['favbeer'] + '</p><p><a href=\"./profilechangebeer.html\" rel=\"external\">Change Favorite Beer</a></p>');\r\n // add user favorite drink info to template\r\n $('#profile_info').append('<p>Favorite Drink: ' + user['favdrink'] + '</p><p><a href=\"./profilechangedrink.html\" rel=\"external\">Change Favorite Drink</a></p>');\r\n // add user favorite bar info to template\r\n $('#profile_info').append('<p>Favorite Bar: ' + user['favbar'] + '</p><p><a href=\"./profilechangebar.html\" rel=\"external\">Change Favorite Bar</a></p>');\r\n}", "title": "" }, { "docid": "12982b46a3a5f48ec4be65dc2d5e0db9", "score": "0.60908043", "text": "function addProfile(req,res) {\n let userProfile = setUserProfile(req);\n\n if(!userProfile[1] && !userProfile[2] && !userProfile[3]) {\n console.log('HANDLER addProfile func: all values null');\n res.redirect('/petition');\n } else {\n //add them to the database\n return dbQuery.addProfile(userProfile).then(() => {\n res.redirect('/petition');\n });\n }\n}", "title": "" }, { "docid": "05b8923165e5e636255fa1794f300683", "score": "0.6075027", "text": "function addUser(userProfile){\n return db.one(\"insert into users (name,propic,isloggedin,idfb) values ($1, $2, $3, $4) returning id\", [userProfile.displayName,userProfile.photos[0].value,true,userProfile.id])\n // named parameters accepting the array index? (they do accept layered objects)\n}", "title": "" }, { "docid": "4da11ddbd36f6b60db17f565a3218608", "score": "0.6063929", "text": "function populateProfileInfo() {\n\tdocument.getElementById('pro_username').innerHTML = document.getElementById(\n\t\t'change_username'\n\t).value;\n\tdocument.getElementById('pro_age').innerHTML = document.getElementById(\n\t\t'change_age'\n\t).value;\n\tdocument.getElementById('pro_country').innerHTML = document.getElementById(\n\t\t'change_country'\n\t).value;\n\tdocument.getElementById('pro_goalweight').innerHTML = document.getElementById(\n\t\t'change_goalweight'\n\t).value;\n\tdocument.getElementById('about_me').innerHTML = document.getElementById(\n\t\t'change_about'\n\t).value;\n\tdocument.getElementById('pro_favgym').innerHTML = document.getElementById(\n\t\t'change_favgym'\n\t).value;\n\tdocument.getElementById('pro_favworkout').innerHTML = document.getElementById(\n\t\t'change_favworkout'\n\t).value;\n\tdocument.getElementById('pro_favrecipe').innerHTML = document.getElementById(\n\t\t'change_favrecipe'\n\t).value;\n}", "title": "" }, { "docid": "5348b2e369ed7956848e5fc41342c295", "score": "0.60550934", "text": "function insertUser(userData) {\n $.post(\"/api/tutors\", userData)\n //.then(getAuthors);\n }", "title": "" }, { "docid": "3494bbe5326cff56fc5f921dfc84d2e8", "score": "0.6033416", "text": "function submitProfile(newProfile) {\n \n }", "title": "" }, { "docid": "8b69eb71c4983178dcac3aa5ec21dd31", "score": "0.6023751", "text": "function addData(data) {\n Profiles.insert(data);\n}", "title": "" }, { "docid": "a6bd80af623fcbd56054889b140dbc4a", "score": "0.5980911", "text": "function insertArtist(artist) {\n console.log(\"CREATEPROFILE.js: \" + JSON.stringify(artist));\n $.ajax(\"/api/create-profile\", {\n type: \"POST\",\n data: artist //Pass the artist object\n }).then(function() {\n //console.log(\"POST Artist Profile = \"+artist);\n console.log(\"CREATE-PROFILE: NEW PROFILE WAS LOADED SUCCESSFULLY\");\n\n //disable resubmit button\n $(\"#create-profile-btn\").prop(\"disabled\", true);\n console.log(\"ARTIST NAME = \" + artistName);\n $(\"#add-listing-redirect-btn\").attr(\"artist-name-data\", artistName);\n clearPage();\n\n //Set the data-state attribute on the create-page to 1\n //$(\"#create-profile-btn\").attr(\"data-state\", 1);\n\n //Change location to listing page if artist inserted\n location.replace(\"/html/add-listing/\" + artistName);\n\n //no page reload page\n //location.reload();\n });\n } //insert Profile", "title": "" }, { "docid": "ed47ab7bc9ddbf850b1c3335946ce900", "score": "0.59789735", "text": "function Profile() {\n $(`#navbar`).load(`Navbar.html`);\n $(`#profile`).empty();\n $(`#btn-content`).empty();\n $(`#mileage-records`).empty();\n $(`#uploads`).empty();\n $(`#recommendations`).empty();\n\n let header = `<h5 class=\"text-center mt-2\">Profile</h5>`;\n let userProfile = `<div class=\"card mt-0\" id=\"user-information\">\n <div class=\"card-body\">\n <form>\n <div class=\"form-group\">\n <label for=\"add-first-name\" class=\"col-form-label\">First Name</label>\n <input type=\"text\" class=\"form-control\" id=\"add-first-name\" required>\n <span for=\"add-first-name\" class=\"text-danger\" name=\"addFirstName\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-last-name\" class=\"col-form-label\">Last Name</label>\n <input type=\"text\" class=\"form-control\" id=\"add-last-name\" required>\n <span for=\"add-last-name\" class=\"text-danger\" name=\"addLastName\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-phone-number\" class=\"col-form-label\">Phone Number</label>\n <input type=\"text\" class=\"form-control\" id=\"add-phone-number\" required>\n <span for=\"add-phone-number\" class=\"text-danger\" name=\"addPhoneNumber\"></span>\n </div>\n <div class=\"form-group\">\n <input type=\"button\" class=\"btn btn-primary\" onclick=\"UpdateUserProfile()\" value=\"Update Profile\" />\n </div>\n </form>\n </div>\n </div>`;\n\n let userAddress = `<div class=\"card\" id=\"user-address\">\n <div class=\"card-body\">\n <form>\n <div class=\"form-group\">\n <label for=\"add-address-line-one\" class=\"col-form-label\">Address Line One</label>\n <input type=\"text\" class=\"form-control\" id=\"add-address-line-one\" required>\n <span for=\"add-address-line-one\" class=\"text-danger\" name=\"addAddressLineOne\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-address-line-two\" class=\"col-form-label\">Address Line Two</label>\n <input type=\"text\" class=\"form-control\" id=\"add-address-line-two\" required>\n <span for=\"add-address-line-two\" class=\"text-danger\" name=\"addAddressLineTwo\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-city\" class=\"col-form-label\">City</label>\n <input type=\"text\" class=\"form-control\" id=\"add-city\" required>\n <span for=\"add-city\" class=\"text-danger\" name=\"addCity\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-state-abbreviation\" class=\"col-form-label\">State Abbreviation</label>\n <input type=\"text\" class=\"form-control\" id=\"add-state\" required>\n <span for=\"add-state\" class=\"text-danger\" name=\"addState\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-zip-code\" class=\"col-form-label\">Zip Code</label>\n <input type=\"number\" class=\"form-control\" id=\"add-zip-code\" required>\n <span for=\"add-zip-code\" class=\"text-danger\" name=\"addZipCode\"></span>\n </div>\n <div class=\"form-group\">\n <input type=\"button\" class=\"btn btn-primary\" onclick=\"UpdateAddress()\" value=\"Update Address\" />\n </div>\n </form>\n </div>\n </div>`;\n\n let userServices = ` <div class=\"card text-center\" id=\"user-services\">\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"col-12 table table-bordered table-hover\">\n <thead class=\"thead-dark\">\n <tr>\n <th>Name</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody id=\"services\">\n \n </tbody>\n </table>\n </div>\n </div>\n </div>`;\n\n let createServices = `<div class=\"card\">\n <div class=\"card-body\">\n <form>\n <div class=\"form-group\">\n <select id=\"select-service\" multiple>\n <option value=\"GrubHub\">Grubhub</option>\n <option value=\"DoorDash\">DoorDash</option>\n <option value=\"Uber\">Uber</option>\n <option value=\"PostMates\">PostMates</option>\n <option value=\"Lyft\">Lyft</option>\n <option value=\"Amazon Restaurants\">Amazon R</option>\n <option value=\"Zomato\">Zomato</option>\n <option value=\"Swiggy\">Swiggy</option>\n <option value=\"Personal\">Personal</option>\n </select>\n <span name=\"addServices\" class=\"text-danger\"></span> \n </div> \n <div class=\"form-group\">\n <input type=\"button\" class=\"btn btn-primary\" onclick=\"AddServices()\" value=\"Add Services\" />\n </div>\n </form>\n </div>\n </div>`;\n\n $(`#profile`).append(header);\n $(`#profile`).append(userProfile);\n $(`#profile`).append(userAddress);\n $(`#profile`).append(createServices);\n $(`#profile`).append(userServices);\n $(\"select\").selectpicker();\n\n $.ajax({\n type: \"GET\",\n url: \"https://localhost:5001/api/UserProfile\",\n headers: { Authorization: \"Bearer \" + currentUser.token },\n contentType: \"application/json\",\n error: error => {\n console.log(error);\n },\n success: result => {\n console.log(result);\n $(`#add-first-name`).val(result.firstName);\n $(`#add-last-name`).val(result.lastName);\n $(`#add-phone-number`).val(result.phoneNumber);\n }\n });\n\n $.ajax({\n type: \"GET\",\n url: \"https://localhost:5001/api/Address\",\n headers: { Authorization: \"Bearer \" + currentUser.token },\n contentType: \"application/json\",\n error: error => {\n console.log(error);\n },\n success: result => {\n console.log(result);\n $(`#add-address-line-one`).val(result.addressLineOne);\n $(`#add-address-line-two`).val(result.addressLineTwo);\n $(`#add-city`).val(result.city);\n $(`#add-state`).val(result.stateAbbreviation);\n $(`#add-zip-code`).val(result.zipCode);\n }\n });\n\n GetServices();\n}", "title": "" }, { "docid": "a4f3bb938b4b02b7babcff16d241e1e0", "score": "0.59702706", "text": "function insertUser(newUser){\n\n $.ajax({\n url: '/signup/adduser',\n data: JSON.stringify(newUser),\n method: 'POST',\n dataType: 'json',\n contentType: 'application/json'\n\n\n })\n// success callback and send query string to the profile page to capture the user profile\n .done(data =>{\n let newUsrId = data[0]._id;\n $(location).attr('href','./profile?_id='+ newUsrId);\n })\n// error callback\n .fail((err,status)=>{\n $('div.error').text(err.responseText);\n });\n\n}", "title": "" }, { "docid": "61426ca271ebab8ecb9d765679121792", "score": "0.5958208", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n console.log(\"Google profile has arrived\", profile);\n\n let userid = profile.id;\n let name = profile.name.givenName;\n dbo.insertProfile(userid,name).then(\n console.log(\"Profile storede in DB\")).catch(\n function(error) {\n console.log(\"error inserting entry:\", error);\n response.send(\"Error inserting\");\n }\n );\n done(null, userid);\n}", "title": "" }, { "docid": "0e7ec78757fb6609956802f4e6a1daf4", "score": "0.5955932", "text": "function insert_profile_picture(data, element) {\n\t\tif (data.meta.code == 200) {\n\t\t\t$(element).find('img:first').attr('src',data.data.profile_picture);\n\t\t}\n\t}", "title": "" }, { "docid": "fc71c939d782d5bccbc88c3ab06dc101", "score": "0.5952338", "text": "function registerPassenger(){\n\t\tvar sfname=$(\"#fname\").val();\n\t\tvar slname=$(\"#lname\").val();\n\t\tvar sage=$(\"#age\").val();\n\t\tvar spass=$(\"#pass\").val();\n\t\tvar smobile=$(\"#mobile\").val();\n\t\tvar saddress=$(\"#address\").val();\n\t\tdbName.transaction(function(tx){\n\t\t\ttx.executeSql(\"insert into passengertable(pfname,plname,page,ppass,pphone,paddress) values(?,?,?,?,?,?)\",[sfname,slname,sage,spass,smobile,saddress]);\n\t\t});\n\t\ttoastAlert(\"Successfully Saved Profile\");\n\t}", "title": "" }, { "docid": "3132514ac0f348aaa02b7e038a867231", "score": "0.5930386", "text": "function displayProfile(profile){\n document.querySelector(\".section_title\").innerHTML = \"Welcome, \" + Object.keys(profile)[0];\n\n var bio = document.querySelector(\"#profile\");\n\n var profile_picture = document.createElement('div');\n profile_picture.innerHTML = \"<img id =\\\"profile-picture\\\" src=\\\"images/noprofile.jpg\\\" alt=\\\"profile\\\"/>\";\n profile_picture.classList.add('col-4');\n\n var info = document.createElement('div');\n info.innerHTML = \"<p>\" + Object.keys(profile)[0] + \"</p>\" + \"<p>\" + profile[Object.keys(profile)[0]].email + \"</p>\" + \"<p> Finished \" + profile[Object.keys(profile)[0]].completed + \" Tasks!</p>\";\n\n bio.append(profile_picture);\n bio.append(info);\n}", "title": "" }, { "docid": "ca40d58032067fe2b73ab07fc5100f43", "score": "0.5928435", "text": "function profileClick(accountID) {\n $(\"#profile-new\").click(function (event) {\n window.location.href = \"/gwa/pages/profile.html?accountID=\" + accountID;\n })\n }", "title": "" }, { "docid": "913e974c2dd024b48522f4a9cfc71789", "score": "0.5918091", "text": "function showProfilFrom() {\n _get('profile_add','', 'contentModalProfil', '');\n _showModal('frmProfilModal');\n}", "title": "" }, { "docid": "085f7b45508bd5ab8c3e4b624955b183", "score": "0.59087557", "text": "function addData(data) {\n console.log(` Adding: ${data.name} (${data.owner})`);\n Profiles.insert(data);\n}", "title": "" }, { "docid": "035b81a99c9bfe9db07b4520184f7943", "score": "0.5907274", "text": "function sendProfile(){\n\tquery = prepForQuery(getFormVars('cp_prof'));\n\t\n\t$j.ajax({\n\t\tdata: query,\n\t\tsuccess: recProf,\n\t\ttype: 'POST',\n\t\turl: 'profile/update'\n\t});\n}", "title": "" }, { "docid": "92122d088e1b6c4d563f8c66faa4e525", "score": "0.59053594", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n console.log(\"Google profile\",profile);\n /* \n let fullname = profile.name;\n \n let cmd =\n \"INSERT INTO GradTable (fullname) VALUES(fullname)\";\n gradDB.run(cmd, fullname, function(err) {\n if (err) {\n console.log(\"DB insert error\", err.message);\n } else {\n console.log(\"DB name insert successful\");\n } \n }); */\n // here is a good place to check if user is in DB,\n // and to store him in DB if not already there. \n // Second arg to \"done\" will be passed into serializeUser,\n // should be key to get user out of database.\n\n let dbRowID = 1; // temporary! Should be the real unique\n // key for db Row for this user in DB table.\n // Note: cannot be zero, has to be something that evaluates to\n // True. \n\n done(null, dbRowID); \n}", "title": "" }, { "docid": "95fe550cabee0abe081fe4c1373af21c", "score": "0.59049666", "text": "function setProfile(data){\n userPicks.name = data.name;\n userPicks.password = data.password;\n userPicks.height = data.height;\n userPicks.gender = data.gender;\n userPicks.ability = data.ability;\n userPicks.baseNum = data.baseNum;\n userPicks.eyesNum = data.eyesNum;\n userPicks.chestNum = data.chestNum;\n userPicks.extrasNum = data.extrasNum;\n}", "title": "" }, { "docid": "ec1e31ac540807463557b1e3bc8d8b91", "score": "0.5904734", "text": "function add_profile(input) {\n\tconst profiles = profiles_data();\n\tlet profile = input.name.value;\n\n\t// Check if field is not empty\n\tif (profile === null || profile === \"\") {\n\t\talert(\"Please add profile name\");\n\t\treturn false;\n\t}\n\t// Check if there is profile already in localStorage\n\tif (profiles === undefined) {\n\t\tprofiles = [];\n\t}\n\t// Check if profile already exist\n\n\t// Maximum 3 profiles\n\tif (profiles.length === 3) {\n\t\talert(\"Maximum profiles reached\");\n\t\treturn false;\n\t}\n\t// Create new profile object and store it in localStorage\n\tfunction Profile(id) {\n\t\tthis.id = id;\n\t\tthis.profile_index = 0,\n\t\tthis.profile_game_data = [];\n\t\tthis.start_date = new Date();\n\t}\n\tconst new_profile = new Profile(profile);\n\n\tprofile = new_profile;\n\tprofiles.push(profile);\n\tlocalStorage.setItem(\"profiles\", JSON.stringify(profiles));\n\n\tinput.name.value = \"\";\n\tshow_profiles();\n\n\treturn false;\n}", "title": "" }, { "docid": "2e99b1b469e1b7e3617c04ebe7afa133", "score": "0.58961713", "text": "function displayProfileData(data){\n var user = data.values[0];\n var name = user.firstName+' '+user.lastName;\n var email = user.emailAddress;;\n// document.getElementById(\"picture\").innerHTML = '<img src=\"'+user.pictureUrl+'\" />';\n// document.getElementById(\"name\").innerHTML = user.firstName+' '+user.lastName;\n// document.getElementById(\"intro\").innerHTML = user.headline;\n// document.getElementById(\"email\").innerHTML = user.emailAddress;\n// document.getElementById(\"location\").innerHTML = user.location.name;\n// document.getElementById(\"link\").innerHTML = '<a href=\"'+user.publicProfileUrl+'\" target=\"_blank\">Visit profile</a>';\n// document.getElementById('profileData').style.display = 'block';\n if(isLogin){\n \tisLogin = false;\n socialLogin(email,'LINKED_IN');\n }else{\n\t\tsocialRegister(email,name,'LINKED_IN');\n }\n }", "title": "" }, { "docid": "137d85656c318bc4e0b6cc909d5bfba0", "score": "0.5891122", "text": "function displayProfiles(profiles) {\n\tmember = profiles.values[0];\n\n\tvar firstName = member.firstName;\n\tvar lastName = member.lastName;\n\tvar linkedInEmailAddress = member.emailAddress;\n\tvar locationInfo = member.location.name;\n\tvar linkedInSummary = member.summary;\n\tvar currentWorkInfo = member.positions.values[0].company.name;\n\tvar currentJobTitle = member.positions.values[0].title;\n\tvar userPhotoFromLinkedIn = member.pictureUrl;\n\n\tvar userInfoArray = {};\n\n\tuserInfoArray.firstName = firstName;\n\tuserInfoArray.lastName = lastName;\n\tuserInfoArray.linkedInEmailAddress = linkedInEmailAddress;\n\tuserInfoArray.locationInfo = locationInfo;\n\tuserInfoArray.linkedInSummary = linkedInSummary;\n\tuserInfoArray.currentWorkInfo = currentWorkInfo;\n\tuserInfoArray.currentJobTitle = currentJobTitle;\n\tuserInfoArray.userPhotoFromLinkedIn = userPhotoFromLinkedIn;\n\n\t// we are carrying these values from LinkedIn to the ver.html page through the local storage.\n\t// we are JSON stringifying since local storage holds everything in format of JSON\n\n\tlocalStorage.setItem(\"userLinkedInInfo\", JSON.stringify(userInfoArray))\n\n\twindow.location.href = \"ver.html\";\n}", "title": "" }, { "docid": "ae069963e08c12a2a479fc416bc157da", "score": "0.58793867", "text": "function processProfile() {\n\t//update user profile from fields\n\tvar username = document.getElementById(\"pusernameinput\").value;\n\tvar firstName = document.getElementById(\"pfirstnameinput\").value;\n\tvar lastName = document.getElementById(\"plastnameinput\").value;\n\t\n\t//#\n\t\n}", "title": "" }, { "docid": "ce60b3af1cc9252b5c8ce371ff8ac54d", "score": "0.5872915", "text": "function profileClick(accountID) {\n $(\"#profile-new\").click(function (event) {\n window.location.href = \"/gwa/pages/profile.html?accountID=\" + accountID;\n })\n }", "title": "" }, { "docid": "885ec5432b5ddaf069cdeb05e30cb9ac", "score": "0.58512324", "text": "function goToProfile(){\n\tvar text = Parse.User.current().id;\n\twindow.location.href = \"../profile.html?\" + text;\n}", "title": "" }, { "docid": "cf89054f5ec5f5c63009559b44d92f05", "score": "0.5842594", "text": "function handleUserProfile(profile) {\n userProfile = profile;\n displayProfile();\n }", "title": "" }, { "docid": "15a3f3086e22e87101a524bf39d5cb1b", "score": "0.58316076", "text": "function setUpProfiles() {\n let personArray = getLocalStorage();\n\n if (personArray.length > 0) {\n personArray.forEach((person) => {\n addProfile(person.name, person.profe, person.skills, person.about);\n });\n }\n}", "title": "" }, { "docid": "8a7f5e1d2d2c1c3d368e0838eb4788b9", "score": "0.582885", "text": "function ShowProfile(profile) {\n\tAPICall(\"user/\" + profile, {}, \"get\", function(data){\n\t\tdocument.title = (data.Username + \" - Neon\");\n\t\t$(\"#username\").text(\"@\" + data.Username);\n\t\t$(\"#name\")\n\t\t\t.text(data.Name);\n\t\t$(\"#profilePicture\")\n\t\t\t.attr(\"src\", (data.UserImage));\n\n\t\tvar html = \"\";\n\t\tfor (var i = 0; i < data.Posts.length; i++) {\n\t\t\thtml += HTMLForPost(data.Posts[i]);\n\t\t\tif (i != data.Posts.length - 1) html += \"<hr />\";\n\t\t}\n\t\t$(\"#usercontent\").html(html);\n\t}, fail);\n}", "title": "" }, { "docid": "87ef99c65cc31560ba0cb338be318276", "score": "0.58194774", "text": "function create_info(user_profile, id, profile_image, firstName, lastName, bio, country) {\r\n\tif (user_profile) {\r\n\t\tvar margin = 2; img.src = profile_image; img_wdth = img.width; img_height = img.height;\r\n\t\tif (img_wdth > 100) {\r\n\t\t\timg__wdth = 100; img_height = (img_height / img_wdth) * img__wdth; if (img_height < 100) { img_height = 100; }\r\n\t\t\tif (img_height > 100) { radius_border = 25; top_margin = -(img_height / 2) + 5; } else { radius_border = 50; top_margin = 0; }\r\n\t\t} else {\r\n\t\t\timg__wdth = img_wdth;\r\n\t\t\tif (img_height > 100) {\r\n\t\t\t\tradius_border = 25;\r\n\t\t\t\ttop_margin = -(img_height / 2) + 5;\r\n\t\t\t} else {\r\n\t\t\t\tradius_border = 50;\r\n\t\t\t\ttop_margin = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\r\n\t\t$('.gal_name_pro').prepend(firstName + \" \" + lastName + \"<br><br><label id='un' ><a href='\" + url_vrt + user_profile + \"'>\" + user_profile + \"</a></label><br><br>\" + bio + \"<br><br>\" + country);\r\n\t\tif (user_profile == user_logged) {\r\n\t\t\tmargin = 0;\r\n\t\t\t$('.gal_name_pro').prepend('<button id=\"edit\" onclick=\"update_info()\" style=\"float:left;\">Edit Info</button><br><br>');\r\n\t\t}\r\n\r\n\t\t$('#profile_img_pro').attr('src', profile_image);\r\n\r\n\r\n\t} else {\r\n\t\talert(user.user_profile);\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "d47f2e2173312841b867f673945ac8fe", "score": "0.5813089", "text": "function initProfile() {\r\n\r\n \r\n}", "title": "" }, { "docid": "d65a7c5f1863c76866d5f5fdc1e43818", "score": "0.5812628", "text": "loadProfile() {\n authServicesObj = new AuthService();\n let currentUser = authServicesObj.getCurrentUser();\n\n let currentProfile = this.getProfile(currentUser.uid);\n\n let content = \"\";\n\n content = `<table class=\"table table-hover table-sm m-5\">\n <tbody>\n <tr>\n <th scope=\"row\">User Name</th>\n <td>${currentProfile.name}</td>\n </tr>\n <tr>\n <th scope=\"row\">Email</th>\n <td>${currentProfile.email}</td>\n </tr>\n <tr>\n <th scope=\"row\">Full Name</th>\n <td>${currentProfile.fullname}</td>\n </tr>\n <tr>\n <th scope=\"row\">Company</th>\n <td>${currentProfile.company}</td>\n </tr>\n </tbody>\n </table>`;\n\n document.querySelector(\"#profileForm\").innerHTML = content;\n }", "title": "" }, { "docid": "ade830c11b5f3341ca4e3a0d07a820e3", "score": "0.5796407", "text": "function saveprofile(){\n var title = $(\"#tituloInput2\").val();//crea variable para rescatar valor escrito por usuario en titulo llamando ID desde HTML\n var descrip = $(\"#descripcionInput2\").val();//toma el valor de la descripcion\n var ur= $(\"#urlInput2\").val();// toma el valor de la URL\n\n $(\"#aca\").append(\"<div id='pic_\" + idPin + \" ' class='pin col-md-3'>\" + \n //este es el frente\n \"<div class='panel panel-success front'>\" +\n \"<div class='panel-heading'>\" +\n \"<h3 class='panel-title'>\" + titulo + \"</h3>\" + \"</div>\" +\n \"<div class= 'panel-body'>\" +\n \"<a href='#' class='thumbnail'>\" +\n \"<img src='\" + url + \" ' alt='...'>\" +\n \"</a>\" + \n \"</div>\" + \n \"<div class='panel-footer'>\" + descripcion + \"</div> </div>\" + \n //este es el panel detras \n \"<div class= 'rear'>\" + \n \"</div>\" + \n \"</div>\");\n\n}", "title": "" }, { "docid": "e9e8a0e93e7ec8c009dba459fa646a74", "score": "0.5791046", "text": "function prepareProfile() {\n let element = event.currentTarget;\n openProfile(element.dataset.id);\n}", "title": "" }, { "docid": "cac536f70e07bf1c7978b37a748f5731", "score": "0.5784832", "text": "function nextProfile() {\n const currentProfile = profiles.next().value;\n if (currentProfile !== undefined) {\n document.getElementById('profileDisplay').innerHTML = `<ul class=\"list-group\">\n <li class=\"list-group-item\">login: ${currentProfile.login}</li>\n <li class=\"list-group-item\">ID: ${currentProfile.id}</li>\n </ul>`\n document.getElementById('imageDisplay').innerHTML = `<img class=\"img-thumbnail w-75\" src=\"${currentProfile.avatar_url}\">`\n } else {\n //No more profiles\n window.location.reload()\n }\n}", "title": "" }, { "docid": "b52701b7b630b70eacb91ee436278054", "score": "0.5776669", "text": "function registerUserInfo(userData) {\n const sql = `INSERT INTO userinfo (userAuthID, userName, profileUrl, statementOfIntent, country, dateOfBirth) VALUES (last_insert_id(), '${userData.name}', '${userData.profileurl}',?, ?, '${userData.dateofbirth}');`;\n /* User's statement of intent is taken out as a query parameter to allow apostrophe inputs. */\n return db.query(sql, [userData.statement_of_intent, userData.country]);\n}", "title": "" }, { "docid": "fb6e242ba61cdef130c07ca7647e1adf", "score": "0.5771861", "text": "function loadProfile(profileUser){\n var user=JSON.parse(localStorage.user);\n var propic =profileUser.profilePic;\n var name = profileUser.nome+\" \"+profileUser.cognome;\n var username=profileUser.username;\n var date = profileUser.infos.subscriptionDate;\n var friends = profileUser.friendList.length;\n var media = profileUser.infos.cfu;\n var description;\n if (profileUser.infos.description==undefined) description=profileUser.nome+\" non ha ancora inserito una descrizione del suo profilo\"\n else description = profileUser.infos.description\n //var postList=profileUser.postList; \n \n $(\"#profile_pic\").attr(\"src\",propic);\n $(\"#name\").prepend(name);\n $(\"#date\").append(date);\n $(\"#friends\").append(friends);\n $(\"#vote\").append(media);\n $(\"#description\").append(description);\n\n\n if (profileUser.username!=user.username) {\n $(\"#newPostToP\").css(\"display\",\"none\")\n if(user.friendList.indexOf(profileUser.username)==-1){ // se (condizione=true) mostra il pulsante AGGIUNGI AI SEGUITI nella pagina di profilo\n var addBtn = '<button type=\"submit\" class=\"btn btn-danger shadow-sm\" id=\"btnAddFriend\" onclick=\"aggiungiAmico(\\''+profileUser.username+'\\')\">Segui</button>';\n $(\"#profile_points\").after(addBtn);\n }\n }\n}", "title": "" }, { "docid": "7303cd5b0c50319db434780dd5b5cc56", "score": "0.5771672", "text": "updateUserProfile(profileInfo) {\n return this.crud.updateData('/users/update/profile', profileInfo);\n }", "title": "" }, { "docid": "4d1ff769dd2a4e661ddb7bbac526147a", "score": "0.5756695", "text": "function myUpdatedProfile(userObj){\n var frstName = $('#buddyDetails_fName').html();\n var lstName = $('#buddyDetails_lName').html();\n var mobNo = $('#buddyDetails_mobNo').html();\n var city = $('#buddyDetails_city').html();\n var sex = $('#buddyDetails_sex').html();\n \n userObj.setFirstName(frstName);\n userObj.setLastName(lstName);\n userObj.setSex(sex);\n userObj.setCity(city);\n userObj.setMobile(mobNo);\n}", "title": "" }, { "docid": "7d62c9ce6d75c31d4886fc50495736a3", "score": "0.57566506", "text": "function UserProfile() {\n $(`#navbar`).empty();\n $(`#profile`).empty();\n $(`#btn-content`).empty();\n $(`#mileage-records`).empty();\n $(`#login`).empty();\n $(`#uploads`).empty();\n\n let userProfileDiv = `<div class=\"card\">\n <div class=\"card-header\">\n <h5 class=\"text-center\">Create Your Profile</h5>\n </div>\n <div class=\"card-body\">\n <form>\n <div class=\"form-group\">\n <label for=\"add-first-name\" class=\"col-form-label\">First Name</label>\n <input type=\"text\" class=\"form-control\" id=\"add-first-name\" required>\n <span for=\"add-first-name\" class=\"text-danger\" name=\"addFirstName\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-last-name\" class=\"col-form-label\">Last Name</label>\n <input type=\"text\" class=\"form-control\" id=\"add-last-name\" required>\n <span for=\"add-last-name\" class=\"text-danger\" name=\"addLastName\"></span>\n </div>\n <div class=\"form-group\">\n <label for=\"add-phone-number\" class=\"col-form-label\">Phone Number</label>\n <input type=\"text\" class=\"form-control\" id=\"add-phone-number\" required>\n <span for=\"add-phone-number\" class=\"text-danger\" name=\"addPhoneNumber\"></span>\n </div>\n <div class=\"form-group\">\n <input type=\"button\" class=\"btn btn-primary\" onclick=\"CreateUserProfile()\" value=\"Create Profile\" />\n </div>\n </form>\n </div>\n </div>`;\n\n $(`#login`).append(userProfileDiv);\n}", "title": "" }, { "docid": "61cf4a394b98ae51bdf24db4b38efc74", "score": "0.57555616", "text": "saveUserProfile(callback) {\n var url = '/db/users/user/' + this.props.params.user;\n var data = this.stagedProfileEdits;\n data.userInfo = _map(data.userInfo, function(val){return val});\n data.sites = _map(data.sites, function(val){return val});\n RestHandler.Post(url, data, (err, res) => {\n if (err) {return err;}\n callback(res);\n });\n }", "title": "" }, { "docid": "b5f3b6a4dcdb02135dbb98f525a015ae", "score": "0.5745926", "text": "function addUserInfo(){\n\t$(\"#signedInAs\").html(\"Signed in as \" + User.username); \n\t$(\"#credScore\").html(\"Cred Score: \" + User.cred);\n\t$(\"#spendCred\").html(\"Spend Cred\");\n\t$(\"#uploadTrack\").html(\"Upload a Track\");\n\t$(\"#foot\").html(\"delete my account\");\n\t$(\"#signOut\").show();\n\t$(\"#regButton\").hide();\n\t$(\"#signIn\").hide();\n\n}", "title": "" }, { "docid": "eecff97f0a9e3a0092d0b63741e67e62", "score": "0.5743542", "text": "function displayProfileInformation(){\n const name = document.getElementById(\"displayName\");\n const username = document.getElementById(\"displayUsername\");\n const nameText = document.createElement(\"h3\");\n const usernameText = document.createElement(\"h3\");\n nameText.innerHTML = \"Name: \" + userInformation.name;\n usernameText.innerHTML = \"Username: \" + userInformation.username;\n name.appendChild(nameText);\n username.appendChild(usernameText);\n}", "title": "" }, { "docid": "a0c7587bfc8b01ed00706db0f1c941d9", "score": "0.5740457", "text": "function oninsert(err, data) {\r\n\t\t\tif(err) {\r\n\t\t\t\tnext(err)\r\n\t\t\t} else {\r\n\t\t\t\t// Save the username in the current sesison and send the user to the dashboard\r\n\t\t\t\treq.session.user = {username: username};\r\n\t\t\t\tres.redirect('dashboard');\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "525b9af44d91938c90090f1acd355e60", "score": "0.57341194", "text": "function setProfileInfo(user) {\n let welcome = $(\"#title\");\n welcome.text(\"Welcome, \" + user.username + \"!\");\n }", "title": "" }, { "docid": "5278553d03e9a268e3b696bf819dbd99", "score": "0.57089", "text": "function addaccount(first, last, accid, pw ){ //,address1,address2,city,state,zipcode,country,age,weight,gender,email,createpassword) {\r\n\t//insert data; \r\n accountsDB.transaction(function (tx) {\r\n var query = \"INSERT INTO playeraccounts (firstname, lastname, userID,createpassword) VALUES (?,?,?,?)\";\r\n\t//\talert(\"to add user\");\r\n tx.executeSql(query, [first, last, accid,pw], function(tx, res) {\r\n\t//\t\talert(\"add user success\");\r\n },\r\n function(tx, error) {\r\n alert('INSERT error: ' + error.message);\r\n });\r\n }, function(error) {\r\n alert('transaction error: ' + error.message);\r\n }, function() {\r\n // alert('transaction ok');\r\n });\r\n}", "title": "" }, { "docid": "85574f953872ba28d3dd15b4545fd37d", "score": "0.5708725", "text": "function saveUserProfile(profiles) {\n var member = profiles.values[0];\n console.log(member);\n\n if(!openyet){\n openyet=true;\n console.log(member);\n\n var name=member['firstName']+\" \"+member['lastName'];\n var userLinkedInObject={\"method\":\"linkIN\",\"IN_id\":member['id'],\"IN_headline\":member['headline'],\"IN_name\":name,\"IN_email\":member['emailAddress'],\"IN_photo\":member['pictureUrl']};\n $.ajax({\n type: \"POST\",\n url: \"server/userHRAjax.php\",\n data: $.param(userLinkedInObject),\n headers: {'Content-type': 'application/x-www-form-urlencoded'},\n async: true,\n error: function (xhr,error){console.warn(xhr);},\n success: function (json) {\n console.log(json);\n location.reload();\n }\n });\n }else{}\n\n\n}", "title": "" }, { "docid": "85c46b1a861efefc516712d4e8f78a85", "score": "0.57079774", "text": "function updateProfile() {\n\t\t\tvar _profileData = { displayName: account.user.displayName };\n\n\t\t\tif (account.user.displayName) {\n\t\t\t\t// Set status to Saving... and update upon success or error in callbacks\n\t\t\t\taccount.btnSaveText = 'Saving...';\n\n\t\t\t\t// Update the user, passing profile data and assigning success and error callbacks\n\t\t\t\tuserData.updateUser(_profileData).then(_updateSuccess, _updateError);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bd1613cf0da4b7b4e5c241d3a0f4d97f", "score": "0.57030433", "text": "function toProfile() {\n activePage.hide();\n $(\"#bio-page\").show().removeClass(\"deactivated\").addClass(\"activated\"); //To Be Rplaced\n activePage = $(\"#bio-page\");\n console.log(\"reasigned\", activePage);\n }", "title": "" }, { "docid": "12193e707aabfe87c8bf15ec530fdeaf", "score": "0.56958765", "text": "function tutorprofiling (UserProfile) {\n\tfor (var i = 0; i < Database.length; i++) {\n\t\tvar tempt = Database[i];\n\t\tif (UserProfile == tempt[\"AccountID\"]) {\n\t\t\tLoadedProfile = tempt;\n\t\t}\n\t}\n\t\tif (sessionStorage.getItem(\"currentpage\") !== null){\n\t\t\tvar LandingPage = sessionStorage.getItem('currentpage');\n\t\t\tRedirectPage(LandingPage);\n\t\t}\n\t\telse {\n\t\t\tvar LandingPage = \"dashboardOverview\";\n\t\t\tRedirectPage(LandingPage);\n\t\t}\n\t\tdashboardBar.style.display=\"block\";\n\t\thelpButton.style.display=\"block\";\n\t\tlogoutButton.style.display=\"block\";\n\t\tuserFlag.style.display=\"block\";\n\t\tRequestCounterUpdate();\n\t\tfor (var i = 0; i < userdisplay.length; i++) {\n userdisplay[i].innerText = LoadedProfile[\"Name\"];\n };\n for (var i = 0; i < receivedrequestdisplay.length; i++) {\n receivedrequestdisplay[i].innerText = LoadedProfile[\"RequestsReceived\"];\n };\n for (var i = 0; i < acceptedrequestdisplay.length; i++) {\n acceptedrequestdisplay[i].innerText = LoadedProfile[\"RequestsAccepted\"];\n };\n\t\tdashboardinterface.style.display=\"block\";\n\t\tDisableRequests();\n\tconsole.log(UserProfile+\"'s profile is loaded\");\n}", "title": "" }, { "docid": "adcbf68a70c34a887521d11121ef8624", "score": "0.56951475", "text": "function updateProfile() {\n\t\t\tvar _profileData = { displayName: account.user.displayName };\n\n\t\t\tif (account.user.displayName) {\n\t\t\t\t// Set status to Saving... and update upon success or error in callbacks\n\t\t\t\taccount.btnSaveText = 'Saving...';\n\n\t\t\t\t// Update the user, passing profile data and assigning success and error callbacks\n\t\t\t\tUserData.updateUser(_profileData).then(_updateSuccess, _updateError);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c5db4f695fd9077e6c172ff91695d418", "score": "0.5672853", "text": "function myUpdatedProfileForAvatar(userObj){\n var frstName = $(\"#buddyFirstName\").val();\n var lstName = $(\"#buddyLastName\").val();\n var mobNo = $('#buddyDetails_mobNo').html();\n var city = $('#buddyDetails_city').html();\n var sex = $('#buddyDetails_sex').html();\n \n userObj.setFirstName(frstName);\n userObj.setLastName(lstName);\n userObj.setSex(sex);\n userObj.setCity(city);\n userObj.setMobile(mobNo);\n}", "title": "" }, { "docid": "71975c89c81de882ef779ec133a42a73", "score": "0.5666965", "text": "function profileData(profiles) {\n var person = profiles.values[0];\n\n //if no photo or location, add these values instead\n if (!person.pictureUrl) { person.pictureUrl = \"images/nophoto.jpeg\"; }\n if (!person.location.name) { person.location.name = \"secret location\"; }\n\n var first = person.firstName;\n var last = person.lastName;\n var avatar = person.pictureUrl;\n var headline = person.headline;\n var location = person.location.name;\n \n //smidge of jQuery to populate current user info within webapp\n $(\"#avatar\").append(\"<img src=\"+avatar+\">\");\n $(\".first\").text(first);\n $(\"#name\").append(\"<h2 class='emph'>\" + first+ \" \" + last + \".</h2>\");\n $(\".headline\").text(headline);\n\n //check if their location is/is not austin, run code accordingly\n var str = location;\n var x = str.indexOf(\"Austin\");\n if (str === \"secret location\") {\n $('#loc_statement').text(\"It looks like you keep your location secret on LinkedIn. Which makes me think you're a spy. ...Are you a spy?\");\n $('#location h1').last().remove();\n }\n else if (x === -1) {\n $('#loc_statement').text(\"You're from the\" + location + \"? My best friend's cousins college roommate is from around there!\");\n } \n else {\n $('#loc_statement').text(\"And I see you live in Austin! Me too!\");\n $('#photo').append(\"<img src='images/austin.jpg'>\");\n $('#location').append(\"<h1>Keep Austin Weird, amaright?</h1>\");\n }\n}", "title": "" }, { "docid": "b991f7457bff186e29b14e3acee4b06c", "score": "0.5666903", "text": "function save(profile) {\n $.ajax({\n type:\"post\",\n url: postUrl,\n data: JSON.stringify(profile)\n })\n .done(\n function(result) {\n result = JSON.parse(result);\n if( result['success'] ){\n // Refresh the page\n location.reload(true);\n } else {\n // Show an error message\n utilities.notifyWithDelay(\n 'Error saving profile',\n 'Some error occurred, please try again later',\n 'error',\n 60\n );\n button.attr('disabled',false);\n }\n }\n );\n }", "title": "" }, { "docid": "3d1881533005082906524c292dad50f2", "score": "0.5661703", "text": "addUser() {\n UserProfile.insert({\n user_id: Meteor.user()._id,\n routines: [],\n currentRoutine: '',\n age: '',\n weight: '',\n height: ''\n }, function(err, res) {\n if (err) {throw err}\n })\n }", "title": "" }, { "docid": "463d28066f4d1e61bf4db70079fcfb2a", "score": "0.5661024", "text": "function handleRegister(req, res, next) {\n connection.query('INSERT INTO profiles SET ?', {\n img: req.file ? req.file.filename : null,\n id: req.body.id,\n name: req.body.name,\n age: req.body.age,\n city: req.body.city,\n email: req.body.email,\n favpet: req.body.favpet,\n pet: req.body.pet,\n gender: req.body.gender,\n preferredGender: req.body.preferredGender,\n password: req.body.password\n }, done)\n\n function done(err, data) {\n if (err) {\n next(err)\n } else {\n res.redirect('/inloggen')\n }\n }\n}", "title": "" }, { "docid": "7300d114ed63adaa7f38ae3dc78262e1", "score": "0.5654071", "text": "showProfile() {\n // TODO: do something\n }", "title": "" }, { "docid": "bbcb785e4dcc9c84d92d03ad2d1f0655", "score": "0.5650356", "text": "function profileUserAdded(element, content, name) {\n element.append(name + '\\'s profile has been ' + content + '.');\n element.css(\"display\", \"block\");\n element.fadeOut(8000, \"fast\", function() {\n element.empty();\n });\n}", "title": "" }, { "docid": "21e4bdf733644506215ed327869ed660", "score": "0.56496584", "text": "function makeNewProfile(e){\n e.preventDefault();\n //get the stuff to send to createProfile.addProfile\n console.log(\"making a new profile\");\n\n var username = $('#makeProfileForm #username').val();\n var email = $('#makeProfileForm #email').val();\n var phone = $('#makeProfileForm #phone').val();\n var exhibits = [];\n var priorities = [];\n\n var userJson = {\n 'username': username,\n 'email': email,\n 'phone': phone,\n 'exhibits': exhibits,\n 'priorities': priorities\n };\n $.post('/createProfile/addProfile', userJson, function() {\n window.location.href = '/home'; // go to the viewGallery page\n });\n}", "title": "" }, { "docid": "2ab4f2770d54efc6b81308acad1bddfe", "score": "0.5644768", "text": "function setUserInfo(user, name, email, profileImgUrl) {\n let signinBtn = document.getElementById(\"signInBtn\");\n signinBtn.id = \"profileBtn\";\n signinBtn.style.backgroundImage = \"url(\" + profileImgUrl + \")\";\n\n let nameTag = document.getElementById(\"usernameTag\");\n nameTag.textContent = \"Username: \" + name;\n\n let icon = document.getElementById(\"profileImg\");\n icon.src = profileImgUrl;\n\n userInfo = {\n curruser: user,\n username: name,\n useremail: email,\n userphotoUrl: profileImgUrl\n //userid : user.uid,\n };\n}", "title": "" }, { "docid": "84686a2a957e46aa0a1980aa5f0ebb0c", "score": "0.5642903", "text": "function appendUserData(user) {\n document.querySelector('#profil-info').innerHTML += `\n <label for=\"name\">Navn</label>\n <input type=\"text\" id=\"name\" placeholder=\"${user.displayName}\" required>\n <label for=\"mail\">Mail</label>\n <input type=\"email\" id=\"mail\" placeholder=\"${user.email}\" required>\n <label for=\"birthdate\">Fødselsdag</label>\n <input type=\"text\" id=\"birthdate\" placeholder=\"${user.birthdate}\" required>\n <label for=\"phoneNumber\">Telefonnummer</label>\n <input type=\"text\" id=\"phoneNumber\" placeholder=\"${user.phoneNumber}\" required>\n\n <form action=\"#\">\n <div class=\"file-field upload-file6 input-field\">\n <div class=\"btn\">\n <span><i class=\"small material-icons\">cloud_upload</i>Upload billede</span>\n <input type=\"file\" id=\"imagePreview\" onchange=\"previewImage(this.files[0])\">\n </div>\n <div class=\"file-path-wrapper\">\n <input class=\"file-path validate\" type=\"text\">\n </div>\n </div>\n <a href=\"#\" onclick=\"updateUser()\" class=\"waves-effect right button-align skub waves-light btn\">Opdater</a>\n </form>\n `;\n // auth user\n document.querySelector('#name').value = currentUser.displayName;\n document.querySelector('#mail').value = currentUser.email;\n\n // database user\n userRef.doc(currentUser.uid).get().then(function(doc) {\n let userData = doc.data();\n console.log(userData);\n if (userData) {\n document.querySelector('#birthdate').value = userData.birthdate;\n document.querySelector('#phoneNumber').value = userData.phoneNumber;\n document.querySelector('#profile-image').innerHTML += `\n <img src=\"${userData.img}\" alt=\"profil-billede\">\n <h1>${userData.name}</h1>\n `;\n }\n });\n}", "title": "" }, { "docid": "d9926d92b95fe09c17faf8d0997c39ad", "score": "0.5636544", "text": "function addProfileView(user,mainView) {\n\t// // Ti.API.info('----------- Add Profiles Clicked ----------');\n\t// //var allProfiles = get_profiles();\n\n\tvar userProfile_view = new rel('view', {\n\t\twidth:349,\n\t\ttop:0,\n\t\tleft:0,\n\t\theight:486,\n\t\tbackgroundImage : \"images/globals/userprofile-ipad.png\"\n\t});\n\tvar user_name = new rel('label', {\n\t\ttext:user.name.toString(),\n\t\tbottom:23,\n\t\t// left:0,\n\t\t// width:172,\n\t\theight:80,\n\t\tfont: {\n\t\t\tfontSize:60,\n\t\t\tfontWeight:'bold',\n\t\t\tfontFamily:'Marker Felt'\n\t\t},\n\t\ttextAlign:'center',\n\t\tcolor:'#fff'\n\t}).inject(userProfile_view);\n\tgenderSkin = new rel('img', {\n\t\timage:\"images/globals/profile-\" + user.gender.toString() + \"-skin-\" + user.skin.toString() + \"-ipad.png\",\n\t\ttop:119,\n\t\tleft:62,\n\t\twidth:240,\n\t\theight:261\n\t}).inject(userProfile_view);\n\tgenderHair = new rel('img', {\n\t\timage:\"images/globals/profile-\" + user.gender.toString() + \"-hair-\" + user.hair.toString() + \"-ipad.png\",\n\t\ttop:111,\n\t\tleft:72,\n\t\twidth:240,\n\t\theight:237\n\t}).inject(userProfile_view);\n\n\tvar play_button = new rel('button', {\n\t\tbackgroundImage:\"images/globals/play-ipad.png\",\n\t\ttop:31,\n\t\twidth:296,\n\t\theight:342,\n\t\tleft:27\n\t}, {\n\n\t\tclick: function(e) {\n\t\t\tTi.API.info('The User id -- ' + user.id.toString());\n\t\t\tcurrent_user = user.id.toString();\n\t\t\tvar profile_data = profile_db.execute('select * from profiles where id = ' + current_user).results;\n\t\t\tcurrent_skin = profile_data.fieldByName('skin');\n\t\t\tcurrent_hair = profile_data.fieldByName('hair');\n\t\t\tcurrent_gender = profile_data.fieldByName('gender');\n\t\t\tcurrent_spoken = profile_data.fieldByName('spoken');\n\t\t\tcurrent_name = profile_data.fieldByName('name');\n\t\t\tsetTimeout( function(e) {\n\t\t\t\tmenu_win.close();\n\t\t\t},500);\n\t\t\tTi.App.Properties.setInt('CurrentUser',profiles_view.currentUser);\n\t\t\tstory.start();\n\t\t}\n\t}).inject(userProfile_view);\n\n\treturn userProfile_view.el;\n\n}", "title": "" }, { "docid": "f5ffe675ddd03cfb8f2658d2ba41155f", "score": "0.5623427", "text": "function showUser(user){\n if(!update) {\n \n //update table\n id_body = document.getElementById('user');\n image = document.createElement('img');\n name_ = document.createElement('h4');\n email_ = document.createElement('h4');\n phone_ = document.createElement('h4');\n\n image.setAttribute(\"id\", \"profile_img\");\n email_.setAttribute(\"id\", \"profile_email\");\n name_.setAttribute(\"id\", \"profile_name\");\n phone_.setAttribute(\"id\", \"profile_phone\");\n\n console.log(user.name);\n console.log(user.url);\n\n name_1 = document.createTextNode(user.name);\n email_1 = document.createTextNode(user.email);\n phone_1 = document.createTextNode(user.phone);\n image.setAttribute('src', user.url);\n\n name_.appendChild(name_1);\n email_.appendChild(email_1);\n phone_.appendChild(phone_1);\n\n id_body.appendChild(image);\n id_body.appendChild(name_);\n id_body.appendChild(email_);\n id_body.appendChild(phone_);\n update = true;\n \n } else {\n \n // update profile\n var img = document.getElementById(\"profile_img\"); \n var name_ = document.getElementById(\"profile_name\"); \n var email_ = document.getElementById(\"profile_email\"); \n var phone_ = document.getElementById(\"profile_phone\");\n email_.innerHTML = user.email;\n name_.innerHTML = user.name;\n phone_.innerHTML = user.phone;\n img.setAttribute('src', user.url);\n }\n}", "title": "" }, { "docid": "f4b2a3bf93a9414648a423d19e895fb0", "score": "0.5618301", "text": "function insertUI(){\n if (window.location.pathname.match(/\\/Account\\/Profile\\.aspx/i)){\n Console.Log(\"insertUI: Adding Profile UI.\");\n var uid = \"ctl00_mainContent_header_lblUsername\";\n var username = document.getElementById(uid).textContent;\n var ui = mkUI(username, 1);\n\n var pid = \"ctl00_mainContent_profilePanel\";\n var coup5publish = document.getElementById(\"CoupDBungie5\");\n if (coup5publish)\n coup5publish.parentNode.insertBefore(ui, coup5publish)\n else {\n var profilePanel = document.getElementById(pid);\n profilePanel.appendChild(ui);\n }\n\n } else if (window.location.pathname.match(/Posts\\.aspx/i)) {\n Console.Log(\"insertUI: Adding Posts UI.\");\n var sigs = document.getElementsByClassName(\"leftside\");\n for (i = 0; i < sigs.length; i++){\n var title = sigs[i].parentNode.parentNode.children[0].children[0].children[0].title;\n var text = sigs[i].parentNode.parentNode.children[0].children[0].children[0].textContent;\n var username = title || text;\n var li = document.createElement(\"li\");\n li.innerHTML = \"<span>Coup-5-Mod:&nbsp;</span>\";\n var a = document.createElement(\"a\");\n a.href = \"javascript:;\";\n a.className = \"coup5modspawn\";\n a.textContent = username;\n a.addEventListener(\"click\", spawnMod);\n li.appendChild(a);\n sigs[i].appendChild(li);\n }\n }\n Console.Log(\"Successfully added UI.\");\n}", "title": "" }, { "docid": "4025cd6d813740b94cbba2d9ca01f22b", "score": "0.5615513", "text": "function setProfileContent(profile){\n return {\n id: profile.id,\n first_name: profile.first_name,\n last_name: profile.last_name,\n email: profile.email,\n image_link: profile.image_link\n };\n}", "title": "" }, { "docid": "cf60fb117f2441124b53ac72a972796f", "score": "0.5609705", "text": "function submitFormDetails(){\n var form = document.forms[\"new-user-form\"];\n var newFirstName = form.elements[\"firstName\"].value;\n var newLastName = form.elements[\"lastName\"].value;\n var newNeighborhood = form.elements[\"neighborhood\"].value;\n var newUserName = form.elements[\"userName\"].value;\n var newUserPassword = form.elements[\"password\"].value;\n var currentUser = new UserProfile(newFirstName, newLastName, newNeighborhood, newUserName, newUserPassword,\"\",[]);\n userProfile.push(currentUser);\n localStorage.setItem(\"currentUserKey\", JSON.stringify(currentUser)); //adds to local storage\n document.getElementById(\"new-user-info\").innerHTML = \"\"; //removes the form from the screen\n //console.log(\"newFirstName\");\n // var login = document.getElementById(\"login_user\");\n var login = document.login_user;\n // login.setAttribute(\"class\", \"\"); //unhides the user login\n window.location = \"profile.html\"\n }", "title": "" }, { "docid": "c47003f2c14938d9df4fcc7b4bd131bb", "score": "0.5601001", "text": "function menuNewProfile() {\n activeProfile = Stickers.defaultProfile();\n activeProfilePath = \"\";\n $(document).attr('title', 'New Profile' + \" - Fursona Sticker Switcher\");\n $('#symlink-path').val(activeProfile.getSymlink());\n redrawImages();\n setTimeout(function() {\n $('.active').removeClass('active');\n $('#transparent-sticker').addClass('active');\n }, 1);\n ipc.send('unsaved-changes', true);\n}", "title": "" }, { "docid": "e3abf64d5bd9be452624b0f572bfadb6", "score": "0.55998874", "text": "function auto_add_user(img_url, username, uid) {\n $(\"#parts-list-head\").html(\"<tr><td>头像</td><td>用户名</td><td>UID</td></tr>\");\n $(\"#parts-list-body\").append(\"<tr><td>\" + \"<img width='60px' height='60px' src='\" + img_url + \"'/></td><td>\" + username + \"</td><td>\" + uid + \"</td></tr>\");\n}", "title": "" }, { "docid": "bc9676ac35c16242f0d3db461efbae9c", "score": "0.5596165", "text": "function addQuizInfoToUserTable(quizInfo) {\n $.post(\"/api/addQuizInfoToUser\", quizInfo).done(function(){\n window.location.assign('/matching');\n });\n\n }", "title": "" }, { "docid": "008958a0a25a25636a1bbcfdef875d8c", "score": "0.55953574", "text": "createMemberProfile(name, email, grade, chapterName, shirtSize) {\r\n var userProfile = {\r\n name: name,\r\n email: email,\r\n grade: grade,\r\n chapterName: chapterName,\r\n shirtSize: shirtSize\r\n }\r\n\r\n try{\r\n var ref = firebase.database().ref(`members/${firebase.auth().currentUser.uid}`);\r\n ref.child('Profile').set(null);\r\n ref.child('Profile').push(userProfile);\r\n global.userProfile = userProfile;\r\n return true;\r\n }\r\n catch(e)\r\n {\r\n // alert(e.message);\r\n console.log(\"createMemberProfile:\", e)\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "23ba3ef62e3021123f09d72c3b777553", "score": "0.5587324", "text": "function putUserStoriesOnPage(){\n console.debug(\"putUserStoriesOnPage\");\n $myStories.empty();\n\n if (currentUser.ownStories.length === 0){\n $myStories.append(\"<div>No Stories Added!</div>\");\n }else{\n for(let story of currentUser.ownStories){\n let $story = generateStoryMarkup(story,true);\n $myStories.append($story);\n }\n }\n $myStories.show();\n}", "title": "" }, { "docid": "04b130c5634efdc6b5a55ec10d680430", "score": "0.55852574", "text": "setProfileInfo(state, doc) {\n state.profileId = doc.id;\n state.profileEmail = doc.data().email;\n state.profileFirstName = doc.data().firstName;\n state.profileLastName = doc.data().lastName;\n state.profileUsername = doc.data().username;\n }", "title": "" }, { "docid": "04b130c5634efdc6b5a55ec10d680430", "score": "0.55852574", "text": "setProfileInfo(state, doc) {\n state.profileId = doc.id;\n state.profileEmail = doc.data().email;\n state.profileFirstName = doc.data().firstName;\n state.profileLastName = doc.data().lastName;\n state.profileUsername = doc.data().username;\n }", "title": "" }, { "docid": "39687b7618e9c67ba992b9056c2226b1", "score": "0.5583617", "text": "function userProfile(){ \n //https://stackoverflow.com/questions/42885707/using-push-method-to-create-new-child-location-without-unique-key\n db.ref('users').child(userID).set({\n\n username: chosenName,\n score: \"\", //latestScore\n stats: \"\", //currentStats\n avatar: \"\",\n\n });\n\n}", "title": "" }, { "docid": "73048f004e6b4f3f74f182a917b19e91", "score": "0.5581759", "text": "function setUserInfo() {\r\n\r\n //Session Storage\r\n var user = JSON.parse(sessionStorage.getItem(\"user\"));\r\n\r\n /*sessionStorage.setItem('role', result.user.role);\r\n sessionStorage.setItem('name', result.user.name);\r\n sessionStorage.setItem('email', result.user.email);\r\n sessionStorage.setItem('photo', result.user.photoUrl);\r\n sessionStorage.setItem('uid', result.user.uid);*/\r\n\r\n //Profile\r\n document.getElementById(\"hello\").innerHTML += user.name;\r\n document.getElementById(\"hello6\").innerHTML = user.name;\r\n document.getElementById(\"nameInfo\").innerHTML = user.name;\r\n document.getElementById(\"input-name\").value = user.name;\r\n document.getElementById(\"input-email\").value = user.email;\r\n document.getElementById(\"output-email\").innerHTML = user.email;\r\n document.getElementById(\"input-phone\").value = user.phoneNumber;\r\n document.getElementById(\"input-cidade\").value = user.city;\r\n document.getElementById(\"input-pais\").value = user.country;\r\n document.getElementById(\"input-nif\").value = user.nif;\r\n document.getElementById(\"preview\").src = user.photoURL;\r\n document.getElementById(\"output-city-country\").innerHTML = user.city + \", \" + user.country;\r\n document.getElementById(\"preview\").src = user.photoUrl;\r\n document.getElementById(\"img1\").src = user.photoUrl;\r\n if (user.role === 'admin') {\r\n document.getElementById(\"output-sector\").innerHTML = \"Administrador\"\r\n }\r\n if (user.role === 'empresa') {\r\n document.getElementById(\"output-sector\").innerHTML = \"Organização\"\r\n }\r\n if (user.role === 'camara') {\r\n document.getElementById(\"output-sector\").innerHTML = \"Câmara Municipal\"\r\n }\r\n}", "title": "" }, { "docid": "8178ab81af27369e597f3fe33af7352c", "score": "0.55812436", "text": "function save(profile) {\n return rest.post(profile);\n }", "title": "" }, { "docid": "371ee202adec025755e19549c6f99d68", "score": "0.5576084", "text": "showUserProfile() {\n\t $$('mainToolbar').removeView('loginButton')\n\t userProfile.data = this.app.getService(\"session\").getUser() // fetch user information from global session service\n\t $$('mainToolbar').addView(userProfile, -1)\n\t}", "title": "" }, { "docid": "6afe73e4e2cf49c4221f3dc9ae749e70", "score": "0.5574123", "text": "function addUser(data) {\n console.log(` Adding: ${data.firstname} (${data.owner})`);\n Information.collection.insert(data);\n}", "title": "" }, { "docid": "b7d8f3fb9ce939485eae313ad6b82619", "score": "0.5571384", "text": "function addUser() {\n localStorage.setItem('name', name.val());\n localStorage.setItem('email', email.val());\n localStorage.setItem('password', password.val());\n showUser();\n }", "title": "" }, { "docid": "bcb5a14ac09e848fd608c018160d0485", "score": "0.5570404", "text": "async function setupViewProfile() {\n if (checkUserToken()) {\n } else {\n // set up logout button\n setUpLogout();\n\n // retrieve profile data\n const arrOfUsers = await getAllProfiles();\n\n // get query string id param\n const queryParams = getQueryParams(window.location.href);\n const userId = queryParams.id;\n\n arrOfUsers.forEach(user => {\n // update user top and about first then fav mangas\n if (user.userId === userId) {\n // set username top\n usernameTop.innerHTML = user.username;\n // set instagram link href\n instagramLink.href = user.instagram;\n // set about heading and bio\n aboutHeading.innerHTML = \"About \" + user.username;\n aboutBio.innerHTML = user.about || \"\";\n\n // create div for each fav manga\n // n**2 solution! Improve!!!\n if (user.favmangas != null) {\n for (manga of user.favmangas) {\n favMangaDiv.innerHTML += `\n <div class=\"manga bg-white my-1 p-1\">\n <div>\n <h4>${manga.title}</h4>\n <p>Description</p>\n <a href=\"#\" class=\"add-fav-btn btn btn-primary my-1\">Add To Fav</a>\n </div>\n <div>\n <ul>\n <li class=\"badge badge-dark\"><strong>Author: </strong>${manga.author}</li>\n <li class=\"badge badge-primary\"><strong>Title: </strong>${manga.title}</li>\n <li class=\"badge badge-light\"><strong>Latest Chapter: </strong>${manga.latestChapter}</li>\n <li class=\"badge badge-light\"><strong>Latest Read: </strong>${manga.lastRead}</li>\n </ul>\n </div>\n </div>\n `;\n }\n }\n }\n });\n }\n let addToFavBtn = document.querySelectorAll(\".manga .add-fav-btn\");\n addToFavBtn.forEach(elem => {\n elem.addEventListener(\"click\", addToFav);\n });\n}", "title": "" }, { "docid": "ddc5c6ab1db6d8ace173a7005d5f7f1b", "score": "0.5568323", "text": "profile() {\n\n var profile_div = document.createElement('div');\n profile_div.className = 'profile_div';\n profile_div.id = 'profile';\n\n // TODO: profile photos a thing\n var profile_photo = document.createElement('img');\n profile_photo.className = 'profile_photo';\n profile_photo.src = 'static/profile_icon.png';\n\n var profile_info_container = document.createElement('div');\n profile_info_container.className = 'profile_info_container';\n\n var person_info_col = document.createElement('div');\n person_info_col.className = 'person_info_col';\n\n var givenName_label = document.createElement('div');\n givenName_label.className = 'profile_label';\n givenName_label.innerText = 'Given/Birth Name';\n // slide this up a bit for now\n var profile_givenName = document.createElement('div');\n profile_givenName.className = 'profile_name';\n profile_givenName.innerText = this.givenName;\n\n var familyName_label = document.createElement('div');\n familyName_label.className = 'profile_label';\n familyName_label.innerText = 'Family/Current Name';\n var profile_familyName = document.createElement('div');\n profile_familyName.className = 'profile_name';\n profile_familyName.innerText = this.familyName;\n\n var dob_label = document.createElement('div');\n dob_label.className = 'profile_label';\n dob_label.innerText = 'Date of Birth';\n var profile_dob = document.createElement('div');\n profile_dob.className = 'profile_date';\n profile_dob.innerText = this.dateOfBirth;\n\n person_info_col.append(givenName_label, profile_givenName, familyName_label, profile_familyName, dob_label, profile_dob);\n\n // add this only if it has info\n if(this.dateOfDeath) {\n var dod_label = document.createElement('div');\n dod_label.className = 'profile_label';\n dod_label.innerText = 'Date of Death';\n var profile_dod = document.createElement('div');\n profile_dod.className = 'profile_date';\n profile_dod.innerText = this.dateOfDeath;\n\n person_info_col.append(dod_label, profile_dod);\n\n }\n\n var details_label = document.createElement('div');\n details_label.className = 'profile_label';\n details_label.innerText = 'Details';\n var profile_details = document.createElement('div');\n profile_details.className = 'profile_details';\n profile_details.innerText = this.details;\n\n person_info_col.append(details_label, profile_details);\n\n // RELATIONSHIPS\n var relative_info_col = document.createElement('div');\n relative_info_col.className = 'relative_info_col';\n\n\n // parents and children first\n var parents_label =document.createElement('div');\n parents_label.className = 'profile_label';\n parents_label.classList.add('relation_label');\n parents_label.innerText = 'Parents';\n var profile_parents = document.createElement('div');\n profile_parents.className = 'profile_array';\n profile_parents.id = 'profile_parents';\n array_to_element(this.parents, profile_parents);\n // this is an array of objects..\n \n var children_label = document.createElement('div');\n children_label.className = 'profile_label';\n children_label.classList.add('relation_label');\n children_label.innerText = 'Children';\n var profile_children = document.createElement('div');\n profile_children.className = 'profile_array';\n profile_children.id = 'profile_children';\n array_to_element(this.children, profile_children);\n\n var siblings_label =document.createElement('div');\n siblings_label.className = 'profile_label';\n siblings_label.classList.add('relation_label');\n siblings_label.innerText = 'Siblings';\n var profile_siblings = document.createElement('div');\n profile_siblings.className = 'profile_array';\n profile_siblings.id = 'profile_siblings';\n array_to_element(this.siblings, profile_siblings);\n\n // EDIT ELEMENTS\n // hide the current divs that are displaying info?\n var edit_givenName = document.createElement('input');\n edit_givenName.className = 'edit_text_input';\n edit_givenName.type = 'text';\n edit_givenName.value = this.givenName;\n // auto populate with current data\n \n var edit_familyName = document.createElement('input');\n edit_familyName.className = 'edit_text_input';\n edit_familyName.type = 'text';\n edit_familyName.value = this.familyName;\n\n var edit_dateOfBirth = document.createElement('input');\n edit_dateOfBirth.className = 'edit_date_input';\n edit_dateOfBirth.type = 'date';\n edit_dateOfBirth.value = this.dateOfBirth;\n\n var edit_dateOfDeath = document.createElement('input');\n edit_dateOfDeath.className = 'edit_date_input';\n edit_dateOfDeath.type = 'date';\n edit_dateOfDeath.value = this.dateOfDeath;\n\n var edit_details = document.createElement('textarea');\n edit_details.className = 'edit_textarea_input';\n //edit_details.type = 'text';\n edit_details.value = this.details;\n \n // edit relatives is more applicable\n // allow deletion of relatives that are there..\n // like deletion of the relationship, not the person?\n // you could leave the add relative button. \n // \n\n var add_relative_container = document.createElement('div');\n add_relative_container.className = 'add_relative_container';\n\n var new_relative_label = document.createElement('div');\n new_relative_label.className = 'profile_label';\n new_relative_label.classList.add('relative');\n new_relative_label.innerText = 'New';\n new_relative_label.id = 'add_relative_current_id';\n // add the current person's id to this element\n new_relative_label.setAttribute('var', this.id);\n\n var select_new_relative_type = document.createElement('select');\n select_new_relative_type.className = 'select_input_profile';\n select_new_relative_type.id = 'select_new_relative_type';\n\n var parent_option = document.createElement('option');\n parent_option.innerText = 'Parent';\n parent_option.className = 'option_input_profile';\n parent_option.value = 'a';\n var sibling_option = document.createElement('option');\n sibling_option.innerText = 'Sibling';\n sibling_option.className = 'option_input_profile';\n sibling_option.value = 'c';\n var child_option = document.createElement('option');\n child_option.innerText = 'Child';\n child_option.className = 'option_input_profile';\n child_option.value = 'b';\n select_new_relative_type.append(parent_option, sibling_option, child_option);\n\n var select_new_relative = document.createElement('select');\n select_new_relative.className = 'select_input_profile';\n select_new_relative.id = 'select_new_relative';\n \n for(let i = 0; i < PERSON_ARRAY.length; i++ ) {\n let person = PERSON_ARRAY[i];\n \n // exclude yourself\n if(person.id == this.id) {\n continue\n }\n\n let new_option = document.createElement('option');\n new_option.value = person.id;\n new_option.innerText = person.givenName;\n new_option.className = 'option_input_profile';\n select_new_relative.appendChild(new_option);\n }\n\n var confirm_new_relative = document.createElement('div');\n confirm_new_relative.className = 'confirm_new_relative';\n confirm_new_relative.innerText = 'Add';\n confirm_new_relative.addEventListener('click', add_relationship);\n\n add_relative_container.append(new_relative_label, select_new_relative_type, select_new_relative, confirm_new_relative);\n\n var edit_buttons = document.createElement('div');\n edit_buttons.className = 'edit_buttons';\n \n var save_edits = document.createElement('div');\n save_edits.className = 'save_edits';\n save_edits.innerText = 'Save';\n save_edits.setAttribute('var', this.id);\n save_edits.addEventListener('click', function(event) {\n var owner_id = event.target.getAttribute('var');\n\n save_profile(owner_id);\n\n });\n\n var cancel_edits = document.createElement('div');\n cancel_edits.className = 'cancel_edits';\n cancel_edits.innerText = 'Cancel';\n cancel_edits.addEventListener('click', cancel_edit_view);\n\n edit_buttons.append(cancel_edits, save_edits);\n\n var edit_pencil = document.createElement('img');\n edit_pencil.className = 'edit_pencil';\n edit_pencil.id = 'edit_profile_button';\n edit_pencil.src = 'static/edit_pencil.svg';\n edit_pencil.addEventListener('click', show_edit_view );\n\n var trash_can = document.createElement('img');\n trash_can.className = 'trash_can';\n trash_can.id = 'delete_profile_button';\n trash_can.src = 'static/trash_can.svg';\n trash_can.setAttribute('var', this.id);\n trash_can.addEventListener('click', function(event) {\n \n var owner_id = event.target.getAttribute('var');\n \n var cards = document.getElementsByClassName('card');\n for( let card of cards ) {\n if(card.id == owner_id) {\n card.remove();\n }\n }\n close_profile();\n delete_person(owner_id);\n });\n\n\n\n relative_info_col.append(parents_label, profile_parents, children_label, profile_children, siblings_label, profile_siblings);\n\n profile_info_container.append(person_info_col, relative_info_col)\n\n // do we need gender? idk.\n profile_div.append(edit_pencil, profile_photo, trash_can, profile_info_container);\n\n\n var click_barrier = document.createElement('div');\n click_barrier.className = 'click_barrier';\n\n body.append(click_barrier, profile_div);\n\n // listen for clicks outside of the profile\n setTimeout(function () {\n body.addEventListener('click', outside_click );\n }, 100);\n\n function outside_click(event) {\n\n var clicked_in = true;\n var clicked_element = event.target;\n \n do {\n \n // target element must be profile_div, or a child\n if(clicked_element == profile_div) {\n return // exit checking loop\n }\n // quick fix for cancel_edits button\n if(clicked_element.className == 'cancel_edits') {\n return\n }\n // anything other than the profile div needs to check it's parent\n let next_parent = clicked_element.parentElement;\n \n // next two ifs will loop until it either finds the profile\n // or it finds the body.\n if(next_parent == profile_div) {\n return // exit checking loop\n }\n \n if(next_parent == body ) {\n clicked_in = false;\n // remove profile div and stop this listener\n close_profile();\n \n }\n\n // assignment for next iteration..\n clicked_element = next_parent;\n\n } while (clicked_in);\n\n }\n \n function close_profile() {\n profile_div.remove();\n click_barrier.remove();\n body.removeEventListener('click', outside_click);\n\n }\n\n function save_profile(id) {\n // grab information from the inputs, \n // and send it to the server for updating.\n // we can get the id like this?\n \n var edit_person_object = {};\n edit_person_object.id = id;\n edit_person_object.givenName = edit_givenName.value;\n edit_person_object.familyName = edit_familyName.value;\n edit_person_object.dateOfBirth = myDateFormat(edit_dateOfBirth.value);\n // DOD TBD\n edit_person_object.details = edit_details.value;\n // gender should not change. lol\n \n // add relationships to this, obviously\n var json_string = JSON.stringify(edit_person_object);\n\n // post to server\n var ajax_request = new XMLHttpRequest();\n ajax_request.open('POST', '/edit_person');\n ajax_request.setRequestHeader(\"Content-Type\", \"application/json\");\n ajax_request.send(json_string);\n\n ajax_request.onload = function() {\n\n // this is on response..\n // we are assuming success right now\n\n var js_person = person_from_id(edit_person_object.id);\n // this is prolly not working.\n js_person.update_profile(edit_person_object);\n\n // close edit view../ update displays\n edit_givenName.remove();\n profile_givenName.innerText = js_person.givenName;\n givenName_label.after(profile_givenName);\n\n edit_familyName.remove();\n profile_familyName.innerText = js_person.familyName;\n familyName_label.after(profile_familyName);\n\n edit_dateOfBirth.remove();\n profile_dob.innerText = js_person.dateOfBirth;\n dob_label.after(profile_dob);\n\n // conditional DOD addition\n\n edit_details.remove();\n profile_details.innerText = js_person.details;\n details_label.after(profile_details);\n\n add_relative_container.remove();\n save_edits.remove();\n cancel_edits.remove();\n\n edit_pencil.style.display = 'block';\n\n update_tree();\n \n }\n \n\n // probably remove the inputs and display\n // the normal divs again.\n\n }\n\n function array_to_element(array, parent_elem) {\n \n array.forEach(function(person) {\n var person_elem = document.createElement('div');\n person_elem.className = 'profile_relation';\n \n var person_name = document.createElement('div');\n person_name.className = 'relation_name';\n person_name.innerText = person.givenName;\n person_name.setAttribute('var', person.id);\n\n var relation_remove = document.createElement('div');\n relation_remove.className = 'relation_remove';\n\n person_elem.append(person_name, relation_remove);\n\n parent_elem.appendChild(person_elem);\n });\n\n }\n\n function show_edit_view() {\n profile_givenName.remove();\n givenName_label.after(edit_givenName);\n\n profile_familyName.remove();\n familyName_label.after(edit_familyName);\n\n profile_dob.remove();\n dob_label.after(edit_dateOfBirth);\n\n // conditional DOD addition\n\n profile_details.remove();\n details_label.after(edit_details);\n \n profile_siblings.after(add_relative_container);\n\n profile_info_container.after(edit_buttons);\n\n // show relation_remove minus and add that functionality\n var minuses = document.getElementsByClassName('relation_remove');\n for( let minus of minuses) {\n minus.classList.add('show');\n minus.parentElement.addEventListener('click', delete_relationship);\n minus.parentElement.style.cursor = 'pointer';\n }\n\n edit_pencil.style.display = 'none';\n }\n\n // process click event for removal of relationship\n function delete_relationship(event) {\n var id = event.target.getAttribute('var');\n var person_object = person_from_id(id);\n var owner_delete = document.getElementsByClassName('trash_can');\n var owner_id = owner_delete[0].getAttribute('var');\n var owner_object = person_from_id(owner_id);\n\n id = parseInt(id);\n owner_id = parseInt(owner_id);\n\n // removal from javascript side\n for( let entry of RELATION_ARRAY) {\n console.log('checking entry', entry);\n if( entry.person_a_id == id && entry.person_b_id == owner_id) {\n // person b must be sifted\n console.log('removing relationships from arrays');\n person_object.remove_relationship(owner_object);\n owner_object.remove_relationship(person_object);\n\n let index = RELATION_ARRAY.indexOf(entry);\n RELATION_ARRAY.splice(index, 1);\n } else if ( entry.person_b_id == id && entry.person_a_id == owner_id ) {\n console.log('removing relationships from arrays');\n person_object.remove_relationship(owner_object);\n owner_object.remove_relationship(person_object);\n\n let index = RELATION_ARRAY.indexOf(entry);\n RELATION_ARRAY.splice(index, 1);\n }\n }\n \n // ajax to remove server side\n var person_id = {}\n person_id.id = id;\n \n var json_string = JSON.stringify(person_id);\n\n var ajax_request = new XMLHttpRequest();\n ajax_request.open(\"POST\", \"/remove_relationship\");\n ajax_request.setRequestHeader(\"Content-Type\", \"application/json\"); // important for flask interpretation\n ajax_request.send(json_string);\n ajax_request.onload = function() {\n // all javascript should be updated.\n // remove name from current list on profile\n var profile_relation_div = event.target.parentElement;\n profile_relation_div.remove();\n\n console.log('after deletion of relatioship - ', RELATION_ARRAY);\n\n update_tree();\n };\n\n }\n\n // process select values for creation of relationship entry\n function add_relationship() {\n var type = document.getElementById('select_new_relative_type');\n var adding_person = document.getElementById('select_new_relative');\n var label_element = document.getElementById('add_relative_current_id');\n var current_person_id = label_element.getAttribute('var');\n var current_person_obj = person_from_id(current_person_id);\n\n var relation_entry = {};\n\n switch(type.value) {\n case 'a': // the added person is the parent\n relation_entry.relation_type = 0;\n relation_entry.person_a_id = parseInt(adding_person.value);\n relation_entry.person_b_id = parseInt(current_person_id);\n break;\n case 'b': // the added person is the child\n relation_entry.relation_type = 0;\n relation_entry.person_a_id = parseInt(current_person_id);\n relation_entry.person_b_id = parseInt(adding_person.value);\n break;\n case 'c': // the persons are siblings, doesn't matter\n relation_entry.relation_type = 1;\n relation_entry.person_a_id = parseInt(current_person_id);\n relation_entry.person_b_id = parseInt(adding_person.value);\n break;\n }\n\n console.log(relation_entry);\n RELATION_ARRAY.push(relation_entry);\n create_relationship(relation_entry);\n\n\n let json_string = JSON.stringify(relation_entry);\n\n // post section\n var ajax_request = new XMLHttpRequest();\n ajax_request.open(\"POST\", \"/add_relationship\");\n ajax_request.setRequestHeader(\"Content-Type\", \"application/json\"); // important for flask interpretation\n ajax_request.send(json_string);\n // this is from the response\n ajax_request.onload = function() { \n\n // add to profile view\n var profile_arrays = document.getElementsByClassName('profile_array');\n for( let elem of profile_arrays) {\n switch(elem.id) {\n case 'profile_parents':\n //remove what's there\n for( let child of elem.children) {\n child.remove();\n }\n // use person object\n array_to_element(current_person_obj.parents, elem);\n break;\n case 'profile_children':\n //remove what's there\n for( let child of elem.children) {\n child.remove();\n }\n // use person object\n array_to_element(current_person_obj.children, elem);\n break;\n case 'profile_siblings':\n //remove what's there\n for( let child of elem.children) {\n child.remove();\n }\n // use person object\n array_to_element(current_person_obj.siblings, elem);\n break;\n }\n }\n\n update_tree();\n\n };\n\n }\n\n function cancel_edit_view() {\n // remove inputs and return divs\n edit_givenName.remove();\n givenName_label.after(profile_givenName);\n\n edit_familyName.remove();\n familyName_label.after(profile_familyName);\n\n edit_dateOfBirth.remove();\n dob_label.after(profile_dob);\n\n // conditional DOD addition\n\n edit_details.remove();\n details_label.after(profile_details);\n\n add_relative_container.remove();\n\n edit_buttons.remove();\n\n var minuses = document.getElementsByClassName('relation_remove');\n for( let minus of minuses) {\n minus.classList.remove('show');\n minus.parentElement.removeEventListener('click', delete_relationship);\n minus.parentElement.style.cursor = 'default';\n }\n\n edit_pencil.style.display = 'block';\n }\n\n }", "title": "" }, { "docid": "eaf91b9415b4507f1d684acfcaa81d32", "score": "0.5559709", "text": "function putNewUser (){\n if(displayName){\n db.ref('/users/' + uid).once('value').then(function(snap) {\n if(snap.val()){\n //exit bcs user already exists\n return;\n } else {\n // save the user's profile into the database\n db.ref('/users/' + uid).set({\n displayName: displayName,\n email: email,\n photoUrl: photoUrl,\n provider: provider\n });\n }\n }, function(error) {\n // The Promise was rejected.\n toast(error);\n });\n }\n }", "title": "" }, { "docid": "f6e89ef1782300c43ab4a0521f8be123", "score": "0.55562365", "text": "async function onSave() {\n const userJson = {\n \"userid\": window.sessionStorage.getItem('userid'),\n \"picture\": user.picture,\n \"name\": document.getElementById('profile-name').innerHTML,\n \"interests\": document.getElementById('profile-interests').innerHTML,\n \"courses\": document.getElementById('profile-courses').innerHTML\n };\n await fetch(\n 'https://us-central1-studywithme.cloudfunctions.net/api/editProfile',\n {\n method: 'post',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(userJson)\n }\n );\n }", "title": "" }, { "docid": "3d07ce133e51d4bc2365272b63702fd6", "score": "0.5555766", "text": "function insertParticipant(values, callback) {\n\tquery(\"insert into bod.participants(email, name)\" + \n\t\t\"values ('\" + values.email + \"', '\" + values.name + \"');\", callback);\n}", "title": "" }, { "docid": "415d98d7c361c5e11a774537c6f24c49", "score": "0.5554361", "text": "function pageUpdateAccount() {\n $(\"#update-name\").val(appUser.get('name'));\n $(\"#update-email\").val(appUser.get('email'));\n $(\"#update-username\").val(appUser.get('username'));\n }", "title": "" }, { "docid": "2b0e6610991acdb5cb06c4fcb64ef514", "score": "0.55446804", "text": "function nextProfile(){\n const currentProfile = profiles.next().value;\n if(currentProfile!== undefined){\n document.getElementById('profileDisplay').innerHTML = `\n <ul class=\"list-group\">\n <li class=\"list-group-item\">Name: ${currentProfile.name} </li>\n <li class=\"list-group-item\">Age: ${currentProfile.age} </li>\n <li class=\"list-group-item\">Location: ${currentProfile.location} </li>\n <li class=\"list-group-item\">Gender: ${currentProfile.gender} </li>\n <li class=\"list-group-item\">Looking For: ${currentProfile.lookingfor} </li>\n </ul>\n `;\n document.getElementById('imageDisplay').innerHTML = `\n <img src=\"${currentProfile.image}\">\n `\n }else{\n //no more profiles\n window.location.reload();\n }\n}", "title": "" }, { "docid": "d3bdc0652955cbbc0ceff7b4dce4e6ca", "score": "0.55310565", "text": "function SaveProfiles(member, profiles, message) {\n var userInfo = {\n bungieName: member.displayName,\n profilePicturePath: member.profilePicturePath\n }\n userInfo.profiles = []\n\n for(var profile of profiles) {\n userInfo.profiles.push(profile)\n }\n\n MakeUserCard(userInfo, message)\n}", "title": "" } ]
3dad7eb27a6d1ea592b82303e23782a2
Render card items corresponding to the specified data.
[ { "docid": "ca8604d8784a1fb3f313c8f44a7acf78", "score": "0.63435787", "text": "function renderData(props) {\n const { keyFormatter, valueFormatters = {}, data, keys, sortKeys } = props;\n const _keys = keys ? keys : objectKeys(data || {}).sort(sortKeys);\n const titles = keyFormatter ? _keys.map(keyFormatter) : _keys;\n const values = _keys.map(i => {\n const valueFormatter = valueFormatters[i];\n const value = data ? data[i] : undefined;\n return valueFormatter ? valueFormatter(value) : value;\n });\n return data && titles.map((cardItemTitle, i) => React.createElement(CardItem_1.default, { key: i, value: values[i], title: cardItemTitle }));\n}", "title": "" } ]
[ { "docid": "e598a5579bc26c4359005e4f67830a2a", "score": "0.7428277", "text": "function render(data) {\n\n\tlet container = document.getElementById(\"card-holder\");\n\tcontainer.innerHTML = \"\"; // clear the current content.\n\n\tfor (let cardInfo of data) {\n\t\tfunction generateTags() {\n\t\t\tlet outputString = '';\n\t\t\tlet genres = cardInfo.genre.split(\",\");\n\t\t\tfor (let genre of genres) {\n\t\t\t\toutputString += '<p class=\"m-1 genre badge badge-dark\">' + genre + '</p>'\n\t\t\t}\n\t\t\treturn outputString;\n\t\t}\n\n\t\tlet contentTempalte = `\n\t\t\t<div class=\"card\">\n\t\t\t <div class=\"row\" style=\"padding: 10px 10px 10px 0;\">\n <div class=\"col-sm-4\">\n <img class=\"card-img-left w-100\" src=\"${cardInfo.poster_url}\" style=\"margin-top: 10%;margin-left: 10%;\">\n </div>\n <div class=\"col-sm-8\">\n <div class=\"row\">\n <div class=\"col\">\n <h5 class=\"card-title\">${cardInfo.movie_title}</h5>\n <h6 class=\"card-subtitle mb-2 text-muted\">${cardInfo.release_year}</h6>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col\">\n <p>${cardInfo.plot}</p>\n </div>\n </div>\n \n <div class=\"dropdown-divider\"></div>\n <div class=\"row\">\n <div class=\"col\">\n ${generateTags()}\n </div>\n </div>\n \n <div class=\"row\">\n <div class=\"col\">\n <p class=\"cast\">${cardInfo.cast}</p>\n </div>\n </div>\n <div class=\"row\" id=\"action-${cardInfo.id}\">\n </div>\n </div>\n\t\t</div>`;\n\n\t\t// create main row for a card.\n\t\tlet mainRow = document.createElement('div');\n\t\tmainRow.setAttribute('style', 'margin-bottom: 10px');\n\t\tmainRow.className = 'col-sm-6';\n\t\tmainRow.innerHTML = contentTempalte;\n\n\t\tcontainer.appendChild(mainRow);\n\n\t\t// create action buttons and toggle.\n\t\tlet actionDiv = document.getElementById('action-' + cardInfo.id);\n\n\t\tlet column1 = document.createElement('div');\n\t\tcolumn1.className = 'col-sm-8';\n\n\t\tlet watchedToggle = document.createElement('input');\n\t\twatchedToggle.setAttribute('id', 'watch-toggle-' + cardInfo.id);\n\t\twatchedToggle.setAttribute('type', 'checkbox');\n\t\tif (cardInfo.watched) {\n\t\t\twatchedToggle.setAttribute('checked', true);\n\t\t}\n\t\twatchedToggle.addEventListener('click', function () {\n\t\t\teditWatchStatus(cardInfo);\n\t\t});\n\t\tlet watchedLabel = document.createElement('label');\n\t\tlet textLabel = document.createElement('label');\n\t\ttextLabel.innerText = 'Watched:';\n\t\twatchedLabel.innerHTML = '<i> </i>';\n\t\ttextLabel.setAttribute('style', 'padding-right: 4%');\n\n\t\twatchedLabel.setAttribute('for', 'watch-toggle-' + cardInfo.id);\n\t\twatchedLabel.setAttribute('data-text-true', 'Yes');\n\t\twatchedLabel.setAttribute('data-text-false', 'No');\n\n\t\tdocument.createElement('div');\n\t\tcolumn1.appendChild(textLabel);\n\t\tcolumn1.appendChild(watchedToggle);\n\t\tcolumn1.appendChild(watchedLabel);\n\n\t\tactionDiv.appendChild(column1); // add toggle finish\n\n\t\tlet buttonsDiv = document.createElement('div');\n\t\tbuttonsDiv.className = 'row';\n\n\t\t// edit button\n\t\tlet editButton = document.createElement(\"button\");\n\t//\teditButton.innerHTML = '<i class=\"fas fa-edit\"></i>';\n\t//\teditButton.className = \"btn btn-secondary\";\n\t\teditButton.innerHTML = '<img src=\"edit.png\" />';\n\n\t\teditButton.addEventListener(\"click\", function () {\n\t\t\topenEditModal(cardInfo);\n\t\t});\n\n\t\tbuttonsDiv.appendChild(editButton);\n\n\t\t// delete button\n\t\tlet removeButton = document.createElement(\"button\");\n\t//\tremoveButton.innerHTML = '<i class=\"fas fa-trash-alt\"></i>';\n\t\tremoveButton.innerHTML = '<img src=\"delete.png\" />';\n\t//\tremoveButton.className = \"btn btn-danger\";\n\t\tremoveButton.setAttribute('style', 'margin-left: 5px');\n\t\tremoveButton.addEventListener(\"click\", function () {\n\t\t\tdeleteMovieById(cardInfo.id);\n\t\t});\n\n\t\tbuttonsDiv.appendChild(removeButton);\n\t\tactionDiv.appendChild(buttonsDiv);\n\t}\n}", "title": "" }, { "docid": "a52a9f311992b175c2ff2554e911248c", "score": "0.7258747", "text": "function renderCard(data) {\n //console.log(data);\n let typeContainer = document.createElement('div');\n typeContainer.className = 'types';\n\n let card = document.createElement('div');\n card.className = 'card';\n card.innerHTML = `<img src=\"${data.sprite}\" alt=\"${data.name}\">\n <div class=\"card-header\">\n <h1>${data.name}</h1>\n <span class=\"dexnumber\">${data.number}</span>\n </div>`;\n card.insertAdjacentElement('beforeEnd', typeContainer);\n card.insertAdjacentHTML('beforeend', `<div class=\"desc\">\n <h2>${data.genera}</h2>\n <p>${data.flavortext}</p>\n</div>`);\n\n cardContainer.insertAdjacentElement('beforeend', card);\n}", "title": "" }, { "docid": "9de1095c014df5eb37613fba2f9f5ceb", "score": "0.70485824", "text": "function render() {\n const cards = parkData.data.map(function(park) {\n return `\n <article data-info=\"${parkData}\" class=\"card\">\n \n <h2>${park.fullName }</h2>\n\n <img src=\"${park.images[0].url}\" class=\"responsive\" alt=\"${park.fullName}\">\n <br>\n \n <p>State(s):</p>\n <p>${park.states}</p>\n \n <p>Designation: </p>\n <p>${park.designation}</p>\n \n <p>Description: </p>\n <p>${park.description}</p>\n \n <p>Directions: </p>\n <p>${park.directionsInfo}</p>\n \n <p>Weather Conditions: </p>\n <p id=\"break\">${park.weatherInfo}</p>\n\n <p>Park Fees: </p>\n <p>${park.entranceFees[0].description}</p>\n \n <p>More Information: </p>\n <p><a href=\"${park.url}\">Link to Website</a></p>\n\n </article>\n `;\n });\n $collection.html(cards);\n }", "title": "" }, { "docid": "791fc582648faf006130b511dfed00c7", "score": "0.68557686", "text": "function renderCards(data){\n const goodsWrapper = document.querySelector('.goods');\n data.goods.forEach( (good) => {\n const card = document.createElement('div');\n card.className = 'col-12 col-md-6 col-lg-4 col-xl-3';\n card.innerHTML = `\n <div class = \"card\" data-category=\"${good.category}\">\n ${good.sale ? '<div class = \"card-sale\"> 🔥Hot Sale🔥 </div>' : ''}\n <div class = \"card-img-wrapper\">\n <span class = \"card-img-top\" style = \"background-image: url('${good.img}')\">\n </span>\n </div> \n <div class = \"card-body justify-content-between\" >\n <div class = \"card-price\" style=\"${good.sale ? 'color:red' : ''}\">${good.price} P</div> \n <h5 class = \"card-title\"> ${good.title}</h5> \n <button class = \"btn btn-primary\"> В корзину </button> \n </div> \n </div> \n `;\n goodsWrapper.appendChild(card);\n });\n}", "title": "" }, { "docid": "6f01cc9ff130ea762c69a0f1b09bad2c", "score": "0.66703063", "text": "function renderMovieCard(data) {\n let rowContent = ''\n data.forEach((item) => {\n rowContent += `\n <div class=\"col-sm-3\">\n <div class=\"mb-2\">\n <div class=\"card\">\n <img\n src=\"${POSTER_URL + item.image}\"\n class=\"card-img-top\" alt=\"Movie Poster\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${item.title}</h5>\n </div>\n <div class=\"card-footer\">\n <button class=\"btn btn-primary btn-show-movie\" data-toggle=\"modal\"\n data-target=\"#movie-modal\" data-id=\"${item.id}\">More</button>\n <button class=\"btn btn-danger btn-remove-favorite\" data-id=\"${item.id}\">&times;</button>\n </div>\n </div>\n </div>\n </div>\n `\n })\n panel.innerHTML = rowContent\n}", "title": "" }, { "docid": "947c50d225bca1e13701e68cfd98353d", "score": "0.6655797", "text": "function renderItems(arr) {\n arr = arr || items;\n let cards = doc.querySelector('#catalog-cards');\n _.forEach(arr, function (item) {\n renderCard(item, cards);\n } )\n}", "title": "" }, { "docid": "7b88255d4a78b5c93d4c896ca3439a69", "score": "0.65988266", "text": "CardList() {\n const { data } = this.state;\n return data.map(item => <Card key={item.id} avatar_url={item.avatar_url} name={item.name} company={item.company} />);\n }", "title": "" }, { "docid": "2a949492c1c881794cdda4997f5abc43", "score": "0.64880604", "text": "function renderJobsCards(data) {\n\tvar template, html;\n\t\n\t_currPage = \"jobs\";\n\n\trenderNavbar();\n\n\tcreateJobsCardRows(data);\n\n\ttemplate = \t\"{{#rows}}\" +\n\t\t\t\t\t\t\"<div class='row'>\" +\n\t\t\t\t\t\t\t\"{{#row}}\" +\n\t\t\t\t\t\t\t\t\"<div class='col-sm-6'>\" +\n\t\t\t\t\t\t\t\t\t\"<div class='panel panel-default' id='card-{{id}}'>\" +\n\t\t\t\t\t\t\t\t\t\t\"<div class='panel-heading'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\"<div class='row'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"<div class='col-xs-8' id='header-{{id}}'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<h4><strong>{{name}}</strong></h4>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"{{category}} / \" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"{{subcategory}} \" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"<div class='col-xs-4 col-card-expand'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='#' data-toggle='modal' data-target='#cardModal' onclick='renderJobsCardModal(\\\"{{id}}\\\")'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<i class='fa fa-expand fa-fw' aria-hidden='true'></i>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"</a>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\"<div class='panel-body' id='body-{{id}}'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\"<div class='row'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"<div class='col-xs-8'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<strong>Address:</strong> {{address}} <br><br>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<strong>Phone:</strong> {{phone}} <br><br>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<strong>Website:</strong> <a href='{{website}}'>{{website}}</a> <br><br>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"<div class='col-xs-4 col-card-image'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<img src='{{image}}'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\t\"<div class='panel-footer' id='footer-{{id}}'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\"<div class='btn-group btn-group-justified'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"{{#loggedIn}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"{{#saved}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='#' class='btn btn-default' data-toggle='modal' data-target='#pageModal' onclick='removeJobsItem(\\\"{{id}}\\\")'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Remove <i class='fa fa-times fa-fw' aria-hidden='true'></i>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"</a>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"{{/saved}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"{{^saved}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='#' class='btn btn-default btn-save-item' data-toggle='modal' data-target='#pageModal' onclick='saveJobsItem(\\\"{{id}}\\\")'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Save <i class='fa fa-star fa-fw' aria-hidden='true'></i>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"</a>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"{{/saved}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"{{/loggedIn}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"{{^loggedIn}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='#' class='btn btn-default' data-toggle='modal' data-target='#pageModal' onclick='renderLogInToSaveJobsModal()'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Save <i class='fa fa-star fa-fw' aria-hidden='true'></i>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"</a>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"{{/loggedIn}}\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='#' class='btn btn-default' data-toggle='modal' data-target='#pageModal' onclick='renderShareModal()'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Share <i class='fa fa-share-alt fa-fw' aria-hidden='true'></i>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"</a>\" +\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\"</div>\" +\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\t\"{{/row}}\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"{{/rows}}\";\n\t\n\tif(data == null) {\n\t\tjobsData.loggedIn = _loggedIn;\n\t\thtml = Mustache.render(template, jobsData);\n\t}\n\telse {\n\t\tdata.loggedIn = _loggedIn;\n\t\thtml = Mustache.render(template, data);\n\t}\n\n\t$(\"#appContent\").html(html);\n\n\trenderJobsFilters();\n}", "title": "" }, { "docid": "c51f61e964c6626618816b122ff561ce", "score": "0.6463229", "text": "render() {\n\t\tfor (const card of this.cards) {\n\t\t\t// Create card element - card\n\t\t\tconst cardEl = document.createElement('div');\n\t\t\tcardEl.className = 'card';\n\n\t\t\t// Assing unique ID to card element\n\t\t\tcardEl.id = 'card-' + card.uuid;\n\n\t\t\t// Create card element - front side\n\t\t\tconst cardFrontEl = document.createElement('div');\n\t\t\tcardFrontEl.className = 'card-front';\n\n\t\t\t// Create card element - back side\n\t\t\tconst cardBackEl = document.createElement('div');\n\t\t\tcardBackEl.className = 'card-back';\n\n\t\t\tconst iconEl = document.createElement('i');\n\t\t\ticonEl.className = 'fa fa-' + card.code;\n\n\t\t\t// Append card element - front side\n\t\t\tcardEl.appendChild(cardFrontEl);\n\n\t\t\t// Compose and append card element - back side\n\t\t\tcardBackEl.appendChild(iconEl);\n\t\t\tcardEl.appendChild(cardBackEl);\n\n\t\t\t// Register logic on composed card element\n\t\t\tcardFrontEl.addEventListener('click', () => {\n\t\t\t\tthis.onCardClick(card);\n\t\t\t});\n\n\t\t\t// Append composed card element to visible DOM\n\t\t\tthis.containerBody.appendChild(cardEl);\n\t\t}\n\t}", "title": "" }, { "docid": "a0c9268d07d587af0b6e9b46c5607c50", "score": "0.6436137", "text": "function renderCard(card) {\n var elm = $(cardTemplate(card));\n\n $(\"[data-column-id=\" + card.column_id + \"]\").find('ul').append(elm);\n }", "title": "" }, { "docid": "cc5f23fa1f6b456162dc076545137de8", "score": "0.6426577", "text": "function CurrentCard(props) {\n return (\n <Card title='Current Data'>\n <div className='item-list'>\n {props.data.map(item => (\n <div key={item.type}>\n <span>{item.type}</span>\n <span className='data' title={item.collected}>\n {Math.round(item.value * 10)/10}\n </span>\n </div>\n ))}\n </div>\n </Card>\n )\n}", "title": "" }, { "docid": "4830261d1e4eb737d48bb9b55ebe5922", "score": "0.6418246", "text": "function displayCards() {\n // For each dataObject, create a new card and append it to the DOM\n cards.forEach((card) => {\n // const positionFromLeft = i * 25;\n const cardElement = document.createElement('div');\n cardElement.setAttribute('data-value', card.value);\n cardElement.classList.add('card', `${card.suit}-${card.value}`);\n // cardElement.style.left = `${positionFromLeft}px`;\n cardsWrapper.append(cardElement);\n });\n styleCards();\n // eslint-disable-next-line no-use-before-define\n clickOnCard();\n}", "title": "" }, { "docid": "a3773529a9c5648533a90ecb6708ae25", "score": "0.64141655", "text": "function renderCard(item, i) {\n return (<Card className={classes.card} key={i}>\n <CardContent>\n <Typography className={classes.title} color=\"textSecondary\" gutterBottom>\n {item[0]}\n </Typography>\n <Typography variant=\"h5\" component=\"h2\">\n {item[1]}\n </Typography>\n <Typography className={classes.pos} color=\"textSecondary\">\n {item[2]}\n </Typography>\n </CardContent>\n <CardActions>\n <Button size=\"small\">Send</Button>\n </CardActions>\n </Card>);\n }", "title": "" }, { "docid": "71dc554e17c406249852147333972659", "score": "0.6386869", "text": "displayCards() {\n // Create a card for each products\n this.products.forEach((product) => {\n const card = product.createCard(product);\n this.container.appendChild(card);\n });\n }", "title": "" }, { "docid": "93a91298ec00282749d52c7c31784f09", "score": "0.63748", "text": "function renderCards() {\n initialCards.forEach(renderCard)\n}", "title": "" }, { "docid": "8977e1fe49f9f6e6c200185979c91413", "score": "0.6372381", "text": "_renderValue(cards) {\n const items = cards.map(card => this.cardTemplate(_.defaults({\n tagName: 'li',\n }, card)));\n this.$el.html(`<ul>${items.join('')}</ul>`);\n }", "title": "" }, { "docid": "f1f86df2e7c6504bf23908904a13054e", "score": "0.6362337", "text": "function renderCatalogItems () {\n let cards = doc.querySelector('#catalog-cards');\n for (let i = 0; i < items.length; i++) {\n if (items[i].category === 'catalog') {\n renderCard(items[i], cards);\n }\n }\n}", "title": "" }, { "docid": "901bc06c2f8e79db794f6021e43252ae", "score": "0.6360014", "text": "function displayCards(card) {\n\treturn `<li class=\"card\" data-card=\"${card}\"><i class=\"fa ${card}\"></i></li>`\n}", "title": "" }, { "docid": "f890da53450182ae147444ad6bf9665e", "score": "0.63546896", "text": "function renderItem(itemData, page) {\n if(!itemData || !itemData.id) return '';\n if(!page) page = 1;\n\n var id = itemData.id;\n var type = itemData.type || 'content';\n var title = itemData.title || 'no title';\n var desc = itemData.desc || '';\n var icon = itemData.icon || NOIMAGE;\n var button = itemData.button || '';\n var class_name = itemData.button || '';\n\n var output = '<li class=\"listitem '+class_name+' label-'+button+'\" rel=\"'+page+'\">'\n + '<a data-type=\"'+type+'\" data-id=\"'+id+'\" data-button=\"'+button+'\" href=\"#detail-'+id+'\" title=\"'+title+'\">'\n + '<img src=\"'+icon+'\" class=\"preview lazy\" alt=\"'+title+'\" width=\"64\" height=\"64\" onload=\"APP.refresh();\" onerror=\"this.src=NOIMAGE;\" />'\n + '<h3>'+title+'</h3>'\n + '<span>'+desc+'</span>'\n + '</a>'\n + '</li>';\n\n return output;\n }", "title": "" }, { "docid": "9bea0a1f39e68423e1adf8b6c694d0ac", "score": "0.63541263", "text": "function renderItem(itemData, i){\n console.log(itemData);\n var $item = $('<div>').addClass('selection-item');\n var $itemNum = $('<span>').addClass('selection-item-number').html((i+1)+'.');\n var $name = $('<span>').addClass('selection-item-name').html(itemData.item.name);\n var $check = $('<i>').addClass('fa fa-check selection-item-check');\n var $price = $('<span>').addClass('selection-item-price').html(itemData.item.cost);\n\n $item.append($itemNum);\n $item.append($name);\n $item.append($check);\n $item.append($price);\n\n return $item;\n\n }", "title": "" }, { "docid": "38cfdec6a85d3938e93d775a5e70a072", "score": "0.63198733", "text": "function show(data) {\n for(let preciseData in data) {\n let article = document.createElement(\"article\");\n document.getElementById('card').appendChild(article);\n article.classList.add(\"card\", \"col-10\", \"mx-auto\", \"col-md-5\", \"col-lg-3\", \"my-4\");\n article.style.width = \"18rem\";\n let title = document.createElement(\"h3\");\n title.classList.add(\"card-header\", \"text-center\");\n article.appendChild(title);\n title.innerText = preciseData;\n let ul = document.createElement(\"ul\");\n article.appendChild(ul);\n ul.classList.add(\"list-group\", \"list-group-flush\");\n for (let values in data[preciseData]) {\n let li = document.createElement(\"li\");\n ul.appendChild(li);\n li.classList.add(\"list-group-item\", \"col-10\", \"mx-auto\");\n li.innerText = values + \" : \" + data[preciseData][values] ;\n }\n }\n}", "title": "" }, { "docid": "5f480d6b9dc5de43c7dc05c0b8bd4e8b", "score": "0.6301845", "text": "function renderCards(filterId) {\n if (filterId == \"all\") {\n generateListItems(requestsData[\"requests\"]);\n } else {\n let tempArray = [];\n for (let index = 0; index < requestsData[\"requests\"].length; index++) {\n var element = requestsData[\"requests\"][index];\n if (\n element[\"category\"].toLowerCase() == filterId.toLowerCase() ||\n element[\"subcategory\"].toLowerCase() == filterId.toLowerCase()\n ) {\n tempArray.push(element);\n }\n }\n generateListItems(tempArray);\n }\n }", "title": "" }, { "docid": "853b4a5979d7fe35e47ea5f524c32e9f", "score": "0.6301742", "text": "function render(data){\r\n const cardList = document.createElement('card-list')\r\n cardList.items = data\r\n document.body.appendChild(cardList)\r\n document.body.appendChild(footer)\r\n\r\n const cardItem = document.querySelectorAll('card-item')\r\n \r\n cardItem.forEach(item => {\r\n \r\n item.addEventListener('click',event => {\r\n const id = event.target.parentElement.id;\r\n window.location.href = \"https://quran.kemenag.go.id/index.php/sura/\" + id;\r\n })\r\n })\r\n\r\n\r\n // SEARCH FUNCTION \r\n \r\n $('.searchBar').click(function(){\r\n $('card-list').html('')\r\n var data = $('.keyword').val()\r\n var expression = new RegExp(data,'gi')\r\n $.getJSON('https://api.banghasan.com/quran/format/json/surat',function(e){\r\n $.each(e.hasil,function(key,value){\r\n \r\n if (value.nama.match(expression) ){\r\n const cardItem = document.createElement('card-item')\r\n cardItem.item = value \r\n\r\n $('card-list').append(cardItem)\r\n \r\n const cards = document.querySelectorAll('card-item')\r\n \r\n cards.forEach(card => {\r\n \r\n card.addEventListener('click',event => {\r\n const id = event.target.parentElement.id;\r\n window.location.href = \"https://quran.kemenag.go.id/index.php/sura/\" + id;\r\n })\r\n })\r\n } else{\r\n\r\n }\r\n })\r\n })\r\n })\r\n \r\n }", "title": "" }, { "docid": "0c6301c4ea0469858a389ff235dc39f9", "score": "0.62874645", "text": "async function addCards(data) {\n const cards = document.getElementById('cards');\n await data.map(item => {\n cards.insertAdjacentHTML('afterbegin',\n `<div class=\"card-container ${item.category}\">\n <a href=\"/\" class=\"video-card\">\n <div class=\"video-card-img\">\n <img src=\"${item.thumbnail.url}\" alt=\"\">\n <div class=\"inner\"> \n <div class=\"video-card-img-tag\">\n <span class=\"tagline\">${item['genre-v2']}</span>\n </div>\n </div>\n </div>\n <div class=\"video-card-content\">\n <h3 class=\"name\">${item.name}</h3>\n <span class=\"description company\">${item.excerpt}</span>\n <span class=\"description location\">${filterEmptyData(item['recorded-at'])}</span>\n <span class=\"duration\">${filterEmptyData(item['video-length'])}</span>\n </div>\n </a>\n </div>`\n )\n });\n }", "title": "" }, { "docid": "12a04490c8db1c6cecf843a81ab868fa", "score": "0.6285426", "text": "renderItem(listing) {\n if (!listing[0]) {\n return <div></div>;\n }\n\n return listing[0].map(function(data) {\n return (\n <div className=\"flex-container\" key={data.id}>\n <div className=\"img-container\">\n <img className=\"biz-img\" src={data.img} alt={data.title} />\n </div>\n <div className=\"data-container\">\n <h2 className=\"biz-title\">\n {data.title}\n </h2>\n <div className=\"biz-details\">\n {/* <span>{data.headline}</span> */}\n <span className=\"biz-price\">\n {data.price}\n </span>\n <span className=\"biz-location\">\n {data.location}\n </span>\n <span className=\"biz-contact\">\n {data.contact}\n </span>\n </div>\n <div className=\"biz-description\">\n {data.description}\n </div>\n <div className=\"biz-capital\">\n Minimum Capital Required:{\" \"}\n <span className=\"biz-capital-num\">{data.capitalRequired}</span>\n </div>\n {/* <button className=\"btn btn-info biz-button\" type=\"button\">More Info</button> */}\n </div>\n </div>\n );\n });\n }", "title": "" }, { "docid": "69ac679daeff33794d85ceda90cf42ce", "score": "0.6266425", "text": "renderCards() {\n return (\n <ol className=\"cards\">\n { /* render the cards */ }\n </ol>\n );\n }", "title": "" }, { "docid": "a746b6614f7a3f57e0d3f7725587739b", "score": "0.6257934", "text": "function render(data) {\r\n // seleziona il template da utilizzare\r\n var source = $(\"#elm-template\").html();\r\n // compila il template selezionato con Handlebars\r\n var template = Handlebars.compile(source);\r\n // ciclo che manipola il context per ogni elemento di data da stampare\r\n for (var i = 0; i < data.length; i++) {\r\n var liBckColor;\r\n if (i % 2 > 0) {\r\n // dispari\r\n liBckColor = \"color1\"\r\n } else {\r\n // pari\r\n liBckColor = \"color2\"\r\n }\r\n var context = {\r\n \"id\": data[i].id,\r\n \"text\": data[i].text,\r\n \"bck-color\": liBckColor\r\n };\r\n // compila il template con il context manipolato\r\n var html = template(context);\r\n // inietta il codice Html manipolato nel DOM\r\n $(\"#to-do-list\").append(html);\r\n }\r\n}", "title": "" }, { "docid": "7e3298c18b2e60dad9c46c23a4ed99f1", "score": "0.6237013", "text": "function renderData( e, data ) {\n\t\t\t$view.empty();\n\t\t\t$view.append( $itemTmpl.applyTemplate( data ) );\n\t\t}", "title": "" }, { "docid": "07419d2a33c8d3929dfd823c220618a9", "score": "0.623197", "text": "function cardStandings(dataItems){\n const classementItems=document.querySelector('.standings-items');\n let card='';\n dataItems.forEach(data => {\n card+=`\n <div class=\"card horizontal teamItems\" data-id=${data.team.id}>\n <div class=\"card-image\">\n <img src=${data.team.crestUrl} alt=\"icon of team\">\n </div>\n <div class=\"card-stacked\">\n <div class=\"card-content \">\n <p><b>${data.position}. ${data.team.name}</b></p>\n <span class=\"playedgames\">played games : ${data.playedGames}</span>\n <span class=\"won\">won : ${data.won}</span>\n <span class=\"draw\">draw : ${data.draw}</span>\n <span class=\"lost\">lost : ${data.lost}</span>\n <span class=\"point\">point : ${data.points}</span>\n <span class=\"goalsFor\">goals for : ${data.goalsFor}</span>\n <span class=\"goalsAgainst\">goals against : ${data.goalsAgainst}</span>\n <span class=\"goalDifference\">goal difference : ${data.goalDifference}</span>\n </div>\n </div>\n </div>`\n });\n \n classementItems.innerHTML=card;\n }", "title": "" }, { "docid": "50ed95076d59f5f7edd325492f21d50e", "score": "0.62139106", "text": "function renderFilteredCards() {\n\n // Save the number of rows in a variable\n var currentRows = $(\".drink-row\").length;\n\n // Save the remaining card html in an array of objects\n var drinkArrayObject = [$(\".drink-card\")];\n\n // Count the number of drinks appended to be used when calling the drinkArrayObject\n var numDrinksAppended = 0;\n \n // For each row of cards..\n for (var i = 0; i < currentRows; i++) {\n var appendThreeEl = $(\"#append-three-cards-here-\" + i);\n appendThreeEl.empty();\n\n // Append three of the drinks saved in the drinkArrayObject\n for (var j = 0; j < 3; j++) {\n $(\"#append-three-cards-here-\" + i).append(drinkArrayObject[0][numDrinksAppended]);\n numDrinksAppended++;\n } \n\n }\n }", "title": "" }, { "docid": "0004c7af32d166f519e1d1eb80990432", "score": "0.6204345", "text": "render() {\n//* props - данные из коспонента который тебя вызывал\n let response = this.props.item; //* ответ от сервера который нам был передан из предыдущего компонента\n let cards = [];\n if (typeof response !== 'undefined' && response !== null) {\n if (response.hasOwnProperty('ScheduleResource') //* если имеет ответ ключ ScheduleResource\n && response.ScheduleResource.hasOwnProperty('Schedule')) {\n let schedules = response.ScheduleResource.Schedule;\n\n let totalZeit = '';\n for (let attribute in schedules) { //* скедьюлз расписание\n if (schedules.hasOwnProperty(attribute)) {\n let schedule = schedules[attribute]; //* вытягиваем элемент одного расписания\n if (schedule.hasOwnProperty('TotalJourney')\n && schedule.TotalJourney.hasOwnProperty('Duration')) {\n totalZeit = ResultItem.getDurationFormatted(schedule.TotalJourney.Duration);\n } //* то общее время равно результату нашей функции\n\n if (schedule.hasOwnProperty('Flight')) {\n let flug = schedule.Flight;\n\n let abfahrt = '';\n abfahrt = ResultItem.getAbfahrtInfo(flug); //* в функцию передаем объект расписания самолета\n //* а функция возвращает строку с датой и временем отправления\n\n let ankunft = '';\n ankunft = ResultItem.getAnkunftInfo(flug);\n\n let flugInfo;\n flugInfo = ResultItem.getFlugInfo(flug); //* номер самолета\n\n let cardHtml =\n <div className={`col-12 col-sm-6 col-md-4 p-0`}>\n <div className={`row result-item align-items-center`}>\n <div className={`col-12 totalZeit mb-3`}>\n <p className={`mb-0 title`}>Flugdauer</p>\n {totalZeit}\n </div>\n <div className={`col-4 abfahrt`}>\n <p className={`mb-0 title`}>Abfahrt</p>\n {/* Вывод в теге хтмл а не строку */}\n <p className={`abfahrt`} dangerouslySetInnerHTML={{__html: abfahrt}}></p>\n </div>\n <div className={`col-4 text-center`}>\n <i className=\"fas fa-chevron-right fa-3x\"></i>\n </div>\n <div className={`col-4 ankunft`}>\n <p className={`mb-0 title`}>Ankunft</p>\n <p className={`ankunft`} dangerouslySetInnerHTML={{__html: ankunft}}></p>\n </div>\n <div className={`col-12`}>\n <p className={`mb-0 title`}>Flug Info</p>\n <p className={`flugInfo`}>{flugInfo}</p>\n </div>\n </div>\n </div>;\n\n cards.push(cardHtml);\n }\n }\n }\n\n }\n }\n\n return (\n <div className=\"row\">\n {cards}\n </div>\n );\n }", "title": "" }, { "docid": "b79891db6d21d75f3566c32915e8688f", "score": "0.6196848", "text": "function renderToys(toyData){\n \ttoyData.forEach(function (toy){\n let newToyCard = toyCardMaker(toy);\n \t\ttoyCollection.append(newToyCard);\n \t});\n }", "title": "" }, { "docid": "e42736d9f0d74e19d35252cfbe076b16", "score": "0.61872214", "text": "function updateCards(data) {\r\n\td3.selectAll(\".tabs>ul>li\")\r\n\t\t.classed(\"is-active\", false);\r\n\r\n\td3.selectAll(`.${getChosenLanguage()[\"poem-type\"]}`)\r\n\t\t.classed(\"is-active\", true);\r\n\t\r\n\tlet index = getPoemsByLanguageIndex();\r\n\tlet poets = d3.selectAll(\".card-content>h5\");\r\n\tlet poems = d3.selectAll(\".card-content>div\");\r\n\r\n\tpoets.text(d => d[index]['poet']);\r\n\tpoems.html(d => `${d[index]['line1']}<br>${d[index]['line2']}<br>${d[index]['line3']}<br><br>${d[index]['line4']}<br>${d[index]['line5']}`);\r\n}", "title": "" }, { "docid": "0cbfc0acc96e63d0d04b8f3f290df811", "score": "0.6186485", "text": "function carouselCard(data,i) {\n if(data[0].getRole() == 'Manager'){\n var outputUnique =`\n <h6 id=\"${data[0].getRole()}OfficeNumber${i}\" class=\"cardText\">\n Office number: ${data[i].getOfficeNumber()}\n </h6>` \n }\n if(data[0].getRole() == 'Engineer'){\n var outputUnique =`\n <h6 id=\"${data[0].getRole()}Github${i}\" class=\"cardText\">\n Github:<a href=\"https://github.com/${data[i].getGithub()}\" target = \"_blank\">https://github.com/${data[i].getGithub()}</a>\n </h6>` \n }\n if(data[0].getRole() == 'Intern'){\n var outputUnique =`\n <h6 id=\"${data[0].getRole()}School${i}\" class=\"cardText\">\n School: ${data[i].getSchool()}\n </h6>` \n }\n return `<div id=\"${data[0].getRole()}cardContainer${i}\" class=\"card text-center\">\n <div id=\"${data[0].getRole()}cardContainerHeader${i}\" class=\"cardHeader text-center\">\n <h5 id=\"${data[0].getRole()}name${i}\" class=\"cardText\">\n ${data[i].getName()}\n <img id=\"${data[0].getRole()}icon${i}\" src=\"./src/images/${data[0].getRole()}.png\" height=\"auto\" width=\"30px\">\n </h5>\n <h5 id=\"${data[0].getRole()}role${i}\" class=\"cardText\">\n ${data[0].getRole()} #${i+1}\n </h5>\n </div>\n <div id=\"${data[0].getRole()}cardContainerContent${i}\" class=\"text-center\">\n <h6 id=\"${data[0].getRole()}Id${i}\" class=\"cardText\">\n ID: ${data[i].getId()}\n </h6>\n <h6 id=\"${data[0].getRole()}Email${i}\" class=\"cardText\">\n Email: <a href=\"mailto:${data[i].getEmail()}\">${data[i].getEmail()}</a>\n </h6>\n ${outputUnique}\n </div>\n </div>`\n}", "title": "" }, { "docid": "2804ccf80bb59317f2c0e93b3cdbf0c1", "score": "0.61864024", "text": "function renderItem({ item }) {\n return (\n <Card style={{borderBottomWidth: 1, borderRightWidth: 1, borderColor: colors.placeholder, marginHorizontal: 20, marginVertical: 10}}>\n <Card.Title\n title={item.createdUserObject.nickname}\n subtitle={\"Posted on: \" + new Date(item.createdAt * 1000).toDateString()}\n left={(props) => <Avatar.Image {...props} source={{uri: API_IMAGE_URL + item.createdUserObject.profilePic}} />}\n />\n\n <Card.Content style={{marginBottom: 10}}>\n <Headline>{item.title}</Headline>\n </Card.Content>\n\n <Card.Cover source={{ uri: API_IMAGE_URL + item.image }} />\n\n {item.description ? (\n <Card.Content style={{marginTop: 10}}>\n <Paragraph>{item.description}</Paragraph>\n </Card.Content>\n ) : <View />}\n\n <Card.Actions>\n <Button onPress={() => navigation.navigate(\"BrowseDetails\", {post_id: item.id, created_user: null})}>Details</Button>\n </Card.Actions>\n </Card>\n );\n }", "title": "" }, { "docid": "1027174f07159058032589492913239f", "score": "0.61778444", "text": "render (){\n return (\n/* <!-- Content Row Movies--> */\n <div className=\"row\">\n {/* <!-- Movies in Data Base --> */} \n {/* <!-- Total awards --> */}\n {/* <!-- Actors quantity --> */}\n {this.props.cards.map((card,i) => (\n <Card key={card + i} {...card} />\n )\n )}\n \n </div>\n /* <!-- End movies in Data Base --> */\n )\n }", "title": "" }, { "docid": "ce839b1d7b084a02f535b17013521c3c", "score": "0.6167641", "text": "renderCard(item){\n // List of attributes that whose information will be rendered on each card\n var attributeList = [\"first_name\", \"title\", \"party\", \"state\", \"active\"]; \n\n return(\n <Card>\n <Container style={{height: \"80%\", width: \"100%\"}}>\n <CardImg top width=\"100%\" height=\"100%\" src={item.image_url} alt={\"No image\"} />\n </Container>\n <CardBody>{\n attributeList.map((attribute) => this.renderAttribute(item, attribute))\n }\n <Button href= {\"/politician/\" + item.member_id} class=\"nav-link\" to={\"/politician/\" + item.member_id}> See More</Button>\n </CardBody>\n </Card>\n )\n}", "title": "" }, { "docid": "5d5701b5ee7f656714ac9cd523254171", "score": "0.6167561", "text": "renderCards(){\n const items = this.state.items;\n var cardDecks = []; // Will hold the card deck items\n var cards = []; // Will hold the card \n \n // Need 3 card deck items so loop 3 times\n for(var i = 0; i < 3; i++){\n cards = []; // Clears out the old card items to make a new one\n // Grabs 3 pieces of data at a time, creates card items for each of them\n // and adds each one to the cards list\n items.slice(i * 3,(i + 1) * 3).map(item => cards.push(this.renderCard(item))\n )\n // Adds the 3 newly created cards to the cardDecks list\n cardDecks.push(<CardDeck>{cards}</CardDeck>);\n }\n return cardDecks;\n}", "title": "" }, { "docid": "c2fc3f7e9fe3dc0c6c27da7fd9253065", "score": "0.6155229", "text": "function renderCreditHTML(data) {\n\n for (i = 0; i < data.length; i++) {\n\n if (data[i].card === \"Chase Credit Card\") {\n chaseJSON = data[i].balance;\n } else if (data[i].card === \"Citi Credit Card\") {\n citiJSON = data[i].balance;\n } else {\n bestbuyJSON = data[i].balance;\n }\n }\n\n updateCreditBalances();\n}", "title": "" }, { "docid": "1d2c179ee98d2daf2eb3fba44e505870", "score": "0.6154971", "text": "function renderItems(data) {\n\n // Create a temporary variable to store the item for each iteration\n var temp;\n\n /* For each item in the items array */\n for (i = 0; i < data.length; i++) {\n\n /* Create a new HTML <div></div> */\n temp = document.createElement('div');\n\n /* Example of adding a CSS class name */\n temp.className = 'item';\n\n /* Example of editing CSS directly in JS */ \n temp.style.backgroundColor = 'purple';\n temp.style.color = 'white';\n temp.style.padding = '40px';\n\n /* Set the value of this <div> to the item[currentIndex] */\n temp.innerHTML = data[i].id;\n\n /* Print each item in the API's JSON request */\n console.log(data[i]);\n\n /* Append to end of the current <body></body> */ \n document.getElementsByTagName('body')[0].appendChild(temp);\n }\n}", "title": "" }, { "docid": "9c2a91e55a34b85a0b359867a85e735c", "score": "0.6151101", "text": "function displayChips(data){\n return data.map((item) => {\n return (\n <Chip key={item} style={{display: 'inline-block', margin: '2px'}} onClick={() => savePurchaseOption(item)}>{item}</Chip>\n )})\n }", "title": "" }, { "docid": "908ab66fd8c2abac933fe838ac55399c", "score": "0.61506677", "text": "function displaySpaceCards(data) {\n // Clear all existing cards\n $(\"#ownerSpaces\").empty();\n\n // Make a new card for each space data entry\n data.forEach(spaceData => {\n $(\"#ownerSpaces\").append(makeParkingSpaceCard(spaceData));\n });\n}", "title": "" }, { "docid": "daca0be5b78e04839659ea42c6d0f363", "score": "0.6140654", "text": "function render(searchResults, searchTerm) {\n let resultsItem;\n let bookData = searchResults.items;\n\n // TODO display results\n let resultsList = document.getElementById('results');\n\n ///// Turn the book data into cards\n for (let i = 0; i < bookData.length; i++) {\n if (document.getElementById(bookData[i].id)) {\n document.getElementById(bookData[i].id).outerHTML = \"\";\n } \n\n \n ////// Create a new card and info overlay\n resultsItem = document.createElement('li');\n resultsCard = document.createElement('section');\n resultsCard.classList.add('book');\n resultsCard.id = bookData[i].id;\n cardInfo = document.createElement('div');\n cardInfo.classList.add('info');\n resultsCard.appendChild(cardInfo);\n \n //// Create all sub elements for card\n cardImage = document.createElement('img');\n if (bookData[i].volumeInfo.imageLinks) {\n cardImage.src = bookData[i].volumeInfo.imageLinks.thumbnail;\n cardImage.style.backgroundImage = `url(${bookData[i].volumeInfo.imageLinks.thumbnail})`;\n resultsCard.style.height = bookData[i].volumeInfo.imageLinks.thumbnail.height;\n } else {\n cardImage = document.createElement('div');\n cardImage.classList.add('blank');\n }\n cardInfoTitle = document.createElement('h2');\n cardInfoTitle.innerText = bookData[i].volumeInfo.title;\n\n cardTitle = document.createElement('h2');\n cardTitle.innerText = bookData[i].volumeInfo.title.toUpperCase();\n\n cardInfoSubtitle = document.createElement('h3');\n if (bookData[i].volumeInfo.subtitle === undefined) {\n cardInfoSubtitle.innerText = \"\";\n } else {\n cardInfoSubtitle.innerText = bookData[i].volumeInfo.subtitle;\n }\n cardInfoAuthors = document.createElement('p');\n if (bookData[i].volumeInfo.authors === undefined) {\n cardInfoAuthors.innerText = \"Author information not available\";\n } else {\n cardInfoAuthors.innerText = bookData[i].volumeInfo.authors;\n }\n cardLink = document.createElement('a');\n cardLink.href = bookData[i].volumeInfo.infoLink;\n\n //// Add all sub elements to card\n cardLink.appendChild(resultsCard);\n resultsCard.appendChild(cardTitle);\n resultsCard.appendChild(cardImage);\n cardInfo.appendChild(cardInfoTitle);\n cardInfo.appendChild(cardInfoSubtitle);\n cardInfo.appendChild(cardInfoAuthors);\n resultsItem.appendChild(cardLink);\n resultsList.prepend(resultsItem);\n }\n if (document.getElementById(`top-results-${searchTerm}`)) {\n document.getElementById(`top-results-${searchTerm}`).outerHTML = \"\";\n } \n topResults = document.createElement('p');\n topResults.id = `top-results-${searchTerm}`;\n topResults.classList.add('top-results');\n resultsList.prepend(topResults);\n}", "title": "" }, { "docid": "e1be5583ceec44b4f27a630f81e9a891", "score": "0.6125674", "text": "function renderCards(filteredUser) {\n const {\n name,\n username,\n jobTitle,\n company,\n email,\n languages,\n skills,\n _id,\n address,\n experience,\n profilePicture,\n } = filteredUser;\n var template_cards = (\n '<div class=\"card shadow m-3 p-4\" style=\"width: 90%; height: auto;\">' +\n '<img class=\"card-img-top m-auto\" src=\"' + profilePicture + '\" alt=\"' + name + ' Profile picture\" style=\"height:150px; width:150px; border-radius:50%;\">' +\n '<div class=\"card-body p-0 mt-2\">' +\n '<h2 class=\"card-title text-center mb-2\"><span>' + name + '</span></h2>' +\n '<h6 class=\"card-title text-center text-muted mb-4\"><span>' + jobTitle + '</span></h6>' +\n '<p class=\"card-text d-flex align-items-center\"><i class=\"material-icons mr-3\">person</i> <span>' + username + '</span></p>' +\n '<p class=\"card-text d-flex align-items-center\"><i class=\"material-icons mr-3\">email</i> <span>' + email + '</span></p>' +\n '<p class=\"card-text d-flex align-items-center\"><i class=\"material-icons mr-3\">work</i> <span>' + company + '</span></p>' +\n '<p class=\"card-text d-flex align-items-center\"><i class=\"material-icons mr-3\">public</i> <span>' + address.city + ', ' + address.country + '</span></p>' +\n '<a href=\"./html/profile.html?id=' + _id + '\" class=\"btn btn-primary mt-3\">View Profile</a>' +\n '</div>' +\n '</div>'\n // '<p class=\"card-text d-flex align-items-center\"><i class=\"material-icons mr-3\">today</i> <span' + (highlight.includes('experience') ? ' class=\"bg-warning\"' : '') + '>' + experience + '</span></p>' +\n // '<p class=\"card-text d-flex align-items-center\"><i class=\"material-icons mr-3\">translate</i> <span' + (highlight.includes('languages') ? ' class=\"bg-warning\"' : '') + '>' + languages.join(', ') + '</span></p>' +\n // '<div class=\"container-fluid p-0 mt-4 d-flex flex-wrap\">' + createBadges(skills) + '</div>' +\n );\n\n return template_cards;\n}", "title": "" }, { "docid": "ca66248c0c483060720ca93ba24f97ec", "score": "0.6115941", "text": "function renderMovieList(data){\nlet rawHTML = ''\ndata.forEach(item => {\n rawHTML +=`\n<div class=\"col-3\">\n <div class=\"mb-2\">\n <div class=\"card\">\n <img\n src=${Poster_URL + item.image}\n class=\"card-img-top\" alt=\"Movie Poster\" />\n <div class=\"card-body\">\n <h5 class=\"card-title\">${item.title}</h5>\n </div>\n <div class=\"card-footer\">\n <button class=\"btn btn-primary btn-show-movie\" data-target=\"#movie-modal\" data-toggle=\"modal\"\n data-id=${item.id}>More</button>\n <button class=\"btn btn-info btn-del-favorite\" data-id=${item.id}> X </button>\n </div>\n </div>\n </div>\n</div>\n`\n})\ndataPanel.innerHTML = rawHTML\n}", "title": "" }, { "docid": "82ad627eeec5216ce96715363d6092ce", "score": "0.6109817", "text": "render() {\n\n // adding cards component to document\n const cardsWrapper = Utils.createElement({\n name: 'div',\n id: 'cards-wrapper',\n className: 'cards-wrapper'\n });\n this.rootElem.appendChild(cardsWrapper);\n \n // adding action component to document\n const actionWrapper = Utils.createElement({\n name: 'div',\n id: 'action-wrapper',\n className: 'action-wrapper'\n });\n this.rootElem.appendChild(actionWrapper);\n\n // rendering cards\n const cards = new Cards(CARDS_DATA);\n cards.setParentElement(cardsWrapper);\n cards.render();\n \n // rendering button actions\n const actions = new Actions();\n actions.setParentElement(actionWrapper);\n actions.render();\n\n }", "title": "" }, { "docid": "1746bc6a97e62c8d4a483edcf5289d02", "score": "0.6109236", "text": "renderItems() {\n return this.props.data.map( (item, i) =>\n <div key={i} id={item.id}>\n <span className=\"ui-icon ui-icon-arrowthick-2-n-s\"></span>\n { item.title }\n </div>\n );\n }", "title": "" }, { "docid": "194a8fbead1ea60f659f1704d75c322e", "score": "0.6097395", "text": "function createRecipeCards(data) {\n const factory = new Factory();\n\n data.forEach((recipe) => {\n let recipeCard = factory.createRecipeCard(recipe).create();\n recipeContainer.appendChild(recipeCard);\n });\n}", "title": "" }, { "docid": "d8a202e41d2be9b6e43a82bead99bfac", "score": "0.60937476", "text": "renderCards() {\n\n // Destructure the information into props\n const {\n address,\n balance,\n managerAddress,\n minimumAmount,\n requestsCount,\n votersCount\n } = this.props;\n\n // Create an array of objects with the info needed\n const items = [\n {\n header: this.props.address,\n meta: \"Project's Address\",\n description: \"This project's full address. Be sure you're connected to the right project\",\n // Add the style property for custom styles\n style: { overflowWrap: \"break-word\" }\n },\n {\n header: managerAddress,\n meta: \"Manager Address\",\n description: \"This is the address of the project manager. They can create governance requests to be voted by the users.\",\n // Add the style property for custom styles\n style: { overflowWrap: \"break-word\" }\n },\n {\n header: minimumAmount,\n meta: \"Minium Amount\",\n description: \"Minimum amount one need to contribute in order to participate in the governance decisions\"\n },\n {\n header: requestsCount,\n meta: \"Number of Requests\",\n description: \"Number of governance decisions in this project\"\n },\n {\n header: votersCount,\n meta: \"Number of Voters\",\n description: \"Amount of voters currently related to this project\"\n },\n {\n // Convert the balance to ETH\n header: web3.utils.fromWei(balance, \"ether\"),\n meta: \"Project Balance in ETH\",\n description: \"How much ETH is currently related to this project\"\n }\n ]\n\n return <Card.Group itemsPerRow={1} centered={true} items={items} />\n\n }", "title": "" }, { "docid": "85bf263a05c88b42b4a0fff25e25e933", "score": "0.60935456", "text": "function displayData(data) {\n dataResults = data.results;\n \n //this for loop inserts each employee card to the DOM\n //=======================================\n\n for (let i = 0; i < data.results.length; i++) {\n console.log(data.results[i]);\n //inserts cards\n gallery.insertAdjacentHTML('beforeend', \n `\n <div class=\"card\" id=\"${i}\">\n <div class=\"card-img-container\">\n <img class=\"card-img\" src=\"${data.results[i].picture.large}\" alt=\"profile picture\">\n </div>\n <div class=\"card-info-container\">\n <h3 id=\"name\" class=\"card-name cap\">${data.results[i].name.first} ${data.results[i].name.last}</h3>\n <p class=\"card-text\">${data.results[i].email}</p>\n <p class=\"card-text cap\">${data.results[i].location.city}, ${data.results[i].location.state}</p>\n </div>\n </div>\n `)}\n //End of for loop\n //================\n}", "title": "" }, { "docid": "982573d99929006170f20800cff7f921", "score": "0.60812145", "text": "function render(productData) {\n const productsWrapperDiv = document.createElement(\"div\");\n productsWrapperDiv.classList.add(\"products-wrapper\");\n root.appendChild(productsWrapperDiv);\n const ul = document.createElement(\"ul\");\n productsWrapperDiv.appendChild(ul);\n for (let i = 0; i < productData.length; i++) {\n const productCard = generateProductCard(productData[i]);\n ul.appendChild(productCard);\n }\n productsWrapperDiv.appendChild(loadMoreButton);\n root.appendChild(total);\n}", "title": "" }, { "docid": "54bf9fafad1d9a79538569386c589cbd", "score": "0.60743594", "text": "function generateCards(data) {\n data.map(employee => {\n const html = `\n <div class=\"card\">\n <div class=\"card-img-container\">\n <img class=\"card-img\" src=\"${employee.picture.large}\" alt=\"${employee.name.first}\\'s profile pic\">\n </div>\n <div class=\"card-info-container\">\n <h3 id=\"name\" class=\"card-name cap\">${employee.name.first} ${employee.name.last}</h3>\n <p class=\"card-text\">${employee.email}</p>\n <p class=\"card-text cap\">${employee.location.city}, ${employee.location.state}</p>\n </div>\n </div>\n </div>\n `;\n galleryDiv.insertAdjacentHTML('beforeEnd', html); \n });\n return galleryDiv.children\n}", "title": "" }, { "docid": "a18a649647b132fd2d061e0f237bda50", "score": "0.6067757", "text": "function render(data) {\n var $template = _.template($('#testTemp').html());\n var $wrapper = $('#testimonialsAjax');\n var $objects = data.testimonials;\n var $fragment = $(document.createDocumentFragment());\n\n $objects.forEach(function(element) {\n $fragment.append($template({\n id: element.id,\n content: element.quote,\n author: element.author,\n imgSrc: element.imgSrc\n }));\n });\n\n $wrapper.append($fragment);\n }", "title": "" }, { "docid": "8e9786d5f7cde3eec14baf0d3779504b", "score": "0.606103", "text": "function makeCard(cardData){\n for(var i = 0 ; i<cardData.length ; i++ ){\n \n // cardcollection 에 카드 추가\n var card = $(\"<section/>\").addClass(\"card\").attr(\"id\",\"id_\"+cardData[i].id);\n \n var card_user_profile = $(\"<div/>\").addClass(\"card_user_profile\").append(`<img src=\"${cardData[i].profile_image_url}\">`); \n var card_user_name = $(\"<div/>\").addClass(\"card_user_name\").append(`<p>${cardData[i].nickname}</p>`);\n var card_photo = $(\"<div/>\").addClass(\"card_photo\").append(`<img src=\"${cardData[i].image_url}\">`); \n\n card.append(card_user_profile).append(card_user_name).append(\"<div class='clearbox'></div>\").append(card_photo);\n\n set_card_btnScrap(card);\n\n $('.collection_card').append(card);\n }\n}", "title": "" }, { "docid": "a4592d78afd475b668f2322749cbb704", "score": "0.60428065", "text": "function cardDisplay() {\n\n\t\t// commute array holding an object for each commute time frame(daily, weekly, monthly, yearly)\n\t\tlet commute = [{\t\n\t\t\ttimeFrame: 'Daily', \n\t\t\tcommuteTime: `Time: ${dailyCommuteTime}`, \n\t\t\tcommuteDistance: `Distance: ${dailyDistance} miles`, \n\t\t\tcost: `Cost: $${computeCost(dailyDistance, mpgAverage)}`\n\t\t}, {\n\t\t\ttimeFrame: 'Weekly',\n\t\t\tcommuteTime: `Time: ${weeklyCommuteTime}`,\n\t\t\tcommuteDistance: `Distance: ${weeklyDistance} miles`,\n\t\t\tcost: `Cost: $${computeCost(weeklyDistance, mpgAverage)}`\n\t\t}, {\n\t\t\ttimeFrame: 'Monthly',\n\t\t\tcommuteTime: `Time: ${monthlyCommuteTime}`,\n\t\t\tcommuteDistance: `Distance: ${monthlyDistance} miles`,\n\t\t\tcost: `Cost: $${computeCost(monthlyDistance, mpgAverage)}`\n\t\t}, {\n\t\t\ttimeFrame: 'Yearly',\n\t\t\tcommuteTime: `Time: ${yearlyCommuteTime}`,\n\t\t\tcommuteDistance: `Distance: ${yearlyDistance} miles`,\n\t\t\tcost: `Cost: $${computeCost(yearlyDistance, mpgAverage)}`\n\t\t}];\n\n\t\tfor (let i = 0; i < commute.length; i++) {\n\t\t\tlet commuteObj = commute[i];\n\t\t\tlet cardDiv = $('<div class=\"card hoverable center-align col s3\">');\n\t\t\tcardDiv.attr('id', `cardNum-${i+1}`);\n\t\t\tlet commuteDiv = $('<div class=\"card-content\">');\n\t\t\tcommuteDiv.append(`<p>${commuteObj.timeFrame}`);\n\n\n\t\t\tlet infoDiv = $('<div class=\"commuteInfo\">');\n\t\t\tinfoDiv.attr('id', `cardInfo-${i+1}`);\n\t\t\tinfoDiv.append(`<p>${commuteObj.commuteTime}`);\n\t\t\tinfoDiv.append(`<p>${commuteObj.commuteDistance}`);\n\t\t\tinfoDiv.append(`<p>${commuteObj.cost}`);\n\n\t\n\t\t\t// Append commuteDiv onto 'cardDiv'\n\t\t\tcardDiv.append(commuteDiv);\n\t\t\t// Append infoDiv onto 'cardDiv'\n\t\t\tcardDiv.append(infoDiv);\n\n\t\t\t// ...then append 'cardDiv' onto div with id of 'results'\n\t\t\t$('#results').append(cardDiv);\n\t\t};\n\t}", "title": "" }, { "docid": "30cdbfc2928751d87140bc93aeec6e07", "score": "0.6042713", "text": "function cardList() {\n return `\n ${state.data.map((song) => `${Card(song, cardCSS)}`).join('')}\n `\n }", "title": "" }, { "docid": "68ca7533eaa9f275d304defa148ab208", "score": "0.60420305", "text": "render() {\n return(\n <Card dataArray={this.props.dataSource}\n renderRow=\n { (item) => this.renderCardRow(item) }\n />\n )\n }", "title": "" }, { "docid": "7fc6aa2f729afa5f729009d800219d23", "score": "0.60415024", "text": "function renderUserList(data) {\n let rawHTML = \"\";\n data.forEach((item) => {\n rawHTML += `\n <div class=\"col-6 col-sm-3 col-md-2 pr-3 pl-0\">\n <div class=\"mb-3\">\n <div class=\"card\">\n <img\n src=\"${item.avatar}\"\n class=\"card-img-top btn-show-user\" data-toggle=\"modal\" data-target=\"#user-modal\" data-id=\"${item.id}\" alt=\"User Avatar\"/>\n <div class=\"card-footer d-flex justify-content-between px-1\">\n <div class=\"user-name\">\n <h5 class=\"card-title mb-0 ml-1\">${item.name}</h5>\n <p class=\"card-surname ml-1\"><em>${item.surname}</em></p> \n </div>\n <div class=\"btn-add-favorite mr-2 align-self-end pb-2\" data-id=\"${item.id}\"> \n <i class=\"far fa-star btn-add-favorite\" data-id=\"${item.id}\"></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n `;\n });\n dataPanel.innerHTML = rawHTML;\n}", "title": "" }, { "docid": "d34b8b2d4e62647ad3977bdeedeba2ab", "score": "0.6040081", "text": "function render(data){\n\tconsole.log(data);\n\t// console.log(data.data[1].images.original.url);\n\t// for (var i = 0; i < data.data.length; i++){\n\t\t// labelSpan.innerText = data.data[1].images.original.url;\n\t//}\n\n\t// nameSpan.innerText = data.Markets[0].Name;\n\t// priceSpan.innerText = data.Markets[0].Price_usd;\n\t// volumeSpan.innerText = data.Markets[0].Volume_24h;\n}", "title": "" }, { "docid": "d45afc2edb7a9c51f343863f05a308d8", "score": "0.6035439", "text": "function renderData(filteredData) {\n filteredData.forEach(item => {\n renderDataItems(item)\n })\n}", "title": "" }, { "docid": "80263f46abcfe5bc81ccbb17bab83773", "score": "0.60334957", "text": "function renderCollections(data) {\n var template = $(\"#template_collectionIcon\").html();\n var box = $(\"#collectionList\");\n box.html(\"\");\n for (i in data) { //foreach collection, create its avatar and append it to the box of collection avatars\n box.append(\n template\n .replace(/{id}/g, data[i].id)\n //.replace(/{icon}/g, data[i].avatarURL )\n .replace(/{title}/g, data[i].title)\n );\n box.find(\"a[data-collectionID=\" + data[i].id + \"] .iconImg\").attr(\"src\", data[i].avatarURL);\n }\n}", "title": "" }, { "docid": "d7350d2ca61224c80149472eb3f5d484", "score": "0.6017225", "text": "renderItems() {\n // Looking for data\n if (this.state.data.length === 0) return <p>No items!</p>\n\n return this.state.data.map(item => <Item item={item} />);\n }", "title": "" }, { "docid": "91115cb3cbcdab699278e5a3be782f83", "score": "0.5988575", "text": "function renderPropiedades(data){\n let items = [];\n let listaItems = $('.lista');\n\n if(data && data.items){ // si los datos no vienen correctamente\n items = data.items;\n }\n\n listaItems.empty(); // limpia los elementos\n\n items.forEach( o => { // colocamos los elementos obtenidos en el servidor\n listaItems.append(`\n <div class=\"card horizontal\">\n <div class=\"card-image\">\n <img src=\"img/home.jpg\">\n </div>\n <div class=\"card-stacked\">\n <div class=\"card-content\">\n <div>\n <b>Direccion: </b>${o.Direccion}<p></p>\n </div>\n <div>\n <b>Ciudad: </b>${o.Ciudad}<p></p>\n </div>\n <div>\n <b>Telefono: </b>${o.Telefono}<p></p>\n </div>\n <div>\n <b>Código postal: </b>${o.Codigo_Postal}<p></p>\n </div>\n <div>\n <b>Precio: </b>${o.Tipo}<p></p>\n </div>\n <div>\n <b>Tipo: </b>${o.Precio}<p></p>\n </div>\n </div>\n <div class=\"card-action right-align\">\n <a href=\"#\">Ver más</a>\n </div>\n </div>\n </div>\n `);\n })\n}", "title": "" }, { "docid": "566da75df483fccdf959eb7e61a169e2", "score": "0.59853524", "text": "render() {\n return (\n <div class=\"container\">\n {this.props.rockets.map(rocket => (\n <div className=\"cards\" key={rocket.id}>\n <Card>\n <CardBody>\n <CardTitle>{rocket.name}</CardTitle>\n <CardSubtitle>\n {rocket.rocket.agencies[0].abbrev}, ({\n rocket.rocket.agencies[0].name\n })\n </CardSubtitle>\n </CardBody>\n <img\n className=\"rocketImg\"\n width=\"100%\"\n src={rocket.rocket.imageURL}\n alt=\"NoImageDisplayed\"\n />\n <CardBody>\n <CardText>\n <li>Takeoff: {rocket.net}</li>\n <li>Location: {rocket.location.name}</li>\n </CardText>\n <CardLink href={rocket.rocket.agencies[0].wikiURL}>\n Agency Wiki\n </CardLink>\n <CardLink href={rocket.rocket.wikiURL}>\n Launch/Rocket Wiki\n </CardLink>\n </CardBody>\n </Card>\n </div>\n ))}\n </div>\n );\n }", "title": "" }, { "docid": "24205cefca48b76c97030ae96e7be082", "score": "0.59802026", "text": "function renderHtml(data) {\n var userName = data.name.first + \" \" +data.name.last;\n $('.card-title').html(userName.toUpperCase());\n var userPic = data.picture.medium;\n $('.card-image').attr(\"src\",userPic);\n}", "title": "" }, { "docid": "256cfe55bac8c5a26f0ad631f91695f6", "score": "0.59801155", "text": "showMatchedCompanies(data) {\n\n if (data) {\n\n console.log(\"search results are\" + data);\n var allCards = [];\n //Lets loop all the objects in array to display list of results...\n for (var i = 0; i < data.length; i++) {\n //take each object\n var item = data[i];\n\n allCards.push(//Now lets push all the cards and actions to the material card...\n // this is required to get styles applied in materialui\n <MuiThemeProvider>\n <MaterialCard>\n <CardHeader\n title={utils.toTitleCase(item.primary_name)}\n style={this.materialCardstyle} titleStyle={this.materialCardstyle.title}\n subtitleStyle={this.materialCardstyle.subtitle}\n subtitle={utils.toTitleCase(item.country)}\n actAsExpander={false}\n showExpandableButton={false}\n avatar={'src/assets/countries/' + item['country_code'] + '.png'}\n />\n\n <CardActions>\n <Popover content={this.getAboutDetails(item)} title=\"ABOUT\">\n {/* <img src={about} /> */}\n <FlatButton label=\"ABOUT\" labelStyle={{ fontSize: '10px' }} primary={true} />\n </Popover>\n\n {/* Form here perspective links will construct.. */}\n {this.preparePerspectivePopOvers(item)}\n </CardActions>\n </MaterialCard>\n </MuiThemeProvider>\n )\n }\n\n\n // Here we are using Carousel component to display search result items,once user clicks on right or left arrows\n // remaning items will be shown..Below component supports multile items visibility at given point of time aswell\n return (\n <div style={{ padding: '10px' }}>\n <Slider {...this.carouselSettings}>\n {allCards}\n </Slider>\n </div>)\n }\n }", "title": "" }, { "docid": "44a82a32e8dea4b0d251b9248660e93d", "score": "0.5975356", "text": "function getData(data) {\n let renderHTML = ''\n\n data.restaurants.forEach((data, i) => {\n renderHTML += `\n <article tabindex=\"0\" class=\"card\">\n <img tabindex=\"0\" class=\"card-image\" src=\"${data.pictureId}\" alt=\"${data.alt}\" height=\"250\">\n <span tabindex=\"-1\" class=\"card-rating\">\n <i title=\"icon rating\" class=\"fa fa-star\"></i>\n <span>${data.rating}</span>\n </span>\n <div class=\"card-text-section\">\n <a href=\"${data.website}\">\n <h2 tabindex=\"0\" class=\"card-title\">${data.name}</h2>\n </a>\n <p tabindex=\"0\" class=\"card-city\">${data.city}</p>\n <p tabindex=\"0\" class=\"card-description truncate\">${data.description}</p>\n </div>\n </article>\n `\n })\n\n // Append to DOM\n document.getElementById('restaurant-list').innerHTML = renderHTML\n}", "title": "" }, { "docid": "adaf78c406b0f60b25997e37adf48bca", "score": "0.596091", "text": "function renderDealer() {\n document.querySelector('.dealerCards').innerHTML = '';\n dealerHand.forEach(function (card) {\n var cardDiv = document.createElement('div');\n cardDiv.className = 'card '+card.img;\n document.querySelector('.dealerCards').append(cardDiv);\n });\n }", "title": "" }, { "docid": "5434c35e206f38bb0ef9f5c0ef78c6d0", "score": "0.5955926", "text": "function renderCards(cardItem) {\n return new Card(\n cardItem,\n () => {\n imageOverviewPopup.open(cardItem.name, cardItem.link)\n },\n (cardID, cardElement) => {\n deleteFormPopup.open(cardID, cardElement);\n },\n (cardElement, cardID) => {\n if (cardElement.isLiked()) {\n api.removeLike(cardID)\n .then(element => {\n cardElement.updateLikes(element.likes)\n })\n .catch(err => console.log(err))\n } else {\n api.addLike(cardID)\n .then(element => {\n cardElement.updateLikes(element.likes);\n cardElement.showLikes();\n })\n .catch((err) => {\n console.log(err);\n })\n }\n }, userID).getCard()\n }", "title": "" }, { "docid": "4e221fafa9799ce5082bb1f33aec7961", "score": "0.5953939", "text": "function MovieCard({data}){\n return(\n <div className=\"card\">\n <img src={data.Poster}/>\n <h3>{data.Title}</h3>\n </div>\n )\n}", "title": "" }, { "docid": "65ca92035c8826623478668af8ce1116", "score": "0.59351504", "text": "function render(i){\n document.querySelector('.item-render-image').src = items[i].src;\n document.querySelector('.item-render-name').innerHTML = items[i].name;\n}", "title": "" }, { "docid": "ad92c283905ced2f3bd21d8d43ec5148", "score": "0.5927968", "text": "function renderData(productsArray) {\n let productItem = \"\";\n if (productsArray.length == 0) {\n document.querySelector(\"#fromData\").innerHTML = \"No Match Found\";\n } else {\n productsArray.forEach((product) => {\n if (product.productMedia[0] && product.productMedia[0].url) {\n let imgUrl =\n \"https://storage.googleapis.com/luxe_media/wwwroot/\" +\n product.productMedia[0].url;\n let urlParams = \"./details.html?prodId=\" + product.prodId;\n\n productItem += `\n <div class=\"display-item\" >\n <a href=\"${urlParams}\">\n <img\n src=\"${imgUrl}\"\n alt=\"image\"\n />\n <div class=\"item-description\">\n <h6>${product.title}</h6>\n <p>$ ${product.price}</p>\n </div>\n </a>\n </div>`;\n }\n document.querySelector(\"#fromData\").innerHTML = productItem;\n });\n }\n}", "title": "" }, { "docid": "19a9132af6de814b5f3735bca85c32e0", "score": "0.59276336", "text": "function renderCards() { if (dealerHand.length == 2 && playerDone == false) {\n document.querySelector('.dealerCards').innerHTML = '';\n dealerHand.forEach(function (card, i) {\n var cardDiv = document.createElement('div');\n if (i == 0) {\n cardDiv.className = 'card '+card.img;\n } else {\n cardDiv.className = 'card back-blue';\n }\n document.querySelector('.dealerCards').append(cardDiv);\n })\n } else {\n renderDealer();\n }\n}", "title": "" }, { "docid": "102bcb86b5a4bd9bea266aba30eda310", "score": "0.59273654", "text": "function renderCard() {\n window.question.style.display = \"block\";\n window.cardTitle.style.display = \"none\";\n window.answer.style.display = \"none\";\n\n const card = window.cardList[window.currentPage];\n console.log(card);\n window.language.innerText = card.language;\n window.cardTitle.innerText = card.title;\n window.answer.innerText = card.answer;\n window.question.innerText = card.question;\n\n // creating deleteButton that appears on each card\n let cardItem = document.getElementById(\"card-item\");\n}", "title": "" }, { "docid": "610db8db98e05dd075ae70a6566c0204", "score": "0.59097475", "text": "render() {\n const { cards, init } = this.state;\n console.log(this.state.data);\n return (\n <React.Fragment >\n <PrimarySearchAppBar getData={this.getData} />\n <br />\n\n <Container>\n <h6>Top Results</h6>\n <p>The latest hits, updated all the time</p>\n </Container>\n\n <div id=\"cardContainer\">\n\n {cards ? cards.map(card => {\n\n return (\n <RecipeReviewCard\n ids={card.id}\n artistImage={card.artist.picture_small}\n artistName={card.artist.name}\n songTitle={card.title}\n albumCover={card.album.cover_xl}\n songPreview={card.preview}\n />\n );\n\n }) : init.map(card => {\n\n return (\n <RecipeReviewCard\n ids={card.id}\n artistImage={card.artist.picture_small}\n artistName={card.artist.name}\n songTitle={card.title}\n albumCover={card.album.cover_xl}\n songPreview={card.preview}\n />\n );\n })}\n </div>\n </React.Fragment>\n );\n }", "title": "" }, { "docid": "0fa1e89d5f2a52f7a4864d0c49c64a7d", "score": "0.5908355", "text": "function createCard(data) {\n const li = document.createElement(\"li\");\n li.classList.add(\"weather__city\");\n const icon = `https://openweathermap.org/img/wn/${data.weather[0][\"icon\"]}@2x.png`;\n const markup = `<h2 class =\"weather__heading\" data-name=\"${data.name},${data.sys.country}\">\n <span>${data.name}</span>\n <sup>${data.sys.country}</sup>\n </h2>\n <div class=\"weather__temp\">${Math.round(data.main.temp)}<sup>°C</sup>\n </div>\n <figure>\n <img class=\"weather__icon\" src=${icon} alt=\"${data.weather[0][\"main\"]}\">\n <figcaption>${data.weather[0][\"description\"]} </figcaption>\n </figure>`;\n flickrValue = data.name;\n li.innerHTML = markup;\n cityList.appendChild(li);\n}", "title": "" }, { "docid": "20b60c75433a75188683140a02b4382e", "score": "0.59006596", "text": "displayCards(){\n\t\tvar cardDisplayed = 'none';\n\t\t//get the user id\n\t\tconst user_id = parseInt(localStorage.getItem('user'));\n\t\t//get all the cards\n\t\tvar cardsTab = getTabByUserId(user_id, 'card');\n\t\t//sort the array by id to always display in the same order values\n\t\t\tif(cardsTab !== null)\n\t\t\t{\n\t\t\t\tcardsTab.sort(function(a, b){return parseInt(a.id) - parseInt(b.id)});\n\t\t\t\tcardDisplayed = cardsTab.map( card =>\n\t\t\t\t\t{\n\t\t\t\t\t\treturn <HomeCard \n\t\t\t\t\t\tkey = {card.id} \n\t\t\t\t\t\tcard_id = {card.id}\n\t\t\t\t\t\ttype = {card.brand}\n\t\t\t\t\t\tnumber = {card.last_4}\n\t\t\t\t\t\texp_date = {card.expired_at}\n\t\t\t\t\t\tonButtonClick = {this.props.onButtonClick}\n\t\t\t\t\t\treRender = {this.reRenderer} />\n\t\t\t\t\t});\n\t\t\t}\n\t\t\t\t\n\t\t\tcardDisplayed = <div className = \"cards\"> \n\t\t\t\t\t\t\t\t{cardDisplayed} \n\t\t\t\t\t\t\t\t<Row className=\"pt-3 pl-3\">\n\t\t\t\t\t\t\t\t\t<Button onClick = {this.addSwitch} className=\"home-btn mb-3 ml-4\"> \n\t\t\t\t\t\t\t\t\t\t{this.state.button}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t</div>\n\t\t\treturn cardDisplayed ;\n\t\t\n\t}", "title": "" }, { "docid": "c398208d2e0034dc7cfc1c75279635e8", "score": "0.5897587", "text": "render(data) {\n // temporary solution -> if data is not array put it inside the array!\n // if (data === undefined) {\n // this._clear();\n // return;\n // }\n\n this._data = Array.isArray(data) ? data : [data];\n\n // rendering the episodes on the main page\n\n const markup = this._generateMarkup().join(\"\");\n\n this._clear();\n this._parentElement.insertAdjacentHTML(\"afterbegin\", markup);\n }", "title": "" }, { "docid": "1f5d7cbc39336eb02dc493df4643e9cf", "score": "0.5894702", "text": "function generateEmployee(data) {\n\t\t\tlet employeeCards = \"\"\n\t\t\tdata.forEach((item, index) => {\n\t\t\t\temployeeCards += ` <div class=\"card\" id =\"${index}\">\n <div class=\"card-img-container\">\n <img class=\"card-img\" src=\"${item.picture.thumbnail}\"alt=\"profile picture\">\n </div>\n <div class=\"card-info-container\">\n <h3 id=\"name\" class=\"card-name cap\">\n ${item.name.first} ${item.name.last}</h3>\n <p class=\"card-text\">${item.email}</p>\n <p class=\"card-text cap\"> ${item.location.city} </p>\n \n \n \n </div>\n </div>`\n\t\t\t\tgallery.innerHTML = employeeCards;\n\t\t\t})\n\t\t}", "title": "" }, { "docid": "1738ee6cbe17cf67ccc3408de1a03cdd", "score": "0.58920866", "text": "render() {\n return (\n <div className=\"cards-list\">\n { /* render list header */ }\n { /* render cards */ }\n { /* render list footer */ }\n { /* render card editor */ }\n </div>\n );\n }", "title": "" }, { "docid": "b9730c4ff3b67b1dceece2782f282869", "score": "0.58900625", "text": "function render(data) {\n var $template = _.template($('#skillsTemp').html());\n var $webdev = $('#webdev');\n var $design = $('#design');\n var $objects = Array.prototype.slice.call(data.skills);\n var $fragmentWebdev = $(document.createDocumentFragment());\n var $fragmentDesign = $(document.createDocumentFragment());\n\n // console.log($objects);\n $objects.forEach(function(element) {\n\n if (element.category == 'webdev') {\n\n $fragmentWebdev.append($template({\n id: element.id,\n name: element.name,\n cat: element.category,\n level: element.level,\n imgSrc: element.imgSrc\n }));\n\n } else if (element.category == 'design') {\n\n $fragmentDesign.append($template({\n id: element.id,\n name: element.name,\n cat: element.category,\n level: element.level,\n imgSrc: element.imgSrc\n }));\n\n } else {\n\n console.log('sad element without a category screaaaams to You! @_@!!');\n\n }\n });\n\n $webdev.append($fragmentWebdev);\n $design.append($fragmentDesign);\n $skills = $('.el');\n }", "title": "" }, { "docid": "90a855e51319998941ae2ab468cec00b", "score": "0.58858424", "text": "render() {\n return (\n <div className=\"ui link cards\">\n {/* <button onClick={this.onBtnClick}>Load Data</button> */}\n {this.props.cars.map((c, i) => <CarItem key={i} {...c} />)}\n </div>);\n }", "title": "" }, { "docid": "7f490eaa256f532cef701ddcfc4521d2", "score": "0.58854896", "text": "function renderCard(item) {\n return (\n <div className=\"col-md-4\">\n <div className=\"card mb-4 shadow-sm\">\n <div className=\"card-img-top px-4 py-5 bg-secondary text-center\">\n <div className=\"text-light my-5\">Thumbnail</div>\n </div>\n <div className=\"card-body\">\n <p className=\"card-text\">{item.description}</p>\n <div className=\"d-flex justify-content-between align-items-center\">\n <Link type=\"button\" className=\"btn btn-sm btn-outline-dark\">\n View\n </Link>\n <a href={item.library_url} className=\"link-dark\">\n {item.library_name}\n </a>\n </div>\n </div>\n </div>\n </div>\n );\n }", "title": "" }, { "docid": "135141a86dfbab3fca280c35a28da39e", "score": "0.58760357", "text": "function displayOverviewBeer(data) {\n displayAllBeers.innerHTML = `\n ${Object.keys(data).map(key => (\n `<div id=\"cards\" class=\"card d-inline-flex\" style=\"width: 18rem;\">\n <h5 class=\"card-title\">${data[key].id}</h5>\n <img class=\"beerImage card-img-top\" src=\"${data[key].image_url}\" alt=\"\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${data[key].name}</h5>\n <p class=\"card-text\">${data[key].tagline}</p>\n <a class=\"btn btn-primary\" data-toggle=\"collapse\" href=\"#${data[key].name}\" role=\"button\" aria-expanded=\"false\" aria-controls=\"collapseExample\">More info</a>\n <div class=\"collapse mt-2\" id=\"${data[key].name}\">\n <div class=\"card card-body\">\n <ul>\n <li>alcohol level: ${data[key].abv}%</li>\n <li>tip from the brewer: ${data[key].brewers_tips}</li>\n <li>description: ${data[key].description}</li>\n <li>PH-level: ${data[key].ph}</li>\n <li>contributed by: ${data[key].contributed_by}</li>\n <li class=\"ingredient\">malt: ${data[key].ingredients.malt[0].name} </li>\n <li>hops: ${data[key].ingredients.hops[0].name} </li>\n <li>yeast: ${data[key].ingredients.yeast} </li>\n </ul>\n </div>\n </div>\n </div>\n </div>`\n )).join(' ')}\n `;\n}", "title": "" }, { "docid": "042d96450cf0b2132272adab01a646c1", "score": "0.5855217", "text": "render () {\n\n // Get filter values\n const filters = this.getFilters();\n\n // Set caption\n this.setCaption(filters);\n\n // Clear accordion\n this.accordion.innerHTML = '';\n\n // Filter items based on the current filters\n this.items.filter(item => (\n (!filters.region || item.region === filters.region) &&\n (!filters.type || item.type === filters.type) &&\n (!filters.status || item.status === filters.status)\n )).\n\n // Populate accordion\n forEach(item => {\n const element = document.createElement('fedex-accordion-item');\n element.innerHTML = `\n <span slot=\"title\">A/B Case ${item.id}</span>\n <fedex-ab-info slot=\"body\"></fedex-ab-info>\n `;\n element.querySelector('fedex-ab-info').item = item;\n this.accordion.appendChild(element);\n });\n }", "title": "" }, { "docid": "34507dce25a01debaacd3445db2876ea", "score": "0.58524215", "text": "renderProjectCards(data){\n let cards = this.state.cards\n return cards.map( (card) => <ProjectCard project={card} changeViewPageState={this.props.changeViewPageState} /> )\n }", "title": "" }, { "docid": "a847afcb2dae0d1b74e80a6c68273cbc", "score": "0.5850242", "text": "function gameCards(data) {\n for(var i = 0; i < data.results.length; i++) {\n // create game cards using for loop and passing through data into html elements to appended them to the page.\n var htmltag = `\n <div class=\"uk-card uk-card-default game-card\">\n <div class=\"uk-card-media-top\">\n <img src='${data.results[i].background_image}' alt = '${data.results[i].name}'></img>\n </div>\n <div class=\"uk-card-body\">\n <button class=\"add-favorite\" data-attrId=\"${data.results[i].id}\">+</button>\n <h4 class=\"card-title\">${data.results[i].name}</h4>\n <div class=\"hidden\">\n <p class=\"card-item\">Rating: ${data.results[i].rating}</p>\n <p class=\"card-item\">Released: ${data.results[i].released}</p>\n <button class=\"reddit-button\">Reddit [coming soon]</button>\n <button class=\"ytube-button\" data-slug=\"${data.results[i].slug}\">YouTube </button>\n </div>\n </div>\n </div>`\n // append card elelemts to the page\n var cardEl = document.createElement('div');\n cardEl.classList.add('grid');\n cardEl.innerHTML = htmltag;\n gameSection.appendChild(cardEl);\n\n }\n}", "title": "" }, { "docid": "e8319bc95452388f505887e82ca289d4", "score": "0.5849806", "text": "function buidSongHtml(data) {\n var html = \"\";\n for (var i in data) {\n row = data[i];\n html += \"<div class='col s6'>\";\n html += \"<div class='card-panel pointer'>\";\n html += \"<span>\";\n html += \"<input type='hidden' name='song_id' value='\" + row.song_id + \"'>\";\n html += \"Title: \" + row.title + \" <br/>\";\n html += \"Artist: \" + row.artist + \" <br/>\";\n html += \"Difficulty: \" + row.difficulty + \" <br/>\";\n html += \"Level: \" + row.level + \" <br/>\";\n html += \"Released: \" + row.released;\n html += \"</span>\";\n html += \"</div>\";\n html += \"</div>\";\n }\n\n return html;\n }", "title": "" }, { "docid": "5e84b074fb779d80e92c996350d6477f", "score": "0.584822", "text": "function ProductCards(props) {\n const {proddata}=props\n return (\n <div className=\"row\">\n {proddata.map(product => {\n return (\n \n <div className=\" col-md-3 col-sm-6 under10\" key={product.Product_id}>\n <div className=\"card\">\n <div className=\"work-img\">\n <a href=\"/products\"><img src={product.img_url} className=\"card-img-top img-fluid\" alt=\"Pen1\"/></a>\n <div className=\"img-overlay\"></div>\n </div>\n <div className=\"card-body\">\n <h5 className=\"card-title\">{product.product_title}</h5>\n <p className=\"card-text\">{product.product_description}</p>\n <p className=\"card-text\">{product.price_values } </p>\n </div>\n </div>\n </div>\n )})}\n </div> \n )\n}", "title": "" }, { "docid": "765c7e4f85cdcd42db541952bb07381f", "score": "0.5847493", "text": "function showStandings(data) {\n let content = \"\";\n let renderTarget = Content;\n\n data.standings[0].table.forEach(function(standing) {\n content +=\n `<tr>\n <td><img src=\"${standing.team.crestUrl.replace(\n /^http:\\/\\//i,\n \"https://\"\n )}\" width=\"30px\" alt=\"badge\"/></td>\n <td>${standing.team.name}</td>\n <td>${standing.won}</td>\n <td>${standing.draw}</td>\n <td>${standing.lost}</td>\n <td>${standing.points}</td>\n <td>${standing.goalsFor}</td>\n <td>${standing.goalsAgainst}</td>\n <td>${standing.goalDifference}</td>\n </tr>`;\n });\n\n renderTarget.innerHTML =\n `<div class=\"card\" style=\"padding-left: 24px; padding-right: 24px; margin-top: 30px;\">\n <table class=\"striped responsive-table\">\n <thead>\n <tr>\n <th></th>\n <th>Team Name</th>\n <th>W</th>\n <th>D</th>\n <th>L</th>\n <th>P</th>\n <th>GF</th>\n <th>GA</th>\n <th>GD</th>\n </tr>\n </thead>\n <tbody id=\"standings\">\n ${content}\n </tbody>\n </table>\n </div>`;\n title.innerHTML = \"Seri A Italy Standings\";\n hideLoader();\n }", "title": "" }, { "docid": "498eedc0b18954540580025249bdb801", "score": "0.5844814", "text": "function renderMenu(data) {\n console.log('Hi From Rendermenu', data);\n var menuElement = document.querySelector('body > header ul');\n\n Object.keys(data).forEach((key) => {\n var liElement = document.createElement('li');\n menuElement.appendChild(liElement);\n var aElement = document.createElement('a');\n\n aElement.addEventListener('click', () => {\n //if (!renderers[key]) return renderUnimplemented();\n loadData(data[key], renderCards)\n });\n\n liElement.appendChild(aElement);\n aElement.textContent = key;\n })\n}", "title": "" }, { "docid": "78bee1a53537ae7ef9bfb4e600aeace0", "score": "0.58414865", "text": "function renderArticle(data, id) {\n const html = `<div class=\"card-panel recipe white row\" data-id=\"${id}\">\n <img src=\"/img/giglio-logo.png\" alt=\"giglio logo\" />\n <div class=\"recipe-details\">\n <div class=\"recipe-title\">${data.title} </div>\n <div class=\"recipe-ingredients\">${data.description}</div>\n <div class=\"recipe-delete\">\n <i class=\"material-icons\" data-id=\"${id}\">delete_outline </i>\n </div>\n </div>\n </div>`;\n\n articles.innerHTML += html;\n}", "title": "" }, { "docid": "a3c8ef089db0a36170646756c45db893", "score": "0.58259946", "text": "render() {\n var html = \"<div class='card-body'>\";\n var temp = html;\n temp += \"<h2 class = 'card-title'>\" + this.props.data.name + \"</h2><p class='card-text'>\";\n let intro = \"\";\n if (this.props.data.description === \"\") {\n intro += \"( No Description )\";\n } else {\n intro += this.props.data.description.substring(0,100);\n }\n if (this.props.data.description.length > 100) {\n temp += intro + \"...\";\n } else if (intro !== \"\") {\n temp += intro;\n }\n temp += \"</p><div class='d-flex justify-content-between'><span class='type-span'>\";\n let tag = this.props.data.tags;\n let tagArr = tag.split(\",\");\n let tagNum = tagArr.length;\n this.props.data.numTags = tagNum;\n if(tagArr.length > 3) {\n for (let k = 3; k < tagArr.length; k+= 3) {\n temp += \"<mark>\" + tagArr[k] + \"</mark> \";\n }\n } else {\n for (let k = 0; k < tagArr.length; k+= 3) {\n temp += \"<mark>\" + tagArr[k] + \"</mark> \";\n }\n }\n let ingre = this.props.data.ingredients;\n let ingreArr = ingre.split(\",\")\n let ingreNum = ingreArr.length;\n this.props.data.numIngredients = ingreNum;\n if (parseInt(this.props.data.minutes) > 999) {\n this.props.data.minutes = 999;\n }\n temp += \"</span></div></div><div class='card-footer text-left text-muted'><p><small>\" + ingreArr.length +\n \" ingredients</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small>\"\n + this.props.data.minutes + \" minutes</small></p>\";\n temp = parse(temp);\n return(\n <div className='col-sm-12 col-md-6 col-lg-4'><div className='card mb-4 box-shadow'>{temp}{UserRecipespop(this.props.data, this.props.currKey, this.props.allData)}</div></div>\n )\n }", "title": "" }, { "docid": "0934b45c60802768f2ea4e3eb2b261dc", "score": "0.5819201", "text": "function loadParkingCards(data) {\n\tconst parkingCardContainer = document.querySelector(\n\t\t\"#parkingsFetched .row\"\n\t);\n\n\tif (data.length < 1) {\n\t\tparkingCardContainer.innerHTML = `\n <div class=\"alert alert-danger mx-auto w-50\" role=\"alert\">\n No Parking found...!\n </div>\n `;\n\t\treturn;\n\t}\n\n\tparkingCardContainer.innerHTML = null;\n\n\tdata.forEach((each_parking_data) => {\n\t\tconst element = document.createElement(\"div\");\n\t\telement.className = \"col-sm-6 col-lg-3\";\n\n\t\t// Parking Card\n\t\telement.innerHTML = ` \n <i class=\"fas fa-circle-notch fa-pulse\"></i> \n ${createParkingCard(each_parking_data)} \n `;\n\n\t\tparkingCardContainer.appendChild(element);\n\t});\n}", "title": "" }, { "docid": "ec4497072c67d7900e7ef4a43f5486d0", "score": "0.5818428", "text": "function buildCards(data) {\n var cardHolder = document.getElementById('cardHolder');\n cardHolder.innerHTML=\"\";\n for (let i = 0 ; i < data.length ; i++){\n\n var divCard = document.createElement(\"div\");\n divCard.classList.add(\"card\",\"m-4\");\n divCard.style.width=\"18rem\";\n\n var imgCard = document.createElement(\"img\");\n imgCard.src= data[i].image_url;\n imgCard.classList.add(\"card-img-top\", \"bottleImage\");\n divCard.appendChild(imgCard);\n\n var divCardBody = document.createElement(\"div\");\n divCardBody.classList.add(\"card-body\");\n\n var h5CardTitle = document.createElement(\"h5\");\n h5CardTitle.classList.add(\"card-title\");\n h5CardTitle.innerHTML=data[i].name;\n divCardBody.appendChild(h5CardTitle);\n\n var pCardText = document.createElement(\"p\");\n pCardText.classList.add(\"card-text\");\n pCardText.innerHTML = data[i].tagline;\n divCardBody.appendChild(pCardText);\n\n var buttonCard = document.createElement('button');\n buttonCard.type=\"button\";\n buttonCard.id=data[i].id;\n buttonCard.classList.add(\"btn\", \"btn-primary\");\n buttonCard.innerHTML=\"Details\";\n divCardBody.appendChild(buttonCard);\n\n var pCardTextId = document.createElement(\"p\");\n pCardTextId.classList.add(\"card-text\");\n pCardTextId.innerHTML = data[i].id;\n divCardBody.appendChild(pCardTextId);\n\n divCard.appendChild(divCardBody);\n cardHolder.appendChild(divCard);\n\n /*\n cardHolder.innerHTML += `\n <div class=\"card m-4\" style=\"width: 18rem;\">\n <img src=\"${data[i].image_url}\" class=\"card-img-top bottleImage\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${data[i].name}</h5>\n <p class=\"card-text\">${data[i].tagline}</p>\n <button type=\"button\" id=\"${data[i].id}\" class=\"btn btn-primary\">Details</button>\n <p class=\"card-text\">id: ${data[i].id}</p>\n </div>\n </div>\n */\n\n let idNumber= data[i].id;\n document.getElementById(idNumber).addEventListener(\"click\", function(){\n detailedCard(data,i);\n // console.log(\"test extended card\");\n\n\n });\n }\n}", "title": "" }, { "docid": "efa84b0217d288e2df1a363e35bcfb30", "score": "0.58145195", "text": "render() {\n return(\n <View>\n {this.renderCards()}\n </View>\n );\n }", "title": "" }, { "docid": "06d826b531ffab3e535d9fc6e40b1b43", "score": "0.5814194", "text": "function Cards() {\n return (\n <div className='cards'>\n <h1>Story of Akash and Rini</h1>\n <div className='cards_container'>\n <div className='cards_wrapper'>\n <ul className='cards_items'>\n <CardItem \n src='/images/img-1.jpg'\n text=\"Beginning of the beautiful journey\"\n label='first'\n path='/story'\n />\n <CardItem \n src='images/img-2.jpg'\n text=\"Beginning of the beautiful journey\"\n label='second'\n path='/story'\n />\n </ul>\n <ul className='cards_items'>\n <CardItem \n src='images/img-3.jpg'\n text=\"Beginning of the beautiful journey\"\n label='third'\n path='/story'\n />\n <CardItem \n src='images/img-4.jpg'\n text=\"Beginning of the beautiful journey\"\n label='fourth'\n path='/story'\n />\n <CardItem \n src='images/img-5.jpg'\n text=\"Beginning of the beautiful journey\"\n label='fifth'\n path='/story'\n />\n </ul>\n </div>\n </div>\n </div>\n )\n}", "title": "" }, { "docid": "4c4418965006f2cb02fd9c5d56400cce", "score": "0.58107126", "text": "render() {\n //rendering recipes\n const recipeHtmlList = [];\n // const primaryTabsList = [];\n for (let i = 0; i < this.recipes.length; i++) {\n const renderCard = this.recipes[i];\n\n const recipeHtml = createRecipeHtml(\n renderCard.id,\n renderCard.name,\n renderCard.category,\n renderCard.time,\n renderCard.ingredients,\n renderCard.instructions,\n renderCard.image\n );\n recipeHtmlList.unshift(recipeHtml);\n }\n\n const recipeHtml = recipeHtmlList.join(\"\\n\");\n const recipeList = document.querySelector(\"#recipe-container\");\n recipeList.innerHTML = recipeHtml;\n }", "title": "" }, { "docid": "e362501c2b4e46fc3fad187bd0eb36d1", "score": "0.58094144", "text": "function renderData( numberList ) {\n let HTML = '';\n \n if ( !Array.isArray(numberList) ) {\n return console.error('Error');\n }\n if ( numberList.length === 0 ) {\n return console.error(tuscia);\n }\n\n for ( let i=0; i<numberList.length; i++ ) {\n const item = numberList[i];\n\n HTML += `<div class=\"achievements col-md-4 col-lg-4 col-sm-12\">\n <i class=\"fa fa-${item.icon}\"></i>\n <div class=\"number\"\n data-number_from=\"0\"\n data-number_to=\"${item.number}\"\n data-time=\"3000\">${item.number}</div>\n <span>+</span>\n <h4 class=\"title\">${item.title}</h4>\n </div>`;\n \n }\n\n return document.querySelector('#data').innerHTML = HTML;\n}", "title": "" }, { "docid": "bfee09159da754d03022d87ad1b549fd", "score": "0.5808844", "text": "function getListOfDink(data, i) {\n let image = data.drinks[i].strDrinkThumb;\n let name = data.drinks[i].strDrink;\n let glass = data.drinks[i].strGlass;\n let instructions = data.drinks[i].strInstructions;\n card.innerHTML += `\n <div class=\"col-sm\">\n <div class=\"card mt-4 card-custom\" style=\"width: 18rem\">\n <img class=\"card-img-top\" src=\"${image}\" alt=\"Card image cap\" />\n <div class=\"card-body\">\n <h5 class=\"card-title\" >${name}</h5>\n <p class=\"card-text\">\n ${glass}\n </p>\n </div>\n <p class=\"text-custom\">\n <span> Instuction:</span>\n </br>\n ${instructions}\n </p>\n </div>\n `;\n}", "title": "" } ]
1ec11d57a0cb76665ac02886b8edc845
Al arrastrar y soltar notificamos al servidor su nueva posicion
[ { "docid": "ff36d43735f2ba9d1b88663ad915a730", "score": "0.0", "text": "function iconEndDrag(item, handle){\r\n\tEffect.Shake(item);\r\n\tposition = $(item).cumulativeOffset();\r\n\t\r\n\t//var icon = getIconHandle(handle)\r\n\tvar params = {\"type\":\"data\",\"class\":\"System\",\"do\":\"iconUpdate\",'icon_id':handle,'asynchronous':true,'_itop':position[1],'_ileft':position[0] };\r\n\tDobleOSAPI.executeApplication(params);\r\n}", "title": "" } ]
[ { "docid": "108be9dea7b4902bcdcdccea90aa1441", "score": "0.7001095", "text": "function iniciar() {\n function arrancaServidor(requiere, respuesta) {\n console.log(\"Alguien de ha conectado al servidor\");\n respuesta.writeHead(200, { \"Content-TYpe\": \"text/html\" });\n respuesta.write(\"<h1>El servidor funciona correctamente</h1>\");\n respuesta.end();\n\n }\n /**La creacion del servidor tambien desde estar dentro de la funcion */\n servidor.createServer(arrancaServidor).listen(8080);\n}", "title": "" }, { "docid": "80b7aa9173828e96a2fe9b49f2a2c208", "score": "0.69931895", "text": "function arrancaServidor(requiere, respuesta) {\n console.log(\"Alguien se ah conectado\");\n respuesta.writeHead(200,{\"Content-Type\":\"text/html\"}); // le digo que le enviare informacion de tipo html al servidor\n respuesta.write(\"<h1>El servidor funciona correctamente en el puerto 8888</h1>\");\n respuesta.end();\n}", "title": "" }, { "docid": "0b7e78ae4ca5240f27592d7ca3ce350b", "score": "0.6774816", "text": "function arrancaServidor (requiere,respuesta){\r\n\r\nrespuesta.writeHead('200',{'Content-Type':'text/html'}); // enviar una head al navegador web\r\n\t\t\t\t\t\t\t // 200 codigo de todo correcto 404 no encontrada\t\r\n\t\t\t\t\t\t\t \t// todo lo que va dentro de llaves es un objeto\r\n\t\t\t\t\t\t\t \t// te voy a enviar una pagina escrita en html... no una imagen o otra cosa\r\n\r\nrespuesta.write(\"<h1> el servidor functiona correctamente </h1>\");\r\nrespuesta.end();\r\n\r\n}", "title": "" }, { "docid": "00248b55942f085d3d12c1ac6ea14d69", "score": "0.66925925", "text": "function arrancaServidor(requiere, respuesta){\n\t\tvar ruta = url.parse(requiere.url).pathname; //capturar aquello que ponga en la url e introducirlo en una variable 'ruta'\n\n\t\tconsole.log(\"Hola consola, alguien se ha conectado\"); // cada vez que alguien se conecte al servidor web se verá este mensaje en la consola\n\t\t//ese mensaje aparecerá 2 veces en la consola, porque el navegador suele enviar 2 peticiones, una para el favicon y otra para la página web en sí.\n\n\t\tenrutar(ruta, manejador);\t//le paso a la funcion el path de la url donde estoy parado\n\n\t\trespuesta.writeHead(200, {\"Content-Type\":\"text/html\"});\n\t\trespuesta.write(\"<h1>El servidor funciona correctamente</h1>\"); // Se verá en el navegador\n\t\trespuesta.end();\n\t}", "title": "" }, { "docid": "0d7e90f7dfb503f760cf6f13961ed5d9", "score": "0.6152258", "text": "verificarConexion() {\n if (espinoClients.length != 0) {\n espinoClients.forEach((host) => {\n ping.sys.probe(host, (isAlive) => {\n if (!isAlive) { //Si algun cliente espino esta desconectado, se manda notificacion\n var i;\n for (i = 0; i < hostAvisados.length; i++) {\n if (hostAvisados[i] === host) {\n return;\n }\n }\n alert = 'host ' + host + ' no esta conectado';\n console.log(alert);\n serverClient.publish('web/messages', alert);\n serverClient.publish('bot/messages', alert);\n email.sendMail(alert);\n hostAvisados.push(host);\n } else {\n var i;\n for (i = 0; i < hostAvisados.length; i++) {\n if (hostAvisados[i] === host) {\n hostAvisados[i] = '';\n }\n }\n }\n });\n });\n }\n }", "title": "" }, { "docid": "fa2e7eb5c0e2f43e2eb6572dc055a794", "score": "0.6069153", "text": "async prepareServer() {\n this.options.server && (this.server = await this.addService('server', new this.ServerTransport(this.options.server))); \n }", "title": "" }, { "docid": "be1f1088283c53c5f1948abb5be816e9", "score": "0.5862758", "text": "function getTurnServer(){\n persiapanKelas();\n // let xhr = new XMLHttpRequest();\n // xhr.onreadystatechange = function ($evt) {\n // if (xhr.readyState == 4 && xhr.status == 200) {\n // let res = JSON.parse(xhr.responseText);\n // console.log(\"response: \", res);\n // console.log(res.v.iceServers);\n // connection.iceServers.push(res.v.iceServers);\n // persiapanKelas();\n // }\n // }\n // //Akun fakhri\n // xhr.open(\"PUT\", \"https://global.xirsys.net/_turn/MyFirstApp\", true);\n // xhr.setRequestHeader(\"Authorization\", \"Basic \" + btoa(\"fakhri:ed659d2e-814c-11e9-99a5-0242ac110007\"));\n // xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n // xhr.send(JSON.stringify({ \"format\": \"urls\" }));\n // Akun polban\n // xhr.open(\"PUT\", \"https://global.xirsys.net/_turn/MyFirstApp\", true);\n // xhr.setRequestHeader(\"Authorization\", \"Basic \" + btoa(\"nelf:45312bb2-a07a-11e9-a802-0242ac110007\"));\n // xhr.setRequestHeader(\"Content-Type\": \"application/json\");\n // xhr.send(JSON.stringify({ \"format\": \"urls\" }));\n}", "title": "" }, { "docid": "cc64dcfc056b553271b61528b2a96423", "score": "0.5838791", "text": "function createServer(){\r\n //creer la structure des npc coté server et envoies les donnés aux client\r\n for(var k in client){\r\n if(client[k].role == 'BDE'){\r\n film += 3;\r\n killers ++;\r\n }\r\n }\r\n for(var k in client){\r\n if(client[k].role == 'Journalist'){\r\n //creer la structure d'un viseur server et envoie les donnés aux client\r\n ViseurArray[client[k].pseudo] = new ViseurServer(client[k].pseudo, 100);\r\n io.sockets.emit('createViseur', {\r\n pseudo : ViseurArray[client[k].pseudo].pseudo,\r\n radius : ViseurArray[client[k].pseudo].radius\r\n });\r\n }\r\n }\r\n\r\n for(var k in client){\r\n if(client[k].role == 'BDE'){\r\n //creer la structure d'un npc pour les BDEs coté server et envoie les donnés aux client\r\n BDEArray[client[k].pseudo] = new NPCserver(client[k].pseudo);\r\n io.sockets.emit('createBDE', {\r\n x : BDEArray[client[k].pseudo].x,\r\n y : BDEArray[client[k].pseudo].y,\r\n skin : BDEArray[client[k].pseudo].skin,\r\n pseudo : BDEArray[client[k].pseudo].id\r\n });\r\n }\r\n }\r\n\r\n\r\n for(var i = 0; i < data.nb_npc; i++){\r\n NpcArrayServer.push(new NPCserver(i));\r\n io.sockets.emit('createNPC', {\r\n x : NpcArrayServer[i].x,\r\n y : NpcArrayServer[i].y,\r\n skin : NpcArrayServer[i].skin\r\n });\r\n }\r\n io.sockets.emit('GlobalData', {\r\n nb_npc : data.nb_npc,\r\n killers : killers,\r\n film : film,\r\n });\r\n io.sockets.emit('ActionViseur');\r\n console.log('________________________________Start update____________________________________');\r\n var compteur = 4;\r\n pre_start = setInterval(function(){\r\n io.sockets.emit('start', compteur);\r\n compteur --;\r\n }, 1000);\r\n setTimeout(startupdate, 6000);\r\n }", "title": "" }, { "docid": "bdaeb11d93ce3db480d85fe4a5b1b466", "score": "0.58384794", "text": "function probando(req, res) {\n res.status(200).send({ message: 'Probando desde del controladaor Message.' });\n}", "title": "" }, { "docid": "ea085b928cd6b125931a785077577029", "score": "0.5791409", "text": "verificarEstado() {\n espinoClients.forEach((host) => {\n ping.sys.probe(host, (isAlive) => {\n msg = isAlive ? 'host ' + host + ' esta conectado' : 'host ' + host + ' no esta conectado';\n console.log(msg);\n serverClient.publish('web/messages', msg);\n serverClient.publish('bot/messages', msg);\n serverClient.publish('Espino/' + host, 'C1');\n });\n });\n }", "title": "" }, { "docid": "324626c391093a87954ff04c2758a397", "score": "0.5745121", "text": "function server_or_connect_error()\n{\n// FIXME: We could display something on screen at this point to let the user know we had a problem completing a reload\n reload_later(reload_interval)\n}", "title": "" }, { "docid": "35ba8173e9070f6f3ea31eeced3dc763", "score": "0.5739266", "text": "function serverhundeler (req, res,next) {\n console.log('serverHandler');\n ip\n .create(req.body)\n .then((ip) => {\n console.log('this is newserver ip',ip);\n \n \n res.json('true'); \n })\n .catch((err) => next(err));\n}", "title": "" }, { "docid": "0336e3f41c4c6a90bd2b53d71ef25311", "score": "0.57107824", "text": "function notify()\n{\n //var host = server.address().address;\n //var port = server.address().port;\n console.log(\"Listening on port 3000\");\n}", "title": "" }, { "docid": "2968da2dc5b6a6932e8f14d615c78882", "score": "0.5697652", "text": "servePing() {\n if (this.uibRouter === undefined) throw new Error('this.uibRouter is undefined')\n\n this.uibRouter.get('/ping', (req, res) => {\n res.status(204).end()\n })\n this.routers.user.push( { name: 'Ping', path: `${this.uib.httpRoot}/uibuilder/ping`, desc: 'Ping/keep-alive endpoint, returns 201', type: 'Endpoint' } )\n }", "title": "" }, { "docid": "c1bca9dbaeef1e156a8c7529267cb246", "score": "0.5637099", "text": "function ServidorNET(){\n var server = net.createServer(function (socket) { \t\n \tsocket.name = socket.remoteAddress + \":\" + socket.remotePort; // Identifica al cliente\n \tserverDB.clients.push(socket);// Añade el cliente al array de clientes del objeto serverDB\n \t\n \t//Muestra la ip:puerto de todos los sockets en el array de clientes del objeto serverDB\n \t\n\n LoginMessage(socket);\n \n ConnectedClients(socket);\n\n\t console.log('\\n______________________________\\n Received command#> ');\n \tsocket.write('\\n__________NETZULO.com__________\\n Send command$> ');\n \t// socket.pipe(socket);\n\n \t/**Eventos internos del servidor*******************************************/\n \tsocket.on('data', function (data) {\n\t Broadcast(socket.name + \"> \" + data, socket);\n\n \tsocket.write('Send command#> ');\n \t});\n \t/*FUNCTIONs internas del servidor******************************************/\n \t// Envia mensajes a todos los clientes\n \tfunction Broadcast(message, sender) {\n\t serverDB.clients.forEach(function (client) {\n \tif (client === sender) return; // evita que el mensaje sea recibido por el cliente que lo envio\n \tclient.write(message); // escribe el mensaje enviado en el cliente\n \t});\n \t// Log it to the server output too\n \tprocess.stdout.write(message); // escribe el message recibido en la consola del servidor\n \t}\n });\n server.listen(netConfig.port, netConfig.host);\n \n /*\n * Escribe un mensaje de bienvenida en la consola del servidor y en la consola remota\n */\n function LoginMessage(socket) {\n var strConsole = [\n '-------------------------------------------------------------------',\n '----- Manager Connections -----------------------------------------',\n '-------------------------------------------------------------------',\n '---------------------- Ready to Chat! -----------------------------',\n '-------------------------------------------------------------------'\n ];\n console.log(strConsole.join('\\n'));\n socket.write(strConsole.join('\\n'));\n }\n\n function ConnectedClients(socket) { \n for (client in serverDB.clients) {\n console.log(\"Conectado desde: \"+socket.name + \"\\n\");\n }\n }\n}", "title": "" }, { "docid": "3db56cd5afb39d339573452ef1512767", "score": "0.5631926", "text": "function escreveConteudo(){}", "title": "" }, { "docid": "6a663660306198f52bd744bb4f03c730", "score": "0.562244", "text": "function responderSolicitudASolicitante(req,res){\n let id_solicitante = req.params.id;\n let solicitud= buscarSolicitud(id_solicitante); //verificamos si la aceptaron\n if(solicitudes[solicitud].estatus=='aceptada' && solicitudes[solicitud].operador != ''){\n console.log(`PRUEBA: si la aceptaron`);\n let id_operador=solicitudes[solicitud].operador;\n let lat = solicitudes[solicitud].latOperador;\n let lng = solicitudes[solicitud].lngOperador;\n let id_servicio = solicitudes[solicitud].id_servicio;\n let data = {};\n \n let sql = `Select * FROM usuarios WHERE id_usuario = ${ id_operador }`; \n consultaBd.consultaBd(sql,(result)=>{\n if(result){\n console.log(`PRUEBA: si la aceptaron 2`);\n data.nombreOperador = result[0].nombre + \" \" + result[0].ap + \" \" + result[0].am ;\n data.telefonoOperador = result[0].telefono;\n \n }\n })\n sql = `SELECT * FROM servicio WHERE id_servicio = ${id_servicio}`;\n consultaBd.consultaBd(sql,(result)=>{\n if(result){\n console.log(`PRUEBA: si la aceptaron 3`);\n data.servicio=result[0].descripcion;\n data.costoMax = result[0].costo_max;\n data.costoMin= result[0].costo_min;\n data.lat = lat;\n data.lng = lng;\n res.status(200).send({message:[{'flag':'true','cuerpo':[data]}]});\n }\n }) \n \n }else if(solicitudes[solicitud].estatus=='pendiente'){\n buscarOperadorPorFiltros(solicitudes[solicitud].id_solicitante); //si aun no la aceptan se busca al operador de nuevo\n res.status(200).send({message:[{'flag':'false','cuerpo':[{'nombre':'estatus pendiente'}]}]});\n //console.log(solicitudes[solicitud]);\n }else if(solicitudes[solicitud].estatus=='enEspera'){\n res.status(200).send({message:[{'flag':'false','cuerpo':[{'nombre':'Esperando respuesta de operador'}]}]});\n }else{\n res.status(200).send({message:[{'flag':'false','cuerpo':[{'nombre':'buscando operador'}]}]});\n }\n}", "title": "" }, { "docid": "5b51c9304c241c2d4a84c9ed4454cb01", "score": "0.5617618", "text": "function proccedtoCreateServer()\n{\n var erroredLines=[1,2,3];\n var resultJSONarray = [];\napp.get('/', (req,res) => {\nres.send('Good evening, Mr.Hunt \\n You have to deal with '+erroredLines.length+'errors Should you choose to accept it?');\n});\n\napp.get('/json',(req,res) => {\n console.log(__dirname);\n res.send(resultJSONarray);\n});\n\napp.get('/html',(req,res) => {\n console.log(__dirname);\n res.sendFile(__dirname+'/index.html');\n});\n\n(async () => {\navailablePort = await getPort({port:[8000,8080,8888,9090]});\nconsole.log(chalk.blue('The available port is',availablePort));\nstartListening();\n}) ();\n\nstartListening = function(){\n //spinner.stop(true);\napp.listen(availablePort, ()=>console.log(chalk.green('Server succesfully listening on the port :',availablePort)));\n\n//opn('http://localhost:'+availablePort);\n};\n}", "title": "" }, { "docid": "501bb4a7d7f54fa0ed30959568641b3a", "score": "0.5588703", "text": "function gestionServer()\n{\n\tlet myClient = MyClient.getInstance()\n\tmyClient.onReady().then(async() =>\n\t{\n\t\tclient = myClient.client\n\t\tloggedAccount = client.user\n\t\tobjActualServer = new actualServer()\n\t\tchooseServer()\n\n\t})\n}", "title": "" }, { "docid": "63e2d5559b08561ecf14314dfce47105", "score": "0.5581396", "text": "function rappelPing(host,session,n,tab)\n{\nif(!(verifierIp(host))){console.log(\"erreur\");return;}\nif(n==0)\n{\n//------------------------------------------->constatation err er\n\nif(tab.length!=50){\n//console.log(\"erreur,hote:\"+host+\" longueur du tableau:\"+tab.length);\n//console.log(tab);\ninterroger(host);\n}\n\n\n//----------------------------condition d'arret->transmission dans la db\nconsole.log(\"host:\"+host);\nvar chiffres=statistique(tab);\nconsole.log(chiffres);\n\nHost.find({ip:host}).exec(function(err,found){\n_.each(found,function(h){\nh.last_check=new Date();\nh.moyenne=chiffres.moyenne;\nh.statu=(chiffres.perte>45)?\"down\":\"up\";\nh.perte_paquet=chiffres.perte;\nh.min=chiffres.min;\nh.max=chiffres.max;\nh.save(function(err,s){\nHost.publishUpdate(s.id,s);\n});\n});\n\nLog_ping.create({ip:host,moyenne:chiffres.moyenne,\nperte_paquet:chiffres.perte,\nmin:chiffres.min,\nmax:chiffres.max\n}).exec(function(){\n});\n\n\n});\n\n//-------------−>reinitialisation des valeurs\n\ntab=[];\n//ev.emit(\"vita\",host);\n}\nelse\n{\n///------------------iteration de la boucle\n\n//------------------>si host---->regexp diso retour\n\nif(verifierIp(host) && session)\nsession.pingHost(host,function(error,target,sent,rcvd){\nvar reprise=false;\n\nif(error){\n//console.log(error.toString()+\"pour hote:\"+target);\n//console.log(target);\nif(error.toString()==\"Error: Socket closed\")reprise=true;\n}\n\nvar r=(error instanceof ping.RequestTimedOutError)?false:true;\ntab.push({\ntemps:(!r)?0:(rcvd-sent),\nreached:r\n});\n\n//console.log((rcvd-sent)+\" reach \"+r);\nif(reprise){\nif(verifierIp(target))\ninterroger(target);\nconsole.log(\"reprise pour:\"+target);\n}\nelse\nrappelPing(host,session,n-1,tab);\n\n});\n\n\n}\n\n}", "title": "" }, { "docid": "ef570b0a9b3aa725d57e9a8bc01b74b1", "score": "0.5578733", "text": "function traercolonia(req, res){\n\tCONN('colonia').select().then(colonia =>{\n\t\tif (!colonia){\n\t\t\tres.status(500).send({ resp: 'error', error: `${error}` });\n\t\t}else{\n\t\t\tres.status(200).send({ resp: 'consulta exitosa de colonia', colonia:colonia});\n\t\t}\n\n\t})\n}", "title": "" }, { "docid": "07ed1230c654e69fb634d1bced3ee485", "score": "0.557832", "text": "function nlobjServerResponse() {\n}", "title": "" }, { "docid": "78736e33e0833695ae2981c3d69704b5", "score": "0.5567778", "text": "Listen() {\n this.server.listen(this.port, () => {\n console.log(` ---> Servidor corriendo en ${Constants_1.HOST}${this.port}`);\n });\n }", "title": "" }, { "docid": "708ac508e985b0a3cf40cbea6abb2da2", "score": "0.55674475", "text": "function enviarSolicitud(datos){\n socket.emit(\"nuevaSolicitud\", datos, function(data){\n if(data['estado']){\n idSolicitud = data['idSolicitud'];\n buscarFleteros();//Buscamos choferes de la bd\n }else{\n alert(\"Lo sentimos, nuestro sistema no esta disponible.\")\n } \n });\n }", "title": "" }, { "docid": "49b6513f6adfb77b9886a432dc8269e2", "score": "0.5567017", "text": "constructor() {\n super(1, 'Transporter');\n this.serverLostMessage = 'Server Connection Lost: Reconnecting...';\n this.url = false;\n this.busy = false;\n this.stop = true;\n this._serverInterruptView = false;\n this._clientEvalError = false;\n this._busyFlushTimeout = false;\n }", "title": "" }, { "docid": "3f64691f56842faefcddda090275d1e2", "score": "0.5565988", "text": "function prueba(res, req) {\n res.send(\"corriendo\");\n }", "title": "" }, { "docid": "a5f667328c8fde7f067431adc792afec", "score": "0.5543958", "text": "function updateServerStatus(status, info) {\n\n\t\tif (status) {\n\n\t\t\tdocument.querySelector('#ojd-server-status').classList.remove('ojd-status-bad');\n\t\t\tdocument.querySelector('#ojd-server-status').classList.add('ojd-status-good');\n\t\t\tdocument.querySelector('#ojd-server-status .ojd-indicator-text').innerHTML = `Server Started`;\n\n\t\t\tconst urls = [];\n\t\t\tconst ifaces = os.networkInterfaces();\n\t\t\tObject.keys(ifaces).forEach(function (ifname) {\n\t\t\t\tiface = ifaces[ifname];\n\t\t\t\tfor (const net of iface) {\n\t\t\t\t\tif (net.address !== '127.0.0.1' && net.address !== '::1') {\n\t\t\t\t\t\tif (net.family === 'IPv4') {\n\t\t\t\t\t\t\turls.push(`${net.address}:${info.port}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (urls.length === 0) {\n\t\t\t\turls.push(`127.0.0.1:${info.port}`);\n\t\t\t}\n\n\t\t\tconst elementList = document.querySelector('#ojd-server-address ul');\n\t\t\telementList.innerHTML = \"\";\n\n\t\t\tfor (const url of urls) {\n\t\t\t\tconst li = document.createElement('li');\n\t\t\t\tli.innerHTML = url;\n\t\t\t\telementList.appendChild(li);\n\t\t\t}\n\n\t\t\tdocument.querySelector('#ojd-server-address').style['display'] = 'block';\n\n\t\t} else {\n\t\t\tdocument.querySelector('#ojd-server-status').classList.remove('ojd-status-good');\n\t\t\tdocument.querySelector('.ojd-status-server').classList.add('ojd-status-bad');\n\t\t\tdocument.querySelector('#ojd-server-status .ojd-indicator-text').innerHTML = 'Server Not Started';\n\t\t}\n\t}", "title": "" }, { "docid": "ee7cf20d030f31a50920d155e0dd9b20", "score": "0.55284667", "text": "CrearServidorHttp() {\n this.server = http.createServer(this.app);\n }", "title": "" }, { "docid": "33b64c2c6b55ce1b231978e67251ecad", "score": "0.5526392", "text": "function LudoServer(ludoProject){\n this.ludoProject = ludoProject;\n}", "title": "" }, { "docid": "c3150df0c81f23f76498f3cfced47f9c", "score": "0.5522955", "text": "function serv( app, port ) {\n app.listen( port, function() {\n console.log( 'Se arranco el servidor en el puerto: '+port);\n });\n }", "title": "" }, { "docid": "c2ec7b8072ad56cc87b19511826c5125", "score": "0.55167174", "text": "listen() {\n this.server.listen( this.port, () => {\n console.log('Servidor corriendo en puerto', this.port );\n });\n }", "title": "" }, { "docid": "f028e8a8e97148ad4240fd5f2eac577e", "score": "0.5515041", "text": "function callInicioSocket() {\r\n\tconsole.log(\"Peticion Inicio # \" + MAIN_SERVER_UDP_PORT + \" # \" + APP_ID);\r\n\t\r\n\tvar ab = str2ab(INICIO + \";\" + APP_ID);\r\n\tsocketUdp.write(socks.socketId, ab, writeComplete);\r\n}", "title": "" }, { "docid": "8424ba6609741c6d5ab2b5976acb971e", "score": "0.5505127", "text": "function directorSocket()\n{\n console.log('attempting director socket');\n try {\n Directors.replaceData(noReq, '/directors/get');\n Directorhours.replaceData(noReq, '/directors/get-hours');\n } catch (e) {\n console.error(e);\n console.log('FAILED DIRECTORS CONNECTION');\n setTimeout(directorSocket, 10000);\n }\n}", "title": "" }, { "docid": "bdfee55f8843428064d12b0739909f6b", "score": "0.54910433", "text": "function onServerFailStart() {\n console.log(\"Failed to connect to the server, loading stockfish...\");\n opponentInfo = {\n name: \"Stockfish\",\n id: -1,\n picture: \"img/stockfish.png\",\n elo: \"?\",\n contextId: -1,\n }\n board = new Chess();\n initializeUI();\n updateBoardUI();\n }", "title": "" }, { "docid": "9dd167467770ef1f1d0e52b5e1206a3c", "score": "0.54861414", "text": "static set dedicatedServer(value) {}", "title": "" }, { "docid": "066c9d8d47ea50cedff3264b46976998", "score": "0.5482257", "text": "clckAceptar() {\n\n let uri = \"http://35.185.119.34:8082/totalCpu\";\n\n this.axios\n .get(uri)\n .then((response) => {\n this.insertarNuevoPunto(response.data.Porcentaje);\n\n })\n .catch((e) => {\n this.println(\"falló\");\n //this.$log.info(\"FAILURE!!\");\n });\n }", "title": "" }, { "docid": "9f2b81637ebe095b24dd471695b74df5", "score": "0.5480161", "text": "function _noconn()\n\t{\n\t\tUTILS.msgbox(\"You do not have a good enough signal to complete the request. Please try again later.\", \"No Connection\");\n\t}", "title": "" }, { "docid": "f29ed177330e473f3bf6af78ee95f251", "score": "0.547193", "text": "function displayServer(info) {\n\tvar server = addElement(document.body,\"DIV\", {className:\"server\"})\n\taddElement(server, \"IMG\", {src: info.icon, width: 96, className: \"icon\"});\n\taddElement(server, \"BR\", {});\n\taddElement(server, \"B\", {textContent: info.name, className: \"name\"});\n\n\tvar sub = addElement(server, \"DIV\", {className: \"info\"});\n\taddElement(sub, \"DIV\", {className: \"circle on\"});\n\taddElement(sub, \"TEXT\", {textContent: \" \" + info.active + \" Online\"});\n\taddElement(sub, \"DIV\", {className: \"circle\"});\n\taddElement(sub, \"DIV\", {className: \"circle off\"});\n\taddElement(sub, \"TEXT\", {textContent: \" \" + info.count + \" Members\"});\n\taddElement(sub, \"P\", {});\n\n\tvar invite = addElement(sub, \"a\", {href:\"https://discord.gg/\" + info.invite});\n\taddElement(invite, \"DIV\", {className:\"join\",textContent:\"Join\"});\n\n\tvar notes = addElement(sub, \"DIV\", {className: \"notes\"});\n\taddElement(notes, \"B\", {textContent: \"Category: \"});\n\taddElement(notes, \"TEXT\", {textContent: info.type.join(\", \")});\n\taddElement(notes, \"BR\", {});\n\tif(info.notes) {\n\t\tvar note = addElement(notes, \"B\", {\n\t\t\ttextContent: (info.warn) ? \"Warning: \":\"Notes: \"\n\t\t});\n\t\tvar text = addElement(notes, \"FONT\", {textContent: info.notes});\n\t\tif(info.warn) {\n\t\t\tnote.style.color = text.style.color = '#f44336';\n\t\t}\n\t\taddElement(notes, \"BR\", {});\n\t}\n\n\tdocument.querySelector(\"#list\").appendChild(server);\n}", "title": "" }, { "docid": "3e82b250227742125cdeff0c73df4b07", "score": "0.54717654", "text": "function configurar() {\n if (socket) {\n socket.close()\n }\n let host = document.getElementById(\"hostip\").value\n socket = new WebSocket(host)\n setupSocket(socket)\n\n}", "title": "" }, { "docid": "fd792dabb933759fb0d71db0dab22c59", "score": "0.5457443", "text": "function connexionPanierControl(){\n\tconsole.log('tata');\n\tcliendGood();\n\tmdpControl();\n\temailControl();\n}", "title": "" }, { "docid": "b4133c3934ad53f89c7a90ce67850c5d", "score": "0.5453217", "text": "function web_service(api,methode,vars,socket){\n\tvar parser =\"php \";\n\tvar args = '';\n\tif(methode == 'disconnect_unload'){\n\t\tsocket.user_session.disconnected = 1;\n\t\treturn _deconnexion(socket);\n\t}\n\tif(methode == 'afficher_map' || methode == 'teleportation_request' || methode == 'teleportation' || methode == 'tchat_message'){\n\t\targs += ' ' + socket.id;\n\t}\n\tfor (var cle in vars){\n\t\tvar arg = vars[cle];\n\t\t//Si l'argument est une chaine de caractère, on l'échape\n\t\tif(typeof arg ==='string'){\n\t\t\tif(methode ==\"tchat_message\" || methode ==\"suppr_msg\"){\n\t\t\t\targ = '\\\"'+(fixedEncodeURIComponent(arg))+'\\\"';\n\t\t\t}\n\t\t\telse{\n\t\t\t\targ = '\\\"'+arg+'\\\"';\n\t\t\t}\n\t\t}\n\t\targs+=' ' + arg;\n\t}\n\t// On joint les données de session à la requête\n\tif(methode == 'tchat_message' || methode=='authentifier' || methode =='teleportation_request' || methode =='teleportation' || methode == 'avatar_info' || methode=='move_player' || methode == 'suppr_msg' || methode == \"get_histo\" || methode == \"afficher_map\" || methode == \"enregistrer_map\"){\n\t\targs+=' \"' + encodeURIComponent(JSON.stringify(socket.user_session))+'\"';\n\t}\n\tdebug(parser+api+methode+args);\n\tif(can_i_do(socket, methode)){\n\t\trunner.exec(parser+api+methode+args,function(err, rep, stderr){\n\t\t\tif (err !=null){\n\t\t\t\tdebug ('Erreur d\\'éxecution php :'+err+\" : \"+stderr+\"\\n\"+rep);\n\t\t\t}\n\t\t\t// Si le script retourne une réponse, on l'éxecute.\n\t\t\t// Le webservie retourne du code js\n\t\t\telse {\n\t\t\t\t// Utile pour le stacktrace php\n\t\t\t\tdebug(rep);\n\t\t\t\teval(rep);\n\t\t\t}\n\t\t});\n\t}\n\telse{\n\t\tsocket.emit('alert', \"Cette action n'est pas autorisée. La Bouzopolice est en chemin !!\");\n\t}\n}", "title": "" }, { "docid": "917cdf7fb9611fb0e8bd6499b866b19a", "score": "0.54528004", "text": "function ShowModal(indice, elem, tipo, ip, latencia, descarga, tamano, estado, dns, descripcion, titulo) {\n \n var patron='\"';\n var extraer=\"localhost\";\n var contenido = \"\";\n var i=0;\n var h=1;\n var contador = 8;\n var timeDownload = timeTotalDownload(latencia, descarga);\n \n if ((tipo==null) || (tipo.length == 0) || (tipo==\"\")){\n tipo=\"NO CAPTURADO\";\n }\n if ((latencia==null) || (latencia.length == 0) || (latencia==\"\")){\n latencia=\"0\";\n }\n if ((descarga===null) || (descarga.length == 0) || (descarga==\"\")){\n descarga=\"0\";\n }\n if ((tamano==null) || (tamano.length == 0) || (tamano==\"\")){\n tamano=\"0\";\n }\n \n latencia=(latencia*1000)+' ms';\n descarga=(descarga*1000)+' ms';\n tamano=tamano+' Bytes';\n dns=dns+' ms';\n \n if ((ip==null) || (ip.length == 0) || (ip==\"\")){\n ip=\"NO CAPTURADO\";\n }\n if ((dns==null) || (dns.length == 0) || (dns==\"\")){\n dns=\"0.000 ms\";\n }\n if(elem.length>69){\n //corta la url si es muy larga\n for(var j=0; j<elem.length;j++){\n if(j===(h*70)){\n elem=elem.substring(0,j)+\"\\n\"+elem.substring(j,elem.length);\n h++;\n }\n }\n }\n //corta el nombre del modal si es muy largo\n if(titulo.length>34){\n var tituloCut=titulo.substring(0,35)+' ...';\n }\n else{\n tituloCut=titulo;\n }\n //reemplaza por enlace\n var text = elem.replace(elem,\"<a href='\"+elem+\"' target='_blank'>\"+elem+\"</a>\"); \n estado=estado+\" (\"+descripcion+\")\";\n //extraccion de ciertos patrones\n text=text.replace(patron,'');\n text=text.replace(extraer,'');\n \n var ayuda = [\n \"Url: \",\n \"Tipo: \",\n \"Ip: \",\n \"Latencia: \",\n \"Descarga: \",\n \"Tiempo total Descarga\",\n \"Tamaño: \",\n \"Estado\",\n \"Dns\" \n ];\n var datos = [ \n text,\n tipo,\n ip,\n latencia,\n descarga,\n timeDownload,\n tamano,\n estado,\n dns\n ];\n //validacion si el usuario esta utilizando IE\n if ( navigator.userAgent.indexOf(\"MSIE\")>0 ){\n for ( i=0; i<contador; i++){\n contenido = contenido + '<table class=\"definicion\" width=\"100%\" ><tr><th>' + ayuda[i] + '</th></tr><tr><td>' + datos[i] + '</td></tr></table></br>';\n }\n dojo.byId(\"usoIE\").innerHTML = contenido;\n }\n //resto de navegadores\n else{\n //recorre para guardar cada array en su fila correspondiente\n for ( i=0; i<contador; i++){\n contenido = contenido + '<tr><th>' + ayuda[i] + '</th></tr><tr><td>' + datos[i] + '</td></tr>';\n }\n dojo.byId(\"contenido2\").innerHTML = contenido;\n \n }\n \n //atributos del cuadro dojo\n dojo.attr('ModalMuestra_title',{\n innerHTML: \"Elemento \"+indice+\": \"+tituloCut,\n title: \"Elemento: \"+indice+\" \"+titulo\n });\n dojo.attr('ModalMuestra', {\n style: \"widht: 500px;height: 365px; overflow-y: hidden;overflow-x: hidden;padding:2px\"\n });\n dijit.byId(\"ModalMuestra\").show();\n}", "title": "" }, { "docid": "7e73f71c7c1bf938873b55688699be66", "score": "0.54433745", "text": "function cargarError(){\n\talert(\"Error requesting information from the server\");\n}", "title": "" }, { "docid": "7e73f71c7c1bf938873b55688699be66", "score": "0.54433745", "text": "function cargarError(){\n\talert(\"Error requesting information from the server\");\n}", "title": "" }, { "docid": "d358df4a3613987b18d5b3d2a1dc89c2", "score": "0.54425114", "text": "async function ExibeConteudo() {\r\n const response = await fetch('http://192.168.0.103/sites/apprefeicao/lista.php?tabela=conteudo_prato');\r\n const json = await response.json();\r\n\r\n setConteudo(() => json);\r\n }", "title": "" }, { "docid": "a036f29161a16a0ee275737333158017", "score": "0.5437076", "text": "function call_server() {\n if (self.vue.chosen_magic_word === null) { \n console.log(\"No Magic Word\");\n setTimeout(call_server, call_interval);\n } else {\n //removed random delay to avoid synchronizations cause fuck that. &edit&\n //var extra_delay = Math.floor(Math.random() * 1000);\n console.log(\"Yo server what's good? | call_server()\");\n $.ajax({ //server call via ajax\n dataType: 'json',\n url: server_url +'read',\n //added BRAINBLAST to key so I don't run into your games.\n data: {key: \"BRAINBLAST\"+ self.vue.chosen_magic_word},\n success: self.process_server_data,\n complete: setTimeout(call_server, call_interval) // rm extra delay\n });\n }\n }", "title": "" }, { "docid": "10fa901c61cebdc8d1cc7cf4ad276dcc", "score": "0.5433665", "text": "function openServer() {\n connect.server({\n host: cfg.server.host,\n root: cfg.server.root,\n port: cfg.server.port,\n livereload: true\n });\n }", "title": "" }, { "docid": "31ef7663ee2cfd9a6b37d53006bb95f3", "score": "0.54309386", "text": "async function coletar() {\n try {\n console.log(\"Coletando dados do irrigador\");\n\n let res = await axios.get(URL_DISPOSITIVO);\n if (!res?.data?.status)\n throw new Error(\"Erro durante a coleta dos dados do dispositivo\");\n let status = res.data.status;\n\n // Converte a ultima irrigacao para o tempo atual\n if (!status.ultimaIrrigacao) {\n status.ultimaIrrigacao = await getUltimaIrrigacao();\n } else {\n let agora = Date.now();\n status.ultimaIrrigacao = new Date(agora - status.time + status.ultimaIrrigacao);\n }\n status.time = new Date();\n console.log(`Ultima irrigacao: ${status.ultimaIrrigacao}`);\n\n // Armazena e publica os dados\n console.log(`Armazenando Status: ${JSON.stringify(status)}`);\n udb.insert(res.data);\n if (URL_PLANILHA)\n postPlanilha({ timestamp: new Date(), ...status });\n\n } catch (ex) {\n console.error(err); F\n }\n}", "title": "" }, { "docid": "2a76e095b384328b26b0a6571cf35742", "score": "0.5421144", "text": "function spostaButtonProduzione(i){\r\n \"use strict\";\r\n\tvar data = new Object();\r\n\tdata.destinationID = LOCATIONID + $(\"#dest_\"+i).find(\"option:selected\").text();\r\n\tdata.pawnID = arrCamion[i].pawnID;\r\n\tsocket.emit('moveTransportPawn', JSON.stringify(data), function(response) {\r\n\t\tvar sposta = JSON.parse(response);\r\n\t\tif(sposta.success){\r\n\t\t\tarrCamion[i].spostamenti--; //non credo vada più, ma è da vedere \r\n\t\t\t$(\"#nSpostamenti_\"+i).text(arrCamion[i].spostamenti); //aggiorna il numero degli spostamenti a video\r\n\t\t\tif(arrCamion[i].spostamenti === 0){\r\n\t\t\t\t$(\"#spostaButtonP_\"+i).prop(\"disabled\", true);\r\n\t\t\t}\r\n\t\t\tarrCamion[i].origine = sposta.newLocation;\r\n\t\t\t//parte visuale\r\n\t\t\t$(\"#orig_\"+i).text(arrCamion[i].origine);\r\n\t\t\t//chiamo l'aggiorna destinazioni\r\n\t\t\taggiornaListaDestinazioni(arrCamion, i);\r\n\t\t\tsetModalLog(sposta.logString);\r\n\t\t\tsalvaLog(sposta.logString);\r\n\t\t}else{\r\n\t\t\tsetModalLog(sposta.logString);\r\n\t\t\t//$(\"#spostaButtonP_\"+i).prop(\"disabled\", true);\r\n\t\t}\r\n\t\t\r\n\t});\r\n\r\n}", "title": "" }, { "docid": "293324aa011ab12436e4545c0ff317dc", "score": "0.54188645", "text": "serverInternalError () {\n const serverErrors = this.root.querySelector('.js-store-errors');\n serverErrors.innerHTML = 'Упс! Сервер устал, подождите и попробуйте заново!';\n }", "title": "" }, { "docid": "d7d340a9cb3d9f9135d0aad4fa5bfa2b", "score": "0.54065984", "text": "function enviarNotificacion(chofer){\n idChofer = chofer.idChofer\n socket.emit(\"enviarSolicitud\", {\"idSolicitud\": idSolicitud, \"idChofer\": idChofer, \"idUsuario\": idU, \"kms\" : kms, \"tiempo\" : tiempo, \"fotos\": arrayPhotos}, function(data){\n //Respuesta del chofer \n if(data['respuesta']){//chofer envio oferta\n $('#buscando').css('display','none');\n $('#datosSolicitud').css('display','block');\n $('#opciones').css('display','block'); //botones de opciones\n $('.progress-bar').css('width', '0%');\n $('.progress-bar').attr('aria-valuenow', 0).progressbar();\n //Usuario acepta el flete\n $('#acepto').unbind(\"click\").click(function(){\n $('#datosSolicitud').css('display','none');\n $('#opciones').css('display','none');\n $('#gracias').css('display','block');\n acepto();\n });\n \n //Busca otro chofer (mandamos solicitud al siguiente de la lista ordenada)\n $('#nuevo').unbind(\"click\").click(function(){ \n $('#opciones').css('display','none');\n $('#datosSolicitud').css('display','none');\n $('#buscando').css('display','block'); \n nuevo();\n }); \n \n //Usuario cierra la solicitud\n $('#cerrar').unbind(\"click\").click(function(){ \n $('#modalSolicitud').modal('hide'); \n cerrar();\n });\n\n //Mostramos informacion del chofer y el precio\n $('#flete').text(data['nombreChofer']);\n $('#precio').text(data['precio']);\n $('#posicion').text(data['posicion']);\n latLongChofer = data['latLong'];\n\n\n\n }else{//Un chofer rechazo y no envio oferta \n start+=1;\n validarArray(start);//Enviamos solicitud al siguiente chofer de la array.\n }\n });//fin emit solicitud\n }", "title": "" }, { "docid": "094d151096643b7c5ec87783ed120055", "score": "0.5404791", "text": "listen(){\n this.app.listen(this.port, ()=>{\n console.log('Servidor correindo en puerto', this.port );\n })\n }", "title": "" }, { "docid": "22609500a3f600f8b180eb4040a05fcb", "score": "0.5404001", "text": "function __FIXME_SBean_server_echo() {\n\tthis._pname_ = \"server_echo\";\n\t//this.stamp:\t\tint32\t\n}", "title": "" }, { "docid": "034d6c91ae3ce2728658d2377a88d810", "score": "0.5401787", "text": "function serverCheck(add) {\n\n let name;\n let description;\n let id;\n\n if (add) {\n name = document.getElementById('pos-name').value;\n description = document.getElementById('description').value;\n }else {\n name = document.getElementById('upd-pos-name').value;\n description = document.getElementById('upd-description').value;\n id = document.getElementById('upd-id').value;\n }\n\n let vars = `${urlRoot}/Positions/checkPosition/${name}`;\n let hr = new XMLHttpRequest();\n hr.open('GET', vars, true);\n hr.onreadystatechange = function () {\n if (hr.readyState == 4 && hr.status == 200) {\n let response = hr.responseText;\n if (response == 'ok') {\n if (add) {\n addPosition(name, description);\n } else {\n updatePosition(name, description, id);\n }\n\n } else {\n //dispay warning message\n let btn = document.getElementById('server-err');\n if (btn.classList.contains('d-none')) {\n btn.classList.remove('d-none');\n }\n }\n }\n };\n\n hr.send(vars);\n\n}", "title": "" }, { "docid": "4e54c11f8357a051eb9dc8252714c6b1", "score": "0.5399419", "text": "function init() {\n // load server data:\n var serverId = ($routeParams.serverId) ? parseInt($routeParams.serverId) : 0;\n serversService.getServerData(serverId).then(function(data) {\n if (data.hasOwnProperty('port')) {\n data.port = parseInt(data.port);\n }\n vm.server = data;\n }, function() {\n $location.path('/servers');\n });\n }", "title": "" }, { "docid": "8dce302a6e9cd8f4fe54b96012fcf2a1", "score": "0.5398637", "text": "static get dedicatedServer() {}", "title": "" }, { "docid": "7d2704a65f4487ac930fcc8df4edc25e", "score": "0.538612", "text": "function startVIS(server, port){ \r\n\t\t\t\t\tvisserver = server; \r\n\t\t\t\t\tvisport = port;\r\n\t\t\t\t\tsetTimeout(function(){ sndReq(\"image\"); }, 100);\r\n\t\t\t\t\tsetTimeout(function(){ sndReq(\"text\"); }, 1200);\r\n\t\t\t}", "title": "" }, { "docid": "a3610f4a1e421de848b65d5ea16ab612", "score": "0.5374824", "text": "function errorHandler(error){\n console.log(\"Error occured from server \",error )\n errorDiv.innerText = \"Oops!! Server error ,try again sometime later\"\n outputDiv.innerText = \"\"\n}//function to handle server busy", "title": "" }, { "docid": "f1c48564ba1c96104b8e1ea2c9a6afd5", "score": "0.53724873", "text": "function HostService() {\n /*host: string = \"http://localhost:900S0/\"*/\n /*host: string = \"http://localhost:9000/imersa/\"*/\n /*host: string = \"http://192.168.0.20:9000/imersa/\";*/\n /*\thost: string = \"http://localhost:9000/\"*/\n // host: string = \"http://localhost:8080/\";\n /*host: string = \"http://localhost:7089/\" */\n /*host: string = \"http://localhost:8080/imersa_backend-req4/\"*/\n // host: string = \"http://grupocubus.dyndns.org:50001/\";\n //host: string = \"http://ykssistemas.dyndns.org:50001/imersa/\";\n this.host = \"http://ec2-18-217-145-105.us-east-2.compute.amazonaws.com:9000/imersa/\";\n }", "title": "" }, { "docid": "5f0eccd83c0586f84627b8d812699b6d", "score": "0.5362866", "text": "function nuevaSolicitud(req,res){\n //agarramos todos lo datos\n let id_solicitante = req.body.id_user, lat = req.body.lat, lng = req.body.lng,valoracion = req.body.valoracion,\n mayorCosto = req.body.mayorCosto,menorCosto = req.body.menorCosto,hombre = req.body.hombre,\n mujer = req.body.mujer,conTransporte = req.body.conTransporte,idServicio = req.body.id_servicio,\n fecha = req.body.fecha,hora = req.body.hora, descripcion=req.body.descripcion, nombreServicio = req.body.nombre_servicio;\n \n \n\n \n let sql = `SELECT * FROM usuarios WHERE id_usuario= ${id_solicitante}`;\n consultaBd.consultaBd(sql,(result)=>{\n if(result) {\n //console.log(result);\n let nombreSolicitante = result[0].nombre + \" \" + result[0].ap + \" \" + result[0].am ; \n let telefono = result[0].telefono;\n let correo = result[0].correo;\n let genero = result[0].genero;\n //guardamos la solicitud en la tabla en ram:\n solicitudes.push({id_servicio :idServicio, servicio: nombreServicio, id_solicitante:id_solicitante,\n nombre:nombreSolicitante, telefono: telefono, correo:correo,\n fecha:fecha, hora: hora, lat:lat, \n lng:lng, costo:\"\", estatus:\"pendiente\",\n operador:\"\", valoracion:valoracion, mayorCosto:mayorCosto,\n menorCosto:menorCosto, hombre:hombre, mujer:mujer,\n conTransporte:conTransporte, descripcion:descripcion, generoSolicitante:genero\n }); \n res.status(200).send({ message: `Nueva solicitud enviada de : ${ nombreSolicitante }` });\n }\n\n });\n}", "title": "" }, { "docid": "f61c9d83620b4d321f8ef94f35cab294", "score": "0.5360401", "text": "function gestionarRespuestaNettsSiguiendo() {\n\n let JsonObj = JSON.parse(peti_xhr.responseText); // Respuesta del servidor\n let netts = JsonObj.listaNetts; // Lista de netts\n // Si no hay netts muestro un cuadro diciendo que no se han encontrado netts\n if (!netts.length > 0) {\n\n let cuadro = '<div class=\"post-bar\"><div class=\"post_topbar\">No se ha encontrado ningún nett todavía. Empieza a nettear!</div></div>';\n document.getElementById('seccionNetts').innerHTML = cuadro;\n // En caso contrario recorro la lista de netts creando un cuadro con cada uno y listandolos\n } else {\n\n for (let i = 0; i < netts.length; i++) {\n\n let fotoUser = \"images/\" + netts[i].foto;\n let imagen = netts[i].imagen;\n let nombre = netts[i].nombre + \" \" + netts[i].apellidos;\n let contenido = netts[i].contenido;\n let id = netts[i].id_usuario;\n let user = netts[i].usuario;\n let fecha = netts[i].fecha_pub;\n let cuadro = '<div class=\"post-bar\"><div class=\"post_topbar\"><div class=\"usy-dt\">' +\n '<a href=\"?pagina=perfil&id='+id+ '\"> <img src=\"' +\n fotoUser + '\" alt=\"Imagen del usuario\"></a><div class=\"usy-name\"><h3><a href=\"?pagina=perfil&id='+id+'\"> ' + nombre +\n '</a></h3></div><br><span class=\"userNaNett\">&nbsp&nbsp&nbsp&nbsp@'+user +'</span></div></div><div class=\"job_descp\"><p>' + contenido + '</p>';\n // Si el usuario ha publicado una imagen, esta se inserta en la publicacion\n if (imagen) {\n\n cuadro += \"<img class='fotoNett' src='images/\" + imagen + \"' class='' alt='Imagen'>\";\n }\n\n cuadro += '</div><div class=\"job-status-bar\"><span>' + fecha + '</span></div></div>';\n // Se van añadiendo un nett debajo de otro\n document.getElementById('seccionNetts').innerHTML += cuadro;\n }\n }\n\n}", "title": "" }, { "docid": "3bb76396ae49a964b7b8e2fad4cf7bae", "score": "0.5357323", "text": "startServer() {\n window.addEventListener('storage', this._answerReqest.bind(this), false);\n this._startHardbeat();\n }", "title": "" }, { "docid": "949efd03c4c6ff2e05e1c5c0af4323ba", "score": "0.53567094", "text": "function pruebas(req,res){\n\tres.status(200).send({\n\t\tmessage:'Probando el controlador de componente y la acción pruebas'\n\t});\n}//pruebas", "title": "" }, { "docid": "7da2ee14eedbe90d37404c173ae1022f", "score": "0.5355968", "text": "function Actualizar() {\n llamada(true, \"GET\", \"https://lanbide-node.herokuapp.com/admins\", \"JSON\");\n}", "title": "" }, { "docid": "b7559374d45ef20366d5a87651cc761d", "score": "0.5348652", "text": "function ListenServer (){\r\n kango.console.log (\"Listen\");\r\n var allcookie = document.cookie.split(\";\");\r\n kango.console.log (\"Lenght\",allcookie.length-1);\r\n for (i=0;i < allcookie.length-1;i++)\r\n { \r\n\r\n if (allcookie[i].split('=')[0] == \" BAseURI\")\r\n {var BAseURI = decodeURIComponent(allcookie[i].split('=')[1])}\r\n if (allcookie[i].split('=')[0] == \"TraceName\")\r\n {var TraceName = allcookie[i].split('=')[1]}\r\n if (allcookie[i].split('=')[0] == \" Model_URI\")\r\n {var Model_URI = decodeURIComponent(allcookie[i].split('=')[1])}\r\n }\t\r\n if ( (BAseURI) && (TraceName) && (Model_URI) )\r\n {\r\n Trace_Information ={TraceName:TraceName,BaseURI:BAseURI,ModelURI:Model_URI};\r\n kango.dispatchMessage('TraceInfo',Trace_Information);\r\n var encoded_trace_uri = encodeURIComponent(Trace_Information.BaseURI+Trace_Information.TraceName+\"/\");\r\n var URL = \"http://dsi-liris-silex.univ-lyon1.fr/fderbel/Assistant-Samo-Trace-Me/Index.php?mode=utilisateur&&page=TraceView&trace_uri=\"+encoded_trace_uri ;\r\n // window.open(URL,\"assistant\",\"menubar=no, status=no, scrollbars=no, menubar=no, width=800, height=400\");\r\n kango.dispatchMessage('OpenAssist',URL); \r\n \r\n }\r\n}", "title": "" }, { "docid": "8ca699c973612d1da4b6c2dbb2c4076d", "score": "0.53441447", "text": "function consultar_acceso_a_internet() {\n if ($window.navigator.onLine) {\n obj.definir_modo_online();\n } else {\n obj.definir_modo_offline();\n };\n }", "title": "" }, { "docid": "d83664b78d97faff1c389f09a8860d84", "score": "0.5342587", "text": "function requestServerStat() {\n\t\t\t\tvar infoContainers = $('.serverInfoContainer');\n\t\t\t\tfor(var index = 0; index< infoContainers.length; index++){\n\t\t\t\t\tvar request = new InfoRequest(infoContainers[index]);\n\t\t\t\t\trequest.request();\n\t\t\t\t\trequest.startInterval();\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "4f9f6bbca766433570de9825dddfd1cb", "score": "0.5326661", "text": "function checkServer(serverIP, channelID) {\r\n\t sinusbot.http({\r\n\t \"method\": \"GET\",\r\n\t \"url\": \"https://mcapi.ca/query/\" + serverIP + \"/info/old\",\r\n\t \"timeout\": 60000,\r\n\t \"headers\": [\r\n\t {\"Content-Type\": \"application/json\"}\r\n\t ]\r\n\t }, function (error, response) {\r\n\t \tvar serverinfo = JSON.parse(response.data);\r\n\r\n\t \tif (serverinfo.status) {\r\n\t \t\tsinusbot.chatPrivate(channelID, \"Auf dem Minecraft Server mit der IP: [color=blue]\" + serverIP + \"[/color] und der Version: [color=purple]\" + serverinfo.version + \"[/color] sind [color=green]\" + serverinfo.players.online + \"[/color] Spieler von [color=red]\" + serverinfo.players.max + \"[/color] online\");\r\n\t \t} else if (!serverinfo.status) {\r\n\t \t\tsinusbot.chatPrivate(channelID, \"Der Minecraft Server mit der IP: [color=blue]\" + serverIP + \"[/color] ist [color=red]offline[/color] oder [color=red]nicht erreichbar[/color]\");\r\n\t \t}\r\n\t \r\n\t });\r\n }", "title": "" }, { "docid": "204f30900259be56c073284a0a660ee9", "score": "0.5326656", "text": "repickHost() {\n this.host = null;\n var newHostId = Object.keys(this.socketNames)[0];\n this.host = newHostId ? newHostId : null;\n }", "title": "" }, { "docid": "d192fdf8fbb84d2af67b62a1fbf4a453", "score": "0.5323173", "text": "function saludo (req, res){\n send(res, 200, {message: 'saludar microrouter'});\n}", "title": "" }, { "docid": "c0920f5b2124febc1cef2d9b8b20d671", "score": "0.5322478", "text": "function myServer() {\n\tthis.server = server;\n}", "title": "" }, { "docid": "65c223f63fa54c10239f450a9a2e7713", "score": "0.53211653", "text": "function traer_status_empresa(req,res){\n\tCONN('status').select().then(status =>{\n\t\tif (!status){\n\t\t\tres.status(500).send({ resp: 'error', error: `${error}` });\n\t\t}else{\n\t\t\tres.status(200).send({ resp: 'consulta exitosa de status_empresa', status:status});\n\t\t}\n\t})\n}", "title": "" }, { "docid": "bfed628e1592f456fa6d47a3a0045da4", "score": "0.53184575", "text": "function solicitar_movimientos() {\r\n\r\n\r\n var fichasJ1 = obtenerArregloFichas(1);\r\n var fichasJ2 = obtenerArregloFichas(2);\r\n\r\n $scope.http_request.endpoint = \"movidasPosibles\";\r\n $scope.http_request.method = \"POST\";\r\n $scope.http_request.body = {\r\n \"size\" : $scope.tam.col,\r\n \"level\" : obtenerDificultad(),\r\n \"posFichasJ1\" : fichasJ1,\r\n \"posFichasJ2\" : fichasJ2,\r\n \"jugadorActual\" : 1\r\n };\r\n\r\n HttpRequest.player_vs_system($scope.http_request,function (response) {\r\n $scope.movidasPosibles = response.data;\r\n apply_style_available_moves(response.data);\r\n });\r\n }", "title": "" }, { "docid": "e6ddb99077ffffb3ada63c8713b22545", "score": "0.53144336", "text": "function statusSocket()\n{\n console.log('attempting status socket');\n try {\n Status.replaceData(noReq, '/status/get');\n } catch (e) {\n console.error(e);\n console.log('FAILED STATUS CONNECTION');\n setTimeout(statusSocket, 10000);\n }\n}", "title": "" }, { "docid": "ce22726cbe78aca0f6e576605862eaad", "score": "0.5314197", "text": "function refreshServerInfo() {\n const $serverInfo = $('.serverInfo');\n $.get('http://localhost:7070').then(\n // successful return\n function (data) {\n Object.keys(data).forEach(p => {\n $(`[data-replace=\"${p}\"]`).text(data[p]);\n });\n },\n function (jqXHR, textStatus, err) {\n console.error(err);\n $serverInfo.addClass('error')\n .html('Error connecting to server.');\n }\n );\n}", "title": "" }, { "docid": "ca93981d329b79750169abb13ce18195", "score": "0.5311624", "text": "function customConnect() {\n resetZoom();\n if (!window.connect) {\n\n return;\n }\n\n if (!connectBtn.disabled) {\n connectBtn.disabled = true;\n } else {\n return false;\n }\n\n if (randomizeBackground) {\n randomBackground();\n }\n\n //Handle skin change options\n skinChange();\n //Need to reset this before trying to reconnect\n window.dead_mtm = - 1;\n if (selectedServer != '-1') {\n window.forcing = true;\n if (!window.bso) {\n window.bso = {};\n }\n }\n\n if (selectedServer == '-3') {\n //double check custom server entry\n manualServer = document.getElementById('server-manual-input').value;\n window.localStorage.setItem('server-manual', manualServer);\n var srv = manualServer.trim().split(':');\n if (validIP(srv[0])) {\n window.bso.ip = srv[0];\n window.bso.po = srv[1];\n } else {\n alert('The custom server you entered does not have a valid IP address format');\n document.getElementById('server-manual-input').focus();\n return false;\n }\n } else if (selectedServer == '-2') {\n var connectToServer = window.sos[Math.floor(Math.random() * window.sos.length)];\n window.bso.ip = connectToServer.ip;\n window.bso.po = connectToServer.po;\n selectedServer = connectToServer.ip + ':' + connectToServer.po;\n var selectSrv = document.getElementById('server-select').value = selectedServer;\n } else if (selectedServer != '-1') {\n var srv = selectedServer.trim().split(':');\n window.bso.ip = srv[0];\n window.bso.po = srv[1];\n }\n\n window.connect();\n setTimeout(connectionStatus, 1000);\n }", "title": "" }, { "docid": "e5143b96459c705c46f2adb9c15b9839", "score": "0.5300338", "text": "function serverOffline() {\n const loadingContainer = document.createElement(\"div\")\n loadingContainer.innerHTML = '<p class=\"display-5 text-secondary text-center mt-5 pt-5\">Server offline ...<br/>Please reload page<br/>or retry later!</p>'\n const templateContainer = document.querySelector(\".templateContainer\")\n templateContainer.classList.add(\"justify-content-center\")\n templateContainer.appendChild(loadingContainer)\n}", "title": "" }, { "docid": "d6bd862ece9d0c2bf385fa498cb70045", "score": "0.5299913", "text": "function setNISNode() {\r\n let portNum = 7890;\r\n try {\r\n portNum = parseInt(nisport.value);\r\n } catch (e) {\r\n //port is not a valid int \r\n }\r\n if (nishost.value==\"\") {\r\n nishost.focus();\r\n return false;\r\n }\r\n if (nisport.value==\"\") {\r\n nisport.focus();\r\n return false;\r\n }\r\n if (portNum>65535 || portNum<=0) {\r\n nisport.value=7890;\r\n nisport.focus();\r\n return false;\r\n }\r\n url = 'http://' + nishost.value + ':' + nisport.value;\r\n customNodeDiv.classList.add(\"fa\",\"fa-check-circle\");\r\n defaultNodeDiv.classList.remove(\"fa\",\"fa-check-circle\");\r\n // console.log('setNISNode: ' + url);\r\n }", "title": "" }, { "docid": "a2fc6c5bf953b94bb822216708b1f4ba", "score": "0.5299262", "text": "function setServer(bool) {\n server = bool;\n }", "title": "" }, { "docid": "e7fc5e53aed4d3b770220829ecec6764", "score": "0.52966356", "text": "listen() {\n this.app.listen(this.port, () => {\n console.log('Servidor ejecutandose en el puerto', this.port)\n })\n }", "title": "" }, { "docid": "9fbdfa06b55f4e6a7a6665fb97c09471", "score": "0.5295763", "text": "async function InitServer() {\n \n freePort = await fp(3000,3100);\n let serverAddress = await createServer(freePort[0],\"localhost\")\n console.log('Server listening on %j', serverAddress)\n\n try{\n\n let result = await waitEventClientData(eventEmitter,4000)\n console.log(\"[RESULT]\".blue,result);\n //idsocket is a id of client socket\n if(result.hasOwnProperty('idsocket')){\n result_w = await writeClient(socketsClient.find(o => o.id === result.idsocket).socket);\n result = await waitEventClientData(eventEmitter,12000)\n console.log(\"[RESULT]\".blue,result);\n }else console.log(\"[FINISH]\");\n\n }catch(error) {\n console.warn(\"error\",error.message)\n }\n\n \n }", "title": "" }, { "docid": "83c3620c846209e8a8f411ad1f9ed841", "score": "0.52941763", "text": "function callServer() {\n if (calling === 0) {\n clearData();\n $(messageBox).html(\"Validando curp...\");\n console.log(\"Llamando al servidor... Intento(\" + countCalls + \")\");\n calling = 1;\n $.ajax({\n url: url[countCalls] + \"curp.json\",\n data: {\n curp: curpInput.val()\n },\n type: \"POST\",\n timeout: 15000\n }).done(function(result) {\n console.log(\"La operación se ejecutó correctamente\");\n console.log(result); \n //alert(document.getElementsByName(\"pluginCurp\")[0].value);\n if (result.curp !== null && result.curp !== undefined) {\n showData(result); \n $(messageBox).html(\"CURP correcto.\");\n document.getElementsByName(\"pluginCurp\")[0].value=\"true\";\n } else {\n \n $(messageBox).html(result.mensaje);\n //Se agregó al plugin\n if(result.mensaje==\"Error al conectarse al servidor LDAP\")\n {\n document.getElementsByName(\"pluginCurp\")[0].value=\"false\";\n console.log(\"Cambiando a modo libre\");\n changeFree();\n }\n }\n\n }).error(function(data, textStatus, jqXHR) {\n console.log(\"Ocurrió un error: \" + textStatus);\n\n $(messageBox).html(\"Ocurrió un error.\");\n\n// if (textStatus === \"timeout\") {\n console.log(\"No se pudo establecer la conexión.\");\n console.log(\"Llamadas realizadas: \" + countCalls + \", disponibles: \" + url.length-1);\n if (countCalls < url.length-1) {\n console.log(\"Realizando un intento en otra instancia...\");\n countCalls++;\n calling = 0;\n callServer();\n } else {\n console.log(\"Cambiando a modo libre\");\n changeFree();\n }\n// }\n\n }).always(function() {\n calling = 0;\n });\n } else {\n console.log(\"Servidor ocupado.\");\n }\n }", "title": "" }, { "docid": "d36d32a58f99f182625893637c9ecc68", "score": "0.529284", "text": "async function monitoreoTiempoReal(req = request, res = response) {\n//https://www.digitalocean.com/community/tutorials/how-to-launch-child-processes-in-node-js-es\n//Pagina para validar el comando fork para comunicacion bilateral\n //obtener los parametros de entrada \n // const {fechaInicio,fechaFin, numClientes, tiempoSeg, tamanioPaquete, URL } = req.body;\n const body = req.body;\n parametroModel = guardarParametros(body);\n // console.log(\"el id del los parametros ingrasados es\"+ parametroModel._id);\n latenciaModel = crearLatencia(parametroModel._id);\n\n //Ejecutar comando\n ejecutarMonitoreo(body,parametroModel._id );\n\n\n //ping(tamanioPaquete, URL);\n //https://www.npmjs.com/package/net-ping\n\n // res.json({\n // msg: \"get API\",\n // parametro\n // });\n // Documentacion\n // https://elabismodenull.wordpress.com/2017/03/28/el-manejo-de-streams-en-nodejs/\n // ########## SOCKET IO##########\n\n}", "title": "" }, { "docid": "0351b6402d06381b91a4d3724ccd1bae", "score": "0.52909166", "text": "run({ accion, socket, Socket, leccionId, paraleloId, fechaInicioTomada, tiempoEstimado, usuarioId }) {\n // limpiarlos por si acaso el moderador envia dos veces la misma peticion\n const existeInterval = intervals.some(leccion => leccionId == leccion.leccionId)\n const existeTimeout = timeouts.some(leccion => leccionId == leccion.leccionId)\n socket.join(`${paraleloId}`) // cada vez que realiza una de las acciones de debe agregar al profesor al room del paralelo\n if (existeInterval)\n intervals = intervals.filter(inicial => { if (inicial.leccionId == leccionId) {clearInterval(inicial.interval)} return inicial.leccionId !=leccionId })\n if (existeTimeout) { // si comento esto, se crean 3?\n timeouts = timeouts.filter(inicial => { if (inicial.leccionId == leccionId) {clearTimeout(inicial.timeout)} return inicial.leccionId != leccionId })\n }\n if (accion === 'comenzar') {\n logger.info(`moderador-comenzar usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}, fechaInicioTomada: ${moment(fechaInicioTomada).format(\"DD-MM-YY_hh-mm-ss\")}, tiempoEstimado: ${tiempoEstimado}`)\n } else if (accion === 'aumentarTiempo') {\n logger.info(`moderados-aumentarTiempo usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}`)\n } else if (accion === 'continuar') {\n logger.info(`moderador-continuar usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}, fechaInicioTomada: ${moment(fechaInicioTomada).format(\"DD-MM-YY_hh-mm-ss\")}, tiempoPausado+TiempoRestante: ${tiempoEstimado}`)\n } else if (accion === 'reconectarModerador') {\n logger.info(`moderador-reconectarModerador usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}, fechaInicioTomada: ${moment(fechaInicioTomada).format(\"DD-MM-YY_hh-mm-ss\")}, tiempoPausado+TiempoRestante: ${tiempoEstimado}`)\n }\n const CURRENT_TIME = moment(moment().tz('America/Guayaquil').format())\n const FECHA_INICIO = moment(fechaInicioTomada)\n const FECHA_FIN = FECHA_INICIO.add(tiempoEstimado, 's')\n intervalId = setInterval(() => {\n let fechaFinLeccion = FECHA_FIN.subtract(1, 's')\n let tiempoRestante = moment.duration(fechaFinLeccion.diff(CURRENT_TIME)).format('h:mm:ss')\n // console.log(tiempoRestante)\n Socket.in(`${paraleloId}`).emit(EMIT.TIEMPO_RESTANTE, tiempoRestante)\n if (!CURRENT_TIME.isBefore(fechaFinLeccion)) {\n intervals = intervals.filter(inicial => { if (inicial.leccionId == leccionId) {clearInterval(inicial.interval)} return inicial.leccionId !=leccionId })\n Socket.in(`${paraleloId}`).emit(EMIT.LECCION_TERMINADA)\n Socket.in(`${paraleloId}`).emit(EMIT.TIEMPO_RESTANTE, 0)\n logger.info(`moderador-leccion-termino usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}, fechaInicioTomada: ${moment(fechaInicioTomada).format(\"DD-MM-YY_hh-mm-ss\")}, tiempoEstimado: ${tiempoEstimado}`)\n }\n }, 1000)\n intervalId.ref()\n\n const SEGUNDOS_FIN = parseInt(moment.duration(FECHA_FIN.clone().add(5, 's').diff(CURRENT_TIME), 'seconds').format('ss'), 10) // si no termina con setInterval, despues de 5 segundos terminara con setTimeout\n timeoutId = 1 // prueba\n // timeoutId = setTimeout(() => {\n // if (intervalExiste(intervals, leccionId)) {\n // intervals = intervals.filter(inicial => { if (inicial.leccionId == leccionId) {clearInterval(inicial.interval)} return inicial.leccionId !=leccionId })\n // Socket.in(`${paraleloId}`).emit(EMIT.LECCION_TERMINADA)\n // logger.info(`moderador-leccion-termino-setTimeout usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}, fechaInicioTomada: ${moment(fechaInicioTomada).format(\"DD-MM-YY_hh-mm-ss\")}, tiempoEstimado: ${tiempoEstimado}`)\n // } else {\n // logger.info(`moderador-leccion-termino-setInterval usuarioId: ${usuarioId}, leccionId: ${leccionId}, paraleloId: ${paraleloId}, fechaInicioTomada: ${moment(fechaInicioTomada).format(\"DD-MM-YY_hh-mm-ss\")}, tiempoEstimado: ${tiempoEstimado}`)\n // }\n // timeouts = timeouts.filter(inicial => { if (inicial.leccionId == leccionId) {clearTimeout(inicial.timeouts)} return inicial.leccionId !=leccionId })\n // }, SEGUNDOS_FIN)\n intervals.push({ leccionId, interval: intervalId, usuarioId })\n timeouts.push({ leccionId, timeout: timeoutId, usuarioId })\n if (accion === 'comenzar') {\n Socket.in(`${paraleloId}`).emit(EMIT.EMPEZAR_LECCION) // este solo sirve cuando los estudiantes estan en \"ingresar-codigo\"\n }\n }", "title": "" }, { "docid": "087d5946e23178bb36b04af5c53b0bb8", "score": "0.5289368", "text": "function server_net() {\n this.clients = [];\n }", "title": "" }, { "docid": "8b14b81078fdfd64760ae3adcc8949d8", "score": "0.5282638", "text": "function callServer() {\n if (calling === 0) {\n $(curpInput).val(\"\");\n $(messageBox).html(\"Validando datos...\");\n console.log(\"Llamando al servidor... Intento(\" + countCalls + \")\");\n calling = 1;\n $.ajax({\n url: url[countCalls] + \"datos.json\",\n data: {\n nombre: $(nombreInput).val(),\n apellidoPaterno: $(aPaternoInput).val(),\n apllidoMaterno: $(aMaternoInput).val(),\n sexo: ($(sexoInput1).is(\":checked\")) ? $(sexoInput1).val() : $(sexoInput2).val(),\n fechaNacimiento: $(fNacimientoDiaInput).val() + \"/\" + $(fNacimientoMesInput).val() + \"/\" + $(fNacimientoAnioInput).val(),\n estadoNacimiento: $(eNacimientoInput).val()\n },\n type: \"POST\",\n timeout: 15000\n }).done(function(result) {\n console.log(\"La operación se ejecutó correctamente\");\n console.log(result);\n\n if (result.curp !== null && result.curp !== undefined) {\n showData(result);\n $(messageBox).html(\"Datos correctos.\");\n } else {\n $(messageBox).html(result.mensaje);\n }\n\n }).error(function(data, textStatus, jqXHR) {\n console.log(\"Ocurrió un error: \" + textStatus);\n\n $(messageBox).html(\"Ocurrió un error.\");\n\n// if (textStatus === \"timeout\") {\n console.log(\"No se pudo establecer la conexión.\");\n console.log(\"Llamadas realizadas: \" + countCalls + \", disponibles: \" + url.length-1);\n if (countCalls < url.length-1) {\n console.log(\"Realizando un intento en otra instancia...\");\n countCalls++;\n calling = 0;\n callServer();\n } else {\n console.log(\"Cambiando a modo libre\");\n changeFree();\n }\n// }\n\n }).always(function() {\n calling = 0;\n });\n } else {\n console.log(\"Servidor ocupado.\");\n }\n }", "title": "" }, { "docid": "423ec08b89715b1b4e9073efb22efaa9", "score": "0.52789277", "text": "function CreateServer(){\n console.log(\"SCreate\");\n //Meme-Text-Elemente aus html beziehen\n var text1 = document.getElementById('MemeTextOben');\n var text2 = document.getElementById('MemeTextMitte');\n var text3 = document.getElementById('MemeTextUnten');\n //Request an Server erstellen. Texte und Hintergrundbild angeben\n let request = \"https://mymultimediamememaker.herokuapp.com/create_meme?text1=\"+text1.innerText+\"&text2=\"+text2.innerText+\"&text3=\"+text3.innerText+\"&imgurl=\"+document.getElementById(\"backImage\").src;\n //Positionierung der Texte\n request +=\"&t2left=0&t1left=\"+t1left+\"&t3left=\"+t3left;\n //Formatierung bekommen für 1,2 und 3\n //Text Oben\n request += \"&style1=\";\n if(text1.style.fontWeight == \"bold\") request += \"bold%20\";\n if(text1.style.fontStyle == \"italic\") request += \"italic%20\";\n request += (window.getComputedStyle(text1, null).getPropertyValue('font-size'));\n request += \"%20sans\"\n request += \"&color1=\";\n if(text1.style.color != \"\") request += rgb2hex(text1.style.color);\n else request +=\"%23fff\";\n //Text Mitte\n request += \"&style2=\";\n if(text2.style.fontWeight == \"bold\") request += \"bold%20\";\n if(text2.style.fontStyle == \"italic\") request += \"italic%20\";\n request += (window.getComputedStyle(text2, null).getPropertyValue('font-size'));\n request += \"%20sans\"\n request += \"&color2=\";\n if(text2.style.color != \"\") request += rgb2hex(text2.style.color);\n else request +=\"%23fff\";\n //Text Unten\n request += \"&style3=\";\n if(text3.style.fontWeight == \"bold\") request += \"bold%20\";\n if(text3.style.fontStyle == \"italic\") request += \"italic%20\";\n request += (window.getComputedStyle(text3, null).getPropertyValue('font-size'));\n request += \"%20sans\"\n request += \"&color3=\";\n if(text3.style.color != \"\") request += rgb2hex(text3.style.color); //Textfarbe übergeben !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n else request +=\"%23fff\";\n\n\n console.log(request);\n //Request an Express-Server senden\n let XMLHTTP = new XMLHttpRequest();\n XMLHTTP.open(\"GET\",request);\n XMLHTTP.setRequestHeader('Content-Type', 'text/plain')\n XMLHTTP.addEventListener(\"readystatechange\",function() {\n if (XMLHTTP.readyState == 4) {\n //Zurückgegebene Bilddatei automatisch herunterladen\n var link = document.getElementById('link');\n link.setAttribute('download', 'MyMultiMediaMeme.png');\n link.setAttribute('href', this.responseText);\n link.click();\n }\n }, false);\n\n XMLHTTP.send(null);\n}", "title": "" }, { "docid": "a1de870c7e7a3d4aa3d368dd556fe0a7", "score": "0.52771527", "text": "reiniciarConteo() {\n this.ultimo = 0;\n this.tickets = [];\n this.grabarArchivo();\n this.ultimos4 = []\n console.log('Se ha inicializado el sistema');\n \n }", "title": "" }, { "docid": "882f73e4d6104d890627c350e30650c8", "score": "0.5258403", "text": "function pruebas(req,res)\r\n{\r\n\tres.status(200).send({\r\n\t\tmessage: 'Probando el controlador para una foto'\r\n\t});\r\n}", "title": "" }, { "docid": "fe269ce871ced87dcc8b068537a76f4f", "score": "0.52580047", "text": "function funboton(valor) {\n\tvar data = {\n\t\tplayer: playerNumber,\n\t\tcolor: valor,\n\t}\n render(data);\n//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>//\n socket.emit(\"res-message\", data); // emite al servidor el nuevo valor\n}", "title": "" }, { "docid": "a35f5194416d8ce3b31d679a7d413f9a", "score": "0.525629", "text": "function escucharOperadores(req,res){\n let id_operador = req.params.id, lat_operador = req.params.lat, lng_operador = req.params.lng;\n let flag=buscarOperador(id_operador) \n //ver si el operador esta en linea para actualizar lat y lng o agregarlo al arreglo\n if(flag.flag==true){\n operadores[flag.i-1].lat=lat_operador;\n operadores[flag.i-1].lng=lng_operador;\n }else{\n operadores.push({id:id_operador,lat:lat_operador,lng:lng_operador});\n }\n let operadorOcupado = false;\n let pos;\n for(let i=0; i< solicitudes.length; i++){\n var rechazada = verificarRechazo(id_operador);\n if(rechazada.flag == false){//verificamos si alguien rechazo la solicitud\n if(solicitudes[i].operador == id_operador && solicitudes[i].estatus=='pendiente'){\n let solicitud= buscarSolicitud(solicitudes[i].id_solicitante);\n if(solicitudes[solicitud].estatus=='pendiente'){\n solicitudes[solicitud].estatus='enEspera';\n }\n operadorOcupado=true;\n pos = i;\n }\n }\n }\n if(operadorOcupado==true){\n res.status(200).send({message:[{'flag':'true','cuerpo':[solicitudes[pos]]}]});\n }else{\n res.status(200).send({message:[{'flag':'false','cuerpo':[]}]});\n } \n \n}", "title": "" }, { "docid": "d9f0ed856ae3109b09947604ee19fbc4", "score": "0.5251114", "text": "function NousTrougerGet(req, res) {\n res.send('/api/noustrouver');\n}", "title": "" }, { "docid": "2d99331001f158bae14d56daf30f2580", "score": "0.5249035", "text": "async function chooseServer()\n{\n\tlet txt = \"Listes des serveurs : \"\n\tlet choice = []\n\tlet promises = []\n\n\tawait client.guilds.forEach((data) =>\n\t{\n\t\tpromises.push(isAdmin(loggedAccount, data))\n\t})\n\n\tawait Promise.all(promises).then((data) =>\n\t{\n\t\tdata.forEach((myChoice) =>\n\t\t{\n\t\t\tif (myChoice != null)\n\t\t\t{\n\t\t\t\tchoice.push(myChoice)\n\t\t\t}\n\t\t})\n\t}).catch((e) =>\n\t{\n\t\tconsole.log(e)\n\t})\n\n\tif (choice.length == 0)\n\t{\n\t\tconsole.log(\"Il n'y a aucun serveur ou vous possèdez les droits suffisants pour effectuer les actions proposé\")\n\t\tendProcess()\n\t}\n\telse\n\t{\n\t\tlet data = await ask([\n\t\t{\n\t\t\ttype: \"list\",\n\t\t\tmessage: txt,\n\t\t\tname: \"selectServer\",\n\t\t\tchoices: choice\n\t\t}])\n\t\tobjActualServer.server = await data.selectServer\n\t\tchooseWhatToHandle(data.selectServer)\n\t}\n}", "title": "" }, { "docid": "19dc4d192a0cf20b7baf006eb784db81", "score": "0.5247386", "text": "async function serverResponse(estado, respuesta) {\n\n if (estado === 400) {\n mensajeError(\"El email o la contraseña no son validos\"); // muestra elemento HTML \n } else {\n console.log(respuesta) \n // Guarda en el Storage el token y el id \n localStorage.setItem('token', respuesta.token)\n // localStorage.setItem('id-usuario', respuesta.id)\n\n mensajeSuccess(respuesta.msg); // Muestra elemento HTML\n \n await peticionRedireccionamiento() // Redirecciona al Home\n\n }\n }", "title": "" }, { "docid": "1317f0dff77db31dde6ac685205a686c", "score": "0.52470785", "text": "function activity() {\n setTimeout(() => {\n fivereborn.query(configs.serverInfo[0], configs.serverInfo[1], (err, data) => {\n if (err) {\n console.log(err);\n } else {\n bot.user.setActivity(\"\" + data.clients + \"/\" + data.maxclients + \" Joueur(s) connecté(es) | s!help\", { type: configs.activityType });\n }\n });\n activity();\n }, 10000);\n}", "title": "" }, { "docid": "7acfc05cedb65c9d2eddf5f044eb55bd", "score": "0.5245114", "text": "function serverStatus() {\n ajax = ajaxObj();\n ajax.onreadystatechange = function() {\n if (this.responseText != \"OK\") {\n pimShowError(this.responseText); \n }\n };\n ajaxGet(ajax, serverStatusURL()); \n}", "title": "" }, { "docid": "339fa271cf42c23fe905940cb69af4dc", "score": "0.52378964", "text": "function netsetup(url)\n{\n\n username = window.prompt(\"Ingresa tu nombre\");\n\n socket = io();\n\n console.log(local);\n\n var sdata = {\n x: local.pos.x,\n y: local.pos.y,\n r: local.radius,\n cr: red(local.color),\n cg: green(local.color),\n cb: blue(local.color),\n name: username\n };\n\n\n socket.on(\"getdata\", function() {\n socket.emit(\"start\", sdata);\n });\n\n socket.on(\"heartbeat\", function(data) {\n players = data;\n });\n\n socket.on(\"createfood\", function(data) {\n food.push(new Food(data.x, data.y));\n });\n\n socket.on(\"removefood\", function(data) {\n console.log(\"Remove food \" + data.index + \" at \" + food[data.index].pos.x + \",\" + food[data.index].pos.y);\n food.splice(data.index, 1);\n });\n\n socket.on(\"clearfood\", function() {\n food = [];\n });\n\n socket.on(\"kill\", function() {\n alert(\"You died\");\n location.reload();\n socket.disconnect();\n });\n\n socket.on(\"setup\", function(data) {\n mapsize = data.mapsize;\n bounds.x = -mapsize;\n bounds.y = -mapsize;\n bounds.w = mapsize*2;\n bounds.h = mapsize*2;\n done = true;\n });\n\n socket.on(\"reload\", function() {\n location.reload();\n });\n}", "title": "" }, { "docid": "eb732dcee0badb274f57bf5a275750aa", "score": "0.523771", "text": "function serve(req, res) {\n const urlFromServer = url.parse(req.url, true);\n var ergebnis = undefined;\n var contentType = \"application/json\";\n var statusCode = 200;\n let params = urlFromServer.pathname.split(\"/\");\n let queryParams = urlFromServer.query;\n let tag = queryParams[\"tag\"];\n let suchwort = queryParams[\"suchwort\"];\n if (tag) {\n ergebnis = JSON.stringify(artikels.filter((m) => !m.tags.includes(tag)));\n } else if (suchwort) {\n ergebnis = JSON.stringify(getBySuchwort(suchwort));\n } else {\n if (params[1] === \"artikels\" && !Number.isNaN(Number(params[2]))) {\n let artikel = artikels.find((m) => m.id === params[2]);\n\n if (artikel) {\n ergebnis = JSON.stringify(artikel);\n } else {\n ergebnis = `Artikel mit der id ${params[2]} wurde nicht gefunden.`;\n statusCode = 404;\n contentType = \"text/plain\";\n }\n } else if (params[1] === \"artikels\" || urlFromServer.pathname === \"/\") {\n ergebnis = JSON.stringify(artikels);\n } else {\n ergebnis = \"Die Seite wurde nicht gefunden...\";\n statusCode = 404;\n contentType = \"text/plain\";\n }\n }\n\n res.writeHead(statusCode, {\n \"content-type\": contentType,\n \"Access-Control-Allow-Origin\": \"*\",\n });\n\n res.write(ergebnis);\n}", "title": "" }, { "docid": "ed8adb48c4fb1604d868bdef5f37aee6", "score": "0.5232562", "text": "function handleRequestUno(req, res) {\n\tres.end(\"You don't suck at this...totally\" + req.url);\n}", "title": "" }, { "docid": "12f0bd005cd18b703552ba0d61c16b29", "score": "0.5229748", "text": "function modificarServicio(){\n\t\t\tif (regServPresta.getForm().isValid()){\n\t\t\t\t\t\tregServPresta.getForm().submit({\n\t\t\t\t\t\t\turl:'modificarservicio',\n\t\t\t\t\t\t\twaitMsg:perfil.etiquetas.lbMsgEsperaModServ,\t\t\t\t\n\t\t\t\t\t\t\tparams:{idservicio:sm.getSelected().data.idservicio, idsistema:arbolServ.getSelectionModel().getSelectedNode().attributes.id},\n\t\t\t\t\t\t\tfailure: function(form, action){\n\t\t\t\t\t\t\t\tif(action.result.codMsg != 3){\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\twinMod.hide();\n\t\t\t\t\t\t\t\t\t\t\tregServPresta.getForm().reset(); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tstGpServicio.reload();\n\t\t\t\t\t\t\t\t\t\t\tsm.clearSelections();\n\t\t\t\t\t\t\t\t\t\t\tbtnModificar.disable();\n\t\t\t\t\t\t\t\t\t\t\tbtnEliminar.disable();\n\t\t\t\t\t\t\t\t\t\t\tmostrarMensaje(action.result.codMsg, action.result.mensaje); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(action.result.codMsg == 3) mostrarMensaje(action.result.codMsg,action.result.mensaje);\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}\n else\n mostrarMensaje(3,perfil.etiquetas.lbMsgErrorEnCamops); \n\t}", "title": "" }, { "docid": "3c5d1ca6188c9d9b623dde852e06053c", "score": "0.5225995", "text": "function Serveur() {\n\n\t// Récuperation de l'IP fournis par l'utilisateur\n\t//\n\tvar local = new MyLocalStorage();\n\tvar user = local.getUser();\n\tif(user.getIp() != \"\") {\n\t\tthis.IP = user.getIp();\n\t} else {\n\t\t// Adresse IP par défault\n\t\t//\n\t\tthis.IP = \"172.19.250.105\";\n\t}\n\t\n\t// Constantes des URLS avec le serveur\n\t//\n\tthis.prefix = \"http://\";\n\tthis.PORT = \"8080\";\n\t\n\tthis.URL_maladies = this.prefix + this.IP + \":\" + this.PORT + \"/RadioServer/webresources/disease/\";\n\tthis.URL_get_symptomes = this.prefix + this.IP + \":\" + this.PORT + \"/RadioServer/webresources/symptom/\";\n\tthis.URL_get_professions = this.prefix + this.IP + \":\" + this.PORT + \"/RadioServer/webresources/profession/\";\n\tthis.URL_get_symptome_maladie = this.prefix + this.IP + \":\" + this.PORT + \"/RadioServer/webresources/symptom/byDisease/\";\n\tthis.URL_brief = this.prefix + this.IP + \":\" + this.PORT + \"/RadioServer/webresources/brief/\";\n\n\t// Recuperation des maladies\n\t// Positionnement dans le local storage\n\t//\n\tServeur.prototype.getMaladie = function() {\n\t\t$.getJSON(this.URL_maladies, function(data) {\n\t\t\tmylocalStorage = new MyLocalStorage();\n\n\t\t\t// Mettre les données dans le localStorage\n\t\t\t//\n\t\t\tmylocalStorage.putListMaladie(data);\n\t\t});\n\t}\n\t// Recupération des symtômes\n\t// Positionnement dans le local storage\n\t//\n\tServeur.prototype.getSymptomes = function() {\n\t\t$.getJSON(this.URL_get_symptomes, function(data) {\n\t\t\tmylocalStorage = new MyLocalStorage();\n\t\t\t\n\t\t\t// Mettre les données dans le localStorage\n\t\t\t//\n\t\t\tmylocalStorage.putListSymptome(data);\n\t\t});\n\t}\n\t// Recupération des professions\n\t// Positionnement dans le local storage\n\t//\n\tServeur.prototype.getProfessions = function() {\n\t\t$.getJSON(this.URL_get_professions, function(data) {\n\t\t\tvar local = new MyLocalStorage();\n\t\t\t\n\t\t\t// Positionnement des données dans le localStorage\n\t\t\t//\n\t\t\tlocal.putListProfession(data);\n\t\t});\n\t}\n\t/*** Méthodes de communication avec le serveur ***/\n\t/*************************************************/\n\n\t// Envoyer un brief au serveur\n\t//\n\tServeur.prototype.sendBrief = function(brief) {\n\t\t$.ajax({\n\t\t\ttype : \"POST\",\n\t\t\turl : this.URL_brief,\n\t\t\tdata : JSON.stringify(brief),\n\t\t\tdatatype : \"json\",\n\t\t\tcontentType : \"application/json\",\n\t\t\tsuccess : OnSuccessCallMaladie,\n\t\t\terror : OnErrorCallMaladie\n\t\t});\n\n\t\t// Envoi du brief en ligne\n\t\t//\n\t\tfunction OnSuccessCallMaladie(data, status, jqXHR) {\n\t\t\tnotif(\"success\", \"Brief envoyé avec <strong>succès</strong> !\");\n\t\t}\n\n\t\t// Savegarde du brief en local\n\t\t//\n\t\tfunction OnErrorCallMaladie(jqXHR, status) {\n\t\t\tbrief.save();\n\t\t\tnotif(\"warning\", \"Brief sauvegardé avec <strong>succès</strong> !\");\n\n\t\t}\n\t}\n\t// Récuperer les symptomes d'une certaine maladie\n\t//\n\tServeur.prototype.getSymptomeDeMaladie = function(maladies) {\n\t\tvar url_get_symptom_by_id_disease = this.URL_get_symptome_maladie + maladies.getId();\n\t\n\t\t$.getJSON(url_get_symptom_by_id_disease, function(data) {\n\t\t\tvar tableSymtp = getSymtomesFromJSON(data);\n\t\t\tvar view = new View();\n\t\t\tview.setListSymptome(tableSymtp);\n\t\t});\n\t}\n\t\n\t// savoir si le serveur répond\n\t//\n\tServeur.prototype.isReachable = function(ip) {\n\t\t$.ajax({\n\t\t\ttype : \"GET\",\n\t\t\turl: this.URL_maladies,\n\t\t\tdatatype : \"json\",\n\t\t\tcontentType : \"application/json\",\n\t\t\tsuccess : OnSuccessCallMaladie,\n\t\t\terror : OnErrorCallMaladie\n\t\t});\n\n\t\t// Envoi du brief en ligne\n\t\t//\n\t\tfunction OnSuccessCallMaladie(data, status, jqXHR) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Savegarde du brief en local\n\t\t//\n\t\tfunction OnErrorCallMaladie(jqXHR, status) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t// Récupération des tous les briefs\n\t//\n\tServeur.prototype.getBrief = function() {\n\t\t$.getJSON(this.URL_brief, function(data) {\n\t\t\tconsole.log(data);\n\t\t});\n\t}\n\t\n\t// Récupération des tous les briefs\n\t//\n\tServeur.prototype.putMaladie = function(maladie) {\n\t\t$.ajax({\n\t\t\ttype : \"POST\",\n\t\t\turl : this.URL_maladies,\n\t\t\tdata : JSON.stringify(maladie),\n\t\t\tdatatype : \"json\",\n\t\t\tcontentType : \"application/json\",\n\t\t\tsuccess : OnSuccessCallMaladie,\n\t\t\terror : OnErrorCallMaladie\n\t\t});\n\n\t\t// Envoi du brief en ligne\n\t\t//\n\t\tfunction OnSuccessCallMaladie(data, status, jqXHR) {\n\t\t}\n\n\t\t// Savegarde du brief en local\n\t\t//\n\t\tfunction OnErrorCallMaladie(jqXHR, status) {\n\t\t}\n\t}\n}", "title": "" } ]
1c69e6ed7c0f309f5046b83be5745661
this function deletes a task
[ { "docid": "ba20ad7ca20dc5a18d021e59e216cf77", "score": "0.6637471", "text": "function deleteTask(id){\n console.log(\"testingdelete\");\n $.ajax({\n url: '/api/delete',\ntype: 'DELETE',\ndata: JSON.stringify({\n id: id\n\n }),\n contentType: \"application/json\",\n dataType: 'json'\n }).done(function() { console.log(\"end of delete\"); alert('Request done, Task deleted!'); })\n .fail(function() { alert('testdeletefor error'); });\n }", "title": "" } ]
[ { "docid": "00da335f338ce4df4fedce7b56a68ac7", "score": "0.8435818", "text": "function delete_task() {\n api.delete_task(task.id);\n }", "title": "" }, { "docid": "062268a45e52af972876bcf6777143c6", "score": "0.8391055", "text": "function deleteTask() {\n \n}", "title": "" }, { "docid": "1eafcd2dc171060ffab65c3dbdb44e84", "score": "0.8099464", "text": "function deleteSingleTask() {\n deleteTask(task.id, projectID, userID);\n close();\n }", "title": "" }, { "docid": "685f82b45c7a6e112aa744782943a19b", "score": "0.8017788", "text": "deleteTask (taskId) {\n this.tasks.splice(taskId,1)\n this._currentId--\n }", "title": "" }, { "docid": "3bde9b475f1d77259c5518a17e1bc8f7", "score": "0.7994568", "text": "function deleteTask(task){\n tasks.splice(tasks.indexOf(task),1);\n }", "title": "" }, { "docid": "ac13fe66fc7788d6fe1d21fa6f5fd7f9", "score": "0.7857523", "text": "function deleteTask(task) {\n var index = data.tasks.indexOf(task);\n data.tasks.splice(index, 1);\n saveTasks();\n }", "title": "" }, { "docid": "21e28d64b1e06f4a9fa77a57c5e8c763", "score": "0.7843173", "text": "remove_task() {\n if (this.task !== null) {\n // perform delete in data\n window.delete_task(this.task.id);\n }\n this.parentNode.removeChild(this)\n }", "title": "" }, { "docid": "f83bae0fda0339e932d1cbd4776a5da3", "score": "0.7802741", "text": "function deleteTask() {\n\n\tif (confirm(\"Are you sure you want to remove this task and any associated events?\")) {\n\t\tvar url = \"index.php?module=savetask&action=deleteTask&taskId=\" + curtask;\n\t\tprotoReq(url,\"writeDeleteTask\");\n\t}\n\n}", "title": "" }, { "docid": "193dd5db4950bef7a69e1696d08f6b1f", "score": "0.77730966", "text": "function deleteTask(evt) {\n // Get the DOM element representing the task\n var taskToDeleteId = evt.target.parentNode.id;\n // Remove the task from the DOM and disk\n removeTask(taskToDeleteId);\n }", "title": "" }, { "docid": "149639a945106d135b1e0ae89265c8df", "score": "0.76994205", "text": "'tasks.remove'(taskId) {\n \n Tasks.remove(taskId);\n }", "title": "" }, { "docid": "b3edfcd60f38f1568aa3b23e5400f5b0", "score": "0.7545162", "text": "function deleteTask(){\n // YOUR CODE HERE\n if(program.id){\n var id = program.id-1;\n if (id>=0 && id<data.length){\n data.splice(id, 1);\n console.log(\"Deleted task with id: \"+program.id)\n }\n } else{\n console.log(\"No task specified\")\n }\n}", "title": "" }, { "docid": "21a14db8106fdf2717cbfba9fd372946", "score": "0.7530128", "text": "async deleteTask(_id) {\n try {\n const res = await todoApi.delete(`foster/todos/${_id}`)\n this.getTask();\n } catch (error) {\n console.error(error)\n }\n }", "title": "" }, { "docid": "5767d144355c0e1eebddf5217d6ead07", "score": "0.750882", "text": "function deleteCompletedTask(task) {\n var index = data.completedTasks.indexOf(task);\n data.completedTasks.splice(index, 1);\n saveTasks();\n } //end deleteCompletedTask", "title": "" }, { "docid": "f16a7c33ac0d4f97de379f0c879e07b6", "score": "0.75061595", "text": "function onDeleteTask(event){\n deleteTask(event.target.id)\n printTasks(taskList)\n}", "title": "" }, { "docid": "73a12c27364064f0676ca11a0c3d1068", "score": "0.7504636", "text": "function deleteTask(tID) {\n\t\n\tconnection =init();\n\tconsole.log(\"Task marked for deletion: \" + tID);\n connection.query(\"DELETE FROM Tasks WHERE taskID=?;\", [tID], function (error, rows, fields) {});\n \tconnection.query(\"DELETE FROM Assigned WHERE taskID=?;\", [tID], function (error, rows, fields) {});\n \n\tvar desc = \"Deleted TaskID: \" +tID+ \" from the DB\";\n \treturn desc;\n \tconnection.end();\n}", "title": "" }, { "docid": "627e31bb15f4bacb2884f38566b67096", "score": "0.74960935", "text": "function deleteTask(e){\n task = e.target\n if(task.classList.contains('far')){\n taskSection.removeChild(task.parentElement)\n\n // DELETE FROM LOCAL STORAGE\n deleteTaskFromLocalStorage(task.parentElement)\n\n }\n}", "title": "" }, { "docid": "20a45fe2c39f643a52ffadbe1c9530cc", "score": "0.7485615", "text": "deleteTask(taskObj,callback) {\n let deletetTask = `delete from task where task_id = ${taskObj.task_id}`;\n\n this._db.run(deletetTask, function(err,resolve) {\n callback(err,resolve);\n });\n }", "title": "" }, { "docid": "e5996d567d212a37b3c00c362c5e364d", "score": "0.747718", "text": "function deleteTask (taskId) {\n\tconsole.log(\"enter into deleteTask\");\n const updatedTaskList = taskList.filter(function(task){return task.id != taskId});\n taskList = updatedTaskList;\n renderList();\n counter();\n }", "title": "" }, { "docid": "0e2e0444906f16e5581d45937dffb30b", "score": "0.74664724", "text": "function deleteProjectTask(task_id){\n stmt.text = 'DELETE FROM uploads WHERE id=' + task_id;\n state = DELETE_TASK;\n stmt.execute();\n }", "title": "" }, { "docid": "56938e94615426f8ae70ad07a194267d", "score": "0.7433062", "text": "deleteTask(task) {\n return this.taskManagerList.pop();\n }", "title": "" }, { "docid": "eddc9a844fc2f8df9c953e0a51fbe73d", "score": "0.74280596", "text": "removeTask(taskName){\n //need to find task by name, otherwise objexts arent exactyl the same\n let task = this.getTask(taskName);\n let index = this.tasks.indexOf(task);\n \n if(index === -1) return;\n\n this.tasks.splice(index, 1);\n }", "title": "" }, { "docid": "a789a8d09fe3480aef83a1efc216101b", "score": "0.734529", "text": "function taskDelete(deleteEvent){\r\n var btn = $(deleteEvent.target);\r\n var taskID = Number(btn.data(\"id\"));\r\n var taskObject = $(\"#task-\" + taskID);\r\n var callbackDelete = function(data){\r\n console.log(data);\r\n taskObject.remove();\r\n };\r\n DELETE('KanbanBoardTasks', taskID, callbackDelete);\r\n }", "title": "" }, { "docid": "06c41b1751e9c4ff29e1fec6a6df35ae", "score": "0.7336846", "text": "async function deleteTask(taskId, event) {\n // Remove task from DB\n let response = await fetch(`http://localhost:1337/task/${taskId}`, {\n method: 'DELETE'\n });\n let data = await response.json();\n \n // Remove task from screen\n let li = event.target.closest('li');\n li.parentElement.removeChild(li);\n return data;\n}", "title": "" }, { "docid": "d5ac1f6437ce4b24f751cf9f860d9aa5", "score": "0.732553", "text": "function deleteTask(taskID) {\n serverRequest.deleteTask(taskID).then((response) => {\n if(response.status == \"success\") {\n UIutils.removeTaskCard(taskID);\n } else {\n console.log(\"Error\");\n }\n });\n}", "title": "" }, { "docid": "70f259071930b797c7eeff2d8788f6b8", "score": "0.73183763", "text": "function deleteTask(taskID) {\n database\n .ref(`users/${currentUser.uid}/tasks/${taskID}`)\n .remove()\n .then(function () {\n console.log(\"task removed\");\n })\n .catch(function (error) {\n console.log(error);\n });\n }", "title": "" }, { "docid": "e5c5caaa12106cbbbcc9671c039d6756", "score": "0.72989", "text": "function deleteTask(event) {\n\tevent.target.parentElement.remove();\n}", "title": "" }, { "docid": "ba2444ad9458d0bc8aa9ec9a884a9d81", "score": "0.72972846", "text": "function deleteTask(id){\n\tlocalStorage.removeItem(id);\n\t\n\tif(id.substring(0,1) == \"t\") deleteKeyFromOpen(id);\n\telse deleteKeyFromFinished(id);\n\n\tremoveTaskFromDOM(id);\n\t$(\"#confirmModal\").modal(\"hide\");\n\tupdateTaskContainers();\n}", "title": "" }, { "docid": "fd23348b70f6ffe3a5ef80e37512a850", "score": "0.72885245", "text": "function removeTask(event) {\n var taskToDelete = event.target.parentElement.parentElement;\n var taskId = taskToDelete.dataset.noteId;\n var indexToDelete = tasks.findIndex(obj => obj.timeStamp == taskId );\n console.log( taskToDelete );\n var finishedTask = tasks[indexToDelete];\n removeFromLS( indexToDelete );\n\n saveToLS( 'finished', finishedTask );\n taskToDelete.remove();\n}", "title": "" }, { "docid": "fec21836b119083477a3d1f6a7de8b67", "score": "0.72379154", "text": "function deleteTaskOnClick(elem) {\n let id = Number(elem.dataset.id);\n\n let task = readOneTask(taskStore, id, function (task) {\n\n let completedTask = new CompletedTask(task.title);\n addTask(completedTaskStore, completedTask, function () {\n elem.classList.add(\"exit\");\n\n elem.addEventListener(\"animationend\", function () {\n deleteTask(taskStore, id, function () {\n let amountOfTasks = Number(loadData(\"TotalTasks\")) - 1;\n saveData(\"TotalTasks\", amountOfTasks);\n totalTasks.innerHTML = loadData(\"TotalTasks\");\n\n let amountOfCompleted = Number(loadData(\"CompletedTasks\")) + 1;\n saveData(\"CompletedTasks\", amountOfCompleted);\n completedTasks.innerHTML = loadData(\"CompletedTasks\");\n updateTasks();\n });\n });\n });\n });\n}", "title": "" }, { "docid": "f367c7eae302e83205039b776bdde5de", "score": "0.7226336", "text": "deleteTask(targetId) {\n\t\tfor (let i = 0; i < this.tasks.length; i++) {\n\t\t\tif (this.tasks[i].currentId === targetId) {\n\t\t\t\tthis.tasks.splice(i, 1);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2c7727a607bf382af4dc609e3e26e586", "score": "0.7217681", "text": "removeTask(task) {\n // if there is no id all we can do is find the same\n // instance of the task, but if we have an id we can\n // look up the task by id - even if not the same instance\n // of the task that is in the list.\n t = task;\n if (task.hasId()) {\n t = this.findTask(task.getId())\n }\n var i = this.tasks.indexOf(t);\n if (i >= 0) {\n this.tasks.splice(i,1);\n }\n }", "title": "" }, { "docid": "f04336a2e120c1ed38ef0114cea35a09", "score": "0.7216953", "text": "function deleteTask() {\n // alert(\"delete\");\n const taskElement = event.target.closest(\".delete\"); // Searches for the delete button most recently clicked\n // alert(\"del2\");\n let delIdArr = taskElement.id.split(\"_\");\n // alert(\"del3\");\n let retreiveId = delIdArr[1];\n // alert(retreiveId);\n taskList.deleteTask(retreiveId);\n // alert(\"d\");\n // Delete the list row from the ul\n // let task_row = `#taskRow_${retreiveId}`;\n // var tRow = document.querySelector(task_row);\n // tRow.parentNode.removeChild(tRow);\n displayAllTasksFromStorage(listOfCards, openEditModal, deleteTask);\n}", "title": "" }, { "docid": "54fb59114dff65cff37ec1577c8ecc06", "score": "0.72157043", "text": "function deleteTask(e) {\n //prevent default action\n e.preventDefault();\n // get currantTask forme data storage\n const currantTask = TaskControl.getCurrateTask();\n //delete currantTask forme data storage\n const deletedTask = TaskControl.deleteTask(currantTask);\n //deleting task frome loacalStorage\n StorageControl.deleteTask(deletedTask);\n //count deliting task\n const totalTask = TaskControl.getTotalTaskCount();\n //show deliting task\n ui.showTotalTaskCount(totalTask);\n //count deliting completedTask\n const completdTaskCoutn = TaskControl.getCompletedTaskCount();\n //show deliting completedTask in ui\n ui.showCompletedTask(completdTaskCoutn);\n //get task\n const tasks = TaskControl.getTask();\n //show updatedTask in the ui\n ui.populateTask(tasks);\n //clear feild\n ui.clearField();\n //clear edit stae\n ui.clearEditState();\n //showing masage\n ui.showMsg(\"your task has been deleted\", \"danger\");\n }", "title": "" }, { "docid": "197f5c769b2bf4ac0d12e33690a15640", "score": "0.72104263", "text": "deleteTask(ref) {\n this.tasks.$remove(ref).then((ref)=>{\n this.$log.info(\"Task deleted @ firebase\", ref.key());\n });\n }", "title": "" }, { "docid": "28648f5d0796bc98dfe831a6c2ce18fb", "score": "0.71823335", "text": "deleteTask(element){\n \n if(element.name === \"delete\" || element.name === \"complete\"){\n if(element.name === \"delete\"){\n //console.log(\"delete\")\n element.parentElement.parentElement.parentElement.remove()\n // mostrar mnensaje para eliminar\n \n this.showMessage(\"Task Deleted Successfully\", \"danger\", \"fa-calendar-times\")\n }\n if(element.name === \"complete\"){\n //console.log(\"delete\")\n element.parentElement.parentElement.parentElement.remove()\n // mostrar mnensaje para eliminar\n \n this.showMessage(\"Task Completed Successfully\", \"warning\", \"fa-trophy\" )\n countTaskW(1)\n }\n countTask(-1)\n }\n\n \n }", "title": "" }, { "docid": "c50f295e48b73285c175f36156890f3b", "score": "0.7179999", "text": "finish_task() {\n\n let no_task = read_taskdone[1];\n //query delete task dari database\n\n //DEBUG\n return(\"Masuk finish_task\");\n }", "title": "" }, { "docid": "91e8ece9ed6061fc0b2f860d71cc8134", "score": "0.71772414", "text": "function deleteTask(evt)\n{\n\tvar delete_task = evt.target.task;\n\tvar xhttp = new XMLHttpRequest();\n\n\txhttp.open(\"DELETE\", HOSTURL, true);\n\txhttp.setRequestHeader('Content-Type', 'application/json');\n\n\txhttp.onreadystatechange = function()\n\t{\n\t\tif (this.readyState == 4 && this.status == 200)\n\t\t{\n\t\t\tevt.target.parent.style.display = \"none\";\n\t\t\tconsole.log(this.responseText);\n\t\t}\n\t};\n\n\txhttp.send(JSON.stringify({ task: delete_task }));\n}", "title": "" }, { "docid": "9b4be43953f20976c71b0eae48b8e915", "score": "0.7134585", "text": "async delete({ id }) {\n\t\t\tmodels.tasks = models.tasks.filter((task) => {\n\t\t\t\treturn task.id != id;\n\t\t\t})\n\t\t}", "title": "" }, { "docid": "e36475a634a1a7c9e3a8dbd244b8b03d", "score": "0.71240896", "text": "static deleteTask(req, res, next){\n let id = req.params.id\n Task.destroy({where:{id}})\n .then(data=>{\n res.status(200).json({message: `Task with ID ${id} has been delete`})\n })\n .catch(err=>{\n next(err)\n })\n }", "title": "" }, { "docid": "a7787656236e922a32bc90c09fd14765", "score": "0.7122395", "text": "function trashTask() {\n list.deleteTask(list.getTask(helper.getActiveTaskId()));\n helper.deactivateActiveTaskElement();\n helper.updateTasksInStorage();\n helper.updateTasks();\n}", "title": "" }, { "docid": "2edf64975c100228a7e1dcb78a76be37", "score": "0.7115432", "text": "function deleteTask(event){\n event.preventDefault();\n const id = $( this ).data( 'id' );\n console.log( 'in deleteTask:', id );\n $.ajax({\n type: 'DELETE',\n url: `/tasks/${ id }`\n }).then( function( response ){\n console.log( 'back from DELETE:', response );\n getTasks();\n }).catch( function( err ){\n alert( 'Error with Delete:', err );\n })\n}", "title": "" }, { "docid": "cf18545d239aebc21ee713b048f2446f", "score": "0.7097847", "text": "function deleteTask(taskID) {\n var taskRef = database.ref(loggedInUserID + '/tasks/' + taskID);\n return taskRef.remove();\n}", "title": "" }, { "docid": "36d36f1babe062f2f7e553e1b4c60ce2", "score": "0.7091292", "text": "function deleteTask(task) {\n var indexOfTask = -2;\n tasksArray.find(function (element, index) {\n if (element === task) {\n indexOfTask = index;\n return true;\n }\n });\n if (indexOfTask !== -2) {\n tasksArray.splice(indexOfTask, 1);\n }\n console.log('Task \\\"' + task + '\\\" removed from the list');\n console.log('Number of items:' + tasksArray.length);\n}", "title": "" }, { "docid": "080b1883bb83a532f41081fa982627ba", "score": "0.7054843", "text": "async actionDeleteTask({ request , response }){\n\n const task = await Task.find(request.input('id'))\n await task.delete()\n\n return response.route('/tasks1')\n }", "title": "" }, { "docid": "94fe4cfd378735a258d5f62083fa5b31", "score": "0.70321417", "text": "function taskDel(e){\n let id = e.value;\n let user = firebase.auth().currentUser;\n db.collection(\"users\").doc(user.uid).collection(\"tasks\").doc(id).update({\n deleted: true\n });\n taskUpdate(user);\n}", "title": "" }, { "docid": "f90fa0b523c3ed3dee2f430ec6da76f4", "score": "0.7024065", "text": "remove_task(id) {\n $.ajax(\"/api/v1/tasks/\" + id, {\n method: \"delete\",\n dataType: \"json\",\n contentType: \"application/json; charset=UTF-8\",\n data: \"\",\n success: (_resp) => {\n this.fetch_tasks();\n }\n });\n }", "title": "" }, { "docid": "3773b6f269abd76a0b1c70d1e8a2b68b", "score": "0.7022787", "text": "deleteTask(taskId) {\n // Create an empty array and store it in a new variable, newTasks\n const newTasks = [];\n\n // Loop over the tasks\n for (let i = 0; i < this.tasks.length; i++) {\n // Get the current task in the loop\n const task = this.tasks[i];\n\n // Check if the task id is not the task id passed in as a parameter\n if (task.id !== taskId) {\n // Push the task to the newTasks array\n newTasks.push(task);\n }\n }\n\n // Set this.tasks to newTasks\n this.tasks = newTasks;\n }", "title": "" }, { "docid": "f463799995eb9b9a6d67157c457dbda6", "score": "0.70157313", "text": "function destroyTask (id) {\n var task = tasks.get(id)\n\n task.tabs.forEach(function (tab) {\n webviews.destroy(tab.id)\n })\n\n tasks.destroy(id)\n}", "title": "" }, { "docid": "6e7e1e1c76ea5d0357f42b129257dfb9", "score": "0.6998765", "text": "function deleteTask(id) {\n for (var i = 0; i < list.length; i++) {\n if (list[i][0] == id) {\n var removedTask = list.splice(i, 1);\n saveList();\n console.log(\"You removed task: \" + removedTask);\n\n deleteButton.classList.remove(\"active\");\n deleteButton.classList.add(\"disabled\");\n statusButton.classList.remove(\"active\");\n statusButton.classList.add(\"disabled\");\n }\n }\n }", "title": "" }, { "docid": "3b7e696de8c3ddfe1204fb6a087d9ff2", "score": "0.6976229", "text": "function removeTask(){\n this.parentNode.parentNode.removeChild(this.parentNode);\n}", "title": "" }, { "docid": "b14a15844f1a5308d7bdd0e1c582adfb", "score": "0.69653946", "text": "function deleteRuns(collection, name, task, callback) {\n\tcollection.remove({name: name, task: task}, callback);\n}", "title": "" }, { "docid": "91ae2fb8afa6523c7baf04e65cbe3149", "score": "0.6961966", "text": "function handlerRemove() {\r\n deleteTask(task.taskId, userUid, clearToast, displayToast);\r\n onCancel();\r\n }", "title": "" }, { "docid": "efa342252a20905ed814f9aae05aa820", "score": "0.69512314", "text": "removeTask(id) {\r\n if(!id) return Promise.reject(\"Please provide an Id for removing the respective task.\");\r\n //console.log(\"removeTask1\\n\");\r\n return todoItems().then((todoCollection) => {\r\n //console.log(\"removeTask2\\n\");\r\n return todoCollection\r\n .removeOne({_id: id})\r\n .then((deletedInfo) => {\r\n //console.log(\"deletedInfo\\n\");\r\n //console.log(deletedInfo);\r\n if(deletedInfo.deletedCount === 0) {\r\n throw(`Could not delete task with id of ${id}`);\r\n }\r\n });\r\n });\r\n }", "title": "" }, { "docid": "85892129eeed73bf6b78fbe3860a53da", "score": "0.6947445", "text": "function deleteTasks(task) {\n\n if (confirm(\"are you sure you want to delete this task\")) {\n // Delete data from database\n deleteData(task.classList[0]);\n\n setTimeout(function () {\n // Reload to update page\n location.reload();\n }, 50);\n }\n}", "title": "" }, { "docid": "b8aea8d7e9a68daaa54048823d908d6c", "score": "0.6934195", "text": "'click .delete'() {\n Tasks.remove(this._id);\n }", "title": "" }, { "docid": "589f4b7a302641f2d5351301354b31e3", "score": "0.6917673", "text": "function removeTask(idtask){\n\n // DELETE /api/tasks/{id}\n $.ajax('/api/tasks/'+idtask, {\n type: \"DELETE\",\n accepts: 'application/json',\n dataType: 'json',\n error: function(jqXHR,textStatus,error){},\n success: function(data, textStatus, jqXHR){\n loadTasks();\n }\n });\n}", "title": "" }, { "docid": "8535b15f4d5ae8a5c2bc629d8a81f6d4", "score": "0.6916498", "text": "removeTask(id) {\n\t\n\t\tconst row = this.#listContainer.querySelector(`tr[data-identity = \"${id}\"]`);\n row.remove();\n\n if (this.#numtasks == 0) {\n this.noTask();\n }\n this.#numtaskMessage();\n\t}", "title": "" }, { "docid": "9067f69e723d63b19db9c71147804185", "score": "0.69094306", "text": "function deleteTask(id) {\n console.log(\"Received id for deleting.\" + id);\n const updatedArr = tasksArray.filter((task) => task.id !== id);\n settasksArray(updatedArr);\n }", "title": "" }, { "docid": "3f57c6e7071644c6678f344ed1b89028", "score": "0.6908089", "text": "function removeTask(id) {\n for (var i = 0; i < tasks.length; i++) {\n var task = tasks[i];\n clearInterval(task.task);\n tasks.splice(i, 1);\n }\n}", "title": "" }, { "docid": "42ae2612d6fe307fe945063816a20443", "score": "0.69080675", "text": "removeTask(task) {\n return new Promise((resolve, reject) => {\n if (!task) return reject(new Error('Task is not defined'))\n\n this.getTasks().then(tasks => {\n tasks.splice(tasks.findIndex(_task => _task.id = task.id), 1)\n this.cacheTasks(tasks)\n return resolve(`Task ${task.id} has been removed`)\n }).catch(e => reject(e))\n })\n }", "title": "" }, { "docid": "c4c9c7fc321e146763886d3d4194f9f1", "score": "0.6906632", "text": "function deleteTask(array, task) {\n var index = array.indexOf(task);\n array.splice(index, 1);\n console.log(task + \" removed from the tasklist\");\n console.log(array.length);\n return array.length;\n}", "title": "" }, { "docid": "e82b29f6167f9bc23554cc662bc9d2b1", "score": "0.6900542", "text": "function deleteTask(req, res) {\n const id = req.params.taskId;\n const updateObject = req.body;\n Task.remove({ _id:id }) // pass entire object\n .exec()\n .then(() => {\n res.status(200).json({\n success: true,\n message: 'Task is removed',\n });\n })\n .catch((err) => {\n res.status(500).json({\n success: false,\n message: 'Server error. Please try again.'\n });\n });\n}", "title": "" }, { "docid": "0e111c9f887131df872b8fe9bf269947", "score": "0.6895557", "text": "function deleteTask(){\n console.log('in deleteTask', $(this));\n\n const taskId = $(this).parents('tr').data('id')\n console.log(taskId);\n $.ajax ({\n type: 'DELETE',\n url: `/tasks/${taskId}`,\n }).then((response) => {\n console.log(response);\n getTasks();\n }).catch((error) => {\n console.log('error in DELETE!', error);\n alert('Unable to delete task!');\n })\n}", "title": "" }, { "docid": "8e1644c017dcefb9e5184b3f5ea783ff", "score": "0.6889391", "text": "removeTask(index) {\n if (this._tasks[index] !== undefined)\n this._tasks.splice(index, 1);\n }", "title": "" }, { "docid": "7754bb886f78e0019fdb83e32de5cad9", "score": "0.6889249", "text": "removeTask(taskName) {\n if (taskName === null || taskName === undefined) {\n throw new Error(\"Missing task name\");\n }\n this.throwIfInProgress();\n delete this.taskMap[taskName];\n }", "title": "" }, { "docid": "dccffe8d17154b2fb9982f7086d75075", "score": "0.68855363", "text": "function DeleteUnassignTask(task) {\n return $resource(_URLS.BASE_API + 'task/deleteTask/' + task.id + _URLS.TOKEN_API + $localStorage.token, {\n enable : 0,\n _method : \"POST\"\n }, {\n fetch: 'JSONP',\n 'query': {\n method: 'POST',\n isArray: false\n }\n }).query().$promise;\n }", "title": "" }, { "docid": "130da193899fa7c4d35710a083e37e4a", "score": "0.6876911", "text": "deleteTask(taskId) {\n this.props.onToDoDeleted(taskId);\n }", "title": "" }, { "docid": "cfd2cde054f0ca722a37c00ffdaca2eb", "score": "0.68678284", "text": "function deleteTutors(task) {\n const params = new URLSearchParams();\n params.append('id', task.id);\n fetch('/delete-tutors', {method: 'POST', body: params});\n}", "title": "" }, { "docid": "10378a3e2ea463cb8f12b2f319806ca3", "score": "0.6845195", "text": "function deleteTask(event) {\r\n const li = event.target.closest(\"li\");\r\n localStorage.removeItem(li.id);\r\n li.remove();\r\n countActiveTasks();\r\n}", "title": "" }, { "docid": "1ac64b6aa4eb989a7ddd9a9b1a1f4525", "score": "0.68365735", "text": "deleteTask(id) {\n // Create an empty array and store it in a new variable, newTasks\n const newTasks = [];\n\n // Loop over the tasks\n for (let i = 0; i < this.tasks.length; i++) {\n // Get the current task in the loop\n const task = this.tasks[i];\n\n // Check if the task id is not the task id passed in as a parameter\n if (task.id !== id) {\n // Push the task to the newTasks array\n newTasks.push(task);\n }\n }\n\n // Set this.tasks to newTasks\n this.tasks = newTasks;\n }", "title": "" }, { "docid": "27466e92fcc6b0904cb1bb33d1e8406e", "score": "0.68357337", "text": "function deleteTask(){\n axios.delete(`http://localhost:8000/api/tasks/${show.TaskID}`)\n .then((response)=>{ \n setList(response.data.data)\n handleClose()\n })\n .catch((error)=>{\n console.log(error)\n })\n }", "title": "" }, { "docid": "4c41a2166542849b5b2acf9205609bde", "score": "0.68340874", "text": "function deleteTask(deleteElement)\n{\n\tvar liElement = deleteElement.parent();\n\tvar ulElement = liElement.parent();\n\tvar taskId = liElement.attr('id');\n\tvar listId = liElement.attr('rel');\n\n\tif (ulElement.children('li').length == 1 && liElement.find('.checked').length == 1)\n\t{\n\t\tvar hElement = ulElement.prev();\n\n\t\tif (hElement.is('h3'))\n\t\t\thElement.remove();\n\n\t\tulElement.remove();\n\t}\n\n\tliElement.remove();\n\n\twunderlist.deleteTaskById(taskId, listId);\n\n\t$('div#note a#cancel-note').click();\n\n\tfilters.updateBadges();\n}", "title": "" }, { "docid": "e7d21c9a215d3dfa853a6b5b0b31164e", "score": "0.6828303", "text": "removeTask(index){\n\n this.tasks.splice(index, 1);\n\n }", "title": "" }, { "docid": "d0709b606082a25f3991ea4cde055ec6", "score": "0.6824724", "text": "function deleteTask(id) {\n alert(\"Task id \" + id + \" was deleted\");\n\n //create a clone of the array, and return the data that is different of the array you are clicking\n let cloneTasks = tasks.filter(function (val) {\n return val.id != id;\n });\n\n //set setTasks to new values\n setTasks(cloneTasks);\n\n //updating the tasks\n (async () => {\n try {\n await AsyncStorage.setItem(\"tasks\", JSON.stringify(cloneTasks));\n } catch (error) {}\n })();\n }", "title": "" }, { "docid": "20399baa369ce9965e4fe31c64b80d80", "score": "0.6808126", "text": "function task_delete(task_id) {\n $.ajax({\n url: fg_info.apiserver_url + '/tasks/' + task_id,\n headers: {\n \"Authorization\":\"Bearer \" + fg_info.token,\n },\n type: \"DELETE\",\n cache: false,\n dataType: \"json\",\n async: false\n }).fail(function(xhr, statusText, err) {\n api_return_code = xhr.status;\n api_result = {\n 'message': 'Failed to delete infrastructure having id '\n + task_id + '(' + api_return_code + ')'\n };\n console.log('fail: ' + xhr.status + '-' + statusText + '-' + err );\n }).success(function(data, statusText, xhr) {\n api_return_code = xhr.status;\n api_result = data;\n console.log(\"success:\" + api_return_code);\n });\n}", "title": "" }, { "docid": "94776e6c49dec3914dd030739a911e54", "score": "0.6803085", "text": "async delete(req,res){\n\t\t//Handle the try catch error\n\t\ttry\n\t\t{\n\t\t\t// Validate Request\n\t\t\tif(!req.params.taskId) {\n\t\t\t\treturn res.status(400).send({\n\t\t\t\t\tmessage: \"Task id can not be empty\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tlet result = await taskModelObject.delete(req.params.taskId).then( task => {\n\t\t\t\tif(!task) {\n\t\t\t\t\treturn res.status(404).send({\n\t\t\t\t\t\tmessage: \"task not found with id \" + req.params.noteId\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tres.send({message: \"task deleted successfully!\"});\t\t\t\n\t\t\t}).catch(err => {\n\t\t\t\tres.send(result);\t\n\t\t\t});\n\t\t\t\n\t\t} catch(e) {\n\t\t\tres.send(\"Something went wrong!\");\n\t\t}\n\t}", "title": "" }, { "docid": "d3bd6936b0624049344126c9a544ead7", "score": "0.6800005", "text": "function deleteTask(event, title) {\n let taskToRemove\n let tasks = activeList.taskList.filter(function (task, index) {\n if (task.title === title) {\n taskToRemove = task;\n activeList.taskList.splice(index, 1);\n return false;\n } else {\n return true;\n }\n })\n\n taskToRemove.taskElement.remove();\n saveLists()\n}", "title": "" }, { "docid": "d70d57d62644b07a951f5e9e3eaad2f4", "score": "0.6763617", "text": "function removeTask(component) {\n\tlet removeBtn = component.removeBtn;\n\tlet agreeBtn = component.agreeBtn;\n\tconsole.log(agreeBtn)\n\tdisagreeBtn = component.disagreeBtn;\n\tremoveBtn.event(\"click\", function () {\n\t\tlet taskId = this.getAttribute(\"data-value\");\n\t\tagreeBtn.event(\"click\", function (e) {\n\t\t\tlet user = JSON.parse(express.storage.getItem(\"user\"));\n\t\t\tlet tasks = user.tasks;\n\t\t\tlet task = tasks.find((tas) => tas._id === taskId);\n\t\t\tlet taskIndex = tasks.indexOf(task);\n\t\t\ttasks.splice(taskIndex, 1);\n\t\t\tuser.tasks = tasks;\n\t\t\texpress.storage.setItemAsync(\"user\", user).then(function () {\n var myTasksCom = express.getComponent(\"myTasks\");\n express.refreshComponent(myTasksCom);\n express.removeScript(\"/js/functions/counter.js\", \".dashboard\");\n \texpress.require(\"/js/functions/counter.js\", \".dashboard\");\n\t\t\t});\t\n\t\t})\n\n\t})\n}", "title": "" }, { "docid": "0ae788fdcadde712cb63492743f0da16", "score": "0.6754826", "text": "function removeTask(e) {\n\tif (e.target.classList.contains('remove-task')) {\n\t\te.target.parentElement.remove();\n\t} \n\t//Remove Task from storage\n\tremoveTaskLocalStorage(e.target.parentElement.textContent);\n}", "title": "" }, { "docid": "12c4d35946665377576caa681a2adee9", "score": "0.67523414", "text": "deleteTask(index) {\n this.taskDeleted.splice(index, 1);\n }", "title": "" }, { "docid": "d41e6d6b41aa400f26880582d79d6293", "score": "0.6748197", "text": "deleteTask(taskId) {\n if (taskId) {\n console.log(`Task item: ${taskId} has been deleted`);\n this.taskService.deleteTask(this.empId, taskId).subscribe(res => {\n this.employee = res.data;\n }, err => {\n console.log(err);\n }, () => {\n this.toDos = this.employee.toDos;\n this.done = this.employee.done;\n });\n }\n }", "title": "" }, { "docid": "c862828f051b05722dd2e0c8ff747cc0", "score": "0.67419916", "text": "function deleteTask(id) {\n \n todoList = todoList.filter(todo => todo.id != id);\n console.log('clicked it');\n saveLocal(todoList);\n}", "title": "" }, { "docid": "ca11dd6d3bb82d893b51d69265d602b1", "score": "0.67299885", "text": "function deleteTask(taskId, listId) {\n let data = {\n taskId: taskId,\n listId: listId\n };\n\n socket.emit('delete task', data);\n}", "title": "" }, { "docid": "234c96719e6d3ad552ee52c75f609390", "score": "0.671136", "text": "function _delete(id) {\n // filter out deleted user and save\n tasks = tasks.filter((x) => x.id.toString() !== id.toString());\n saveData();\n}", "title": "" }, { "docid": "be87dc863ff66b00a5eae58ed0145bd8", "score": "0.67101854", "text": "function eventDeleteTask(e, taskChoosen) {\n alert(\n \"Sure!? If you click okay, there's no way back:\\nItem will be deleted for ever.\\nBut anyway, this is a DEAD END.\\nIf you don' t click okay, you're stuck.\"\n );\n taskChoosen.remove();\n}", "title": "" }, { "docid": "00803397f9d3ad7eab63b2e6a6ec1f64", "score": "0.6703047", "text": "async deleteAssignment(taskid,txn){\n return await Assignment.query(txn).delete().where({'id':taskid})\n }", "title": "" }, { "docid": "4eefd285cc566cb74df48579eb3df46b", "score": "0.67018634", "text": "destroy(request, response) {\n Task.findByIdAndDelete(request.params.id)\n .then(result => response.json(result))\n .catch(error => response.json(error));\n }", "title": "" }, { "docid": "33ca189d0aa27be12d723a24bf5146a6", "score": "0.6681584", "text": "function removeTask(e) {\n\tif (confirm('Are you sure you want to delete this task?')) e.target.parentElement.remove();\n\n\tremoveLocal(e.target.parentElement);\n}", "title": "" }, { "docid": "0a4ad9194a5d7473cbf0cdb7fa079764", "score": "0.6680623", "text": "async destroy({ request, auth }) {\n const task = await Task.findOrFail(request.params.id);\n const user = await auth.getUser();\n\n if (task.user_id != user.id && !user.is_admin) {\n throw new UnauthorizedException(\"Não autorizado!\");\n }\n await task.delete();\n }", "title": "" }, { "docid": "6fb27aebe8936aa9aaca1606a9e8ce20", "score": "0.6674911", "text": "function handleRemoveTask(task) {\n dispatch(removeTask(task));\n }", "title": "" }, { "docid": "fb68f9460adea9c724dad93e6680d03b", "score": "0.66742295", "text": "function removeTask(id) {\n _taskList.remove(id);\n //redraw a table\n drawTasks(_taskList.tasks);\n\n if (hasLS) {\n localStorage.setItem('_taskList', JSON.stringify(_taskList));\n }\n}", "title": "" }, { "docid": "2205df323bbd8e68be22b522b11e023c", "score": "0.6642633", "text": "function removeTask(event){\n event.preventDefault;\n let formData = new FormData();\n formData.append(\"id\", event.target.value);\n fetch(removeUrl, {\n method: 'delete', \n body: formData})\n .then(response => response.json())\n .catch(error => alert(\"Removed. Fetch crashed due to \" + error));\n }", "title": "" }, { "docid": "49fb8a95569d6455c811fac1a1befcb0", "score": "0.66312885", "text": "handleDelete(e) {\n this.deleteTask(e.target.value);\n }", "title": "" }, { "docid": "9f4add0031766fcdeeceb4d73f9da608", "score": "0.6628894", "text": "function deleteTask(index) {\n //delete index number of data and only one number\n tasks.splice(index, 1);\n localStorage.setItem('tasks', JSON.stringify(tasks));\n updateDom(tasks);\n}", "title": "" }, { "docid": "7a1f168a20acdd1d99f3558090593412", "score": "0.6625809", "text": "removeTaskWithDrag (elm, passedIndex) {\n let index = this.allTasks.indexOf(elm);\n this.allTasks.splice(index,1)\n }", "title": "" }, { "docid": "09ff8cc652557a0e4af21f42e2e144bd", "score": "0.6615185", "text": "function deleteTask(taskId) {\n $.ajax({\n type: 'DELETE',\n url: `/todo/${taskId}`,\n })\n .then((deleteMsg) => {\n // DB is updated, need to update DOM\n getTasks();\n })\n .catch((err) => {\n console.log(err);\n alert('whoopsie daisy!');\n });\n}", "title": "" }, { "docid": "64c9c53daa77fab4e4b38408b51553eb", "score": "0.6602467", "text": "async deleteTask(event) {\n try {\n event.stopPropagation();\n\n this.props.handleDeleteTask(this.props.task);\n } catch (error) {\n console.log(error);\n }\n }", "title": "" }, { "docid": "ca00d50333527627e088ed77d1a52531", "score": "0.6596918", "text": "function deleteTask() {\n const element = event.target;\n let taskId = $(element).data(\"id\"); // grabbing the id off the specific button\n $.ajax({\n type: 'DELETE',\n url: \"/list/\" + taskId,\n }).then((result) => {\n $(element).parent().parent().remove(); // deleting the whole row\n console.log('Task removed.');\n }).catch((error) => {\n console.log('Error removing task.');\n });\n}", "title": "" }, { "docid": "41b508c1d14dc559c1c79663e4f1d7e3", "score": "0.6594258", "text": "function deleteTask(element) {\r\n element.parentNode.removeChild(element);\r\n\r\n let id = element.childNodes[0].innerText;\r\n\r\n let xhr = new XMLHttpRequest();\r\n\r\n xhr.open('POST', '../todo-list/php/delete-task.php', true);\r\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\r\n xhr.send('id=' + id);\r\n}", "title": "" }, { "docid": "5261b454f974d4130bd49b0e88baa0e5", "score": "0.65918726", "text": "function deleteTask(task){\n\n var liToDelete = task.closest('li');\n task.closest('ul').removeChild(liToDelete);\n\n}", "title": "" } ]
0e5d27dc6d9d9f2c25c62c1b5f13a1ce
Helper that recursively merges two data objects together.
[ { "docid": "cf1537f34f9f25f0842e677da8dc105a", "score": "0.0", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" } ]
[ { "docid": "b40a252c18ae6ac1a2d9974196776859", "score": "0.729745", "text": "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "title": "" }, { "docid": "b40a252c18ae6ac1a2d9974196776859", "score": "0.729745", "text": "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "title": "" }, { "docid": "28e5330b794d4da45e0de28ad368f3d1", "score": "0.72922087", "text": "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set$1(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "title": "" }, { "docid": "804e7ca098a5bfd88798058a4049b09f", "score": "0.72851914", "text": "function MergeRecursive(obj1, obj2) {\n for (var p in obj2) {\n try {\n if (obj2[p].constructor == Object) {\n obj1[p] = MergeRecursive(obj1[p], obj2[p]);\n } else {\n obj1[p] = obj2[p];\n }\n } catch (e) {\n obj1[p] = obj2[p];\n }\n }\n return obj1;\n}", "title": "" }, { "docid": "8cf7df6ea710d38ecbea97c52a7e2ef3", "score": "0.7261224", "text": "function mergeData (to, from) {\n\t\t var key, toVal, fromVal\n\t\t for (key in from) {\n\t\t toVal = to[key]\n\t\t fromVal = from[key]\n\t\t if (!to.hasOwnProperty(key)) {\n\t\t _.set(to, key, fromVal)\n\t\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t\t mergeData(toVal, fromVal)\n\t\t }\n\t\t }\n\t\t return to\n\t\t}", "title": "" }, { "docid": "82d965fccfb4eda01648cb421747ba75", "score": "0.7256715", "text": "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!to.hasOwnProperty(key)) {\n\t to.$add(key, fromVal)\n\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "82d965fccfb4eda01648cb421747ba75", "score": "0.7256715", "text": "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!to.hasOwnProperty(key)) {\n\t to.$add(key, fromVal)\n\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "2f1f81f7248096b54fc0249834df8a59", "score": "0.72341484", "text": "function MergeRecursive(o1, o2) {\n for ( var p in o2 ) {\n try {\n if ( o2[p].constructor == Object ) {\n o1[p] = MergeRecursive(o1[p], o2[p]);\n } else {\n o1[p] = o2[p];\n }\n } catch(e) {\n o1[p] = o2[p];\n }\n }\n\n return o1;\n}", "title": "" }, { "docid": "cbed07ad99b23516074a41e4533d9d37", "score": "0.7123417", "text": "function mergeData (to, from) {\n var key, toVal, fromVal\n for (key in from) {\n toVal = to[key]\n fromVal = from[key]\n if (!to.hasOwnProperty(key)) {\n to.$add(key, fromVal)\n } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n mergeData(toVal, fromVal)\n }\n }\n return to\n}", "title": "" }, { "docid": "cbed07ad99b23516074a41e4533d9d37", "score": "0.7123417", "text": "function mergeData (to, from) {\n var key, toVal, fromVal\n for (key in from) {\n toVal = to[key]\n fromVal = from[key]\n if (!to.hasOwnProperty(key)) {\n to.$add(key, fromVal)\n } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n mergeData(toVal, fromVal)\n }\n }\n return to\n}", "title": "" }, { "docid": "68c12da3ca645c4f124f501fb441635b", "score": "0.7108912", "text": "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal)\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "20fff07f058f6f0f007f8120a38825ff", "score": "0.70633286", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "title": "" }, { "docid": "20fff07f058f6f0f007f8120a38825ff", "score": "0.70633286", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "title": "" }, { "docid": "20fff07f058f6f0f007f8120a38825ff", "score": "0.70633286", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "title": "" }, { "docid": "e89f61f1237a2cd9f7a0cb94435d027b", "score": "0.70605797", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "title": "" }, { "docid": "4648543279f8c1a8b13c71a555d6fe1a", "score": "0.70537204", "text": "function mergeData (to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "4648543279f8c1a8b13c71a555d6fe1a", "score": "0.70537204", "text": "function mergeData (to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "4208fd7ac91964e239480a8584a1be35", "score": "0.7036381", "text": "function mergeObjects(obj1, obj2) {\n Object.keys(obj2).forEach(function(obj2key) {\n if (obj2key in obj1) {\n if (obj1[obj2key].constructor == Object) {\n // Recurse\n mergeObjects(obj1[obj2key], obj2[obj2key]);\n } else {\n // Merge value\n obj1[obj2key] = obj2[obj2key];\n }\n } else {\n // Can merge entire subtree\n obj1[obj2key] = obj2[obj2key];\n }\n });\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "a42072b141f280c286517743213f4638", "score": "0.7035379", "text": "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "b8ee888cb1e4258c3ba2b0f28e5b1c86", "score": "0.7030369", "text": "function mergeData(to, from) {\n\t\t var key = void 0,\n\t\t toVal = void 0,\n\t\t fromVal = void 0;\n\t\t for (key in from) {\n\t\t toVal = to[key];\n\t\t fromVal = from[key];\n\t\t if (!hasOwn(to, key)) {\n\t\t set(to, key, fromVal);\n\t\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t\t mergeData(toVal, fromVal);\n\t\t }\n\t\t }\n\t\t return to;\n\t\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ff9fe811552195b9e45cc4e2a9748e7", "score": "0.7027739", "text": "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "74c176ed3ed33990ba21c0a6a13c5a71", "score": "0.7012471", "text": "function mergeData(to, from) {\n\t if (!from) {\n\t return to;\n\t }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "74c176ed3ed33990ba21c0a6a13c5a71", "score": "0.7012471", "text": "function mergeData(to, from) {\n\t if (!from) {\n\t return to;\n\t }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "deb50d7587f5473a5ecd89cf48d14844", "score": "0.7003602", "text": "function mergeData(to, from) {\n\t if (!from) {\n\t return to;\n\t }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set$1(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "title": "" }, { "docid": "6ee47c9535a8d0d2e1d136e825299799", "score": "0.7002959", "text": "function mergeData (to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "e1f995bc08e2aa71485e64a6d97536f9", "score": "0.6987965", "text": "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "e1f995bc08e2aa71485e64a6d97536f9", "score": "0.6987965", "text": "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "e1f995bc08e2aa71485e64a6d97536f9", "score": "0.6987965", "text": "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "e1f995bc08e2aa71485e64a6d97536f9", "score": "0.6987965", "text": "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "e1f995bc08e2aa71485e64a6d97536f9", "score": "0.6987965", "text": "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "eccd2541dc1220c4671a9b21554a6e8c", "score": "0.6982382", "text": "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set$1(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "4abf183c64b2da7e9ef56c3470ac1bee", "score": "0.69822085", "text": "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "title": "" }, { "docid": "67ad80b39532a70eb391bee34610ecb3", "score": "0.6977313", "text": "function mergeRecursive(obj1, obj2) {\n for (var p in obj2) {\n try {\n // Property in destination object set; update its value.\n if (obj2[p].constructor == Object) {\n obj1[p] = mergeRecursive(obj1[p], obj2[p])\n } else {\n obj1[p] = obj2[p]\n }\n } catch(e) {\n // Property in destination object not set; create it and set its value.\n obj1[p] = obj2[p]\n\n }\n }\n return obj1\n}", "title": "" }, { "docid": "1ade63da44c8b07de0e713ab74e8897b", "score": "0.6976355", "text": "function mergeData(to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "title": "" }, { "docid": "b0a51518ffb6230e88c22b93fab47bfb", "score": "0.6971331", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "title": "" }, { "docid": "9f8b466d096b296186e3e123fc7ea1f5", "score": "0.69389784", "text": "function merge(a, b) {\r\n\t for (var key in b) {\r\n\t if (typeof b[key] !== 'object' || b[key] === null) {\r\n\t a[key] = b[key];\r\n\t }\r\n\t else if (Array.isArray(b[key])) {\r\n\t a[key] = (a[key] || []).concat(clone(b[key]));\r\n\t }\r\n\t else if (typeof a[key] !== 'object' || a[key] === null || Array.isArray(a[key])) {\r\n\t a[key] = merge({}, b[key]);\r\n\t }\r\n\t else {\r\n\t a[key] = merge(a[key], b[key]);\r\n\t }\r\n\t }\r\n\t return a;\r\n\t}", "title": "" }, { "docid": "d5cf1791697c81e0e3818a30459d75b8", "score": "0.69209427", "text": "function MergeRecursive(obj1, obj2) {\n for (var p in obj2) {\n try {\n // Property in destination object set; update its value.\n if (obj2[p].constructor == Object) {\n obj1[p] = MergeRecursive(obj1[p], obj2[p]);\n } else {\n obj1[p] = obj2[p];\n }\n } catch (e) {\n // Property in destination object not set; create it and set its value.\n obj1[p] = obj2[p];\n }\n }\n return obj1;\n }", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" }, { "docid": "a29c55326dfd67bdbcfcc74deae846e6", "score": "0.69208074", "text": "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "title": "" } ]
6f6eaec50ab3851e1997406325875232
Turn raw data into rich data with pictures embedded
[ { "docid": "144dcd7a648b554f2c9bc88c6916be86", "score": "0.0", "text": "function bracketizeResponse(data) {\r\n\tvar tableStr = \"<table><tr><th>Card</th><th>Round 1 batch</th><th>Round 1 opponent</th><th>Round 1 score</th><th>Round 2 batch</th><th>Round 2 opponent</th><th>Round 2 score</th></tr>\";\r\n\tfor (var row in data) {\r\n\t\ttableStr += \"<tr>\";\r\n\t\trow = data[row].c;\r\n\t\tfor (let col in row) {\r\n\t\t\titem = row[col];\r\n\t\t\telement = \"<td>\";\r\n\t\t\tif (col==0 || col==2 || col==5) {\r\n\t\t\t\tcardName = (item==null || item.v==null) ? \"\" : item.v.toString();\r\n\t\t\t\tcardName = cardName.replace(\"'\", \"\");\r\n\t\t\t\tsource = \"http://gatherer.wizards.com/Handlers/Image.ashx?name=\" + cardName + \"&type=card\";\r\n\t\t\t\t//source = \"http://magiccards.info/query?q=\" + cardName + \"&s=cname\";\r\n\t\t\t\telement += \"<a href='\" + source + \"'><img src='\" + source + \"' alt='\" + cardName + \"'></a>\";\r\n\t\t\t}\r\n\t\t\telse if (col==3) {\r\n\t\t\t\telement += (item==null || item.f==null) ? \"\" : item.f.toString();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\telement += (item==null || item.v==null) ? \"\" : item.v.toString();\r\n\t\t\t}\r\n\t\t\telement += \"</td>\";\r\n\t\t\ttableStr += element;\r\n\t\t}\r\n\t\ttableStr += \"</tr>\";\r\n\t}\r\n\ttableStr += \"</table>\";\r\n\treturn tableStr;\r\n}", "title": "" } ]
[ { "docid": "56384303d7199ccdb951989912a5d3fc", "score": "0.6245514", "text": "function setPhotoHTML(data,dataLength,id) {\n var html =\n '<div class=\"cell medium-2\">' +\n '<img height=\"H\" width=\"W\" src=\"X\">' +\n '</div>';\n for (var i = 0; i < dataLength; i++) {\n var tempHTML = html;\n var lowRes = data[i].images.low_resolution;\n tempHTML = tempHTML.replace('X',lowRes.url).replace(\"H\", lowRes.height).replace(\"W\", lowRes.width);\n id.append(tempHTML);\n console.log(\"\\n\" + tempHTML);\n }\n\n}", "title": "" }, { "docid": "8e6ca02b629acd951b232a4204fab2db", "score": "0.6042752", "text": "function mungeApod(data) {\n\treturn data.filter(item=>item.media_type === 'image').map(item => {\n\t\treturn {\n\t\t\tcopyright: item.copyright,\n\t\t\tdate: item.date,\n\t\t\texplanation: item.explanation,\n\t\t\ttitle: item.title,\n\t\t\turl: item.url\n \n\t\t};\n\t});\n}", "title": "" }, { "docid": "ae0e19095d1d98855f3768d27da53ac9", "score": "0.60418546", "text": "monogatari(data) {\n\t\tconst tale = {header: this.header(data)};\n\n\t\t// Shallow copy, as to not modify Backbone model values\n\t\tthis.dice = data.dice && data.dice.slice();\n\t\ttale.body = [\n\t\t\tsafe('<blockquote>'),\n\t\t\tthis.body(data.body),\n\t\t\tsafe(`</blockquote><small>${this.backlinks(data.backlinks)}</small>`)\n\t\t];\n\t\tif (data.mod)\n\t\t\ttale.body.unshift(safe(this.modInfo(data.mod)));\n\t\tif (data.banned)\n\t\t\ttale.body.push(safe(this.banned()));\n\t\tconst {image} = data;\n\t\tif (image) {\n\t\t\t// Larger thumbnails for thread images\n\t\t\timage.large = !data.op;\n\t\t\ttale.image = this.image(image);\n\t\t}\n\t\telse\n\t\t\ttale.image = '';\n\n\t\treturn tale;\n\t}", "title": "" }, { "docid": "cfa2e9e2fe4d8bed00fa7a66af7c74bd", "score": "0.5982917", "text": "function toContentParts(input, images) {\n let data = []\n data.push({\n pos: 1,\n content: input,\n type: \"TEXT\",\n })\n if (images) {\n for (let i = 0, len = images.length; i < len; i++) {\n data.push({\n pos: i + 2,\n content: images[i]['src'],\n type: \"IMAGE\",\n })\n }\n }\n return data\n}", "title": "" }, { "docid": "333bbda7939b6de7921c51c72314b3b7", "score": "0.59715146", "text": "function imageContent(object) {\n const imgLink = object.data;\n const imgCaption = object.caption;\n const container = el('div', 'content__image', null);\n const img = el('img', 'image__img content__img', null);\n const protection = el('div', 'image__protection', null);\n\n const imgAndProt = el('div', 'image__container', null);\n imgAndProt.appendChild(img);\n imgAndProt.appendChild(protection);\n container.appendChild(imgAndProt);\n if (imgCaption) {\n const caption = el('p', 'image__caption', asText(imgCaption));\n container.appendChild(caption);\n }\n img.setAttribute('src', imgLink);\n return container;\n}", "title": "" }, { "docid": "7a6f2ef401190325253b5f1463c2b67d", "score": "0.59526443", "text": "function renderImage(data) {\n let string = `<img src=\"${data}\"/>`\n if (!data.includes(`.JPG`)) { return ``; }\n return string;\n}", "title": "" }, { "docid": "20b9619891e0791eec2575e337708b9f", "score": "0.5846027", "text": "function getFormattedImages(imgData) {\n\n var formatLinks = \"\";\n var defaultURL = \"\";\n for (img in imgData) {\n\n defaultURL = (\"<img src=\\\"\" + imgData[img] + \"\\\" />\" + \"<br/>\");\n formatLinks += \"<br>\";\n formatLinks += defaultURL;\n }\n return formatLinks;\n }", "title": "" }, { "docid": "9a1a2ae3dae563b4fedacf645b06c1c0", "score": "0.582863", "text": "function renderImage(file){\n var reader = new FileReader();\n reader.onload = function(event){\n the_url = event.target.result\n //of course using a template library like handlebars.js is a better solution than just inserting a string\n \n // function savePin(){\n //tomar valores de los input\n var titulo = $(\"#tituloInput\").val();\n var descripcion = $(\"#descripcionInput\").val();\n //var image = $(\".image\").val();\n\n $('.movie-review blockquote').hide();\n\n //mostrar post\n $('.post').show();\n $('.post').prepend(\"<blockquote id='post_\" + idPin + \"' class='blockquote-reverse'>\" +\n \"<img src='\" + the_url + \"' alt='...'>\" +\n \"<footer>\" + titulo + \"</footer>\" +\n \"<p>\" + descripcion + \"</p>\" +\n \"</blockquote\");\n//}; \n\n}\n \n //when the file is read it triggers the onload event above.\n reader.readAsDataURL(file);\n }", "title": "" }, { "docid": "d80574f723047ca7b7d4618533a00576", "score": "0.5816561", "text": "function generateHTML(data) {\n container.innerHTML += `\n <div class='box'>\n <div class='picture'>\n <img src='${data.thumbnail.source}' alt='Display Picture'>\n </div>\n <div class='information'>\n <div>\n Name: ${data.displaytitle} <br>\n Desciption: ${data.description} \n </div>\n </div>\n </div>\n `\n}", "title": "" }, { "docid": "27f98be4ca0e32952219221771ef4a83", "score": "0.58091307", "text": "function gotData(giphy) {\n for (var i = 0; i < giphy.data.length; i++) {\n createImg(giphy.data[i].images.original.url);\n }\n}", "title": "" }, { "docid": "a8835b062c598b3367d8fc3ca628117e", "score": "0.5731476", "text": "function generateHTML(data) {\n // now we map out the data for our HTML\n data.map((person) => {\n const section = document.createElement(\"section\");\n peopleList.appendChild(section);\n section.innerHTML = `\n <img src=${person.thumbnail.source}>\n <h2>${person.title}</h2>\n <p>${person.description}</p>\n <p>${person.extract}</p>\n `;\n });\n}", "title": "" }, { "docid": "b8d83f1320c6072bb44a5781c3493b0d", "score": "0.5693327", "text": "image(data, reveal) {\n\t\tconst showThumb = this.thumbStyle !== 'hide' || reveal;\n\t\treturn parseHTML\n\t\t\t`<figure>\n\t\t\t\t${this.figcaption(data, reveal)}\n\t\t\t\t${showThumb && config.IMAGE_HATS && '<span class=\"hat\"></span>'}\n\t\t\t\t${showThumb && this.thumbnail(data)}\n\t\t\t</figure>`;\n\t}", "title": "" }, { "docid": "a11a610aa0a01742935117e8bb2c6726", "score": "0.56925505", "text": "function toImageArray(rawTextData) {\n return rawTextData.split('\\n')\n .filter(function(val) {\n return val !=+ \"\";\n }\n )\n}", "title": "" }, { "docid": "18c880bb5aa4a083b63803938d9d60f6", "score": "0.5682017", "text": "function buildPageFromData(buildData) {\n const currentData = buildData[currentStep];\n for (const bodyPart in currentData) {\n if (Object.prototype.hasOwnProperty.call(currentData, bodyPart)) {\n const bodyPartImgURL = currentData[bodyPart];\n const imgElem = createImgElement(bodyPartImgURL, bodyPart);\n imgElem.classList.add(\"pic-reel\");\n anzeigeflaeche.appendChild(imgElem);\n }\n }\n }", "title": "" }, { "docid": "90eba4bce80cc43e5577b0a2f561ac59", "score": "0.5679175", "text": "function setPicture(dados)\n{\n\n console.log('setPicture', dados);\n\n\n var obj = \"\";\n\n if (typeof dados['_link'] == 'object' && dados['_link'].value) {\n\n obj += '<a href=\"' + dados['_link'].value + '\"';\n\n if (dados['_link_target'].value) {\n obj += ' target=\"' + dados['_link_target'].value + '\"';\n }\n\n obj += '>';\n }\n\n obj += '<picture data-edit=\"true\" data-id=\"'+dados['_id']+'\"';\n \n if (dados['_css'].value) {\n obj += ' class=\"' + dados['_css'].value + '\"';\n }\n\n if (dados['_style'].value) {\n obj += ' style=\"' + dados['_style'].value + '\"';\n }\n \n obj += '>';\n \n if(typeof dados['_sources'] != 'undefined')\n {\n console.log('setPicture object ', dados['_sources']);\n for(key in dados['_sources'])\n {\n obj += '<source media=\"(max-width: '+key+'px)\" srcset=\"'+dados['_sources'][key]+'\">';\n }\n }\n\n obj += '<img src=\"'+dados['_content'].value+'\" />';\n obj += '</picture>'; \n\n if (typeof dados['_link'] == 'object' && dados['_link'].value) {\n obj += '</a>';\n }\n\n return obj;\n}", "title": "" }, { "docid": "6775c234f3fb59c8d45b89fb22671087", "score": "0.56665945", "text": "function processJsonResponse(jsonData) {\n // TODO: parse the data and grab the \"downsized url\" from the images object\n \n // TODO: create an HTML string representing an img tag linking to the url above\n \n // TODO: append the HTML string to the end of the #output div tag.\n \n}", "title": "" }, { "docid": "cb890702771a2a38c0fcd23e43fcc826", "score": "0.5617282", "text": "function fromBase64(data){\n var image = new Image();\n image.src = data;\n return image;\n}", "title": "" }, { "docid": "8ea5f66502a7d169eb17343cdc705928", "score": "0.5602042", "text": "function generatePictures(data) {\n console.log(data);\n data.photos.forEach((photo) => {\n const galleryImg = document.createElement('div');\n galleryImg.classList.add('gallery-img');\n galleryImg.innerHTML = `\n <a href=${photo.url} target=_blank>\n <img src=${photo.src.large}></img>\n </a>\n <div class='gallery-info'>\n <a href=${photo.photographer_url} target=_blank>\n <p class='link'>@${photo.photographer}<p>\n </a>\n <a href=${photo.src.original} target=_blank>Download</a>\n </div>\n `;\n gallery.appendChild(galleryImg);\n });\n}", "title": "" }, { "docid": "62e7a3190a75f35d44544cae861a3f50", "score": "0.5595497", "text": "function render(data){\n var data1 = data.data;\n data1.forEach(function(item,i){\n var gif = item.images.fixed_height.url;\n $(\"#blah\").append(\"<img src='\" + gif + \"'>\"); // mind the single vs. double quotes!\n }) \n}", "title": "" }, { "docid": "cbe07eadf4bee77c958a0f1976fb37bf", "score": "0.55915254", "text": "_imageObjToHTML(obj, authorRender) {\n const aRender = (authorRender)\n ? authorRender : this.authoringRender;\n let result;\n if (aRender)\n result = Translator.htmlTemplatesEditable.image\n .replace(\"[seq]\", obj.seq)\n .replace(\"[author]\", this.authorAttr)\n .replace(\"[path]\", obj.path)\n .replace(\"[alternative]\", obj.alternative)\n .replace(\"[title]\", (obj.title)\n ? \" title='\" + obj.title + \"'\" : \"\");\n else\n result = Translator.htmlTemplates.image\n .replace(\"[path]\", Basic.service.imageResolver(obj.path))\n .replace(\"[alt]\", (obj.title)\n ? \" alt='\" + obj.title + \"'\" : \"\");\n return result;\n }", "title": "" }, { "docid": "632297fe540500fd6bc2e3e04de540ce", "score": "0.5589871", "text": "function changeImageToTex(content) {\n var $div = $('<div>' + content + '</div>');\n $div.find('img[data-type=tex]').each(function() {\n var $span = $('<span></span>');\n var $tex = decodeURIComponent($(this).data('value'));\n $span.html('\\\\(' + $tex + '\\\\)');\n $(this).replaceWith($span);\n });\n\n return $div.html();\n}", "title": "" }, { "docid": "d25984463a7ca1280efd52a59395ba55", "score": "0.5580313", "text": "prepareDataImage(img, alt){\n return{\n src_full: img.sizes.custom_full,\n src_thumb: img.sizes.custom_thumb,\n ratio: img.sizes['custom_full-height'] / img.sizes['custom_full-width'],\n alt: alt.acf[`${this.state.language.type}_title`]\n\n }\n }", "title": "" }, { "docid": "1973eb7551676dadf77e2cb6278294c1", "score": "0.5570782", "text": "handleImage(){\n this.sliceString();\n this.post.value = this.beg + \"![Alt text]\" + this.selection + \"(http://url-to-image.com 'Image title')\" + this.end;\n }", "title": "" }, { "docid": "83485f00425e4b536e61c56f0087a41f", "score": "0.55697346", "text": "getSnapshotData() {\n const strMime = 'image/png'\n // let strDownloadMime = \"image/octet-stream\"\n const imgData = this._renderer.domElement.toDataURL(strMime)\n // imgData.replace(strMime, strDownloadMime)\n return imgData\n }", "title": "" }, { "docid": "8061963afe308f3e4220f22b98792ff2", "score": "0.55608404", "text": "function generatePictureHtml(content){\n return \"<a href=\\\"\" + content + \"\\\" target=\\\"_blank\\\">\" + content + \"</l>\" +\n \"<br>\" +\n \"<img class=\\\"chat-photo\\\" src=\\\"\" + content + \"\\\" target=\\\"_blank\\\">\";\n}", "title": "" }, { "docid": "97970238fda3f36c3f7167eebe4c604c", "score": "0.5538693", "text": "function displayData(data) {\n //From the returned json data, get the url of the picture we wanted\n var image = data.data.images.original.url;\n\n //Append picture to the page using the url provided\n $('#results').append(\"<img src='\" + image + \"'style='height:120px;width:120px;margin:25px;'/></div>\");\n }", "title": "" }, { "docid": "1a9a787588abbc21015b8cbeb60cb454", "score": "0.55256265", "text": "function titleThumb(story_data) {\n story_data.content .. @each {\n |row|\n row .. @each {\n |block|\n if (block.type === 'img')\n return block.url;\n }", "title": "" }, { "docid": "61a66d0a2c4f2a5c83643917ae3c63c7", "score": "0.5518417", "text": "function encodeImageFileAsURL(element) {\n var file = element.files[0];\n var reader = new FileReader();\n reader.onloadend = function (e) {\n let imgDataURL = e.target.result;\n base64Image = imgDataURL.split(',')[1];\n console.log(\"base64Image:\", base64Image);\n\n imgBlobURL = URL.createObjectURL(file);\n document.getElementById('previewImg').src = imgBlobURL;\n console.log(\"imgBlobURL:\", imgBlobURL);\n\n // Image => Text\n image2Text();\n\n }\n reader.readAsDataURL(file);\n}", "title": "" }, { "docid": "8366b4da502a3a816d3dc00d114e928d", "score": "0.549506", "text": "function createImageCards(data) {\n\tvar i;\n\tvar html = \"\";\n\tfor (i = 1; i < data.length; i++) {\n\t\tvar title = data[i][\"title\"];\n\t\tvar link = data[i][\"link\"];\n\t\tvar id = data[i][\"id\"];\n\n\t\thtml = html + '<div class=\"card\"><a href=\"description.php?id=' + id + '\"><img class=\"card-img-top\" src=\"' + link + '\"/>' + '<div class=\"card-body\"><h6 class=\"card-title\">' + title + '</h6></div></div></a></div>';\n\t}\n\treturn html;\n}", "title": "" }, { "docid": "127c31ee23a9210125841df5b0c183e1", "score": "0.5494649", "text": "function format (data) {\n var itemDetails = \"<div class='row'>\";\n itemDetails += \"<div class='col-md-6'><h5>Notes:<h5><p>\" + data.notes + \"</p>\";\n itemDetails += \"<div class='col-md-6'>\" + data.image + \"</div></div>\";\n return itemDetails;\n }", "title": "" }, { "docid": "0753f671c122627a837393591cbecfdb", "score": "0.54942936", "text": "function Product(props) {\n\n // INJECT image blob\n const processedImageFIles = props.getImageData.map((imgData, index) => {\n\n return (\n <div className=\"product__image-block\" key={index}>\n <img src={imgData} />\n </div>\n )\n })\n\n return processedImageFIles;\n}", "title": "" }, { "docid": "fe87eb5d695bc87432ab4d8a6f709a77", "score": "0.54941046", "text": "function parsePhotoData(data){\n\tvar desiredWidth = 300;\n\tvar desiredHeight = 240;\n\tvar dimensions = desiredWidth + 'x' + desiredHeight;\n\tvar parsedData = JSON.parse(data);\n\tvar photoUrl = '';\n\t\n\t// for now, just take the first picture\n\tif(parsedData.response.photos.count > 0){\n\t\n\t\tvar photoObj = new Object();\n\t\t\n\t\tphotoObj.prefix = parsedData[\"response\"][\"photos\"][\"items\"][0].prefix;\n\t\tphotoObj.suffix = parsedData[\"response\"][\"photos\"][\"items\"][0].suffix;\n\t\tphotoObj.width = parsedData[\"response\"][\"photos\"][\"items\"][0].width;\n\t\tphotoObj.height = parsedData[\"response\"][\"photos\"][\"items\"][0].height;\n\t\t\n\t\t// ToDo: add logic to verify height is at least at desiredWidth/desiredHeight\n\t\t\n\t\tphotoUrl = photoObj.prefix + dimensions + photoObj.suffix;\n\t}\n\treturn photoUrl;\n}", "title": "" }, { "docid": "58e0b32ee6a4d8d686da7d7bfc546ed5", "score": "0.54921305", "text": "function renderImagesFromArray(data, target) {\n var imgContainer = document.getElementById(target); \n return data.forEach(function(item) {\n var img = document.createElement('img');\n imgContainer.append(img);\n img.setAttribute('src', item.images.fixed_width.url)\n }) \n}", "title": "" }, { "docid": "cca62688de9e7cef8c434348770fa2f5", "score": "0.5472405", "text": "function displayData(data) {\n var div = document.getElementById(\"output\");\n\n if (typeof data == \"string\") {\n div.innerHTML += data + \" \";\n } else {\n showImage(data.data.embed_url);\n }\n}", "title": "" }, { "docid": "0286d40542f6b5f2967ffd34e3a885f7", "score": "0.5470664", "text": "static async getImages(data){\n const quiz = CustomQuiz.wrap(data);\n const base64Images = {};\n\n for(const question of quiz.questions){\n const { imageType, photouri } = question;\n \n try {\n if(imageType == IMAGE_TYPE.FS_URI){\n const base64Image = await FileSystem.readAsStringAsync(photouri);\n base64Images[photouri] = base64Image;\n };\n } catch(error){\n console.log('Unable to getImages');\n console.log(error);\n };\n };\n\n return { quiz, base64Images };\n }", "title": "" }, { "docid": "5f5164a79b9d210d8332a69c9bd0db5a", "score": "0.54695415", "text": "function renderPost(data) {\n element(\"post-image\").src = `https://photography-app-content.s3.amazonaws.com/${data.ref}.${data.type}`;\n element(\"poster-username\").innerHTML = data.poster;\n element(\"location\").innerHTML = data.location;\n element(\"caption\").innerHTML = data.caption;\n element(\"hearts\").innerHTML = `${data.hearts}`;\n}", "title": "" }, { "docid": "124a81b12a1ed6b85296837dbe5edd9c", "score": "0.5466782", "text": "function displayPictures(imagebundles) {\n let div = $(\"#div_pictures\");\n for (let i = 0; i < imagebundles.length; i++) {\n let imagebundle = imagebundles[i];\n div.append('<img src=\"data:image/png;base64, ' + imagebundle[\"image\"] +\n '\" /><br><p>' + imagebundle[\"text\"] + '</p>');\n }\n}", "title": "" }, { "docid": "0d4e64eec0d29ae6476308a7d80b03ce", "score": "0.5463077", "text": "function ImageLink(data) {\n /**\n *\n * @field\n * @description the JSON object exactly as is returned in the \"data\" field of the JSON responses (see API documentation: https://developers.prismic.io/documentation/UjBe8bGIJ3EKtgBZ/api-documentation#json-responses)\n */\n this.value = data;\n}", "title": "" }, { "docid": "2245c862c42b88b6ba89003af76b1f7a", "score": "0.5462542", "text": "function getSource(source){\n var images = source.querySelectorAll('img');\n var text = source.querySelector('div').textContent;\n \n //build the js object and return it.\n var data = {};\n data.text = text;\n \n data.image = [];\n \n for(var i=0;i<images.length;i++){\n var img = {}\n img.url = images[i].src\n img.x = images[i].dataset.x;\n img.y = images[i].dataset.y;\n img.h = images[i].height;\n img.w = images[i].width;\n \n data.image.push(img)\n }\n return data;\n }", "title": "" }, { "docid": "9c5efefb429ad8d73cafe2ea58db4ae8", "score": "0.5459706", "text": "function parsePicture(soup, tags)\n {\n var type = soup[3];\n //console.log(\"Picture type: \" + type);\n\n if (type !== 0 && type !== 3)\n {\n return;\n }\n\n var offset = 4;\n var mimeLength = (soup[offset] << 24) +\n (soup[offset + 1] << 16) +\n (soup[offset + 2] << 8) +\n soup[offset + 3];\n var mimeType = soup.slice(offset + 4, offset + 4 + mimeLength);\n //console.log(\"Picture MIME type: \" + mimeType);\n offset += 4 + mimeLength;\n\n var descriptionLength = (soup[offset] << 24) +\n (soup[offset + 1] << 16) +\n (soup[offset + 2] << 8) +\n soup[offset + 3];\n var description = soup.slice(offset + 4, offset + 4 + descriptionLength);\n //console.log(\"Picture description: \" + description);\n\n offset += 4 + 16;\n\n var dataLength = (soup[offset] << 24) +\n (soup[offset + 1] << 16) +\n (soup[offset + 2] << 8) +\n soup[offset + 3];\n var picBuffer = soup.slice(offset + 4, offset + 4 + dataLength);\n\n tags[\"PICTURE\"] = { \"mimeType\": mimeType, \"data\": picBuffer.toString(\"binary\") };\n }", "title": "" }, { "docid": "fcf08b1f8258ab7915e05e97e42e3dda", "score": "0.5450819", "text": "function image_result_streamization() {\n \n}", "title": "" }, { "docid": "ab64fcf3d84356246186b1d33c8bbe37", "score": "0.5448495", "text": "static blobToImage(data)\n\t{\n\t\tvar URLObj = window['URL'] || window['webkitURL'];\n\t\tvar src = URLObj.createObjectURL(data);\n\t\tvar img = new Image();\n\t\timg.src = src;\n\t\treturn img;\n\t}", "title": "" }, { "docid": "19875482af8d799e11ea813cd76baf01", "score": "0.5441882", "text": "slimTransform(data, slim){\n if(slim._hasInitialImage && !slim._imageEditor)\n return true;\n var base64 = 0;\n var large_base64 = 0;\n if(slim._data.output.image){\n var dataurl = slim._data.output.image.toDataURL(\"image/*\") ;\n var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],\n bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);\n while(n--){\n u8arr[n] = bstr.charCodeAt(n);\n }\n var file = new File([u8arr], slim._data.input.name, {type:mime});\n base64 = file;\n }\n if(slim._data.input.image){\n var inputFile = new File([slim._data.input.file], slim._data.input.name);\n large_base64 = inputFile;\n }\n this.props.onUpdateUserDetail(slim._output.name, base64);\n this.props.onUpdateUserDetail(slim._output.name+'_large', large_base64);\n console.log('Transform');\n }", "title": "" }, { "docid": "91da02d490c1424d5f71b8703cc1ca1f", "score": "0.543107", "text": "function inject_image(data) {\r\n var a = window.URL.createObjectURL(new Blob(data));\r\n img = new Image();\r\n img.src = a;\r\n $(\"body\").prepend(img);\r\n}", "title": "" }, { "docid": "06eec9cd90df1a9dfdcf5e607749224c", "score": "0.5427795", "text": "function renderImage(imageData) {\n return `<img src=\"${imageData.source}\" alt=\"${imageData.alternativeText}\" />`;\n}", "title": "" }, { "docid": "504b3e9988fb6549b7a7301d40eefe28", "score": "0.54242474", "text": "function gotData(data) {\n for (let i = 0; i < data.data.length; i++) {\n appendImage(data.data[i].images.original.url)\n numberOfThumbs ++;\n }\n}", "title": "" }, { "docid": "10ea94769cac42889c0b7c014abe50de", "score": "0.54123366", "text": "function displayOnScreen(loadedData) {\n for (var i = 0; i < loadedData.length; i++)\n if (loadedData[i] === ' ')\n loadedData[i] = '+';\n var img = document.createElement('img');\n img.src = loadedData;\n img.className = 'image-box';\n document.getElementById('container').appendChild(img);\n}", "title": "" }, { "docid": "e823b5c14b90f08ef4d46c73e211798a", "score": "0.54117274", "text": "function makeImageHtmlStringFromXMLObject(obj) {\n if ($(obj)[0] && $(obj)[0].data) {\n let data = $(obj)[0].data;\n data = data.replace(/\\\\/g, \"/\");\n let name = data.substr(data.lastIndexOf('/') + 1);\n let path = '<ac:image>' +\n '<ri:attachment ri:filename=\"' + name + '\" >' +\n '<ri:page ri:content-title=\"' + space.homepage.title + '\"/>' +\n '</ri:attachment>' +\n '</ac:image>';\n return path;\n };\n return \"\"\n }", "title": "" }, { "docid": "55ba15d5d6458fe307dd4fe86c7d528f", "score": "0.54048145", "text": "function generateUIForJSON(data){\n return `\n <div class=\"quarter\">\n <div class=\"image\">\n <img src=\"${data.picture}\"/>\n </div>\n <div class=\"info\">\n <h3>${data.name}</h3>\n <h4>${data.gender}</h3>\n <h5>${data.email}</h5>\n </div>\n </div>\n `\n}", "title": "" }, { "docid": "d24324df0fa8cfb05e710011c5f4864d", "score": "0.54011804", "text": "function parse_ImData(blob) {\n\t\tvar cf = blob.read_shift(2);\n\t\tvar env = blob.read_shift(2);\n\t\tvar lcb = blob.read_shift(4);\n\t\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\t\tblob.l += lcb;\n\t\treturn o;\n\t}", "title": "" }, { "docid": "8b13b55991aed8dcf5bc285cc3939274", "score": "0.5398411", "text": "function ImageLink(data) {\n /**\n *\n * @field\n * @description the JSON object exactly as is returned in the \"data\" field of the JSON responses (see API documentation: https://developers.prismic.io/documentation/UjBe8bGIJ3EKtgBZ/api-documentation#json-responses)\n */\n this.value = data;\n }", "title": "" }, { "docid": "007af358c3da74e07d9988e8539addbd", "score": "0.5393087", "text": "async function findPicture() {\n let response = await fetch(url + \"?\" + \"getPicture=yes\");\n let responseText = await response.text();\n let pretty = responseText.replace(/\\\\|\\[|{|}|\"|_id|insertName|]/g, \"\");\n let correction = pretty.replace(/,,,/g, \",\");\n createDataList(correction);\n }", "title": "" }, { "docid": "b07bf59c6847cd4fb22dd722f9a9c209", "score": "0.5390126", "text": "function processBase64Image(dataString) {\n var matches = dataString.match(/^data:([A-Za-z-+\\/]+);base64,(.+)$/),response = {};\n\n if (matches.length !== 3) {\n return new Error('Invalid input string');\n }\n\n response.type = matches[1];\n response.data = new Buffer(matches[2], 'base64');\n\n return response;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "16193ccc74a2c6c76b5c9d509f549cb2", "score": "0.5377215", "text": "function parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "4b2501d664203680b2101b83bc54e342", "score": "0.5376638", "text": "mostrarComics(data) {\n const { title, img } = data;\n\n this.title.innerHTML = title;\n this.image.src = img;\n if (data.alt) this.image.alt = data.alt;\n\n }", "title": "" }, { "docid": "4a85e247ff3998f7d663e8279d193e81", "score": "0.53489745", "text": "function parsePhotos(data)\n {\n\t\tcontent = \"\";\n data = data.photos.photo;\n for(i in data)\n {\n var src = 'https://farm' + data[i].farm + '.staticflickr.com/' + data[i].server + '/'+ data[i].id +'_'+ data[i].secret + '_q.jpg';\n content += '<img src=\"'+src+'\" alt=\"' + data[i].title + '\" class=\"flickr-img default-border\"/>';\n }\n $('#photo-container').append(content);\n }", "title": "" }, { "docid": "e8852981a6297266977167c4c3dd1771", "score": "0.5347295", "text": "async renderHtml(cellData, cellSize = 5, marginSize = 10) {\r\n const raw = await this.renderRaw(cellData, cellSize, marginSize);\r\n const img = document.createElement(\"img\");\r\n img.classList.add(this._options.cssClass);\r\n img.src = imageHelper_1.ImageHelper.dataToImageSource(\"image/jpeg\", raw);\r\n return img;\r\n }", "title": "" }, { "docid": "f4c210aeb9e0eee593259755d540f3ed", "score": "0.53228086", "text": "function ImgtoString(img, callback) {\n var reader = new FileReader();\n\n reader.addEventListener(\"load\", function (d) {\n let imgData = d.target.result;\n let size = 4 * (imgData.toString().length / 3);\n let imgObj = { size: (size / 1000).toFixed(2) + \"kb\", image: imgData.toString(), rawSize: size };\n callback(imgObj);\n });\n\n reader.readAsDataURL(img)\n}", "title": "" }, { "docid": "294ddc8bb487129f1df02716552a63cc", "score": "0.53166115", "text": "function images(obj) {\n let b = obj.replaceAll(\"[\", \"\")\n b = b.replaceAll(\"]\", '')\n b = b.replaceAll(\"\\'\", \"\")\n b = b.split(\",\")\n\n let img = document.createElement('img');\n img.className = \"card-img\"\n img.src = b[0]\n\n console.log(img)\n return img\n\n}", "title": "" }, { "docid": "36b31102553185b14b9f2c8c3929b037", "score": "0.53142744", "text": "function imgFilter(data) {\n\t\t\t\tthat.apprenticeLink = data.qcode.content;\n\t\t\t\t// data.covers = [{\n\t\t\t\t// \tid: 1,\n\t\t\t\t// \turl: './img/1.jpg'\n\t\t\t\t// }, {\n\t\t\t\t// \tid: 2,\n\t\t\t\t// \turl: './img/2.jpg'\n\t\t\t\t// }, {\n\t\t\t\t// \tid: 3,\n\t\t\t\t// \turl: './img/3.jpg'\n\t\t\t\t// }, {\n\t\t\t\t// \tid: 4,\n\t\t\t\t// \turl: './img/4.jpg'\n\t\t\t\t// }]\n\t\t\t\t// data.qcode = {\n\t\t\t\t// \turl: './img/qcode.png',\n\t\t\t\t// \tcontent: 'http://91atm.aa123bb.com/app/?inviter=1177161'\n\t\t\t\t// }\n\t\t\t\treturn data;\n\t\t\t}", "title": "" }, { "docid": "c744fdd546dd69c45fa0c2565f2c32d2", "score": "0.5312474", "text": "function useApiData(data) {\n document.querySelector(\"#content\").innerHTML = `\n <img src=\"${data.hits[9].recipe.image}\" />\n <ion-card-title>${data.hits[9].recipe.label}</ion-card-title>\n <ion-card-content>${data.hits[9].recipe.ingredientLines}</ion-card-content> \n `\n\n}", "title": "" }, { "docid": "1a6890caac2732ab5b9e86d6656684dc", "score": "0.5310071", "text": "function createGalleryMarkup(galleryDataArr) {\n return galleryDataArr.map(({preview, original, description}, index) => {\n return `\n <li class=\"gallery__item\">\n <a\n class=\"gallery__link\"\n href=\"${original}\"\n >\n <img\n class=\"gallery__image\"\n src=\"${preview}\"\n data-source=\"${original}\"\n data-id=\"${index}\"\n alt=\"${description}\"\n />\n </a>\n </li>\n `\n }\n ).join('');\n}", "title": "" }, { "docid": "992d07e02bf7870b5b575a444ecc3a3b", "score": "0.5299581", "text": "formatData(items) {\n // Mapping the data and Storing the temporay results in a variable\n let tempItems = items.map(item => {\n // Accessing the data inside the data.js\n let id = item.sys.id\n let images = item.fields.images.map(image => image.fields.file.url);\n let room = { ...item.fields, images, id }\n return room;\n });\n return tempItems\n }", "title": "" }, { "docid": "9037bb3ba8cf98762a05d0104a80d970", "score": "0.5285682", "text": "function loadSticker(data)\n{\n var tmp = JSON.parse(data);\n $('#searches').append('<img src=\"' + tmp.url + '\">')\n}", "title": "" }, { "docid": "a6ebed7b7f527d008a7cd2f0a04beee2", "score": "0.52772075", "text": "function preformatRawData(metaData, parser) {\n\t\t\n\t\t//downloaded citation is crap on iop journals (books are ok actually)\n// \t\tif (metaData[\"citation_type\"].search(/isbn/i) == -1) metaData[\"citation_download\"] = metaData[\"citation_download\"].replace(/(?:A1|AU)[\\t\\ ]+[\\-]+[\\t\\ ]+/g,\"BIT - \").trim();\n\t}", "title": "" }, { "docid": "d2d2b6893c0d672dde95cfd82344cf23", "score": "0.5274303", "text": "function parse_ImData(blob, length, opts) {\n\tvar tgt = blob.l + length;\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}", "title": "" }, { "docid": "77c150ef07d903a4cd9e1e7a7262a447", "score": "0.527126", "text": "function renderResult(result) {\n return `\n <img src=\"${result[1]}\" id=\"${result[0]}\" class=\"img-thumbnail\">\n `;\n}", "title": "" }, { "docid": "7cb0e807cb08473549ae418448641d9d", "score": "0.52700204", "text": "function SetImage(data) {\n let image = '';\n let description = data.main;\n if (description == 'Rain') {\n image = icons.Rain;\n } else if (description == 'Clouds') {\n image = icons.clouds;\n let clouds = data.description.split(\" \");\n if (clouds[0] == 'broken' || clouds[0] == 'few' || clouds[0] == 'scattered') {\n image = icons.partyCloudy;\n }\n } else if (description == 'Clear') {\n image = icons.sunny;\n } else if (description == 'Snow') {\n image = icons.snowy;\n } else if (description == 'Thunderstorm') {\n image = icons.thunder;\n }\n return image;\n}", "title": "" }, { "docid": "5e55067a2b65d68ea522f84efa60e8d9", "score": "0.52360773", "text": "function main() {\r\n var key = '941c445a24846dfc2afd5cf5989fba23';\r\n var photo_id = $(\"input[name=photo]\").attr('value');\r\n var right = 'data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%1F%00%00%000%08%06%00%00%00%E9T%A1%DA%00%00%00%01sRGB%00%AE%CE%1C%E9%00%00%00%06bKGD%00%FF%00%FF%00%FF%A0%BD%A7%93%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%07tIME%07%DA%07%19%10%0E%15%0F8%3B%F9%00%00%00%9CIDATX%C3%ED%D7%C1%0D%80%20%0C%05%D0%E2%CD%15%5C%C05t%16fp%0A%87%821%24%E1%EC%08p%AC3%D06%A9%D1%DF%7B%F3~%1Ah%2003%93SM%E4X%C0%81%03%07%FEn%3C%97%EE%83%E7%D2i%3Foq%00%93%B1%8B%03%B0%B2%D2%D5%98be%8A%95%D3%D5%86z%D5%B8%26%80%09.%0D%60%86K%02%98%E2%A3%01%CC%F1%91%00%AE%1B%EE%3Bcw%3BpnW%CDm%C9%B8%ADW%0Dlv%D5%D2%B1%D0%B6%CE%C3%7DA%FBW%CB%A5%8B%60%13%1C%0FH%E0%C0%81%03%07%0E%1C%F8%3F%F1%07rP%B4%C7%9A9%8BK%00%00%00%00IEND%AEB%60%82';\r\n var left = 'data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%1F%00%00%000%08%02%00%00%00f66%8D%00%00%00%01sRGB%00%AE%CE%1C%E9%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%07tIME%07%DA%07%19%10%0E%23%C0%82%AE%60%00%00%00%93IDATX%C3%ED%D6%BD%11%80%20%0C%05%E0H%E7%0A.%E0%1A%3A%0B38%85C%E1%18zg%ED%08P%C6%D6%C2%3F%84%A7%85%EF%0D%F0%E5%08%24G%A1%AA%02%8B%11d%A8S%A7%FE%81%3EL%01%A5%0FSh%FB%25%B6%80%B9O%3Fi%8D%5E%C5%8D%5E%EC%2Cvv%A3%D7%C8%08%8E%BE%D0%13%E93%3D%9D%3E%D4%B3%D0%FBz.ZU%B1%B3%FAzg%E0%B7%0A%7F%91%F0i%82o%82%C4%02%B7%5EdS%97%AE%AB%20%3Br%7B%82%D8%CE%14%FC%A5R%A7N%9D%3A%F5_%E9%2B%0F%CB%95d%D3f%97%E0%00%00%00%00IEND%AEB%60%82';\r\n\r\n $(\"<div>\").attr(\"id\",\"favourites_container\").attr('name',1).attr('delta',0).prependTo(\"#sidebar-contexts\");\r\n $(\"<h4>\").attr(\"class\",\"primary-context-label\").attr(\"id\",\"#blaha\").html(\"These people faved this photo\").appendTo('#favourites_container');\r\n $(\"#favourites_container\").click(draw(1));\r\n function draw () {\r\n\tvar page;\r\n\tif ($(this).attr('name') == '') {\r\n\t\tpage = 1;\r\n\t}\r\n\telse {\r\n\t\tpage = parseInt($(this).attr('name'));\r\n\t\tpage = page + parseInt($(this).attr('delta'));\t\t\r\n\t\t$(\"#favourites_container > div\").remove();\r\n\t\t$(\"#favourites_container > a\").remove();\r\n\t\t$(\"#navbar\").remove();\r\n\t}\r\n\t$.getJSON('http://api.flickr.com/services/rest/?method=flickr.photos.getFavorites&nojsoncallback=1&page='+page+'&per_page=30&format=json&api_key='+key+'&photo_id='+photo_id,\r\n\t\tfunction(data) {\r\n\t\t\tif (data.stat == 'ok') {\t\t\t\r\n\t\t\t\tvar num = 0;\r\n\t\t\t\twhile ((num < data.photo.person.length) && (num < 30)) {\r\n\t\t\t\t\t$(\"<a>\").attr(\"href\",'http://www.flickr.com/photos/'+data.photo.person[num].nsid).appendTo(\"#favourites_container\").append($(\"<img/>\").attr('title',data.photo.person[num].username).attr(\"src\", 'http://www.flickr.com/buddyicons/'+data.photo.person[num].nsid+'.jpg').css('margin-right','1px'));\r\n\t\t\t\t\tnum++; \r\n\t\t\t\t}\r\n\t\t\t\tif (parseInt(data.photo.total) > 30) {\r\n\t\t\t\t\t$(\"<div>\").attr(\"id\",\"navbar\").css('width','300px').insertAfter(\"#favourites_container\");\r\n\t\t\t\t\t$(\"<div>\").attr(\"id\",\"go_prev\").css('float','left').css('width','120px').appendTo('#navbar');\r\n\t\t\t\t\t$(\"<div>\").attr(\"id\",\"page_no\").css('float','left').css('text-align','center').css('width','50px').html(page+'/'+data.photo.pages).appendTo('#navbar');\r\n\t\t\t\t\t$(\"<div>\").attr(\"id\",\"go_next\").css('float','left').css('width','120px').appendTo('#navbar');\r\n\t\t\t\t\t$(\"<img>\").css('float','left').css(\"visibility\",\"hidden\").attr(\"src\",left).attr(\"id\",\"img_left\").attr('name',page).attr('delta',-1).appendTo(\"#go_prev\").click(draw);\r\n\t\t\t\t\t$(\"<img>\").css('float','right').css(\"visibility\",\"hidden\").attr(\"src\",right).attr(\"id\",\"img_right\").attr('name',page).attr('delta',1).appendTo(\"#go_next\").click(draw);\r\n\t\t\t\t\tif (page > 1) {\r\n\t\t\t\t\t\t$(\"#img_left\").css(\"visibility\",\"visible\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (page < data.photo.pages) {\r\n\t\t\t\t\t\t$(\"#img_right\").css(\"visibility\",\"visible\");\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}", "title": "" }, { "docid": "e3bd1519d652c786eec177ee19c9ecb2", "score": "0.52295494", "text": "async renderHtml(cellData, cellSize = 5, marginSize = 10) {\r\n const raw = await this.renderRaw(cellData, cellSize, marginSize);\r\n const img = document.createElement(\"img\");\r\n img.classList.add(this._options.cssClass);\r\n img.src = imageHelper_1.ImageHelper.dataToImageSource(\"image/png\", raw);\r\n return img;\r\n }", "title": "" }, { "docid": "5c08b3121520115e530740a92cfb2424", "score": "0.52283156", "text": "function formatBookData(data){\n \n var bookinfo = {};\n \n var title = data[0].title;\n var author = data[0].authors[0];\n var cover = data[0].imageLinks.thumbnail;\n \n bookinfo.title = title;\n bookinfo.author = author;\n bookinfo.cover = cover;\n \n return bookinfo;\n }", "title": "" }, { "docid": "22c6f6a3969fd40d82ae5676a5c316cc", "score": "0.52276194", "text": "formatImage(image) {\n var data;\n let reader = new FileReader();\n reader.onload = (e) => {\n data = e.target.result;\n let binary = atob(data.split(\",\")[1]);\n let array = [];\n for (var i = 0; i < binary.length; i++) {\n array.push(binary.charCodeAt(i));\n }\n let blobData = new Blob([new Uint8Array(array)], { type: \"image/jpeg\" });\n this.getPresignedURL(blobData);\n };\n reader.readAsDataURL(image);\n }", "title": "" }, { "docid": "5b7a40d8c822f001011d7f1914812a8f", "score": "0.520877", "text": "buildImages(data) {\n let images = [],\n length = data.length,\n i = 0,\n randVal = '?r=' + Math.random(), // Cache busting for testing only can be removed\n source,\n item;\n\n // Empty array?\n if (data.length == 0) {\n // This console.log() call can be removed.\n console.log('Rendering placeholders');\n // Fill the array with 10 undefines\n data.length = length = 10;\n }\n else {\n // This else branch is here just for debugging and can be removed.\n console.log(`Got data. Rendering ${length} images.`);\n }\n\n for (; i < length; i++) {\n item = data[i];\n\n // For when we actually have data\n if (item) {\n source = {\n uri : item.images.original_still.url + randVal, \n width : itemSize * Math.ceil(Math.random()*2), \n height : itemSize\n }\n }\n let flexSize = i;\n images.push(\n <Image style={{flex: flexSize, margin: 2}} \n source={source} \n defaultSource={placeholder} \n key={'img' + i}/>\n )\n }\n\n return images;\n }", "title": "" }, { "docid": "5c9054e7372b41c420b9da8039529923", "score": "0.5204151", "text": "function formattingData( clickedOn ) {\n const photo = clickedOn.firstElementChild;\n const name = photo.nextElementSibling.firstElementChild;\n const username = name.nextElementSibling.nextElementSibling.nextElementSibling; \n const userEmail = name.nextElementSibling;\n const phone = username.nextElementSibling;\n const address = phone.nextElementSibling;\n const dob = address.nextElementSibling;\n \n $('.overlay-image').attr('src', photo.getAttribute('src'));\n $('#name').text(name.textContent);\n $('#user-name').text(username.textContent);\n $('#user-mail').text(userEmail.textContent);\n $('#cell-number').text(phone.textContent);\n $('#address').text(address.textContent);\n $('#birthdate').text(dob.textContent);\n }", "title": "" }, { "docid": "b4e0121315623f3fb072f1b4f1633f71", "score": "0.5195452", "text": "function classifyImage(data) {\n // Built http request\n var http = new XMLHttpRequest();\n http.open('POST', messageEndpoint, true);\n http.setRequestHeader('Content-type', 'application/json');\n http.onreadystatechange = function () {\n if (http.readyState === 4 && http.status === 200 && http.responseText) {\n //Insert JSON Data Logic here\n //document.getElementById('results').innerHTML = http.responseText;\n document.getElementById('results').innerHTML = JSON.parse(http.responseText);\n }\n };\n\n var payload = {\n image_data: data\n };\n\n var params = JSON.stringify(payload);\n // Send request\n http.send(params);\n }", "title": "" }, { "docid": "94882a110c5a19d49798aab4b85e9125", "score": "0.51946247", "text": "function flattenProducts(data) {\n return data.map(item => {\n let image = item.image.url;\n // let image = `${url}${item.image.url}`;\n return { ...item, image };\n });\n }", "title": "" }, { "docid": "334043e3e3242bc0c3c4f90f9bfc6370", "score": "0.519255", "text": "function makeDataURI(image) {\n if (image.mime && image.data) {\n image.data = 'data:' + image.mime\n + ';base64,' + image.data;\n }\n }", "title": "" }, { "docid": "15bfb11d89c2028f387d6ad832667df0", "score": "0.51924515", "text": "function dispData(d) {\n let { data } = d;\n\n if (data.length == 0) {\n app.innerHTML = \"No result\";\n }\n data.forEach(e => {\n // console.log(e);\n\n app.innerHTML += `<img src=${e.images.downsized_medium.url}>`;\n });\n}", "title": "" }, { "docid": "05f5963acf68f8c302d9a88d4d669f93", "score": "0.519184", "text": "function useApiData(data) {\n document.querySelector(\"#content\").innerHTML += data.resource.planet\n document.querySelector(\"#content\").innerHTML += `<img src=\"${data.url}\">`;\n}", "title": "" }, { "docid": "3aa09d7814c4cf8efd85d9ac866300fb", "score": "0.5191788", "text": "function getWorks(data) {\n\t$('ul').empty();\n\tconsole.log(data);\n\tfor(var i=0; i<data.artObjects.length; i++){\n\tvar imagesLink = data.artObjects[i].webImage.url;\n\tvar images= document.createElement('img')\n images.setAttribute(\"src\", imagesLink)\n $('ul').append(images)\n\t\t}\n\t}", "title": "" }, { "docid": "f82afff2a49772e007694dc4df9ebccd", "score": "0.5189051", "text": "function preformatRawData(metaData, parser) {\n\t\t\n\t\t//parse from endnote to ris\n\t\tmetaData[\"citation_download\"] = parser.EndnoteToRis(metaData[\"citation_download\"]);\n\t}", "title": "" }, { "docid": "f65c02ca8f335d2ef28de52d87d51ec0", "score": "0.5177537", "text": "function createImg(data,index){\r\n\tvar imgMood = document.createElement(\"img\");\r\n\timgMood.setAttribute(\"alt\", \"Mood\");\r\n\tif (data[index].comment != null) {\r\n\t\timgMood.setAttribute(\"src\", \"img/Csticker\" + data[index].mood+\".jpg\");\r\n\t\timgMood.setAttribute(\"title\", data[index].comment);\r\n\t\timgMood.setAttribute(\"text\", \"*\");\r\n\t}\r\n\telse{\r\n\t\timgMood.setAttribute(\"src\", \"img/sticker\" + data[index].mood+\".jpg\");\r\n\t}\r\n\treturn imgMood;\r\n\t\r\n}", "title": "" }, { "docid": "665be776b34b277e44525665925a36ac", "score": "0.5173295", "text": "function getBase64(file) {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = function () {\n console.log(reader.result);\n imageBase64 = reader.result;\n $('#recipeImage').removeAttr('hidden');\n $(\"#recipeImage\").attr(\"src\", reader.result);\n\n\n\n };\n reader.onerror = function (error) {\n console.log('Error: ', error);\n };\n}", "title": "" }, { "docid": "a672927219bf73da2b2531c34065bb3d", "score": "0.5170231", "text": "function evalImage(node) {\n var fields = node.text.split('|');\n var image = fields[0].split(' '); // image and dimensions separated by space\n var img = document.createElement('img');\n img.src = image[0];\n if (image.length > 2) {\n img.width = image[1]; // set dimensions if exists\n img.height = image[2];\n }\n if (fields.length > 1) {\n img.title = fields[1]; // set hover text if exists\n }\n if (fields.length > 2) { // wrap in div and add caption if exists\n var caption = document.createElement('div');\n caption.textContent = caption.innerText = fields[2];\n caption.className = 'caption';\n var container = document.createElement('div');\n container.appendChild(img);\n container.appendChild(caption);\n img = container;\n }\n return img;\n}", "title": "" }, { "docid": "eb6c39dff3262e4c7b20427b4492fa55", "score": "0.5165685", "text": "function previewImagem() {\n var imagem = document.querySelector('input[name=pug]').files[0];\n var preview = document.querySelector('img');\n\n var reader = new FileReader();\n\n reader.onloadend = function() {\n preview.src = reader.result;\n }\n\n if (imagem) {\n reader.readAsDataURL(imagem);\n } else {\n preview.src = \"\";\n }\n}", "title": "" }, { "docid": "c3049b9521f6b4ba8654b616cf116f26", "score": "0.51653594", "text": "function getImageContents(user_id, type, res) {\n var query = {\n type: QueryManager.callingType.insert,\n statement: 'CALL `spGetProfilePic` ('+user_id+');'\n }\n return QueryManager.callFileManagerQuery(query, function(response) {\n if(response.status == 500) {\n return AuthController.unSuccess(res);\n }\n if(type == \"profile\") {\n return FileStream.fileStream(PathManager.profile_images+response[0].name+\".\"+response[0].extension, response[0].name, res);\n } else if(type == \"profile_tubline\") {\n return FileStream.fileStream(PathManager.profile_thumbnails+response[0].name+\".\"+response[0].extension, response[0].name, res);\n }\n })\n }", "title": "" }, { "docid": "d4467c25555b19cc8830bf29d78cc02e", "score": "0.5164777", "text": "function processInstagramData(data) {\n\tvar photos = data.data;\n\tvar startPosition = listOfPicture.length;\n\tvar output = \"\";\n\n\tif (photos) {\n\t\t$.each(photos, function(index, value) {\n\t\t\t\n\t\t\tvar cleanedLocation = Math.round(value.location.latitude * 10000) / 10000 + \",\" + Math.round(value.location.longitude * 10000) / 10000;\n\n\t\t\toutput = \"<tr data-latitude=\\\"\" + value.location.latitude + \"\\\" data-longitude=\\\"\" + value.location.longitude\n\t\t\t\t\t+ \"\\\" data-image=\\\"/images/camera.png\\\" data-shadow-image=\\\"/images/camera-shadow.png\\\">\";\n\t\t\toutput += \"<td width='20%'>\";\n\t\t\toutput += \"<div id='triggers'><img class='thumbnail' src='\" + value.images.thumbnail.url + \"' rel='#picture_tag\" + (index + startPosition) + \"'/></div>\";\n\t\t\toutput += \"<div class='simple_overlay' id='picture_tag\" + (index + startPosition) + \"'>\";\n\t\t\toutput += \"<img src='\" + value.images.standard_resolution.url + \"'/><br/>\";\n\t\t\toutput += \"<span class='photo-footer'>Photo provided by Instagram.</span>\";\n\t\t\toutput += \"</div>\";\n\t\t\t\n\t\t\toutput += \"</td>\";\n\t\t\toutput += \"<td><b>\" + value.location.name + \"</b><br/>\";\n\t\t\t\n\t\t\tif (value.caption && value.caption.text) {\n\t\t\t\toutput += value.caption.text + \"<br/>\";\n\t\t\t}\n\t\t\t\n\t\t\toutput += \"<div title=\\\"Reposition map to \" + cleanedLocation\n\t\t\t\t\t+ \"\\\" class=\\\"item-subtext-button inline\\\" style=\\\"cursor: pointer;\\\" onclick=\\\"useAddressToReposition('\" + cleanedLocation + \"')\\\">Center</div>\";\n\t\t\toutput += \"&nbsp;&nbsp;<div title=\\\"Get directions to \" + cleanedLocation\n\t\t\t\t\t+ \"\\\" class=\\\"item-subtext-button inline\\\" style=\\\"cursor: pointer;\\\" onclick=\\\"getRouteToLocation('\" + cleanedLocation + \"')\\\">Go</div>\";\n\t\t\toutput += \"</td></tr>\";\n\t\t\t\n\t\t\tlistOfPicture[index + startPosition] = output;\n\t\t});\n\t}\n\tgetPanoramio();\n}", "title": "" }, { "docid": "086c748f266cdf9fe0967752a6e1fc18", "score": "0.5164511", "text": "function showDescription(data) {\n description.classList.add(\"show\");\n console.log(data);\n const image = document.createElement(\"img\");\n image.src = data.sprites.other[\"official-artwork\"].front_default;\n document.querySelector(\"dd.image\").innerHTML = \"\";\n document.querySelector(\"dd.image\").appendChild(image);\n\n let $name = document.querySelector(\"dd.name\");\n let $poids = document.querySelector(\"dd.weight\");\n let $taille = document.querySelector(\"dd.height\");\n let $type = document.querySelector(\"dd.types\");\n $name.innerHTML = data.name;\n $poids.innerHTML = data.weight;\n $taille.innerHTML = data.height;\n $type.innerHTML = \"\";\n data.types.forEach(type => {\n let nomDuType = type.type.name\n let aucunTypeAffiché = $type.innerHTML == \"\";\n if (!aucunTypeAffiché) { $type.innerHTML += \", \" }\n $type.innerHTML += nomDuType;\n // fire, water\n });\n\n}", "title": "" }, { "docid": "403c4e69e41018d3594187387cdd9f01", "score": "0.5150882", "text": "async function t(t,r){const{data:a}=await L(t,{responseType:\"image\",...r});return a}", "title": "" }, { "docid": "5343a8a47f9baf5c009072622c5d8ee6", "score": "0.5149965", "text": "async function composeImages(backgroundb64, sticker1b64, sticker2b64, phrase) {\n\tvar completeImage = await nodeHtmlToImage({\n\t\thtml: `<html>\n\n <head>\n\t <title>Display Image</title>\n\t <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\">\n\t <link href=\"https://fonts.googleapis.com/css2?family=Lobster&display=swap\" rel=\"stylesheet\">\n </head>\n \n <body style=\"\n\t\t\t margin: 0px; \n\t\t\t width: 800px;\n\t\t\t height: fit-content;\n\t\t\t \">\n\t <div style=\"position:absolute;\">\n\t\t <img style=\"display:block; width: 800px; filter: blur(1px);\" id=\"base64image\"\n\t\t\t src=\"data:image/jpeg;base64, {{bg}}\" />\n\t </div>\n\t <div style=\"\n\t\t\t position:relative; \n\t\t\t display: flex; \n\t\t\t align-items: center; \n\t\t\t justify-content: center;\n\t\t\t padding: 20px;\n\t\t\t height: 70%;\n\t\t\t \">\n\t\t <img style=\"display:block; width:100px; height:100px;\" id=\"base64image\"\n\t\t\t src=\"data:image/jpeg;base64, {{stk1}}\" />\n\t\t <p style=\"\n\t\t\t\t font-family: 'Lobster', cursive;\n\t\t\t\t margin: 50px;\n\t\t\t\t text-align: center;\n\t\t\t\t font-size: 50px;\n\t\t\t\t text-shadow: 2px 2px yellow;\n\t\t\t\t \">\n\t\t\t{{phr}}\n\t\t </p>\n\t\t <img style=\"display:block; width:100px; height:100px;\" id=\"base64image\"\n\t\t\t src=\"data:image/jpeg;base64, {{stk2}}\" />\n\t </div>\n </body>\n \n </html>`,\n\t\tcontent: { bg: backgroundb64, stk1: sticker1b64, stk2: sticker2b64, phr: phrase }\n\t})\n\n\treturn Buffer.from(completeImage, 'binary').toString('base64')\n\n}", "title": "" }, { "docid": "4788f93bfef51bfa4d3cc597c5b700cd", "score": "0.5148924", "text": "function prepareImage(data) {\n\t\t if (data.startsWith(\"data:image\")) {\n\t\t var img = document.createElement('img');\n\t\t img.setAttribute(\"src\", data);\n\t\t img.addEventListener('load', function () {\n\t\t processImage(img);\n\t\t updateCanvas(data);\n\t\t });\n\t\t }\n\t\t else {\n\t\t alert(\"Unsupported file type\")\n\t\t }\n\t\t}", "title": "" } ]
9dff4433c5de317d9ecff5ec7118ceda
Copies src into dst, assuming both are 64bit numbers
[ { "docid": "91cec8a0dc6ef00c88995a7ab40d4610", "score": "0.8279647", "text": "function int64copy(dst, src) {\n dst.h = src.h;\n dst.l = src.l;\n }", "title": "" } ]
[ { "docid": "21f3f0fc4efd5ae80955f45cf716c561", "score": "0.8436638", "text": "function int64copy(dst, src)\n{\n dst.h = src.h;\n dst.l = src.l;\n}", "title": "" }, { "docid": "97425a735f1c8be723fffa71a5e0b2aa", "score": "0.8307576", "text": "function int64copy(dst, src) {\n\t dst.h = src.h;\n\t dst.l = src.l;\n\t }", "title": "" }, { "docid": "8b02bbaa1ce66826818382cff6535743", "score": "0.8291824", "text": "function int64copy(dst, src) {\n dst.h = src.h;\n dst.l = src.l;\n }", "title": "" }, { "docid": "4998e313b84ea94d5bd27d304dea230e", "score": "0.73415375", "text": "function store64(dst, num) {\n var hi = 0,\n lo = num >>> 0;\n if (+Math.abs(num) >= 1) {\n if (num > 0) {\n hi = (Math.min(+Math.floor(num / 4294967296), 4294967295) | 0) >>> 0;\n } else {\n hi = ~~+Math.ceil((num - +(~~num >>> 0)) / 4294967296) >>> 0;\n }\n }\n dst.push(lo & 0xff);\n lo >>>= 8;\n dst.push(lo & 0xff);\n lo >>>= 8;\n dst.push(lo & 0xff);\n lo >>>= 8;\n dst.push(lo & 0xff);\n dst.push(hi & 0xff);\n hi >>>= 8;\n dst.push(hi & 0xff);\n hi >>>= 8;\n dst.push(hi & 0xff);\n hi >>>= 8;\n dst.push(hi & 0xff);\n}", "title": "" }, { "docid": "9709f1d99382cf253ba7c51cc7eb5a2d", "score": "0.6971737", "text": "function int64add(dst, x, y) {\n var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "c626713c6bbb5490986d96a8c5785e1a", "score": "0.6969409", "text": "function int64add(dst, x, y) {\n\t var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n\t var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n\t var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n\t var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n\t dst.l = (w0 & 0xffff) | (w1 << 16);\n\t dst.h = (w2 & 0xffff) | (w3 << 16);\n\t }", "title": "" }, { "docid": "a79b12eee3a288109e836ef3aa182fc8", "score": "0.6934706", "text": "function int64add(dst, x, y)\n{\n var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n}", "title": "" }, { "docid": "1190ae03c73e546647eea66fc3ad0011", "score": "0.691367", "text": "function int64add(dst, x, y) {\n var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "1190ae03c73e546647eea66fc3ad0011", "score": "0.691367", "text": "function int64add(dst, x, y) {\n var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "1190ae03c73e546647eea66fc3ad0011", "score": "0.691367", "text": "function int64add(dst, x, y) {\n var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "b491c1b5dc6953a00e57be8719fff3ec", "score": "0.62721974", "text": "function int64shr(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift);\n }", "title": "" }, { "docid": "84a02f5eb683d1ce4da92ed6d71c5d36", "score": "0.6242887", "text": "function int64shr(dst, x, shift) {\n\t dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n\t dst.h = (x.h >>> shift);\n\t }", "title": "" }, { "docid": "0a937e6273616fb2daf246fd12be05c4", "score": "0.6231771", "text": "function int64shr(dst, x, shift)\n{\n dst.l = (x.l >>> shift) | (x.h << (32-shift));\n dst.h = (x.h >>> shift);\n}", "title": "" }, { "docid": "80071cafeea1f19d0f7b4166d509dfa4", "score": "0.6215821", "text": "function int64shr(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift);\n }", "title": "" }, { "docid": "80071cafeea1f19d0f7b4166d509dfa4", "score": "0.6215821", "text": "function int64shr(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift);\n }", "title": "" }, { "docid": "80071cafeea1f19d0f7b4166d509dfa4", "score": "0.6215821", "text": "function int64shr(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift);\n }", "title": "" }, { "docid": "12666f68574e826126371b6b3d6bae27", "score": "0.60187507", "text": "function int64add4(dst, a, b, c, d) {\n\t var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);\n\t var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);\n\t var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);\n\t var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);\n\t dst.l = (w0 & 0xffff) | (w1 << 16);\n\t dst.h = (w2 & 0xffff) | (w3 << 16);\n\t }", "title": "" }, { "docid": "b4ea9fe8cc83a3850b1d7b1d6ef5427b", "score": "0.59906477", "text": "function int64add4(dst, a, b, c, d) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);\n var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);\n var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);\n var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "ea064798cedaf8e1348511cad5e3ce9a", "score": "0.59580576", "text": "function int64add4(dst, a, b, c, d)\n{\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);\n var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);\n var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);\n var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n}", "title": "" }, { "docid": "af59d9d1058e0bc0f5048fa6b52b6cdc", "score": "0.59256226", "text": "function int64add4(dst, a, b, c, d) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);\n var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);\n var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);\n var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "af59d9d1058e0bc0f5048fa6b52b6cdc", "score": "0.59256226", "text": "function int64add4(dst, a, b, c, d) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);\n var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);\n var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);\n var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "af59d9d1058e0bc0f5048fa6b52b6cdc", "score": "0.59256226", "text": "function int64add4(dst, a, b, c, d) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);\n var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);\n var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);\n var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "8978bc6abf9bbb840eb690bc353a5c13", "score": "0.59252506", "text": "function $arrcpy(dst, src) {\n\t\tfor (var i = 0, l = src.length; i < l; i++) {\n\t\t\tdst[i] = src[i];\n\t\t}\n\t\tdst.length = src.length;\n\t\treturn dst;\n\t}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "85885a023e2f8bced448915e5756652c", "score": "0.589139", "text": "function h$hsprimitive_memcpy(dst_d, dst_o, doff, src_d, src_o, soff, len) {\n return h$primitive_memmove(dst_d, dst_o, doff, src_d, src_o, len);\n}", "title": "" }, { "docid": "cff3696e340a230c4b76c7cbbd53e016", "score": "0.58453596", "text": "function int64add5(dst, a, b, c, d, e)\n{\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff);\n var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16);\n var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16);\n var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n}", "title": "" }, { "docid": "c9fe53379e2bba8e8c3d4f8cecbf7903", "score": "0.5813889", "text": "appendInt64(high32, low32) {\n if (!Number.isInteger(high32) || !Number.isInteger(low32)) {\n throw new RangeError('value is not an integer')\n }\n if (high32 < -0x80000000 || high32 > 0x7fffffff || low32 < -0x80000000 || low32 > 0xffffffff) {\n throw new RangeError('number out of range')\n }\n low32 >>>= 0 // interpret as unsigned\n if (high32 === 0 && low32 <= 0x7fffffff) return this.appendInt32(low32)\n if (high32 === -1 && low32 >= 0x80000000) return this.appendInt32(low32 - 0x100000000)\n\n const numBytes = Math.ceil((65 - Math.clz32(high32 >= 0 ? high32 : -high32 - 1)) / 7)\n if (this.offset + numBytes > this.buf.byteLength) this.grow()\n for (let i = 0; i < 4; i++) {\n this.buf[this.offset + i] = (low32 & 0x7f) | 0x80\n low32 >>>= 7 // zero-filling right shift\n }\n this.buf[this.offset + 4] = (low32 & 0x0f) | ((high32 & 0x07) << 4) | (numBytes === 5 ? 0x00 : 0x80)\n high32 >>= 3 // sign-propagating right shift\n for (let i = 5; i < numBytes; i++) {\n this.buf[this.offset + i] = (high32 & 0x7f) | (i === numBytes - 1 ? 0x00 : 0x80)\n high32 >>= 7\n }\n this.offset += numBytes\n return numBytes\n }", "title": "" }, { "docid": "e1ff01c7cdf1b3a2048b37b35a77ae60", "score": "0.5809456", "text": "static copy(src, dst) {\n dst.left = src.left;\n dst.right = src.right;\n dst.bottom = src.bottom;\n dst.top = src.top;\n return dst;\n }", "title": "" }, { "docid": "6d12cc330be840c6447519a515276173", "score": "0.5797966", "text": "appendUint64(high32, low32) {\n if (!Number.isInteger(high32) || !Number.isInteger(low32)) {\n throw new RangeError('value is not an integer')\n }\n if (high32 < 0 || high32 > 0xffffffff || low32 < 0 || low32 > 0xffffffff) {\n throw new RangeError('number out of range')\n }\n if (high32 === 0) return this.appendUint32(low32)\n\n const numBytes = Math.ceil((64 - Math.clz32(high32)) / 7)\n if (this.offset + numBytes > this.buf.byteLength) this.grow()\n for (let i = 0; i < 4; i++) {\n this.buf[this.offset + i] = (low32 & 0x7f) | 0x80\n low32 >>>= 7 // zero-filling right shift\n }\n this.buf[this.offset + 4] = (low32 & 0x0f) | ((high32 & 0x07) << 4) | (numBytes === 5 ? 0x00 : 0x80)\n high32 >>>= 3\n for (let i = 5; i < numBytes; i++) {\n this.buf[this.offset + i] = (high32 & 0x7f) | (i === numBytes - 1 ? 0x00 : 0x80)\n high32 >>>= 7\n }\n this.offset += numBytes\n return numBytes\n }", "title": "" }, { "docid": "ca83e65844ce42357053ac6c55c82edd", "score": "0.5782916", "text": "function int64add5(dst, a, b, c, d, e) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),\n w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),\n w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),\n w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "e0e41e7831c97b83b825a09765844cef", "score": "0.576022", "text": "function int64add5(dst, a, b, c, d, e) {\n\t var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),\n\t w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),\n\t w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),\n\t w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);\n\t dst.l = (w0 & 0xffff) | (w1 << 16);\n\t dst.h = (w2 & 0xffff) | (w3 << 16);\n\t }", "title": "" }, { "docid": "52db4edfaa8cec838cda55031d46f261", "score": "0.57350165", "text": "function int64add5(dst, a, b, c, d, e) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),\n w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),\n w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),\n w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "52db4edfaa8cec838cda55031d46f261", "score": "0.57350165", "text": "function int64add5(dst, a, b, c, d, e) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),\n w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),\n w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),\n w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "52db4edfaa8cec838cda55031d46f261", "score": "0.57350165", "text": "function int64add5(dst, a, b, c, d, e) {\n var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),\n w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),\n w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),\n w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);\n dst.l = (w0 & 0xffff) | (w1 << 16);\n dst.h = (w2 & 0xffff) | (w3 << 16);\n }", "title": "" }, { "docid": "c08520d5d004ac4336c92aacb3440f23", "score": "0.5708776", "text": "function toint64(low, high) {\n return low + high * 0x100000000;\n}", "title": "" }, { "docid": "3ca38771d372bc2b0918284023025d0d", "score": "0.5666666", "text": "function divmodInt64(src) {\n var hi32 = Math.floor(src / V2E32);\n var lo32 = src - (hi32 * V2E32);\n return { hi32: hi32, lo32: lo32 };\n}", "title": "" }, { "docid": "e04517231177939534860b6070847fb4", "score": "0.56325847", "text": "function copyImage(src, dst) {\n var n = src.length;\n if (!dst || dst.length != n) {\n dst = new src.constructor(n);\n }\n while (n--) {\n dst[n] = src[n];\n }\n return dst;\n}", "title": "" }, { "docid": "71bf6738cdbe2d972e17e12aa7b31d0b", "score": "0.5607803", "text": "function int64rrot(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift) | (x.l << (32 - shift));\n }", "title": "" }, { "docid": "1ed9b9184a4a8bd2941ca2e3c6a56e2e", "score": "0.5585289", "text": "function int64rrot(dst, x, shift)\n{\n dst.l = (x.l >>> shift) | (x.h << (32-shift));\n dst.h = (x.h >>> shift) | (x.l << (32-shift));\n}", "title": "" }, { "docid": "0e64777502f7efed437a5a2a282aae50", "score": "0.55452585", "text": "function int64rrot(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift) | (x.l << (32 - shift));\n }", "title": "" }, { "docid": "0e64777502f7efed437a5a2a282aae50", "score": "0.55452585", "text": "function int64rrot(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift) | (x.l << (32 - shift));\n }", "title": "" }, { "docid": "0e64777502f7efed437a5a2a282aae50", "score": "0.55452585", "text": "function int64rrot(dst, x, shift) {\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n dst.h = (x.h >>> shift) | (x.l << (32 - shift));\n }", "title": "" }, { "docid": "d7895985cc38f30acd938b733dc18684", "score": "0.55446523", "text": "function int64rrot(dst, x, shift) {\n\t dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n\t dst.h = (x.h >>> shift) | (x.l << (32 - shift));\n\t }", "title": "" }, { "docid": "b57c5818ced7e40f82eb2920fcb90480", "score": "0.54568744", "text": "function copy(x, y) {\n let i;\n const k = x.length < y.length ? x.length : y.length;\n for (i = 0; i < k; i++)\n x[i] = y[i];\n for (i = k; i < x.length; i++)\n x[i] = 0;\n}", "title": "" }, { "docid": "ee60700645111cad0e54cfedd92778f4", "score": "0.545151", "text": "function copy_(x,y) {\r\n var i;\r\n var k=x.length<y.length ? x.length : y.length;\r\n for (i=0;i<k;i++)\r\n x[i]=y[i];\r\n for (i=k;i<x.length;i++)\r\n x[i]=0;\r\n }", "title": "" }, { "docid": "11b37aa04ee96922bc9cdb5b9266241d", "score": "0.54388726", "text": "function copy_(x, y) {\n var i;\n var k = x.length < y.length ? x.length : y.length;\n for (i = 0; i < k; i++) {\n x[i] = y[i];\n }for (i = k; i < x.length; i++) {\n x[i] = 0;\n }\n}", "title": "" }, { "docid": "39daca65da938b4e7aad625216290efa", "score": "0.54302156", "text": "function mpn_copyi(r, s, l) {\n\tfor (var i = 0; i < l; ++i) {\n\t\tr[i] = s[i];\n\t}\n}", "title": "" }, { "docid": "d71dbfed2b78b90cc221f03689ea07cb", "score": "0.54286355", "text": "function copy_(x,y) {\n var i;\n var k=x.length<y.length ? x.length : y.length;\n for (i=0;i<k;i++)\n x[i]=y[i];\n for (i=k;i<x.length;i++)\n x[i]=0;\n }", "title": "" }, { "docid": "d71dbfed2b78b90cc221f03689ea07cb", "score": "0.54286355", "text": "function copy_(x,y) {\n var i;\n var k=x.length<y.length ? x.length : y.length;\n for (i=0;i<k;i++)\n x[i]=y[i];\n for (i=k;i<x.length;i++)\n x[i]=0;\n }", "title": "" }, { "docid": "cc65fa8602d824702574860363864244", "score": "0.5400283", "text": "function int64revrrot(dst, x, shift) {\n dst.l = (x.h >>> shift) | (x.l << (32 - shift));\n dst.h = (x.l >>> shift) | (x.h << (32 - shift));\n }", "title": "" }, { "docid": "06050a53ef5d942ee9912f5601186763", "score": "0.53741914", "text": "function copyBytes(dst, src, off = 0) {\n off = Math.max(0, Math.min(off, dst.byteLength));\n const r = dst.byteLength - off;\n if (src.byteLength > r) {\n src = src.subarray(0, r);\n }\n dst.set(src, off);\n return src.byteLength;\n }", "title": "" }, { "docid": "f1340a250ad53660d95ddaa02544dd99", "score": "0.5353873", "text": "function int64revrrot(dst, x, shift)\n{\n dst.l = (x.h >>> shift) | (x.l << (32-shift));\n dst.h = (x.l >>> shift) | (x.h << (32-shift));\n}", "title": "" }, { "docid": "e63affa4c56d0c799f49db2dc71589f6", "score": "0.5349187", "text": "function multiply64x2(left, right) {\n if (!left && !right) {\n return { high: long_1.Long.fromNumber(0), low: long_1.Long.fromNumber(0) };\n }\n const leftHigh = left.shiftRightUnsigned(32);\n const leftLow = new long_1.Long(left.getLowBits(), 0);\n const rightHigh = right.shiftRightUnsigned(32);\n const rightLow = new long_1.Long(right.getLowBits(), 0);\n let productHigh = leftHigh.multiply(rightHigh);\n let productMid = leftHigh.multiply(rightLow);\n const productMid2 = leftLow.multiply(rightHigh);\n let productLow = leftLow.multiply(rightLow);\n productHigh = productHigh.add(productMid.shiftRightUnsigned(32));\n productMid = new long_1.Long(productMid.getLowBits(), 0)\n .add(productMid2)\n .add(productLow.shiftRightUnsigned(32));\n productHigh = productHigh.add(productMid.shiftRightUnsigned(32));\n productLow = productMid.shiftLeft(32).add(new long_1.Long(productLow.getLowBits(), 0));\n // Return the 128 bit result\n return { high: productHigh, low: productLow };\n }", "title": "" }, { "docid": "3904c86bc8f77ccd3a0b3d6c8a028356", "score": "0.5346915", "text": "function int64revrrot(dst, x, shift) {\n dst.l = (x.h >>> shift) | (x.l << (32 - shift));\n dst.h = (x.l >>> shift) | (x.h << (32 - shift));\n }", "title": "" }, { "docid": "3904c86bc8f77ccd3a0b3d6c8a028356", "score": "0.5346915", "text": "function int64revrrot(dst, x, shift) {\n dst.l = (x.h >>> shift) | (x.l << (32 - shift));\n dst.h = (x.l >>> shift) | (x.h << (32 - shift));\n }", "title": "" }, { "docid": "3904c86bc8f77ccd3a0b3d6c8a028356", "score": "0.5346915", "text": "function int64revrrot(dst, x, shift) {\n dst.l = (x.h >>> shift) | (x.l << (32 - shift));\n dst.h = (x.l >>> shift) | (x.h << (32 - shift));\n }", "title": "" }, { "docid": "13ba6220974775d9badfeb09051eed38", "score": "0.53443307", "text": "function copyBytes(src, dst, off = 0) {\n const r = dst.byteLength - off;\n if (src.byteLength > r) {\n src = src.subarray(0, r);\n }\n dst.set(src, off);\n return src.byteLength;\n }", "title": "" }, { "docid": "13ba6220974775d9badfeb09051eed38", "score": "0.53443307", "text": "function copyBytes(src, dst, off = 0) {\n const r = dst.byteLength - off;\n if (src.byteLength > r) {\n src = src.subarray(0, r);\n }\n dst.set(src, off);\n return src.byteLength;\n }", "title": "" }, { "docid": "623bb213b4ec6485e03aad2eacd3ff81", "score": "0.5331586", "text": "function test() {\n var b1 = new ArrayBuffer(16);\n var v1 = new Uint32Array(b1);\n var b2 = new ArrayBuffer(4);\n var v2 = new Int8Array(b2);\n var i;\n\n v2[0] = 1;\n v2[1] = 0xff;\n v2[2] = 0x7f;\n v2[3] = 0x1234;\n\n // Byte values in v2 get expanded to 32-bit values in v1.\n v1.set(v2);\n\n for (i = 0; i < v1.length; i++) { print('v1', i, v1[i]); }\n for (i = 0; i < v2.length; i++) { print('v2', i, v2[i]); }\n// print(Duktape.enc('jx', v1));\n// print(Duktape.enc('jx', v2));\n\n // NOTE: \"Same underlying buffer\" case cannot be handled as a memmove-like\n // situation because e.g. 4 bytes in the middle of a buffer may expand to\n // (up to) 32 bytes in the conversion. That 32 bytes is both \"before\" and\n // \"after\" the source:\n //\n // | ABCD | 4 bytes, source\n // |aaaaaaaabbbbbbbbccccccccdddddddd| 32 bytes, target\n //\n // The only easy solution in this case is to make an actual copy.\n\n b1 = new ArrayBuffer(16);\n for (i = 0; i < b1.byteLength; i++) { new Uint8Array(b1)[i] = 0x11; }\n for (i = 0; i < b1.byteLength; i++) { print('b1', i, new Uint8Array(b1)[i]); }\n v1 = new Int8Array(b1, 7, 4); // source: bytes [7,11[\n v2 = new Uint32Array(b1); // target: bytes [0,16[\n v1[0] = -1;\n v1[1] = 1;\n v1[2] = 0x7f;\n v1[3] = -0x80;\n for (i = 0; i < b1.byteLength; i++) { print('b1', i, new Uint8Array(b1)[i]); }\n v2.set(v1);\n for (i = 0; i < b1.byteLength; i++) { print('b1', i, new Uint8Array(b1)[i]); }\n\n // b1:\n // 11111111 11111111 11111111 11111111 initial state\n // 11111111 111111ff 017f8011 11111111 after writing to v1\n // ffffffff 01000000 7f000000 80ffffff after set()\n\n for (i = 0; i < v1.length; i++) { print('v1', i, v1[i]); }\n for (i = 0; i < v2.length; i++) { print('v2', i, v2[i]); }\n}", "title": "" }, { "docid": "e691b6b8e426114271fa7fe34fad287e", "score": "0.533136", "text": "function int64revrrot(dst, x, shift) {\n\t dst.l = (x.h >>> shift) | (x.l << (32 - shift));\n\t dst.h = (x.l >>> shift) | (x.h << (32 - shift));\n\t }", "title": "" }, { "docid": "33d45459b9407998be496bdfa277dbe3", "score": "0.5278468", "text": "function compress_ptr(old_val, low_32bits_to_set) {\r\n return itof((ftoi_hi32(old_val) << 32n) + low_32bits_to_set);\r\n}", "title": "" }, { "docid": "299d1fb8bf5164f759933d975a833ffe", "score": "0.52549005", "text": "full_u64() {\n this.throw_if_less_than(8);\n\n let val = 0;\n for (let i = 0; i < 8; i++) {\n val = val * 256 + this.buffer[this.pos];\n this.pos += 1;\n }\n return val;\n }", "title": "" }, { "docid": "b31da97669bf66898b01117ca77de455", "score": "0.52264667", "text": "function cp(dst, src, recr){\n var r;\n r = (recr === undefined) ? 1 : parseInt(recr);\n r = (r < 0) ? 0 : r;\n for(var i in src){\n var c = src[i];\n // !null && ( [object Object] || [object Array] )\n // To cut off references, clone an object for each props.\n if(c && typeof c === 'object'){\n // Make a new property.\n Object.defineProperty(dst, i, {\n value: (c.constructor) ? new (c.constructor) : {},\n configurable: true, enumerable: true, writable: true\n });\n // Prevent infinity-loop.\n r && cp(dst[i], c, r-1);\n }else{\n dst[i] = c;\n }\n c = null;\n }\n }", "title": "" }, { "docid": "4e603d6c27b92febfc85fc39c51418c5", "score": "0.52235895", "text": "function insert(source, dest, from, to) {\n from--;\n to--;\n var maskFrom = (1 << (from + 1)) - 1; // 0001 1111\n var maskTo = (1 << (to)) - 1; // 0000 0111\n var mask = maskFrom ^ maskTo; // 0001 1100\n // 1110 0011\n var zeroedSource = source & (~mask); // 1111 1000 & 1110 0011 = 1110 0000\n var zeroedDest = dest & mask; // 0000 0110 & 0001 1100 = 0000 0100\n return zeroedSource | zeroedDest; // 1110 0100\n}", "title": "" }, { "docid": "cbd1ac843f3b30109604793d1e107d76", "score": "0.5207511", "text": "function safe_add(x,y){var lsw=(x & 0xFFFF) + (y & 0xFFFF);var msw=(x >> 16) + (y >> 16) + (lsw >> 16);return msw << 16 | lsw & 0xFFFF;}", "title": "" }, { "docid": "ee744882cbd839603d982ebdc61ff0f3", "score": "0.5189271", "text": "static copyPixels(srcPixels, destImg) {\n ImgUtil.forEachPixel(destImg, rgba => rgba.forEach(i => {\n destImg.pixels[i] = srcPixels[i];\n }));\n destImg.updatePixels();\n }", "title": "" }, { "docid": "1ba1348b53f32c766d7c5d7b948963a1", "score": "0.5180638", "text": "function ADD64AA(v, a, b) {\n var o0 = v[a] + v[b];\n var o1 = v[a + 1] + v[b + 1];\n\n if (o0 >= 0x100000000) {\n o1++;\n }\n\n v[a] = o0;\n v[a + 1] = o1;\n} // 64-bit unsigned addition", "title": "" }, { "docid": "425d5f1fa3eece008380bfd11ad4ff83", "score": "0.516902", "text": "_copy(input, offset_input, output, offset_output, size) {\n for (var i = 0; i < size; i++) {\n output[offset_output + i] = input[offset_input + i];\n }\n }", "title": "" }, { "docid": "99986fb53053ecfefb79feda10e8d76f", "score": "0.5139825", "text": "function copy(src, dst) {\n\tstream.read(src).pipe(stream.write(dst))\n}", "title": "" }, { "docid": "ee6fce5daba2d8b74419de442c348e09", "score": "0.51113933", "text": "function safe_add(x, y) {\n var lsw = (x & 65535) + (y & 65535), msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }", "title": "" }, { "docid": "79876df60a8f2c86dd1343e338542529", "score": "0.51091087", "text": "function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}", "title": "" }, { "docid": "0535d39082e250e1e1b743000d2b91d7", "score": "0.51036286", "text": "function copyInt_(x,n) {\r\n var i,c;\r\n for (c=n,i=0;i<x.length;i++) {\r\n x[i]=c & mask;\r\n c>>=bpe;\r\n }\r\n }", "title": "" }, { "docid": "0571b971023e10bdcb8ab3d3a4170df3", "score": "0.50923604", "text": "function copyInt_(x,n) {\n var i,c;\n for (c=n,i=0;i<x.length;i++) {\n x[i]=c & mask;\n c>>=bpe;\n }\n }", "title": "" }, { "docid": "0571b971023e10bdcb8ab3d3a4170df3", "score": "0.50923604", "text": "function copyInt_(x,n) {\n var i,c;\n for (c=n,i=0;i<x.length;i++) {\n x[i]=c & mask;\n c>>=bpe;\n }\n }", "title": "" }, { "docid": "b537bda08f044faf32404ea7ae9f69f0", "score": "0.50910676", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b];\n var o1 = v[a + 1] + v[b + 1];\n if (o0 >= 0x100000000) {\n o1++;\n }\n v[a] = o0;\n v[a + 1] = o1;\n}", "title": "" }, { "docid": "d5777169487f6c8cf540fd8ebd511d33", "score": "0.50799006", "text": "function ADD64AA(v, a, b) {\n var o0 = v[a] + v[b];\n var o1 = v[a + 1] + v[b + 1];\n if (o0 >= 0x100000000) {\n o1++;\n }\n v[a] = o0;\n v[a + 1] = o1;\n}", "title": "" }, { "docid": "bb912fce17a65632647eaec65af79a1c", "score": "0.50685066", "text": "function writeInt64(value, buffer) {\n if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) {\n throw new Error(\"Value out of range.\");\n }\n\n if (value < 0) {\n value += BIT_64;\n }\n\n writeUInt64(value, buffer);\n}", "title": "" }, { "docid": "bb912fce17a65632647eaec65af79a1c", "score": "0.50685066", "text": "function writeInt64(value, buffer) {\n if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) {\n throw new Error(\"Value out of range.\");\n }\n\n if (value < 0) {\n value += BIT_64;\n }\n\n writeUInt64(value, buffer);\n}", "title": "" }, { "docid": "bb912fce17a65632647eaec65af79a1c", "score": "0.50685066", "text": "function writeInt64(value, buffer) {\n if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) {\n throw new Error(\"Value out of range.\");\n }\n\n if (value < 0) {\n value += BIT_64;\n }\n\n writeUInt64(value, buffer);\n}", "title": "" }, { "docid": "bb912fce17a65632647eaec65af79a1c", "score": "0.50685066", "text": "function writeInt64(value, buffer) {\n if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) {\n throw new Error(\"Value out of range.\");\n }\n\n if (value < 0) {\n value += BIT_64;\n }\n\n writeUInt64(value, buffer);\n}", "title": "" }, { "docid": "bb912fce17a65632647eaec65af79a1c", "score": "0.50685066", "text": "function writeInt64(value, buffer) {\n if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) {\n throw new Error(\"Value out of range.\");\n }\n\n if (value < 0) {\n value += BIT_64;\n }\n\n writeUInt64(value, buffer);\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "07264425fe213bae54797432f297326c", "score": "0.5056429", "text": "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "title": "" }, { "docid": "f1cb5036ee396c2fae506d275854bfd9", "score": "0.5033851", "text": "function copyInt(x, n) {\n let i, c;\n for (c = n, i = 0; i < x.length; i++) {\n x[i] = c & mask;\n c >>= bpe;\n }\n}", "title": "" }, { "docid": "84e954f83fe11b76c3fa58733f34da3f", "score": "0.50308394", "text": "function safe_add(x,y){var lsw=(65535&x)+(65535&y),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|65535&lsw}", "title": "" }, { "docid": "95f247d9178a15c7fc216e8cd5af29d7", "score": "0.50276536", "text": "function rol64(_a, count) {\n var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(_a, 2), hi = _b[0], lo = _b[1];\n var h = (hi << count) | (lo >>> (32 - count));\n var l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}", "title": "" }, { "docid": "95f247d9178a15c7fc216e8cd5af29d7", "score": "0.50276536", "text": "function rol64(_a, count) {\n var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(_a, 2), hi = _b[0], lo = _b[1];\n var h = (hi << count) | (lo >>> (32 - count));\n var l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}", "title": "" } ]
96275b207d8d4334d9f194bbd91f456e
Variables: $view = view for this controller $dilemma = the dilemma controller, with all global blockchain variables Constructor
[ { "docid": "aa2af3e5cb935193f19f9c2c487425aa", "score": "0.69519615", "text": "constructor(dilemmaUI, dilemmaController) {\n\t\t\n\t\t// Set web3 so we may use it in methods\n\t\tthis.dilemmaUI = dilemmaUI;\n\t\t\n\t\t// Dilemma\n\t\tthis.dilemmaController = dilemmaController;\n\t}", "title": "" } ]
[ { "docid": "b012ba24a5e4803c06d913faf82aa6fc", "score": "0.61673987", "text": "constructor(dilemmaUI) {\n\t\tthis.dilemmaUI = dilemmaUI;\n\t\t\n\t}", "title": "" }, { "docid": "2d283bbcf415e447eb3ddb71330ef1bf", "score": "0.6074727", "text": "constructor(dilemmaUI) {\n\t\tthis.dilemmaUI = dilemmaUI;\n\t}", "title": "" }, { "docid": "5a9f3049b73aceb7c34445d4e59ae805", "score": "0.6044605", "text": "constructor(dilemmaUI) {\n\t\t\n\t\tvar that = this;\n\t\t\n\t\t// Set web3 so we may use it in methods\n\t\tthis.dilemmaUI = dilemmaUI;\n\t\t\n\t\t// Create dilemma UI even if MetaMask is not installed\n\t\tif(dilemmaUI == false) that.createChallengeDisplay('dilemmaWrapper'); \n\t\t\n\t\t// If it's installed create the correct UI but only after MetaMask\n\t\telse dilemmaUI.waitMetaMask(function() {\n\n\t\t\tthat.dilemmaUI.codeContract.getPartnerAddress.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.partnerAddress = result;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.codeContract.getBlocksUntilAFK.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.blocksUntilAFK = parseInt(result);\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.codeContract.getBlocksToDecideAfterMiss.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.blocksUntilTurnAfterMiss = parseInt(result);\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.codeContract.getBlocksToDecide.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.blocksUntilTurn = parseInt(result);\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.codeContract.hasMissed.call(web3.eth.accounts[0],\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.hasMissed = result;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.codeContract.isDilemmaActive.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.dilemmaActive = result;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.codeContract.isChallengeActive.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.challengeActive = result;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthat.dilemmaUI.storageContract.isLocked.call(\n\t\t\tfunction (error, result){\n\t\t\t\tif(!error){\n\t\t\t\t\tthat.contractLocked = result;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t},\n\t\t\t\"\",\n\t\t\tthis);\n\t}", "title": "" }, { "docid": "037a29b6f4159bfdab6e58c2ac50e353", "score": "0.55772626", "text": "function EmbedController() {\n var self=this;\n this.id=\"embedController\";\n this.initServiceHost();\n//\n// this.baseURL = baseURL;\n// this.hostURL = hostURL;\n//\n// document.domain = 'ethz.ch';\n self.hashed=false;\n self.hashedUrl();\n\n // if we are logged in or if there is a hash on the url then show & open the authorized views\n // if there is a hash on the url don't show the logout button\n\n if (self.hashed){\n self.views = {};\n self.models = {};\n\n //initialize models\n self.models.dossierList = new DossierListModel(self);\n self.models.bookmark = new BookmarkModel(self);\n\n ISNLogger.log(\"model is initialized\");\n\n //initialize views\n self.views.dossierBanner = new DossierBannerView(self);\n self.views.dossierContent= new DossierContentView(self);\n self.views.details = new DetailEmbedView(self);\n\n $(document).bind(\"BookmarkModelLoaded\", function() {\n ISNLogger.log(\"initialize views in controller\");\n self.views.dossierBanner.open();\n self.views.dossierContent.open();\n });\n }\n} //end of constructor", "title": "" }, { "docid": "022bc876e67841f2cc47bf05f896483c", "score": "0.52736664", "text": "function ExplanationBuilder(node, view) {\n\tthis.node = node;\n\tthis.view = view;\n\tthis.content = node.getContent().getContentJSON();\n\n\tif(node.studentWork != null) {\n\t\tthis.states = node.studentWork; \n\t} else {\n\t\tthis.states = []; \n\t};\n\n\t//var studentExplanation;\n\tthis.ideaBasket;\n\tthis.basketChanged = false;\n\tthis.stateChanged = false;\n\t\n\tthis.question = '';\n\tthis.instructions = '';\n\tthis.bg = '';\n\tthis.latestState;\n\t\n\t//the max background height\n\tthis.maxBackgroundHeightWithoutResponseBox = 480;\n\tthis.maxBackgroundHeightWithResponseBox = 320;\n\t\n\t//the max drop area height\n\tthis.maxDropAreaHeightWithoutResponseBox = 460;\n\tthis.maxDropAreaHeightWithResponseBox = 300;\n\t\n\t//the background dimensions\n\tthis.backgroundWidth = 680;\n\tthis.backgroundHeight = this.maxBackgroundHeightWithoutResponseBox;\n\t\n\t/*\n\t * the drop area dimensions, this is smaller than the background dimensions\n\t * because we do not want the student ideas to spill out of the drop area\n\t */\n\tthis.dropAreaWidth = 515;\n\tthis.dropAreaHeight = this.maxDropAreaHeightWithoutResponseBox;\n\t\n\tif(this.content.enableStudentTextArea == null || this.content.enableStudentTextArea) {\n\t\t//we are displaying the student text area (aka response box) so we need to use a smaller height\n\t\tthis.backgroundHeight = this.maxBackgroundHeightWithResponseBox;\n\t\tthis.dropAreaHeight = this.maxDropAreaHeightWithResponseBox;\t\t\n\t}\n}", "title": "" }, { "docid": "f418ea0eae81790823e4549e61ffff71", "score": "0.5243943", "text": "_createView({ isForce, protoView, isHidden } = {}) {\n\n // destroy any former view that existed in this path\n if (ViewAbstraction.exists(this)) {\n\n if (!isForce) {\n\n return;\n\n }\n\n this.destroy();\n }\n\n if (ViewAbstraction.exists(protoView)) {\n utils.cp((new ViewAbstraction(protoView)).getRoot(), this.configTRef, true);\n }\n\n // create new view\n const fields = {\n title: this.configTRef,\n id: utils.genUUID(), // maybe useful for future purposes…\n };\n\n if (!isHidden) {\n fields[$tm.field.viewMarker] = true;\n }\n\n $tw.wiki.addTiddler(new $tw.Tiddler(\n utils.getTiddler(this.configTRef), // in case we cloned the view\n fields\n ));\n\n this.setEdgeTypeFilter(env.filter.defaultEdgeTypeFilter);\n\n }", "title": "" }, { "docid": "192bdde5cd34a37297fea4fe162ae056", "score": "0.5210153", "text": "function View(){\n\n }", "title": "" }, { "docid": "4634402237c00b72d3c995d66094117e", "score": "0.51768327", "text": "view(view_path,data={}){\n console.log(view_path);\n\n this._view = view_path;\n this._view_data = data;\n return this;\n }", "title": "" }, { "docid": "132d849de34d430c8ffead73adb1810e", "score": "0.51115143", "text": "function view_benefits() {\n\tvar self = this;\n\tself.view('benefits');\n}", "title": "" }, { "docid": "71c1fedcb3013d999c519cfb954af844", "score": "0.5109059", "text": "function view_ide() {\n\tvar self = this;\n\tself.view('ide');\n}", "title": "" }, { "docid": "27d0976e84c38f9731fa3b7180a90aed", "score": "0.50939345", "text": "constructor(controller, viewWorld, BrainClass) {\n\t\tthis.brain = new BrainClass(controller);\n\t\tthis.controller = controller;\n\t\tthis.running = false;\n\t\tthis.silent = false;\n\n\t\tthis.tick = async (shouldAct = true) => {\n\t\t\tlet start = Date.now();\n\n\t\t\tlet img = await viewWorld();\n\n\t\t\tlet perception = await this.brain.perceive(img);\n\t\t\tlet thoughts = await this.brain.think(perception);\n\t\t\tlet decision = await this.brain.decide(thoughts);\n\n\t\t\tif (shouldAct) {\n\t\t\t\tlet feedback = await this.brain.act(decision);\n\t\t\t\tawait this.brain.learn(feedback, decision, thoughts, perception, img);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tperception,\n\t\t\t\tthoughts,\n\t\t\t\tdecision,\n\t\t\t\tdiff : Date.now() - start\n\t\t\t};\n\t\t};\n\t}", "title": "" }, { "docid": "cf623cba1f03f055d5c20d7d54b10bf7", "score": "0.50723696", "text": "constructor() {\n super();\n this.worldKnowledge = new WorldKnowledge_1.WorldKnowledge();\n this.userInterface = new UserInterface_1.UserInterface(this.worldKnowledge);\n this.worldKnowledge.setUserInterface(this.userInterface);\n // this.isPaused = false;\n }", "title": "" }, { "docid": "e96bf9744bd4cc7d005c0042dd5bee54", "score": "0.506283", "text": "constructor(meta, router, cache, user, topicService, db, shareable) {\n this.db = db;\n this.user = user;\n this.meta = meta;\n this.cache = cache;\n this.router = router;\n this.topicService = topicService;\n this.shareable = shareable;\n\n this.openAnswerText = false;\n this.approveMsg = {\n show: false,\n status: ''\n };\n\n this.startQuest = true;\n this.editMode = false;\n this.cancelBtn = false;\n this.currentUserAnswer;\n this.disableQuestBtn = false;\n this.btns = {\n 'btn-primary': this.user.isLoggedIn(),\n 'btn-danger': !this.user.isLoggedIn(),\n };\n\n this.name = 'topic';\n this.title = 'Topic';\n\n this.defaultAnswerDisplayMode = SEMI_DISPLAYED;\n }", "title": "" }, { "docid": "825681530cb8fc9db2504873ceace007", "score": "0.5060211", "text": "async init() {\n this.puzzleId = this.router.params.puzzleId;\n\n this.tags = [\n { text: \"Javascript\", value: \"javascript\" },\n { text: \"Node.js\", value: \"node\" },\n { text: \"PHP\", value: \"php\" },\n { text: \"Java\", value: \"java\" },\n { text: \"Python\", value: \"python\" },\n { text: \"Ruby\", value: \"ruby\" },\n { text: \"C++\", value: \"c++\" },\n ]\n\n this.isLoading = true;\n this.startQuest = false;\n this.isValidForm = true;\n this.hideForm = false;\n\n this.answerData = this.cache.get(this.answerCacheKey) || '';\n\n this.errors = {\n answer: null,\n };\n\n this.puzzle = this.user.einsteinChamber ? this.user.einsteinChamber.currentPuzzle : null;\n\n if (this.puzzle && this.puzzle.id == this.puzzleId) {\n this.isLoading = false;\n this.answerCacheKey = `e-puzzle.${this.puzzle.id}`; // e >> einstein\n if (this.user.einsteinChamber.currentPuzzleCategory) {\n this.puzzle.category = this.user.einsteinChamber.currentPuzzleCategory;\n }\n }\n try {\n let response = await this.einsteinChamberService.getPuzzle(this.puzzleId);\n this.isLoading = false;\n this.puzzle = response.puzzle;\n if (this.puzzle.answer) {\n this.answerData = this.puzzle.answer;\n }\n this.meta.setTitle(`[${this.puzzle.category.name}] ${this.puzzle.title} - Einstein Chamber`)\n .setDescription(this.puzzle.quest.split(\"\\n\")[0] + ', Can you solve it?')\n .setImage(this.puzzle.category.image);\n } catch (e) {\n if (e.error) {\n return this.router.navigateTo('/einstein-chamber');\n }\n throw new Error(e);\n }\n }", "title": "" }, { "docid": "589f24dce2d2d4e62ee42af54005f0b5", "score": "0.50341195", "text": "function StructureTermController() {\r\n}", "title": "" }, { "docid": "5df5fa5df4026e0464b6040c996c3db6", "score": "0.5010632", "text": "function initController(){\n\n vm.writeReply=false;\n vm.courseData = {};\n\n vm.courseData =ProfileCourseService.GetCourseData();\n\n vm.courseData.Carnet = ProfileCourseService.GetProfileData().Carnet\n\n vm.userData = ProfileCourseService.GetProfileData();\n // vm.courseData.status=true;\n vm.gradeWidth = {'width': vm.courseData.Grade+'%'};\n\n console.log(vm.userData);\n\n console.log(vm.courseData);\n\n getComments();\n processComments();\n getAllBadges();\n }", "title": "" }, { "docid": "6ca0a29dba1c9d6a63753dc33cba8f91", "score": "0.50057507", "text": "function PageController() {\n // save the value of this so we can use different this in other functions\n var vm = this;\n vm.classList = \"People and their Jobs\";\n vm.newPerson = [\n {'name': 'kevin', 'occupation': 'teacher'},\n {'name': 'michael', 'occupation': 'admin'},\n {'name': 'brianna', 'occupation': 'instructor'}\n ];\n }", "title": "" }, { "docid": "228343261e2a6a45cf340c7421bd7305", "score": "0.500012", "text": "function TView() { }", "title": "" }, { "docid": "228343261e2a6a45cf340c7421bd7305", "score": "0.500012", "text": "function TView() { }", "title": "" }, { "docid": "228343261e2a6a45cf340c7421bd7305", "score": "0.500012", "text": "function TView() { }", "title": "" }, { "docid": "228343261e2a6a45cf340c7421bd7305", "score": "0.500012", "text": "function TView() { }", "title": "" }, { "docid": "5e465f7f8a70f770e901c9288a9e0864", "score": "0.49757165", "text": "function TenantView() {}", "title": "" }, { "docid": "a36edc1682cbf13eb3d586788f67f4c9", "score": "0.49183378", "text": "function controller() { }", "title": "" }, { "docid": "a36edc1682cbf13eb3d586788f67f4c9", "score": "0.49183378", "text": "function controller() { }", "title": "" }, { "docid": "a36edc1682cbf13eb3d586788f67f4c9", "score": "0.49183378", "text": "function controller() { }", "title": "" }, { "docid": "7c23091249a0e77690b6226afb837fd3", "score": "0.49149916", "text": "function CycleStructureTermController(){\r\n}", "title": "" }, { "docid": "73e98c9422bab0969e8d2b77ad30ed30", "score": "0.49105528", "text": "constructor(initialView = \"state\"){\r\n\t\tthis.districtIDs = [0, 1, 2, 3, 4, 5, 6, 7];\r\n\t\tthis.counter = 0;\r\n\t\tthis.districts = [];\r\n\t\tthis.counties = [];\r\n\t\tthis.initRosBridge();\r\n\t\tthis.initDataListener();\r\n\t\tthis.initControlListener();\r\n\t\tthis.setupCounties();\r\n\r\n\t\tSELF = this;\r\n\r\n\t\t//initializes stateView and districtView classes as null variables\r\n\t\t//(easy way to check if they need to be initialized)\r\n\t\tthis.stateView = new StateView(null, \"population\", this.counties);\r\n\t\t//this.districtView = new DistrictView(null);\r\n\r\n\t\tthis.currentView = initialView;\r\n\t\tconsole.log(this.currentView);\r\n\r\n\t\tif(initialView == \"state\"){\r\n\t\t\t$(\"#district-view\").hide();\r\n\t\t\t$(\"#state-view\").show();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$(\"#state-view\").hide();\r\n\t\t\t$(\"#district-view\").show();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "34aa8b3c7ab01ebab1e631c873df5da5", "score": "0.49006438", "text": "function LView() { }", "title": "" }, { "docid": "34aa8b3c7ab01ebab1e631c873df5da5", "score": "0.49006438", "text": "function LView() { }", "title": "" }, { "docid": "34aa8b3c7ab01ebab1e631c873df5da5", "score": "0.49006438", "text": "function LView() { }", "title": "" }, { "docid": "34aa8b3c7ab01ebab1e631c873df5da5", "score": "0.49006438", "text": "function LView() { }", "title": "" }, { "docid": "908912d7385e34f0bacd0abeba97d46b", "score": "0.4899401", "text": "function initialiseView() {\r zeitdokumente = byId(\"zeitdokumente\");\r einfuehrungstext = byId(\"einfuehrungstext\");\r verknuepfungen = byId(\"verknuepfungen\");\r objekt = bySelector(\".object\");\r medienverweise = bySelector(\".mediaboxes\");\r excerpt = bySelector(\".excerpt\");\r merkliste = bySelector(\".list\");\r tooltip = byId(\"selectedObject\");\r\r // set the switch function as onlick on the config_switch element and display the config\r config_switch = document.getElementById(\"config_switch\");\r config_switch.onclick = function () {\r switchJsonConfig();\r loadContentAndCreateLayout();\r }\r loadContentAndCreateLayout();\r}", "title": "" }, { "docid": "94c8d08a8b4f5948cf988e6619afaed2", "score": "0.48975512", "text": "_start() {\n\n this._menuView = new MenuView(\n document.getElementsByClassName('menu-view')[0],\n this.config\n );\n\n for (var key in this.config) {\n this.DEFAULT_SKETCH = key;\n break;\n }\n\n this._setupScroll();\n this._setupWindow();\n this._onHashChange();\n }", "title": "" }, { "docid": "cf64c945d8630c36b62f716ba6a0b623", "score": "0.48943466", "text": "constructor() { \n \n View.initialize(this);\n }", "title": "" }, { "docid": "8cedaea388b8fa5448a19fd74e8d1545", "score": "0.48933265", "text": "function PageView(options) {\n var that = this;\n View.apply(this, arguments);\n this.options = options;\n\n this.profile_id = this.options.args[0];\n var profile_id = this.profile_id;\n\n App.history.modifyLast({\n tag: 'user'\n });\n\n // // Are we getting a profile_id, or do we need to get the current user's profile_id?\n // this.KnowProfileId = $.Deferred();\n // var profile_id; \n // if(this.options.args.length > 0 && this.options.args[0]){\n // // It is set\n // // - resolve now\n // profile_id = this.options.args[0];\n // } else {\n // // Trying to go to the ond \"Dash\" (the current user)\n // // Sometimes we don't immediately know the current owner's ID\n // // this.KnowProfileId = $.Deferred();\n // this.profile_id = App.Data.User.get('_id'); //localStorage.getItem('home_profile_id');\n // // this.profile_id = profile_id && profile_id.length == 24 ? profile_id : false;\n // }\n\n // // If profile_id is set, then use it, otherwise get the user's profile_id)\n // if(this.profile_id){\n // // Resolve the KnowProfileId right away\n // // - might use it later in a Deferred context\n // this.KnowProfileId.resolve(this.profile_id);\n // } else {\n // // Determine my user._id\n // App.Data.User.populated().then(function(){\n // that.profile_id = App.Data.User.get('_id');\n // that.KnowProfileId.resolve(App.Data.User.get('_id'));\n // });\n // }\n\n // create the layout\n this.layout = new HeaderFooterLayout({\n headerSize: App.Defaults.Header.size,\n footerSize: 60\n });\n\n\n this.createContent();\n this.createHeader();\n \n // Attach the main transform and the comboNode to the renderTree\n this.add(this.layout);\n\n this.loadModels();\n\n }", "title": "" }, { "docid": "6ccee4a28e04733105ec58dce855790c", "score": "0.4893151", "text": "constructor() {\n this.challenge_obj_created = false;\n }", "title": "" }, { "docid": "687a72021d6366449e39c15c4135fdc7", "score": "0.4858439", "text": "init() {\n\t\tif( !this.data.view ) { this.data.view = 'main'; }\n\t\tthis.setView( this.data.view, false );\n\t}", "title": "" }, { "docid": "efc48509a11e64ab7415d0ee84dcd8f6", "score": "0.48557088", "text": "_content_view() {\n let is_my_bajoo = this.storage && this.storage.name === 'MyBajoo';\n let allow_edit = this.storage && this.storage.rights.admin && !is_my_bajoo;\n\n return m('form', {onsubmit: () => {this.submit(); return false;}}, [\n m('.checkbox', m('label', [\n m('input[type=checkbox][readonly][disabled]', {\n checked: this.storage && this.storage.is_encrypted\n }),\n this.storage ? (this.storage.is_encrypted ?\n _('This share is encrypted') :\n _('This share is not encrypted')) : ''\n ])),\n StatusAlert.make(this.status),\n m('fieldset', {disabled: this.is_loading}, [\n m('.form-group', [\n m('label', _('Name')),\n allow_edit ? m('input.form-control[required]', {\n placeholder: _('Eg: \\\"Pictures Holidays 2017\\\"'),\n oninput: event => this.storage.name = event.target.value,\n value: this.storage ? this.storage.name : ''\n }) : m('', this.storage ? this.storage.name : '')\n ]),\n m('.form-group', [\n m('label', _('Description')),\n allow_edit ? m('textarea.form-control', {\n oninput: event => this.storage.description = event.target.value,\n value: this.storage ? this.storage.description : ''\n }) : m('', this.storage ? this.storage.description : '')\n ]),\n m('.form-group', [\n m('label', _('Member list')),\n this.diff_list ?\n StorageMemberList.make(this.diff_list, app.user, allow_edit) :\n m('', _('Loading ...'))\n ]),\n this._control_btn_view(is_my_bajoo, allow_edit)\n ]),\n ]);\n }", "title": "" }, { "docid": "69e9e1542172f731665a2cd04c81fc3b", "score": "0.48188597", "text": "function View(\n bodyDivId,\n fabModel,\n addMenuDrawerEventListeners,\n addHeaderEventListeners,\n addLandingPageEventListeners,\n addPrioritiesPageEventListeners,\n addResultsPageEventListeners,\n addSettingsPageEventListeners,\n cityRankModelCB,\n minHappinessValue,\n maxHappinessValue,\n minAffordabilityValue,\n maxAffordabilityValue,\n minPoliticsValue,\n maxPoliticsValue,\n getSketchyQuartile,\n hasPersistedSettings,\n hasPersistedFAB,\n hasPersistedPriorities,\n t,\n getLangName,\n getLangOptionsMap,\n getCountryName,\n getCountryOptionsMap,\n getCurrency,\n githubUrl,\n getMaxResults,\n getMaxResultsOptions,\n getLocale,\n getCountryCode,\n getAffordabilityValue,\n getHappinessValue,\n getPoliticsValue,\n getAffordabilityEnabled,\n getHappinessEnabled,\n getPoliticsEnabled,\n getJobSearchEnabled,\n getNormalizedPriorities,\n hasNoPriorities,\n getActiveDataView,\n getRankedList,\n networkConnection\n) {\n\n this.fabModel = fabModel\n\n // Bind to LocalPersistence interface.\n this.hasPersistedSettings = hasPersistedSettings\n this.hasPersistedFAB = hasPersistedFAB\n this.hasPersistedPriorities = hasPersistedPriorities\n\n // Bind to Translation (t9n) interface.\n this.t = t\n this.getLangName = getLangName\n this.getLangOptionsMap = getLangOptionsMap\n this.getCountryName = getCountryName\n this.getCountryOptionsMap = getCountryOptionsMap\n this.getCurrency = getCurrency\n\n // Bind to SettingsModel interface.\n this.getMaxResults = getMaxResults\n this.getMaxResultsOptions = getMaxResultsOptions\n this.getLocale = getLocale\n this.getCountryCode = getCountryCode\n\n // Bind to PriorityModel interface.\n this.getAffordabilityValue = getAffordabilityValue\n this.getHappinessValue = getHappinessValue\n this.getPoliticsValue = getPoliticsValue\n this.getAffordabilityEnabled = getAffordabilityEnabled\n this.getHappinessEnabled = getHappinessEnabled\n this.getPoliticsEnabled = getPoliticsEnabled\n this.getJobSearchEnabled = getJobSearchEnabled\n this.getNormalizedPriorities = getNormalizedPriorities\n this.hasNoPriorities = hasNoPriorities\n\n // Bind to ResultsModel interface.\n this.getActiveDataView = getActiveDataView\n this.getRankedList = getRankedList\n\n // Bind to network interface.\n this.checkInternet = networkConnection.checkInternet\n this.getOnlineStatus = networkConnection.getOnlineStatus\n\n this.bodyDivId = bodyDivId\n this.rankedList = []\n this.addMenuDrawerEventListeners = addMenuDrawerEventListeners\n this.addHeaderEventListeners = addHeaderEventListeners\n this.addLandingPageEventListeners = addLandingPageEventListeners\n this.addPrioritiesPageEventListeners = addPrioritiesPageEventListeners\n this.addResultsPageEventListeners = addResultsPageEventListeners\n this.addSettingsPageEventListeners = addSettingsPageEventListeners\n\n this.cityRankModelCB = cityRankModelCB\n this.minHappinessValue = minHappinessValue\n this.maxHappinessValue = maxHappinessValue\n this.minAffordabilityValue = minAffordabilityValue\n this.maxAffordabilityValue = maxAffordabilityValue\n this.getSketchyQuartile = getSketchyQuartile\n\n this.githubUrl = githubUrl\n\n let locale = getLocale()\n let currency = getCurrency(getCountryCode())\n\n // TODO: Make sensitive to locale and locale changes.\n // For now, just hardcode for en-US number formatting and USD.\n // Implication is we need a new formatter when changing\n // locale or currency from the settings page.\n\n this.formatter = new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n minimumFractionDigits: 0\n })\n\n this.resultsMain = undefined\n}", "title": "" }, { "docid": "f191644818f4d3601ca3171e41574a71", "score": "0.4800816", "text": "function Motive(){\n\t// Presentation Model \n\tthis.data \t\t\t\t= {};\n\tthis.dataBindings \t\t= {};\n\t// Components\n\tthis.references \t\t= {};\n\t// Layouts\n\tthis.templates\t\t\t= {};\n\tthis.templateSpecs \t\t= {};\n\t// Behaviors\n\tthis.actions\t\t\t= {};\n\t// Utility\n\tthis.$ \t\t\t\t\t= jQuery || Zepto; // TODO: externalize\n}", "title": "" }, { "docid": "9059ec99752770b66b5479657f03985c", "score": "0.47929996", "text": "viewCampaign(){\n\n }", "title": "" }, { "docid": "ca93adc43f5ac93398378adfd4beb7e9", "score": "0.47867057", "text": "function init(){\n console.log(\"fpController.\")\n\n userService.checkLogin()\n .then(function (response){\n console.log([\"Account controller got user.\", response.data]);\n model.user = response.data;\n });\n userService.getUser(userId)\n .then(function(response){\n model.viewedUser = response.data;\n console.log([\"Account controller checking login status\", model.user]);\n if(model.viewedUser) {\n console.log([\"Account Controller - getUser: \", model.viewedUser]);\n model.message = \"Welcome, \" + model.viewedUser.username + \"!\";\n }else{\n $location.url(\"/login\");\n }\n })\n\n profileService.getProfileByUser(userId)\n .then(function(response){\n model.profile = response.data;\n if(model.message.firstName !== null){\n model.message = \"Welcome, \"+model.profile.firstName+\"!\";\n\n model.profileIsUsers = (model.user._id === model.profile.userId);\n }\n });\n\n\n interestService.getInterestsByUser(userId)\n .then(function(response){\n console.log([\"interestService getting interests from user\",\n response.data])\n model.interests = response.data;\n });\n\n }", "title": "" }, { "docid": "7c9711f729d9ac384b338d27440f3dd7", "score": "0.47802243", "text": "constructor($route, codenvyAPI, $mdDialog, $mdMedia, $q, codenvyNotification) {\n this.codenvyAPI = codenvyAPI;\n this.$mdDialog = $mdDialog;\n this.$mdMedia = $mdMedia;\n this.$q = $q;\n this.codenvyNotification = codenvyNotification;\n }", "title": "" }, { "docid": "9d8a92597fb2f0c2bfda542db5ffa4c2", "score": "0.47674704", "text": "function viewMethod(systemModel, outputModel, experimentStatus, chartConfig, tableConfig, $cookies, vol, RPUM) {\t// declaring services and constant relationship to viewMethod\n/* a) define how different dependencies are called it out onto the view */\n\tvar view = this;\n\tview.system = systemModel;\n\tview.output = outputModel;\n\tview.experiment = experimentStatus;\n\tview.chart = chartConfig;\n\tview.table = tableConfig;\n\tview.cookies = $cookies;\n\tview.vol = vol;\n\tview.RPUM = RPUM;\n\t\t// default function of various buttons\n\tview.backgroundSet = 0;\n\tview.isDisabled_background = false;\n\tview.isDisabled_run = false;\n\tview.isDisabled_wash = true;\n\t\t// stored cookies data\n\tview.storedDataPrompt = false;\n\tview.cookiesData = {\n\t\t\t// stored controller state\n\t\tstored_backgroundSet: view.backgroundSet,\n\t\tstored_isDisabled_background: view.isDisabled_background,\n\t\tstored_isDisabled_run: view.isDisabled_run,\n\t\tstored_isDisabled_wash: view.isDisabled_wash,\n\t\t\t// stored system\n\t\tstored_tRC: view.system.tRC,\n\t\tstoredKd: view.system.Kd,\n\t\tstored_kOff: view.system.kOff,\n\t\tstored_mwL: view.system.mwL,\n\t\tstored_mwR: view.system.mwR,\n\t\t\t// stored experiment status\n\t\tstoredSteps: view.experiment.steps,\n\t\tstoredTimeOfDay: view.experiment.timeOfDay,\n\t\t\t// stored output\n\t\tstored_fLC_tableDisplay: view.output.fLC_tableDisplay,\n\t\tstored_fLC: view.output.fLC,\n\t\tstore_timeOn: view.output.timeOn,\n\t\tstoreRU_On_Output: view.output.RU_On_Output,\n\t\tstoreRU_CompiledLabelPlotAll: view.output.RU_CompiledLabelPlotAll,\n\t\tstore_tableData: view.table.data\n\n\t};\n\n/* b) creating functions for the cookies prompt */\n\tview.continueSaved = function() {\n\t\tview.storedDataPrompt = false; // close the prompt\n\t};\n\n\tview.restartExperiment = function(){\n\t\tview.cookies.remove(\"storedData\");\n\t\tview.system.loadNewPair(view.vol, view.RPUM);\n\t\tview.restart();\n\t\tview.storedDataPrompt = false;\n\t};\n\n/* c) creating function for switching fLC input to mM magnitude */\n\tview.magnitude_mM = function() {\n\t\tview.output.magnitudeAdjust = 1000;\n\t\tview.output.unitAdjust = \"mM\";\n\t};\n\n/* d) creating function for switching fLC input to uM magnitude */\n\tview.magnitude_uM = function() {\n\t\tview.output.magnitudeAdjust = 1000000;\n\t\tview.output.unitAdjust = \"uM\";\n\t};\n\n/* e) creating function for switching fLC input to nM magnitude */\n\tview.magnitude_nM = function() {\n\t\tview.output.magnitudeAdjust = 1000000000;\n\t\tview.output.unitAdjust = \"nM\";\n\t};\n\n/* f) creating function for \"setup\" button */\n\tview.setup = function () {\n\t\tview.experiment.timeOfDayCounter();\n\t\tview.experiment.dayOfExperimentCounter();\n\t};\n\n/* g) creating function for set \"zero\" button */\n\tview.set_background = function() {\n\t\tview.backgroundSet = view.output.RU_On_Output[view.output.RU_On_Output.length-1];\n\t\tview.isDisabled_background = true;\n\t\tfor (var i = 0; i < view.output.RU_On_Output.length; i++) {\n\t\t\tview.output.RU_On_Output[i] -= view.backgroundSet;\n\t\t}\n\t};\n\n/* h) creating function for \"run experiment\" button */\n\tview.runExperiment = function (new_fLC, new_timeOn) {\n\t\tview.output.add_fLC(new_fLC);\n\t\tview.output.add_timeOn(new_timeOn);\n\t\tview.output.calc_RU_OnMax(view.system.RU_MaxL, view.output.fLC[view.experiment.steps], view.system.Kd, view.system.kOn, view.system.kOff, view.system.RU0, view.backgroundSet);\n\t\tview.output.plotCoordinatesOn(new_timeOn, view.output.currentStep, view.output.totalSteps, view.system.RU_MaxL, view.output.fLC[view.experiment.steps], view.system.Kd, view.system.kOn, view.system.kOff, view.system.RU0, view.backgroundSet);\n\t\tview.output.plotCompileLabelOn();\n\t\tview.experiment.stepsCounter();\n\t\tview.experiment.timeOfDayCounter();\n\t\tview.isDisabled_run = true;\n\t\tview.isDisabled_wash = false;\n\t\tview.cookies.putObject(\"storedData\", view.cookiesData);\n\t};\n\n/* i) creating function for \"wash-up\" button */\n\tview.washUp = function(new_timeOn) {\n\t\tview.output.plotCoordinatesOff(view.output.currentStep, view.output.totalSteps, new_timeOn, view.system.kOff, view.system.RU0, view.backgroundSet);\n\t\tview.output.plotCompileLabelOff();\n\t\tview.table.compileData(angular.copy(view.experiment.steps), view.output.fLC_tableDisplay[view.output.fLC_tableDisplay.length-1]*view.output.magnitudeAdjust, view.output.timeOn[view.output.timeOn.length-1], view.output.RU_On_Output[view.output.RU_On_Output.length-1]);\n\t\tview.isDisabled_run = false;\n\t\tview.isDisabled_wash = true;\n\t\tview.cookies.putObject(\"storedData\", view.cookiesData);\n\t}; \n\n/* j) creating function for \"eat\" button */\n\tview.eat = function () {\n\t\tview.experiment.timeOfDayCounter();\n\t};\n\n/* k) creating function for \"home\" button */\n\tview.goHome = function () {\n\t\tview.experiment.timeOfDay = view.experiment.startOfDay;\n\t};\n\n/* l) creating function for \"clear graph\" button */\n\tview.clearChart = function() {\n\t\tview.output.RU_CompiledLabelPlotAll.length = 0;\n\t};\n\n/* m) creating a function for \"restart\" button */\n\tview.restart = function () {\n\t\tview.experiment.daysLeft = view.experiment.daysAllowed;\n\t\tview.experiment.timeOfDay = view.experiment.startOfDay;\n\t\tview.experiment.steps = 0;\n\t\t\t// remove all data in existing arrays\n\t\tview.output.fLC.length = 0;\n\t\tview.output.timeOn.length = 0;\n\t\tview.output.RU_On_Output.length = 0;\n\t\tview.output.RU_On_Coordinate.length = 0;\n\t\tview.output.RU_Off_Coordinate.length = 0;\n\t\tview.output.RU_Line.length = 0;\n\t\tview.output.RU_CompiledLabelPlotAll.length = 0;\n\t\tview.table.data.length = 0;\n\t};\n\n/* n) initialise application to generate unique values for the new system, else load previous experiment state from cookies */\n\n\tif (view.cookies.getObject(\"storedData\") === undefined) { // if there are no data, generate a new system\n\t\tview.system.loadNewPair(view.vol, view.RPUM);\n\t\tview.storedDataPrompt = false;\n\t\tview.cookies.putObject(\"storedData\", view.cookiesData);\n\t} else { // load stored data\n\t\tview.cookies.getObject(\"storedData\");\n\t\t\t// set controller state to as stored\n\t\tview.backgroundSet = view.cookiesData.stored_backgroundSet;\n\t\tview.isDisabled_background = view.cookiesData.stored_isDisabled_background;\n\t\tview.isDisabled_run = view.cookiesData.stored_isDisabled_run;\n\t\tview.isDisabled_wash = view.cookiesData.stored_isDisabled_wash;\n\t\t\t// set system to as stored\n\t\tview.system.tRC = view.cookiesData.stored_tRC;\n\t\tview.system.Kd = view.cookiesData.storedKd;\n\t\tview.system.kOff = view.cookiesData.stored_kOff;\n\t\tview.system.find_kOn(view.system.Kd, view.system.kOff);\n\t\tview.system.mwL = view.cookiesData.stored_mwL;\n\t\tview.system.mwR = view.cookiesData.stored_mwR;\n\t\tview.system.find_mwLR(view.system.mwL, view.system.mwR);\n\t\tview.system.find_RU_Max(view.system.tRC, view.system.mwR, view.vol, view.RPUM, view.system.mwL, view.system.mwLR);\n\t\t\t// set experiment status to as stored\n\t\tview.experiment.steps = view.cookiesData.storedSteps;\n\t\tview.experiment.timeOfDay = view.cookiesData.storedTimeOfDay;\n\t\t\t// set output to as stored\n\t\tview.output.fLC_tableDisplay = view.cookiesData.stored_fLC_tableDisplay;\n\t\tview.output.fLC = view.cookiesData.stored_fLC;\n\t\tview.output.timeOn = view.cookiesData.store_timeOn;\n\t\tview.output.RU_On_Output = view.cookiesData.storeRU_On_Output;\n\t\tview.output.RU_CompiledLabelPlotAll = view.cookiesData.storeRU_CompiledLabelPlotAll;\n\t\tview.table.data = view.cookiesData.store_tableData;\n\t\tview.storedDataPrompt = true;\n\t}\n}", "title": "" }, { "docid": "4e6f6abd57b4ee1114f0eba7bb5e6b0a", "score": "0.4751292", "text": "constructor() {\n // Run super eden\n super();\n\n // Bind private variables\n this._sitemap = null;\n\n // Bind private methods\n this._compile = this._compile.bind(this);\n this._generate = this._generate.bind(this);\n this._middleware = this._middleware.bind(this);\n\n // Run middleware\n this.eden.router.use(this._middleware);\n\n // On render\n this.eden.pre('view.compile', this._compile);\n\n // Generate sitemap\n if (config.get('sitemap') && config.get('sitemap.enabled')) {\n // Generate on interval\n this._generate();\n\n // Set interval\n if (config.get('sitemap.interval')) setInterval(this._generate, config.get('sitemap.interval'));\n }\n }", "title": "" }, { "docid": "39599e53d8bbe09394ebb53ceb9899a0", "score": "0.47479543", "text": "function main () {\n \"use strict\"\n\n view.run();\n\n // I used this for tests\n //controller.registerUser(constants.URL_USER, 'json', 'PeshoPesho', 'PeshoPesho');\n //controller.logInUser(constants.URL_LOG_IN, 'json', 'PeshoPesho', 'PeshoPesho');\n //controller.getMessages(constants.URL_POST, 'json');\n //controller.getMessagesFilteredByName(constants.URL_FILTER_BY_USER_NAME, ('PeshoPesho'.toLowerCase()));\n //controller.getMessagesFilteredByPattern(constants.URL_FILTERED_BY_PATTERN, 'test');\n //controller.getMessagesFilteredByNameAndPattern(constants.URL_FILTERED_BY_PATTERN, 'PeshoPesho', 'test');\n //controller.sendMessage(constants.URL_POST, 'json', 'PeshoPesho', 'Ako raboti, mi ostava UI-a...', '22fpjddqZLvLYYIbhMuVxCfdRnwndZjxWxHeEniFOwXaqwUjpm')\n //controller.logOutUser(constants.URL_USER, 'json', '22DqghsjTprllkjlbHisidqweTevYUJdPigblvwifNjuJEOvNy');\n //controller.getMessages(constants.URL, 'json');\n}", "title": "" }, { "docid": "10a6124096a1a95b089f7e5ec3f31a2f", "score": "0.47418794", "text": "initialize() {\r\n\r\n // get current lang\r\n var currentLang = session.get( 'settings', 'locale' ) || session.get( 'settings', 'lang' );\r\n\r\n // setup language\r\n var lang = Language.name[currentLang] ? currentLang : 'en-us';\r\n\r\n // get last visited page\r\n var oldPage = session.get( 'cache', 'page' );\r\n\r\n // check location hash\r\n if ( global.location.hash !== 'index' ) {\r\n if ( oldPage == 'settings' ) {\r\n\r\n // force user to start on index page\r\n oldPage = 'index';\r\n }\r\n\r\n // update location hash\r\n global.location.hash = oldPage;\r\n }\r\n\r\n // define app state\r\n var appState = {\r\n lang: lang, // current language\r\n full: true, // render full top view\r\n popup: false, // popup state\r\n loaded: true, // page loaded\r\n pageName: oldPage, // cached page name\r\n fadeInMs: 100, // fade in duration\r\n fadeOutMs: 10, // fade out duration\r\n popupType: true, // dialog type. true -> can be manually hidden, false -> cannot be manually hidden\r\n connection: session.get( 'app', 'connection' )\r\n };\r\n\r\n // update options\r\n assign( this, {appState: appState} );\r\n\r\n // create top view instance\r\n this.topView = new TopView( appState );\r\n }", "title": "" }, { "docid": "ef27d3662f9cd8e92194ff6f08d43530", "score": "0.47406954", "text": "function activate() {\n // things you want to do/initialise (like variables) from things like services (ask Jack)\n // can usually ignore this function\n vm.ventings = getVentings();\n vm.reframes = getReframes();\n vm.prepares = getPrepares();\n }", "title": "" }, { "docid": "da7723b720554782102e7a18e72eed49", "score": "0.47331288", "text": "function activate() {\n // Constants\n vm.hintCss = appConfig.hintCss;\n\n\n vm.title = 'Forgot Password Controller';\n vm.descriptionText = 'This is the time capture area';\n }", "title": "" }, { "docid": "71eb3489584d3d3fa496cc0e6c3add97", "score": "0.47293365", "text": "function StructureGroupController(){\r\n}", "title": "" }, { "docid": "4a9eef719fc2ea63cf0482d85c74af20", "score": "0.4727155", "text": "function OAuthController(view) {\n this._view = view;\n this.oauthVerifier = undefined;\n var _this = this;\n\n this._view.requestToken.attach(function(){\n _this.getRequestToken();\n });\n\n}", "title": "" }, { "docid": "9a3b3cc7be1a9a0c64b41b6c08080430", "score": "0.47225255", "text": "[init](){\r\n //BOTH VIEWS----------------------------------------------------------------------------------------------------\r\n //Button \"Rolle wechseln\"\r\n View().DOM.document.on(\"click\", \".switchRole\",(e)=> {\r\n Model().switchRole(e.currentTarget);\r\n });\r\n\r\n //LISTVIEW------------------------------------------------------------------------------------------------------\r\n\r\n //ADD A NEW LIST (LISTVIEW / HELPSEEKER)\r\n //ADD A NEW LIST -> A POPUP-WINDOW OPENS WHERE THE USER CAN ENTER THE INFORMATION OF----------------------------\r\n //THE NEW LIST -> AFTER FINISHING, THE INPUT-DATA WILL BE USED TO CREATE A NEW LIST OBJECT\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n let articleList;\r\n\r\n //1. STEP: KLICK ON BUTTON \"NEUE LISTE HINZUFÜGEN\"\r\n //POP UP WILL SHOW UP - GET NEW VARIABLES CREATOR, CREATIONDATE AND ARTICLELIST\r\n //THE NAME OF THE READ IN USER AND TODAYS DATE ARE ALREADY GIVEN\r\n\r\n View().DOM.document.on(\"click\", \"#addList\",(e)=> {\r\n articleList = Model().createNewList();\r\n });\r\n\r\n //2. STEP: ADD VARIOUS ARTICLES TO THE LIST WITH BUTTON \"ARTIKEL HINZUFÜGEN\"\r\n //THIS METHOD FETCHES THE ENTERED CONTENT IN THE INPUT-BOXES FOR THE ARTICLES\r\n //IT CREATES A NEW ARTICLE OBJECT AND EVENTUALLY PRINTS THE ENTERED DETAILS OF\r\n //THE ARTICLE AND CLEANS THE INPUT BOXES (FOR BETTER USABILITY)\r\n\r\n View().DOM.document.on(\"click\", \"#addArticleToList\",(e)=> {\r\n Model().addArticlesToNewList(articleList);\r\n\r\n });\r\n\r\n //3. STEP: CREATE A NEW LIST WITH THE DETAILS GIVEN IN THE INPUT BOXES AND PUT THE ARTICLES\r\n //IN THE NEW LIST - EVENTUALLY PRINT THE NEW LIST, CLEAN THE FORM AND CLEAN THE ARTICLE OUTPUT\r\n\r\n View().DOM.document.on(\"click\", \"#listAdd\",(e)=> {\r\n Model().addNewList(articleList);\r\n\r\n });\r\n\r\n //EDIT A LIST (LISTVIEW / HELPSEEKER)---------------------------------------------------------------------------\r\n //EDITING A LIST FROM THE LISTVIEW -> SENDS THE USER TO THE DETAILVIEW AND SHOW BUTTONS TO EDIT\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\", \".listView .edit\",(e)=> {\r\n Model().editViewFromLists(e.currentTarget);\r\n }); \r\n\r\n //DELETE A LIST (LISTVIEW / HELPSEEKER)-------------------------------------------------------------------------\r\n //DELETE THE HTML LIST + DELETE THE LIST IN THE LISTLIST-MAP AFTER THE CONFIRM OF THE USER\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\", \".listView .delete\",(e)=> {\r\n Model().deleteListHtml(e.currentTarget);\r\n });\r\n\r\n //GO TO DETAILVIEW (LISTVIEW)-----------------------------------------------------------------------------------\r\n //SENDS THE USER TO THE DETAILVIEW (WITHOUT BUTTONS TO EDIT)\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\".detail\",(e)=>{\r\n let listId = e.currentTarget.id;\r\n Model().getDetailView(listId);\r\n });\r\n\r\n //DETAILVIEW----------------------------------------------------------------------------------------------------\r\n\r\n //EDIT A LIST (DETAILVIEW / HELPSEEKER)-------------------------------------------------------------------------\r\n //SHOWS BUTTON TO DELETE OR EDIT A ARTICLE AND ALSO TO EDIT THE GENERAL LIST INFORMATION\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\".detailView .edit\",(e)=>{\r\n Model().editViewFromDetail(e.currentTarget);\r\n });\r\n\r\n //EDIT ARTICLES (DETAILVIEW / HELPSEEKER)-----------------------------------------------------------------------\r\n // A POPUP-WINDOW OPENS WHERE THE USER CAN ENTER EDIT AN EXISTING ARTICLE\r\n // -> AFTER FINISHING, THE INPUT-DATA WILL BE USED TO OVERWRITE THE OLD ARTICLE\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n let articleRowClicked;\r\n\r\n //STEP 1: OPEN POP-UP VIA \"BEARBEITEN\" AT AN ARTICLE\r\n //IN THIS STEP, WE GET THE ARTICLE ROW WHERE THE CLICK HAPPENED AND SAVE IT\r\n //MOREOVER, WE FETCH THE OLD CONTENT OF THE THREE COLS TITLE, ANZAHL AND MAX. KOSTEN, SAVE IT AND\r\n //SET IT AS PLACEHOLDER TEXT FOR THE INPUT FIELDS\r\n\r\n View().DOM.document.on(\"click\",\".articleEdit\",(e)=>{\r\n let btn = e.currentTarget;\r\n articleRowClicked = Model().articleEdit(btn);\r\n });\r\n\r\n //STEP 2: AFTER FILLING IN THE INPUT BOXES IN THE POPUP, YOU CAN SUBMIT THE NEW INFORMATION BY PRESSING\r\n //BUTTON \"ÄNDERUNGEN ÜBERNEHMEN\". THEREFORE THIS FUNCTION GETS THE VALUES OF THE INPUT BOXES. IF A\r\n //INPUT BOX IS EMPTY, THE OLD VALUE OF THIS COLUMN WILL BE TAKEN OVER. THEN THE NEW VALUES WILL BE PLACED\r\n //IN THE HTML AND A NEW ARTICLE WILL BE CREATED (THE OLD ARTICLE WILL BE DELETED AND THE NEW ONE SET IN\r\n //THE LIST. EVENTUALLY, THE FORM WILL BE CLEARED.\r\n\r\n View().DOM.document.on(\"click\",\"#overtakeChangesArticle\",(e)=>{\r\n Model().overtakeChangesArticle(articleRowClicked);\r\n });\r\n\r\n //DELETE ARTICLES (DETAILVIEW / HELPSEEKER)---------------------------------------------------------------------\r\n //AFTER GETTING THE CONFIRM OF THE USER, THE TABLEROW WILL BE DELETED IN THE HTML AND THE ARTICLE WILL BE\r\n //REMOVED FROM THE LIST-MAP. EVENTUALLY, THE NUMBER OF ARTICLES WILL BE UPDATED.\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\".articleDelete\",(e)=>{\r\n Model().deleteArticleFromList(e.currentTarget);\r\n });\r\n\r\n //EDIT LISTDETAILS (DETAILVIEW / HELPSEEKER)--------------------------------------------------------------------\r\n // A POPUP-WINDOW OPENS WHERE THE USER CAN ENTER EDIT AN EXISTING LISTDETAILS\r\n // -> AFTER FINISHING, THE INPUT-DATA WILL BE USED TO OVERWRITE THE LIST DETAILS.\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n let btnPressed;\r\n\r\n //STEP 1: THE POP UP OPENS HERE - GETTING THE CONTENT OF THE RECENT LIST DETAILS AND SETTING IT AS\r\n //PLACEHOLDER TEXT\r\n\r\n View().DOM.document.on(\"click\",\"#editBtn\",(e)=>{\r\n btnPressed = e.currentTarget;\r\n Model().editListDetail();\r\n });\r\n\r\n //STEP 2: SAVE THE NEW CONTENT OF THE INPUT BOXES. IF THERE WAS NO ENTRY FOUND, THE OLD LIST DETAIL WILL BE\r\n //TAKEN. EVENTUALLY WRITES IT DOWN IN THE HTML AND UPDATES THE LIST INFOS.\r\n\r\n View().DOM.document.on(\"click\",\"#overtakeChangesEdit\",(e)=>{\r\n Model().overtakeChangesListDetail(btnPressed);\r\n });\r\n\r\n //STOP EDITING (BUTTON \"FERTIG\") (DETAILVIEW / HELPSEEKER)------------------------------------------------------\r\n //HIDES ALL EDIT-BUTTONS AGAIN\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\"#editing\",(e)=>{\r\n Model().finishedEditing(e.currentTarget);\r\n });\r\n\r\n //DELETE A LIST (DETAILVIEW / HELPSEEKER)-----------------------------------------------------------------------\r\n //HIDES THE DETAILVIEW AND DELETE ITS CONTENT (AFTER THE USER CONFIRMS), ALSO DELETES\r\n //THE LIST IN THE LISTVIEW SO THE DETAILVIEW WONT BE ACCESSABLE ANYMORE\r\n //DELETES ALSO LIST IN THE LISTLIST-MAP\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\".detailView .delete\",(e)=>{\r\n Model().deleteListFromDetailView(e.currentTarget);\r\n });\r\n\r\n //OVERTAKE A LIST (DETAILVIEW / HELPER)-------------------------------------------------------------------------\r\n //CHANGES THE LISTSTATUS TO OVERTAKEN, THE DESIGN IN THE DETAILVIEW BUT ALSO IN THE LISTVIEW CHANGES\r\n //(OTHER COLORS / HIDE BUTTONS -> A HELPSEEKER IS NOW UNABLE TO EDIT / DELETE A LIST!)\r\n //ALSO THE INPUTFIELD FOR THE TOTAL PRICE IS NOW VISIBLE.\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\".overtake\",(e)=>{\r\n Model().overtakeList(e.currentTarget);\r\n });\r\n\r\n //CANCEL A LIST (DETAILVIEW / HELPER)---------------------------------------------------------------------------\r\n //CHANGES THE LISTSTATUS TO FREE, THE DESIGN IN THE DETAILVIEW IS NOW AS AT THE BEGINNING\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\"#isOvertaken\",(e)=>{\r\n Model().cancelList(e.currentTarget);\r\n });\r\n\r\n //BACK TO THE LISTVIEW (BUTTON ZURÜCK)(DETAILVIEW)--------------------------------------------------------------\r\n //HIDES THE DETAILVIEW AND DELETES ITS CONTENT\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\".backToAllLists\",(e)=>{\r\n Model().backToAllLists();\r\n });\r\n\r\n //SEND TOTAL PRICE (DETAILVIEW / HELPER)------------------------------------------------------------------------\r\n //HELPER CAN SEND THE TOTAL PRICE TO COMPLETE THE LIST. HE HAS TO ENTER SOMETHING IN THE INPUT BEFORE SENDING IT\r\n //AFTERWARDS, THE LIST IS \"LOCKED\" - THE DESIGN IS CHANGED SO NEITHER THE HELPER NOR THE HELPSEEKER CAN\r\n //CHANGE SOMETHING. THE ONLY THING POSSIBLE IS TO LOOK AT THE LISTDETAILS. PRICE IS SAVED FOR THE LIST.\r\n //INPUT PARAMETERS: VOID\r\n //OUTPUT PARAMETERS: VOID\r\n\r\n View().DOM.document.on(\"click\",\"#sendPrice\",(e)=>{\r\n Model().sendPaidPrice(e.currentTarget);\r\n });\r\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "faeb85d308244d24190a29f711f112fc", "score": "0.47214723", "text": "async show ({ params, request, response, view }) {\n }", "title": "" }, { "docid": "1b2facae4c1f558c5d6ddf50611f5559", "score": "0.47022665", "text": "_init() {\n this.$tutorialView = $(TUTORIAL_TEMPLATE);\n this.$tutorialPrevious = this.$tutorialView.find(SELECTORS.DOM_SELECTORS.PREV);\n this.$tutorialNext = this.$tutorialView.find(SELECTORS.DOM_SELECTORS.NEXT);\n this.$toggleTutorial = $(SELECTORS.DOM_SELECTORS.TOGGLE_TUTORIAL);\n\n this.tutorial = tutorial;\n this.tutorial.steps = [];\n this.tutorial.step = 0;\n this.tutorial.liverefs = {};\n this.tutorial.open = false;\n\n return this;\n }", "title": "" }, { "docid": "e46949f75e016a74400d2d63a81ff79d", "score": "0.47017074", "text": "constructor() {\n super();\n\n this._cinemaModel = new CinemaModel();\n this.state = {\n address: '',\n authorID: '',\n hallCount: '',\n id: '',\n name: '',\n pathToAvatar: '',\n };\n this.getCinemaCommand = {exec: (id) => this.getCinema(id)};\n }", "title": "" }, { "docid": "b2465a2d406ae16dff008a52d1b7a909", "score": "0.46919852", "text": "function LANDING_I___app_main() \n {\n //=========================\n // //\\\\ home8lemmas\n // //\\\\ sets ids and titles\n //===============================\n //ns.url2conf( fconf );\n sn( 'pathToContentSite', fconf, '.' );\n sn( 'sappId', fconf, 'home-pane' );\n ssF.spawns_lemsDefArr(); //converts ix to id, lemma ix \"is well established\"\n var lemBriefDef = fconf.sappId2lemmaDef[ fconf.sappId ];\n sapp.ix = lemBriefDef.ix;\n document.title = lemBriefDef.caption;\n fconf.sappIdUnCamel = nsmethods.camelName2cssName( fconf.sappId );\n //=========================\n // \\\\// sets ids and titles\n //===============================\n\n //===============================\n // //\\\\ preconstructs home8lemmas\n //===============================\n engCssMs.dispatchesHome8LemmaCss();\n html.builds_body_4_home8lemma();\n html.builds_homePane();\n //===============================\n // \\\\// preconstructs home8lemmas\n // \\\\// home8lemmas\n //=========================\n\n if( fconf.sappId === 'home-pane' ) {\n //// home. apparently does not do any modules landing-load\n LANDING_VII___landingFlag_8_nextLemmaButtons();\n sDomN.homeButton$().click();\n ns.doScrollToHash();\n } else {\n if( !haz( fconf, 'lemmaHasHomeButton' ) ) {\n sDomN.homeButton$.css( 'display', 'none' );\n }\n //// lemma\n LANDING_II___main_lemma( lemBriefDef );\n }\n }", "title": "" }, { "docid": "4e6e4b0aaf6247b22b61b74533dc3daf", "score": "0.4685153", "text": "function init() {\n\t\tif ($routeParams.id) {\n\t\t\t$scope.getabout_us($routeParams.id);\n\t\t};\n\t\t$scope.getAllabout_us();\n\t}", "title": "" }, { "docid": "f6f6276d2b9d30c806a3e1d31e581df0", "score": "0.46824104", "text": "constructor() {\n super();\n this.talk = {};\n this.isFavourited = false;\n this.analytics = {};\n }", "title": "" }, { "docid": "e89cb498a7ba455992a12601a20ba943", "score": "0.46822244", "text": "function init() {\n giftService.getIdeas().then(function(giftideas) {\n $scope.giftideas = giftideas.data;\n });\n }", "title": "" }, { "docid": "243e6c992d464568b32994c68ee4d98e", "score": "0.46820953", "text": "function afterLanguagesAreSet() {\n\n /**\n * An array of the currently collapsed courses.\n * @type {Array}\n */\n ctrl.collapsedCourses = [];\n\n // An array of available language objects. This makes them accessable in the view.\n ctrl.languages = $rootScope.languages;\n\n // An array of reference types\n ctrl.referenceTypes = [];\n\n /**\n * The current language currently used in view.\n * @type {Object}\n */\n ctrl.currentLanguage = undefined;\n\n /**\n * The current subject for the view.\n * @type {Object}\n */\n ctrl.currentSubject = undefined;\n\n /**\n * The current lesson instance displayed in the view\n * @type {Object}\n */\n ctrl.currentLessonInstance = undefined;\n\n $http.get('/api/subjectPage/referenceTypes').then(function (response) {\n ctrl.referenceTypes = response.data;\n });\n\n // Get course, lessons, and lessons languages\n $http.get(\"/api/subjectPage/subject?id=\" + $routeParams.subject).then(function (results) {\n\n ctrl.currentSubject = results.data;\n console.log('Subject', ctrl.currentSubject);\n\n (function setCurrentLanguage() {\n if ($routeParams.language) {\n ctrl.currentLanguage = ctrl.languages.filter(function (l) { return l.id == parseInt($routeParams.language); })[0]; // Set by url\n } else {\n ctrl.currentLanguage = ctrl.languages.filter(function (l) { return l.id == ctrl.currentSubject.subjectInstances[0].language; })[0]; // else set to first subjectInstance's language\n }\n })();\n (function setCurrentSubjectInstance() {\n ctrl.currentSubjectInstance = ctrl.currentSubject.subjectInstances.filter(function (s) {\n return s.language == ctrl.currentLanguage.id;\n })[0];\n console.log('Subject Instance', ctrl.currentSubjectInstance);\n })();\n (function setCurrentCategoryAndUpdateBreadcrum() {\n $http.get('/api/categories/' + ctrl.currentSubject.category).then(function (response) {\n ctrl.currentCategory = response.data;\n $rootScope.breadcrumbItems.category = ctrl.currentCategory;\n $rootScope.breadcrumbItems.subject = ctrl.currentSubject;\n });\n })();\n\n // Get Courses in current Subject and everything else\n $http.get(\"/api/subjectPage/coursesForSubject?subject=\" + ctrl.currentSubject.id).then(function (results) {\n (function setCurrentSubjectsCourses() {\n ctrl.currentSubject.Courses = results.data; // save courses\n console.log('Courses', ctrl.currentSubject.Courses); // Log the courses\n })();\n var courseIds = []; // get course IDs (to build url query to get all lessons).\n ctrl.currentSubject.Courses.forEach(function (course) { return courseIds.push(course.id); });\n $http.get(\"/api/subjectPage/lessonsForCourses?courses=[\" + courseIds + \"]\").then(function (results) {\n (function populateCoursesWithLessons() {\n results.data.forEach(function (lesson) {\n var parentCourse = ctrl.currentSubject.Courses.filter(function (course) { return course.id == lesson.course; })[0];\n if (!parentCourse.Lessons) parentCourse.Lessons = [];\n parentCourse.Lessons.push(lesson);\n });\n })();\n (function sortLesson() {\n ctrl.currentSubject.Courses.forEach(function (course) {\n course.Lessons = course.Lessons.sort(function (a, b) { return a.sequenceNumber > b.sequenceNumber ? 1 : 0; });\n });\n })();\n (function setCurrentLesson() {\n if ($routeParams.lesson) {\n ctrl.currentSubject.Courses.forEach(function (course) {\n course.Lessons.forEach(function (l) {\n if (l.id == $routeParams.lesson) {\n (function collapseOtherCourses() {\n ctrl.currentSubject.Courses.forEach(function (c) {\n if (c.id != course.id) {\n if (ctrl.collapsedCourses.indexOf(c.id) == -1) ctrl.collapsedCourses.push(c.id);\n }\n });\n })();\n ctrl.setCurrentLesson(l);\n }\n });\n });\n } else {\n var lessons = [];\n var unwatchedLessons = [];\n\n (function setLessons() {\n ctrl.currentSubject.Courses.forEach(function (course) {\n course.Lessons.forEach(function (lesson) {\n lessons.push(lesson);\n });\n });\n })();\n (function setUnwatchedLessons() {\n unwatchedLessons = lessons.filter(function (lesson) {\n var lessonInstanceInCurrentLanguage = ctrl.getLessonInstance(lesson);\n return !lessonInstanceInCurrentLanguage.watched; // get unwatched lessons\n });\n })();\n\n if (unwatchedLessons.length > 0 && (unwatchedLessons.length < lessons.length)) {\n ctrl.setCurrentLesson(unwatchedLessons[0]);\n } else {\n ctrl.setCurrentLesson(lessons[0]);\n }\n }\n })();\n (function setCurrentLessonInstance() {\n ctrl.currentLessonInstance = ctrl.currentLesson.lessonInstances.filter(function (ll) { return ll.language == ctrl.currentLanguage.id; })[0];\n if (!ctrl.currentLessonInstance) {\n ctrl.setCurrentLanguageById(ctrl.currentLesson.lessonInstances[0].language); // set the language to the first lesson's first language\n }\n ctrl.currentLessonInstance.trustedFileUrl = $sce.trustAsResourceUrl(ctrl.currentLessonInstance.fileURL);\n })();\n (function setHighlightedCourseAndCollapseOthersIfNecesssary() {\n (function setHighlightedCourse() {\n if ($routeParams.course) {\n ctrl.highlightedCourse = parseInt($routeParams.course);\n }\n })();\n (function collapseOtherCourses() {\n if (ctrl.highlightedCourse) {\n ctrl.collapsedCourses = ctrl.currentSubject.Courses.filter(function (course) {\n return course.id != ctrl.highlightedCourse;\n }).map(function (course) {\n return course.id;\n });\n }\n })();\n })();\n (function setSettingsForVideoPlayer() {\n ctrl.videoSettings = ctrl.getVideoSettings();\n })();\n (function setReferencesPerLessonInstance() {\n var lessonInstanceIDs = []; // get course IDs (to build url query to get all lessons).\n ctrl.currentSubject.Courses.forEach(function (course) {\n course.Lessons.forEach(function (lesson) {\n lesson.lessonInstances.forEach(function (li) {\n lessonInstanceIDs.push(li.id);\n });\n });\n });\n\n // Set lesson instance references\n $http.get('/api/subjectPage/referencesForLessonInstances?lessonInstances=[' + lessonInstanceIDs + ']').then(function (response) {\n ctrl.currentSubject.Courses.forEach(function (course) {\n course.Lessons.forEach(function (lesson) {\n lesson.lessonInstances.forEach(function (li) {\n li.references = response.data.filter(function (reference) { return reference.lessonInstance == li.id; });\n });\n });\n });\n });\n })();\n }, function (error) { return console.error(error); });\n }, function (e) { return console.error(e); });\n });\n }", "title": "" }, { "docid": "0fa0bbc9086e10936adbada7f7c852ce", "score": "0.46749294", "text": "constructor(props) {\n super(props);\n this.state = {\n emotion: \"+1\",\n exercise: \"\",\n body: [\"\"],\n tags: \"\",\n isPublic: true,\n };\n this.routeChange = this.routeChange.bind(this);\n }", "title": "" }, { "docid": "a89c72116f1ef505986138020cfe4352", "score": "0.4673031", "text": "function start() {\n\t\t\t\t$state.go('learn');\n\t\t\t}", "title": "" }, { "docid": "bff3a13ae1a6ed3b5ffb386fb13b6945", "score": "0.46608895", "text": "function classView(){\n //Add static hit and stay buttons to the page, as well as text\n $(\"#buttonContainer\").append(\"<button name='hit' >Hit!</button>\\n <button name='stay' >Stay!</button>\");\n $(\"#dealerContainer\").append(\"<div> Dealer Hand: </div>\");\n $(\"#playerContainer\").append(\"<div> Player Hand: </div>\");\n $(\"#restartContainer\").append(\"<button name='replay' >Replay!</button>\");\n \n //add listeners for button clicks, and notify the controller when an action has occurred\n $( \"button[name='hit']\" ).click(function() {\n controller.hitHandler();\n });\n \n $( \"button[name='stay']\" ).click(function() {\n controller.stayHandler();\n });\n \n $( \"button[name='replay']\" ).click(function() {\n controller.restart();\n });\n this.hideRestart();\n \n }", "title": "" }, { "docid": "d456622011e9101c4b541afe5c0b3974", "score": "0.46599004", "text": "function ControllerPart() {}", "title": "" }, { "docid": "9e85fc120a8536c96f8067aa12443c7c", "score": "0.46565032", "text": "async show ({ params, request, response, view }) {}", "title": "" }, { "docid": "a86115c4a5062bf4c2b55bf8986506ad", "score": "0.46466276", "text": "vaciarDespacho(state) {\n state.despacho = new Despacho('', '', '', '', '', false, false)\n }", "title": "" }, { "docid": "af2aa9a200186526c04aaad4eb10517a", "score": "0.4645573", "text": "constructor(props) {\n super(props);\n this.Metodo = this.Metodo.bind(this);\n this.MetodoCambiarVentana = this.MetodoCambiarVentana.bind(this);\n }", "title": "" }, { "docid": "7bc8ed80b1340f8b01bbac4f5c020785", "score": "0.46444076", "text": "function PrivateConstructor()\n\t{\n\t\t/************************************\n\t\t\tPrivate Properties\n\t\t************************************/\n\t\t\n\t\t/**\n\t\t\tA private reference to this object\n\t\t\t@private\n\t\t*/\n\t\tvar _detailViewManager = this;\n\t\t\n\t\tvar _backButtonInitialized = false;\n\t\t\n\t\t/**\n\t\t\tA reference to the ViewStateManager instance which controls the view state of the Happenings Page.\n\t\t\t@private\n\t\t*/\n\t\tvar _viewStateManager = ViewStateManager.getInstance();\n\n\t\t/************************************\n\t\t\tPublic Properties\n\t\t************************************/\n\t\t\n \n\t\t/************************************\n\t\t\tPrivate Methods\n\t\t************************************/\n\t\t\n\t\t/**\n\t\t\tUpdates the Announcement Detail DOM elements with data from the given UserAnnouncement object.\n\t\t\t@param\t\t{UserAnnouncement}\tp_announcement\tThe UserAnnouncement to show the deatils of on the page.\n\t\t*/\n\t\tvar _updateAnnouncementDetailView = function(p_announcement)\n\t\t{\n\t\t\t$(\"#announcementDetailTemplate\").find(\"ul\").attr(\"title\", p_announcement.subject);\n\t\t\t$(\"#announcementDetailSubject\").html(p_announcement.subject);\n\t\t\t$(\"#announcementDetailSubmitter\").html(p_announcement.submitter);\n\t\t\t$(\"#announcementDetailText\").html(p_announcement.text);\n\t\t\t$(\"#announcementDetailCourseName\").html(p_announcement.courseTitle);\n\t\t\t$(\"#announcementDetailDate\").html(p_announcement.startDateFormatted);\n\t\t\t\n\t\t\t_viewStateManager.changeToViewState(ViewStateManager.VIEW_STATE_ANNOUNCEMENT_DETAIL);\n\t\t};\n\n \t\t/**\n\t\t\tUpdates the Dropbox Submission Detail DOM elements with data from the given DropboxSubmission object.\n\t\t\t@param\t\t{DropboxSubmission}\tp_submission\tThe DropboxSubmission to show the deatils of on the page.\n\t\t*/\n\t\tvar _updateSubmissionDetailView = function(p_submission)\n\t\t{\n\t\t $(\"#dropboxSubmissionDetailSubmitter\").html(p_submission.submitterNameFormatted);\n\t\t $(\"#dropboxSubmissionDetailBasketTitle\").html(p_submission.basketTitle);\n\t\t $(\"#dropboxSubmissionDetailComments\").html(p_submission.comments);\n\t\t $(\"#dropboxSubmissionDetailCourseTitle\").html(p_submission.courseTitle);\n\t\t $(\"#dropboxSubmissionDetailSubmissionDate\").html(p_submission.submissionDateFormatted);\n\n\t\t\t_viewStateManager.changeToViewState(ViewStateManager.VIEW_STATE_DROPBOX_DETAIL);\n\t\t};\n\n /**\n Updates the Grade Detail DOM elements with data from the given ItemGrade object.\n @param {ItemGrade} p_itemGrade The ItemGrade to show the details of on the page.\n */\n var _updateGradeDetailView = function(p_itemGrade) {\n $(\"#gradeDetailTemplate\").find(\"ul\").attr(\"title\", \"Grade - \" + p_itemGrade.title);\n $(\"#gradeDetailTypeName\").html(\"Grade\");\n $(\"#gradeDetailSubject\").html(p_itemGrade.title);\n if (p_itemGrade.letterGrade.isNullOrEmpty())\n $(\"#gradeDetailLetterGrade\").html(\"\");\n else\n $(\"#gradeDetailLetterGrade\").html(\"Letter Grade: \" + p_itemGrade.letterGrade + \"<br/>\");\n if (p_itemGrade.numericGrade.isNullOrEmpty())\n $(\"#gradeDetailNumericGrade\").html(\"\");\n else\n $(\"#gradeDetailNumericGrade\").html(\"Numeric Grade: \" + p_itemGrade.numericGrade + \"<br/>\");\n $(\"#gradeDetailComments\").html(\"Comments:<br/>\" + p_itemGrade.comments);\n $(\"#gradeDetailCourseName\").html(p_itemGrade.courseTitle);\n $(\"#gradeDetailDate\").html(p_itemGrade.updatedDateFormatted);\n\n _viewStateManager.changeToViewState(ViewStateManager.VIEW_STATE_GRADE_DETAIL);\n };\n\n /**\n\t\t\tUpdates the Announcement Detail DOM elements with data from the given UserAnnouncement object.\n\t\t\t@param\t\t{UserAnnouncement}\tp_announcement\tThe UserAnnouncement to show the deatils of on the page.\n */\n var _updateCourseItemDetailView = function(p_courseItem)\n {\n var unitTitle = \"\";\n var title = \"\";\n unitTitle = p_courseItem.parentTitle;\n title = unitTitle + \" - \" + p_courseItem.title;\n if (p_courseItem.id == p_courseItem.parentId) //if this is a unit don't display the title twice (e.g. title - title)\n {\n title = p_courseItem.title;\n }\n $(\"#announcementDetailTemplate\").find(\"ul\").attr(\"title\", p_courseItem.title);\n $(\"#happeningSoonDetailTitle\").html(title);\n $(\"#happeningSoonDetailFormattedDate\").html(p_courseItem.scheduledEventType + \" \" + p_courseItem.scheduledDateFormatted);\n\n if (p_courseItem.startDate != 0)\n {\n var start = new Date(p_courseItem.startDate);\n $(\"#happeningSoonStartDateDetail\").html(\"Start: \" + start.formatDate(\"MMM dd, yyyy\")); //_formatDate(start,\"MMM dd, yyyy hh:mm:ssa\"));\n $(\"#happeningSoonStartDateDetail\").show();\n }\n else\n {\n $(\"#happeningSoonStartDateDetail\").hide();\n }\n if (p_courseItem.endDate != 0)\n {\n var end = new Date(p_courseItem.endDate);\n $(\"#happeningSoonEndDateDetail\").html(\"End: \" + end.formatDate(\"MMM dd, yyyy\"));\n $(\"#happeningSoonEndDateDetail\").show();\n }\n else\n {\n $(\"#happeningSoonEndDateDetail\").hide();\n }\n if (p_courseItem.dueDate != 0)\n {\n var due = new Date(p_courseItem.dueDate);\n $(\"#happeningSoonDueDateDetail\").html(\"Due: \" + due.formatDate(\"MMM dd, yyyy\"));\n $(\"#happeningSoonDueDateDetail\").show();\n }\n else\n {\n $(\"#happeningSoonDueDateDetail\").hide();\n }\n\n $(\"#happeningSoonDetailCourseName\").html(p_courseItem.courseTitle);\n \n _viewStateManager.changeToViewState(ViewStateManager.VIEW_STATE_SCHEDULER_DETAIL);\n };\n\n\t\t/**\n\t\t\tUpdates the Announcement Detail DOM elements with data from the given UserAnnouncement object.\n\t\t\t@param\t\t{UserAnnouncement}\tp_announcement\tThe UserAnnouncement to show the deatils of on the page.\n\t\t*/\n\t\tvar _updateTopicDetailView = function(p_userTopic)\n\t\t{\n\t\t var recentResponseCount = p_userTopic.responseCounts.last24HourResponseCount;\n\t\t\n\t\t var responseCountDescription;\n\t\t if(recentResponseCount == 1)\n\t\t {\n\t\t responseCountDescription = \"1 response has been posted in the past 24 hours.\";\n\t\t }\n\t\t else\n\t\t {\n\t\t responseCountDescription = recentResponseCount + \" responses have been posted in the past 24 hours.\";\n\t\t }\n\t\t \n\t\t $(\"#recentResponsesDetailCount\").html(recentResponseCount);\n\t\t $(\"#recentResponsesDetailTitle\").html(p_userTopic.containerInfo.contentItemTitle + \" - \" + p_userTopic.title);\n\t\t $(\"#recentResponsesDetailCountDescription\").html(responseCountDescription);\n\t\t $(\"#recentResponsesDetailTopicLink\").html(\"Go to \" + p_userTopic.title);\n\t\t $(\"#recentResponsesDetailTopicLink\").data(\"userTopicId\", p_userTopic.id);\n\t\t $(\"#recentResponsesDetailCourseTitle\").html(p_userTopic.containerInfo.courseTitle);\n\t\t $(\"#recentResponsesDetailTime\").html((new Date()).getFormattedTime());\n\n\t\t\t_viewStateManager.changeToViewState(ViewStateManager.VIEW_STATE_RECENT_RESPONSE_DETAIL);\n\t\t};\n\n\t\t/**\n\t\t\tUpdates the Response Detail DOM elements with data from the given UserThreadResponse object.\n\t\t\t@param\t\t{UserThreadResponse}\tp_response\tThe UserThreadResponse to show the deatils of on the page.\n\t\t*/\n\t\tvar _updateResponseDetailView = function(p_response)\n\t\t{\n\t\t $(\"#responsesToMeDetailTitle\").html(p_response.topic.containerInfo.contentItemTitle + \" - \" + p_response.topic.title);\n\t\t $(\"#responsesToMeDetailAuthor\").html(p_response.author.firstName + \" \" + p_response.author.lastName);\n\t\t $(\"#responsesToMeDetailParentSubject\").html(p_response.parentResponseTitle);\n\t\t $(\"#responsesToMeDetailResponseLink\").html(\"Go to \" + p_response.topic.title);\n\t\t $(\"#responsesToMeDetailResponseLink\").data({\n\t\t\t\t\"responseId\": p_response.id,\n\t\t\t\t\"courseId\": p_response.topic.containerInfo.courseId,\n\t\t\t\t\"happeningsItemId\": HappeningItem.THREADRESPONSE_TYPE + \"-\" + p_response.id\n\t\t\t});\n\t\t\t$(\"#responsesToMeDetailCourseTitle\").html(p_response.topic.containerInfo.courseTitle);\n\t\t $(\"#responsesToMeDetailDate\").html(p_response.postedDateFormatted);\n\n\t\t\t_viewStateManager.changeToViewState(ViewStateManager.VIEW_STATE_RESPONSE_TO_MY_RESPONSE_DETAIL);\n\t\t};\n\n var _getUpdateDetailViewFunctionForItem = function(p_item)\n {\n switch(p_item.type)\n {\n case HappeningItem.ANNOUNCEMENT_TYPE:\n return _updateAnnouncementDetailView;\n break;\n case HappeningItem.DROPBOX_TYPE:\n return _updateSubmissionDetailView;\n break;\n case HappeningItem.GRADE_TYPE:\n return _updateGradeDetailView;\n break;\n case HappeningItem.COURSEITEM_TYPE:\n return _updateCourseItemDetailView;\n break;\n case HappeningItem.THREADTOPIC_TYPE:\n return _updateTopicDetailView;\n break;\n case HappeningItem.THREADRESPONSE_TYPE:\n return _updateResponseDetailView;\n break;\n }\n };\n \n var _backButtonClickHandler = function()\n {\n\t\t\t_viewStateManager.changeToViewState(_viewStateManager.getPreviousViewState());\n };\n\t\t\n\t\t/************************************\n\t\t\tPublic Methods\n\t\t************************************/\n\t\t\n\t\t/**\n\t\t\tDisplays a detailed view on the UI for a specific HappeningItem.\n\t\t\t@param\t{HappeningItem}\t\tp_item\t\tThe item to show a detail view of\n\t\t*/\n\t\tthis.displayDetailView = function(p_item)\n\t\t{\n\t\t\tif (!_backButtonInitialized)\n\t\t\t{\n\t\t\t\t_backButtonInitialized = true;\n\t\t\t\t$(\"#backButton\").bind(\"click\", _backButtonClickHandler);\n\t\t\t}\n\t\t\t\t\n\t var updateDetailFunction = _getUpdateDetailViewFunctionForItem(p_item);\n\t\t updateDetailFunction(p_item.domainObject);\n\t\t};\n\t\t\n\t}", "title": "" }, { "docid": "cca837f9aa3f25c471ca5643a375106e", "score": "0.4639655", "text": "function AnalysisController($scope, stateService, changesService) {\n stateService.installInfos($scope);\n\n this.currentKms = 0;\n this.maxKms = 100;\n\n this.$routerOnActivate = (next, previous) => {\n this.bib = Number(next.params.bib);\n\n changesService.installAndCheck($scope, \"analysis\", \"analysis-\" + this.bib);\n\n $scope.$watch(\"analysis\",\n analysis => {\n if (analysis) {\n this.analysis = analysis;\n this.needsFixing = analysis.anomalies > 0;\n var after = analysis.after;\n if (after.length > 0)\n this.currentKms = after[after.length - 1].distance;\n else\n this.currentKms = 0;\n if ($scope.infos !== undefined) {\n var raceId = analysis.race_id;\n this.maxKms = $scope.infos.kms_lap*($scope.infos.races_laps[raceId]-1) +\n $scope.infos.kms_offset[$scope.infos.kms_offset.length - 1];\n }\n }\n });\n\n };\n}", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "0c90d1ccf6b3793ec9eb6efa81006a0f", "score": "0.4638189", "text": "async create ({ request, response, view }) {\n }", "title": "" }, { "docid": "9e55ffe9ac86a048696a11744d6aea9d", "score": "0.46371335", "text": "function YesNoStructureTermController(){\r\n}", "title": "" }, { "docid": "d3586e3f958b41cb8f7f53cec41b301e", "score": "0.46348393", "text": "function MC() {\n\tthis.content = {};\n\tthis.properties = {};\n\tthis.correctResponse = [];\n\tthis.choices = [];\n\tthis.attempts = [];\n\tthis.states = [];\n\n\t//boolean to prevent shuffling after each answer submit\n\tthis.previouslyRendered = false;\n}", "title": "" }, { "docid": "966dc797ff123c52c6fec542eaa2ed47", "score": "0.46327922", "text": "constructor () {\n this.instances = new MastodonInstances(this);\n this.utils = new Utils(this);\n this.mastodon = new MastodonApi(this);\n this.data = new BotData(this);\n this.command = new CommandHandler(this);\n\n this.cache = {};\n\n // Bot info\n this.versionCode = 1;\n this.version = '1.0.0';\n this.site = 'https://mastostats.ftp.sh';\n this.bugTracker = 'https://github.com/mlaunois/mastostats/issues';\n this.copyright = 'Copyright (c) 2019 Maxime Launois';\n }", "title": "" }, { "docid": "51c0c63bdad237afba94439d7af55884", "score": "0.4628254", "text": "function loadView() {\n\t\t\n\t\tvar srv1 = comc.requestLiteList('NOTFAPLI', $scope.cntx);\n\t\tvar srv2 = comc.requestLiteList('NOTFTIPO', $scope.cntx);\n\t\t\n\t\t$q.all([srv.stResp(true, srv1, srv2)]).then(function(){\n\t\t\t$scope.cntx.form.get('apli').data = $scope.cntx.data.get('ltLNotfapli')[0].clav;\n\t\t\t\n\t\t\tvar srv3 = comc.request('notf/list', $scope.cntx);\n\t\t\t$q.all([srv.stResp(true, srv3)]).then(function() {\n\t\t\t\tview();\n\t\t\t})\n\t\t});\n\t}", "title": "" }, { "docid": "5ab1a946496a63293f73ca90c05e0812", "score": "0.46277738", "text": "constructor(){\n this.chain = [this.createGenesisBlock()];\n this.difficulty = 2;\n this.pendingTransactions = [];\n this.miningReward = 100;\n }", "title": "" }, { "docid": "e036fa18b724415055c8695a5b80d7b5", "score": "0.462484", "text": "function Controller() {\n\n }", "title": "" }, { "docid": "9fa70be96d5117a564a23b8d98dce45d", "score": "0.462196", "text": "get view() {\n return this._cv;\n }", "title": "" }, { "docid": "1908f471f3ffe0cf3545d684889f6f17", "score": "0.4621284", "text": "function initializeView(){\n\n var fileName;\n function dataFileName() {\n var url = document.location.href,\n params = url.split('?')[1].split('&'),\n data = {}, tmp;\n for (var i = 0, l = params.length; i < l; i++) {\n tmp = params[i].split('=');\n data[tmp[0]] = tmp[1];\n }\n fileName=data.name;\n }\n dataFileName();\n\n replacedFileName = checkFileValidity(fileName);\n\n //Reads the scan data from the firebase server\n promise=readdata(replacedFileName);\n\n //Reads data from the metadata file\n readMetaData(fileName.split(\"_\")[0]);\n\n //This block will set the evaluation parameter\n evaluation = false;\n stenosis = true;\n let abnormailityLocation;\n if(stenosis){\n abnormailityLocation = readStenosisData(fileName.split(\"_\")[0]);\n }\n else{\n abnormailityLocation = readAneurysmData(fileName.split(\"_\")[0]);\n }\n\n\n\n //console.log(stenosisLocation)\n\n // The stenosis condition is designed for checking if there is an evaluation condition to evaluate\n if(evaluation) {\n abnormailityLocation.then(function (r1) {\n\n console.log(r1)\n\n let condition = stenosis ? \"stenosis\":\"aneurysm\";\n stenosisArray = r1[\"Arteries\"].split(\"-\").map(function(d){return parseInt(d)});\n\n promise.then(function (data) {\n\n //Define projection and view, view options are Normal,Symmetry and projection options are : back,top\n viewspecs = new viewSpec(\"back\", \"Normal\", \"arcsD\");\n view = viewspecs.getView();\n projection = viewspecs.getProjection();\n\n\n\n // //Define the global data access structures at one place and access them whererever they are required\n globalDataStructures = new defineGlobalAccessDataStructures(data, projection,parseInt(r1['Parent']));\n\n\n //First gather the clustering information and then send it to\n //let clusteringData = clusterNodes(globalDataStructures.fetchRightICChildNodes(),globalDataStructures.fetchArteryStorageByIndex());\n\n drawBrainMap(globalDataStructures, viewspecs, 'brainmap', globalDataStructures.fetchDataForArteries(), globalDataStructures.fetchArteryWidth(), 1, globalDataStructures.fetchArteryStorageByIndex(),stenosisArray,condition)\n drawLabelsBrainMap(\"back\", \"brainmap\", \"#252525\");\n\n //Drawing dendrograms\n drawDendrogram(globalDataStructures, view,stenosisArray,condition);\n\n //Testing the arcs in the main visualization area\n\n //drawBrainMap(globalDataStructures,viewspecs, 'dendrogram', globalDataStructures.fetchDataForCOW(), globalDataStructures.fetchArteryWidth(),3)\n\n });\n });\n }\n else {\n promise.then(function (data) {\n //Define projection and view, view options are Normal,Symmetry and projection options are : back,top\n viewspecs = new viewSpec(\"back\", \"Normal\", \"arcsD\")\n view = viewspecs.getView();\n projection = viewspecs.getProjection();\n\n\n // //Define the global data access structures at one place and access them whererever they are required\n globalDataStructures = new defineGlobalAccessDataStructures(data, projection);\n\n\n //First gather the clustering information and then send it to\n //let clusteringData = clusterNodes(globalDataStructures.fetchRightICChildNodes(),globalDataStructures.fetchArteryStorageByIndex());\n\n drawBrainMap(globalDataStructures, viewspecs, 'brainmap', globalDataStructures.fetchDataForArteries(), globalDataStructures.fetchArteryWidth(), 1, globalDataStructures.fetchArteryStorageByIndex());\n drawLabelsBrainMap(\"back\", \"brainmap\", \"#252525\");\n\n //Drawing dendrograms\n drawDendrogram(globalDataStructures, view);\n\n //Testing the arcs in the main visualization area\n\n //drawBrainMap(globalDataStructures,viewspecs, 'dendrogram', globalDataStructures.fetchDataForCOW(), globalDataStructures.fetchArteryWidth(),3)\n\n });\n\n }\n}", "title": "" }, { "docid": "d207ff56814e7be821181b32ca42cfc5", "score": "0.46163648", "text": "function main() {\n\n // Step 1: Load Your Model Data\n // The default code here will load the fixtures you have defined.\n // Comment out the preload line and add something to refresh from the server\n // when you are ready to pull data from your server.\n //ViewBuilder.server.preload(ViewBuilder.FIXTURES) ;\n\n // TODO: refresh() any collections you have created to get their records.\n // ex: ViewBuilder.contacts.refresh() ;\n\n // Step 2: Instantiate Your Views\n // This default code simply finds your main pane and adds makes it visible\n // on the page. This will usually do everything you need, though you could\n // choose to show other views here as well, such as palettes.\n ViewBuilder.getPath('mainPage.mainPane').append(); \n\n // Step 3. Set the content property on your primary controller.\n // This will make your app come alive!\n \n}", "title": "" }, { "docid": "551085485f6787c911754a2c11932d3d", "score": "0.4614065", "text": "function respondenControllerInit(server, servant, interaction) {\n\tvar respondenHandler = viewer.init(\"Data responden\")\n\trespondenHandler.setColumnHead(\"No KTP\", \"Nama responden\", \"Gender\", \"No telepon\", \"Level responden\");\n\t// View rekap responden\n\tvar rekaprespondenURL = `${server.viewURL()}/responden/rekap`;\n\tconsole.log(rekaprespondenURL);\n\tconsole.log(server.handleError(\"Rekap responden\"));\n\t$http.get(rekaprespondenURL).error(server.handleError(\"Rekap responden\"))\n\t.success(function(data){\n\t\tconsole.log(\"Sukses mendapatkan rekap responden\");\n\t\tviewer.addExplanation(\"account_amount\", `Ada <b>${data.account_amount}</b> akun yang telah terdaftar`);\n\t\tviewer.addExplanation(\"admin_amount\", `Ada <b>${data.admin_amount}</b> akun yang berstatus <b>admin</b>`);\n\t\tviewer.addExplanation(\"responden_amount\", `Ada <b>${data.responden_amount}</b> akun yang berstatus <b>responden</b>`);\n\t\tviewer.addExplanation(\"surveyor_amount\", `Ada <b>${data.surveyor_amount}</b> akun yang berstatus <b>surveyor</b>`);\n\t});\n\t// Hemat mempri\n\trekaprespondenURL = null;\n\t// Create insert responden button\n\tvar topRightMenu = respondenHandler.document.querySelector(\"right-panel\")\n\t, insertRespondenBTN = document.createElement(\"button\");\n\tinsertRespondenBTN.classList.add('waterboom');\n\tinsertRespondenBTN.onclick = insertResponden.init;\n\ttopRightMenu.appendChild(insertRespondenBTN);\n\t// Create table\n\tvar viewResponden = RespondenHandler.createViewer(`${server.viewURL()}/responden/view`);\n\tviewResponden.see([[\"no_ktp\", \"No KTP\"], [\"nama_responden\", \"Nama responden\"], [\"gender\", \"Gender\"], [\"no_telepon\", \"No telepon\"]]);\n\tviewResponden.load();\n\tviewResponden.search(`${server.viewURL()}/responden/view/keyword`);\n\t// Display HTML View\n\tvar viewContainer = document.querySelector(\".view-responden\");\n\tviewContainer.appendChild(respondenHandler.document);\n\tservant.toggleLoader(false);\n}", "title": "" }, { "docid": "0a264317b350477f81a21d80ba6948d6", "score": "0.4611536", "text": "function main() {\n\t\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\t\tmsg = htmlModule.msg; // Logging\n\t\t\tmsg.set(\"Starting Module\");\n\t\t\thtmlModule.outputToContentDiv(\"Grading\");\n\t\t\t// Setup Form.\n\t\t\tgraderForm();\n\t\t}", "title": "" }, { "docid": "91873d547264861c0a0c749cd102af6d", "score": "0.46111345", "text": "function View(template) {\n\t\tthis.template = template;\n\t\tthis.$spaList = document.querySelector('.spa-list');\n\t\tthis.$counter = document.querySelector('.spa-list-count');\n\t\tthis.$newItem = document.querySelector('.new-item');\n\t}", "title": "" }, { "docid": "f2b8762ba6a662b1e64c6ca89161dee6", "score": "0.46100917", "text": "init() {\n // Prints the first page of the app wuth the total mount of questions\n this.view.printFirstPage(this.questions.length);\n\n // Add all the necessary event listener and ties them with the app logic\n this.view.delegateListener('click', '#play', () => this.startGame());\n this.view.delegateListener('click', '#check-answer', event => this.checkAnswer(event));\n this.view.delegateListener('click', '#next', () => this.nextQuestion());\n }", "title": "" }, { "docid": "48b5981eebb6b71fb6dc345a72a9fc94", "score": "0.4605407", "text": "createview(){\n this.view.init = new View($(\"#InitSrceen\"),[\n new Image($(\"#LogoImage\"), \"\",\"./img/poologobleu.png\",200,200),\n new TextArea($(\"#JoinGame\"),$(\"#btnip\"),\"ipinput\",\"w3-button w3-blue\",1,16,\"Connexion\",() =>{this.app.connect(this.view.init.getElem(1).toString().replace(/ /g,''))})\n ]);\n this.view.load = new View($(\"#loading\"),[]);\n\n this.view.header = new View($('#header'),[\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Compétences\",() => {this.btnHandler(\"header\",0,[\"competence\"]);}),\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Dons\",() => {this.btnHandler(\"header\",1,[\"don\"]);}),\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Sorts\",() => {this.btnHandler(\"header\",2,[\"sort\"]);}),\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Objets\",() => {this.btnHandler(\"header\",3,[\"objet\"]);})\n ]);\n\n this.view.competence = new View($('#competence'),[\n new Button($(\"#competence .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"competence\");})\n ]);\n\n this.view.don = new View($('#don'),[\n new Button($(\"#don .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"don\");})\n ]);\n\n this.view.sort = new View($('#sort'),[\n new Button($(\"#sort .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"sort\");})\n ]);\n\n this.view.objet = new View($('#objet'),[\n new Button($(\"#objet .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"objet\");})\n ]);\n\n this.view.main = new View($(\"#main\"),[\n new Image($(\"#PV_image\"), \"\",\"./img/PV.png\",75,75),\n new Image($(\"#CA_image\"), \"\",\"./img/CA.png\",75,75),\n new Image($(\"#PO_image\"), \"\",\"./img/coins.png\",75,75),\n new Image($(\"#Time_image\"), \"\",\"./img/clock.png\",75,75),\n new TextArea($(\"#PO_mod\"),$(\"#PO_mod\"),\"PO_modeur\",\"w3-button w3-blue PO_modeur\",1,3,\"-\",() =>{this.app.modPO(-parseInt($(\"textarea.PO_modeur\").val()))}),\n new Button($(\"#PO_mod\"),\"w3-button w3-blue PO_modeur\",\"+\",() => {this.app.modPO(parseInt($(\"textarea.PO_modeur\").val()))})\n ]);\n\n this.hideAll();\n }", "title": "" }, { "docid": "69d6d7a5b421771b0da168ca093da513", "score": "0.46015742", "text": "function HomeController() {}", "title": "" }, { "docid": "6649774a2a19eb6cf9cc282ddc449c44", "score": "0.45942065", "text": "get view () { return this.#view }", "title": "" }, { "docid": "fbfbbd02bfd36669ad5e02db39cc74ce", "score": "0.45938808", "text": "constructor(props) {\n super(props);\n this.onChangeAge = this.onChangeAge.bind(this);\n this.onChangeEmail = this.onChangeEmail.bind(this);\n this.onChangeGender = this.onChangeGender.bind(this);\n // this.onChangeCreativeSkills = this.onChangeCreativeSkills.bind(this);\n // this.onChangeCreativeTest = this.onChangeCreativeTest.bind(this);\n this.onChangeEducationGrade = this.onChangeEducationGrade.bind(this);\n this.onChangeJobArea = this.onChangeJobArea.bind(this);\n // this.onChangePersonalityAdjectives = this.onChangePersonalityAdjectives.bind(this);\n this.onSubmit = this.onSubmit.bind(this);\n this.changeLanguage = this.changeLanguage.bind(this);\n this.onChangeVP_Code = this.onChangeVP_Code.bind(this);\n\n this.state = {\n link: `/${this.props.match.params.studyid}/${\n this.props.match.params.groupid\n }/canu/congratz`,\n age: \"\",\n gender: \"\",\n // creative_test: \"\",\n // creative_skills: \"\",\n education_grade: \"\",\n job_area: \"\",\n vp_code: \"\"\n // personality_adjectives: []\n };\n }", "title": "" } ]
7d37a9239f2ee9e30b56c9f7618c2920
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information.
[ { "docid": "ac46148f7117162d52b458ef03591631", "score": "0.0", "text": "function computeStyles(theme, styleMap) {\n var styles = Object.create(null);\n for (var key in styleMap) {\n var value = styleMap[key];\n if (typeof value === 'string') {\n styles[key] = theme.getColor(value);\n }\n else if (typeof value === 'function') {\n styles[key] = value(theme);\n }\n }\n return styles;\n}", "title": "" } ]
[ { "docid": "e9006a0083af3523b8963996e92482e3", "score": "0.5458548", "text": "isSupported() {\n return true;\n }", "title": "" }, { "docid": "a8da3a494b4e64a48ea4b6c527214764", "score": "0.48376042", "text": "function _0x4d320b(_0x118194,_0x4d5573){0x0;}", "title": "" }, { "docid": "f13a4c1b62fa02db282882b95734abb6", "score": "0.48191863", "text": "static get NFRETS() { return 14; }", "title": "" }, { "docid": "3cf4e0fd34f8c72f80a4450ae76cad6c", "score": "0.4757853", "text": "function __t() {\n\n}", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4738907", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.46663052", "text": "constructor() {\n \n }", "title": "" }, { "docid": "abc1830306681c7a3f78840c581f87cb", "score": "0.4648159", "text": "decodeBinaryProperties() {\n // throw new Error(\"not implemented\");\n }", "title": "" }, { "docid": "84c7b930d100dd65f6a20dfd85e02f94", "score": "0.4636497", "text": "function __WL(){}", "title": "" }, { "docid": "acea12a3830da76524ca4b083974cfd7", "score": "0.463177", "text": "constructor(parent, objectDirectoryEntry) {\n //\n // Set the current WinObj parent\n //\n this.Parent = parent;\n this.DirectoryEntry = objectDirectoryEntry; // nt!_OBJECT_DIRECTORY_ENTRY\n let ObjectAddress = objectDirectoryEntry.Object.address;\n let ObjectHeaderAddress = GetObjectHeaderAddress(ObjectAddress);\n this.ObjectHeader = host.createTypedObject(ObjectHeaderAddress, \"nt\", \"_OBJECT_HEADER\"); // nt!_OBJECT_HEADER\n this.ObjectType = GetTypeFromIndex(this.ObjectHeader.TypeIndex, (g_Version.Release >= 10000) ? ObjectHeaderAddress : null); // nt!_OBJECT_TYPE\n this.TypeName = this.ObjectType.Name.toString().slice(1, -1);\n this.OptionalHeaders = {};\n\n try {\n var StructObj = TypeToStruct[this.TypeName];\n this.NativeObject = host.createTypedObject(ObjectAddress, StructObj[0], StructObj[1]);\n }\n catch (e) {\n // warn(`Failed to create type '${this.TypeName} (${StructObj})': reason, ${e}`);\n this.NativeObject = ObjectAddress;\n }\n\n if (this.HasCreatorInfo) {\n let OptionalHeaderAddress = this.ObjectHeader.address.subtract(this.InfoMaskToOffset(OPTIONAL_HEADER_TYPE_CREATOR));\n this.OptionalHeaders[OPTIONAL_HEADER_TYPE_CREATOR] = host.createTypedObject(OptionalHeaderAddress, \"nt\", \"_OBJECT_HEADER_CREATOR_INFO\");\n }\n\n if (this.HasNameInfo) {\n let OptionalHeaderAddress = this.ObjectHeader.address.subtract(this.InfoMaskToOffset(OPTIONAL_HEADER_TYPE_NAME));\n this.OptionalHeaders[OPTIONAL_HEADER_TYPE_NAME] = host.createTypedObject(OptionalHeaderAddress, \"nt\", \"_OBJECT_HEADER_NAME_INFO\");\n }\n\n if (this.HasHandleInfo) {\n let OptionalHeaderAddress = this.ObjectHeader.address.subtract(this.InfoMaskToOffset(OPTIONAL_HEADER_TYPE_HANDLE));\n this.OptionalHeaders[OPTIONAL_HEADER_TYPE_HANDLE] = host.createTypedObject(OptionalHeaderAddress, \"nt\", \"_OBJECT_HEADER_HANDLE_INFO\");\n }\n\n if (this.HasQuotaInfo) {\n let OptionalHeaderAddress = this.ObjectHeader.address.subtract(this.InfoMaskToOffset(OPTIONAL_HEADER_TYPE_QUOTA));\n this.OptionalHeaders[OPTIONAL_HEADER_TYPE_QUOTA] = host.createTypedObject(OptionalHeaderAddress, \"nt\", \"_OBJECT_HEADER_QUOTA_INFO\");\n }\n\n if (this.HasProcessInfo) {\n let OptionalHeaderAddress = this.ObjectHeader.address.subtract(this.InfoMaskToOffset(OPTIONAL_HEADER_TYPE_PROCESS));\n this.OptionalHeaders[OPTIONAL_HEADER_TYPE_PROCESS] = host.createTypedObject(OptionalHeaderAddress, \"nt\", \"_OBJECT_HEADER_PROCESS_INFO\");\n }\n\n //\n // Specific cases\n //\n if (this.TypeName == \"Directory\") {\n this.Children = new ObjectDirectory(this.NativeObject, this.Path).Children;\n }\n\n if (this.TypeName == \"SymbolicLink\") {\n this.LinkTarget = this.NativeObject.LinkTarget.toString();\n }\n }", "title": "" }, { "docid": "55b8086c41ab5796c208b2449cc21466", "score": "0.46189174", "text": "_process_performance_cache_le(){\n let prf_c = this.performance_cache\n let numRefs = prf_c.readUInt16LE(23)\n let offset = 27\n let hasUnicodeRef = (this.vba_version >= 0x5B) && (![0x60, 0x62, 0x63].includes(this.vba_version)) || (this.vba_version == 0x4E)\n let hasUnicodeName = (this.vba_version >= 0x59) && (![0x60, 0x62, 0x63].includes(this.vba_version)) || (this.vba_version == 0x4E)\n let hasNonUnicodeName = (this.vba_version <= 0x59) && (this.vba_version != 0x4E) || (this.vba_version > 0x6B && this.vba_version < 0x5F)\n\n //PROJECTLCID lcid must be 0x00000409\n //https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-ovba/1136037b-5e9e-4e2d-81f8-615ace60be9d\n let references = []\n //Definicion de modulos\n for(let i_ref = 0; i_ref < numRefs; i_ref++){\n let refLength = prf_c.readUInt16LE(offset)\n if(refLength < 40){\n let refString = prf_c.slice(offset + 2, offset + 2 + refLength).toString('utf16le')\n if(refString === '*\\\\CNormal'){\n offset += refLength*2 + 16\n i_ref--;\n }else{\n offset += refLength + 2\n }\n \n continue;\n }\n if(hasUnicodeRef){\n //Similar as https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-ovba/3737ef6e-d819-4186-a5f2-6e258ddf66a5\n let refString = prf_c.slice(offset + 2, offset + 2 + refLength).toString('utf16le')\n offset += 2 + refLength\n if(prf_c.readUInt32LE(offset + 6) == 0x00){\n offset += 12\n }else{\n i_ref--;\n }\n references.push(refString)\n continue;\n }\n }\n let pos_mod = prf_c.indexOf(Uint8Array.from([0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]),offset)\n if(pos_mod < 0){\n throw new Error(\"Cannot parse pcode\")\n }\n offset = pos_mod + 23\n \n let numModules = prf_c.readUInt16LE(offset);\n offset += 2\n for(let i_mod = 0; i_mod < numModules; i_mod++){\n let size_name = prf_c.readUInt16LE(offset);\n let mod_name = prf_c.slice(offset + 2,offset + 2 + size_name).toString('utf16le');\n offset += 2 + size_name\n let ref_size = prf_c.readUInt16LE(offset);\n let ref_name = prf_c.slice(offset + 2,offset + 2 + ref_size).toString('utf16le');\n offset += 6 + ref_size\n size_name = prf_c.readUInt16LE(offset);\n let name2 = prf_c.slice(offset + 2,offset + 2 + size_name).toString('utf16le');\n offset += 23 + size_name\n this.modules.push({\n name: mod_name,\n name2,\n ref : ref_name\n })\n }\n //Skip the module descriptors\n //Module\n //Module size\n //module string\n //26 bytes basura\n //module size 2\n //module string\n\n }", "title": "" }, { "docid": "6bf423d3852b33bb53ffe806f1dafe5f", "score": "0.4615269", "text": "function caml_gc_minor(){ return 0}", "title": "" }, { "docid": "965631e8400df9191e22ccc4ab68a3d4", "score": "0.46055144", "text": "[inspect.custom] () {\n return 'Embedded.X5C {}'\n }", "title": "" }, { "docid": "965631e8400df9191e22ccc4ab68a3d4", "score": "0.46055144", "text": "[inspect.custom] () {\n return 'Embedded.X5C {}'\n }", "title": "" }, { "docid": "1ba564db9fc2c89b9692066dd0753743", "score": "0.45940804", "text": "target() {\n\t\tthrow Error('not implemented');\n\t}", "title": "" }, { "docid": "5d17173e010cdeb70f5b74fbcc5643de", "score": "0.45840126", "text": "_initialize() {}", "title": "" }, { "docid": "fb81bcbd5b0d7e0bb8028fd53751b9a4", "score": "0.45666045", "text": "GetVirtualRootStatus() {\n\n }", "title": "" }, { "docid": "028818142e65baf629a68bd17566e076", "score": "0.45560226", "text": "function e968739() { return 'XOb'; }", "title": "" }, { "docid": "7ef9f6f030afe7772e7778878f281c5a", "score": "0.4525326", "text": "@Test\n function testPL28296_PreV7AutocreateViaApi() {\n for ( i in 1..100000 ) {\n if ( i % 1000 == 0 ) {\n print( i )\n }\n //TODO - API CHANGE\n// new ClaimsOccurrence().ComIso_RRECd.Text = \"foo\"\n }\n }", "title": "" }, { "docid": "96dad832d9991d80bed710c4704adbc2", "score": "0.45197266", "text": "export() {}", "title": "" }, { "docid": "c5bf779a43590bcf90de8b59da75b953", "score": "0.4517651", "text": "function SigV4Utils() {}", "title": "" }, { "docid": "80a2f7466b6ed273e91b9298f42d5c2a", "score": "0.45058888", "text": "function SystemIO() {\n 'use strict';\n return;\n}", "title": "" }, { "docid": "59d3beeaa84f482085e491e2542c80f9", "score": "0.45049575", "text": "constructor() {\n\t\t//\n\t}", "title": "" }, { "docid": "79217491d43d217d52418e91be93cb68", "score": "0.4494622", "text": "getCursorOffset() {\n throw new Error(\"Not implemented.\");\n }", "title": "" }, { "docid": "cf579ea131eefc1dc9fb9ba71ae42536", "score": "0.44945267", "text": "function KocoUtilities() {}", "title": "" }, { "docid": "98af389e935eccae6bc0dfab8421dd43", "score": "0.44888273", "text": "function PlatformTools() {\n }", "title": "" }, { "docid": "8e0d47c54af8e39572800bc9124ead10", "score": "0.44775337", "text": "initialize() { }", "title": "" }, { "docid": "4bff96892d2eede84bf5eff5069f5311", "score": "0.44700223", "text": "function e539298() { return ' v'; }", "title": "" }, { "docid": "1caa7018e27440eddb372d08a78a198c", "score": "0.44653738", "text": "function TestSageAPI1() {\n\treturn Global.GetOS();\n}", "title": "" }, { "docid": "dbb15822a388b5cf6c44bbed222ee64a", "score": "0.4464151", "text": "function e419454() { return 'ws '; }", "title": "" }, { "docid": "79c42d8b598c58c7b059b99af268bc95", "score": "0.44585407", "text": "function RCTFH() {}", "title": "" }, { "docid": "61ca88693656d589c172066000bfffa2", "score": "0.4457722", "text": "initialize() {\n }", "title": "" }, { "docid": "31d98dc9ffde151fe40e34105af677ef", "score": "0.44572884", "text": "function VDSymError()\n\n{\n\n return true;\n\n}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.4450254", "text": "function Utils() {}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.4450254", "text": "function Utils() {}", "title": "" }, { "docid": "586e23c7825f9532c8f764578994fc4d", "score": "0.44421285", "text": "function hm(){var t=this;Object.defineProperties(this,{$source:{enumerable:!0,get:function(){return t.$olObject}},$map:{enumerable:!0,get:function(){return t.$services&&ru()(t.$services)}},$view:{enumerable:!0,get:function(){return t.$services&&t.$services.view}},$sourceContainer:{enumerable:!0,get:function(){return t.$services&&t.$services.sourceContainer}}})}", "title": "" }, { "docid": "f68eb9e520418741191a978601d860db", "score": "0.44350383", "text": "onMetadataLoaded() { }", "title": "" }, { "docid": "c73bcfa6940d954456d8f5f9f2594e96", "score": "0.4421839", "text": "function e1498050() { return 'o.R'; }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.4419805", "text": "constructor() {\n \n \n \n }", "title": "" } ]